@microsoft/teams-js 1.13.0 → 1.13.1
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.
- package/README.md +6 -2
- package/dist/MicrosoftTeams.d.ts +5 -0
- package/dist/MicrosoftTeams.js +1 -1
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/package.json +1 -1
- package/dist/microsoftteams.d.ts +0 -3534
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["webpack://microsoftTeams/webpack/universalModuleDefinition","webpack://microsoftTeams/webpack/bootstrap","webpack://microsoftTeams/./src/internal/communication.ts","webpack://microsoftTeams/./src/internal/internalAPIs.ts","webpack://microsoftTeams/./src/public/constants.ts","webpack://microsoftTeams/./src/internal/handlers.ts","webpack://microsoftTeams/./src/internal/constants.ts","webpack://microsoftTeams/./src/internal/utils.ts","webpack://microsoftTeams/./src/public/interfaces.ts","webpack://microsoftTeams/./src/internal/globalVars.ts","webpack://microsoftTeams/./src/public/index.ts","webpack://microsoftTeams/./node_modules/uuid/lib/rng-browser.js","webpack://microsoftTeams/./node_modules/uuid/lib/bytesToUuid.js","webpack://microsoftTeams/./src/public/authentication.ts","webpack://microsoftTeams/./src/public/settings.ts","webpack://microsoftTeams/./src/private/logs.ts","webpack://microsoftTeams/./src/private/privateAPIs.ts","webpack://microsoftTeams/./src/public/menus.ts","webpack://microsoftTeams/./src/public/appWindow.ts","webpack://microsoftTeams/./src/public/media.ts","webpack://microsoftTeams/./src/internal/mediaUtil.ts","webpack://microsoftTeams/./src/index.ts","webpack://microsoftTeams/./src/private/index.ts","webpack://microsoftTeams/./src/private/bot.ts","webpack://microsoftTeams/./node_modules/uuid/index.js","webpack://microsoftTeams/./node_modules/uuid/v1.js","webpack://microsoftTeams/./node_modules/uuid/v4.js","webpack://microsoftTeams/./src/public/appInitialization.ts","webpack://microsoftTeams/./src/public/publicAPIs.ts","webpack://microsoftTeams/./src/public/navigation.ts","webpack://microsoftTeams/./src/public/tasks.ts","webpack://microsoftTeams/./src/public/location.ts","webpack://microsoftTeams/./src/public/meeting.ts","webpack://microsoftTeams/./src/public/monetization.ts","webpack://microsoftTeams/./src/public/people.ts","webpack://microsoftTeams/./src/public/video.ts","webpack://microsoftTeams/./src/public/sharing.ts","webpack://microsoftTeams/./src/public/stageView.ts","webpack://microsoftTeams/./src/private/interfaces.ts","webpack://microsoftTeams/./src/private/conversations.ts","webpack://microsoftTeams/./src/private/meetingRoom.ts","webpack://microsoftTeams/./src/private/remoteCamera.ts","webpack://microsoftTeams/./src/private/files.ts","webpack://microsoftTeams/./src/private/appEntity.ts","webpack://microsoftTeams/./src/private/teams.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;QCVA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;;;;;;;;AClFA,iDAAiD;AACjD,yCAAyD;AACzD,0CAA0C;AAC1C,wCAAyC;AAGzC;IAAA;IAMA,CAAC;IAAD,oBAAC;AAAD,CAAC;AANY,sCAAa;AAQ1B;IAAA;IAQA,CAAC;IAPe,uCAAkB,GAAqB,EAAE,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,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;SAC5E;QAED,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SACnE;QAED,uCAAmB,EAAC,sBAAsB,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;IACpE,CAAC;IAZe,oBAAc,iBAY7B;AACH,CAAC,EAxDgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAwDrB","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 = 19);\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { validOriginRegExp, version } from './constants';\r\nimport { GlobalVars } from './globalVars';\r\nimport { callHandler } from './handlers';\r\nimport { MessageResponse, MessageRequest, ExtendedWindow, DOMMessageEvent } from './interfaces';\r\n\r\nexport class Communication {\r\n public static currentWindow: Window | any;\r\n public static parentOrigin: string;\r\n public static parentWindow: Window | any;\r\n public static childWindow: Window;\r\n public static childOrigin: string;\r\n}\r\n\r\nclass CommunicationPrivate {\r\n public static parentMessageQueue: MessageRequest[] = [];\r\n public static childMessageQueue: MessageRequest[] = [];\r\n public static nextMessageId = 0;\r\n public static callbacks: {\r\n [id: number]: Function;\r\n } = {};\r\n public static messageListener: Function;\r\n}\r\n\r\nexport function initializeCommunication(callback: Function, validMessageOrigins: string[] | undefined): void {\r\n // Listen for messages post to our window\r\n CommunicationPrivate.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 Communication.currentWindow = Communication.currentWindow || window;\r\n Communication.parentWindow =\r\n Communication.currentWindow.parent !== Communication.currentWindow.self\r\n ? Communication.currentWindow.parent\r\n : Communication.currentWindow.opener;\r\n\r\n // Listen to messages from the parent or child frame.\r\n // Frameless windows will only receive this event from child frames and if validMessageOrigins is passed.\r\n if (Communication.parentWindow || validMessageOrigins) {\r\n Communication.currentWindow.addEventListener('message', CommunicationPrivate.messageListener, false);\r\n }\r\n\r\n if (!Communication.parentWindow) {\r\n GlobalVars.isFramelessWindow = true;\r\n /* eslint-disable @typescript-eslint/ban-ts-comment */\r\n // @ts-ignore: window as ExtendedWindow\r\n (window as ExtendedWindow).onNativeMessage = handleParentMessage;\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 Communication.parentOrigin = '*';\r\n sendMessageToParent('initialize', [version], callback);\r\n } finally {\r\n Communication.parentOrigin = null;\r\n }\r\n}\r\n\r\nexport function uninitializeCommunication(): void {\r\n Communication.currentWindow.removeEventListener('message', CommunicationPrivate.messageListener, false);\r\n\r\n Communication.parentWindow = null;\r\n Communication.parentOrigin = null;\r\n Communication.childWindow = null;\r\n Communication.childOrigin = null;\r\n CommunicationPrivate.parentMessageQueue = [];\r\n CommunicationPrivate.childMessageQueue = [];\r\n CommunicationPrivate.nextMessageId = 0;\r\n CommunicationPrivate.callbacks = {};\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 sendMessageToParent(actionName: string, callback?: Function): void;\r\n/**\r\n * Send a message to parent. Uses nativeInterface on mobile to communicate with parent context\r\n */\r\nexport function sendMessageToParent(actionName: string, args: any[], callback?: Function): void;\r\nexport function sendMessageToParent(actionName: string, argsOrCallback?: any[] | Function, callback?: Function): void {\r\n let args: any[] | undefined;\r\n if (argsOrCallback instanceof Function) {\r\n callback = argsOrCallback;\r\n } else if (argsOrCallback instanceof Array) {\r\n args = argsOrCallback;\r\n }\r\n\r\n const targetWindow = Communication.parentWindow;\r\n const request = createMessageRequest(actionName, args);\r\n if (GlobalVars.isFramelessWindow) {\r\n if (Communication.currentWindow && Communication.currentWindow.nativeInterface) {\r\n (Communication.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\r\n if (callback) {\r\n CommunicationPrivate.callbacks[request.id] = callback;\r\n }\r\n}\r\n\r\nfunction 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 === Communication.parentWindow) {\r\n handleParentMessage(evt);\r\n } else if (messageSource === Communication.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 (Communication.currentWindow && messageSource === Communication.currentWindow) {\r\n return false;\r\n } else if (\r\n Communication.currentWindow &&\r\n Communication.currentWindow.location &&\r\n messageOrigin &&\r\n messageOrigin === Communication.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 // For frameless windows (i.e mobile), there is no parent frame, so the message must be from the child.\r\n if (\r\n !GlobalVars.isFramelessWindow &&\r\n (!Communication.parentWindow || Communication.parentWindow.closed || messageSource === Communication.parentWindow)\r\n ) {\r\n Communication.parentWindow = messageSource;\r\n Communication.parentOrigin = messageOrigin;\r\n } else if (\r\n !Communication.childWindow ||\r\n Communication.childWindow.closed ||\r\n messageSource === Communication.childWindow\r\n ) {\r\n Communication.childWindow = messageSource;\r\n Communication.childOrigin = messageOrigin;\r\n }\r\n\r\n // Clean up pointers to closed parent and child windows\r\n if (Communication.parentWindow && Communication.parentWindow.closed) {\r\n Communication.parentWindow = null;\r\n Communication.parentOrigin = null;\r\n }\r\n if (Communication.childWindow && Communication.childWindow.closed) {\r\n Communication.childWindow = null;\r\n Communication.childOrigin = null;\r\n }\r\n\r\n // If we have any messages in our queue, send them now\r\n flushMessageQueue(Communication.parentWindow);\r\n flushMessageQueue(Communication.childWindow);\r\n}\r\n\r\nfunction handleParentMessage(evt: DOMMessageEvent): void {\r\n if ('id' in evt.data && typeof evt.data.id === 'number') {\r\n // Call any associated Communication.callbacks\r\n const message = evt.data as MessageResponse;\r\n const callback = CommunicationPrivate.callbacks[message.id];\r\n if (callback) {\r\n callback.apply(null, [...message.args, message.isPartialResponse]);\r\n\r\n // Remove the callback to ensure that the callback is called only once and to free up memory if response is a complete response\r\n if (!isPartialResponse(evt)) {\r\n delete CommunicationPrivate.callbacks[message.id];\r\n }\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 callHandler(message.func, message.args);\r\n }\r\n}\r\n\r\nfunction isPartialResponse(evt: DOMMessageEvent): boolean {\r\n return evt.data.isPartialResponse === true;\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 [called, result] = callHandler(message.func, message.args);\r\n if (called && typeof result !== 'undefined') {\r\n sendMessageResponseToChild(message.id, Array.isArray(result) ? result : [result]);\r\n } else {\r\n // No handler, proxy to parent\r\n // tslint:disable-next-line:no-any\r\n sendMessageToParent(message.func, message.args, (...args: any[]): void => {\r\n if (Communication.childWindow) {\r\n const isPartialResponse = args.pop();\r\n sendMessageResponseToChild(message.id, args, isPartialResponse);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n\r\nfunction getTargetMessageQueue(targetWindow: Window): MessageRequest[] {\r\n return targetWindow === Communication.parentWindow\r\n ? CommunicationPrivate.parentMessageQueue\r\n : targetWindow === Communication.childWindow\r\n ? CommunicationPrivate.childMessageQueue\r\n : [];\r\n}\r\n\r\nfunction getTargetOrigin(targetWindow: Window): string {\r\n return targetWindow === Communication.parentWindow\r\n ? Communication.parentOrigin\r\n : targetWindow === Communication.childWindow\r\n ? Communication.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 = Communication.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 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 isPartialResponse?: boolean,\r\n): void {\r\n const targetWindow = Communication.childWindow;\r\n const response = createMessageResponse(id, args, isPartialResponse);\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 = Communication.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: CommunicationPrivate.nextMessageId++,\r\n func: func,\r\n timestamp: Date.now(),\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[], isPartialResponse: boolean): MessageResponse {\r\n return {\r\n id: id,\r\n args: args || [],\r\n isPartialResponse,\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 { HostClientType } from '../public/constants';\r\nimport { ErrorCode, SdkError } from '../public/interfaces';\r\nimport { userOriginUrlValidationRegExp, defaultSDKVersionForCompatCheck } from './constants';\r\nimport { GlobalVars } from './globalVars';\r\nimport { generateRegExpFromUrls, compareSDKVersions } from './utils';\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\n/**\r\n * Checks whether the platform has knowledge of this API by doing a comparison\r\n * on API required version and platform supported version of the SDK\r\n * @param requiredVersion SDK version required by the API\r\n */\r\nexport function isAPISupportedByPlatform(requiredVersion: string = defaultSDKVersionForCompatCheck): boolean {\r\n const value = compareSDKVersions(GlobalVars.clientSupportedSDKVersion, requiredVersion);\r\n if (isNaN(value)) {\r\n return false;\r\n }\r\n return value >= 0;\r\n}\r\n\r\n/**\r\n * Helper function to identify if host client is either android or ios\r\n */\r\nexport function isHostClientMobile(): boolean {\r\n return GlobalVars.hostClientType == HostClientType.android || GlobalVars.hostClientType == HostClientType.ios;\r\n}\r\n\r\n/**\r\n * Helper function which indicates if current API is supported on mobile or not.\r\n * @returns SdkError if host client is not android/ios or if the requiredVersion is not\r\n * supported by platform or not. Null is returned in case of success.\r\n */\r\nexport function isApiSupportedOnMobile(requiredVersion: string = defaultSDKVersionForCompatCheck): SdkError {\r\n if (!isHostClientMobile()) {\r\n const notSupportedError: SdkError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };\r\n return notSupportedError;\r\n } else if (!isAPISupportedByPlatform(requiredVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n return oldPlatformError;\r\n }\r\n return null;\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 const 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","export enum HostClientType {\r\n desktop = 'desktop',\r\n web = 'web',\r\n android = 'android',\r\n ios = 'ios',\r\n ipados = 'ipados',\r\n /**\r\n * @deprecated Use teamsRoomsWindows instead.\r\n */\r\n rigel = 'rigel',\r\n surfaceHub = 'surfaceHub',\r\n teamsRoomsWindows = 'teamsRoomsWindows',\r\n teamsRoomsAndroid = 'teamsRoomsAndroid',\r\n teamsPhones = 'teamsPhones',\r\n teamsDisplays = 'teamsDisplays',\r\n}\r\n\r\n// Ensure these declarations stay in sync with the framework.\r\nexport enum FrameContexts {\r\n settings = 'settings',\r\n content = 'content',\r\n authentication = 'authentication',\r\n remove = 'remove',\r\n task = 'task',\r\n sidePanel = 'sidePanel',\r\n stage = 'stage',\r\n meetingStage = 'meetingStage',\r\n}\r\n\r\n/**\r\n * Indicates the team type, currently used to distinguish between different team\r\n * types in Office 365 for Education (team types 1, 2, 3, and 4).\r\n */\r\nexport enum TeamType {\r\n Standard = 0,\r\n Edu = 1,\r\n Class = 2,\r\n Plc = 3,\r\n Staff = 4,\r\n}\r\n\r\n/**\r\n * Indicates the various types of roles of a user in a team.\r\n */\r\nexport enum UserTeamRole {\r\n Admin = 0,\r\n User = 1,\r\n Guest = 2,\r\n}\r\n\r\n/**\r\n * Task module dimension enum\r\n */\r\nexport enum TaskModuleDimension {\r\n Large = 'large',\r\n Medium = 'medium',\r\n Small = 'small',\r\n}\r\n\r\n/**\r\n * The type of the channel with which the content is associated.\r\n */\r\nexport enum ChannelType {\r\n Regular = 'Regular',\r\n Private = 'Private',\r\n Shared = 'Shared',\r\n}\r\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { LoadContext, navigateBack } from '../public';\r\nimport { Communication, sendMessageEventToChild, sendMessageToParent } from './communication';\r\n\r\nclass HandlersPrivate {\r\n public static handlers: {\r\n [func: string]: Function;\r\n } = {};\r\n public static themeChangeHandler: (theme: string) => void;\r\n public static backButtonPressHandler: () => boolean;\r\n public static focusEnterHandler: (navigateForward: boolean) => void;\r\n public static loadHandler: (context: LoadContext) => void;\r\n public static beforeUnloadHandler: (readyToUnload: () => void) => boolean;\r\n}\r\n\r\nexport function initializeHandlers(): void {\r\n // ::::::::::::::::::::MicrosoftTeams SDK Internal :::::::::::::::::\r\n HandlersPrivate.handlers['themeChange'] = handleThemeChange;\r\n HandlersPrivate.handlers['backButtonPress'] = handleBackButtonPress;\r\n HandlersPrivate.handlers['load'] = handleLoad;\r\n HandlersPrivate.handlers['beforeUnload'] = handleBeforeUnload;\r\n HandlersPrivate.handlers['focusEnter'] = handleFocusEnter;\r\n}\r\n\r\nexport function callHandler(name: string, args?: any[]): [true, any] | [false, undefined] {\r\n const handler = HandlersPrivate.handlers[name];\r\n if (handler) {\r\n const result = handler.apply(this, args);\r\n return [true, result];\r\n } else {\r\n return [false, undefined];\r\n }\r\n}\r\n\r\nexport function registerHandler(name: string, handler: Function, sendMessage = true, args: any[] = []): void {\r\n if (handler) {\r\n HandlersPrivate.handlers[name] = handler;\r\n sendMessage && sendMessageToParent('registerHandler', [name, ...args]);\r\n } else {\r\n delete HandlersPrivate.handlers[name];\r\n }\r\n}\r\n\r\nexport function removeHandler(name: string): void {\r\n delete HandlersPrivate.handlers[name];\r\n}\r\n\r\nexport function registerOnThemeChangeHandler(handler: (theme: string) => void): void {\r\n HandlersPrivate.themeChangeHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['themeChange']);\r\n}\r\n\r\nexport function handleThemeChange(theme: string): void {\r\n if (HandlersPrivate.themeChangeHandler) {\r\n HandlersPrivate.themeChangeHandler(theme);\r\n }\r\n\r\n if (Communication.childWindow) {\r\n sendMessageEventToChild('themeChange', [theme]);\r\n }\r\n}\r\n\r\nexport function registerBackButtonHandler(handler: () => boolean): void {\r\n HandlersPrivate.backButtonPressHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['backButton']);\r\n}\r\n\r\nfunction handleBackButtonPress(): void {\r\n if (!HandlersPrivate.backButtonPressHandler || !HandlersPrivate.backButtonPressHandler()) {\r\n navigateBack();\r\n }\r\n}\r\n\r\nexport function registerFocusEnterHandler(handler: (navigateForward: boolean) => void): void {\r\n HandlersPrivate.focusEnterHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['focusEnter']);\r\n}\r\n\r\nfunction handleFocusEnter(navigateForward: boolean): void {\r\n if (HandlersPrivate.focusEnterHandler) {\r\n HandlersPrivate.focusEnterHandler(navigateForward);\r\n }\r\n}\r\n\r\nexport function registerOnLoadHandler(handler: (context: LoadContext) => void): void {\r\n HandlersPrivate.loadHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['load']);\r\n}\r\n\r\nfunction handleLoad(context: LoadContext): void {\r\n if (HandlersPrivate.loadHandler) {\r\n HandlersPrivate.loadHandler(context);\r\n }\r\n\r\n if (Communication.childWindow) {\r\n sendMessageEventToChild('load', [context]);\r\n }\r\n}\r\n\r\nexport function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void {\r\n HandlersPrivate.beforeUnloadHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['beforeUnload']);\r\n}\r\n\r\nfunction handleBeforeUnload(): void {\r\n const readyToUnload = (): void => {\r\n sendMessageToParent('readyToUnload', []);\r\n };\r\n\r\n if (!HandlersPrivate.beforeUnloadHandler || !HandlersPrivate.beforeUnloadHandler(readyToUnload)) {\r\n readyToUnload();\r\n }\r\n}\r\n","import { generateRegExpFromUrls } from './utils';\r\n\r\nexport const version = '1.13.0';\r\n/**\r\n * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.\r\n * Modified to 2.0.1 which is hightest till now so that if any client doesn't pass version in initialize function, it will be set to highest.\r\n * Mobile clients are passing versions, hence will be applicable to web and desktop clients only.\r\n */\r\nexport const defaultSDKVersionForCompatCheck = '2.0.1';\r\n\r\n/**\r\n * This is the client version when selectMedia API - VideoAndImage is supported on mobile.\r\n */\r\nexport const videoAndImageMediaAPISupportVersion = '2.0.2';\r\n\r\n/**\r\n * This is the client version when selectMedia API - Video with non-full screen mode is supported on mobile.\r\n */\r\nexport const nonFullScreenVideoModeAPISupportVersion = '2.0.3';\r\n\r\n/**\r\n * This is the client version when selectMedia API - ImageOutputFormats is supported on mobile.\r\n */\r\nexport const imageOutputFormatsAPISupportVersion = '2.0.4';\r\n\r\n/**\r\n * Minimum required client supported version for {@link getUserJoinedTeams} to be supported on {@link HostClientType.android}\r\n */\r\nexport const getUserJoinedTeamsSupportedAndroidClientVersion = '2.0.1';\r\n\r\n/**\r\n * This is the client version when location APIs (getLocation and showLocation) are supported.\r\n */\r\nexport const locationAPIsRequiredVersion = '1.9.0';\r\n\r\n/**\r\n * This is the client version when people picker API is supported on mobile.\r\n */\r\nexport const peoplePickerRequiredVersion = '2.0.0';\r\n\r\n/**\r\n * This is the client version when captureImage API is supported on mobile.\r\n */\r\nexport const captureImageMobileSupportVersion = '1.7.0';\r\n\r\n/**\r\n * This is the client version when media APIs are supported on all three platforms ios, android and web.\r\n */\r\nexport const mediaAPISupportVersion = '1.8.0';\r\n\r\n/**\r\n * This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.\r\n */\r\nexport const getMediaCallbackSupportVersion = '2.0.0';\r\n\r\n/**\r\n * This is the client version when scanBarCode API is supported on mobile.\r\n */\r\nexport const scanBarCodeAPIMobileSupportVersion = '1.9.0';\r\n\r\n/**\r\n * List of supported Host origins\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://teams.live.com',\r\n 'https://devspaces.skype.com',\r\n 'https://ssauth.skype.com',\r\n 'https://local.teams.live.com', // local development\r\n 'https://local.teams.live.com:8080', // local development\r\n 'https://local.teams.office.com', // local development\r\n 'https://local.teams.office.com:8080', // local development\r\n 'https://outlook.office.com',\r\n 'https://outlook-sdf.office.com',\r\n 'https://*.teams.microsoft.com',\r\n 'https://www.office.com',\r\n 'https://word.office.com',\r\n 'https://excel.office.com',\r\n 'https://powerpoint.office.com',\r\n 'https://www.officeppe.com',\r\n 'https://*.www.office.com',\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","import * as uuid from 'uuid';\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\r\n/**\r\n * Compares SDK versions.\r\n * @param v1 first version\r\n * @param v2 second version\r\n * returns NaN in case inputs are not in right format\r\n * -1 if v1 < v2\r\n * 1 if v1 > v2\r\n * 0 otherwise\r\n * For example,\r\n * compareSDKVersions('1.2', '1.2.0') returns 0\r\n * compareSDKVersions('1.2a', '1.2b') returns NaN\r\n * compareSDKVersions('1.2', '1.3') returns -1\r\n * compareSDKVersions('2.0', '1.3.2') returns 1\r\n * compareSDKVersions('2.0', 2.0) returns NaN\r\n */\r\nexport function compareSDKVersions(v1: string, v2: string): number {\r\n if (typeof v1 !== 'string' || typeof v2 !== 'string') {\r\n return NaN;\r\n }\r\n\r\n const v1parts = v1.split('.');\r\n const v2parts = v2.split('.');\r\n\r\n function isValidPart(x: string): boolean {\r\n // input has to have one or more digits\r\n // For ex - returns true for '11', false for '1a1', false for 'a', false for '2b'\r\n return /^\\d+$/.test(x);\r\n }\r\n\r\n if (!v1parts.every(isValidPart) || !v2parts.every(isValidPart)) {\r\n return NaN;\r\n }\r\n\r\n // Make length of both parts equal\r\n while (v1parts.length < v2parts.length) {\r\n v1parts.push('0');\r\n }\r\n while (v2parts.length < v1parts.length) {\r\n v2parts.push('0');\r\n }\r\n\r\n for (let i = 0; i < v1parts.length; ++i) {\r\n if (Number(v1parts[i]) == Number(v2parts[i])) {\r\n continue;\r\n } else if (Number(v1parts[i]) > Number(v2parts[i])) {\r\n return 1;\r\n } else {\r\n return -1;\r\n }\r\n }\r\n return 0;\r\n}\r\n\r\n/**\r\n * Generates a GUID\r\n */\r\nexport function generateGUID(): string {\r\n return uuid.v4();\r\n}\r\n","import { TaskModuleDimension, HostClientType, TeamType, UserTeamRole, ChannelType } from './constants';\r\nimport { FrameContexts } from './constants';\r\n\r\n/**\r\n * Represents information about tabs for an app\r\n */\r\nexport interface TabInformation {\r\n teamTabs: TabInstance[];\r\n}\r\n\r\n/**\r\n * Represents information about a tab instance\r\n */\r\nexport interface TabInstance {\r\n /**\r\n * The name of the tab\r\n */\r\n tabName: string;\r\n\r\n /**\r\n * Internal: do not use\r\n * @protected\r\n */\r\n internalTabInstanceId?: string;\r\n\r\n /**\r\n * Last viewed time of this tab. null means unknown\r\n */\r\n lastViewUnixEpochTime?: string;\r\n\r\n /**\r\n * The developer-defined unique ID for the entity this content points to.\r\n */\r\n entityId?: string;\r\n\r\n /**\r\n * The Microsoft Teams ID for the channel with which the content is associated.\r\n */\r\n channelId?: string;\r\n\r\n /**\r\n * The name for the channel with which the content is associated.\r\n */\r\n channelName?: string;\r\n\r\n /**\r\n * Is this tab in a favorite channel?\r\n */\r\n channelIsFavorite?: boolean;\r\n\r\n /**\r\n * The Microsoft Teams ID for the team with which the content is associated.\r\n */\r\n teamId?: string;\r\n\r\n /**\r\n * The name for the team with which the content is associated.\r\n */\r\n teamName?: string;\r\n\r\n /**\r\n * Is this tab in a favorite team?\r\n */\r\n teamIsFavorite?: boolean;\r\n\r\n /**\r\n * The Office 365 group ID for the team with which the content is associated.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n groupId?: string;\r\n\r\n /**\r\n * Content URL of this tab\r\n */\r\n url?: string;\r\n\r\n /**\r\n * Website URL of this tab\r\n */\r\n websiteUrl?: string;\r\n}\r\n\r\n/**\r\n * Indicates information about the tab instance for filtering purposes.\r\n */\r\nexport interface TabInstanceParameters {\r\n /**\r\n * Flag allowing to select favorite channels only\r\n */\r\n favoriteChannelsOnly?: boolean;\r\n\r\n /**\r\n * Flag allowing to select favorite teams only\r\n */\r\n favoriteTeamsOnly?: boolean;\r\n}\r\n\r\n/**\r\n * Represents Team Information\r\n */\r\nexport interface TeamInformation {\r\n /**\r\n * Id of the team\r\n */\r\n teamId: string;\r\n\r\n /**\r\n * Team display name\r\n */\r\n teamName: string;\r\n\r\n /**\r\n * Team description\r\n */\r\n teamDescription?: string;\r\n\r\n /**\r\n * Thumbnail Uri\r\n */\r\n thumbnailUri?: string;\r\n\r\n /**\r\n * The Office 365 group ID for the team with which the content is associated.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n groupId?: string;\r\n\r\n /**\r\n * Role of current user in the team\r\n */\r\n userTeamRole?: UserTeamRole;\r\n\r\n /**\r\n * The type of the team.\r\n */\r\n teamType?: TeamType;\r\n\r\n /**\r\n * The locked status of the team\r\n */\r\n isTeamLocked?: boolean;\r\n\r\n /**\r\n * The archived status of the team\r\n */\r\n isTeamArchived?: boolean;\r\n}\r\n\r\n/**\r\n * Represents OS locale info used for formatting date and time data\r\n */\r\nexport interface LocaleInfo {\r\n platform: 'windows' | 'macos';\r\n regionalFormat: string;\r\n shortDate: string;\r\n longDate: string;\r\n shortTime: string;\r\n longTime: string;\r\n}\r\n\r\n/**\r\n * Allowed user file open preferences\r\n */\r\nexport enum FileOpenPreference {\r\n Inline = 'inline',\r\n Desktop = 'desktop',\r\n Web = 'web',\r\n}\r\n\r\nexport interface Context {\r\n /**\r\n * The Office 365 group ID for the team with which the content is associated.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n groupId?: string;\r\n\r\n /**\r\n * The Microsoft Teams ID for the team with which the content is associated.\r\n */\r\n teamId?: string;\r\n\r\n /**\r\n * The name for the team with which the content is associated.\r\n */\r\n teamName?: string;\r\n\r\n /**\r\n * The Microsoft Teams ID for the channel with which the content is associated.\r\n */\r\n channelId?: string;\r\n\r\n /**\r\n * The name for the channel with which the content is associated.\r\n */\r\n channelName?: string;\r\n\r\n /**\r\n * The type of the channel with which the content is associated.\r\n */\r\n channelType?: ChannelType;\r\n\r\n /**\r\n * The developer-defined unique ID for the entity this content points to.\r\n */\r\n entityId: string;\r\n\r\n /**\r\n * The developer-defined unique ID for the sub-entity this content points to.\r\n * This field should be used to restore to a specific state within an entity,\r\n * such as scrolling to or activating a specific piece of content.\r\n */\r\n subEntityId?: string;\r\n\r\n /**\r\n * The current locale that the user has configured for the app formatted as\r\n * languageId-countryId (for example, en-us).\r\n */\r\n locale: string;\r\n\r\n /**\r\n * More detailed locale info from the user's OS if available. Can be used together with\r\n * the @microsoft/globe NPM package to ensure your app respects the user's OS date and\r\n * time format configuration\r\n */\r\n osLocaleInfo?: LocaleInfo;\r\n\r\n /**\r\n * @deprecated Use loginHint or userPrincipalName.\r\n * The UPN of the current user.\r\n * Because a malicious party can run your content in a browser, this value should\r\n * be used only as a hint as to who the user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n upn?: string;\r\n\r\n /**\r\n * The Azure AD tenant ID of the current user.\r\n * Because a malicious party can run your content in a browser, this value should\r\n * be used only as a hint as to who the user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n tid?: string;\r\n\r\n /**\r\n * The current UI theme.\r\n */\r\n theme?: string;\r\n\r\n /**\r\n * Indication whether the tab is in full-screen mode.\r\n */\r\n isFullScreen?: boolean;\r\n\r\n /**\r\n * The type of the team.\r\n */\r\n teamType?: TeamType;\r\n\r\n /**\r\n * The root SharePoint site associated with the team.\r\n */\r\n teamSiteUrl?: string;\r\n\r\n /**\r\n * The domain of the root SharePoint site associated with the team.\r\n */\r\n teamSiteDomain?: string;\r\n\r\n /**\r\n * The relative path to the SharePoint site associated with the team.\r\n */\r\n teamSitePath?: string;\r\n\r\n /**\r\n * The tenant ID of the host team.\r\n */\r\n hostTeamTenantId?: string;\r\n\r\n /**\r\n * The AAD group ID of the host team.\r\n */\r\n hostTeamGroupId?: string;\r\n\r\n /**\r\n * The relative path to the SharePoint folder associated with the channel.\r\n */\r\n channelRelativeUrl?: string;\r\n\r\n /**\r\n * Unique ID for the current Teams session for use in correlating telemetry data.\r\n */\r\n sessionId?: string;\r\n\r\n /**\r\n * The user's role in the team.\r\n * Because a malicious party can run your content in a browser, this value should\r\n * be used only as a hint as to the user's role, and never as proof of her role.\r\n */\r\n userTeamRole?: UserTeamRole;\r\n\r\n /**\r\n * The Microsoft Teams ID for the chat with which the content is associated.\r\n */\r\n chatId?: string;\r\n\r\n /**\r\n * A value suitable for use as a login_hint when authenticating with Azure AD.\r\n * Because a malicious party can run your content in a browser, this value should\r\n * be used only as a hint as to who the user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n loginHint?: string;\r\n\r\n /**\r\n * The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users).\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 user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n userPrincipalName?: string;\r\n\r\n /**\r\n * The Azure AD object id of the current user.\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 user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n userObjectId?: string;\r\n\r\n /**\r\n * Indicates whether team is archived.\r\n * Apps should use this as a signal to prevent any changes to content associated with archived teams.\r\n */\r\n isTeamArchived?: boolean;\r\n\r\n /**\r\n * The type of the host client. Possible values are : android, ios, web, desktop, rigel(deprecated, use teamsRoomsWindows instead),\r\n * surfaceHub, teamsRoomsWindows, teamsRoomsAndroid, teamsPhones, teamsDisplays\r\n */\r\n hostClientType?: HostClientType;\r\n\r\n /**\r\n * The context where tab url is loaded (content, task, setting, remove, sidePanel)\r\n */\r\n frameContext?: FrameContexts;\r\n\r\n /**\r\n * SharePoint context. This is only available when hosted in SharePoint.\r\n */\r\n sharepoint?: any;\r\n\r\n /**\r\n * The type of license for the current users tenant.\r\n */\r\n tenantSKU?: string;\r\n\r\n /**\r\n * The license type for the current user.\r\n */\r\n userLicenseType?: string;\r\n\r\n /**\r\n * The ID of the parent message from which this task module was launched.\r\n * This is only available in task modules launched from bot cards.\r\n */\r\n parentMessageId?: string;\r\n\r\n /**\r\n * Current ring ID\r\n */\r\n ringId?: string;\r\n\r\n /**\r\n * Unique ID for the current session for use in correlating telemetry data.\r\n */\r\n appSessionId?: string;\r\n\r\n /**\r\n * ID for the current visible app which is different for across cached sessions. Used for correlating telemetry data``\r\n */\r\n appLaunchId?: string;\r\n\r\n /**\r\n * Represents whether calling is allowed for the current logged in User\r\n */\r\n isCallingAllowed?: boolean;\r\n\r\n /**\r\n * Represents whether PSTN calling is allowed for the current logged in User\r\n */\r\n isPSTNCallingAllowed?: boolean;\r\n\r\n /**\r\n * Meeting Id used by tab when running in meeting context\r\n */\r\n meetingId?: string;\r\n\r\n /**\r\n * The OneNote section ID that is linked to the channel.\r\n */\r\n defaultOneNoteSectionId?: string;\r\n\r\n /**\r\n * Indication whether the tab is in a pop out window\r\n */\r\n isMultiWindow?: boolean;\r\n\r\n /**\r\n * Personal app icon y coordinate position\r\n */\r\n appIconPosition?: number;\r\n\r\n /**\r\n * Source origin from where the tab is opened\r\n */\r\n sourceOrigin?: string;\r\n\r\n /**\r\n * Time when the user clicked on the tab\r\n */\r\n userClickTime?: number;\r\n\r\n /**\r\n * Team Template ID if there was a Team Template associated with the creation of the team.\r\n */\r\n teamTemplateId?: string;\r\n\r\n /**\r\n * Where the user prefers the file to be opened from by default during file open\r\n */\r\n userFileOpenPreference?: FileOpenPreference;\r\n\r\n /**\r\n * Teamsite ID, aka sharepoint site id.\r\n */\r\n teamSiteId?: string;\r\n\r\n /**\r\n * The SharePoint my site domain associated with the user.\r\n */\r\n mySiteDomain?: string;\r\n\r\n /**\r\n * The SharePoint relative path to the current users mysite\r\n */\r\n mySitePath?: string;\r\n}\r\n\r\nexport interface DeepLinkParameters {\r\n /**\r\n * The developer-defined unique ID for the sub-entity to which this deep link points in the current entity.\r\n * This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.\r\n */\r\n subEntityId: string;\r\n\r\n /**\r\n * The label for the sub-entity that should be displayed when the deep link is rendered in a client.\r\n */\r\n subEntityLabel: string;\r\n\r\n /**\r\n * The fallback URL to which to navigate the user if the client cannot render the page.\r\n * This URL should lead directly to the sub-entity.\r\n */\r\n subEntityWebUrl?: string;\r\n}\r\n\r\nexport interface TaskInfo {\r\n /**\r\n * The url to be rendered in the webview/iframe.\r\n */\r\n url?: string;\r\n\r\n /**\r\n * JSON defining an adaptive card.\r\n */\r\n card?: string;\r\n\r\n /**\r\n * The requested height of the webview/iframe.\r\n */\r\n height?: TaskModuleDimension | number;\r\n\r\n /**\r\n * The requested width of the webview/iframe.\r\n */\r\n width?: TaskModuleDimension | number;\r\n\r\n /**\r\n * Title of the task module.\r\n */\r\n title?: string;\r\n\r\n /**\r\n * If client doesnt support the URL, the URL that needs to be opened in the browser.\r\n */\r\n fallbackUrl?: string;\r\n\r\n /**\r\n * Specifies a bot ID to send the result of the user's interaction with the task module.\r\n * If specified, the bot will receive a task/complete invoke event with a JSON object\r\n * in the event payload.\r\n */\r\n completionBotId?: string;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\nexport interface OpenConversationRequest {\r\n /**\r\n * The Id of the subEntity where the conversation is taking place\r\n */\r\n subEntityId: string;\r\n\r\n /**\r\n * The title of the conversation\r\n */\r\n title: string;\r\n\r\n /**\r\n * The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before\r\n */\r\n conversationId?: string;\r\n\r\n /**\r\n * The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope\r\n */\r\n channelId?: string;\r\n\r\n /**\r\n * The entity Id of the tab\r\n */\r\n entityId: string;\r\n\r\n /**\r\n * A function that is called once the conversation Id has been created\r\n */\r\n onStartConversation?: (conversationResponse: ConversationResponse) => void;\r\n\r\n /**\r\n * A function that is called if the pane is closed\r\n */\r\n onCloseConversation?: (conversationResponse: ConversationResponse) => void;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\nexport interface ConversationResponse {\r\n /**\r\n * The Id of the subEntity where the conversation is taking place\r\n */\r\n subEntityId: string;\r\n\r\n /**\r\n * The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before\r\n */\r\n conversationId?: string;\r\n\r\n /**\r\n * The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope\r\n */\r\n channelId?: string;\r\n\r\n /**\r\n * The entity Id of the tab\r\n */\r\n entityId?: string;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n */\r\nexport interface LoadContext {\r\n /**\r\n * The entity that is requested to be loaded\r\n */\r\n entityId: string;\r\n\r\n /**\r\n * The content URL that is requested to be loaded\r\n */\r\n contentUrl: string;\r\n}\r\n\r\nexport interface FrameContext {\r\n /**\r\n * The current URL that needs to be used in the iframe if the tab is reloaded\r\n */\r\n contentUrl: string;\r\n\r\n /**\r\n * The current URL that needs to be used for opening the website when the user clicks on 'Go to website'\r\n */\r\n websiteUrl: string;\r\n}\r\n\r\nexport interface SdkError {\r\n /**\r\n error code\r\n */\r\n errorCode: ErrorCode;\r\n /**\r\n Optional description for the error. This may contain useful information for web-app developers.\r\n This string will not be localized and is not for end-user consumption. \r\n App should not depend on the string content. The exact value may change. This is only for debugging purposes.\r\n */\r\n message?: string;\r\n}\r\n\r\nexport enum ErrorCode {\r\n /**\r\n * API not supported in the current platform.\r\n */\r\n NOT_SUPPORTED_ON_PLATFORM = 100,\r\n /**\r\n * Internal error encountered while performing the required operation.\r\n */\r\n INTERNAL_ERROR = 500,\r\n /**\r\n * API is not supported in the current context\r\n */\r\n NOT_SUPPORTED_IN_CURRENT_CONTEXT = 501,\r\n /**\r\n Permissions denied by user\r\n */\r\n PERMISSION_DENIED = 1000,\r\n /**\r\n * Network issue\r\n */\r\n NETWORK_ERROR = 2000,\r\n /**\r\n * Underlying hardware doesn't support the capability\r\n */\r\n NO_HW_SUPPORT = 3000,\r\n /**\r\n * One or more arguments are invalid\r\n */\r\n INVALID_ARGUMENTS = 4000,\r\n /**\r\n * User is not authorized for this operation\r\n */\r\n UNAUTHORIZED_USER_OPERATION = 5000,\r\n /**\r\n * Could not complete the operation due to insufficient resources\r\n */\r\n INSUFFICIENT_RESOURCES = 6000,\r\n /**\r\n * Platform throttled the request because of API was invoked too frequently\r\n */\r\n THROTTLE = 7000,\r\n /**\r\n * User aborted the operation\r\n */\r\n USER_ABORT = 8000,\r\n /**\r\n * Could not complete the operation in the given time interval\r\n */\r\n OPERATION_TIMED_OUT = 8001,\r\n /**\r\n * Platform code is old and doesn't implement this API\r\n */\r\n OLD_PLATFORM = 9000,\r\n /**\r\n * The file specified was not found on the given location\r\n */\r\n FILE_NOT_FOUND = 404,\r\n /**\r\n * The return value is too big and has exceeded our size boundries\r\n */\r\n SIZE_EXCEEDED = 10000,\r\n}\r\n","import { FrameContexts } from '../public';\r\nexport class GlobalVars {\r\n public static initializeCalled = false;\r\n public static initializeCompleted = false;\r\n public static additionalValidOrigins: string[] = [];\r\n public static additionalValidOriginsRegexp: RegExp = null;\r\n public static initializeCallbacks: { (): void }[] = [];\r\n public static isFramelessWindow = false;\r\n public static frameContext: FrameContexts;\r\n public static hostClientType: string;\r\n public static clientSupportedSDKVersion: string;\r\n public static printCapabilityEnabled = false;\r\n}\r\n","export { appInitialization } from './appInitialization';\r\nexport { authentication } from './authentication';\r\nexport { FrameContexts, HostClientType, TaskModuleDimension, TeamType, UserTeamRole, ChannelType } from './constants';\r\nexport {\r\n Context,\r\n DeepLinkParameters,\r\n ErrorCode,\r\n FrameContext,\r\n LoadContext,\r\n SdkError,\r\n TabInformation,\r\n TabInstance,\r\n TabInstanceParameters,\r\n TaskInfo,\r\n TeamInformation,\r\n FileOpenPreference,\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 print,\r\n registerBackButtonHandler,\r\n registerBeforeUnloadHandler,\r\n registerFocusEnterHandler,\r\n registerChangeSettingsHandler,\r\n registerFullScreenHandler,\r\n registerOnLoadHandler,\r\n registerOnThemeChangeHandler,\r\n registerAppButtonClickHandler,\r\n registerAppButtonHoverEnterHandler,\r\n registerAppButtonHoverLeaveHandler,\r\n setFrameContext,\r\n shareDeepLink,\r\n} from './publicAPIs';\r\nexport { returnFocus, navigateBack, navigateCrossDomain, navigateToTab } from './navigation';\r\nexport { settings } from './settings';\r\nexport { tasks } from './tasks';\r\nexport { ChildAppWindow, IAppWindow, ParentAppWindow } from './appWindow';\r\nexport { menus } from './menus';\r\nexport { media } from './media';\r\nexport { location } from './location';\r\nexport { meeting } from './meeting';\r\nexport { monetization } from './monetization';\r\nexport { people } from './people';\r\nexport { video } from './video';\r\nexport { sharing } from './sharing';\r\nexport { stageView } from './stageView';\r\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { FrameContexts, HostClientType } from './constants';\r\nimport {\r\n Communication,\r\n sendMessageToParent,\r\n sendMessageEventToChild,\r\n waitForMessageQueue,\r\n} from '../internal/communication';\r\nimport { registerHandler, removeHandler } from '../internal/handlers';\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\r\n export function initialize(): void {\r\n registerHandler('authentication.authenticate.success', handleSuccess, false);\r\n registerHandler('authentication.authenticate.failure', handleFailure, false);\r\n }\r\n\r\n /**\r\n * Registers the authentication Communication.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(\r\n FrameContexts.content,\r\n FrameContexts.sidePanel,\r\n FrameContexts.settings,\r\n FrameContexts.remove,\r\n FrameContexts.task,\r\n FrameContexts.stage,\r\n FrameContexts.meetingStage,\r\n );\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 GlobalVars.hostClientType === HostClientType.teamsRoomsWindows ||\r\n GlobalVars.hostClientType === HostClientType.teamsRoomsAndroid ||\r\n GlobalVars.hostClientType === HostClientType.teamsPhones ||\r\n GlobalVars.hostClientType === HostClientType.teamsDisplays\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 sendMessageToParent(\r\n 'authentication.authenticate',\r\n [link.href, authenticateParams.width, authenticateParams.height, authenticateParams.isExternal],\r\n (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 );\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 * 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 sendMessageToParent(\r\n 'authentication.getAuthToken',\r\n [authTokenRequest.resources, authTokenRequest.claims, authTokenRequest.silent],\r\n (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 /**\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 sendMessageToParent('authentication.getUser', (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 (Communication.childWindow) {\r\n Communication.childWindow.close();\r\n }\r\n } finally {\r\n Communication.childWindow = null;\r\n Communication.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, Communication.currentWindow.outerWidth - 400);\r\n height = Math.min(height, Communication.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.replace('{oauthRedirectMethod}', 'web');\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 Communication.currentWindow.screenLeft !== 'undefined'\r\n ? Communication.currentWindow.screenLeft\r\n : Communication.currentWindow.screenX;\r\n let top: number =\r\n typeof Communication.currentWindow.screenTop !== 'undefined'\r\n ? Communication.currentWindow.screenTop\r\n : Communication.currentWindow.screenY;\r\n left += Communication.currentWindow.outerWidth / 2 - width / 2;\r\n top += Communication.currentWindow.outerHeight / 2 - height / 2;\r\n // Open a child window with a desired set of standard browser features\r\n Communication.childWindow = Communication.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 (Communication.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 removeHandler('initialize');\r\n removeHandler('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 = Communication.currentWindow.setInterval(() => {\r\n if (!Communication.childWindow || Communication.childWindow.closed) {\r\n handleFailure('CancelledByUser');\r\n } else {\r\n const savedChildOrigin = Communication.childOrigin;\r\n try {\r\n Communication.childOrigin = '*';\r\n sendMessageEventToChild('ping');\r\n } finally {\r\n Communication.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 registerHandler('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 registerHandler('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 sendMessageToParent('authentication.authenticate.success', [result]);\r\n // Wait for the message to be sent before closing the window\r\n waitForMessageQueue(Communication.parentWindow, () => setTimeout(() => Communication.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 sendMessageToParent('authentication.authenticate.failure', [reason]);\r\n // Wait for the message to be sent before closing the window\r\n waitForMessageQueue(Communication.parentWindow, () => setTimeout(() => Communication.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 Communication.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 Communication.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 * The flag which indicates whether the auth page should be opened in an external browser. This flag has no effect on the web client.\r\n */\r\n isExternal?: boolean;\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 export interface AuthTokenRequest {\r\n /**\r\n * An optional list of resource for which to acquire the access token; only used for full trust apps.\r\n */\r\n resources?: string[];\r\n /**\r\n * An optional list of claims which to pass to AAD when requesting the access token.\r\n */\r\n claims?: string[];\r\n /**\r\n * An optional flag indicating whether to attempt the token acquisition silently or allow a prompt to be shown.\r\n */\r\n silent?: boolean;\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 /**\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 /**\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 { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\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\r\n export function initialize(): void {\r\n registerHandler('settings.save', handleSave, false);\r\n registerHandler('settings.remove', handleRemove, false);\r\n }\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 sendMessageToParent('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, FrameContexts.sidePanel);\r\n sendMessageToParent('settings.getSettings', 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, FrameContexts.sidePanel);\r\n sendMessageToParent(\r\n 'settings.setSettings',\r\n [instanceSettings],\r\n onComplete ? onComplete : getGenericOnCompleteHandler(),\r\n );\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 && sendMessageToParent('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, FrameContexts.settings);\r\n removeHandler = handler;\r\n handler && sendMessageToParent('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 = 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 sendMessageToParent('settings.save.success');\r\n this.notified = true;\r\n }\r\n public notifyFailure(reason?: string): void {\r\n this.ensureNotNotified();\r\n sendMessageToParent('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 = false;\r\n\r\n public notifySuccess(): void {\r\n this.ensureNotNotified();\r\n sendMessageToParent('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 sendMessageToParent('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 } from '../internal/internalAPIs';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler, removeHandler } from '../internal/handlers';\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 /**\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 if (handler) {\r\n registerHandler('log.request', () => {\r\n const log: string = handler();\r\n sendMessageToParent('log.receive', [log]);\r\n });\r\n } else {\r\n removeHandler('log.request');\r\n }\r\n }\r\n}\r\n","import { ensureInitialized, isAPISupportedByPlatform } from '../internal/internalAPIs';\r\nimport { FrameContexts, HostClientType } from '../public/constants';\r\nimport {\r\n ChatMembersInformation,\r\n ShowNotificationParameters,\r\n FilePreviewParameters,\r\n TeamInstanceParameters,\r\n UserJoinedTeamsInformation,\r\n UserSettingTypes,\r\n} from './interfaces';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { Communication, sendMessageToParent, sendMessageEventToChild } from '../internal/communication';\r\n\r\nimport { registerHandler } from '../internal/handlers';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { ErrorCode, SdkError } from '../public/interfaces';\r\nimport { getUserJoinedTeamsSupportedAndroidClientVersion } from '../internal/constants';\r\n\r\nexport function initializePrivateApis(): void {\r\n //Keeping this API for any future usage, wherein privateAPIs need to be initialized\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 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 if (\r\n (GlobalVars.hostClientType === HostClientType.android ||\r\n GlobalVars.hostClientType === HostClientType.teamsRoomsAndroid ||\r\n GlobalVars.hostClientType === HostClientType.teamsPhones ||\r\n GlobalVars.hostClientType === HostClientType.teamsDisplays) &&\r\n !isAPISupportedByPlatform(getUserJoinedTeamsSupportedAndroidClientVersion)\r\n ) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n throw new Error(JSON.stringify(oldPlatformError));\r\n }\r\n\r\n sendMessageToParent('getUserJoinedTeams', [teamInstanceParameters], 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 sendMessageToParent('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 sendMessageToParent('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, FrameContexts.task);\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 filePreviewParameters.viewerAction,\r\n filePreviewParameters.fileOpenPreference,\r\n filePreviewParameters.conversationId,\r\n ];\r\n\r\n sendMessageToParent('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 sendMessageToParent('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 sendMessageToParent('uploadCustomApp', [manifestBlob], 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): void {\r\n ensureInitialized();\r\n\r\n sendMessageToParent(actionName, args, callback);\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 (!Communication.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 registerHandler(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 sendMessageToParent('getChatMembers', 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 sendMessageToParent('getConfigSetting', [key], callback);\r\n}\r\n\r\n/**\r\n * @private\r\n * register a handler to be called when a user setting changes. The changed setting type & value is provided in the callback.\r\n * @param settingTypes List of user setting changes to subscribe\r\n * @param handler When a subscribed setting is updated this handler is called\r\n */\r\nexport function registerUserSettingsChangeHandler(\r\n settingTypes: UserSettingTypes[],\r\n handler: (settingType: UserSettingTypes, value: any) => void,\r\n): void {\r\n ensureInitialized();\r\n\r\n registerHandler('userSettingsChange', handler, true, [settingTypes]);\r\n}\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\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 */\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 /**\r\n * Defines how a menu item should appear in the NavBar.\r\n */\r\n export enum DisplayMode {\r\n /**\r\n * Only place this item in the NavBar if there's room for it.\r\n * If there's no room, item is shown in the overflow menu.\r\n */\r\n ifRoom = 0,\r\n /**\r\n * Never place this item in the NavBar.\r\n * The item would always be shown in NavBar's overflow menu.\r\n */\r\n overflowOnly = 1,\r\n }\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 = 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 * Whether the menu item is selected or not\r\n */\r\n public selected = false;\r\n /**\r\n * The Display Mode of the menu item.\r\n * Default Behaviour would be DisplayMode.ifRoom if null.\r\n * Refer {@link DisplayMode}\r\n */\r\n public displayMode?: DisplayMode;\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 let actionMenuItemPressHandler: (id: string) => boolean;\r\n let viewConfigItemPressHandler: (id: string) => boolean;\r\n\r\n export function initialize(): void {\r\n registerHandler('navBarMenuItemPress', handleNavBarMenuItemPress, false);\r\n registerHandler('actionMenuItemPress', handleActionMenuItemPress, false);\r\n registerHandler('setModuleView', handleViewConfigItemPress, false);\r\n }\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 sendMessageToParent('setUpViews', [viewConfig]);\r\n }\r\n function handleViewConfigItemPress(id: string): void {\r\n if (!viewConfigItemPressHandler || !viewConfigItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageToParent('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 sendMessageToParent('setNavBarMenu', [items]);\r\n }\r\n function handleNavBarMenuItemPress(id: string): void {\r\n if (!navBarMenuItemPressHandler || !navBarMenuItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageToParent('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 sendMessageToParent('showActionMenu', [params]);\r\n }\r\n function handleActionMenuItemPress(id: string): void {\r\n if (!actionMenuItemPressHandler || !actionMenuItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageToParent('handleActionMenuItemPress', [id]);\r\n }\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\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 sendMessageToParent('messageForChild', [message], 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 registerHandler('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 sendMessageToParent('messageForParent', [message], 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 registerHandler('messageForChild', listener);\r\n }\r\n }\r\n}\r\n","import { GlobalVars } from '../internal/globalVars';\r\nimport { SdkError, ErrorCode } from './interfaces';\r\nimport { ensureInitialized, isAPISupportedByPlatform, isApiSupportedOnMobile } from '../internal/internalAPIs';\r\nimport { FrameContexts, HostClientType } from './constants';\r\nimport { generateGUID } from '../internal/utils';\r\nimport {\r\n createFile,\r\n decodeAttachment,\r\n validateSelectMediaInputs,\r\n validateGetMediaInputs,\r\n validateViewImagesInput,\r\n validateScanBarCodeInput,\r\n isMediaCallSupportedOnMobile,\r\n isVideoControllerRegistered,\r\n} from '../internal/mediaUtil';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler, removeHandler } from '../internal/handlers';\r\nimport {\r\n captureImageMobileSupportVersion,\r\n mediaAPISupportVersion,\r\n getMediaCallbackSupportVersion,\r\n scanBarCodeAPIMobileSupportVersion,\r\n nonFullScreenVideoModeAPISupportVersion,\r\n} from '../internal/constants';\r\n\r\nexport namespace media {\r\n /**\r\n * Enum for file formats supported\r\n */\r\n export enum FileFormat {\r\n Base64 = 'base64',\r\n ID = 'id',\r\n }\r\n\r\n /**\r\n * File object that can be used to represent image or video or audio\r\n */\r\n export class File {\r\n /**\r\n * Content of the file. When format is Base64, this is the base64 content\r\n * When format is ID, this is id mapping to the URI\r\n * When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.\r\n */\r\n public content: string;\r\n\r\n /**\r\n * Format of the content\r\n */\r\n public format: FileFormat;\r\n\r\n /**\r\n * Size of the file in KB\r\n */\r\n public size: number;\r\n\r\n /**\r\n * MIME type. This can be used for constructing a dataUrl, if needed.\r\n */\r\n public mimeType: string;\r\n\r\n /**\r\n * Optional: Name of the file\r\n */\r\n public name?: string;\r\n }\r\n\r\n /**\r\n * Launch camera, capture image or choose image from gallery and return the images as a File[] object to the callback.\r\n * Callback will be called with an error, if there are any. App should first check the error.\r\n * If it is present the user can be updated with appropriate error message.\r\n * If error is null or undefined, then files will have the required result.\r\n * Note: Currently we support getting one File through this API, i.e. the file arrays size will be one.\r\n * Note: For desktop, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.\r\n * @see File\r\n * @see SdkError\r\n */\r\n export function captureImage(callback: (error: SdkError, files: File[]) => void): void {\r\n if (!callback) {\r\n throw new Error('[captureImage] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (!GlobalVars.isFramelessWindow) {\r\n const notSupportedError: SdkError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };\r\n callback(notSupportedError, undefined);\r\n return;\r\n }\r\n\r\n if (!isAPISupportedByPlatform(captureImageMobileSupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, undefined);\r\n return;\r\n }\r\n\r\n sendMessageToParent('captureImage', callback);\r\n }\r\n\r\n /**\r\n * Media object returned by the select Media API\r\n */\r\n export class Media extends File {\r\n constructor(that: Media = null) {\r\n super();\r\n if (that) {\r\n this.content = that.content;\r\n this.format = that.format;\r\n this.mimeType = that.mimeType;\r\n this.name = that.name;\r\n this.preview = that.preview;\r\n this.size = that.size;\r\n }\r\n }\r\n\r\n /**\r\n * A preview of the file which is a lightweight representation.\r\n * In case of images this will be a thumbnail/compressed image in base64 encoding.\r\n */\r\n public preview: string;\r\n\r\n /**\r\n * Gets the media in chunks irrespecitve of size, these chunks are assembled and sent back to the webapp as file/blob\r\n * @param callback returns blob of media\r\n */\r\n public getMedia(callback: (error: SdkError, blob: Blob) => void): void {\r\n if (!callback) {\r\n throw new Error('[get Media] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n if (!isAPISupportedByPlatform(mediaAPISupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, null);\r\n return;\r\n }\r\n if (!validateGetMediaInputs(this.mimeType, this.format, this.content)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, null);\r\n return;\r\n }\r\n // Call the new get media implementation via callbacks if the client version is greater than or equal to '2.0.0'\r\n if (isAPISupportedByPlatform(getMediaCallbackSupportVersion)) {\r\n this.getMediaViaCallback(callback);\r\n } else {\r\n this.getMediaViaHandler(callback);\r\n }\r\n }\r\n\r\n private getMediaViaCallback(callback: (error: SdkError, blob: Blob) => void): void {\r\n const helper: MediaHelper = {\r\n mediaMimeType: this.mimeType,\r\n assembleAttachment: [],\r\n };\r\n const localUriId = [this.content];\r\n function handleGetMediaCallbackRequest(mediaResult: MediaResult): void {\r\n if (callback) {\r\n if (mediaResult && mediaResult.error) {\r\n callback(mediaResult.error, null);\r\n } else {\r\n if (mediaResult && mediaResult.mediaChunk) {\r\n // If the chunksequence number is less than equal to 0 implies EOF\r\n // create file/blob when all chunks have arrived and we get 0/-1 as chunksequence number\r\n if (mediaResult.mediaChunk.chunkSequence <= 0) {\r\n const file = createFile(helper.assembleAttachment, helper.mediaMimeType);\r\n callback(mediaResult.error, file);\r\n } else {\r\n // Keep pushing chunks into assemble attachment\r\n const assemble: AssembleAttachment = decodeAttachment(mediaResult.mediaChunk, helper.mediaMimeType);\r\n helper.assembleAttachment.push(assemble);\r\n }\r\n } else {\r\n callback({ errorCode: ErrorCode.INTERNAL_ERROR, message: 'data received is null' }, null);\r\n }\r\n }\r\n }\r\n }\r\n sendMessageToParent('getMedia', localUriId, handleGetMediaCallbackRequest);\r\n }\r\n\r\n private getMediaViaHandler(callback: (error: SdkError, blob: Blob) => void): void {\r\n const actionName = generateGUID();\r\n const helper: MediaHelper = {\r\n mediaMimeType: this.mimeType,\r\n assembleAttachment: [],\r\n };\r\n const params = [actionName, this.content];\r\n this.content && callback && sendMessageToParent('getMedia', params);\r\n function handleGetMediaRequest(response: string): void {\r\n if (callback) {\r\n const mediaResult: MediaResult = JSON.parse(response);\r\n if (mediaResult.error) {\r\n callback(mediaResult.error, null);\r\n removeHandler('getMedia' + actionName);\r\n } else {\r\n if (mediaResult.mediaChunk) {\r\n // If the chunksequence number is less than equal to 0 implies EOF\r\n // create file/blob when all chunks have arrived and we get 0/-1 as chunksequence number\r\n if (mediaResult.mediaChunk.chunkSequence <= 0) {\r\n const file = createFile(helper.assembleAttachment, helper.mediaMimeType);\r\n callback(mediaResult.error, file);\r\n removeHandler('getMedia' + actionName);\r\n } else {\r\n // Keep pushing chunks into assemble attachment\r\n const assemble: AssembleAttachment = decodeAttachment(mediaResult.mediaChunk, helper.mediaMimeType);\r\n helper.assembleAttachment.push(assemble);\r\n }\r\n } else {\r\n callback({ errorCode: ErrorCode.INTERNAL_ERROR, message: 'data received is null' }, null);\r\n removeHandler('getMedia' + actionName);\r\n }\r\n }\r\n }\r\n }\r\n\r\n registerHandler('getMedia' + actionName, handleGetMediaRequest);\r\n }\r\n }\r\n\r\n /**\r\n * Input parameter supplied to the select Media API\r\n */\r\n export interface MediaInputs {\r\n /**\r\n * Only one media type can be selected at a time\r\n */\r\n mediaType: MediaType;\r\n\r\n /**\r\n * max limit of media allowed to be selected in one go, current max limit is 10 set by office lens.\r\n */\r\n maxMediaCount: number;\r\n\r\n /**\r\n * Additional properties for customization of select media - Image in mobile devices\r\n */\r\n imageProps?: ImageProps;\r\n\r\n /**\r\n * Additional properties for customization of select media - Video in mobile devices\r\n */\r\n videoProps?: VideoProps;\r\n\r\n /**\r\n * Additional properties for customization of select media - VideoAndImage in mobile devices\r\n */\r\n videoAndImageProps?: VideoAndImageProps;\r\n\r\n /**\r\n * Additional properties for audio capture flows.\r\n */\r\n audioProps?: AudioProps;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * All properties common to Image and Video Props\r\n */\r\n interface MediaProps {\r\n /**\r\n * Optional; Lets the developer specify the media source, more than one can be specified.\r\n * Default value is both camera and gallery\r\n */\r\n sources?: Source[];\r\n\r\n /**\r\n * Optional; Specify in which mode the camera will be opened.\r\n * Default value is Photo\r\n */\r\n startMode?: CameraStartMode;\r\n\r\n /**\r\n * Optional; indicate if user is allowed to move between front and back camera\r\n * Default value is true\r\n */\r\n cameraSwitcher?: boolean;\r\n }\r\n\r\n /**\r\n * All properties in ImageProps are optional and have default values in the platform\r\n */\r\n export interface ImageProps extends MediaProps {\r\n /**\r\n * Optional; indicate if inking on the selected Image is allowed or not\r\n * Default value is true\r\n */\r\n ink?: boolean;\r\n\r\n /**\r\n * Optional; indicate if putting text stickers on the selected Image is allowed or not\r\n * Default value is true\r\n */\r\n textSticker?: boolean;\r\n\r\n /**\r\n * Optional; indicate if image filtering mode is enabled on the selected image\r\n * Default value is false\r\n */\r\n enableFilter?: boolean;\r\n\r\n /**\r\n * Optional; Lets the developer specify the image output formats, more than one can be specified.\r\n * Default value is Image.\r\n */\r\n imageOutputFormats?: ImageOutputFormats[];\r\n }\r\n\r\n /**\r\n * All properties in VideoProps are optional and have default values in the platform\r\n */\r\n export interface VideoProps extends MediaProps {\r\n /**\r\n * Optional; the maximum duration in seconds after which the recording should terminate automatically.\r\n * Default value is defined by the platform serving the API.\r\n */\r\n maxDuration?: number;\r\n\r\n /**\r\n * Optional; to determine if the video capturing flow needs to be launched\r\n * in Full Screen Mode (Lens implementation) or PictureInPicture Mode (Native implementation).\r\n * Default value is true, indicating video will always launch in Full Screen Mode via lens.\r\n */\r\n isFullScreenMode?: boolean;\r\n\r\n /**\r\n * Optional; controls the visibility of stop button in PictureInPicture Mode.\r\n * Default value is true, indicating the user will be able to stop the video.\r\n */\r\n isStopButtonVisible?: boolean;\r\n\r\n /**\r\n * Optional; setting VideoController will register your app to listen to the lifecycle events during the video capture flow.\r\n * Your app can also dynamically control the experience while capturing the video by notifying the host client.\r\n */\r\n videoController?: VideoController;\r\n }\r\n\r\n /**\r\n * All properties in VideoAndImageProps are optional and have default values in the platform\r\n */\r\n export interface VideoAndImageProps extends ImageProps, VideoProps {}\r\n\r\n /**\r\n * All properties in AudioProps are optional and have default values in the platform\r\n */\r\n export interface AudioProps {\r\n /**\r\n * Optional; the maximum duration in minutes after which the recording should terminate automatically\r\n * Default value is defined by the platform serving the API.\r\n */\r\n maxDuration?: number;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Base class which holds the callback and notifies events to the host client\r\n */\r\n abstract class MediaController<T> {\r\n protected controllerCallback: T;\r\n\r\n public constructor(controllerCallback?: T) {\r\n this.controllerCallback = controllerCallback;\r\n }\r\n\r\n protected abstract getMediaType(): MediaType;\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * This function will be implemented by the respective media class which holds the logic\r\n * of specific events that needs to be notified to the app.\r\n * @param mediaEvent indicates the event signed by the host client to the app\r\n */\r\n protected abstract notifyEventToApp(mediaEvent: MediaControllerEvent): void;\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Function to notify the host client to programatically control the experience\r\n * @param mediaEvent indicates what the event that needs to be signaled to the host client\r\n * Optional; @param callback is used to send app if host client has successfully handled the notification event or not\r\n */\r\n protected notifyEventToHost(mediaEvent: MediaControllerEvent, callback?: (err?: SdkError) => void): void {\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n const err = isApiSupportedOnMobile(nonFullScreenVideoModeAPISupportVersion);\r\n if (err) {\r\n if (callback) {\r\n callback(err);\r\n }\r\n return;\r\n }\r\n\r\n const params: MediaControllerParam = { mediaType: this.getMediaType(), mediaControllerEvent: mediaEvent };\r\n sendMessageToParent('media.controller', [params], (err?: SdkError) => {\r\n if (callback) {\r\n callback(err);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Function to programatically stop the ongoing media event\r\n * Optional; @param callback is used to send app if host client has successfully stopped the event or not\r\n */\r\n public stop(callback?: (err?: SdkError) => void): void {\r\n this.notifyEventToHost(MediaControllerEvent.StopRecording, callback);\r\n }\r\n }\r\n\r\n /**\r\n * Callback which will register your app to listen to lifecycle events during the video capture flow\r\n */\r\n export interface VideoControllerCallback {\r\n onRecordingStarted?(): void;\r\n }\r\n\r\n /**\r\n * VideoController class is used to communicate between the app and the host client during the video capture flow\r\n */\r\n export class VideoController extends MediaController<VideoControllerCallback> {\r\n protected getMediaType(): MediaType {\r\n return MediaType.Video;\r\n }\r\n\r\n public notifyEventToApp(mediaEvent: MediaControllerEvent): void {\r\n if (!this.controllerCallback) {\r\n // Early return as app has not registered with the callback\r\n return;\r\n }\r\n\r\n switch (mediaEvent) {\r\n case MediaControllerEvent.StartRecording:\r\n if (this.controllerCallback.onRecordingStarted) {\r\n this.controllerCallback.onRecordingStarted();\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Events which are used to communicate between the app and the host client during the media recording flow\r\n */\r\n enum MediaControllerEvent {\r\n StartRecording = 1,\r\n StopRecording = 2,\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Interface with relevant info to send communication from the app to the host client\r\n */\r\n interface MediaControllerParam {\r\n /**\r\n * List of team information\r\n */\r\n mediaType: media.MediaType;\r\n\r\n /**\r\n * List of team information\r\n */\r\n mediaControllerEvent: MediaControllerEvent;\r\n }\r\n\r\n /**\r\n * The modes in which camera can be launched in select Media API\r\n */\r\n export enum CameraStartMode {\r\n Photo = 1,\r\n Document = 2,\r\n Whiteboard = 3,\r\n BusinessCard = 4,\r\n }\r\n\r\n /**\r\n * Specifies the image source\r\n */\r\n export enum Source {\r\n Camera = 1,\r\n Gallery = 2,\r\n }\r\n\r\n /**\r\n * Specifies the type of Media\r\n */\r\n export enum MediaType {\r\n Image = 1,\r\n Video = 2,\r\n VideoAndImage = 3,\r\n Audio = 4,\r\n }\r\n\r\n /**\r\n * Input for view images API\r\n */\r\n export interface ImageUri {\r\n value: string;\r\n type: ImageUriType;\r\n }\r\n\r\n /**\r\n * ID contains a mapping for content uri on platform's side, URL is generic\r\n */\r\n export enum ImageUriType {\r\n ID = 1,\r\n URL = 2,\r\n }\r\n\r\n /**\r\n * Specifies the image output formats.\r\n */\r\n export enum ImageOutputFormats {\r\n IMAGE = 1,\r\n PDF = 2,\r\n }\r\n\r\n /**\r\n * Media chunks an output of getMedia API from platform\r\n */\r\n export interface MediaChunk {\r\n /**\r\n * Base 64 data for the requested uri\r\n */\r\n chunk: string;\r\n\r\n /**\r\n * chunk sequence number\r\n */\r\n chunkSequence: number;\r\n }\r\n\r\n /**\r\n * Output of getMedia API from platform\r\n */\r\n interface MediaResult {\r\n /**\r\n * error encountered in getMedia API\r\n */\r\n error: SdkError;\r\n\r\n /**\r\n * Media chunk which will be assemebled and converted into a blob\r\n */\r\n mediaChunk: MediaChunk;\r\n }\r\n\r\n /**\r\n * Helper object to assembled media chunks\r\n */\r\n export interface AssembleAttachment {\r\n sequence: number;\r\n file: Blob;\r\n }\r\n\r\n /**\r\n * Helper class for assembling media\r\n */\r\n interface MediaHelper {\r\n mediaMimeType: string;\r\n assembleAttachment: AssembleAttachment[];\r\n }\r\n\r\n /**\r\n * Select an attachment using camera/gallery\r\n * @param mediaInputs The input params to customize the media to be selected\r\n * @param callback The callback to invoke after fetching the media\r\n */\r\n export function selectMedia(\r\n mediaInputs: MediaInputs,\r\n callback: (error: SdkError, attachments: Media[]) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[select Media] Callback cannot be null');\r\n }\r\n\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n if (!isAPISupportedByPlatform(mediaAPISupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, null);\r\n return;\r\n }\r\n\r\n const err = isMediaCallSupportedOnMobile(mediaInputs);\r\n if (err) {\r\n callback(err, null);\r\n return;\r\n }\r\n\r\n if (!validateSelectMediaInputs(mediaInputs)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, null);\r\n return;\r\n }\r\n\r\n const params = [mediaInputs];\r\n // What comes back from native as attachments would just be objects and will be missing getMedia method on them\r\n sendMessageToParent(\r\n 'selectMedia',\r\n params,\r\n (err: SdkError, localAttachments?: Media[], mediaEvent?: MediaControllerEvent) => {\r\n // MediaControllerEvent response is used to notify the app about events and is a partial response to selectMedia\r\n if (mediaEvent) {\r\n if (isVideoControllerRegistered(mediaInputs)) {\r\n mediaInputs.videoProps.videoController.notifyEventToApp(mediaEvent);\r\n }\r\n return;\r\n }\r\n\r\n // Media Attachments are final response to selectMedia\r\n if (!localAttachments) {\r\n callback(err, null);\r\n return;\r\n }\r\n\r\n const mediaArray: Media[] = [];\r\n for (const attachment of localAttachments) {\r\n mediaArray.push(new Media(attachment));\r\n }\r\n callback(err, mediaArray);\r\n },\r\n );\r\n }\r\n\r\n /**\r\n * View images using native image viewer\r\n * @param uriList urilist of images to be viewed - can be content uri or server url. supports upto 10 Images in one go\r\n * @param callback returns back error if encountered, returns null in case of success\r\n */\r\n export function viewImages(uriList: ImageUri[], callback: (error?: SdkError) => void): void {\r\n if (!callback) {\r\n throw new Error('[view images] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (!isAPISupportedByPlatform(mediaAPISupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError);\r\n return;\r\n }\r\n if (!validateViewImagesInput(uriList)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput);\r\n return;\r\n }\r\n\r\n const params = [uriList];\r\n sendMessageToParent('viewImages', params, callback);\r\n }\r\n\r\n /**\r\n * Barcode configuration supplied to scanBarCode API to customize barcode scanning experience in mobile\r\n * All properties in BarCodeConfig are optional and have default values in the platform\r\n */\r\n export interface BarCodeConfig {\r\n /**\r\n * Optional; Lets the developer specify the scan timeout interval in seconds\r\n * Default value is 30 seconds and max allowed value is 60 seconds\r\n */\r\n timeOutIntervalInSec?: number;\r\n }\r\n\r\n /**\r\n * Scan Barcode/QRcode using camera\r\n * Note: For desktop and web, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.\r\n * @param callback callback to invoke after scanning the barcode\r\n * @param config optional input configuration to customize the barcode scanning experience\r\n */\r\n export function scanBarCode(callback: (error: SdkError, decodedText: string) => void, config?: BarCodeConfig): void {\r\n if (!callback) {\r\n throw new Error('[media.scanBarCode] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (\r\n GlobalVars.hostClientType === HostClientType.desktop ||\r\n GlobalVars.hostClientType === HostClientType.web ||\r\n GlobalVars.hostClientType === HostClientType.rigel ||\r\n GlobalVars.hostClientType === HostClientType.teamsRoomsWindows ||\r\n GlobalVars.hostClientType === HostClientType.teamsRoomsAndroid ||\r\n GlobalVars.hostClientType === HostClientType.teamsPhones ||\r\n GlobalVars.hostClientType === HostClientType.teamsDisplays\r\n ) {\r\n const notSupportedError: SdkError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };\r\n callback(notSupportedError, null);\r\n return;\r\n }\r\n\r\n if (!isAPISupportedByPlatform(scanBarCodeAPIMobileSupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, null);\r\n return;\r\n }\r\n\r\n if (!validateScanBarCodeInput(config)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, null);\r\n return;\r\n }\r\n\r\n sendMessageToParent('media.scanBarCode', [config], callback);\r\n }\r\n}\r\n","import { people } from '../public/people';\r\nimport { media } from '../public/media';\r\nimport { SdkError } from '../public/interfaces';\r\nimport {\r\n videoAndImageMediaAPISupportVersion,\r\n nonFullScreenVideoModeAPISupportVersion,\r\n imageOutputFormatsAPISupportVersion,\r\n} from './constants';\r\nimport { isApiSupportedOnMobile } from './internalAPIs';\r\n\r\n/**\r\n * Helper function to create a blob from media chunks based on their sequence\r\n */\r\nexport function createFile(assembleAttachment: media.AssembleAttachment[], mimeType: string): Blob {\r\n if (assembleAttachment == null || mimeType == null || assembleAttachment.length <= 0) {\r\n return null;\r\n }\r\n let file: Blob;\r\n let sequence = 1;\r\n assembleAttachment.sort((a, b) => (a.sequence > b.sequence ? 1 : -1));\r\n assembleAttachment.forEach(item => {\r\n if (item.sequence == sequence) {\r\n if (file) {\r\n file = new Blob([file, item.file], { type: mimeType });\r\n } else {\r\n file = new Blob([item.file], { type: mimeType });\r\n }\r\n sequence++;\r\n }\r\n });\r\n return file;\r\n}\r\n\r\n/**\r\n * Helper function to convert Media chunks into another object type which can be later assemebled\r\n * Converts base 64 encoded string to byte array and then into an array of blobs\r\n */\r\nexport function decodeAttachment(attachment: media.MediaChunk, mimeType: string): media.AssembleAttachment {\r\n if (attachment == null || mimeType == null) {\r\n return null;\r\n }\r\n const decoded = atob(attachment.chunk);\r\n const byteNumbers = new Array(decoded.length);\r\n for (let i = 0; i < decoded.length; i++) {\r\n byteNumbers[i] = decoded.charCodeAt(i);\r\n }\r\n const byteArray = new Uint8Array(byteNumbers);\r\n const blob: Blob = new Blob([byteArray], { type: mimeType });\r\n const assemble: media.AssembleAttachment = {\r\n sequence: attachment.chunkSequence,\r\n file: blob,\r\n };\r\n return assemble;\r\n}\r\n\r\n/**\r\n * Function returns null if the media call is supported on current mobile version, else SdkError.\r\n */\r\nexport function isMediaCallSupportedOnMobile(mediaInputs: media.MediaInputs): SdkError {\r\n if (isMediaCallForVideoAndImageInputs(mediaInputs)) {\r\n return isApiSupportedOnMobile(videoAndImageMediaAPISupportVersion);\r\n } else if (isMediaCallForNonFullScreenVideoMode(mediaInputs)) {\r\n return isApiSupportedOnMobile(nonFullScreenVideoModeAPISupportVersion);\r\n } else if (isMediaCallForImageOutputFormats(mediaInputs)) {\r\n return isApiSupportedOnMobile(imageOutputFormatsAPISupportVersion);\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Function returns true if the app has registered to listen to video controller events, else false.\r\n */\r\nexport function isVideoControllerRegistered(mediaInputs: media.MediaInputs): boolean {\r\n if (\r\n mediaInputs.mediaType == media.MediaType.Video &&\r\n mediaInputs.videoProps &&\r\n mediaInputs.videoProps.videoController\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns true if the mediaInput params are valid and false otherwise\r\n */\r\nexport function validateSelectMediaInputs(mediaInputs: media.MediaInputs): boolean {\r\n if (mediaInputs == null || mediaInputs.maxMediaCount > 10) {\r\n return false;\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Returns true if the mediaInput params are called for mediatype Image and contains Image outputs formats, false otherwise\r\n */\r\nexport function isMediaCallForImageOutputFormats(mediaInputs: media.MediaInputs): boolean {\r\n if (mediaInputs?.mediaType == media.MediaType.Image && mediaInputs?.imageProps?.imageOutputFormats) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns true if the mediaInput params are called for mediatype VideoAndImage and false otherwise\r\n */\r\nexport function isMediaCallForVideoAndImageInputs(mediaInputs: media.MediaInputs): boolean {\r\n if (mediaInputs && (mediaInputs.mediaType == media.MediaType.VideoAndImage || mediaInputs.videoAndImageProps)) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns true if the mediaInput params are called for non-full screen video mode and false otherwise\r\n */\r\nexport function isMediaCallForNonFullScreenVideoMode(mediaInputs: media.MediaInputs): boolean {\r\n if (\r\n mediaInputs &&\r\n mediaInputs.mediaType == media.MediaType.Video &&\r\n mediaInputs.videoProps &&\r\n !mediaInputs.videoProps.isFullScreenMode\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns true if the get Media params are valid and false otherwise\r\n */\r\nexport function validateGetMediaInputs(mimeType: string, format: media.FileFormat, content: string): boolean {\r\n if (mimeType == null || format == null || format != media.FileFormat.ID || content == null) {\r\n return false;\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Returns true if the view images param is valid and false otherwise\r\n */\r\nexport function validateViewImagesInput(uriList: media.ImageUri[]): boolean {\r\n if (uriList == null || uriList.length <= 0 || uriList.length > 10) {\r\n return false;\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Returns true if the scan barcode param is valid and false otherwise\r\n */\r\nexport function validateScanBarCodeInput(barCodeConfig: media.BarCodeConfig): boolean {\r\n if (barCodeConfig) {\r\n if (\r\n barCodeConfig.timeOutIntervalInSec === null ||\r\n barCodeConfig.timeOutIntervalInSec <= 0 ||\r\n barCodeConfig.timeOutIntervalInSec > 60\r\n ) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Returns true if the people picker params are valid and false otherwise\r\n */\r\nexport function validatePeoplePickerInput(peoplePickerInputs: people.PeoplePickerInputs): boolean {\r\n if (peoplePickerInputs) {\r\n if (peoplePickerInputs.title) {\r\n if (typeof peoplePickerInputs.title !== 'string') {\r\n return false;\r\n }\r\n }\r\n\r\n if (peoplePickerInputs.setSelected) {\r\n if (typeof peoplePickerInputs.setSelected !== 'object') {\r\n return false;\r\n }\r\n }\r\n\r\n if (peoplePickerInputs.openOrgWideSearchInChatOrChannel) {\r\n if (typeof peoplePickerInputs.openOrgWideSearchInChatOrChannel !== 'boolean') {\r\n return false;\r\n }\r\n }\r\n if (peoplePickerInputs.singleSelect) {\r\n if (typeof peoplePickerInputs.singleSelect !== 'boolean') {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\n","export * from './private/index';\r\nexport * from './public/index';\r\n","export { bot } from './bot';\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 ViewerActionTypes,\r\n UserSettingTypes,\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 registerUserSettingsChangeHandler,\r\n} from './privateAPIs';\r\nexport { conversations } from './conversations';\r\nexport { meetingRoom } from './meetingRoom';\r\nexport { remoteCamera } from './remoteCamera';\r\nexport { files } from './files';\r\nexport { appEntity } from './appEntity';\r\nexport { teams } from './teams';\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } 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 sendMessageToParent('bot.executeQuery', [botRequest], (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 sendMessageToParent('bot.getSupportedCommands', (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 sendMessageToParent('bot.authenticate', [authRequest], (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","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { version } from '../internal/constants';\r\nimport { sendMessageToParent } from '../internal/communication';\r\n\r\nexport namespace appInitialization {\r\n export const Messages = {\r\n AppLoaded: 'appInitialization.appLoaded',\r\n Success: 'appInitialization.success',\r\n Failure: 'appInitialization.failure',\r\n ExpectedFailure: 'appInitialization.expectedFailure',\r\n };\r\n\r\n export enum FailedReason {\r\n AuthFailed = 'AuthFailed',\r\n Timeout = 'Timeout',\r\n Other = 'Other',\r\n }\r\n\r\n export enum ExpectedFailureReason {\r\n PermissionError = 'PermissionError',\r\n NotFound = 'NotFound',\r\n Throttling = 'Throttling',\r\n Offline = 'Offline',\r\n Other = 'Other',\r\n }\r\n\r\n export interface IFailedRequest {\r\n reason: FailedReason;\r\n message?: string;\r\n }\r\n\r\n export interface IExpectedFailureRequest {\r\n reason: ExpectedFailureReason;\r\n message?: string;\r\n }\r\n\r\n /**\r\n * Notifies the frame that app has loaded and to hide the loading indicator if one is shown.\r\n */\r\n export function notifyAppLoaded(): void {\r\n ensureInitialized();\r\n sendMessageToParent(Messages.AppLoaded, [version]);\r\n }\r\n\r\n /**\r\n * Notifies the frame that app initialization is successful and is ready for user interaction.\r\n */\r\n export function notifySuccess(): void {\r\n ensureInitialized();\r\n sendMessageToParent(Messages.Success, [version]);\r\n }\r\n\r\n /**\r\n * Notifies the frame that app initialization has failed and to show an error page in its place.\r\n */\r\n export function notifyFailure(appInitializationFailedRequest: IFailedRequest): void {\r\n ensureInitialized();\r\n sendMessageToParent(Messages.Failure, [\r\n appInitializationFailedRequest.reason,\r\n appInitializationFailedRequest.message,\r\n ]);\r\n }\r\n\r\n /**\r\n * Notifies the frame that app initialized with some expected errors.\r\n */\r\n export function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void {\r\n ensureInitialized();\r\n sendMessageToParent(Messages.ExpectedFailure, [expectedFailureRequest.reason, expectedFailureRequest.message]);\r\n }\r\n}\r\n","import { ensureInitialized, processAdditionalValidOrigins } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { defaultSDKVersionForCompatCheck } from '../internal/constants';\r\nimport { settings } from './settings';\r\nimport {\r\n TabInformation,\r\n TabInstanceParameters,\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\nimport { FrameContexts } from './constants';\r\nimport {\r\n Communication,\r\n initializeCommunication,\r\n sendMessageToParent,\r\n uninitializeCommunication,\r\n} from '../internal/communication';\r\nimport { authentication } from './authentication';\r\nimport { initializePrivateApis } from '../private/privateAPIs';\r\nimport { menus } from './menus';\r\nimport * as Handlers from '../internal/handlers'; // Conflict with some names\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 Handlers.initializeHandlers();\r\n initializeCommunication(\r\n (\r\n context: FrameContexts,\r\n clientType: string,\r\n clientSupportedSDKVersion: string = defaultSDKVersionForCompatCheck,\r\n ) => {\r\n GlobalVars.frameContext = context;\r\n GlobalVars.hostClientType = clientType;\r\n GlobalVars.clientSupportedSDKVersion = clientSupportedSDKVersion;\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 validMessageOrigins,\r\n );\r\n\r\n authentication.initialize();\r\n settings.initialize();\r\n menus.initialize();\r\n initializePrivateApis();\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 Communication.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 //used to clear state between unit tests\r\n\r\n if (!GlobalVars.initializeCalled) {\r\n return;\r\n }\r\n if (GlobalVars.frameContext) {\r\n registerOnThemeChangeHandler(null);\r\n registerFullScreenHandler(null);\r\n registerBackButtonHandler(null);\r\n registerBeforeUnloadHandler(null);\r\n registerFocusEnterHandler(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 GlobalVars.initializeCalled = false;\r\n GlobalVars.initializeCompleted = false;\r\n GlobalVars.initializeCallbacks = [];\r\n GlobalVars.additionalValidOrigins = [];\r\n GlobalVars.frameContext = null;\r\n GlobalVars.hostClientType = null;\r\n GlobalVars.isFramelessWindow = false;\r\n\r\n uninitializeCommunication();\r\n}\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 sendMessageToParent('getContext', (context: Context) => {\r\n if (!context.frameContext) {\r\n // Fallback logic for frameContext properties\r\n context.frameContext = GlobalVars.frameContext;\r\n }\r\n callback(context);\r\n });\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 Handlers.registerOnThemeChangeHandler(handler);\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 Handlers.registerHandler('fullScreenChange', handler);\r\n}\r\n\r\n/**\r\n * Registers a handler for clicking the app button.\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 personal app button is clicked in the app bar.\r\n */\r\nexport function registerAppButtonClickHandler(handler: () => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n Handlers.registerHandler('appButtonClick', handler);\r\n}\r\n\r\n/**\r\n * Registers a handler for entering hover of the app button.\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 entering hover of the personal app button in the app bar.\r\n */\r\nexport function registerAppButtonHoverEnterHandler(handler: () => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n Handlers.registerHandler('appButtonHoverEnter', handler);\r\n}\r\n\r\n/**\r\n * Registers a handler for exiting hover of the app button.\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 exiting hover of the personal app button in the app bar.\r\n */\r\nexport function registerAppButtonHoverLeaveHandler(handler: () => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n Handlers.registerHandler('appButtonHoverLeave', handler);\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 Handlers.registerBackButtonHandler(handler);\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 Handlers.registerOnLoadHandler(handler);\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 Handlers.registerBeforeUnloadHandler(handler);\r\n}\r\n\r\n/**\r\n * @private\r\n * Registers a handler when focus needs to be passed from teams to the place of choice on app.\r\n * @param handler The handler to invoked by the app when they want the focus to be in the place of their choice.\r\n */\r\nexport function registerFocusEnterHandler(handler: (navigateForward: boolean) => void): void {\r\n ensureInitialized();\r\n Handlers.registerFocusEnterHandler(handler);\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 Handlers.registerHandler('changeSettings', handler);\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 sendMessageToParent('getTabInstances', [tabInstanceParameters], 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 sendMessageToParent('getMruTabInstances', [tabInstanceParameters], 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, FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n\r\n sendMessageToParent('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(\r\n FrameContexts.content,\r\n FrameContexts.sidePanel,\r\n FrameContexts.settings,\r\n FrameContexts.task,\r\n FrameContexts.stage,\r\n FrameContexts.meetingStage,\r\n );\r\n sendMessageToParent('executeDeepLink', [deepLink], onComplete ? onComplete : getGenericOnCompleteHandler());\r\n}\r\n\r\nexport function setFrameContext(frameContext: FrameContext): void {\r\n ensureInitialized(FrameContexts.content);\r\n sendMessageToParent('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 } from '../internal/internalAPIs';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { TabInstance } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\nimport { sendMessageToParent } from '../internal/communication';\r\n\r\n/**\r\n * Navigation specific part of the SDK.\r\n */\r\n\r\n/**\r\n * Return focus to the main Teams app. Will focus search bar if navigating forward and app bar if navigating back.\r\n * @param navigateForward Determines the direction to focus in teams app.\r\n */\r\nexport function returnFocus(navigateForward?: boolean): void {\r\n ensureInitialized();\r\n\r\n sendMessageToParent('returnFocus', [navigateForward]);\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 errorMessage = 'Invalid internalTabInstanceId and/or channelId were/was provided';\r\n sendMessageToParent(\r\n 'navigateToTab',\r\n [tabInstance],\r\n onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage),\r\n );\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(\r\n FrameContexts.content,\r\n FrameContexts.sidePanel,\r\n FrameContexts.settings,\r\n FrameContexts.remove,\r\n FrameContexts.task,\r\n FrameContexts.stage,\r\n FrameContexts.meetingStage,\r\n );\r\n\r\n const errorMessage =\r\n 'Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.';\r\n sendMessageToParent(\r\n 'navigateCrossDomain',\r\n [url],\r\n onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage),\r\n );\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 errorMessage = 'Back navigation is not supported in the current client or context.';\r\n sendMessageToParent('navigateBack', [], onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage));\r\n}\r\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { TaskInfo } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\nimport { IAppWindow, ChildAppWindow } from './appWindow';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\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, FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n\r\n sendMessageToParent('tasks.startTask', [taskInfo], 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.sidePanel, FrameContexts.task, FrameContexts.meetingStage);\r\n const { width, height, ...extra } = taskInfo;\r\n\r\n if (!Object.keys(extra).length) {\r\n sendMessageToParent('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.sidePanel, FrameContexts.task, FrameContexts.meetingStage);\r\n\r\n // Send tasks.completeTask instead of tasks.submitTask message for backward compatibility with Mobile clients\r\n sendMessageToParent('tasks.completeTask', [result, Array.isArray(appIds) ? appIds : [appIds]]);\r\n }\r\n}\r\n","import { SdkError, ErrorCode } from './interfaces';\r\nimport { ensureInitialized, isAPISupportedByPlatform } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { locationAPIsRequiredVersion } from '../internal/constants';\r\n\r\nexport namespace location {\r\n export interface LocationProps {\r\n /**\r\n whether user can alter location or not\r\n if false, user will be shown current location \r\n and wouldn't be allowed to alter it\r\n */\r\n allowChooseLocation: boolean;\r\n /**\r\n whether selected location should be shown to user on map or not.\r\n If allowChooseLocation is true, this parameter will be ignored by platform.\r\n If allowChooseLocation is false, and this parameter is not provided, default \r\n value will be false.\r\n */\r\n showMap?: boolean;\r\n }\r\n\r\n export interface Location {\r\n /**\r\n Latitude of the location\r\n */\r\n latitude: number;\r\n /**\r\n Longitude of the location\r\n */\r\n longitude: number;\r\n /**\r\n Accuracy of the coordinates captured\r\n */\r\n accuracy?: number;\r\n /**\r\n Time stamp when the location was captured\r\n */\r\n timestamp?: number;\r\n }\r\n\r\n /**\r\n * Fetches current user coordinates or allows user to choose location on map\r\n * @param callback Callback to invoke when current user location is fetched\r\n */\r\n export function getLocation(props: LocationProps, callback: (error: SdkError, location: Location) => void): void {\r\n if (!callback) {\r\n throw new Error('[location.getLocation] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (!isAPISupportedByPlatform(locationAPIsRequiredVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, undefined);\r\n return;\r\n }\r\n if (!props) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, undefined);\r\n return;\r\n }\r\n sendMessageToParent('location.getLocation', [props], callback);\r\n }\r\n\r\n /**\r\n * Shows the location on map corresponding to the given coordinates\r\n * @param location {@link Location} which needs to be shown on map\r\n * @param callback Callback to invoke when the location is opened on map\r\n */\r\n export function showLocation(location: Location, callback: (error: SdkError, status: boolean) => void): void {\r\n if (!callback) {\r\n throw new Error('[location.showLocation] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (!isAPISupportedByPlatform(locationAPIsRequiredVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, undefined);\r\n return;\r\n }\r\n if (!location) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, undefined);\r\n return;\r\n }\r\n sendMessageToParent('location.showLocation', [location], callback);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\n\r\nexport namespace meeting {\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent a meeting details\r\n */\r\n export interface IMeetingDetailsResponse {\r\n /**\r\n * details object\r\n */\r\n details: IMeetingDetails | ICallDetails;\r\n /**\r\n * conversation object\r\n */\r\n conversation: IConversation;\r\n /**\r\n * organizer object\r\n */\r\n organizer: IOrganizer;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Base data structure to represent a meeting or call detail\r\n */\r\n export interface IMeetingOrCallDetailsBase<T> {\r\n /**\r\n * Scheduled start time of the meeting or start time of the call\r\n */\r\n scheduledStartTime: string;\r\n\r\n /**\r\n * url to join the current meeting or call\r\n */\r\n joinUrl?: string;\r\n\r\n /**\r\n * type of the meeting or call\r\n */\r\n type?: T;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent call details\r\n */\r\n export type ICallDetails = IMeetingOrCallDetailsBase<CallType>;\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent meeting details.\r\n */\r\n export interface IMeetingDetails extends IMeetingOrCallDetailsBase<MeetingType> {\r\n /**\r\n * Scheduled end time of the meeting\r\n */\r\n scheduledEndTime: string;\r\n /**\r\n * meeting title name of the meeting\r\n */\r\n title?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent a conversation object.\r\n */\r\n export interface IConversation {\r\n /**\r\n * conversation id of the meeting\r\n */\r\n id: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent an organizer object.\r\n */\r\n export interface IOrganizer {\r\n /**\r\n * organizer id of the meeting\r\n */\r\n id?: string;\r\n /**\r\n * tenant id of the meeting\r\n */\r\n tenantId?: string;\r\n }\r\n\r\n export interface LiveStreamState {\r\n /**\r\n * indicates whether meeting is streaming\r\n */\r\n isStreaming: boolean;\r\n\r\n /**\r\n * error object in case there is a failure\r\n */\r\n error?: {\r\n /** error code from the streaming service, e.g. IngestionFailure */\r\n code: string;\r\n /** detailed error message string */\r\n message?: string;\r\n };\r\n }\r\n\r\n export interface IAppContentStageSharingCapabilities {\r\n /**\r\n * indicates whether app has permission to share contents to meeting stage\r\n */\r\n doesAppHaveSharePermission: boolean;\r\n }\r\n\r\n export interface IAppContentStageSharingState {\r\n /**\r\n * indicates whether app is currently being shared to stage\r\n */\r\n isAppSharing: boolean;\r\n }\r\n export interface ISpeakingState {\r\n /**\r\n * Indicates whether one or more participants in a meeting are speaking, or\r\n * if no participants are speaking\r\n */\r\n isSpeakingDetected: boolean;\r\n }\r\n\r\n export enum MeetingType {\r\n Unknown = 'Unknown',\r\n Adhoc = 'Adhoc',\r\n Scheduled = 'Scheduled',\r\n Recurring = 'Recurring',\r\n Broadcast = 'Broadcast',\r\n MeetNow = 'MeetNow',\r\n }\r\n\r\n export enum CallType {\r\n OneOnOneCall = 'oneOnOneCall',\r\n GroupCall = 'groupCall',\r\n }\r\n\r\n /**\r\n * Allows an app to get the incoming audio speaker setting for the meeting user\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError, incase of an error, or null when fetch is successful\r\n * result can either contain the true/false value, incase of a successful fetch or null when the fetching fails\r\n * result: True means incoming audio is muted and false means incoming audio is unmuted\r\n */\r\n export function getIncomingClientAudioState(\r\n callback: (error: SdkError | null, result: boolean | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get incoming client audio state] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('getIncomingClientAudioState', callback);\r\n }\r\n\r\n /**\r\n * Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError, incase of an error, or null when toggle is successful\r\n * result can either contain the true/false value, incase of a successful toggle or null when the toggling fails\r\n * result: True means incoming audio is muted and false means incoming audio is unmuted\r\n */\r\n export function toggleIncomingClientAudio(callback: (error: SdkError | null, result: boolean | null) => void): void {\r\n if (!callback) {\r\n throw new Error('[toggle incoming client audio] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('toggleIncomingClientAudio', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Allows an app to get the meeting details for the meeting\r\n * @param callback Callback contains 2 parameters, error and meetingDetailsResponse.\r\n * error can either contain an error of type SdkError, incase of an error, or null when get is successful\r\n * result can either contain a IMeetingDetailsResponse value, incase of a successful get or null when the get fails\r\n */\r\n export function getMeetingDetails(\r\n callback: (error: SdkError | null, meetingDetails: IMeetingDetailsResponse | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get meeting details] Callback cannot be null');\r\n }\r\n ensureInitialized(\r\n FrameContexts.sidePanel,\r\n FrameContexts.meetingStage,\r\n FrameContexts.settings,\r\n FrameContexts.content,\r\n );\r\n sendMessageToParent('meeting.getMeetingDetails', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Allows an app to get the authentication token for the anonymous or guest user in the meeting\r\n * @param callback Callback contains 2 parameters, error and authenticationTokenOfAnonymousUser.\r\n * error can either contain an error of type SdkError, incase of an error, or null when get is successful\r\n * authenticationTokenOfAnonymousUser can either contain a string value, incase of a successful get or null when the get fails\r\n */\r\n export function getAuthenticationTokenForAnonymousUser(\r\n callback: (error: SdkError | null, authenticationTokenOfAnonymousUser: string | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get Authentication Token For AnonymousUser] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.getAuthenticationTokenForAnonymousUser', callback);\r\n }\r\n\r\n /**\r\n * Allows an app to get the state of the live stream in the current meeting\r\n * @param callback Callback contains 2 parameters: error and liveStreamState.\r\n * error can either contain an error of type SdkError, in case of an error, or null when get is successful\r\n * liveStreamState can either contain a LiveStreamState value, or null when operation fails\r\n */\r\n export function getLiveStreamState(\r\n callback: (error: SdkError | null, liveStreamState: LiveStreamState | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get live stream state] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('meeting.getLiveStreamState', callback);\r\n }\r\n\r\n /**\r\n * Allows an app to request the live streaming be started at the given streaming url\r\n * @param streamUrl the url to the stream resource\r\n * @param streamKey the key to the stream resource\r\n * @param callback Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful\r\n * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state\r\n */\r\n export function requestStartLiveStreaming(\r\n callback: (error: SdkError | null) => void,\r\n streamUrl: string,\r\n streamKey?: string,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[request start live streaming] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('meeting.requestStartLiveStreaming', [streamUrl, streamKey], callback);\r\n }\r\n\r\n /**\r\n * Allows an app to request the live streaming be stopped at the given streaming url\r\n * @param callback Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful\r\n * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state\r\n */\r\n export function requestStopLiveStreaming(callback: (error: SdkError | null) => void): void {\r\n if (!callback) {\r\n throw new Error('[request stop live streaming] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('meeting.requestStopLiveStreaming', callback);\r\n }\r\n\r\n /**\r\n * Registers a handler for changes to the live stream.\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 live stream state changes\r\n */\r\n export function registerLiveStreamChangedHandler(handler: (liveStreamState: LiveStreamState) => void): void {\r\n if (!handler) {\r\n throw new Error('[register live stream changed handler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('meeting.liveStreamChanged', handler);\r\n }\r\n\r\n /**\r\n * Allows an app to share contents in the meeting\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError, incase of an error, or null when share is successful\r\n * result can either contain a true value, incase of a successful share or null when the share fails\r\n * @param appContentUrl is the input URL which needs to be shared on to the stage\r\n */\r\n export function shareAppContentToStage(\r\n callback: (error: SdkError | null, result: boolean | null) => void,\r\n appContentUrl: string,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[share app content to stage] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.shareAppContentToStage', [appContentUrl], callback);\r\n }\r\n\r\n /**\r\n * Provides information related app's in-meeting sharing capabilities\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError (error indication), or null (non-error indication)\r\n * appContentStageSharingCapabilities can either contain an IAppContentStageSharingCapabilities object\r\n * (indication of successful retrieval), or null (indication of failed retrieval)\r\n */\r\n export function getAppContentStageSharingCapabilities(\r\n callback: (\r\n error: SdkError | null,\r\n appContentStageSharingCapabilities: IAppContentStageSharingCapabilities | null,\r\n ) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get app content stage sharing capabilities] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.getAppContentStageSharingCapabilities', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Terminates current stage sharing session in meeting\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError (error indication), or null (non-error indication)\r\n * result can either contain a true boolean value (successful termination), or null (unsuccessful fetch)\r\n */\r\n export function stopSharingAppContentToStage(\r\n callback: (error: SdkError | null, result: boolean | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[stop sharing app content to stage] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.stopSharingAppContentToStage', callback);\r\n }\r\n\r\n /**\r\n * Provides information related to current stage sharing state for app\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError (error indication), or null (non-error indication)\r\n * appContentStageSharingState can either contain an IAppContentStageSharingState object\r\n * (indication of successful retrieval), or null (indication of failed retrieval)\r\n */\r\n export function getAppContentStageSharingState(\r\n callback: (error: SdkError | null, appContentStageSharingState: IAppContentStageSharingState | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get app content stage sharing state] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.getAppContentStageSharingState', callback);\r\n }\r\n\r\n /**\r\n * Registers a handler for changes to paticipant speaking states. If any participant is speaking, isSpeakingDetected\r\n * will be true. If no participants are speaking, isSpeakingDetected will be false. Only one handler can be registered\r\n * at a time. A subsequent registration replaces an existing registration.\r\n * @param handler The handler to invoke when the speaking state of any participant changes (start/stop speaking).\r\n */\r\n export function registerSpeakingStateChangeHandler(handler: (speakingState: ISpeakingState) => void): void {\r\n if (!handler) {\r\n throw new Error('[registerSpeakingStateChangeHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n registerHandler('meeting.speakingStateChanged', handler);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\n\r\nexport namespace monetization {\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent a subscription plan.\r\n */\r\n export interface PlanInfo {\r\n /**\r\n * plan id\r\n */\r\n planId: string;\r\n /**\r\n * term of the plan\r\n */\r\n term: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Open dialog to start user's purchase experience\r\n * @param callback Callback contains 1 parameters, error.\r\n * @param planInfo optional parameter. It contains info of the subscription plan pushed to users.\r\n * error can either contain an error of type SdkError, incase of an error, or null when get is successful\r\n */\r\n export function openPurchaseExperience(callback: (error: SdkError | null) => void, planInfo?: PlanInfo): void {\r\n if (!callback) {\r\n throw new Error('[open purchase experience] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content);\r\n sendMessageToParent('monetization.openPurchaseExperience', [planInfo], callback);\r\n }\r\n}\r\n","import { ensureInitialized, isAPISupportedByPlatform } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { ErrorCode, SdkError } from './interfaces';\r\nimport { validatePeoplePickerInput } from '../internal/mediaUtil';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { peoplePickerRequiredVersion } from '../internal/constants';\r\n\r\nexport namespace people {\r\n /**\r\n * Launches a people picker and allows the user to select one or more people from the list\r\n * If the app is added to personal app scope the people picker launched is org wide and if the app is added to a chat/channel, people picker launched is also limited to the members of chat/channel\r\n * @param callback Returns list of JSON object of type PeoplePickerResult which consists of AAD IDs, display names and emails of the selected users\r\n * @param peoplePickerInputs Input parameters to launch customized people picker\r\n */\r\n export function selectPeople(\r\n callback: (error: SdkError, people: PeoplePickerResult[]) => void,\r\n peoplePickerInputs?: PeoplePickerInputs,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[people picker] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task, FrameContexts.settings);\r\n\r\n if (!isAPISupportedByPlatform(peoplePickerRequiredVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, undefined);\r\n return;\r\n }\r\n\r\n if (!validatePeoplePickerInput(peoplePickerInputs)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, null);\r\n return;\r\n }\r\n\r\n sendMessageToParent('people.selectPeople', [peoplePickerInputs], callback);\r\n }\r\n\r\n /**\r\n * Input parameter supplied to the People Picker API\r\n */\r\n export interface PeoplePickerInputs {\r\n /**\r\n * Optional; Set title for the people picker\r\n * Default value is \"Select people\" for multiselect and \"Select a person\" for single select\r\n */\r\n title?: string;\r\n\r\n /**\r\n * Optional; AAD ids of the users to be pre-populated in the search box of people picker control\r\n * If single select is enabled this value, only the first user in the list will be pre-populated\r\n * Default value is null\r\n */\r\n setSelected?: string[];\r\n\r\n /**\r\n * Optional; launches the people picker in org wide scope even if the app is added to a chat or channel\r\n * Default value is false\r\n */\r\n openOrgWideSearchInChatOrChannel?: boolean;\r\n\r\n /**\r\n * Optional; launches the people picker for which only 1 person can be selected\r\n * Default value is false\r\n */\r\n singleSelect?: boolean;\r\n }\r\n\r\n /**\r\n * Output user object of people picker API\r\n */\r\n export interface PeoplePickerResult {\r\n /**\r\n * user object Id (also known as aad id) of the selected user\r\n */\r\n objectId: string;\r\n\r\n /**\r\n * Optional; display name of the selected user\r\n */\r\n displayName?: string;\r\n\r\n /**\r\n * Optional; email of the selected user\r\n */\r\n email?: string;\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { registerHandler } from '../internal/handlers';\r\n/**\r\n * Namespace to video extensibility of the SDK.\r\n *\r\n */\r\nexport namespace video {\r\n /**\r\n * Represents a video frame.\r\n */\r\n export interface VideoFrame {\r\n /**\r\n * Video frame width.\r\n */\r\n width: number;\r\n /**\r\n * Video frame height.\r\n */\r\n height: number;\r\n /**\r\n * Video frame buffer\r\n */\r\n data: Uint8ClampedArray;\r\n /**\r\n * NV12 luma stride, valid only when video frame format is NV12\r\n */\r\n lumaStride?: number;\r\n /**\r\n * NV12 chroma stride, valid only when video frame format is NV12\r\n */\r\n chromaStride?: number;\r\n /**\r\n * RGB stride, valid only when video frame format is RGB\r\n */\r\n stride?: number;\r\n }\r\n /**\r\n * Video frame format enum, currently only support NV12\r\n */\r\n export enum VideoFrameFormat {\r\n NV12,\r\n }\r\n /**\r\n * Video frame configuration supplied to Teams to customize the generated video frame parameters, like format.\r\n */\r\n export interface VideoFrameConfig {\r\n /**\r\n * video format\r\n */\r\n format: VideoFrameFormat;\r\n }\r\n\r\n /**\r\n * Video effect change type enum\r\n */\r\n export enum EffectChangeType {\r\n /**\r\n * current video effect changed.\r\n */\r\n EffectChanged,\r\n /**\r\n * disable the video effect\r\n */\r\n EffectDisabled,\r\n }\r\n\r\n /**\r\n * Video frame call back function definition\r\n */\r\n type VideoFrameCallback = (\r\n frame: VideoFrame,\r\n notifyVideoFrameProcessed: () => void,\r\n notifyError: (errorMessage: string) => void,\r\n ) => void;\r\n\r\n /**\r\n * Video effect change call back function definition\r\n */\r\n type VideoEffectCallBack = (effectId: string | undefined) => void;\r\n\r\n /**\r\n * register to read the video frames in Permissions section.\r\n */\r\n export function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void {\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('video.newVideoFrame', (videoFrame: VideoFrame) => {\r\n if (videoFrame !== undefined) {\r\n frameCallback(videoFrame, notifyVideoFrameProcessed, notifyError);\r\n }\r\n });\r\n sendMessageToParent('video.registerForVideoFrame', [config]);\r\n }\r\n\r\n /**\r\n * video extension should call this to notify Teams Client current selected effect parameter changed.\r\n * If it's pre-meeting, Teams client will call videoEffectCallback immediately then use the videoEffect.\r\n * in-meeting scenario, we will call videoEffectCallback when apply button clicked.\r\n * @param effectChangeType the effect change type.\r\n * @param effectId Newly selected effect id.\r\n */\r\n export function notifySelectedVideoEffectChanged(\r\n effectChangeType: EffectChangeType,\r\n effectId: string | undefined,\r\n ): void {\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('video.videoEffectChanged', [effectChangeType, effectId]);\r\n }\r\n\r\n /**\r\n * Register the video effect callback, Teams client uses this to notify the video extension the new video effect will by applied.\r\n */\r\n export function registerForVideoEffect(callback: VideoEffectCallBack): void {\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('video.effectParameterChange', callback);\r\n }\r\n\r\n /**\r\n * sending notification to Teams client finished the video frame processing, now Teams client can render this video frame\r\n * or pass the video frame to next one in video pipeline.\r\n */\r\n function notifyVideoFrameProcessed(): void {\r\n sendMessageToParent('video.videoFrameProcessed');\r\n }\r\n\r\n /**\r\n * sending error notification to Teams client.\r\n */\r\n function notifyError(errorMessage: string): void {\r\n sendMessageToParent('video.notifyError', [errorMessage]);\r\n }\r\n} //end of video namespace\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { ErrorCode, SdkError } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\n\r\nexport namespace sharing {\r\n export const SharingAPIMessages = {\r\n shareWebContent: 'sharing.shareWebContent',\r\n };\r\n\r\n // More types can be added as we expand share capability\r\n type ContentType = 'URL';\r\n\r\n interface IBaseSharedContent {\r\n type: ContentType;\r\n }\r\n\r\n // More types can be added as we expand share capability\r\n export type IShareRequestContentType = IURLContent;\r\n\r\n export interface IShareRequest<T> {\r\n content: T[];\r\n }\r\n\r\n export interface IURLContent extends IBaseSharedContent {\r\n type: 'URL';\r\n\r\n /**\r\n * Required URL\r\n */\r\n url: string;\r\n\r\n /**\r\n * Default initial message text\r\n */\r\n message?: string;\r\n\r\n /**\r\n * Show URL preview, defaults to true\r\n */\r\n preview?: boolean;\r\n }\r\n\r\n /**\r\n * Opens a share dialog for web content\r\n * @param shareWebContentRequest web content info\r\n * @param callback optional callback\r\n */\r\n export function shareWebContent(\r\n shareWebContentRequest: IShareRequest<IShareRequestContentType>,\r\n callback?: (err?: SdkError) => void,\r\n ): void {\r\n if (!validateNonEmptyContent(shareWebContentRequest, callback)) {\r\n return;\r\n }\r\n\r\n if (!validateTypeConsistency(shareWebContentRequest, callback)) {\r\n return;\r\n }\r\n\r\n if (!validateContentForSupportedTypes(shareWebContentRequest, callback)) {\r\n return;\r\n }\r\n\r\n ensureInitialized(\r\n FrameContexts.content,\r\n FrameContexts.sidePanel,\r\n FrameContexts.task,\r\n FrameContexts.stage,\r\n FrameContexts.meetingStage,\r\n );\r\n\r\n sendMessageToParent(SharingAPIMessages.shareWebContent, [shareWebContentRequest], callback);\r\n }\r\n\r\n // Error checks\r\n function validateNonEmptyContent(\r\n shareRequest: IShareRequest<IShareRequestContentType>,\r\n callback?: (err?: SdkError) => void,\r\n ): boolean {\r\n if (!(shareRequest && shareRequest.content && shareRequest.content.length)) {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'Shared content is missing',\r\n });\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n function validateTypeConsistency(\r\n shareRequest: IShareRequest<IShareRequestContentType>,\r\n callback?: (err?: SdkError) => void,\r\n ): boolean {\r\n if (shareRequest.content.some(item => !item.type)) {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'Shared content type cannot be undefined',\r\n });\r\n }\r\n return false;\r\n }\r\n\r\n if (shareRequest.content.some(item => item.type !== shareRequest.content[0].type)) {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'Shared content must be of the same type',\r\n });\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n function validateContentForSupportedTypes(\r\n shareRequest: IShareRequest<IShareRequestContentType>,\r\n callback?: (err?: SdkError) => void,\r\n ): boolean {\r\n if (shareRequest.content[0].type === 'URL') {\r\n if (shareRequest.content.some(item => !item.url)) {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'URLs are required for URL content types',\r\n });\r\n }\r\n return false;\r\n }\r\n } else {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'Content type is unsupported',\r\n });\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from '../public';\r\nimport { FrameContexts } from './constants';\r\n\r\n/**\r\n * Namespace to interact with the stage view specific part of the SDK.\r\n */\r\nexport namespace stageView {\r\n /**\r\n * Parameters to open a stage view.\r\n */\r\n export interface StageViewParams {\r\n /**\r\n * The application ID of the Teams application to be opened.\r\n */\r\n appId: string;\r\n\r\n /**\r\n * The URL of the content to display.\r\n */\r\n contentUrl: string;\r\n\r\n /**\r\n * The chat or channel ID.\r\n */\r\n threadId: string;\r\n\r\n /**\r\n * The title to give the stage view.\r\n */\r\n title: string;\r\n\r\n /**\r\n * The Teams app website URL.\r\n */\r\n websiteUrl?: string;\r\n\r\n /**\r\n * The entity ID of the Teams app content being opened.\r\n */\r\n entityId?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Feature is under development\r\n *\r\n * Opens a stage view to display a Teams app\r\n * @param stageViewParams The parameters to pass into the stage view.\r\n * @param callback Callback that will be triggered once the stage view is closed.\r\n * The callback takes as an argument an SdkError in case something happened (i.e.\r\n * no permissions to execute the API)\r\n */\r\n export function open(stageViewParams: StageViewParams, callback?: (sdkError?: SdkError) => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!stageViewParams) {\r\n throw new Error('[stageView.open] Stage view params cannot be null');\r\n }\r\n\r\n sendMessageToParent('stageView.open', [stageViewParams], callback);\r\n }\r\n}\r\n","import { FileOpenPreference, TeamInformation } from '../public/interfaces';\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Information about all members in a chat\r\n */\r\nexport interface ChatMembersInformation {\r\n members: ThreadMember[];\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Information about a chat member\r\n */\r\nexport interface ThreadMember {\r\n /**\r\n * The member's user principal name in the current tenant.\r\n */\r\n upn: string;\r\n}\r\n\r\nexport enum NotificationTypes {\r\n fileDownloadStart = 'fileDownloadStart',\r\n fileDownloadComplete = 'fileDownloadComplete',\r\n}\r\n\r\nexport interface ShowNotificationParameters {\r\n message: string;\r\n notificationType: NotificationTypes;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\nexport enum ViewerActionTypes {\r\n view = 'view',\r\n edit = 'edit',\r\n editNew = 'editNew',\r\n}\r\n\r\n/**\r\n * * @private\r\n * Hide from docs.\r\n * ------\r\n * User setting changes that can be subscribed to,\r\n */\r\nexport enum UserSettingTypes {\r\n /**\r\n * Use this key to subscribe to changes in user's file open preference\r\n */\r\n fileOpenPreference = 'fileOpenPreference',\r\n /**\r\n * Use this key to subscribe to theme changes\r\n */\r\n theme = 'theme',\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\nexport interface FilePreviewParameters {\r\n /**\r\n * The developer-defined unique ID for the file.\r\n */\r\n entityId: string;\r\n\r\n /**\r\n * The display name of the file.\r\n */\r\n title: string;\r\n\r\n /**\r\n * An optional description of the file.\r\n */\r\n description?: string;\r\n\r\n /**\r\n * The file extension; e.g. pptx, docx, etc.\r\n */\r\n type: string;\r\n\r\n /**\r\n * A url to the source of the file, used to open the content in the user's default browser\r\n */\r\n objectUrl: string;\r\n\r\n /**\r\n * Optional; an alternate self-authenticating url used to preview the file in Mobile clients and offer it for download by the user\r\n */\r\n downloadUrl?: string;\r\n\r\n /**\r\n * Optional; an alternate url optimized for previewing the file in Teams web and desktop clients\r\n */\r\n webPreviewUrl?: string;\r\n\r\n /**\r\n * Optional; an alternate url that allows editing of the file in Teams web and desktop clients\r\n */\r\n webEditUrl?: string;\r\n\r\n /**\r\n * Optional; the base url of the site where the file is hosted\r\n */\r\n baseUrl?: string;\r\n\r\n /**\r\n * Deprecated; prefer using viewerAction instead\r\n * Optional; indicates whether the file should be opened in edit mode\r\n */\r\n editFile?: boolean;\r\n\r\n /**\r\n * Optional; the developer-defined unique ID for the sub-entity to return to when the file stage closes.\r\n * This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.\r\n */\r\n subEntityId?: string;\r\n\r\n /**\r\n * Optional; indicates the mode in which file should be opened. Takes precedence over edit mode.\r\n */\r\n viewerAction?: ViewerActionTypes;\r\n\r\n /**\r\n * Optional; indicates how user prefers to open the file\r\n */\r\n fileOpenPreference?: FileOpenPreference;\r\n\r\n /**\r\n * Optional; id required to enable conversation button in files. Will be channel id in case file is shared in a channel or the chat id in p2p chat case.\r\n */\r\n conversationId?: string;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Query parameters used when fetching team information\r\n */\r\nexport interface TeamInstanceParameters {\r\n /**\r\n * Flag allowing to select favorite teams only\r\n */\r\n favoriteTeamsOnly?: boolean;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Information on userJoined Teams\r\n */\r\nexport interface UserJoinedTeamsInformation {\r\n /**\r\n * List of team information\r\n */\r\n userJoinedTeams: TeamInformation[];\r\n}\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts } from '../public/constants';\r\nimport { OpenConversationRequest } from '../public/interfaces';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler, removeHandler } from '../internal/handlers';\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 sendMessageToParent(\r\n 'conversations.openConversation',\r\n [\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 (status: boolean, reason: string) => {\r\n if (!status) {\r\n throw new Error(reason);\r\n }\r\n },\r\n );\r\n if (openConversationRequest.onStartConversation) {\r\n registerHandler(\r\n 'startConversation',\r\n (subEntityId: string, conversationId: string, channelId: string, entityId: string) =>\r\n openConversationRequest.onStartConversation({\r\n subEntityId,\r\n conversationId,\r\n channelId,\r\n entityId,\r\n }),\r\n );\r\n }\r\n if (openConversationRequest.onCloseConversation) {\r\n registerHandler(\r\n 'closeConversation',\r\n (subEntityId: string, conversationId?: string, channelId?: string, entityId?: string) =>\r\n openConversationRequest.onCloseConversation({\r\n subEntityId,\r\n conversationId,\r\n channelId,\r\n entityId,\r\n }),\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 sendMessageToParent('conversations.closeConversation');\r\n removeHandler('startConversation');\r\n removeHandler('closeConversation');\r\n }\r\n}\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from '../public/interfaces';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\r\n\r\nexport namespace meetingRoom {\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to represent a meeting room.\r\n */\r\n export interface MeetingRoomInfo {\r\n /**\r\n * Endpoint id of the meeting room.\r\n */\r\n endpointId: string;\r\n /**\r\n * Device name of the meeting room.\r\n */\r\n deviceName: string;\r\n /**\r\n * Client type of the meeting room.\r\n */\r\n clientType: string;\r\n /**\r\n * Client version of the meeting room.\r\n */\r\n clientVersion: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Enum used to indicate meeting room capabilities.\r\n */\r\n export enum Capability {\r\n /**\r\n * Media control capability: toggle mute.\r\n */\r\n toggleMute = 'toggleMute',\r\n /**\r\n * Media control capability: toggle camera.\r\n */\r\n toggleCamera = 'toggleCamera',\r\n /**\r\n * Media control capability: toggle captions.\r\n */\r\n toggleCaptions = 'toggleCaptions',\r\n /**\r\n * Media control capability: volume ajustion.\r\n */\r\n volume = 'volume',\r\n /**\r\n * Stage layout control capability: show gallery mode.\r\n */\r\n showVideoGallery = 'showVideoGallery',\r\n /**\r\n * Stage layout control capability: show content mode.\r\n */\r\n showContent = 'showContent',\r\n /**\r\n * Stage layout control capability: show content + gallery mode.\r\n */\r\n showVideoGalleryAndContent = 'showVideoGalleryAndContent',\r\n /**\r\n * Stage layout control capability: show large gallery mode.\r\n */\r\n showLargeGallery = 'showLargeGallery',\r\n /**\r\n * Stage layout control capability: show together mode.\r\n */\r\n showTogether = 'showTogether',\r\n /**\r\n * Meeting control capability: leave meeting.\r\n */\r\n leaveMeeting = 'leaveMeeting',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to represent capabilities of a meeting room.\r\n */\r\n export interface MeetingRoomCapability {\r\n /**\r\n * Media control capabilities, value can be \"toggleMute\", \"toggleCamera\", \"toggleCaptions\", \"volume\".\r\n */\r\n mediaControls: string[];\r\n /**\r\n * Main stage layout control capabilities, value can be \"showVideoGallery\", \"showContent\", \"showVideoGalleryAndContent\", \"showLargeGallery\", \"showTogether\".\r\n */\r\n stageLayoutControls: string[];\r\n /**\r\n * Meeting control capabilities, value can be \"leaveMeeting\".\r\n */\r\n meetingControls: string[];\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to represent states of a meeting room.\r\n */\r\n export interface MeetingRoomState {\r\n /**\r\n * Current mute state, true: mute, false: unmute.\r\n */\r\n toggleMute: boolean;\r\n /**\r\n * Current camera state, true: camera on, false: camera off.\r\n */\r\n toggleCamera: boolean;\r\n /**\r\n * Current captions state, true: captions on, false: captions off.\r\n */\r\n toggleCaptions: boolean;\r\n /**\r\n * Current main stage layout state, value can be one of \"Gallery\", \"Content + gallery\", \"Content\", \"Large gallery\" and \"Together mode\".\r\n */\r\n stageLayout: string;\r\n /**\r\n * Current leaveMeeting state, true: leave, false: no-op.\r\n */\r\n leaveMeeting: boolean;\r\n }\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Fetch the meeting room info that paired with current client.\r\n * @param callback Callback to invoke when the meeting room info is fetched.\r\n */\r\n export function getPairedMeetingRoomInfo(\r\n callback: (sdkError: SdkError, meetingRoomInfo: MeetingRoomInfo) => void,\r\n ): void {\r\n ensureInitialized();\r\n sendMessageToParent('meetingRoom.getPairedMeetingRoomInfo', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Send a command to paired meeting room.\r\n * @param commandName The command name.\r\n * @param callback Callback to invoke when the command response returns.\r\n */\r\n export function sendCommandToPairedMeetingRoom(commandName: string, callback: (sdkError: SdkError) => void): void {\r\n if (!commandName || commandName.length == 0) {\r\n throw new Error('[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[meetingRoom.sendCommandToPairedMeetingRoom] Callback cannot be null');\r\n }\r\n ensureInitialized();\r\n sendMessageToParent('meetingRoom.sendCommandToPairedMeetingRoom', [commandName], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Registers a handler for meeting room capabilities update.\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 capabilities of meeting room update.\r\n */\r\n export function registerMeetingRoomCapabilitiesUpdateHandler(\r\n handler: (capabilities: MeetingRoomCapability) => void,\r\n ): void {\r\n if (!handler) {\r\n throw new Error('[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null');\r\n }\r\n ensureInitialized();\r\n registerHandler('meetingRoom.meetingRoomCapabilitiesUpdate', (capabilities: MeetingRoomCapability) => {\r\n ensureInitialized();\r\n handler(capabilities);\r\n });\r\n // handler && Communication.sendMessageToParent('registerHandler', ['meetingRoom.meetingRoomCapabilitiesUpdate']);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Registers a handler for meeting room states update.\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 states of meeting room update.\r\n */\r\n export function registerMeetingRoomStatesUpdateHandler(handler: (states: MeetingRoomState) => void): void {\r\n if (!handler) {\r\n throw new Error('[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null');\r\n }\r\n ensureInitialized();\r\n registerHandler('meetingRoom.meetingRoomStatesUpdate', (states: MeetingRoomState) => {\r\n ensureInitialized();\r\n handler(states);\r\n });\r\n // handler && Communication.sendMessageToParent('registerHandler', ['meetingRoom.meetingRoomStatesUpdate']);\r\n }\r\n}\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from '../public/interfaces';\r\nimport { FrameContexts } from '../public/constants';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\r\n\r\nexport namespace remoteCamera {\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to represent patricipant details needed to request control of camera.\r\n */\r\n export interface Participant {\r\n /**\r\n * Id of participant.\r\n */\r\n id: string;\r\n /**\r\n * Display name of participant.\r\n */\r\n displayName?: string;\r\n /**\r\n * Active indicates whether the participant's device is actively being controlled.\r\n */\r\n active?: boolean;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Enum used to indicate possible camera control commands.\r\n */\r\n export enum ControlCommand {\r\n Reset = 'Reset',\r\n ZoomIn = 'ZoomIn',\r\n ZoomOut = 'ZoomOut',\r\n PanLeft = 'PanLeft',\r\n PanRight = 'PanRight',\r\n TiltUp = 'TiltUp',\r\n TiltDown = 'TiltDown',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to indicate the current state of the device.\r\n */\r\n export interface DeviceState {\r\n /**\r\n * All operation are available to apply.\r\n */\r\n available: boolean;\r\n /**\r\n * Either camera doesnt support to get state or It unable to apply command.\r\n */\r\n error: boolean;\r\n /**\r\n * Reset max out or already applied. Client Disable Reset.\r\n */\r\n reset: boolean;\r\n /**\r\n * ZoomIn maxed out.\r\n */\r\n zoomIn: boolean;\r\n /**\r\n * ZoomOut maxed out.\r\n */\r\n zoomOut: boolean;\r\n /**\r\n * PanLeft reached max left.\r\n */\r\n panLeft: boolean;\r\n /**\r\n * PanRight reached max right.\r\n */\r\n panRight: boolean;\r\n /**\r\n * TiltUp reached top.\r\n */\r\n tiltUp: boolean;\r\n /**\r\n * TiltDown reached bottom.\r\n */\r\n tiltDown: boolean;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Enum used to indicate the reason for the error.\r\n */\r\n export enum ErrorReason {\r\n CommandResetError,\r\n CommandZoomInError,\r\n CommandZoomOutError,\r\n CommandPanLeftError,\r\n CommandPanRightError,\r\n CommandTiltUpError,\r\n CommandTiltDownError,\r\n SendDataError,\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to indicate the status of the current session.\r\n */\r\n export interface SessionStatus {\r\n /**\r\n * Whether the far-end user is controlling a device.\r\n */\r\n inControl: boolean;\r\n /**\r\n * Reason the control session was terminated.\r\n */\r\n terminatedReason?: SessionTerminatedReason;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Enum used to indicate the reason the session was terminated.\r\n */\r\n export enum SessionTerminatedReason {\r\n None,\r\n ControlDenied,\r\n ControlNoResponse,\r\n ControlBusy,\r\n AckTimeout,\r\n ControlTerminated,\r\n ControllerTerminated,\r\n DataChannelError,\r\n ControllerCancelled,\r\n ControlDisabled,\r\n ControlTerminatedToAllowOtherController,\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Fetch a list of the participants with controllable-cameras in a meeting.\r\n * @param callback Callback contains 2 parameters, error and participants.\r\n * error can either contain an error of type SdkError, incase of an error, or null when fetch is successful\r\n * participants can either contain an array of Participant objects, incase of a successful fetch or null when it fails\r\n * participants: object that contains an array of participants with controllable-cameras\r\n */\r\n export function getCapableParticipants(\r\n callback: (error: SdkError | null, participants: Participant[] | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[remoteCamera.getCapableParticipants] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('remoteCamera.getCapableParticipants', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Request control of a participant's camera.\r\n * @param participant Participant specifies the participant to send the request for camera control.\r\n * @param callback Callback contains 2 parameters, error and requestResponse.\r\n * error can either contain an error of type SdkError, incase of an error, or null when fetch is successful\r\n * requestResponse can either contain the true/false value, incase of a successful request or null when it fails\r\n * requestResponse: True means request was accepted and false means request was denied\r\n */\r\n export function requestControl(\r\n participant: Participant,\r\n callback: (error: SdkError | null, requestResponse: boolean | null) => void,\r\n ): void {\r\n if (!participant) {\r\n throw new Error('[remoteCamera.requestControl] Participant cannot be null');\r\n }\r\n if (!callback) {\r\n throw new Error('[remoteCamera.requestControl] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('remoteCamera.requestControl', [participant], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Send control command to the participant's camera.\r\n * @param ControlCommand ControlCommand specifies the command for controling the camera.\r\n * @param callback Callback to invoke when the command response returns.\r\n */\r\n export function sendControlCommand(ControlCommand: ControlCommand, callback: (error: SdkError | null) => void): void {\r\n if (!ControlCommand) {\r\n throw new Error('[remoteCamera.sendControlCommand] ControlCommand cannot be null');\r\n }\r\n if (!callback) {\r\n throw new Error('[remoteCamera.sendControlCommand] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('remoteCamera.sendControlCommand', [ControlCommand], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Terminate the remote session\r\n * @param callback Callback to invoke when the command response returns.\r\n */\r\n export function terminateSession(callback: (error: SdkError | null) => void): void {\r\n if (!callback) {\r\n throw new Error('[remoteCamera.terminateSession] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('remoteCamera.terminateSession', callback);\r\n }\r\n\r\n /**\r\n * Registers a handler for change in participants with controllable-cameras.\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 list of participants with controllable-cameras changes.\r\n */\r\n export function registerOnCapableParticipantsChangeHandler(\r\n handler: (participantChange: Participant[]) => void,\r\n ): void {\r\n if (!handler) {\r\n throw new Error('[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('remoteCamera.capableParticipantsChange', handler);\r\n }\r\n\r\n /**\r\n * Registers a handler for error.\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 there is an error from the camera handler.\r\n */\r\n export function registerOnErrorHandler(handler: (error: ErrorReason) => void): void {\r\n if (!handler) {\r\n throw new Error('[remoteCamera.registerOnErrorHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('remoteCamera.handlerError', handler);\r\n }\r\n\r\n /**\r\n * Registers a handler for device state change.\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 controlled device changes state.\r\n */\r\n export function registerOnDeviceStateChangeHandler(handler: (deviceStateChange: DeviceState) => void): void {\r\n if (!handler) {\r\n throw new Error('[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('remoteCamera.deviceStateChange', handler);\r\n }\r\n\r\n /**\r\n * Registers a handler for session status change.\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 current session status changes.\r\n */\r\n export function registerOnSessionStatusChangeHandler(handler: (sessionStatusChange: SessionStatus) => void): void {\r\n if (!handler) {\r\n throw new Error('[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('remoteCamera.sessionStatusChange', handler);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FileOpenPreference, FrameContexts, SdkError } from '../public';\r\n\r\n/**\r\n * Namespace to interact with the files specific part of the SDK.\r\n *\r\n * @private\r\n * Hide from docs\r\n */\r\nexport namespace files {\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Cloud storage providers registered with Microsoft Teams\r\n */\r\n export enum CloudStorageProvider {\r\n Dropbox = 'DROPBOX',\r\n Box = 'BOX',\r\n Sharefile = 'SHAREFILE',\r\n GoogleDrive = 'GOOGLEDRIVE',\r\n Egnyte = 'EGNYTE',\r\n SharePoint = 'SharePoint',\r\n }\r\n interface IWopiThumbnail {\r\n size: number;\r\n url: string;\r\n }\r\n\r\n interface IWopiService {\r\n name: string;\r\n description: string;\r\n thumbnails: IWopiThumbnail[];\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * External third-party cloud storages providers interface\r\n */\r\n export interface IExternalProvider extends IWopiService {\r\n providerType: CloudStorageProviderType;\r\n providerCode: CloudStorageProvider;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Cloud storage provider type enums\r\n */\r\n export enum CloudStorageProviderType {\r\n Sharepoint = 0,\r\n WopiIntegration,\r\n Google,\r\n OneDrive,\r\n Recent,\r\n Aggregate,\r\n FileSystem, // Used for Downloaded files on Desktop\r\n Search, // Used by P2P files with OSearch\r\n AllFiles, // Used by P2P files with AllFiles API\r\n SharedWithMe,\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Cloud storage folder interface\r\n */\r\n export interface CloudStorageFolder {\r\n /**\r\n * ID of the cloud storage folder\r\n */\r\n id: string;\r\n /**\r\n * Display Name/Title of the cloud storage folder\r\n */\r\n title: string;\r\n /**\r\n * ID of the cloud storage folder in the provider\r\n */\r\n folderId: string;\r\n /**\r\n * Type of the cloud storage folder provider integration\r\n */\r\n providerType: CloudStorageProviderType;\r\n /**\r\n * Code of the supported cloud storage folder provider\r\n */\r\n providerCode: CloudStorageProvider;\r\n /**\r\n * Display name of the owner of the cloud storage folder provider\r\n */\r\n ownerDisplayName: string;\r\n /**\r\n * Sharepoint specific siteURL of the folder\r\n */\r\n siteUrl?: string;\r\n /**\r\n * Sharepoint specific serverRelativeUrl of the folder\r\n */\r\n serverRelativeUrl?: string;\r\n /**\r\n * Sharepoint specific libraryType of the folder\r\n */\r\n libraryType?: string;\r\n /**\r\n * Sharepoint specific accessType of the folder\r\n */\r\n accessType?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Cloud storage item interface\r\n */\r\n export interface CloudStorageFolderItem {\r\n /**\r\n * ID of the item in the provider\r\n */\r\n id: string;\r\n /**\r\n * Display name/title\r\n */\r\n title: string;\r\n /**\r\n * Key to differentiate files and subdirectory\r\n */\r\n isSubdirectory: boolean;\r\n /**\r\n * File extension\r\n */\r\n type: string;\r\n /**\r\n * Last modifed time of the item\r\n */\r\n lastModifiedTime: string;\r\n /**\r\n * Display size of the items in bytes\r\n */\r\n size: number;\r\n /**\r\n * URL of the file\r\n */\r\n objectUrl: string;\r\n /**\r\n * Temporary access token for the item\r\n */\r\n accessToken?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Files entity user interface\r\n */\r\n export interface IFilesEntityUser {\r\n /**\r\n * User name.\r\n */\r\n displayName: string;\r\n /**\r\n * User email.\r\n */\r\n email: string;\r\n\r\n /**\r\n * User MRI.\r\n */\r\n mri: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Special Document Library enum\r\n */\r\n export enum SpecialDocumentLibraryType {\r\n ClassMaterials = 'classMaterials',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Document Library Access enum\r\n */\r\n export enum DocumentLibraryAccessType {\r\n Readonly = 'readonly',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * SharePoint file interface\r\n */\r\n export interface ISharePointFile {\r\n siteId?: string;\r\n siteUrl: string;\r\n objectId: string;\r\n objectUrl: string;\r\n openInWindowFileUrl: string;\r\n title: string;\r\n isFolder: boolean;\r\n serverRelativeUrl: string;\r\n lastModifiedByUser: IFilesEntityUser;\r\n lastModifiedTime: string;\r\n sentByUser: IFilesEntityUser;\r\n createdByUser: IFilesEntityUser;\r\n createdTime: string;\r\n size: number;\r\n type: string;\r\n spItemUrl?: string;\r\n libraryType?: SpecialDocumentLibraryType;\r\n accessType?: DocumentLibraryAccessType;\r\n etag?: string;\r\n remoteItem?: string;\r\n listUrl?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Download status enum\r\n */\r\n export enum FileDownloadStatus {\r\n Downloaded = 'Downloaded',\r\n Downloading = 'Downloading',\r\n Failed = 'Failed',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Download Files interface\r\n */\r\n export interface IFileItem {\r\n /**\r\n * ID of the file metadata\r\n */\r\n objectId?: string;\r\n /**\r\n * Path of the file\r\n */\r\n path?: string;\r\n /**\r\n * Size of the file in bytes\r\n */\r\n sizeInBytes?: number;\r\n /**\r\n * Download status\r\n */\r\n status?: FileDownloadStatus;\r\n /**\r\n * Download timestamp\r\n */\r\n timestamp: Date;\r\n /**\r\n * File name\r\n */\r\n title: string;\r\n /**\r\n * Type of file i.e. the file extension.\r\n */\r\n extension: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Gets a list of cloud storage folders added to the channel\r\n * @param channelId ID of the channel whose cloud storage folders should be retrieved\r\n * @param callback Callback that will be triggered post folders load\r\n */\r\n export function getCloudStorageFolders(\r\n channelId: string,\r\n callback: (error: SdkError, folders: CloudStorageFolder[]) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!channelId || channelId.length === 0) {\r\n throw new Error('[files.getCloudStorageFolders] channelId name cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[files.getCloudStorageFolders] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.getCloudStorageFolders', [channelId], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Initiates the add cloud storage folder flow\r\n * @param channelId ID of the channel to add cloud storage folder\r\n * @param callback Callback that will be triggered post add folder flow is compelete\r\n */\r\n export function addCloudStorageFolder(\r\n channelId: string,\r\n callback: (error: SdkError, isFolderAdded: boolean, folders: CloudStorageFolder[]) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!channelId || channelId.length === 0) {\r\n throw new Error('[files.addCloudStorageFolder] channelId name cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[files.addCloudStorageFolder] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.addCloudStorageFolder', [channelId], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Deletes a cloud storage folder from channel\r\n * @param channelId ID of the channel where folder is to be deleted\r\n * @param folderToDelete cloud storage folder to be deleted\r\n * @param callback Callback that will be triggered post delete\r\n */\r\n export function deleteCloudStorageFolder(\r\n channelId: string,\r\n folderToDelete: CloudStorageFolder,\r\n callback: (error: SdkError, isFolderDeleted: boolean) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!channelId) {\r\n throw new Error('[files.deleteCloudStorageFolder] channelId name cannot be null or empty');\r\n }\r\n if (!folderToDelete) {\r\n throw new Error('[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[files.deleteCloudStorageFolder] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.deleteCloudStorageFolder', [channelId, folderToDelete], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Fetches the contents of a Cloud storage folder (CloudStorageFolder) / sub directory\r\n * @param folder Cloud storage folder (CloudStorageFolder) / sub directory (CloudStorageFolderItem)\r\n * @param providerCode Code of the cloud storage folder provider\r\n * @param callback Callback that will be triggered post contents are loaded\r\n */\r\n export function getCloudStorageFolderContents(\r\n folder: CloudStorageFolder | CloudStorageFolderItem,\r\n providerCode: CloudStorageProvider,\r\n callback: (error: SdkError, items: CloudStorageFolderItem[]) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!folder || !providerCode) {\r\n throw new Error('[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty');\r\n }\r\n\r\n if (!callback) {\r\n throw new Error('[files.getCloudStorageFolderContents] Callback cannot be null');\r\n }\r\n\r\n if ('isSubdirectory' in folder && !folder.isSubdirectory) {\r\n throw new Error('[files.getCloudStorageFolderContents] provided folder is not a subDirectory');\r\n }\r\n\r\n sendMessageToParent('files.getCloudStorageFolderContents', [folder, providerCode], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Open a cloud storage file in teams\r\n * @param file cloud storage file that should be opened\r\n * @param providerCode Code of the cloud storage folder provider\r\n * @param fileOpenPreference Whether file should be opened in web/inline\r\n */\r\n export function openCloudStorageFile(\r\n file: CloudStorageFolderItem,\r\n providerCode: CloudStorageProvider,\r\n fileOpenPreference?: FileOpenPreference.Web | FileOpenPreference.Inline,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!file || !providerCode) {\r\n throw new Error('[files.openCloudStorageFile] file/providerCode cannot be null or empty');\r\n }\r\n\r\n if (file.isSubdirectory) {\r\n throw new Error('[files.openCloudStorageFile] provided file is a subDirectory');\r\n }\r\n\r\n sendMessageToParent('files.openCloudStorageFile', [file, providerCode, fileOpenPreference]);\r\n }\r\n\r\n /**\r\n * @private\r\n * Allow 1st party apps to call this function to get the external\r\n * third party cloud storage accounts that the tenant supports\r\n * @param excludeAddedProviders: return a list of support third party\r\n * cloud storages that hasn't been added yet.\r\n */\r\n export function getExternalProviders(\r\n excludeAddedProviders = false,\r\n callback: (error: SdkError, providers: IExternalProvider[]) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!callback) {\r\n throw new Error('[files.getExternalProviders] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.getExternalProviders', [excludeAddedProviders], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Allow 1st party apps to call this function to move files\r\n * among SharePoint and third party cloud storages.\r\n */\r\n export function copyMoveFiles(\r\n selectedFiles: CloudStorageFolderItem[] | ISharePointFile[],\r\n providerCode: CloudStorageProvider,\r\n destinationFolder: CloudStorageFolderItem | ISharePointFile,\r\n destinationProviderCode: CloudStorageProvider,\r\n isMove = false,\r\n callback: (error?: SdkError) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n if (!selectedFiles || selectedFiles.length === 0) {\r\n throw new Error('[files.copyMoveFiles] selectedFiles cannot be null or empty');\r\n }\r\n if (!providerCode) {\r\n throw new Error('[files.copyMoveFiles] providerCode cannot be null or empty');\r\n }\r\n if (!destinationFolder) {\r\n throw new Error('[files.copyMoveFiles] destinationFolder cannot be null or empty');\r\n }\r\n if (!destinationProviderCode) {\r\n throw new Error('[files.copyMoveFiles] destinationProviderCode cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[files.copyMoveFiles] callback cannot be null');\r\n }\r\n sendMessageToParent(\r\n 'files.copyMoveFiles',\r\n [selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove],\r\n callback,\r\n );\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Gets list of downloads for current user\r\n * @param callback Callback that will be triggered post downloads load\r\n */\r\n export function getFileDownloads(callback: (error?: SdkError, files?: IFileItem[]) => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!callback) {\r\n throw new Error('[files.getFileDownloads] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.getFileDownloads', [], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Open download preference folder if fileObjectId value is undefined else open folder containing the file with id fileObjectId\r\n * @param fileObjectId: Id of the file whose containing folder should be opened\r\n * @param callback Callback that will be triggered post open download folder/path\r\n */\r\n export function openDownloadFolder(fileObjectId: string = undefined, callback: (error?: SdkError) => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!callback) {\r\n throw new Error('[files.openDownloadFolder] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.openDownloadFolder', [fileObjectId], callback);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts, SdkError } from '../public';\r\n\r\n/**\r\n * Namespace to interact with the application entities specific part of the SDK.\r\n *\r\n * @private\r\n * Hide from docs\r\n */\r\nexport namespace appEntity {\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Information on an app entity\r\n */\r\n export interface AppEntity {\r\n /**\r\n * App ID of the application\r\n */\r\n appId: string;\r\n\r\n /**\r\n * URL for the application's icon\r\n */\r\n appIconUrl: string;\r\n\r\n /**\r\n * Content URL for the app entity\r\n */\r\n contentUrl: string;\r\n\r\n /**\r\n * The display name for the app entity\r\n */\r\n displayName: string;\r\n\r\n /**\r\n * Website URL for the app entity. It is meant to be opened by the user in a browser.\r\n */\r\n websiteUrl: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Open the Tab Gallery and retrieve the app entity\r\n * @param threadId ID of the thread where the app entity will be created\r\n * @param categories A list of app categories that will be displayed in the opened tab gallery\r\n * @param subEntityId An object that will be made available to the application being configured\r\n * through the Teams Context's subEntityId field.\r\n * @param callback Callback that will be triggered once the app entity information is available.\r\n * The callback takes two arguments: an SdkError in case something happened (i.e.\r\n * no permissions to execute the API) and the app entity configuration, if available\r\n */\r\n export function selectAppEntity(\r\n threadId: string,\r\n categories: string[],\r\n subEntityId: string,\r\n callback: (sdkError?: SdkError, appEntity?: AppEntity) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!threadId || threadId.length == 0) {\r\n throw new Error('[appEntity.selectAppEntity] threadId name cannot be null or empty');\r\n }\r\n\r\n if (!callback) {\r\n throw new Error('[appEntity.selectAppEntity] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('appEntity.selectAppEntity', [threadId, categories, subEntityId], callback);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts, SdkError } from '../public';\r\n\r\n/**\r\n * Namespace to interact with the `teams` specific part of the SDK.\r\n *\r\n * @private\r\n * Hide from docs\r\n */\r\nexport namespace teams {\r\n export enum ChannelType {\r\n Regular = 0,\r\n Private = 1,\r\n Shared = 2,\r\n }\r\n\r\n export interface ChannelInfo {\r\n siteUrl: string;\r\n objectId: string;\r\n folderRelativeUrl: string;\r\n displayName: string;\r\n channelType: ChannelType;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Get a list of channels belong to a Team\r\n * @param groupId a team's objectId\r\n */\r\n export function getTeamChannels(groupId: string, callback: (error: SdkError, channels: ChannelInfo[]) => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!groupId) {\r\n throw new Error('[teams.getTeamChannels] groupId cannot be null or empty');\r\n }\r\n\r\n if (!callback) {\r\n throw new Error('[teams.getTeamChannels] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('teams.getTeamChannels', [groupId], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Allow 1st party apps to call this function when they receive migrated errors to inform Teams refresh siteurl\r\n * when site admin renames siteurl.\r\n * @param threadId ID of the thread where the app entity will be created; if threadId is not\r\n * provided, the threadId from route params will be used.\r\n */\r\n export function refreshSiteUrl(threadId: string, callback: (error: SdkError) => void): void {\r\n ensureInitialized();\r\n\r\n if (!threadId) {\r\n throw new Error('[teams.refreshSiteUrl] threadId cannot be null or empty');\r\n }\r\n\r\n if (!callback) {\r\n throw new Error('[teams.refreshSiteUrl] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('teams.refreshSiteUrl', [threadId], callback);\r\n }\r\n}\r\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["webpack://microsoftTeams/webpack/universalModuleDefinition","webpack://microsoftTeams/webpack/bootstrap","webpack://microsoftTeams/./src/internal/communication.ts","webpack://microsoftTeams/./src/internal/internalAPIs.ts","webpack://microsoftTeams/./src/public/constants.ts","webpack://microsoftTeams/./src/internal/handlers.ts","webpack://microsoftTeams/./src/internal/constants.ts","webpack://microsoftTeams/./src/internal/utils.ts","webpack://microsoftTeams/./src/public/interfaces.ts","webpack://microsoftTeams/./src/internal/globalVars.ts","webpack://microsoftTeams/./src/public/index.ts","webpack://microsoftTeams/./node_modules/uuid/lib/rng-browser.js","webpack://microsoftTeams/./node_modules/uuid/lib/bytesToUuid.js","webpack://microsoftTeams/./src/public/authentication.ts","webpack://microsoftTeams/./src/public/settings.ts","webpack://microsoftTeams/./src/private/logs.ts","webpack://microsoftTeams/./src/private/privateAPIs.ts","webpack://microsoftTeams/./src/public/menus.ts","webpack://microsoftTeams/./src/public/appWindow.ts","webpack://microsoftTeams/./src/public/media.ts","webpack://microsoftTeams/./src/internal/mediaUtil.ts","webpack://microsoftTeams/./src/index.ts","webpack://microsoftTeams/./src/private/index.ts","webpack://microsoftTeams/./src/private/bot.ts","webpack://microsoftTeams/./node_modules/uuid/index.js","webpack://microsoftTeams/./node_modules/uuid/v1.js","webpack://microsoftTeams/./node_modules/uuid/v4.js","webpack://microsoftTeams/./src/public/appInitialization.ts","webpack://microsoftTeams/./src/public/publicAPIs.ts","webpack://microsoftTeams/./src/public/navigation.ts","webpack://microsoftTeams/./src/public/tasks.ts","webpack://microsoftTeams/./src/public/location.ts","webpack://microsoftTeams/./src/public/meeting.ts","webpack://microsoftTeams/./src/public/monetization.ts","webpack://microsoftTeams/./src/public/people.ts","webpack://microsoftTeams/./src/public/video.ts","webpack://microsoftTeams/./src/public/sharing.ts","webpack://microsoftTeams/./src/public/stageView.ts","webpack://microsoftTeams/./src/private/interfaces.ts","webpack://microsoftTeams/./src/private/conversations.ts","webpack://microsoftTeams/./src/private/meetingRoom.ts","webpack://microsoftTeams/./src/private/remoteCamera.ts","webpack://microsoftTeams/./src/private/files.ts","webpack://microsoftTeams/./src/private/appEntity.ts","webpack://microsoftTeams/./src/private/teams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S,GAAT,iBAAS,KAAT,iBAAS,QAiEzB;;;;;;;;;;;AC3ED,6CAAgE;AAChE,4CAA6D;AAC7D,sCAAoD;AAEpD;;;;;GAKG;AACH,IAAiB,KAAK,CAwDrB;AAxDD,WAAiB,KAAK;IACpB,IAAY,WAIX;IAJD,WAAY,WAAW;QACrB,mDAAW;QACX,mDAAW;QACX,iDAAU;IACZ,CAAC,EAJW,WAAW,GAAX,iBAAW,KAAX,iBAAW,QAItB;IAUD;;;;;;OAMG;IACH,SAAgB,eAAe,CAAC,OAAe,EAAE,QAA4D;QAC3G,oCAAiB,EAAC,sBAAa,CAAC,OAAO,CAAC,CAAC;QAEzC,IAAI,CAAC,OAAO,EAAE;YACZ,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;SAC5E;QAED,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;SACpE;QAED,uCAAmB,EAAC,uBAAuB,EAAE,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,CAAC;IACpE,CAAC;IAZe,qBAAe,kBAY9B;IAED;;;;;;OAMG;IACH,SAAgB,cAAc,CAAC,QAAgB,EAAE,QAAmC;QAClF,oCAAiB,GAAE,CAAC;QAEpB,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;SAC5E;QAED,IAAI,CAAC,QAAQ,EAAE;YACb,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;SACnE;QAED,uCAAmB,EAAC,sBAAsB,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;IACpE,CAAC;IAZe,oBAAc,iBAY7B;AACH,CAAC,EAxDgB,KAAK,GAAL,aAAK,KAAL,aAAK,QAwDrB","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 = 19);\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { validOriginRegExp, version } from './constants';\r\nimport { GlobalVars } from './globalVars';\r\nimport { callHandler } from './handlers';\r\nimport { MessageResponse, MessageRequest, ExtendedWindow, DOMMessageEvent } from './interfaces';\r\n\r\nexport class Communication {\r\n public static currentWindow: Window | any;\r\n public static parentOrigin: string;\r\n public static parentWindow: Window | any;\r\n public static childWindow: Window;\r\n public static childOrigin: string;\r\n}\r\n\r\nclass CommunicationPrivate {\r\n public static parentMessageQueue: MessageRequest[] = [];\r\n public static childMessageQueue: MessageRequest[] = [];\r\n public static nextMessageId = 0;\r\n public static callbacks: {\r\n [id: number]: Function;\r\n } = {};\r\n public static messageListener: Function;\r\n}\r\n\r\nexport function initializeCommunication(callback: Function, validMessageOrigins: string[] | undefined): void {\r\n // Listen for messages post to our window\r\n CommunicationPrivate.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 Communication.currentWindow = Communication.currentWindow || window;\r\n Communication.parentWindow =\r\n Communication.currentWindow.parent !== Communication.currentWindow.self\r\n ? Communication.currentWindow.parent\r\n : Communication.currentWindow.opener;\r\n\r\n // Listen to messages from the parent or child frame.\r\n // Frameless windows will only receive this event from child frames and if validMessageOrigins is passed.\r\n if (Communication.parentWindow || validMessageOrigins) {\r\n Communication.currentWindow.addEventListener('message', CommunicationPrivate.messageListener, false);\r\n }\r\n\r\n if (!Communication.parentWindow) {\r\n GlobalVars.isFramelessWindow = true;\r\n /* eslint-disable @typescript-eslint/ban-ts-comment */\r\n // @ts-ignore: window as ExtendedWindow\r\n (window as ExtendedWindow).onNativeMessage = handleParentMessage;\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 Communication.parentOrigin = '*';\r\n sendMessageToParent('initialize', [version], callback);\r\n } finally {\r\n Communication.parentOrigin = null;\r\n }\r\n}\r\n\r\nexport function uninitializeCommunication(): void {\r\n Communication.currentWindow.removeEventListener('message', CommunicationPrivate.messageListener, false);\r\n\r\n Communication.parentWindow = null;\r\n Communication.parentOrigin = null;\r\n Communication.childWindow = null;\r\n Communication.childOrigin = null;\r\n CommunicationPrivate.parentMessageQueue = [];\r\n CommunicationPrivate.childMessageQueue = [];\r\n CommunicationPrivate.nextMessageId = 0;\r\n CommunicationPrivate.callbacks = {};\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 sendMessageToParent(actionName: string, callback?: Function): void;\r\n/**\r\n * Send a message to parent. Uses nativeInterface on mobile to communicate with parent context\r\n */\r\nexport function sendMessageToParent(actionName: string, args: any[], callback?: Function): void;\r\nexport function sendMessageToParent(actionName: string, argsOrCallback?: any[] | Function, callback?: Function): void {\r\n let args: any[] | undefined;\r\n if (argsOrCallback instanceof Function) {\r\n callback = argsOrCallback;\r\n } else if (argsOrCallback instanceof Array) {\r\n args = argsOrCallback;\r\n }\r\n\r\n const targetWindow = Communication.parentWindow;\r\n const request = createMessageRequest(actionName, args);\r\n if (GlobalVars.isFramelessWindow) {\r\n if (Communication.currentWindow && Communication.currentWindow.nativeInterface) {\r\n (Communication.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\r\n if (callback) {\r\n CommunicationPrivate.callbacks[request.id] = callback;\r\n }\r\n}\r\n\r\nfunction 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 === Communication.parentWindow) {\r\n handleParentMessage(evt);\r\n } else if (messageSource === Communication.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 (Communication.currentWindow && messageSource === Communication.currentWindow) {\r\n return false;\r\n } else if (\r\n Communication.currentWindow &&\r\n Communication.currentWindow.location &&\r\n messageOrigin &&\r\n messageOrigin === Communication.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 // For frameless windows (i.e mobile), there is no parent frame, so the message must be from the child.\r\n if (\r\n !GlobalVars.isFramelessWindow &&\r\n (!Communication.parentWindow || Communication.parentWindow.closed || messageSource === Communication.parentWindow)\r\n ) {\r\n Communication.parentWindow = messageSource;\r\n Communication.parentOrigin = messageOrigin;\r\n } else if (\r\n !Communication.childWindow ||\r\n Communication.childWindow.closed ||\r\n messageSource === Communication.childWindow\r\n ) {\r\n Communication.childWindow = messageSource;\r\n Communication.childOrigin = messageOrigin;\r\n }\r\n\r\n // Clean up pointers to closed parent and child windows\r\n if (Communication.parentWindow && Communication.parentWindow.closed) {\r\n Communication.parentWindow = null;\r\n Communication.parentOrigin = null;\r\n }\r\n if (Communication.childWindow && Communication.childWindow.closed) {\r\n Communication.childWindow = null;\r\n Communication.childOrigin = null;\r\n }\r\n\r\n // If we have any messages in our queue, send them now\r\n flushMessageQueue(Communication.parentWindow);\r\n flushMessageQueue(Communication.childWindow);\r\n}\r\n\r\nfunction handleParentMessage(evt: DOMMessageEvent): void {\r\n if ('id' in evt.data && typeof evt.data.id === 'number') {\r\n // Call any associated Communication.callbacks\r\n const message = evt.data as MessageResponse;\r\n const callback = CommunicationPrivate.callbacks[message.id];\r\n if (callback) {\r\n callback.apply(null, [...message.args, message.isPartialResponse]);\r\n\r\n // Remove the callback to ensure that the callback is called only once and to free up memory if response is a complete response\r\n if (!isPartialResponse(evt)) {\r\n delete CommunicationPrivate.callbacks[message.id];\r\n }\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 callHandler(message.func, message.args);\r\n }\r\n}\r\n\r\nfunction isPartialResponse(evt: DOMMessageEvent): boolean {\r\n return evt.data.isPartialResponse === true;\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 [called, result] = callHandler(message.func, message.args);\r\n if (called && typeof result !== 'undefined') {\r\n sendMessageResponseToChild(message.id, Array.isArray(result) ? result : [result]);\r\n } else {\r\n // No handler, proxy to parent\r\n // tslint:disable-next-line:no-any\r\n sendMessageToParent(message.func, message.args, (...args: any[]): void => {\r\n if (Communication.childWindow) {\r\n const isPartialResponse = args.pop();\r\n sendMessageResponseToChild(message.id, args, isPartialResponse);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n\r\nfunction getTargetMessageQueue(targetWindow: Window): MessageRequest[] {\r\n return targetWindow === Communication.parentWindow\r\n ? CommunicationPrivate.parentMessageQueue\r\n : targetWindow === Communication.childWindow\r\n ? CommunicationPrivate.childMessageQueue\r\n : [];\r\n}\r\n\r\nfunction getTargetOrigin(targetWindow: Window): string {\r\n return targetWindow === Communication.parentWindow\r\n ? Communication.parentOrigin\r\n : targetWindow === Communication.childWindow\r\n ? Communication.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 = Communication.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 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 isPartialResponse?: boolean,\r\n): void {\r\n const targetWindow = Communication.childWindow;\r\n const response = createMessageResponse(id, args, isPartialResponse);\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 = Communication.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: CommunicationPrivate.nextMessageId++,\r\n func: func,\r\n timestamp: Date.now(),\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[], isPartialResponse: boolean): MessageResponse {\r\n return {\r\n id: id,\r\n args: args || [],\r\n isPartialResponse,\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 { HostClientType } from '../public/constants';\r\nimport { ErrorCode, SdkError } from '../public/interfaces';\r\nimport { userOriginUrlValidationRegExp, defaultSDKVersionForCompatCheck } from './constants';\r\nimport { GlobalVars } from './globalVars';\r\nimport { generateRegExpFromUrls, compareSDKVersions } from './utils';\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\n/**\r\n * Checks whether the platform has knowledge of this API by doing a comparison\r\n * on API required version and platform supported version of the SDK\r\n * @param requiredVersion SDK version required by the API\r\n */\r\nexport function isAPISupportedByPlatform(requiredVersion: string = defaultSDKVersionForCompatCheck): boolean {\r\n const value = compareSDKVersions(GlobalVars.clientSupportedSDKVersion, requiredVersion);\r\n if (isNaN(value)) {\r\n return false;\r\n }\r\n return value >= 0;\r\n}\r\n\r\n/**\r\n * Helper function to identify if host client is either android or ios\r\n */\r\nexport function isHostClientMobile(): boolean {\r\n return GlobalVars.hostClientType == HostClientType.android || GlobalVars.hostClientType == HostClientType.ios;\r\n}\r\n\r\n/**\r\n * Helper function which indicates if current API is supported on mobile or not.\r\n * @returns SdkError if host client is not android/ios or if the requiredVersion is not\r\n * supported by platform or not. Null is returned in case of success.\r\n */\r\nexport function isApiSupportedOnMobile(requiredVersion: string = defaultSDKVersionForCompatCheck): SdkError {\r\n if (!isHostClientMobile()) {\r\n const notSupportedError: SdkError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };\r\n return notSupportedError;\r\n } else if (!isAPISupportedByPlatform(requiredVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n return oldPlatformError;\r\n }\r\n return null;\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 const 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","export enum HostClientType {\r\n desktop = 'desktop',\r\n web = 'web',\r\n android = 'android',\r\n ios = 'ios',\r\n ipados = 'ipados',\r\n /**\r\n * @deprecated Use teamsRoomsWindows instead.\r\n */\r\n rigel = 'rigel',\r\n surfaceHub = 'surfaceHub',\r\n teamsRoomsWindows = 'teamsRoomsWindows',\r\n teamsRoomsAndroid = 'teamsRoomsAndroid',\r\n teamsPhones = 'teamsPhones',\r\n teamsDisplays = 'teamsDisplays',\r\n}\r\n\r\n// Ensure these declarations stay in sync with the framework.\r\nexport enum FrameContexts {\r\n settings = 'settings',\r\n content = 'content',\r\n authentication = 'authentication',\r\n remove = 'remove',\r\n task = 'task',\r\n sidePanel = 'sidePanel',\r\n stage = 'stage',\r\n meetingStage = 'meetingStage',\r\n}\r\n\r\n/**\r\n * Indicates the team type, currently used to distinguish between different team\r\n * types in Office 365 for Education (team types 1, 2, 3, and 4).\r\n */\r\nexport enum TeamType {\r\n Standard = 0,\r\n Edu = 1,\r\n Class = 2,\r\n Plc = 3,\r\n Staff = 4,\r\n}\r\n\r\n/**\r\n * Indicates the various types of roles of a user in a team.\r\n */\r\nexport enum UserTeamRole {\r\n Admin = 0,\r\n User = 1,\r\n Guest = 2,\r\n}\r\n\r\n/**\r\n * Task module dimension enum\r\n */\r\nexport enum TaskModuleDimension {\r\n Large = 'large',\r\n Medium = 'medium',\r\n Small = 'small',\r\n}\r\n\r\n/**\r\n * The type of the channel with which the content is associated.\r\n */\r\nexport enum ChannelType {\r\n Regular = 'Regular',\r\n Private = 'Private',\r\n Shared = 'Shared',\r\n}\r\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { LoadContext, navigateBack } from '../public';\r\nimport { Communication, sendMessageEventToChild, sendMessageToParent } from './communication';\r\n\r\nclass HandlersPrivate {\r\n public static handlers: {\r\n [func: string]: Function;\r\n } = {};\r\n public static themeChangeHandler: (theme: string) => void;\r\n public static backButtonPressHandler: () => boolean;\r\n public static focusEnterHandler: (navigateForward: boolean) => void;\r\n public static loadHandler: (context: LoadContext) => void;\r\n public static beforeUnloadHandler: (readyToUnload: () => void) => boolean;\r\n}\r\n\r\nexport function initializeHandlers(): void {\r\n // ::::::::::::::::::::MicrosoftTeams SDK Internal :::::::::::::::::\r\n HandlersPrivate.handlers['themeChange'] = handleThemeChange;\r\n HandlersPrivate.handlers['backButtonPress'] = handleBackButtonPress;\r\n HandlersPrivate.handlers['load'] = handleLoad;\r\n HandlersPrivate.handlers['beforeUnload'] = handleBeforeUnload;\r\n HandlersPrivate.handlers['focusEnter'] = handleFocusEnter;\r\n}\r\n\r\nexport function callHandler(name: string, args?: any[]): [true, any] | [false, undefined] {\r\n const handler = HandlersPrivate.handlers[name];\r\n if (handler) {\r\n const result = handler.apply(this, args);\r\n return [true, result];\r\n } else {\r\n return [false, undefined];\r\n }\r\n}\r\n\r\nexport function registerHandler(name: string, handler: Function, sendMessage = true, args: any[] = []): void {\r\n if (handler) {\r\n HandlersPrivate.handlers[name] = handler;\r\n sendMessage && sendMessageToParent('registerHandler', [name, ...args]);\r\n } else {\r\n delete HandlersPrivate.handlers[name];\r\n }\r\n}\r\n\r\nexport function removeHandler(name: string): void {\r\n delete HandlersPrivate.handlers[name];\r\n}\r\n\r\nexport function registerOnThemeChangeHandler(handler: (theme: string) => void): void {\r\n HandlersPrivate.themeChangeHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['themeChange']);\r\n}\r\n\r\nexport function handleThemeChange(theme: string): void {\r\n if (HandlersPrivate.themeChangeHandler) {\r\n HandlersPrivate.themeChangeHandler(theme);\r\n }\r\n\r\n if (Communication.childWindow) {\r\n sendMessageEventToChild('themeChange', [theme]);\r\n }\r\n}\r\n\r\nexport function registerBackButtonHandler(handler: () => boolean): void {\r\n HandlersPrivate.backButtonPressHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['backButton']);\r\n}\r\n\r\nfunction handleBackButtonPress(): void {\r\n if (!HandlersPrivate.backButtonPressHandler || !HandlersPrivate.backButtonPressHandler()) {\r\n navigateBack();\r\n }\r\n}\r\n\r\nexport function registerFocusEnterHandler(handler: (navigateForward: boolean) => void): void {\r\n HandlersPrivate.focusEnterHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['focusEnter']);\r\n}\r\n\r\nfunction handleFocusEnter(navigateForward: boolean): void {\r\n if (HandlersPrivate.focusEnterHandler) {\r\n HandlersPrivate.focusEnterHandler(navigateForward);\r\n }\r\n}\r\n\r\nexport function registerOnLoadHandler(handler: (context: LoadContext) => void): void {\r\n HandlersPrivate.loadHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['load']);\r\n}\r\n\r\nfunction handleLoad(context: LoadContext): void {\r\n if (HandlersPrivate.loadHandler) {\r\n HandlersPrivate.loadHandler(context);\r\n }\r\n\r\n if (Communication.childWindow) {\r\n sendMessageEventToChild('load', [context]);\r\n }\r\n}\r\n\r\nexport function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void {\r\n HandlersPrivate.beforeUnloadHandler = handler;\r\n handler && sendMessageToParent('registerHandler', ['beforeUnload']);\r\n}\r\n\r\nfunction handleBeforeUnload(): void {\r\n const readyToUnload = (): void => {\r\n sendMessageToParent('readyToUnload', []);\r\n };\r\n\r\n if (!HandlersPrivate.beforeUnloadHandler || !HandlersPrivate.beforeUnloadHandler(readyToUnload)) {\r\n readyToUnload();\r\n }\r\n}\r\n","import { generateRegExpFromUrls } from './utils';\r\n\r\nexport const version = '1.13.1';\r\n/**\r\n * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.\r\n * Modified to 2.0.1 which is hightest till now so that if any client doesn't pass version in initialize function, it will be set to highest.\r\n * Mobile clients are passing versions, hence will be applicable to web and desktop clients only.\r\n */\r\nexport const defaultSDKVersionForCompatCheck = '2.0.1';\r\n\r\n/**\r\n * This is the client version when selectMedia API - VideoAndImage is supported on mobile.\r\n */\r\nexport const videoAndImageMediaAPISupportVersion = '2.0.2';\r\n\r\n/**\r\n * This is the client version when selectMedia API - Video with non-full screen mode is supported on mobile.\r\n */\r\nexport const nonFullScreenVideoModeAPISupportVersion = '2.0.3';\r\n\r\n/**\r\n * This is the client version when selectMedia API - ImageOutputFormats is supported on mobile.\r\n */\r\nexport const imageOutputFormatsAPISupportVersion = '2.0.4';\r\n\r\n/**\r\n * Minimum required client supported version for {@link getUserJoinedTeams} to be supported on {@link HostClientType.android}\r\n */\r\nexport const getUserJoinedTeamsSupportedAndroidClientVersion = '2.0.1';\r\n\r\n/**\r\n * This is the client version when location APIs (getLocation and showLocation) are supported.\r\n */\r\nexport const locationAPIsRequiredVersion = '1.9.0';\r\n\r\n/**\r\n * This is the client version when people picker API is supported on mobile.\r\n */\r\nexport const peoplePickerRequiredVersion = '2.0.0';\r\n\r\n/**\r\n * This is the client version when captureImage API is supported on mobile.\r\n */\r\nexport const captureImageMobileSupportVersion = '1.7.0';\r\n\r\n/**\r\n * This is the client version when media APIs are supported on all three platforms ios, android and web.\r\n */\r\nexport const mediaAPISupportVersion = '1.8.0';\r\n\r\n/**\r\n * This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.\r\n */\r\nexport const getMediaCallbackSupportVersion = '2.0.0';\r\n\r\n/**\r\n * This is the client version when scanBarCode API is supported on mobile.\r\n */\r\nexport const scanBarCodeAPIMobileSupportVersion = '1.9.0';\r\n\r\n/**\r\n * List of supported Host origins\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://teams.live.com',\r\n 'https://devspaces.skype.com',\r\n 'https://ssauth.skype.com',\r\n 'https://local.teams.live.com', // local development\r\n 'https://local.teams.live.com:8080', // local development\r\n 'https://local.teams.office.com', // local development\r\n 'https://local.teams.office.com:8080', // local development\r\n 'https://outlook.office.com',\r\n 'https://outlook-sdf.office.com',\r\n 'https://*.teams.microsoft.com',\r\n 'https://www.office.com',\r\n 'https://word.office.com',\r\n 'https://excel.office.com',\r\n 'https://powerpoint.office.com',\r\n 'https://www.officeppe.com',\r\n 'https://*.www.office.com',\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","import * as uuid from 'uuid';\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\r\n/**\r\n * Compares SDK versions.\r\n * @param v1 first version\r\n * @param v2 second version\r\n * returns NaN in case inputs are not in right format\r\n * -1 if v1 < v2\r\n * 1 if v1 > v2\r\n * 0 otherwise\r\n * For example,\r\n * compareSDKVersions('1.2', '1.2.0') returns 0\r\n * compareSDKVersions('1.2a', '1.2b') returns NaN\r\n * compareSDKVersions('1.2', '1.3') returns -1\r\n * compareSDKVersions('2.0', '1.3.2') returns 1\r\n * compareSDKVersions('2.0', 2.0) returns NaN\r\n */\r\nexport function compareSDKVersions(v1: string, v2: string): number {\r\n if (typeof v1 !== 'string' || typeof v2 !== 'string') {\r\n return NaN;\r\n }\r\n\r\n const v1parts = v1.split('.');\r\n const v2parts = v2.split('.');\r\n\r\n function isValidPart(x: string): boolean {\r\n // input has to have one or more digits\r\n // For ex - returns true for '11', false for '1a1', false for 'a', false for '2b'\r\n return /^\\d+$/.test(x);\r\n }\r\n\r\n if (!v1parts.every(isValidPart) || !v2parts.every(isValidPart)) {\r\n return NaN;\r\n }\r\n\r\n // Make length of both parts equal\r\n while (v1parts.length < v2parts.length) {\r\n v1parts.push('0');\r\n }\r\n while (v2parts.length < v1parts.length) {\r\n v2parts.push('0');\r\n }\r\n\r\n for (let i = 0; i < v1parts.length; ++i) {\r\n if (Number(v1parts[i]) == Number(v2parts[i])) {\r\n continue;\r\n } else if (Number(v1parts[i]) > Number(v2parts[i])) {\r\n return 1;\r\n } else {\r\n return -1;\r\n }\r\n }\r\n return 0;\r\n}\r\n\r\n/**\r\n * Generates a GUID\r\n */\r\nexport function generateGUID(): string {\r\n return uuid.v4();\r\n}\r\n","import { TaskModuleDimension, HostClientType, TeamType, UserTeamRole, ChannelType } from './constants';\r\nimport { FrameContexts } from './constants';\r\n\r\n/**\r\n * Represents information about tabs for an app\r\n */\r\nexport interface TabInformation {\r\n teamTabs: TabInstance[];\r\n}\r\n\r\n/**\r\n * Represents information about a tab instance\r\n */\r\nexport interface TabInstance {\r\n /**\r\n * The name of the tab\r\n */\r\n tabName: string;\r\n\r\n /**\r\n * Internal: do not use\r\n * @protected\r\n */\r\n internalTabInstanceId?: string;\r\n\r\n /**\r\n * Last viewed time of this tab. null means unknown\r\n */\r\n lastViewUnixEpochTime?: string;\r\n\r\n /**\r\n * The developer-defined unique ID for the entity this content points to.\r\n */\r\n entityId?: string;\r\n\r\n /**\r\n * The Microsoft Teams ID for the channel with which the content is associated.\r\n */\r\n channelId?: string;\r\n\r\n /**\r\n * The name for the channel with which the content is associated.\r\n */\r\n channelName?: string;\r\n\r\n /**\r\n * Is this tab in a favorite channel?\r\n */\r\n channelIsFavorite?: boolean;\r\n\r\n /**\r\n * The Microsoft Teams ID for the team with which the content is associated.\r\n */\r\n teamId?: string;\r\n\r\n /**\r\n * The name for the team with which the content is associated.\r\n */\r\n teamName?: string;\r\n\r\n /**\r\n * Is this tab in a favorite team?\r\n */\r\n teamIsFavorite?: boolean;\r\n\r\n /**\r\n * The Office 365 group ID for the team with which the content is associated.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n groupId?: string;\r\n\r\n /**\r\n * Content URL of this tab\r\n */\r\n url?: string;\r\n\r\n /**\r\n * Website URL of this tab\r\n */\r\n websiteUrl?: string;\r\n}\r\n\r\n/**\r\n * Indicates information about the tab instance for filtering purposes.\r\n */\r\nexport interface TabInstanceParameters {\r\n /**\r\n * Flag allowing to select favorite channels only\r\n */\r\n favoriteChannelsOnly?: boolean;\r\n\r\n /**\r\n * Flag allowing to select favorite teams only\r\n */\r\n favoriteTeamsOnly?: boolean;\r\n}\r\n\r\n/**\r\n * Represents Team Information\r\n */\r\nexport interface TeamInformation {\r\n /**\r\n * Id of the team\r\n */\r\n teamId: string;\r\n\r\n /**\r\n * Team display name\r\n */\r\n teamName: string;\r\n\r\n /**\r\n * Team description\r\n */\r\n teamDescription?: string;\r\n\r\n /**\r\n * Thumbnail Uri\r\n */\r\n thumbnailUri?: string;\r\n\r\n /**\r\n * The Office 365 group ID for the team with which the content is associated.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n groupId?: string;\r\n\r\n /**\r\n * Role of current user in the team\r\n */\r\n userTeamRole?: UserTeamRole;\r\n\r\n /**\r\n * The type of the team.\r\n */\r\n teamType?: TeamType;\r\n\r\n /**\r\n * The locked status of the team\r\n */\r\n isTeamLocked?: boolean;\r\n\r\n /**\r\n * The archived status of the team\r\n */\r\n isTeamArchived?: boolean;\r\n}\r\n\r\n/**\r\n * Represents OS locale info used for formatting date and time data\r\n */\r\nexport interface LocaleInfo {\r\n platform: 'windows' | 'macos';\r\n regionalFormat: string;\r\n shortDate: string;\r\n longDate: string;\r\n shortTime: string;\r\n longTime: string;\r\n}\r\n\r\n/**\r\n * Allowed user file open preferences\r\n */\r\nexport enum FileOpenPreference {\r\n Inline = 'inline',\r\n Desktop = 'desktop',\r\n Web = 'web',\r\n}\r\n\r\nexport interface Context {\r\n /**\r\n * The Office 365 group ID for the team with which the content is associated.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n groupId?: string;\r\n\r\n /**\r\n * The Microsoft Teams ID for the team with which the content is associated.\r\n */\r\n teamId?: string;\r\n\r\n /**\r\n * The name for the team with which the content is associated.\r\n */\r\n teamName?: string;\r\n\r\n /**\r\n * The Microsoft Teams ID for the channel with which the content is associated.\r\n */\r\n channelId?: string;\r\n\r\n /**\r\n * The name for the channel with which the content is associated.\r\n */\r\n channelName?: string;\r\n\r\n /**\r\n * The type of the channel with which the content is associated.\r\n */\r\n channelType?: ChannelType;\r\n\r\n /**\r\n * The developer-defined unique ID for the entity this content points to.\r\n */\r\n entityId: string;\r\n\r\n /**\r\n * The developer-defined unique ID for the sub-entity this content points to.\r\n * This field should be used to restore to a specific state within an entity,\r\n * such as scrolling to or activating a specific piece of content.\r\n */\r\n subEntityId?: string;\r\n\r\n /**\r\n * The current locale that the user has configured for the app formatted as\r\n * languageId-countryId (for example, en-us).\r\n */\r\n locale: string;\r\n\r\n /**\r\n * More detailed locale info from the user's OS if available. Can be used together with\r\n * the @microsoft/globe NPM package to ensure your app respects the user's OS date and\r\n * time format configuration\r\n */\r\n osLocaleInfo?: LocaleInfo;\r\n\r\n /**\r\n * @deprecated Use loginHint or userPrincipalName.\r\n * The UPN of the current user.\r\n * Because a malicious party can run your content in a browser, this value should\r\n * be used only as a hint as to who the user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n upn?: string;\r\n\r\n /**\r\n * The Azure AD tenant ID of the current user.\r\n * Because a malicious party can run your content in a browser, this value should\r\n * be used only as a hint as to who the user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n tid?: string;\r\n\r\n /**\r\n * The current UI theme.\r\n */\r\n theme?: string;\r\n\r\n /**\r\n * Indication whether the tab is in full-screen mode.\r\n */\r\n isFullScreen?: boolean;\r\n\r\n /**\r\n * The type of the team.\r\n */\r\n teamType?: TeamType;\r\n\r\n /**\r\n * The root SharePoint site associated with the team.\r\n */\r\n teamSiteUrl?: string;\r\n\r\n /**\r\n * The domain of the root SharePoint site associated with the team.\r\n */\r\n teamSiteDomain?: string;\r\n\r\n /**\r\n * The relative path to the SharePoint site associated with the team.\r\n */\r\n teamSitePath?: string;\r\n\r\n /**\r\n * The tenant ID of the host team.\r\n */\r\n hostTeamTenantId?: string;\r\n\r\n /**\r\n * The AAD group ID of the host team.\r\n */\r\n hostTeamGroupId?: string;\r\n\r\n /**\r\n * The relative path to the SharePoint folder associated with the channel.\r\n */\r\n channelRelativeUrl?: string;\r\n\r\n /**\r\n * Unique ID for the current Teams session for use in correlating telemetry data.\r\n */\r\n sessionId?: string;\r\n\r\n /**\r\n * The user's role in the team.\r\n * Because a malicious party can run your content in a browser, this value should\r\n * be used only as a hint as to the user's role, and never as proof of her role.\r\n */\r\n userTeamRole?: UserTeamRole;\r\n\r\n /**\r\n * The Microsoft Teams ID for the chat with which the content is associated.\r\n */\r\n chatId?: string;\r\n\r\n /**\r\n * A value suitable for use as a login_hint when authenticating with Azure AD.\r\n * Because a malicious party can run your content in a browser, this value should\r\n * be used only as a hint as to who the user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n loginHint?: string;\r\n\r\n /**\r\n * The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users).\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 user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n userPrincipalName?: string;\r\n\r\n /**\r\n * The Azure AD object id of the current user.\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 user is and never as proof of identity.\r\n * This field is available only when the identity permission is requested in the manifest.\r\n */\r\n userObjectId?: string;\r\n\r\n /**\r\n * Indicates whether team is archived.\r\n * Apps should use this as a signal to prevent any changes to content associated with archived teams.\r\n */\r\n isTeamArchived?: boolean;\r\n\r\n /**\r\n * The type of the host client. Possible values are : android, ios, web, desktop, rigel(deprecated, use teamsRoomsWindows instead),\r\n * surfaceHub, teamsRoomsWindows, teamsRoomsAndroid, teamsPhones, teamsDisplays\r\n */\r\n hostClientType?: HostClientType;\r\n\r\n /**\r\n * The context where tab url is loaded (content, task, setting, remove, sidePanel)\r\n */\r\n frameContext?: FrameContexts;\r\n\r\n /**\r\n * SharePoint context. This is only available when hosted in SharePoint.\r\n */\r\n sharepoint?: any;\r\n\r\n /**\r\n * The type of license for the current users tenant.\r\n */\r\n tenantSKU?: string;\r\n\r\n /**\r\n * The license type for the current user.\r\n */\r\n userLicenseType?: string;\r\n\r\n /**\r\n * The ID of the parent message from which this task module was launched.\r\n * This is only available in task modules launched from bot cards.\r\n */\r\n parentMessageId?: string;\r\n\r\n /**\r\n * Current ring ID\r\n */\r\n ringId?: string;\r\n\r\n /**\r\n * Unique ID for the current session for use in correlating telemetry data.\r\n */\r\n appSessionId?: string;\r\n\r\n /**\r\n * ID for the current visible app which is different for across cached sessions. Used for correlating telemetry data``\r\n */\r\n appLaunchId?: string;\r\n\r\n /**\r\n * Represents whether calling is allowed for the current logged in User\r\n */\r\n isCallingAllowed?: boolean;\r\n\r\n /**\r\n * Represents whether PSTN calling is allowed for the current logged in User\r\n */\r\n isPSTNCallingAllowed?: boolean;\r\n\r\n /**\r\n * Meeting Id used by tab when running in meeting context\r\n */\r\n meetingId?: string;\r\n\r\n /**\r\n * The OneNote section ID that is linked to the channel.\r\n */\r\n defaultOneNoteSectionId?: string;\r\n\r\n /**\r\n * Indication whether the tab is in a pop out window\r\n */\r\n isMultiWindow?: boolean;\r\n\r\n /**\r\n * Personal app icon y coordinate position\r\n */\r\n appIconPosition?: number;\r\n\r\n /**\r\n * Source origin from where the tab is opened\r\n */\r\n sourceOrigin?: string;\r\n\r\n /**\r\n * Time when the user clicked on the tab\r\n */\r\n userClickTime?: number;\r\n\r\n /**\r\n * Team Template ID if there was a Team Template associated with the creation of the team.\r\n */\r\n teamTemplateId?: string;\r\n\r\n /**\r\n * Where the user prefers the file to be opened from by default during file open\r\n */\r\n userFileOpenPreference?: FileOpenPreference;\r\n\r\n /**\r\n * Teamsite ID, aka sharepoint site id.\r\n */\r\n teamSiteId?: string;\r\n\r\n /**\r\n * The SharePoint my site domain associated with the user.\r\n */\r\n mySiteDomain?: string;\r\n\r\n /**\r\n * The SharePoint relative path to the current users mysite\r\n */\r\n mySitePath?: string;\r\n}\r\n\r\nexport interface DeepLinkParameters {\r\n /**\r\n * The developer-defined unique ID for the sub-entity to which this deep link points in the current entity.\r\n * This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.\r\n */\r\n subEntityId: string;\r\n\r\n /**\r\n * The label for the sub-entity that should be displayed when the deep link is rendered in a client.\r\n */\r\n subEntityLabel: string;\r\n\r\n /**\r\n * The fallback URL to which to navigate the user if the client cannot render the page.\r\n * This URL should lead directly to the sub-entity.\r\n */\r\n subEntityWebUrl?: string;\r\n}\r\n\r\nexport interface TaskInfo {\r\n /**\r\n * The url to be rendered in the webview/iframe.\r\n */\r\n url?: string;\r\n\r\n /**\r\n * JSON defining an adaptive card.\r\n */\r\n card?: string;\r\n\r\n /**\r\n * The requested height of the webview/iframe.\r\n */\r\n height?: TaskModuleDimension | number;\r\n\r\n /**\r\n * The requested width of the webview/iframe.\r\n */\r\n width?: TaskModuleDimension | number;\r\n\r\n /**\r\n * Title of the task module.\r\n */\r\n title?: string;\r\n\r\n /**\r\n * If client doesnt support the URL, the URL that needs to be opened in the browser.\r\n */\r\n fallbackUrl?: string;\r\n\r\n /**\r\n * Specifies a bot ID to send the result of the user's interaction with the task module.\r\n * If specified, the bot will receive a task/complete invoke event with a JSON object\r\n * in the event payload.\r\n */\r\n completionBotId?: string;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\nexport interface OpenConversationRequest {\r\n /**\r\n * The Id of the subEntity where the conversation is taking place\r\n */\r\n subEntityId: string;\r\n\r\n /**\r\n * The title of the conversation\r\n */\r\n title: string;\r\n\r\n /**\r\n * The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before\r\n */\r\n conversationId?: string;\r\n\r\n /**\r\n * The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope\r\n */\r\n channelId?: string;\r\n\r\n /**\r\n * The entity Id of the tab\r\n */\r\n entityId: string;\r\n\r\n /**\r\n * A function that is called once the conversation Id has been created\r\n */\r\n onStartConversation?: (conversationResponse: ConversationResponse) => void;\r\n\r\n /**\r\n * A function that is called if the pane is closed\r\n */\r\n onCloseConversation?: (conversationResponse: ConversationResponse) => void;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\nexport interface ConversationResponse {\r\n /**\r\n * The Id of the subEntity where the conversation is taking place\r\n */\r\n subEntityId: string;\r\n\r\n /**\r\n * The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before\r\n */\r\n conversationId?: string;\r\n\r\n /**\r\n * The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope\r\n */\r\n channelId?: string;\r\n\r\n /**\r\n * The entity Id of the tab\r\n */\r\n entityId?: string;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n */\r\nexport interface LoadContext {\r\n /**\r\n * The entity that is requested to be loaded\r\n */\r\n entityId: string;\r\n\r\n /**\r\n * The content URL that is requested to be loaded\r\n */\r\n contentUrl: string;\r\n}\r\n\r\nexport interface FrameContext {\r\n /**\r\n * The current URL that needs to be used in the iframe if the tab is reloaded\r\n */\r\n contentUrl: string;\r\n\r\n /**\r\n * The current URL that needs to be used for opening the website when the user clicks on 'Go to website'\r\n */\r\n websiteUrl: string;\r\n}\r\n\r\nexport interface SdkError {\r\n /**\r\n error code\r\n */\r\n errorCode: ErrorCode;\r\n /**\r\n Optional description for the error. This may contain useful information for web-app developers.\r\n This string will not be localized and is not for end-user consumption. \r\n App should not depend on the string content. The exact value may change. This is only for debugging purposes.\r\n */\r\n message?: string;\r\n}\r\n\r\nexport enum ErrorCode {\r\n /**\r\n * API not supported in the current platform.\r\n */\r\n NOT_SUPPORTED_ON_PLATFORM = 100,\r\n /**\r\n * Internal error encountered while performing the required operation.\r\n */\r\n INTERNAL_ERROR = 500,\r\n /**\r\n * API is not supported in the current context\r\n */\r\n NOT_SUPPORTED_IN_CURRENT_CONTEXT = 501,\r\n /**\r\n Permissions denied by user\r\n */\r\n PERMISSION_DENIED = 1000,\r\n /**\r\n * Network issue\r\n */\r\n NETWORK_ERROR = 2000,\r\n /**\r\n * Underlying hardware doesn't support the capability\r\n */\r\n NO_HW_SUPPORT = 3000,\r\n /**\r\n * One or more arguments are invalid\r\n */\r\n INVALID_ARGUMENTS = 4000,\r\n /**\r\n * User is not authorized for this operation\r\n */\r\n UNAUTHORIZED_USER_OPERATION = 5000,\r\n /**\r\n * Could not complete the operation due to insufficient resources\r\n */\r\n INSUFFICIENT_RESOURCES = 6000,\r\n /**\r\n * Platform throttled the request because of API was invoked too frequently\r\n */\r\n THROTTLE = 7000,\r\n /**\r\n * User aborted the operation\r\n */\r\n USER_ABORT = 8000,\r\n /**\r\n * Could not complete the operation in the given time interval\r\n */\r\n OPERATION_TIMED_OUT = 8001,\r\n /**\r\n * Platform code is old and doesn't implement this API\r\n */\r\n OLD_PLATFORM = 9000,\r\n /**\r\n * The file specified was not found on the given location\r\n */\r\n FILE_NOT_FOUND = 404,\r\n /**\r\n * The return value is too big and has exceeded our size boundries\r\n */\r\n SIZE_EXCEEDED = 10000,\r\n}\r\n","import { FrameContexts } from '../public';\r\nexport class GlobalVars {\r\n public static initializeCalled = false;\r\n public static initializeCompleted = false;\r\n public static additionalValidOrigins: string[] = [];\r\n public static additionalValidOriginsRegexp: RegExp = null;\r\n public static initializeCallbacks: { (): void }[] = [];\r\n public static isFramelessWindow = false;\r\n public static frameContext: FrameContexts;\r\n public static hostClientType: string;\r\n public static clientSupportedSDKVersion: string;\r\n public static printCapabilityEnabled = false;\r\n}\r\n","export { appInitialization } from './appInitialization';\r\nexport { authentication } from './authentication';\r\nexport { FrameContexts, HostClientType, TaskModuleDimension, TeamType, UserTeamRole, ChannelType } from './constants';\r\nexport {\r\n Context,\r\n DeepLinkParameters,\r\n ErrorCode,\r\n FrameContext,\r\n LoadContext,\r\n SdkError,\r\n TabInformation,\r\n TabInstance,\r\n TabInstanceParameters,\r\n TaskInfo,\r\n TeamInformation,\r\n FileOpenPreference,\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 print,\r\n registerBackButtonHandler,\r\n registerBeforeUnloadHandler,\r\n registerFocusEnterHandler,\r\n registerChangeSettingsHandler,\r\n registerFullScreenHandler,\r\n registerOnLoadHandler,\r\n registerOnThemeChangeHandler,\r\n registerAppButtonClickHandler,\r\n registerAppButtonHoverEnterHandler,\r\n registerAppButtonHoverLeaveHandler,\r\n setFrameContext,\r\n shareDeepLink,\r\n} from './publicAPIs';\r\nexport { returnFocus, navigateBack, navigateCrossDomain, navigateToTab } from './navigation';\r\nexport { settings } from './settings';\r\nexport { tasks } from './tasks';\r\nexport { ChildAppWindow, IAppWindow, ParentAppWindow } from './appWindow';\r\nexport { menus } from './menus';\r\nexport { media } from './media';\r\nexport { location } from './location';\r\nexport { meeting } from './meeting';\r\nexport { monetization } from './monetization';\r\nexport { people } from './people';\r\nexport { video } from './video';\r\nexport { sharing } from './sharing';\r\nexport { stageView } from './stageView';\r\n","// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n","/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { FrameContexts, HostClientType } from './constants';\r\nimport {\r\n Communication,\r\n sendMessageToParent,\r\n sendMessageEventToChild,\r\n waitForMessageQueue,\r\n} from '../internal/communication';\r\nimport { registerHandler, removeHandler } from '../internal/handlers';\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\r\n export function initialize(): void {\r\n registerHandler('authentication.authenticate.success', handleSuccess, false);\r\n registerHandler('authentication.authenticate.failure', handleFailure, false);\r\n }\r\n\r\n /**\r\n * Registers the authentication Communication.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(\r\n FrameContexts.content,\r\n FrameContexts.sidePanel,\r\n FrameContexts.settings,\r\n FrameContexts.remove,\r\n FrameContexts.task,\r\n FrameContexts.stage,\r\n FrameContexts.meetingStage,\r\n );\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 GlobalVars.hostClientType === HostClientType.teamsRoomsWindows ||\r\n GlobalVars.hostClientType === HostClientType.teamsRoomsAndroid ||\r\n GlobalVars.hostClientType === HostClientType.teamsPhones ||\r\n GlobalVars.hostClientType === HostClientType.teamsDisplays\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 sendMessageToParent(\r\n 'authentication.authenticate',\r\n [link.href, authenticateParams.width, authenticateParams.height, authenticateParams.isExternal],\r\n (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 );\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 * 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 sendMessageToParent(\r\n 'authentication.getAuthToken',\r\n [authTokenRequest.resources, authTokenRequest.claims, authTokenRequest.silent],\r\n (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 /**\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 sendMessageToParent('authentication.getUser', (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 (Communication.childWindow) {\r\n Communication.childWindow.close();\r\n }\r\n } finally {\r\n Communication.childWindow = null;\r\n Communication.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, Communication.currentWindow.outerWidth - 400);\r\n height = Math.min(height, Communication.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.replace('{oauthRedirectMethod}', 'web');\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 Communication.currentWindow.screenLeft !== 'undefined'\r\n ? Communication.currentWindow.screenLeft\r\n : Communication.currentWindow.screenX;\r\n let top: number =\r\n typeof Communication.currentWindow.screenTop !== 'undefined'\r\n ? Communication.currentWindow.screenTop\r\n : Communication.currentWindow.screenY;\r\n left += Communication.currentWindow.outerWidth / 2 - width / 2;\r\n top += Communication.currentWindow.outerHeight / 2 - height / 2;\r\n // Open a child window with a desired set of standard browser features\r\n Communication.childWindow = Communication.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 (Communication.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 removeHandler('initialize');\r\n removeHandler('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 = Communication.currentWindow.setInterval(() => {\r\n if (!Communication.childWindow || Communication.childWindow.closed) {\r\n handleFailure('CancelledByUser');\r\n } else {\r\n const savedChildOrigin = Communication.childOrigin;\r\n try {\r\n Communication.childOrigin = '*';\r\n sendMessageEventToChild('ping');\r\n } finally {\r\n Communication.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 registerHandler('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 registerHandler('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 sendMessageToParent('authentication.authenticate.success', [result]);\r\n // Wait for the message to be sent before closing the window\r\n waitForMessageQueue(Communication.parentWindow, () => setTimeout(() => Communication.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 sendMessageToParent('authentication.authenticate.failure', [reason]);\r\n // Wait for the message to be sent before closing the window\r\n waitForMessageQueue(Communication.parentWindow, () => setTimeout(() => Communication.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 Communication.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 Communication.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 * The flag which indicates whether the auth page should be opened in an external browser. This flag has no effect on the web client.\r\n */\r\n isExternal?: boolean;\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 export interface AuthTokenRequest {\r\n /**\r\n * An optional list of resource for which to acquire the access token; only used for full trust apps.\r\n */\r\n resources?: string[];\r\n /**\r\n * An optional list of claims which to pass to AAD when requesting the access token.\r\n */\r\n claims?: string[];\r\n /**\r\n * An optional flag indicating whether to attempt the token acquisition silently or allow a prompt to be shown.\r\n */\r\n silent?: boolean;\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 /**\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 /**\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 { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\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\r\n export function initialize(): void {\r\n registerHandler('settings.save', handleSave, false);\r\n registerHandler('settings.remove', handleRemove, false);\r\n }\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 sendMessageToParent('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, FrameContexts.sidePanel);\r\n sendMessageToParent('settings.getSettings', 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, FrameContexts.sidePanel);\r\n sendMessageToParent(\r\n 'settings.setSettings',\r\n [instanceSettings],\r\n onComplete ? onComplete : getGenericOnCompleteHandler(),\r\n );\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 && sendMessageToParent('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, FrameContexts.settings);\r\n removeHandler = handler;\r\n handler && sendMessageToParent('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 = 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 sendMessageToParent('settings.save.success');\r\n this.notified = true;\r\n }\r\n public notifyFailure(reason?: string): void {\r\n this.ensureNotNotified();\r\n sendMessageToParent('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 = false;\r\n\r\n public notifySuccess(): void {\r\n this.ensureNotNotified();\r\n sendMessageToParent('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 sendMessageToParent('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 } from '../internal/internalAPIs';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler, removeHandler } from '../internal/handlers';\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 /**\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 if (handler) {\r\n registerHandler('log.request', () => {\r\n const log: string = handler();\r\n sendMessageToParent('log.receive', [log]);\r\n });\r\n } else {\r\n removeHandler('log.request');\r\n }\r\n }\r\n}\r\n","import { ensureInitialized, isAPISupportedByPlatform } from '../internal/internalAPIs';\r\nimport { FrameContexts, HostClientType } from '../public/constants';\r\nimport {\r\n ChatMembersInformation,\r\n ShowNotificationParameters,\r\n FilePreviewParameters,\r\n TeamInstanceParameters,\r\n UserJoinedTeamsInformation,\r\n UserSettingTypes,\r\n} from './interfaces';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { Communication, sendMessageToParent, sendMessageEventToChild } from '../internal/communication';\r\n\r\nimport { registerHandler } from '../internal/handlers';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { ErrorCode, SdkError } from '../public/interfaces';\r\nimport { getUserJoinedTeamsSupportedAndroidClientVersion } from '../internal/constants';\r\n\r\nexport function initializePrivateApis(): void {\r\n //Keeping this API for any future usage, wherein privateAPIs need to be initialized\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 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 if (\r\n (GlobalVars.hostClientType === HostClientType.android ||\r\n GlobalVars.hostClientType === HostClientType.teamsRoomsAndroid ||\r\n GlobalVars.hostClientType === HostClientType.teamsPhones ||\r\n GlobalVars.hostClientType === HostClientType.teamsDisplays) &&\r\n !isAPISupportedByPlatform(getUserJoinedTeamsSupportedAndroidClientVersion)\r\n ) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n throw new Error(JSON.stringify(oldPlatformError));\r\n }\r\n\r\n sendMessageToParent('getUserJoinedTeams', [teamInstanceParameters], 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 sendMessageToParent('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 sendMessageToParent('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, FrameContexts.task);\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 filePreviewParameters.viewerAction,\r\n filePreviewParameters.fileOpenPreference,\r\n filePreviewParameters.conversationId,\r\n ];\r\n\r\n sendMessageToParent('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 sendMessageToParent('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 sendMessageToParent('uploadCustomApp', [manifestBlob], 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): void {\r\n ensureInitialized();\r\n\r\n sendMessageToParent(actionName, args, callback);\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 (!Communication.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 registerHandler(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 sendMessageToParent('getChatMembers', 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 sendMessageToParent('getConfigSetting', [key], callback);\r\n}\r\n\r\n/**\r\n * @private\r\n * register a handler to be called when a user setting changes. The changed setting type & value is provided in the callback.\r\n * @param settingTypes List of user setting changes to subscribe\r\n * @param handler When a subscribed setting is updated this handler is called\r\n */\r\nexport function registerUserSettingsChangeHandler(\r\n settingTypes: UserSettingTypes[],\r\n handler: (settingType: UserSettingTypes, value: any) => void,\r\n): void {\r\n ensureInitialized();\r\n\r\n registerHandler('userSettingsChange', handler, true, [settingTypes]);\r\n}\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\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 */\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 /**\r\n * Defines how a menu item should appear in the NavBar.\r\n */\r\n export enum DisplayMode {\r\n /**\r\n * Only place this item in the NavBar if there's room for it.\r\n * If there's no room, item is shown in the overflow menu.\r\n */\r\n ifRoom = 0,\r\n /**\r\n * Never place this item in the NavBar.\r\n * The item would always be shown in NavBar's overflow menu.\r\n */\r\n overflowOnly = 1,\r\n }\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 = 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 * Whether the menu item is selected or not\r\n */\r\n public selected = false;\r\n /**\r\n * The Display Mode of the menu item.\r\n * Default Behaviour would be DisplayMode.ifRoom if null.\r\n * Refer {@link DisplayMode}\r\n */\r\n public displayMode?: DisplayMode;\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 let actionMenuItemPressHandler: (id: string) => boolean;\r\n let viewConfigItemPressHandler: (id: string) => boolean;\r\n\r\n export function initialize(): void {\r\n registerHandler('navBarMenuItemPress', handleNavBarMenuItemPress, false);\r\n registerHandler('actionMenuItemPress', handleActionMenuItemPress, false);\r\n registerHandler('setModuleView', handleViewConfigItemPress, false);\r\n }\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 sendMessageToParent('setUpViews', [viewConfig]);\r\n }\r\n function handleViewConfigItemPress(id: string): void {\r\n if (!viewConfigItemPressHandler || !viewConfigItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageToParent('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 sendMessageToParent('setNavBarMenu', [items]);\r\n }\r\n function handleNavBarMenuItemPress(id: string): void {\r\n if (!navBarMenuItemPressHandler || !navBarMenuItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageToParent('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 sendMessageToParent('showActionMenu', [params]);\r\n }\r\n function handleActionMenuItemPress(id: string): void {\r\n if (!actionMenuItemPressHandler || !actionMenuItemPressHandler(id)) {\r\n ensureInitialized();\r\n sendMessageToParent('handleActionMenuItemPress', [id]);\r\n }\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\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 sendMessageToParent('messageForChild', [message], 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 registerHandler('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 sendMessageToParent('messageForParent', [message], 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 registerHandler('messageForChild', listener);\r\n }\r\n }\r\n}\r\n","import { GlobalVars } from '../internal/globalVars';\r\nimport { SdkError, ErrorCode } from './interfaces';\r\nimport { ensureInitialized, isAPISupportedByPlatform, isApiSupportedOnMobile } from '../internal/internalAPIs';\r\nimport { FrameContexts, HostClientType } from './constants';\r\nimport { generateGUID } from '../internal/utils';\r\nimport {\r\n createFile,\r\n decodeAttachment,\r\n validateSelectMediaInputs,\r\n validateGetMediaInputs,\r\n validateViewImagesInput,\r\n validateScanBarCodeInput,\r\n isMediaCallSupportedOnMobile,\r\n isVideoControllerRegistered,\r\n} from '../internal/mediaUtil';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler, removeHandler } from '../internal/handlers';\r\nimport {\r\n captureImageMobileSupportVersion,\r\n mediaAPISupportVersion,\r\n getMediaCallbackSupportVersion,\r\n scanBarCodeAPIMobileSupportVersion,\r\n nonFullScreenVideoModeAPISupportVersion,\r\n} from '../internal/constants';\r\n\r\nexport namespace media {\r\n /**\r\n * Enum for file formats supported\r\n */\r\n export enum FileFormat {\r\n Base64 = 'base64',\r\n ID = 'id',\r\n }\r\n\r\n /**\r\n * File object that can be used to represent image or video or audio\r\n */\r\n export class File {\r\n /**\r\n * Content of the file. When format is Base64, this is the base64 content\r\n * When format is ID, this is id mapping to the URI\r\n * When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.\r\n */\r\n public content: string;\r\n\r\n /**\r\n * Format of the content\r\n */\r\n public format: FileFormat;\r\n\r\n /**\r\n * Size of the file in KB\r\n */\r\n public size: number;\r\n\r\n /**\r\n * MIME type. This can be used for constructing a dataUrl, if needed.\r\n */\r\n public mimeType: string;\r\n\r\n /**\r\n * Optional: Name of the file\r\n */\r\n public name?: string;\r\n }\r\n\r\n /**\r\n * Launch camera, capture image or choose image from gallery and return the images as a File[] object to the callback.\r\n * Callback will be called with an error, if there are any. App should first check the error.\r\n * If it is present the user can be updated with appropriate error message.\r\n * If error is null or undefined, then files will have the required result.\r\n * Note: Currently we support getting one File through this API, i.e. the file arrays size will be one.\r\n * Note: For desktop, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.\r\n * @see File\r\n * @see SdkError\r\n */\r\n export function captureImage(callback: (error: SdkError, files: File[]) => void): void {\r\n if (!callback) {\r\n throw new Error('[captureImage] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (!GlobalVars.isFramelessWindow) {\r\n const notSupportedError: SdkError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };\r\n callback(notSupportedError, undefined);\r\n return;\r\n }\r\n\r\n if (!isAPISupportedByPlatform(captureImageMobileSupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, undefined);\r\n return;\r\n }\r\n\r\n sendMessageToParent('captureImage', callback);\r\n }\r\n\r\n /**\r\n * Media object returned by the select Media API\r\n */\r\n export class Media extends File {\r\n constructor(that: Media = null) {\r\n super();\r\n if (that) {\r\n this.content = that.content;\r\n this.format = that.format;\r\n this.mimeType = that.mimeType;\r\n this.name = that.name;\r\n this.preview = that.preview;\r\n this.size = that.size;\r\n }\r\n }\r\n\r\n /**\r\n * A preview of the file which is a lightweight representation.\r\n * In case of images this will be a thumbnail/compressed image in base64 encoding.\r\n */\r\n public preview: string;\r\n\r\n /**\r\n * Gets the media in chunks irrespecitve of size, these chunks are assembled and sent back to the webapp as file/blob\r\n * @param callback returns blob of media\r\n */\r\n public getMedia(callback: (error: SdkError, blob: Blob) => void): void {\r\n if (!callback) {\r\n throw new Error('[get Media] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n if (!isAPISupportedByPlatform(mediaAPISupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, null);\r\n return;\r\n }\r\n if (!validateGetMediaInputs(this.mimeType, this.format, this.content)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, null);\r\n return;\r\n }\r\n // Call the new get media implementation via callbacks if the client version is greater than or equal to '2.0.0'\r\n if (isAPISupportedByPlatform(getMediaCallbackSupportVersion)) {\r\n this.getMediaViaCallback(callback);\r\n } else {\r\n this.getMediaViaHandler(callback);\r\n }\r\n }\r\n\r\n private getMediaViaCallback(callback: (error: SdkError, blob: Blob) => void): void {\r\n const helper: MediaHelper = {\r\n mediaMimeType: this.mimeType,\r\n assembleAttachment: [],\r\n };\r\n const localUriId = [this.content];\r\n function handleGetMediaCallbackRequest(mediaResult: MediaResult): void {\r\n if (callback) {\r\n if (mediaResult && mediaResult.error) {\r\n callback(mediaResult.error, null);\r\n } else {\r\n if (mediaResult && mediaResult.mediaChunk) {\r\n // If the chunksequence number is less than equal to 0 implies EOF\r\n // create file/blob when all chunks have arrived and we get 0/-1 as chunksequence number\r\n if (mediaResult.mediaChunk.chunkSequence <= 0) {\r\n const file = createFile(helper.assembleAttachment, helper.mediaMimeType);\r\n callback(mediaResult.error, file);\r\n } else {\r\n // Keep pushing chunks into assemble attachment\r\n const assemble: AssembleAttachment = decodeAttachment(mediaResult.mediaChunk, helper.mediaMimeType);\r\n helper.assembleAttachment.push(assemble);\r\n }\r\n } else {\r\n callback({ errorCode: ErrorCode.INTERNAL_ERROR, message: 'data received is null' }, null);\r\n }\r\n }\r\n }\r\n }\r\n sendMessageToParent('getMedia', localUriId, handleGetMediaCallbackRequest);\r\n }\r\n\r\n private getMediaViaHandler(callback: (error: SdkError, blob: Blob) => void): void {\r\n const actionName = generateGUID();\r\n const helper: MediaHelper = {\r\n mediaMimeType: this.mimeType,\r\n assembleAttachment: [],\r\n };\r\n const params = [actionName, this.content];\r\n this.content && callback && sendMessageToParent('getMedia', params);\r\n function handleGetMediaRequest(response: string): void {\r\n if (callback) {\r\n const mediaResult: MediaResult = JSON.parse(response);\r\n if (mediaResult.error) {\r\n callback(mediaResult.error, null);\r\n removeHandler('getMedia' + actionName);\r\n } else {\r\n if (mediaResult.mediaChunk) {\r\n // If the chunksequence number is less than equal to 0 implies EOF\r\n // create file/blob when all chunks have arrived and we get 0/-1 as chunksequence number\r\n if (mediaResult.mediaChunk.chunkSequence <= 0) {\r\n const file = createFile(helper.assembleAttachment, helper.mediaMimeType);\r\n callback(mediaResult.error, file);\r\n removeHandler('getMedia' + actionName);\r\n } else {\r\n // Keep pushing chunks into assemble attachment\r\n const assemble: AssembleAttachment = decodeAttachment(mediaResult.mediaChunk, helper.mediaMimeType);\r\n helper.assembleAttachment.push(assemble);\r\n }\r\n } else {\r\n callback({ errorCode: ErrorCode.INTERNAL_ERROR, message: 'data received is null' }, null);\r\n removeHandler('getMedia' + actionName);\r\n }\r\n }\r\n }\r\n }\r\n\r\n registerHandler('getMedia' + actionName, handleGetMediaRequest);\r\n }\r\n }\r\n\r\n /**\r\n * Input parameter supplied to the select Media API\r\n */\r\n export interface MediaInputs {\r\n /**\r\n * Only one media type can be selected at a time\r\n */\r\n mediaType: MediaType;\r\n\r\n /**\r\n * max limit of media allowed to be selected in one go, current max limit is 10 set by office lens.\r\n */\r\n maxMediaCount: number;\r\n\r\n /**\r\n * Additional properties for customization of select media - Image in mobile devices\r\n */\r\n imageProps?: ImageProps;\r\n\r\n /**\r\n * Additional properties for customization of select media - Video in mobile devices\r\n */\r\n videoProps?: VideoProps;\r\n\r\n /**\r\n * Additional properties for customization of select media - VideoAndImage in mobile devices\r\n */\r\n videoAndImageProps?: VideoAndImageProps;\r\n\r\n /**\r\n * Additional properties for audio capture flows.\r\n */\r\n audioProps?: AudioProps;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * All properties common to Image and Video Props\r\n */\r\n interface MediaProps {\r\n /**\r\n * Optional; Lets the developer specify the media source, more than one can be specified.\r\n * Default value is both camera and gallery\r\n */\r\n sources?: Source[];\r\n\r\n /**\r\n * Optional; Specify in which mode the camera will be opened.\r\n * Default value is Photo\r\n */\r\n startMode?: CameraStartMode;\r\n\r\n /**\r\n * Optional; indicate if user is allowed to move between front and back camera\r\n * Default value is true\r\n */\r\n cameraSwitcher?: boolean;\r\n }\r\n\r\n /**\r\n * All properties in ImageProps are optional and have default values in the platform\r\n */\r\n export interface ImageProps extends MediaProps {\r\n /**\r\n * Optional; indicate if inking on the selected Image is allowed or not\r\n * Default value is true\r\n */\r\n ink?: boolean;\r\n\r\n /**\r\n * Optional; indicate if putting text stickers on the selected Image is allowed or not\r\n * Default value is true\r\n */\r\n textSticker?: boolean;\r\n\r\n /**\r\n * Optional; indicate if image filtering mode is enabled on the selected image\r\n * Default value is false\r\n */\r\n enableFilter?: boolean;\r\n\r\n /**\r\n * Optional; Lets the developer specify the image output formats, more than one can be specified.\r\n * Default value is Image.\r\n */\r\n imageOutputFormats?: ImageOutputFormats[];\r\n }\r\n\r\n /**\r\n * All properties in VideoProps are optional and have default values in the platform\r\n */\r\n export interface VideoProps extends MediaProps {\r\n /**\r\n * Optional; the maximum duration in seconds after which the recording should terminate automatically.\r\n * Default value is defined by the platform serving the API.\r\n */\r\n maxDuration?: number;\r\n\r\n /**\r\n * Optional; to determine if the video capturing flow needs to be launched\r\n * in Full Screen Mode (Lens implementation) or PictureInPicture Mode (Native implementation).\r\n * Default value is true, indicating video will always launch in Full Screen Mode via lens.\r\n */\r\n isFullScreenMode?: boolean;\r\n\r\n /**\r\n * Optional; controls the visibility of stop button in PictureInPicture Mode.\r\n * Default value is true, indicating the user will be able to stop the video.\r\n */\r\n isStopButtonVisible?: boolean;\r\n\r\n /**\r\n * Optional; setting VideoController will register your app to listen to the lifecycle events during the video capture flow.\r\n * Your app can also dynamically control the experience while capturing the video by notifying the host client.\r\n */\r\n videoController?: VideoController;\r\n }\r\n\r\n /**\r\n * All properties in VideoAndImageProps are optional and have default values in the platform\r\n */\r\n export interface VideoAndImageProps extends ImageProps, VideoProps {}\r\n\r\n /**\r\n * All properties in AudioProps are optional and have default values in the platform\r\n */\r\n export interface AudioProps {\r\n /**\r\n * Optional; the maximum duration in minutes after which the recording should terminate automatically\r\n * Default value is defined by the platform serving the API.\r\n */\r\n maxDuration?: number;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Base class which holds the callback and notifies events to the host client\r\n */\r\n abstract class MediaController<T> {\r\n protected controllerCallback: T;\r\n\r\n public constructor(controllerCallback?: T) {\r\n this.controllerCallback = controllerCallback;\r\n }\r\n\r\n protected abstract getMediaType(): MediaType;\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * This function will be implemented by the respective media class which holds the logic\r\n * of specific events that needs to be notified to the app.\r\n * @param mediaEvent indicates the event signed by the host client to the app\r\n */\r\n protected abstract notifyEventToApp(mediaEvent: MediaControllerEvent): void;\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Function to notify the host client to programatically control the experience\r\n * @param mediaEvent indicates what the event that needs to be signaled to the host client\r\n * Optional; @param callback is used to send app if host client has successfully handled the notification event or not\r\n */\r\n protected notifyEventToHost(mediaEvent: MediaControllerEvent, callback?: (err?: SdkError) => void): void {\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n const err = isApiSupportedOnMobile(nonFullScreenVideoModeAPISupportVersion);\r\n if (err) {\r\n if (callback) {\r\n callback(err);\r\n }\r\n return;\r\n }\r\n\r\n const params: MediaControllerParam = { mediaType: this.getMediaType(), mediaControllerEvent: mediaEvent };\r\n sendMessageToParent('media.controller', [params], (err?: SdkError) => {\r\n if (callback) {\r\n callback(err);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Function to programatically stop the ongoing media event\r\n * Optional; @param callback is used to send app if host client has successfully stopped the event or not\r\n */\r\n public stop(callback?: (err?: SdkError) => void): void {\r\n this.notifyEventToHost(MediaControllerEvent.StopRecording, callback);\r\n }\r\n }\r\n\r\n /**\r\n * Callback which will register your app to listen to lifecycle events during the video capture flow\r\n */\r\n export interface VideoControllerCallback {\r\n onRecordingStarted?(): void;\r\n }\r\n\r\n /**\r\n * VideoController class is used to communicate between the app and the host client during the video capture flow\r\n */\r\n export class VideoController extends MediaController<VideoControllerCallback> {\r\n protected getMediaType(): MediaType {\r\n return MediaType.Video;\r\n }\r\n\r\n public notifyEventToApp(mediaEvent: MediaControllerEvent): void {\r\n if (!this.controllerCallback) {\r\n // Early return as app has not registered with the callback\r\n return;\r\n }\r\n\r\n switch (mediaEvent) {\r\n case MediaControllerEvent.StartRecording:\r\n if (this.controllerCallback.onRecordingStarted) {\r\n this.controllerCallback.onRecordingStarted();\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Events which are used to communicate between the app and the host client during the media recording flow\r\n */\r\n enum MediaControllerEvent {\r\n StartRecording = 1,\r\n StopRecording = 2,\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Interface with relevant info to send communication from the app to the host client\r\n */\r\n interface MediaControllerParam {\r\n /**\r\n * List of team information\r\n */\r\n mediaType: media.MediaType;\r\n\r\n /**\r\n * List of team information\r\n */\r\n mediaControllerEvent: MediaControllerEvent;\r\n }\r\n\r\n /**\r\n * The modes in which camera can be launched in select Media API\r\n */\r\n export enum CameraStartMode {\r\n Photo = 1,\r\n Document = 2,\r\n Whiteboard = 3,\r\n BusinessCard = 4,\r\n }\r\n\r\n /**\r\n * Specifies the image source\r\n */\r\n export enum Source {\r\n Camera = 1,\r\n Gallery = 2,\r\n }\r\n\r\n /**\r\n * Specifies the type of Media\r\n */\r\n export enum MediaType {\r\n Image = 1,\r\n Video = 2,\r\n VideoAndImage = 3,\r\n Audio = 4,\r\n }\r\n\r\n /**\r\n * Input for view images API\r\n */\r\n export interface ImageUri {\r\n value: string;\r\n type: ImageUriType;\r\n }\r\n\r\n /**\r\n * ID contains a mapping for content uri on platform's side, URL is generic\r\n */\r\n export enum ImageUriType {\r\n ID = 1,\r\n URL = 2,\r\n }\r\n\r\n /**\r\n * Specifies the image output formats.\r\n */\r\n export enum ImageOutputFormats {\r\n IMAGE = 1,\r\n PDF = 2,\r\n }\r\n\r\n /**\r\n * Media chunks an output of getMedia API from platform\r\n */\r\n export interface MediaChunk {\r\n /**\r\n * Base 64 data for the requested uri\r\n */\r\n chunk: string;\r\n\r\n /**\r\n * chunk sequence number\r\n */\r\n chunkSequence: number;\r\n }\r\n\r\n /**\r\n * Output of getMedia API from platform\r\n */\r\n interface MediaResult {\r\n /**\r\n * error encountered in getMedia API\r\n */\r\n error: SdkError;\r\n\r\n /**\r\n * Media chunk which will be assemebled and converted into a blob\r\n */\r\n mediaChunk: MediaChunk;\r\n }\r\n\r\n /**\r\n * Helper object to assembled media chunks\r\n */\r\n export interface AssembleAttachment {\r\n sequence: number;\r\n file: Blob;\r\n }\r\n\r\n /**\r\n * Helper class for assembling media\r\n */\r\n interface MediaHelper {\r\n mediaMimeType: string;\r\n assembleAttachment: AssembleAttachment[];\r\n }\r\n\r\n /**\r\n * Select an attachment using camera/gallery\r\n * @param mediaInputs The input params to customize the media to be selected\r\n * @param callback The callback to invoke after fetching the media\r\n */\r\n export function selectMedia(\r\n mediaInputs: MediaInputs,\r\n callback: (error: SdkError, attachments: Media[]) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[select Media] Callback cannot be null');\r\n }\r\n\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n if (!isAPISupportedByPlatform(mediaAPISupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, null);\r\n return;\r\n }\r\n\r\n const err = isMediaCallSupportedOnMobile(mediaInputs);\r\n if (err) {\r\n callback(err, null);\r\n return;\r\n }\r\n\r\n if (!validateSelectMediaInputs(mediaInputs)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, null);\r\n return;\r\n }\r\n\r\n const params = [mediaInputs];\r\n // What comes back from native as attachments would just be objects and will be missing getMedia method on them\r\n sendMessageToParent(\r\n 'selectMedia',\r\n params,\r\n (err: SdkError, localAttachments?: Media[], mediaEvent?: MediaControllerEvent) => {\r\n // MediaControllerEvent response is used to notify the app about events and is a partial response to selectMedia\r\n if (mediaEvent) {\r\n if (isVideoControllerRegistered(mediaInputs)) {\r\n mediaInputs.videoProps.videoController.notifyEventToApp(mediaEvent);\r\n }\r\n return;\r\n }\r\n\r\n // Media Attachments are final response to selectMedia\r\n if (!localAttachments) {\r\n callback(err, null);\r\n return;\r\n }\r\n\r\n const mediaArray: Media[] = [];\r\n for (const attachment of localAttachments) {\r\n mediaArray.push(new Media(attachment));\r\n }\r\n callback(err, mediaArray);\r\n },\r\n );\r\n }\r\n\r\n /**\r\n * View images using native image viewer\r\n * @param uriList urilist of images to be viewed - can be content uri or server url. supports upto 10 Images in one go\r\n * @param callback returns back error if encountered, returns null in case of success\r\n */\r\n export function viewImages(uriList: ImageUri[], callback: (error?: SdkError) => void): void {\r\n if (!callback) {\r\n throw new Error('[view images] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (!isAPISupportedByPlatform(mediaAPISupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError);\r\n return;\r\n }\r\n if (!validateViewImagesInput(uriList)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput);\r\n return;\r\n }\r\n\r\n const params = [uriList];\r\n sendMessageToParent('viewImages', params, callback);\r\n }\r\n\r\n /**\r\n * Barcode configuration supplied to scanBarCode API to customize barcode scanning experience in mobile\r\n * All properties in BarCodeConfig are optional and have default values in the platform\r\n */\r\n export interface BarCodeConfig {\r\n /**\r\n * Optional; Lets the developer specify the scan timeout interval in seconds\r\n * Default value is 30 seconds and max allowed value is 60 seconds\r\n */\r\n timeOutIntervalInSec?: number;\r\n }\r\n\r\n /**\r\n * Scan Barcode/QRcode using camera\r\n * Note: For desktop and web, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.\r\n * @param callback callback to invoke after scanning the barcode\r\n * @param config optional input configuration to customize the barcode scanning experience\r\n */\r\n export function scanBarCode(callback: (error: SdkError, decodedText: string) => void, config?: BarCodeConfig): void {\r\n if (!callback) {\r\n throw new Error('[media.scanBarCode] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (\r\n GlobalVars.hostClientType === HostClientType.desktop ||\r\n GlobalVars.hostClientType === HostClientType.web ||\r\n GlobalVars.hostClientType === HostClientType.rigel ||\r\n GlobalVars.hostClientType === HostClientType.teamsRoomsWindows ||\r\n GlobalVars.hostClientType === HostClientType.teamsRoomsAndroid ||\r\n GlobalVars.hostClientType === HostClientType.teamsPhones ||\r\n GlobalVars.hostClientType === HostClientType.teamsDisplays\r\n ) {\r\n const notSupportedError: SdkError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };\r\n callback(notSupportedError, null);\r\n return;\r\n }\r\n\r\n if (!isAPISupportedByPlatform(scanBarCodeAPIMobileSupportVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, null);\r\n return;\r\n }\r\n\r\n if (!validateScanBarCodeInput(config)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, null);\r\n return;\r\n }\r\n\r\n sendMessageToParent('media.scanBarCode', [config], callback);\r\n }\r\n}\r\n","import { people } from '../public/people';\r\nimport { media } from '../public/media';\r\nimport { SdkError } from '../public/interfaces';\r\nimport {\r\n videoAndImageMediaAPISupportVersion,\r\n nonFullScreenVideoModeAPISupportVersion,\r\n imageOutputFormatsAPISupportVersion,\r\n} from './constants';\r\nimport { isApiSupportedOnMobile } from './internalAPIs';\r\n\r\n/**\r\n * Helper function to create a blob from media chunks based on their sequence\r\n */\r\nexport function createFile(assembleAttachment: media.AssembleAttachment[], mimeType: string): Blob {\r\n if (assembleAttachment == null || mimeType == null || assembleAttachment.length <= 0) {\r\n return null;\r\n }\r\n let file: Blob;\r\n let sequence = 1;\r\n assembleAttachment.sort((a, b) => (a.sequence > b.sequence ? 1 : -1));\r\n assembleAttachment.forEach(item => {\r\n if (item.sequence == sequence) {\r\n if (file) {\r\n file = new Blob([file, item.file], { type: mimeType });\r\n } else {\r\n file = new Blob([item.file], { type: mimeType });\r\n }\r\n sequence++;\r\n }\r\n });\r\n return file;\r\n}\r\n\r\n/**\r\n * Helper function to convert Media chunks into another object type which can be later assemebled\r\n * Converts base 64 encoded string to byte array and then into an array of blobs\r\n */\r\nexport function decodeAttachment(attachment: media.MediaChunk, mimeType: string): media.AssembleAttachment {\r\n if (attachment == null || mimeType == null) {\r\n return null;\r\n }\r\n const decoded = atob(attachment.chunk);\r\n const byteNumbers = new Array(decoded.length);\r\n for (let i = 0; i < decoded.length; i++) {\r\n byteNumbers[i] = decoded.charCodeAt(i);\r\n }\r\n const byteArray = new Uint8Array(byteNumbers);\r\n const blob: Blob = new Blob([byteArray], { type: mimeType });\r\n const assemble: media.AssembleAttachment = {\r\n sequence: attachment.chunkSequence,\r\n file: blob,\r\n };\r\n return assemble;\r\n}\r\n\r\n/**\r\n * Function returns null if the media call is supported on current mobile version, else SdkError.\r\n */\r\nexport function isMediaCallSupportedOnMobile(mediaInputs: media.MediaInputs): SdkError {\r\n if (isMediaCallForVideoAndImageInputs(mediaInputs)) {\r\n return isApiSupportedOnMobile(videoAndImageMediaAPISupportVersion);\r\n } else if (isMediaCallForNonFullScreenVideoMode(mediaInputs)) {\r\n return isApiSupportedOnMobile(nonFullScreenVideoModeAPISupportVersion);\r\n } else if (isMediaCallForImageOutputFormats(mediaInputs)) {\r\n return isApiSupportedOnMobile(imageOutputFormatsAPISupportVersion);\r\n }\r\n return null;\r\n}\r\n\r\n/**\r\n * Function returns true if the app has registered to listen to video controller events, else false.\r\n */\r\nexport function isVideoControllerRegistered(mediaInputs: media.MediaInputs): boolean {\r\n if (\r\n mediaInputs.mediaType == media.MediaType.Video &&\r\n mediaInputs.videoProps &&\r\n mediaInputs.videoProps.videoController\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns true if the mediaInput params are valid and false otherwise\r\n */\r\nexport function validateSelectMediaInputs(mediaInputs: media.MediaInputs): boolean {\r\n if (mediaInputs == null || mediaInputs.maxMediaCount > 10) {\r\n return false;\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Returns true if the mediaInput params are called for mediatype Image and contains Image outputs formats, false otherwise\r\n */\r\nexport function isMediaCallForImageOutputFormats(mediaInputs: media.MediaInputs): boolean {\r\n if (mediaInputs?.mediaType == media.MediaType.Image && mediaInputs?.imageProps?.imageOutputFormats) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns true if the mediaInput params are called for mediatype VideoAndImage and false otherwise\r\n */\r\nexport function isMediaCallForVideoAndImageInputs(mediaInputs: media.MediaInputs): boolean {\r\n if (mediaInputs && (mediaInputs.mediaType == media.MediaType.VideoAndImage || mediaInputs.videoAndImageProps)) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns true if the mediaInput params are called for non-full screen video mode and false otherwise\r\n */\r\nexport function isMediaCallForNonFullScreenVideoMode(mediaInputs: media.MediaInputs): boolean {\r\n if (\r\n mediaInputs &&\r\n mediaInputs.mediaType == media.MediaType.Video &&\r\n mediaInputs.videoProps &&\r\n !mediaInputs.videoProps.isFullScreenMode\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n}\r\n\r\n/**\r\n * Returns true if the get Media params are valid and false otherwise\r\n */\r\nexport function validateGetMediaInputs(mimeType: string, format: media.FileFormat, content: string): boolean {\r\n if (mimeType == null || format == null || format != media.FileFormat.ID || content == null) {\r\n return false;\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Returns true if the view images param is valid and false otherwise\r\n */\r\nexport function validateViewImagesInput(uriList: media.ImageUri[]): boolean {\r\n if (uriList == null || uriList.length <= 0 || uriList.length > 10) {\r\n return false;\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Returns true if the scan barcode param is valid and false otherwise\r\n */\r\nexport function validateScanBarCodeInput(barCodeConfig: media.BarCodeConfig): boolean {\r\n if (barCodeConfig) {\r\n if (\r\n barCodeConfig.timeOutIntervalInSec === null ||\r\n barCodeConfig.timeOutIntervalInSec <= 0 ||\r\n barCodeConfig.timeOutIntervalInSec > 60\r\n ) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Returns true if the people picker params are valid and false otherwise\r\n */\r\nexport function validatePeoplePickerInput(peoplePickerInputs: people.PeoplePickerInputs): boolean {\r\n if (peoplePickerInputs) {\r\n if (peoplePickerInputs.title) {\r\n if (typeof peoplePickerInputs.title !== 'string') {\r\n return false;\r\n }\r\n }\r\n\r\n if (peoplePickerInputs.setSelected) {\r\n if (typeof peoplePickerInputs.setSelected !== 'object') {\r\n return false;\r\n }\r\n }\r\n\r\n if (peoplePickerInputs.openOrgWideSearchInChatOrChannel) {\r\n if (typeof peoplePickerInputs.openOrgWideSearchInChatOrChannel !== 'boolean') {\r\n return false;\r\n }\r\n }\r\n if (peoplePickerInputs.singleSelect) {\r\n if (typeof peoplePickerInputs.singleSelect !== 'boolean') {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n}\r\n","export * from './private/index';\r\nexport * from './public/index';\r\n","export { bot } from './bot';\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 ViewerActionTypes,\r\n UserSettingTypes,\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 registerUserSettingsChangeHandler,\r\n} from './privateAPIs';\r\nexport { conversations } from './conversations';\r\nexport { meetingRoom } from './meetingRoom';\r\nexport { remoteCamera } from './remoteCamera';\r\nexport { files } from './files';\r\nexport { appEntity } from './appEntity';\r\nexport { teams } from './teams';\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } 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 sendMessageToParent('bot.executeQuery', [botRequest], (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 sendMessageToParent('bot.getSupportedCommands', (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 sendMessageToParent('bot.authenticate', [authRequest], (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","var v1 = require('./v1');\nvar v4 = require('./v4');\n\nvar uuid = v4;\nuuid.v1 = v1;\nuuid.v4 = v4;\n\nmodule.exports = uuid;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\nvar _clockseq;\n\n// Previous uuid creation time\nvar _lastMSecs = 0;\nvar _lastNSecs = 0;\n\n// See https://github.com/uuidjs/uuid for API details\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || [];\n\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;\n\n // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n if (node == null || clockseq == null) {\n var seedBytes = rng();\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [\n seedBytes[0] | 0x01,\n seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]\n ];\n }\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n }\n\n // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();\n\n // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;\n\n // Time since last uuid creation (in msecs)\n var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;\n\n // Per 4.2.1.2, Bump clockseq on clock regression\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n }\n\n // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n }\n\n // Per 4.2.1.2 Throw error if too many uuids are requested\n if (nsecs >= 10000) {\n throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq;\n\n // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n msecs += 12219292800000;\n\n // `time_low`\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff;\n\n // `time_mid`\n var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff;\n\n // `time_high_and_version`\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n b[i++] = tmh >>> 16 & 0xff;\n\n // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n b[i++] = clockseq >>> 8 | 0x80;\n\n // `clock_seq_low`\n b[i++] = clockseq & 0xff;\n\n // `node`\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf ? buf : bytesToUuid(b);\n}\n\nmodule.exports = v1;\n","var rng = require('./lib/rng');\nvar bytesToUuid = require('./lib/bytesToUuid');\n\nfunction v4(options, buf, offset) {\n var i = buf && offset || 0;\n\n if (typeof(options) == 'string') {\n buf = options === 'binary' ? new Array(16) : null;\n options = null;\n }\n options = options || {};\n\n var rnds = options.random || (options.rng || rng)();\n\n // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n\n // Copy bytes to buffer, if provided\n if (buf) {\n for (var ii = 0; ii < 16; ++ii) {\n buf[i + ii] = rnds[ii];\n }\n }\n\n return buf || bytesToUuid(rnds);\n}\n\nmodule.exports = v4;\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { version } from '../internal/constants';\r\nimport { sendMessageToParent } from '../internal/communication';\r\n\r\nexport namespace appInitialization {\r\n export const Messages = {\r\n AppLoaded: 'appInitialization.appLoaded',\r\n Success: 'appInitialization.success',\r\n Failure: 'appInitialization.failure',\r\n ExpectedFailure: 'appInitialization.expectedFailure',\r\n };\r\n\r\n export enum FailedReason {\r\n AuthFailed = 'AuthFailed',\r\n Timeout = 'Timeout',\r\n Other = 'Other',\r\n }\r\n\r\n export enum ExpectedFailureReason {\r\n PermissionError = 'PermissionError',\r\n NotFound = 'NotFound',\r\n Throttling = 'Throttling',\r\n Offline = 'Offline',\r\n Other = 'Other',\r\n }\r\n\r\n export interface IFailedRequest {\r\n reason: FailedReason;\r\n message?: string;\r\n }\r\n\r\n export interface IExpectedFailureRequest {\r\n reason: ExpectedFailureReason;\r\n message?: string;\r\n }\r\n\r\n /**\r\n * Notifies the frame that app has loaded and to hide the loading indicator if one is shown.\r\n */\r\n export function notifyAppLoaded(): void {\r\n ensureInitialized();\r\n sendMessageToParent(Messages.AppLoaded, [version]);\r\n }\r\n\r\n /**\r\n * Notifies the frame that app initialization is successful and is ready for user interaction.\r\n */\r\n export function notifySuccess(): void {\r\n ensureInitialized();\r\n sendMessageToParent(Messages.Success, [version]);\r\n }\r\n\r\n /**\r\n * Notifies the frame that app initialization has failed and to show an error page in its place.\r\n */\r\n export function notifyFailure(appInitializationFailedRequest: IFailedRequest): void {\r\n ensureInitialized();\r\n sendMessageToParent(Messages.Failure, [\r\n appInitializationFailedRequest.reason,\r\n appInitializationFailedRequest.message,\r\n ]);\r\n }\r\n\r\n /**\r\n * Notifies the frame that app initialized with some expected errors.\r\n */\r\n export function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void {\r\n ensureInitialized();\r\n sendMessageToParent(Messages.ExpectedFailure, [expectedFailureRequest.reason, expectedFailureRequest.message]);\r\n }\r\n}\r\n","import { ensureInitialized, processAdditionalValidOrigins } from '../internal/internalAPIs';\r\nimport { GlobalVars } from '../internal/globalVars';\r\nimport { defaultSDKVersionForCompatCheck } from '../internal/constants';\r\nimport { settings } from './settings';\r\nimport {\r\n TabInformation,\r\n TabInstanceParameters,\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\nimport { FrameContexts } from './constants';\r\nimport {\r\n Communication,\r\n initializeCommunication,\r\n sendMessageToParent,\r\n uninitializeCommunication,\r\n} from '../internal/communication';\r\nimport { authentication } from './authentication';\r\nimport { initializePrivateApis } from '../private/privateAPIs';\r\nimport { menus } from './menus';\r\nimport * as Handlers from '../internal/handlers'; // Conflict with some names\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 Handlers.initializeHandlers();\r\n initializeCommunication(\r\n (\r\n context: FrameContexts,\r\n clientType: string,\r\n clientSupportedSDKVersion: string = defaultSDKVersionForCompatCheck,\r\n ) => {\r\n GlobalVars.frameContext = context;\r\n GlobalVars.hostClientType = clientType;\r\n GlobalVars.clientSupportedSDKVersion = clientSupportedSDKVersion;\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 validMessageOrigins,\r\n );\r\n\r\n authentication.initialize();\r\n settings.initialize();\r\n menus.initialize();\r\n initializePrivateApis();\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 Communication.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 //used to clear state between unit tests\r\n\r\n if (!GlobalVars.initializeCalled) {\r\n return;\r\n }\r\n if (GlobalVars.frameContext) {\r\n registerOnThemeChangeHandler(null);\r\n registerFullScreenHandler(null);\r\n registerBackButtonHandler(null);\r\n registerBeforeUnloadHandler(null);\r\n registerFocusEnterHandler(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 GlobalVars.initializeCalled = false;\r\n GlobalVars.initializeCompleted = false;\r\n GlobalVars.initializeCallbacks = [];\r\n GlobalVars.additionalValidOrigins = [];\r\n GlobalVars.frameContext = null;\r\n GlobalVars.hostClientType = null;\r\n GlobalVars.isFramelessWindow = false;\r\n\r\n uninitializeCommunication();\r\n}\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 sendMessageToParent('getContext', (context: Context) => {\r\n if (!context.frameContext) {\r\n // Fallback logic for frameContext properties\r\n context.frameContext = GlobalVars.frameContext;\r\n }\r\n callback(context);\r\n });\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 Handlers.registerOnThemeChangeHandler(handler);\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 Handlers.registerHandler('fullScreenChange', handler);\r\n}\r\n\r\n/**\r\n * Registers a handler for clicking the app button.\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 personal app button is clicked in the app bar.\r\n */\r\nexport function registerAppButtonClickHandler(handler: () => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n Handlers.registerHandler('appButtonClick', handler);\r\n}\r\n\r\n/**\r\n * Registers a handler for entering hover of the app button.\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 entering hover of the personal app button in the app bar.\r\n */\r\nexport function registerAppButtonHoverEnterHandler(handler: () => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n Handlers.registerHandler('appButtonHoverEnter', handler);\r\n}\r\n\r\n/**\r\n * Registers a handler for exiting hover of the app button.\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 exiting hover of the personal app button in the app bar.\r\n */\r\nexport function registerAppButtonHoverLeaveHandler(handler: () => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n Handlers.registerHandler('appButtonHoverLeave', handler);\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 Handlers.registerBackButtonHandler(handler);\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 Handlers.registerOnLoadHandler(handler);\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 Handlers.registerBeforeUnloadHandler(handler);\r\n}\r\n\r\n/**\r\n * @private\r\n * Registers a handler when focus needs to be passed from teams to the place of choice on app.\r\n * @param handler The handler to invoked by the app when they want the focus to be in the place of their choice.\r\n */\r\nexport function registerFocusEnterHandler(handler: (navigateForward: boolean) => void): void {\r\n ensureInitialized();\r\n Handlers.registerFocusEnterHandler(handler);\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 Handlers.registerHandler('changeSettings', handler);\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 sendMessageToParent('getTabInstances', [tabInstanceParameters], 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 sendMessageToParent('getMruTabInstances', [tabInstanceParameters], 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, FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n\r\n sendMessageToParent('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(\r\n FrameContexts.content,\r\n FrameContexts.sidePanel,\r\n FrameContexts.settings,\r\n FrameContexts.task,\r\n FrameContexts.stage,\r\n FrameContexts.meetingStage,\r\n );\r\n sendMessageToParent('executeDeepLink', [deepLink], onComplete ? onComplete : getGenericOnCompleteHandler());\r\n}\r\n\r\nexport function setFrameContext(frameContext: FrameContext): void {\r\n ensureInitialized(FrameContexts.content);\r\n sendMessageToParent('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 } from '../internal/internalAPIs';\r\nimport { getGenericOnCompleteHandler } from '../internal/utils';\r\nimport { TabInstance } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\nimport { sendMessageToParent } from '../internal/communication';\r\n\r\n/**\r\n * Navigation specific part of the SDK.\r\n */\r\n\r\n/**\r\n * Return focus to the main Teams app. Will focus search bar if navigating forward and app bar if navigating back.\r\n * @param navigateForward Determines the direction to focus in teams app.\r\n */\r\nexport function returnFocus(navigateForward?: boolean): void {\r\n ensureInitialized();\r\n\r\n sendMessageToParent('returnFocus', [navigateForward]);\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 errorMessage = 'Invalid internalTabInstanceId and/or channelId were/was provided';\r\n sendMessageToParent(\r\n 'navigateToTab',\r\n [tabInstance],\r\n onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage),\r\n );\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(\r\n FrameContexts.content,\r\n FrameContexts.sidePanel,\r\n FrameContexts.settings,\r\n FrameContexts.remove,\r\n FrameContexts.task,\r\n FrameContexts.stage,\r\n FrameContexts.meetingStage,\r\n );\r\n\r\n const errorMessage =\r\n 'Cross-origin navigation is only supported for URLs matching the pattern registered in the manifest.';\r\n sendMessageToParent(\r\n 'navigateCrossDomain',\r\n [url],\r\n onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage),\r\n );\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 errorMessage = 'Back navigation is not supported in the current client or context.';\r\n sendMessageToParent('navigateBack', [], onComplete ? onComplete : getGenericOnCompleteHandler(errorMessage));\r\n}\r\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { TaskInfo } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\nimport { IAppWindow, ChildAppWindow } from './appWindow';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\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, FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n\r\n sendMessageToParent('tasks.startTask', [taskInfo], 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.sidePanel, FrameContexts.task, FrameContexts.meetingStage);\r\n const { width, height, ...extra } = taskInfo;\r\n\r\n if (!Object.keys(extra).length) {\r\n sendMessageToParent('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.sidePanel, FrameContexts.task, FrameContexts.meetingStage);\r\n\r\n // Send tasks.completeTask instead of tasks.submitTask message for backward compatibility with Mobile clients\r\n sendMessageToParent('tasks.completeTask', [result, Array.isArray(appIds) ? appIds : [appIds]]);\r\n }\r\n}\r\n","import { SdkError, ErrorCode } from './interfaces';\r\nimport { ensureInitialized, isAPISupportedByPlatform } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { locationAPIsRequiredVersion } from '../internal/constants';\r\n\r\nexport namespace location {\r\n export interface LocationProps {\r\n /**\r\n whether user can alter location or not\r\n if false, user will be shown current location \r\n and wouldn't be allowed to alter it\r\n */\r\n allowChooseLocation: boolean;\r\n /**\r\n whether selected location should be shown to user on map or not.\r\n If allowChooseLocation is true, this parameter will be ignored by platform.\r\n If allowChooseLocation is false, and this parameter is not provided, default \r\n value will be false.\r\n */\r\n showMap?: boolean;\r\n }\r\n\r\n export interface Location {\r\n /**\r\n Latitude of the location\r\n */\r\n latitude: number;\r\n /**\r\n Longitude of the location\r\n */\r\n longitude: number;\r\n /**\r\n Accuracy of the coordinates captured\r\n */\r\n accuracy?: number;\r\n /**\r\n Time stamp when the location was captured\r\n */\r\n timestamp?: number;\r\n }\r\n\r\n /**\r\n * Fetches current user coordinates or allows user to choose location on map\r\n * @param callback Callback to invoke when current user location is fetched\r\n */\r\n export function getLocation(props: LocationProps, callback: (error: SdkError, location: Location) => void): void {\r\n if (!callback) {\r\n throw new Error('[location.getLocation] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (!isAPISupportedByPlatform(locationAPIsRequiredVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, undefined);\r\n return;\r\n }\r\n if (!props) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, undefined);\r\n return;\r\n }\r\n sendMessageToParent('location.getLocation', [props], callback);\r\n }\r\n\r\n /**\r\n * Shows the location on map corresponding to the given coordinates\r\n * @param location {@link Location} which needs to be shown on map\r\n * @param callback Callback to invoke when the location is opened on map\r\n */\r\n export function showLocation(location: Location, callback: (error: SdkError, status: boolean) => void): void {\r\n if (!callback) {\r\n throw new Error('[location.showLocation] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task);\r\n\r\n if (!isAPISupportedByPlatform(locationAPIsRequiredVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, undefined);\r\n return;\r\n }\r\n if (!location) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, undefined);\r\n return;\r\n }\r\n sendMessageToParent('location.showLocation', [location], callback);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\n\r\nexport namespace meeting {\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent a meeting details\r\n */\r\n export interface IMeetingDetailsResponse {\r\n /**\r\n * details object\r\n */\r\n details: IMeetingDetails | ICallDetails;\r\n /**\r\n * conversation object\r\n */\r\n conversation: IConversation;\r\n /**\r\n * organizer object\r\n */\r\n organizer: IOrganizer;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Base data structure to represent a meeting or call detail\r\n */\r\n export interface IMeetingOrCallDetailsBase<T> {\r\n /**\r\n * Scheduled start time of the meeting or start time of the call\r\n */\r\n scheduledStartTime: string;\r\n\r\n /**\r\n * url to join the current meeting or call\r\n */\r\n joinUrl?: string;\r\n\r\n /**\r\n * type of the meeting or call\r\n */\r\n type?: T;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent call details\r\n */\r\n export type ICallDetails = IMeetingOrCallDetailsBase<CallType>;\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent meeting details.\r\n */\r\n export interface IMeetingDetails extends IMeetingOrCallDetailsBase<MeetingType> {\r\n /**\r\n * Scheduled end time of the meeting\r\n */\r\n scheduledEndTime: string;\r\n /**\r\n * meeting title name of the meeting\r\n */\r\n title?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent a conversation object.\r\n */\r\n export interface IConversation {\r\n /**\r\n * conversation id of the meeting\r\n */\r\n id: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent an organizer object.\r\n */\r\n export interface IOrganizer {\r\n /**\r\n * organizer id of the meeting\r\n */\r\n id?: string;\r\n /**\r\n * tenant id of the meeting\r\n */\r\n tenantId?: string;\r\n }\r\n\r\n export interface LiveStreamState {\r\n /**\r\n * indicates whether meeting is streaming\r\n */\r\n isStreaming: boolean;\r\n\r\n /**\r\n * error object in case there is a failure\r\n */\r\n error?: {\r\n /** error code from the streaming service, e.g. IngestionFailure */\r\n code: string;\r\n /** detailed error message string */\r\n message?: string;\r\n };\r\n }\r\n\r\n export interface IAppContentStageSharingCapabilities {\r\n /**\r\n * indicates whether app has permission to share contents to meeting stage\r\n */\r\n doesAppHaveSharePermission: boolean;\r\n }\r\n\r\n export interface IAppContentStageSharingState {\r\n /**\r\n * indicates whether app is currently being shared to stage\r\n */\r\n isAppSharing: boolean;\r\n }\r\n export interface ISpeakingState {\r\n /**\r\n * Indicates whether one or more participants in a meeting are speaking, or\r\n * if no participants are speaking\r\n */\r\n isSpeakingDetected: boolean;\r\n }\r\n\r\n export enum MeetingType {\r\n Unknown = 'Unknown',\r\n Adhoc = 'Adhoc',\r\n Scheduled = 'Scheduled',\r\n Recurring = 'Recurring',\r\n Broadcast = 'Broadcast',\r\n MeetNow = 'MeetNow',\r\n }\r\n\r\n export enum CallType {\r\n OneOnOneCall = 'oneOnOneCall',\r\n GroupCall = 'groupCall',\r\n }\r\n\r\n /**\r\n * Allows an app to get the incoming audio speaker setting for the meeting user\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError, incase of an error, or null when fetch is successful\r\n * result can either contain the true/false value, incase of a successful fetch or null when the fetching fails\r\n * result: True means incoming audio is muted and false means incoming audio is unmuted\r\n */\r\n export function getIncomingClientAudioState(\r\n callback: (error: SdkError | null, result: boolean | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get incoming client audio state] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('getIncomingClientAudioState', callback);\r\n }\r\n\r\n /**\r\n * Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError, incase of an error, or null when toggle is successful\r\n * result can either contain the true/false value, incase of a successful toggle or null when the toggling fails\r\n * result: True means incoming audio is muted and false means incoming audio is unmuted\r\n */\r\n export function toggleIncomingClientAudio(callback: (error: SdkError | null, result: boolean | null) => void): void {\r\n if (!callback) {\r\n throw new Error('[toggle incoming client audio] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('toggleIncomingClientAudio', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Allows an app to get the meeting details for the meeting\r\n * @param callback Callback contains 2 parameters, error and meetingDetailsResponse.\r\n * error can either contain an error of type SdkError, incase of an error, or null when get is successful\r\n * result can either contain a IMeetingDetailsResponse value, incase of a successful get or null when the get fails\r\n */\r\n export function getMeetingDetails(\r\n callback: (error: SdkError | null, meetingDetails: IMeetingDetailsResponse | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get meeting details] Callback cannot be null');\r\n }\r\n ensureInitialized(\r\n FrameContexts.sidePanel,\r\n FrameContexts.meetingStage,\r\n FrameContexts.settings,\r\n FrameContexts.content,\r\n );\r\n sendMessageToParent('meeting.getMeetingDetails', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Allows an app to get the authentication token for the anonymous or guest user in the meeting\r\n * @param callback Callback contains 2 parameters, error and authenticationTokenOfAnonymousUser.\r\n * error can either contain an error of type SdkError, incase of an error, or null when get is successful\r\n * authenticationTokenOfAnonymousUser can either contain a string value, incase of a successful get or null when the get fails\r\n */\r\n export function getAuthenticationTokenForAnonymousUser(\r\n callback: (error: SdkError | null, authenticationTokenOfAnonymousUser: string | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get Authentication Token For AnonymousUser] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.getAuthenticationTokenForAnonymousUser', callback);\r\n }\r\n\r\n /**\r\n * Allows an app to get the state of the live stream in the current meeting\r\n * @param callback Callback contains 2 parameters: error and liveStreamState.\r\n * error can either contain an error of type SdkError, in case of an error, or null when get is successful\r\n * liveStreamState can either contain a LiveStreamState value, or null when operation fails\r\n */\r\n export function getLiveStreamState(\r\n callback: (error: SdkError | null, liveStreamState: LiveStreamState | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get live stream state] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('meeting.getLiveStreamState', callback);\r\n }\r\n\r\n /**\r\n * Allows an app to request the live streaming be started at the given streaming url\r\n * @param streamUrl the url to the stream resource\r\n * @param streamKey the key to the stream resource\r\n * @param callback Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful\r\n * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state\r\n */\r\n export function requestStartLiveStreaming(\r\n callback: (error: SdkError | null) => void,\r\n streamUrl: string,\r\n streamKey?: string,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[request start live streaming] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('meeting.requestStartLiveStreaming', [streamUrl, streamKey], callback);\r\n }\r\n\r\n /**\r\n * Allows an app to request the live streaming be stopped at the given streaming url\r\n * @param callback Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful\r\n * Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state\r\n */\r\n export function requestStopLiveStreaming(callback: (error: SdkError | null) => void): void {\r\n if (!callback) {\r\n throw new Error('[request stop live streaming] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('meeting.requestStopLiveStreaming', callback);\r\n }\r\n\r\n /**\r\n * Registers a handler for changes to the live stream.\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 live stream state changes\r\n */\r\n export function registerLiveStreamChangedHandler(handler: (liveStreamState: LiveStreamState) => void): void {\r\n if (!handler) {\r\n throw new Error('[register live stream changed handler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('meeting.liveStreamChanged', handler);\r\n }\r\n\r\n /**\r\n * Allows an app to share contents in the meeting\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError, incase of an error, or null when share is successful\r\n * result can either contain a true value, incase of a successful share or null when the share fails\r\n * @param appContentUrl is the input URL which needs to be shared on to the stage\r\n */\r\n export function shareAppContentToStage(\r\n callback: (error: SdkError | null, result: boolean | null) => void,\r\n appContentUrl: string,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[share app content to stage] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.shareAppContentToStage', [appContentUrl], callback);\r\n }\r\n\r\n /**\r\n * Provides information related app's in-meeting sharing capabilities\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError (error indication), or null (non-error indication)\r\n * appContentStageSharingCapabilities can either contain an IAppContentStageSharingCapabilities object\r\n * (indication of successful retrieval), or null (indication of failed retrieval)\r\n */\r\n export function getAppContentStageSharingCapabilities(\r\n callback: (\r\n error: SdkError | null,\r\n appContentStageSharingCapabilities: IAppContentStageSharingCapabilities | null,\r\n ) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get app content stage sharing capabilities] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.getAppContentStageSharingCapabilities', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Terminates current stage sharing session in meeting\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError (error indication), or null (non-error indication)\r\n * result can either contain a true boolean value (successful termination), or null (unsuccessful fetch)\r\n */\r\n export function stopSharingAppContentToStage(\r\n callback: (error: SdkError | null, result: boolean | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[stop sharing app content to stage] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.stopSharingAppContentToStage', callback);\r\n }\r\n\r\n /**\r\n * Provides information related to current stage sharing state for app\r\n * @param callback Callback contains 2 parameters, error and result.\r\n * error can either contain an error of type SdkError (error indication), or null (non-error indication)\r\n * appContentStageSharingState can either contain an IAppContentStageSharingState object\r\n * (indication of successful retrieval), or null (indication of failed retrieval)\r\n */\r\n export function getAppContentStageSharingState(\r\n callback: (error: SdkError | null, appContentStageSharingState: IAppContentStageSharingState | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[get app content stage sharing state] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n sendMessageToParent('meeting.getAppContentStageSharingState', callback);\r\n }\r\n\r\n /**\r\n * Registers a handler for changes to paticipant speaking states. If any participant is speaking, isSpeakingDetected\r\n * will be true. If no participants are speaking, isSpeakingDetected will be false. Only one handler can be registered\r\n * at a time. A subsequent registration replaces an existing registration.\r\n * @param handler The handler to invoke when the speaking state of any participant changes (start/stop speaking).\r\n */\r\n export function registerSpeakingStateChangeHandler(handler: (speakingState: ISpeakingState) => void): void {\r\n if (!handler) {\r\n throw new Error('[registerSpeakingStateChangeHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);\r\n registerHandler('meeting.speakingStateChanged', handler);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\n\r\nexport namespace monetization {\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Data structure to represent a subscription plan.\r\n */\r\n export interface PlanInfo {\r\n /**\r\n * plan id\r\n */\r\n planId: string;\r\n /**\r\n * term of the plan\r\n */\r\n term: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Open dialog to start user's purchase experience\r\n * @param callback Callback contains 1 parameters, error.\r\n * @param planInfo optional parameter. It contains info of the subscription plan pushed to users.\r\n * error can either contain an error of type SdkError, incase of an error, or null when get is successful\r\n */\r\n export function openPurchaseExperience(callback: (error: SdkError | null) => void, planInfo?: PlanInfo): void {\r\n if (!callback) {\r\n throw new Error('[open purchase experience] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content);\r\n sendMessageToParent('monetization.openPurchaseExperience', [planInfo], callback);\r\n }\r\n}\r\n","import { ensureInitialized, isAPISupportedByPlatform } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { ErrorCode, SdkError } from './interfaces';\r\nimport { validatePeoplePickerInput } from '../internal/mediaUtil';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { peoplePickerRequiredVersion } from '../internal/constants';\r\n\r\nexport namespace people {\r\n /**\r\n * Launches a people picker and allows the user to select one or more people from the list\r\n * If the app is added to personal app scope the people picker launched is org wide and if the app is added to a chat/channel, people picker launched is also limited to the members of chat/channel\r\n * @param callback Returns list of JSON object of type PeoplePickerResult which consists of AAD IDs, display names and emails of the selected users\r\n * @param peoplePickerInputs Input parameters to launch customized people picker\r\n */\r\n export function selectPeople(\r\n callback: (error: SdkError, people: PeoplePickerResult[]) => void,\r\n peoplePickerInputs?: PeoplePickerInputs,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[people picker] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.content, FrameContexts.task, FrameContexts.settings);\r\n\r\n if (!isAPISupportedByPlatform(peoplePickerRequiredVersion)) {\r\n const oldPlatformError: SdkError = { errorCode: ErrorCode.OLD_PLATFORM };\r\n callback(oldPlatformError, undefined);\r\n return;\r\n }\r\n\r\n if (!validatePeoplePickerInput(peoplePickerInputs)) {\r\n const invalidInput: SdkError = { errorCode: ErrorCode.INVALID_ARGUMENTS };\r\n callback(invalidInput, null);\r\n return;\r\n }\r\n\r\n sendMessageToParent('people.selectPeople', [peoplePickerInputs], callback);\r\n }\r\n\r\n /**\r\n * Input parameter supplied to the People Picker API\r\n */\r\n export interface PeoplePickerInputs {\r\n /**\r\n * Optional; Set title for the people picker\r\n * Default value is \"Select people\" for multiselect and \"Select a person\" for single select\r\n */\r\n title?: string;\r\n\r\n /**\r\n * Optional; AAD ids of the users to be pre-populated in the search box of people picker control\r\n * If single select is enabled this value, only the first user in the list will be pre-populated\r\n * Default value is null\r\n */\r\n setSelected?: string[];\r\n\r\n /**\r\n * Optional; launches the people picker in org wide scope even if the app is added to a chat or channel\r\n * Default value is false\r\n */\r\n openOrgWideSearchInChatOrChannel?: boolean;\r\n\r\n /**\r\n * Optional; launches the people picker for which only 1 person can be selected\r\n * Default value is false\r\n */\r\n singleSelect?: boolean;\r\n }\r\n\r\n /**\r\n * Output user object of people picker API\r\n */\r\n export interface PeoplePickerResult {\r\n /**\r\n * user object Id (also known as aad id) of the selected user\r\n */\r\n objectId: string;\r\n\r\n /**\r\n * Optional; display name of the selected user\r\n */\r\n displayName?: string;\r\n\r\n /**\r\n * Optional; email of the selected user\r\n */\r\n email?: string;\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts } from './constants';\r\nimport { registerHandler } from '../internal/handlers';\r\n/**\r\n * Namespace to video extensibility of the SDK.\r\n *\r\n */\r\nexport namespace video {\r\n /**\r\n * Represents a video frame.\r\n */\r\n export interface VideoFrame {\r\n /**\r\n * Video frame width.\r\n */\r\n width: number;\r\n /**\r\n * Video frame height.\r\n */\r\n height: number;\r\n /**\r\n * Video frame buffer\r\n */\r\n data: Uint8ClampedArray;\r\n /**\r\n * NV12 luma stride, valid only when video frame format is NV12\r\n */\r\n lumaStride?: number;\r\n /**\r\n * NV12 chroma stride, valid only when video frame format is NV12\r\n */\r\n chromaStride?: number;\r\n /**\r\n * RGB stride, valid only when video frame format is RGB\r\n */\r\n stride?: number;\r\n }\r\n /**\r\n * Video frame format enum, currently only support NV12\r\n */\r\n export enum VideoFrameFormat {\r\n NV12,\r\n }\r\n /**\r\n * Video frame configuration supplied to Teams to customize the generated video frame parameters, like format.\r\n */\r\n export interface VideoFrameConfig {\r\n /**\r\n * video format\r\n */\r\n format: VideoFrameFormat;\r\n }\r\n\r\n /**\r\n * Video effect change type enum\r\n */\r\n export enum EffectChangeType {\r\n /**\r\n * current video effect changed.\r\n */\r\n EffectChanged,\r\n /**\r\n * disable the video effect\r\n */\r\n EffectDisabled,\r\n }\r\n\r\n /**\r\n * Video frame call back function definition\r\n */\r\n type VideoFrameCallback = (\r\n frame: VideoFrame,\r\n notifyVideoFrameProcessed: () => void,\r\n notifyError: (errorMessage: string) => void,\r\n ) => void;\r\n\r\n /**\r\n * Video effect change call back function definition\r\n */\r\n type VideoEffectCallBack = (effectId: string | undefined) => void;\r\n\r\n /**\r\n * register to read the video frames in Permissions section.\r\n */\r\n export function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void {\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('video.newVideoFrame', (videoFrame: VideoFrame) => {\r\n if (videoFrame !== undefined) {\r\n frameCallback(videoFrame, notifyVideoFrameProcessed, notifyError);\r\n }\r\n });\r\n sendMessageToParent('video.registerForVideoFrame', [config]);\r\n }\r\n\r\n /**\r\n * video extension should call this to notify Teams Client current selected effect parameter changed.\r\n * If it's pre-meeting, Teams client will call videoEffectCallback immediately then use the videoEffect.\r\n * in-meeting scenario, we will call videoEffectCallback when apply button clicked.\r\n * @param effectChangeType the effect change type.\r\n * @param effectId Newly selected effect id.\r\n */\r\n export function notifySelectedVideoEffectChanged(\r\n effectChangeType: EffectChangeType,\r\n effectId: string | undefined,\r\n ): void {\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('video.videoEffectChanged', [effectChangeType, effectId]);\r\n }\r\n\r\n /**\r\n * Register the video effect callback, Teams client uses this to notify the video extension the new video effect will by applied.\r\n */\r\n export function registerForVideoEffect(callback: VideoEffectCallBack): void {\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('video.effectParameterChange', callback);\r\n }\r\n\r\n /**\r\n * sending notification to Teams client finished the video frame processing, now Teams client can render this video frame\r\n * or pass the video frame to next one in video pipeline.\r\n */\r\n function notifyVideoFrameProcessed(): void {\r\n sendMessageToParent('video.videoFrameProcessed');\r\n }\r\n\r\n /**\r\n * sending error notification to Teams client.\r\n */\r\n function notifyError(errorMessage: string): void {\r\n sendMessageToParent('video.notifyError', [errorMessage]);\r\n }\r\n} //end of video namespace\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { ErrorCode, SdkError } from './interfaces';\r\nimport { FrameContexts } from './constants';\r\n\r\nexport namespace sharing {\r\n export const SharingAPIMessages = {\r\n shareWebContent: 'sharing.shareWebContent',\r\n };\r\n\r\n // More types can be added as we expand share capability\r\n type ContentType = 'URL';\r\n\r\n interface IBaseSharedContent {\r\n type: ContentType;\r\n }\r\n\r\n // More types can be added as we expand share capability\r\n export type IShareRequestContentType = IURLContent;\r\n\r\n export interface IShareRequest<T> {\r\n content: T[];\r\n }\r\n\r\n export interface IURLContent extends IBaseSharedContent {\r\n type: 'URL';\r\n\r\n /**\r\n * Required URL\r\n */\r\n url: string;\r\n\r\n /**\r\n * Default initial message text\r\n */\r\n message?: string;\r\n\r\n /**\r\n * Show URL preview, defaults to true\r\n */\r\n preview?: boolean;\r\n }\r\n\r\n /**\r\n * Opens a share dialog for web content\r\n * @param shareWebContentRequest web content info\r\n * @param callback optional callback\r\n */\r\n export function shareWebContent(\r\n shareWebContentRequest: IShareRequest<IShareRequestContentType>,\r\n callback?: (err?: SdkError) => void,\r\n ): void {\r\n if (!validateNonEmptyContent(shareWebContentRequest, callback)) {\r\n return;\r\n }\r\n\r\n if (!validateTypeConsistency(shareWebContentRequest, callback)) {\r\n return;\r\n }\r\n\r\n if (!validateContentForSupportedTypes(shareWebContentRequest, callback)) {\r\n return;\r\n }\r\n\r\n ensureInitialized(\r\n FrameContexts.content,\r\n FrameContexts.sidePanel,\r\n FrameContexts.task,\r\n FrameContexts.stage,\r\n FrameContexts.meetingStage,\r\n );\r\n\r\n sendMessageToParent(SharingAPIMessages.shareWebContent, [shareWebContentRequest], callback);\r\n }\r\n\r\n // Error checks\r\n function validateNonEmptyContent(\r\n shareRequest: IShareRequest<IShareRequestContentType>,\r\n callback?: (err?: SdkError) => void,\r\n ): boolean {\r\n if (!(shareRequest && shareRequest.content && shareRequest.content.length)) {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'Shared content is missing',\r\n });\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n function validateTypeConsistency(\r\n shareRequest: IShareRequest<IShareRequestContentType>,\r\n callback?: (err?: SdkError) => void,\r\n ): boolean {\r\n if (shareRequest.content.some(item => !item.type)) {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'Shared content type cannot be undefined',\r\n });\r\n }\r\n return false;\r\n }\r\n\r\n if (shareRequest.content.some(item => item.type !== shareRequest.content[0].type)) {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'Shared content must be of the same type',\r\n });\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n function validateContentForSupportedTypes(\r\n shareRequest: IShareRequest<IShareRequestContentType>,\r\n callback?: (err?: SdkError) => void,\r\n ): boolean {\r\n if (shareRequest.content[0].type === 'URL') {\r\n if (shareRequest.content.some(item => !item.url)) {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'URLs are required for URL content types',\r\n });\r\n }\r\n return false;\r\n }\r\n } else {\r\n if (callback) {\r\n callback({\r\n errorCode: ErrorCode.INVALID_ARGUMENTS,\r\n message: 'Content type is unsupported',\r\n });\r\n }\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from '../public';\r\nimport { FrameContexts } from './constants';\r\n\r\n/**\r\n * Namespace to interact with the stage view specific part of the SDK.\r\n */\r\nexport namespace stageView {\r\n /**\r\n * Parameters to open a stage view.\r\n */\r\n export interface StageViewParams {\r\n /**\r\n * The application ID of the Teams application to be opened.\r\n */\r\n appId: string;\r\n\r\n /**\r\n * The URL of the content to display.\r\n */\r\n contentUrl: string;\r\n\r\n /**\r\n * The chat or channel ID.\r\n */\r\n threadId: string;\r\n\r\n /**\r\n * The title to give the stage view.\r\n */\r\n title: string;\r\n\r\n /**\r\n * The Teams app website URL.\r\n */\r\n websiteUrl?: string;\r\n\r\n /**\r\n * The entity ID of the Teams app content being opened.\r\n */\r\n entityId?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Feature is under development\r\n *\r\n * Opens a stage view to display a Teams app\r\n * @param stageViewParams The parameters to pass into the stage view.\r\n * @param callback Callback that will be triggered once the stage view is closed.\r\n * The callback takes as an argument an SdkError in case something happened (i.e.\r\n * no permissions to execute the API)\r\n */\r\n export function open(stageViewParams: StageViewParams, callback?: (sdkError?: SdkError) => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!stageViewParams) {\r\n throw new Error('[stageView.open] Stage view params cannot be null');\r\n }\r\n\r\n sendMessageToParent('stageView.open', [stageViewParams], callback);\r\n }\r\n}\r\n","import { FileOpenPreference, TeamInformation } from '../public/interfaces';\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Information about all members in a chat\r\n */\r\nexport interface ChatMembersInformation {\r\n members: ThreadMember[];\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Information about a chat member\r\n */\r\nexport interface ThreadMember {\r\n /**\r\n * The member's user principal name in the current tenant.\r\n */\r\n upn: string;\r\n}\r\n\r\nexport enum NotificationTypes {\r\n fileDownloadStart = 'fileDownloadStart',\r\n fileDownloadComplete = 'fileDownloadComplete',\r\n}\r\n\r\nexport interface ShowNotificationParameters {\r\n message: string;\r\n notificationType: NotificationTypes;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\nexport enum ViewerActionTypes {\r\n view = 'view',\r\n edit = 'edit',\r\n editNew = 'editNew',\r\n}\r\n\r\n/**\r\n * * @private\r\n * Hide from docs.\r\n * ------\r\n * User setting changes that can be subscribed to,\r\n */\r\nexport enum UserSettingTypes {\r\n /**\r\n * Use this key to subscribe to changes in user's file open preference\r\n */\r\n fileOpenPreference = 'fileOpenPreference',\r\n /**\r\n * Use this key to subscribe to theme changes\r\n */\r\n theme = 'theme',\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs.\r\n * ------\r\n */\r\nexport interface FilePreviewParameters {\r\n /**\r\n * The developer-defined unique ID for the file.\r\n */\r\n entityId: string;\r\n\r\n /**\r\n * The display name of the file.\r\n */\r\n title: string;\r\n\r\n /**\r\n * An optional description of the file.\r\n */\r\n description?: string;\r\n\r\n /**\r\n * The file extension; e.g. pptx, docx, etc.\r\n */\r\n type: string;\r\n\r\n /**\r\n * A url to the source of the file, used to open the content in the user's default browser\r\n */\r\n objectUrl: string;\r\n\r\n /**\r\n * Optional; an alternate self-authenticating url used to preview the file in Mobile clients and offer it for download by the user\r\n */\r\n downloadUrl?: string;\r\n\r\n /**\r\n * Optional; an alternate url optimized for previewing the file in Teams web and desktop clients\r\n */\r\n webPreviewUrl?: string;\r\n\r\n /**\r\n * Optional; an alternate url that allows editing of the file in Teams web and desktop clients\r\n */\r\n webEditUrl?: string;\r\n\r\n /**\r\n * Optional; the base url of the site where the file is hosted\r\n */\r\n baseUrl?: string;\r\n\r\n /**\r\n * Deprecated; prefer using viewerAction instead\r\n * Optional; indicates whether the file should be opened in edit mode\r\n */\r\n editFile?: boolean;\r\n\r\n /**\r\n * Optional; the developer-defined unique ID for the sub-entity to return to when the file stage closes.\r\n * This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.\r\n */\r\n subEntityId?: string;\r\n\r\n /**\r\n * Optional; indicates the mode in which file should be opened. Takes precedence over edit mode.\r\n */\r\n viewerAction?: ViewerActionTypes;\r\n\r\n /**\r\n * Optional; indicates how user prefers to open the file\r\n */\r\n fileOpenPreference?: FileOpenPreference;\r\n\r\n /**\r\n * Optional; id required to enable conversation button in files. Will be channel id in case file is shared in a channel or the chat id in p2p chat case.\r\n */\r\n conversationId?: string;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Query parameters used when fetching team information\r\n */\r\nexport interface TeamInstanceParameters {\r\n /**\r\n * Flag allowing to select favorite teams only\r\n */\r\n favoriteTeamsOnly?: boolean;\r\n}\r\n\r\n/**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Information on userJoined Teams\r\n */\r\nexport interface UserJoinedTeamsInformation {\r\n /**\r\n * List of team information\r\n */\r\n userJoinedTeams: TeamInformation[];\r\n}\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts } from '../public/constants';\r\nimport { OpenConversationRequest } from '../public/interfaces';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler, removeHandler } from '../internal/handlers';\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 sendMessageToParent(\r\n 'conversations.openConversation',\r\n [\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 (status: boolean, reason: string) => {\r\n if (!status) {\r\n throw new Error(reason);\r\n }\r\n },\r\n );\r\n if (openConversationRequest.onStartConversation) {\r\n registerHandler(\r\n 'startConversation',\r\n (subEntityId: string, conversationId: string, channelId: string, entityId: string) =>\r\n openConversationRequest.onStartConversation({\r\n subEntityId,\r\n conversationId,\r\n channelId,\r\n entityId,\r\n }),\r\n );\r\n }\r\n if (openConversationRequest.onCloseConversation) {\r\n registerHandler(\r\n 'closeConversation',\r\n (subEntityId: string, conversationId?: string, channelId?: string, entityId?: string) =>\r\n openConversationRequest.onCloseConversation({\r\n subEntityId,\r\n conversationId,\r\n channelId,\r\n entityId,\r\n }),\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 sendMessageToParent('conversations.closeConversation');\r\n removeHandler('startConversation');\r\n removeHandler('closeConversation');\r\n }\r\n}\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from '../public/interfaces';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\r\n\r\nexport namespace meetingRoom {\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to represent a meeting room.\r\n */\r\n export interface MeetingRoomInfo {\r\n /**\r\n * Endpoint id of the meeting room.\r\n */\r\n endpointId: string;\r\n /**\r\n * Device name of the meeting room.\r\n */\r\n deviceName: string;\r\n /**\r\n * Client type of the meeting room.\r\n */\r\n clientType: string;\r\n /**\r\n * Client version of the meeting room.\r\n */\r\n clientVersion: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Enum used to indicate meeting room capabilities.\r\n */\r\n export enum Capability {\r\n /**\r\n * Media control capability: toggle mute.\r\n */\r\n toggleMute = 'toggleMute',\r\n /**\r\n * Media control capability: toggle camera.\r\n */\r\n toggleCamera = 'toggleCamera',\r\n /**\r\n * Media control capability: toggle captions.\r\n */\r\n toggleCaptions = 'toggleCaptions',\r\n /**\r\n * Media control capability: volume ajustion.\r\n */\r\n volume = 'volume',\r\n /**\r\n * Stage layout control capability: show gallery mode.\r\n */\r\n showVideoGallery = 'showVideoGallery',\r\n /**\r\n * Stage layout control capability: show content mode.\r\n */\r\n showContent = 'showContent',\r\n /**\r\n * Stage layout control capability: show content + gallery mode.\r\n */\r\n showVideoGalleryAndContent = 'showVideoGalleryAndContent',\r\n /**\r\n * Stage layout control capability: show large gallery mode.\r\n */\r\n showLargeGallery = 'showLargeGallery',\r\n /**\r\n * Stage layout control capability: show together mode.\r\n */\r\n showTogether = 'showTogether',\r\n /**\r\n * Meeting control capability: leave meeting.\r\n */\r\n leaveMeeting = 'leaveMeeting',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to represent capabilities of a meeting room.\r\n */\r\n export interface MeetingRoomCapability {\r\n /**\r\n * Media control capabilities, value can be \"toggleMute\", \"toggleCamera\", \"toggleCaptions\", \"volume\".\r\n */\r\n mediaControls: string[];\r\n /**\r\n * Main stage layout control capabilities, value can be \"showVideoGallery\", \"showContent\", \"showVideoGalleryAndContent\", \"showLargeGallery\", \"showTogether\".\r\n */\r\n stageLayoutControls: string[];\r\n /**\r\n * Meeting control capabilities, value can be \"leaveMeeting\".\r\n */\r\n meetingControls: string[];\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to represent states of a meeting room.\r\n */\r\n export interface MeetingRoomState {\r\n /**\r\n * Current mute state, true: mute, false: unmute.\r\n */\r\n toggleMute: boolean;\r\n /**\r\n * Current camera state, true: camera on, false: camera off.\r\n */\r\n toggleCamera: boolean;\r\n /**\r\n * Current captions state, true: captions on, false: captions off.\r\n */\r\n toggleCaptions: boolean;\r\n /**\r\n * Current main stage layout state, value can be one of \"Gallery\", \"Content + gallery\", \"Content\", \"Large gallery\" and \"Together mode\".\r\n */\r\n stageLayout: string;\r\n /**\r\n * Current leaveMeeting state, true: leave, false: no-op.\r\n */\r\n leaveMeeting: boolean;\r\n }\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Fetch the meeting room info that paired with current client.\r\n * @param callback Callback to invoke when the meeting room info is fetched.\r\n */\r\n export function getPairedMeetingRoomInfo(\r\n callback: (sdkError: SdkError, meetingRoomInfo: MeetingRoomInfo) => void,\r\n ): void {\r\n ensureInitialized();\r\n sendMessageToParent('meetingRoom.getPairedMeetingRoomInfo', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Send a command to paired meeting room.\r\n * @param commandName The command name.\r\n * @param callback Callback to invoke when the command response returns.\r\n */\r\n export function sendCommandToPairedMeetingRoom(commandName: string, callback: (sdkError: SdkError) => void): void {\r\n if (!commandName || commandName.length == 0) {\r\n throw new Error('[meetingRoom.sendCommandToPairedMeetingRoom] Command name cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[meetingRoom.sendCommandToPairedMeetingRoom] Callback cannot be null');\r\n }\r\n ensureInitialized();\r\n sendMessageToParent('meetingRoom.sendCommandToPairedMeetingRoom', [commandName], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Registers a handler for meeting room capabilities update.\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 capabilities of meeting room update.\r\n */\r\n export function registerMeetingRoomCapabilitiesUpdateHandler(\r\n handler: (capabilities: MeetingRoomCapability) => void,\r\n ): void {\r\n if (!handler) {\r\n throw new Error('[meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler] Handler cannot be null');\r\n }\r\n ensureInitialized();\r\n registerHandler('meetingRoom.meetingRoomCapabilitiesUpdate', (capabilities: MeetingRoomCapability) => {\r\n ensureInitialized();\r\n handler(capabilities);\r\n });\r\n // handler && Communication.sendMessageToParent('registerHandler', ['meetingRoom.meetingRoomCapabilitiesUpdate']);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n * Registers a handler for meeting room states update.\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 states of meeting room update.\r\n */\r\n export function registerMeetingRoomStatesUpdateHandler(handler: (states: MeetingRoomState) => void): void {\r\n if (!handler) {\r\n throw new Error('[meetingRoom.registerMeetingRoomStatesUpdateHandler] Handler cannot be null');\r\n }\r\n ensureInitialized();\r\n registerHandler('meetingRoom.meetingRoomStatesUpdate', (states: MeetingRoomState) => {\r\n ensureInitialized();\r\n handler(states);\r\n });\r\n // handler && Communication.sendMessageToParent('registerHandler', ['meetingRoom.meetingRoomStatesUpdate']);\r\n }\r\n}\r\n","import { ensureInitialized } from '../internal/internalAPIs';\r\nimport { SdkError } from '../public/interfaces';\r\nimport { FrameContexts } from '../public/constants';\r\nimport { sendMessageToParent } from '../internal/communication';\r\nimport { registerHandler } from '../internal/handlers';\r\n\r\nexport namespace remoteCamera {\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to represent patricipant details needed to request control of camera.\r\n */\r\n export interface Participant {\r\n /**\r\n * Id of participant.\r\n */\r\n id: string;\r\n /**\r\n * Display name of participant.\r\n */\r\n displayName?: string;\r\n /**\r\n * Active indicates whether the participant's device is actively being controlled.\r\n */\r\n active?: boolean;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Enum used to indicate possible camera control commands.\r\n */\r\n export enum ControlCommand {\r\n Reset = 'Reset',\r\n ZoomIn = 'ZoomIn',\r\n ZoomOut = 'ZoomOut',\r\n PanLeft = 'PanLeft',\r\n PanRight = 'PanRight',\r\n TiltUp = 'TiltUp',\r\n TiltDown = 'TiltDown',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to indicate the current state of the device.\r\n */\r\n export interface DeviceState {\r\n /**\r\n * All operation are available to apply.\r\n */\r\n available: boolean;\r\n /**\r\n * Either camera doesnt support to get state or It unable to apply command.\r\n */\r\n error: boolean;\r\n /**\r\n * Reset max out or already applied. Client Disable Reset.\r\n */\r\n reset: boolean;\r\n /**\r\n * ZoomIn maxed out.\r\n */\r\n zoomIn: boolean;\r\n /**\r\n * ZoomOut maxed out.\r\n */\r\n zoomOut: boolean;\r\n /**\r\n * PanLeft reached max left.\r\n */\r\n panLeft: boolean;\r\n /**\r\n * PanRight reached max right.\r\n */\r\n panRight: boolean;\r\n /**\r\n * TiltUp reached top.\r\n */\r\n tiltUp: boolean;\r\n /**\r\n * TiltDown reached bottom.\r\n */\r\n tiltDown: boolean;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Enum used to indicate the reason for the error.\r\n */\r\n export enum ErrorReason {\r\n CommandResetError,\r\n CommandZoomInError,\r\n CommandZoomOutError,\r\n CommandPanLeftError,\r\n CommandPanRightError,\r\n CommandTiltUpError,\r\n CommandTiltDownError,\r\n SendDataError,\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Data structure to indicate the status of the current session.\r\n */\r\n export interface SessionStatus {\r\n /**\r\n * Whether the far-end user is controlling a device.\r\n */\r\n inControl: boolean;\r\n /**\r\n * Reason the control session was terminated.\r\n */\r\n terminatedReason?: SessionTerminatedReason;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Enum used to indicate the reason the session was terminated.\r\n */\r\n export enum SessionTerminatedReason {\r\n None,\r\n ControlDenied,\r\n ControlNoResponse,\r\n ControlBusy,\r\n AckTimeout,\r\n ControlTerminated,\r\n ControllerTerminated,\r\n DataChannelError,\r\n ControllerCancelled,\r\n ControlDisabled,\r\n ControlTerminatedToAllowOtherController,\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Fetch a list of the participants with controllable-cameras in a meeting.\r\n * @param callback Callback contains 2 parameters, error and participants.\r\n * error can either contain an error of type SdkError, incase of an error, or null when fetch is successful\r\n * participants can either contain an array of Participant objects, incase of a successful fetch or null when it fails\r\n * participants: object that contains an array of participants with controllable-cameras\r\n */\r\n export function getCapableParticipants(\r\n callback: (error: SdkError | null, participants: Participant[] | null) => void,\r\n ): void {\r\n if (!callback) {\r\n throw new Error('[remoteCamera.getCapableParticipants] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('remoteCamera.getCapableParticipants', callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Request control of a participant's camera.\r\n * @param participant Participant specifies the participant to send the request for camera control.\r\n * @param callback Callback contains 2 parameters, error and requestResponse.\r\n * error can either contain an error of type SdkError, incase of an error, or null when fetch is successful\r\n * requestResponse can either contain the true/false value, incase of a successful request or null when it fails\r\n * requestResponse: True means request was accepted and false means request was denied\r\n */\r\n export function requestControl(\r\n participant: Participant,\r\n callback: (error: SdkError | null, requestResponse: boolean | null) => void,\r\n ): void {\r\n if (!participant) {\r\n throw new Error('[remoteCamera.requestControl] Participant cannot be null');\r\n }\r\n if (!callback) {\r\n throw new Error('[remoteCamera.requestControl] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('remoteCamera.requestControl', [participant], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Send control command to the participant's camera.\r\n * @param ControlCommand ControlCommand specifies the command for controling the camera.\r\n * @param callback Callback to invoke when the command response returns.\r\n */\r\n export function sendControlCommand(ControlCommand: ControlCommand, callback: (error: SdkError | null) => void): void {\r\n if (!ControlCommand) {\r\n throw new Error('[remoteCamera.sendControlCommand] ControlCommand cannot be null');\r\n }\r\n if (!callback) {\r\n throw new Error('[remoteCamera.sendControlCommand] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('remoteCamera.sendControlCommand', [ControlCommand], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Terminate the remote session\r\n * @param callback Callback to invoke when the command response returns.\r\n */\r\n export function terminateSession(callback: (error: SdkError | null) => void): void {\r\n if (!callback) {\r\n throw new Error('[remoteCamera.terminateSession] Callback cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n sendMessageToParent('remoteCamera.terminateSession', callback);\r\n }\r\n\r\n /**\r\n * Registers a handler for change in participants with controllable-cameras.\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 list of participants with controllable-cameras changes.\r\n */\r\n export function registerOnCapableParticipantsChangeHandler(\r\n handler: (participantChange: Participant[]) => void,\r\n ): void {\r\n if (!handler) {\r\n throw new Error('[remoteCamera.registerOnCapableParticipantsChangeHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('remoteCamera.capableParticipantsChange', handler);\r\n }\r\n\r\n /**\r\n * Registers a handler for error.\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 there is an error from the camera handler.\r\n */\r\n export function registerOnErrorHandler(handler: (error: ErrorReason) => void): void {\r\n if (!handler) {\r\n throw new Error('[remoteCamera.registerOnErrorHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('remoteCamera.handlerError', handler);\r\n }\r\n\r\n /**\r\n * Registers a handler for device state change.\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 controlled device changes state.\r\n */\r\n export function registerOnDeviceStateChangeHandler(handler: (deviceStateChange: DeviceState) => void): void {\r\n if (!handler) {\r\n throw new Error('[remoteCamera.registerOnDeviceStateChangeHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('remoteCamera.deviceStateChange', handler);\r\n }\r\n\r\n /**\r\n * Registers a handler for session status change.\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 current session status changes.\r\n */\r\n export function registerOnSessionStatusChangeHandler(handler: (sessionStatusChange: SessionStatus) => void): void {\r\n if (!handler) {\r\n throw new Error('[remoteCamera.registerOnSessionStatusChangeHandler] Handler cannot be null');\r\n }\r\n ensureInitialized(FrameContexts.sidePanel);\r\n registerHandler('remoteCamera.sessionStatusChange', handler);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FileOpenPreference, FrameContexts, SdkError } from '../public';\r\n\r\n/**\r\n * Namespace to interact with the files specific part of the SDK.\r\n *\r\n * @private\r\n * Hide from docs\r\n */\r\nexport namespace files {\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Cloud storage providers registered with Microsoft Teams\r\n */\r\n export enum CloudStorageProvider {\r\n Dropbox = 'DROPBOX',\r\n Box = 'BOX',\r\n Sharefile = 'SHAREFILE',\r\n GoogleDrive = 'GOOGLEDRIVE',\r\n Egnyte = 'EGNYTE',\r\n SharePoint = 'SharePoint',\r\n }\r\n interface IWopiThumbnail {\r\n size: number;\r\n url: string;\r\n }\r\n\r\n interface IWopiService {\r\n name: string;\r\n description: string;\r\n thumbnails: IWopiThumbnail[];\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * External third-party cloud storages providers interface\r\n */\r\n export interface IExternalProvider extends IWopiService {\r\n providerType: CloudStorageProviderType;\r\n providerCode: CloudStorageProvider;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Cloud storage provider type enums\r\n */\r\n export enum CloudStorageProviderType {\r\n Sharepoint = 0,\r\n WopiIntegration,\r\n Google,\r\n OneDrive,\r\n Recent,\r\n Aggregate,\r\n FileSystem, // Used for Downloaded files on Desktop\r\n Search, // Used by P2P files with OSearch\r\n AllFiles, // Used by P2P files with AllFiles API\r\n SharedWithMe,\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Cloud storage folder interface\r\n */\r\n export interface CloudStorageFolder {\r\n /**\r\n * ID of the cloud storage folder\r\n */\r\n id: string;\r\n /**\r\n * Display Name/Title of the cloud storage folder\r\n */\r\n title: string;\r\n /**\r\n * ID of the cloud storage folder in the provider\r\n */\r\n folderId: string;\r\n /**\r\n * Type of the cloud storage folder provider integration\r\n */\r\n providerType: CloudStorageProviderType;\r\n /**\r\n * Code of the supported cloud storage folder provider\r\n */\r\n providerCode: CloudStorageProvider;\r\n /**\r\n * Display name of the owner of the cloud storage folder provider\r\n */\r\n ownerDisplayName: string;\r\n /**\r\n * Sharepoint specific siteURL of the folder\r\n */\r\n siteUrl?: string;\r\n /**\r\n * Sharepoint specific serverRelativeUrl of the folder\r\n */\r\n serverRelativeUrl?: string;\r\n /**\r\n * Sharepoint specific libraryType of the folder\r\n */\r\n libraryType?: string;\r\n /**\r\n * Sharepoint specific accessType of the folder\r\n */\r\n accessType?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Cloud storage item interface\r\n */\r\n export interface CloudStorageFolderItem {\r\n /**\r\n * ID of the item in the provider\r\n */\r\n id: string;\r\n /**\r\n * Display name/title\r\n */\r\n title: string;\r\n /**\r\n * Key to differentiate files and subdirectory\r\n */\r\n isSubdirectory: boolean;\r\n /**\r\n * File extension\r\n */\r\n type: string;\r\n /**\r\n * Last modifed time of the item\r\n */\r\n lastModifiedTime: string;\r\n /**\r\n * Display size of the items in bytes\r\n */\r\n size: number;\r\n /**\r\n * URL of the file\r\n */\r\n objectUrl: string;\r\n /**\r\n * Temporary access token for the item\r\n */\r\n accessToken?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Files entity user interface\r\n */\r\n export interface IFilesEntityUser {\r\n /**\r\n * User name.\r\n */\r\n displayName: string;\r\n /**\r\n * User email.\r\n */\r\n email: string;\r\n\r\n /**\r\n * User MRI.\r\n */\r\n mri: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Special Document Library enum\r\n */\r\n export enum SpecialDocumentLibraryType {\r\n ClassMaterials = 'classMaterials',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Document Library Access enum\r\n */\r\n export enum DocumentLibraryAccessType {\r\n Readonly = 'readonly',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * SharePoint file interface\r\n */\r\n export interface ISharePointFile {\r\n siteId?: string;\r\n siteUrl: string;\r\n objectId: string;\r\n objectUrl: string;\r\n openInWindowFileUrl: string;\r\n title: string;\r\n isFolder: boolean;\r\n serverRelativeUrl: string;\r\n lastModifiedByUser: IFilesEntityUser;\r\n lastModifiedTime: string;\r\n sentByUser: IFilesEntityUser;\r\n createdByUser: IFilesEntityUser;\r\n createdTime: string;\r\n size: number;\r\n type: string;\r\n spItemUrl?: string;\r\n libraryType?: SpecialDocumentLibraryType;\r\n accessType?: DocumentLibraryAccessType;\r\n etag?: string;\r\n remoteItem?: string;\r\n listUrl?: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Download status enum\r\n */\r\n export enum FileDownloadStatus {\r\n Downloaded = 'Downloaded',\r\n Downloading = 'Downloading',\r\n Failed = 'Failed',\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Download Files interface\r\n */\r\n export interface IFileItem {\r\n /**\r\n * ID of the file metadata\r\n */\r\n objectId?: string;\r\n /**\r\n * Path of the file\r\n */\r\n path?: string;\r\n /**\r\n * Size of the file in bytes\r\n */\r\n sizeInBytes?: number;\r\n /**\r\n * Download status\r\n */\r\n status?: FileDownloadStatus;\r\n /**\r\n * Download timestamp\r\n */\r\n timestamp: Date;\r\n /**\r\n * File name\r\n */\r\n title: string;\r\n /**\r\n * Type of file i.e. the file extension.\r\n */\r\n extension: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Gets a list of cloud storage folders added to the channel\r\n * @param channelId ID of the channel whose cloud storage folders should be retrieved\r\n * @param callback Callback that will be triggered post folders load\r\n */\r\n export function getCloudStorageFolders(\r\n channelId: string,\r\n callback: (error: SdkError, folders: CloudStorageFolder[]) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!channelId || channelId.length === 0) {\r\n throw new Error('[files.getCloudStorageFolders] channelId name cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[files.getCloudStorageFolders] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.getCloudStorageFolders', [channelId], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Initiates the add cloud storage folder flow\r\n * @param channelId ID of the channel to add cloud storage folder\r\n * @param callback Callback that will be triggered post add folder flow is compelete\r\n */\r\n export function addCloudStorageFolder(\r\n channelId: string,\r\n callback: (error: SdkError, isFolderAdded: boolean, folders: CloudStorageFolder[]) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!channelId || channelId.length === 0) {\r\n throw new Error('[files.addCloudStorageFolder] channelId name cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[files.addCloudStorageFolder] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.addCloudStorageFolder', [channelId], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Deletes a cloud storage folder from channel\r\n * @param channelId ID of the channel where folder is to be deleted\r\n * @param folderToDelete cloud storage folder to be deleted\r\n * @param callback Callback that will be triggered post delete\r\n */\r\n export function deleteCloudStorageFolder(\r\n channelId: string,\r\n folderToDelete: CloudStorageFolder,\r\n callback: (error: SdkError, isFolderDeleted: boolean) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!channelId) {\r\n throw new Error('[files.deleteCloudStorageFolder] channelId name cannot be null or empty');\r\n }\r\n if (!folderToDelete) {\r\n throw new Error('[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[files.deleteCloudStorageFolder] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.deleteCloudStorageFolder', [channelId, folderToDelete], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Fetches the contents of a Cloud storage folder (CloudStorageFolder) / sub directory\r\n * @param folder Cloud storage folder (CloudStorageFolder) / sub directory (CloudStorageFolderItem)\r\n * @param providerCode Code of the cloud storage folder provider\r\n * @param callback Callback that will be triggered post contents are loaded\r\n */\r\n export function getCloudStorageFolderContents(\r\n folder: CloudStorageFolder | CloudStorageFolderItem,\r\n providerCode: CloudStorageProvider,\r\n callback: (error: SdkError, items: CloudStorageFolderItem[]) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!folder || !providerCode) {\r\n throw new Error('[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty');\r\n }\r\n\r\n if (!callback) {\r\n throw new Error('[files.getCloudStorageFolderContents] Callback cannot be null');\r\n }\r\n\r\n if ('isSubdirectory' in folder && !folder.isSubdirectory) {\r\n throw new Error('[files.getCloudStorageFolderContents] provided folder is not a subDirectory');\r\n }\r\n\r\n sendMessageToParent('files.getCloudStorageFolderContents', [folder, providerCode], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Open a cloud storage file in teams\r\n * @param file cloud storage file that should be opened\r\n * @param providerCode Code of the cloud storage folder provider\r\n * @param fileOpenPreference Whether file should be opened in web/inline\r\n */\r\n export function openCloudStorageFile(\r\n file: CloudStorageFolderItem,\r\n providerCode: CloudStorageProvider,\r\n fileOpenPreference?: FileOpenPreference.Web | FileOpenPreference.Inline,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!file || !providerCode) {\r\n throw new Error('[files.openCloudStorageFile] file/providerCode cannot be null or empty');\r\n }\r\n\r\n if (file.isSubdirectory) {\r\n throw new Error('[files.openCloudStorageFile] provided file is a subDirectory');\r\n }\r\n\r\n sendMessageToParent('files.openCloudStorageFile', [file, providerCode, fileOpenPreference]);\r\n }\r\n\r\n /**\r\n * @private\r\n * Allow 1st party apps to call this function to get the external\r\n * third party cloud storage accounts that the tenant supports\r\n * @param excludeAddedProviders: return a list of support third party\r\n * cloud storages that hasn't been added yet.\r\n */\r\n export function getExternalProviders(\r\n excludeAddedProviders = false,\r\n callback: (error: SdkError, providers: IExternalProvider[]) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!callback) {\r\n throw new Error('[files.getExternalProviders] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.getExternalProviders', [excludeAddedProviders], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Allow 1st party apps to call this function to move files\r\n * among SharePoint and third party cloud storages.\r\n */\r\n export function copyMoveFiles(\r\n selectedFiles: CloudStorageFolderItem[] | ISharePointFile[],\r\n providerCode: CloudStorageProvider,\r\n destinationFolder: CloudStorageFolderItem | ISharePointFile,\r\n destinationProviderCode: CloudStorageProvider,\r\n isMove = false,\r\n callback: (error?: SdkError) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n if (!selectedFiles || selectedFiles.length === 0) {\r\n throw new Error('[files.copyMoveFiles] selectedFiles cannot be null or empty');\r\n }\r\n if (!providerCode) {\r\n throw new Error('[files.copyMoveFiles] providerCode cannot be null or empty');\r\n }\r\n if (!destinationFolder) {\r\n throw new Error('[files.copyMoveFiles] destinationFolder cannot be null or empty');\r\n }\r\n if (!destinationProviderCode) {\r\n throw new Error('[files.copyMoveFiles] destinationProviderCode cannot be null or empty');\r\n }\r\n if (!callback) {\r\n throw new Error('[files.copyMoveFiles] callback cannot be null');\r\n }\r\n sendMessageToParent(\r\n 'files.copyMoveFiles',\r\n [selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove],\r\n callback,\r\n );\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Gets list of downloads for current user\r\n * @param callback Callback that will be triggered post downloads load\r\n */\r\n export function getFileDownloads(callback: (error?: SdkError, files?: IFileItem[]) => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!callback) {\r\n throw new Error('[files.getFileDownloads] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.getFileDownloads', [], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Open download preference folder if fileObjectId value is undefined else open folder containing the file with id fileObjectId\r\n * @param fileObjectId: Id of the file whose containing folder should be opened\r\n * @param callback Callback that will be triggered post open download folder/path\r\n */\r\n export function openDownloadFolder(fileObjectId: string = undefined, callback: (error?: SdkError) => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!callback) {\r\n throw new Error('[files.openDownloadFolder] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('files.openDownloadFolder', [fileObjectId], callback);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts, SdkError } from '../public';\r\n\r\n/**\r\n * Namespace to interact with the application entities specific part of the SDK.\r\n *\r\n * @private\r\n * Hide from docs\r\n */\r\nexport namespace appEntity {\r\n /**\r\n * @private\r\n * Hide from docs\r\n * --------\r\n * Information on an app entity\r\n */\r\n export interface AppEntity {\r\n /**\r\n * App ID of the application\r\n */\r\n appId: string;\r\n\r\n /**\r\n * URL for the application's icon\r\n */\r\n appIconUrl: string;\r\n\r\n /**\r\n * Content URL for the app entity\r\n */\r\n contentUrl: string;\r\n\r\n /**\r\n * The display name for the app entity\r\n */\r\n displayName: string;\r\n\r\n /**\r\n * Website URL for the app entity. It is meant to be opened by the user in a browser.\r\n */\r\n websiteUrl: string;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Open the Tab Gallery and retrieve the app entity\r\n * @param threadId ID of the thread where the app entity will be created\r\n * @param categories A list of app categories that will be displayed in the opened tab gallery\r\n * @param subEntityId An object that will be made available to the application being configured\r\n * through the Teams Context's subEntityId field.\r\n * @param callback Callback that will be triggered once the app entity information is available.\r\n * The callback takes two arguments: an SdkError in case something happened (i.e.\r\n * no permissions to execute the API) and the app entity configuration, if available\r\n */\r\n export function selectAppEntity(\r\n threadId: string,\r\n categories: string[],\r\n subEntityId: string,\r\n callback: (sdkError?: SdkError, appEntity?: AppEntity) => void,\r\n ): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!threadId || threadId.length == 0) {\r\n throw new Error('[appEntity.selectAppEntity] threadId name cannot be null or empty');\r\n }\r\n\r\n if (!callback) {\r\n throw new Error('[appEntity.selectAppEntity] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('appEntity.selectAppEntity', [threadId, categories, subEntityId], callback);\r\n }\r\n}\r\n","import { sendMessageToParent } from '../internal/communication';\r\nimport { ensureInitialized } from '../internal/internalAPIs';\r\nimport { FrameContexts, SdkError } from '../public';\r\n\r\n/**\r\n * Namespace to interact with the `teams` specific part of the SDK.\r\n *\r\n * @private\r\n * Hide from docs\r\n */\r\nexport namespace teams {\r\n export enum ChannelType {\r\n Regular = 0,\r\n Private = 1,\r\n Shared = 2,\r\n }\r\n\r\n export interface ChannelInfo {\r\n siteUrl: string;\r\n objectId: string;\r\n folderRelativeUrl: string;\r\n displayName: string;\r\n channelType: ChannelType;\r\n }\r\n\r\n /**\r\n * @private\r\n * Hide from docs\r\n *\r\n * Get a list of channels belong to a Team\r\n * @param groupId a team's objectId\r\n */\r\n export function getTeamChannels(groupId: string, callback: (error: SdkError, channels: ChannelInfo[]) => void): void {\r\n ensureInitialized(FrameContexts.content);\r\n\r\n if (!groupId) {\r\n throw new Error('[teams.getTeamChannels] groupId cannot be null or empty');\r\n }\r\n\r\n if (!callback) {\r\n throw new Error('[teams.getTeamChannels] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('teams.getTeamChannels', [groupId], callback);\r\n }\r\n\r\n /**\r\n * @private\r\n * Allow 1st party apps to call this function when they receive migrated errors to inform Teams refresh siteurl\r\n * when site admin renames siteurl.\r\n * @param threadId ID of the thread where the app entity will be created; if threadId is not\r\n * provided, the threadId from route params will be used.\r\n */\r\n export function refreshSiteUrl(threadId: string, callback: (error: SdkError) => void): void {\r\n ensureInitialized();\r\n\r\n if (!threadId) {\r\n throw new Error('[teams.refreshSiteUrl] threadId cannot be null or empty');\r\n }\r\n\r\n if (!callback) {\r\n throw new Error('[teams.refreshSiteUrl] Callback cannot be null');\r\n }\r\n\r\n sendMessageToParent('teams.refreshSiteUrl', [threadId], callback);\r\n }\r\n}\r\n"],"sourceRoot":""}
|