@webex/plugin-meetings 3.10.0-next.7 → 3.10.0-next.9

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.
Files changed (212) hide show
  1. package/dist/annotation/annotation.types.js.map +1 -1
  2. package/dist/annotation/constants.js.map +1 -1
  3. package/dist/annotation/index.js +19 -22
  4. package/dist/annotation/index.js.map +1 -1
  5. package/dist/breakouts/breakout.js +6 -6
  6. package/dist/breakouts/breakout.js.map +1 -1
  7. package/dist/breakouts/collection.js.map +1 -1
  8. package/dist/breakouts/edit-lock-error.js +9 -11
  9. package/dist/breakouts/edit-lock-error.js.map +1 -1
  10. package/dist/breakouts/events.js.map +1 -1
  11. package/dist/breakouts/index.js +126 -127
  12. package/dist/breakouts/index.js.map +1 -1
  13. package/dist/breakouts/request.js +6 -8
  14. package/dist/breakouts/request.js.map +1 -1
  15. package/dist/breakouts/utils.js.map +1 -1
  16. package/dist/common/browser-detection.js.map +1 -1
  17. package/dist/common/collection.js +1 -2
  18. package/dist/common/collection.js.map +1 -1
  19. package/dist/common/config.js.map +1 -1
  20. package/dist/common/errors/captcha-error.js +9 -11
  21. package/dist/common/errors/captcha-error.js.map +1 -1
  22. package/dist/common/errors/intent-to-join.js +10 -12
  23. package/dist/common/errors/intent-to-join.js.map +1 -1
  24. package/dist/common/errors/join-forbidden-error.js +10 -12
  25. package/dist/common/errors/join-forbidden-error.js.map +1 -1
  26. package/dist/common/errors/join-meeting.js +10 -12
  27. package/dist/common/errors/join-meeting.js.map +1 -1
  28. package/dist/common/errors/join-webinar-error.js +9 -11
  29. package/dist/common/errors/join-webinar-error.js.map +1 -1
  30. package/dist/common/errors/media.js +9 -11
  31. package/dist/common/errors/media.js.map +1 -1
  32. package/dist/common/errors/multistream-not-supported-error.js +9 -11
  33. package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
  34. package/dist/common/errors/no-meeting-info.js +9 -11
  35. package/dist/common/errors/no-meeting-info.js.map +1 -1
  36. package/dist/common/errors/parameter.js +11 -14
  37. package/dist/common/errors/parameter.js.map +1 -1
  38. package/dist/common/errors/password-error.js +9 -11
  39. package/dist/common/errors/password-error.js.map +1 -1
  40. package/dist/common/errors/permission.js +9 -11
  41. package/dist/common/errors/permission.js.map +1 -1
  42. package/dist/common/errors/reclaim-host-role-errors.js +32 -38
  43. package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
  44. package/dist/common/errors/reconnection-not-started.js +5 -6
  45. package/dist/common/errors/reconnection-not-started.js.map +1 -1
  46. package/dist/common/errors/reconnection.js +9 -11
  47. package/dist/common/errors/reconnection.js.map +1 -1
  48. package/dist/common/errors/stats.js +9 -11
  49. package/dist/common/errors/stats.js.map +1 -1
  50. package/dist/common/errors/webex-errors.js +20 -29
  51. package/dist/common/errors/webex-errors.js.map +1 -1
  52. package/dist/common/errors/webex-meetings-error.js +9 -12
  53. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  54. package/dist/common/events/events-scope.js +9 -10
  55. package/dist/common/events/events-scope.js.map +1 -1
  56. package/dist/common/events/events.js +9 -10
  57. package/dist/common/events/events.js.map +1 -1
  58. package/dist/common/events/trigger-proxy.js.map +1 -1
  59. package/dist/common/events/util.js.map +1 -1
  60. package/dist/common/logs/logger-config.js.map +1 -1
  61. package/dist/common/logs/logger-proxy.js.map +1 -1
  62. package/dist/common/logs/request.js +17 -17
  63. package/dist/common/logs/request.js.map +1 -1
  64. package/dist/common/queue.js +1 -2
  65. package/dist/common/queue.js.map +1 -1
  66. package/dist/config.js +0 -1
  67. package/dist/config.js.map +1 -1
  68. package/dist/constants.js +0 -5
  69. package/dist/constants.js.map +1 -1
  70. package/dist/controls-options-manager/constants.js.map +1 -1
  71. package/dist/controls-options-manager/enums.js.map +1 -1
  72. package/dist/controls-options-manager/index.js +1 -2
  73. package/dist/controls-options-manager/index.js.map +1 -1
  74. package/dist/controls-options-manager/types.js.map +1 -1
  75. package/dist/controls-options-manager/util.js +1 -2
  76. package/dist/controls-options-manager/util.js.map +1 -1
  77. package/dist/index.js +1 -2
  78. package/dist/index.js.map +1 -1
  79. package/dist/interceptors/index.js.map +1 -1
  80. package/dist/interceptors/locusRetry.js +6 -8
  81. package/dist/interceptors/locusRetry.js.map +1 -1
  82. package/dist/interceptors/locusRouteToken.js +6 -8
  83. package/dist/interceptors/locusRouteToken.js.map +1 -1
  84. package/dist/interpretation/collection.js.map +1 -1
  85. package/dist/interpretation/index.js +1 -2
  86. package/dist/interpretation/index.js.map +1 -1
  87. package/dist/interpretation/siLanguage.js +1 -1
  88. package/dist/interpretation/siLanguage.js.map +1 -1
  89. package/dist/locus-info/controlsUtils.js.map +1 -1
  90. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  91. package/dist/locus-info/fullState.js.map +1 -1
  92. package/dist/locus-info/hostUtils.js.map +1 -1
  93. package/dist/locus-info/index.js +40 -46
  94. package/dist/locus-info/index.js.map +1 -1
  95. package/dist/locus-info/infoUtils.js.map +1 -1
  96. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  97. package/dist/locus-info/parser.js +3 -4
  98. package/dist/locus-info/parser.js.map +1 -1
  99. package/dist/locus-info/selfUtils.js.map +1 -1
  100. package/dist/media/MediaConnectionAwaiter.js +1 -2
  101. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  102. package/dist/media/index.js +0 -2
  103. package/dist/media/index.js.map +1 -1
  104. package/dist/media/properties.js +15 -17
  105. package/dist/media/properties.js.map +1 -1
  106. package/dist/media/util.js.map +1 -1
  107. package/dist/meeting/brbState.js +8 -9
  108. package/dist/meeting/brbState.js.map +1 -1
  109. package/dist/meeting/connectionStateHandler.js +10 -13
  110. package/dist/meeting/connectionStateHandler.js.map +1 -1
  111. package/dist/meeting/in-meeting-actions.js.map +1 -1
  112. package/dist/meeting/index.js +1514 -1512
  113. package/dist/meeting/index.js.map +1 -1
  114. package/dist/meeting/locusMediaRequest.js +13 -17
  115. package/dist/meeting/locusMediaRequest.js.map +1 -1
  116. package/dist/meeting/muteState.js +11 -12
  117. package/dist/meeting/muteState.js.map +1 -1
  118. package/dist/meeting/request.js +101 -104
  119. package/dist/meeting/request.js.map +1 -1
  120. package/dist/meeting/request.type.js.map +1 -1
  121. package/dist/meeting/state.js.map +1 -1
  122. package/dist/meeting/type.js.map +1 -1
  123. package/dist/meeting/util.js +23 -23
  124. package/dist/meeting/util.js.map +1 -1
  125. package/dist/meeting/voicea-meeting.js +3 -3
  126. package/dist/meeting/voicea-meeting.js.map +1 -1
  127. package/dist/meeting-info/collection.js +7 -10
  128. package/dist/meeting-info/collection.js.map +1 -1
  129. package/dist/meeting-info/index.js +1 -2
  130. package/dist/meeting-info/index.js.map +1 -1
  131. package/dist/meeting-info/meeting-info-v2.js +135 -146
  132. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  133. package/dist/meeting-info/request.js +1 -2
  134. package/dist/meeting-info/request.js.map +1 -1
  135. package/dist/meeting-info/util.js +36 -37
  136. package/dist/meeting-info/util.js.map +1 -1
  137. package/dist/meeting-info/utilv2.js +30 -31
  138. package/dist/meeting-info/utilv2.js.map +1 -1
  139. package/dist/meetings/collection.js +6 -8
  140. package/dist/meetings/collection.js.map +1 -1
  141. package/dist/meetings/index.js +89 -93
  142. package/dist/meetings/index.js.map +1 -1
  143. package/dist/meetings/meetings.types.js.map +1 -1
  144. package/dist/meetings/request.js +6 -8
  145. package/dist/meetings/request.js.map +1 -1
  146. package/dist/meetings/util.js +25 -23
  147. package/dist/meetings/util.js.map +1 -1
  148. package/dist/member/index.js +1 -2
  149. package/dist/member/index.js.map +1 -1
  150. package/dist/member/types.js +6 -3
  151. package/dist/member/types.js.map +1 -1
  152. package/dist/member/util.js.map +1 -1
  153. package/dist/members/collection.js +1 -2
  154. package/dist/members/collection.js.map +1 -1
  155. package/dist/members/index.js +18 -21
  156. package/dist/members/index.js.map +1 -1
  157. package/dist/members/request.js +8 -11
  158. package/dist/members/request.js.map +1 -1
  159. package/dist/members/types.js.map +1 -1
  160. package/dist/members/util.js.map +1 -1
  161. package/dist/metrics/constants.js.map +1 -1
  162. package/dist/metrics/index.js +3 -4
  163. package/dist/metrics/index.js.map +1 -1
  164. package/dist/multistream/mediaRequestManager.js +1 -2
  165. package/dist/multistream/mediaRequestManager.js.map +1 -1
  166. package/dist/multistream/receiveSlot.js +34 -45
  167. package/dist/multistream/receiveSlot.js.map +1 -1
  168. package/dist/multistream/receiveSlotManager.js +8 -9
  169. package/dist/multistream/receiveSlotManager.js.map +1 -1
  170. package/dist/multistream/remoteMedia.js +12 -15
  171. package/dist/multistream/remoteMedia.js.map +1 -1
  172. package/dist/multistream/remoteMediaGroup.js +1 -2
  173. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  174. package/dist/multistream/remoteMediaManager.js +122 -123
  175. package/dist/multistream/remoteMediaManager.js.map +1 -1
  176. package/dist/multistream/sendSlotManager.js +29 -30
  177. package/dist/multistream/sendSlotManager.js.map +1 -1
  178. package/dist/personal-meeting-room/index.js +16 -19
  179. package/dist/personal-meeting-room/index.js.map +1 -1
  180. package/dist/personal-meeting-room/request.js +7 -10
  181. package/dist/personal-meeting-room/request.js.map +1 -1
  182. package/dist/personal-meeting-room/util.js.map +1 -1
  183. package/dist/reachability/clusterReachability.js +36 -39
  184. package/dist/reachability/clusterReachability.js.map +1 -1
  185. package/dist/reachability/index.js +203 -205
  186. package/dist/reachability/index.js.map +1 -1
  187. package/dist/reachability/reachability.types.js.map +1 -1
  188. package/dist/reachability/request.js.map +1 -1
  189. package/dist/reachability/util.js.map +1 -1
  190. package/dist/reactions/constants.js.map +1 -1
  191. package/dist/reactions/reactions.js.map +1 -1
  192. package/dist/reactions/reactions.type.js.map +1 -1
  193. package/dist/reconnection-manager/index.js +178 -176
  194. package/dist/reconnection-manager/index.js.map +1 -1
  195. package/dist/recording-controller/enums.js.map +1 -1
  196. package/dist/recording-controller/index.js +1 -2
  197. package/dist/recording-controller/index.js.map +1 -1
  198. package/dist/recording-controller/util.js.map +1 -1
  199. package/dist/roap/index.js +12 -15
  200. package/dist/roap/index.js.map +1 -1
  201. package/dist/roap/request.js +24 -26
  202. package/dist/roap/request.js.map +1 -1
  203. package/dist/roap/turnDiscovery.js +75 -76
  204. package/dist/roap/turnDiscovery.js.map +1 -1
  205. package/dist/roap/types.js.map +1 -1
  206. package/dist/transcription/index.js +4 -5
  207. package/dist/transcription/index.js.map +1 -1
  208. package/dist/webinar/collection.js +1 -2
  209. package/dist/webinar/collection.js.map +1 -1
  210. package/dist/webinar/index.js +148 -158
  211. package/dist/webinar/index.js.map +1 -1
  212. package/package.json +13 -13
@@ -1 +1 @@
1
- {"version":3,"names":["_lodash","require","_permission","_interopRequireDefault","_constants","_loggerProxy","_enums","_util","_constants2","ownKeys","e","r","t","_Object$keys2","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","ControlsOptionsManager","exports","request","options","_classCallCheck2","initialize","set","_createClass2","key","value","extract","setLocusUrl","url","isMainLocus","locusUrl","mainLocusUrl","setDisplayHints","hints","displayHints","getLocusUrl","getDisplayHints","update","_this","_len","controls","Array","_key","payloads","map","control","_keys","Control","includes","scope","Error","concat","Util","canUpdate","PermissionError","properties","reduce","previous","payload","extraBody","authorizingLocusUrl","then","uri","CONTROLS","body","method","HTTP_VERBS","PATCH","_promise","resolve","setControls","setting","_this2","LoggerProxy","logger","log","_stringify","error","shouldSkipCheckToMergeBody","_entries","_ref2","_ref3","_slicedToArray2","undefined","CAN_SET","CAN_UNSET","Setting","muted","audio","camelCase","disallowUnmute","muteOnEntry","ENABLED","roles","_isArray","reject","setMuteOnEntry","enabled","setDisallowUnmute","setMuteAll","mutedEnabled","disallowUnmuteEnabled","muteOnEntryEnabled"],"sources":["index.ts"],"sourcesContent":["import {camelCase} from 'lodash';\nimport PermissionError from '../common/errors/permission';\nimport {CONTROLS, HTTP_VERBS} from '../constants';\nimport MeetingRequest from '../meeting/request';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {Control, Setting} from './enums';\nimport {ControlConfig} from './types';\nimport Util from './util';\nimport {CAN_SET, CAN_UNSET, ENABLED} from './constants';\n\n/**\n * docs\n * https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html\n * https://confluence-eng-gpk2.cisco.com/conf/display/LOCUS/Hard+Mute+and+Audio+Privacy#HardMuteandAudioPrivacy-SelfMuteonEntry\n * https://confluence-eng-gpk2.cisco.com/conf/pages/viewpage.action?spaceKey=UC&title=WEBEX-124454%3A+UCF%3A+Hard+mute+support+for+Teams+joining+Webex+meeting\n * https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-180867\n * https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-393351\n */\n\n/**\n * @description ControlsOptionsManager is responsible for handling the behavior of participant controls when somebody joins a meeting\n * @export\n * @private\n * @class Recording\n */\nexport default class ControlsOptionsManager {\n /**\n * @instance\n * @type {MeetingRequest}\n * @private\n * @memberof ControlsOptionsManager\n */\n private request: MeetingRequest;\n\n /**\n * @instance\n * @type {Array}\n * @private\n * @memberof ControlsOptionsManager\n */\n private displayHints: Array<string> = [];\n\n /**\n * @instance\n * @type {string}\n * @private\n * @memberof ControlsOptionsManager\n */\n private locusUrl: string;\n\n /**\n * @instance\n * @type {string}\n * @private\n * @memberof ControlsOptionsManager\n */\n private mainLocusUrl: string;\n\n /**\n * @param {MeetingRequest} request\n * @param {Object} options\n * @constructor\n * @memberof ControlsOptionsManager\n */\n constructor(\n request: MeetingRequest,\n options?: {\n locusUrl: string;\n displayHints?: Array<string>;\n }\n ) {\n this.initialize(request);\n this.set(options);\n }\n\n /**\n * @param {MeetingRequest} request\n * @returns {void}\n * @private\n * @memberof ControlsOptionsManager\n */\n private initialize(request: MeetingRequest) {\n this.request = request;\n }\n\n /**\n * @param {Object} options\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public set(options?: {locusUrl: string; displayHints?: Array<string>}) {\n this.extract(options);\n }\n\n /**\n * @param {string} url\n * @param {boolean} isMainLocus\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public setLocusUrl(url: string, isMainLocus?: boolean) {\n this.locusUrl = url;\n if (isMainLocus) {\n this.mainLocusUrl = url;\n }\n }\n\n /**\n * @param {Array} hints\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public setDisplayHints(hints: Array<string>) {\n this.displayHints = hints;\n }\n\n /**\n * @returns {string}\n * @public\n * @memberof ControlsOptionsManager\n */\n public getLocusUrl() {\n return this.locusUrl;\n }\n\n /**\n * @returns {Array}\n * @public\n * @memberof ControlsOptionsManager\n */\n public getDisplayHints() {\n return this.displayHints;\n }\n\n /**\n * @param {Object} options\n * @returns {void}\n * @private\n * @memberof ControlsOptionsManager\n */\n private extract(options?: {locusUrl: string; displayHints?: Array<string>}) {\n this.setDisplayHints(options?.displayHints);\n this.setLocusUrl(options?.locusUrl);\n }\n\n /**\n * Set controls for this meeting.\n *\n * @param {Array<ControlConfig>} controls - Spread Array of ControlConfigs\n * @returns {Promise<Array<any>>}- Promise resolving if the request was successful.\n */\n public update(...controls: Array<ControlConfig>) {\n const payloads = controls.map((control) => {\n if (!Object.keys(Control).includes(control.scope)) {\n throw new Error(\n `updating meeting control scope \"${control.scope}\" is not a supported scope`\n );\n }\n\n if (!Util.canUpdate(control, this.displayHints)) {\n throw new PermissionError(\n `updating meeting control scope \"${control.scope}\" not allowed, due to moderator property.`\n );\n }\n\n return {\n [control.scope]: control.properties,\n };\n });\n\n return payloads.reduce((previous, payload) => {\n const extraBody =\n this.mainLocusUrl && this.mainLocusUrl !== this.locusUrl\n ? {authorizingLocusUrl: this.locusUrl}\n : {};\n\n return previous.then(() =>\n // @ts-ignore\n this.request.request({\n uri: `${this.mainLocusUrl || this.locusUrl}/${CONTROLS}`,\n body: {...payload, ...extraBody},\n method: HTTP_VERBS.PATCH,\n })\n );\n }, Promise.resolve());\n }\n\n /**\n * @param {Setting} setting\n * @private\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n private setControls(setting: {\n [Setting.muted]?: boolean;\n [Setting.disallowUnmute]?: boolean;\n [Setting.muteOnEntry]?: boolean;\n [Setting.roles]?: Array<string>;\n }): Promise<any> {\n LoggerProxy.logger.log(\n `ControlsOptionsManager:index#setControls --> ${JSON.stringify(setting)}`\n );\n\n const body: Record<string, any> = {};\n let error: PermissionError;\n\n let shouldSkipCheckToMergeBody = false;\n\n Object.entries(setting).forEach(([key, value]) => {\n if (\n !shouldSkipCheckToMergeBody &&\n value !== undefined &&\n !Util?.[`${value ? CAN_SET : CAN_UNSET}${key}`](this.displayHints)\n ) {\n error = new PermissionError(`${key} [${value}] not allowed, due to moderator property.`);\n }\n\n if (error) {\n return;\n }\n\n switch (key) {\n case Setting.muted:\n shouldSkipCheckToMergeBody = true;\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n break;\n\n case Setting.disallowUnmute:\n case Setting.muteOnEntry:\n if (Object.keys(setting).includes(Setting.muted)) {\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n body.audio[camelCase(key)] = value;\n } else {\n body[camelCase(key)] = {[ENABLED]: value};\n }\n break;\n\n case Setting.roles:\n if (Array.isArray(value)) {\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n }\n break;\n\n default:\n error = new PermissionError(`${key} [${value}] not allowed, due to moderator property.`);\n }\n });\n\n if (error) {\n return Promise.reject(error);\n }\n const extraBody =\n this.mainLocusUrl && this.mainLocusUrl !== this.locusUrl\n ? {authorizingLocusUrl: this.locusUrl}\n : {};\n\n // @ts-ignore\n return this.request.request({\n uri: `${this.mainLocusUrl || this.locusUrl}/${CONTROLS}`,\n body: {...body, ...extraBody},\n method: HTTP_VERBS.PATCH,\n });\n }\n\n /**\n * @public\n * @param {boolean} enabled\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setMuteOnEntry(enabled: boolean): Promise<any> {\n return this.setControls({[Setting.muteOnEntry]: enabled});\n }\n\n /**\n * @public\n * @param {boolean} enabled\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setDisallowUnmute(enabled: boolean): Promise<any> {\n return this.setControls({[Setting.disallowUnmute]: enabled});\n }\n\n /**\n * @public\n * @param {boolean} mutedEnabled\n * @param {boolean} disallowUnmuteEnabled\n * @param {boolean} muteOnEntryEnabled\n * @param {array} roles which should be muted\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setMuteAll(\n mutedEnabled: boolean,\n disallowUnmuteEnabled: boolean,\n muteOnEntryEnabled: boolean,\n roles: Array<string>\n ): Promise<any> {\n return this.setControls({\n [Setting.muted]: mutedEnabled,\n [Setting.disallowUnmute]: disallowUnmuteEnabled,\n [Setting.muteOnEntry]: muteOnEntryEnabled,\n [Setting.roles]: roles,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAAwD,SAAAQ,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,aAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,GAAAD,6BAAA,CAAAJ,CAAA,GAAAC,CAAA,KAAAI,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAL,CAAA,WAAAM,gCAAA,CAAAP,CAAA,EAAAC,CAAA,EAAAO,UAAA,OAAAN,CAAA,CAAAO,IAAA,CAAAC,KAAA,CAAAR,CAAA,EAAAG,CAAA,YAAAH,CAAA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CAAAC,OAAA,MAAG0E,cAAO,CAACI,cAAc,EAAGO,OAAO,CAAC,CAAC;IAC9D;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE;IAAAzE,GAAA;IAAAC,KAAA,EASA,SAAA0E,WACEC,YAAqB,EACrBC,qBAA8B,EAC9BC,kBAA2B,EAC3BT,KAAoB,EACN;MACd,OAAO,IAAI,CAACvB,WAAW,KAAA3D,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MACpB0E,cAAO,CAACC,KAAK,EAAGa,YAAY,GAC5Bd,cAAO,CAACI,cAAc,EAAGW,qBAAqB,GAC9Cf,cAAO,CAACK,WAAW,EAAGW,kBAAkB,GACxChB,cAAO,CAACO,KAAK,EAAGA,KAAK,CACvB,CAAC;IACJ;EAAC;EAAA,OAAA7E,sBAAA;AAAA"}
1
+ {"version":3,"names":["_lodash","require","_permission","_interopRequireDefault","_constants","_loggerProxy","_enums","_util","_constants2","ownKeys","e","r","t","_Object$keys2","_Object$getOwnPropertySymbols","o","filter","_Object$getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","Object","forEach","_defineProperty2","default","_Object$getOwnPropertyDescriptors","_Object$defineProperties","_Object$defineProperty","ControlsOptionsManager","exports","request","options","_classCallCheck2","initialize","set","_createClass2","key","value","extract","setLocusUrl","url","isMainLocus","locusUrl","mainLocusUrl","setDisplayHints","hints","displayHints","getLocusUrl","getDisplayHints","update","_this","_len","controls","Array","_key","payloads","map","control","_keys","Control","includes","scope","Error","concat","Util","canUpdate","PermissionError","properties","reduce","previous","payload","extraBody","authorizingLocusUrl","then","uri","CONTROLS","body","method","HTTP_VERBS","PATCH","_promise","resolve","setControls","setting","_this2","LoggerProxy","logger","log","_stringify","error","shouldSkipCheckToMergeBody","_entries","_ref2","_ref3","_slicedToArray2","undefined","CAN_SET","CAN_UNSET","Setting","muted","audio","camelCase","disallowUnmute","muteOnEntry","ENABLED","roles","_isArray","reject","setMuteOnEntry","enabled","setDisallowUnmute","setMuteAll","mutedEnabled","disallowUnmuteEnabled","muteOnEntryEnabled"],"sources":["index.ts"],"sourcesContent":["import {camelCase} from 'lodash';\nimport PermissionError from '../common/errors/permission';\nimport {CONTROLS, HTTP_VERBS} from '../constants';\nimport MeetingRequest from '../meeting/request';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {Control, Setting} from './enums';\nimport {ControlConfig} from './types';\nimport Util from './util';\nimport {CAN_SET, CAN_UNSET, ENABLED} from './constants';\n\n/**\n * docs\n * https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html\n * https://confluence-eng-gpk2.cisco.com/conf/display/LOCUS/Hard+Mute+and+Audio+Privacy#HardMuteandAudioPrivacy-SelfMuteonEntry\n * https://confluence-eng-gpk2.cisco.com/conf/pages/viewpage.action?spaceKey=UC&title=WEBEX-124454%3A+UCF%3A+Hard+mute+support+for+Teams+joining+Webex+meeting\n * https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-180867\n * https://jira-eng-gpk2.cisco.com/jira/browse/SPARK-393351\n */\n\n/**\n * @description ControlsOptionsManager is responsible for handling the behavior of participant controls when somebody joins a meeting\n * @export\n * @private\n * @class Recording\n */\nexport default class ControlsOptionsManager {\n /**\n * @instance\n * @type {MeetingRequest}\n * @private\n * @memberof ControlsOptionsManager\n */\n private request: MeetingRequest;\n\n /**\n * @instance\n * @type {Array}\n * @private\n * @memberof ControlsOptionsManager\n */\n private displayHints: Array<string> = [];\n\n /**\n * @instance\n * @type {string}\n * @private\n * @memberof ControlsOptionsManager\n */\n private locusUrl: string;\n\n /**\n * @instance\n * @type {string}\n * @private\n * @memberof ControlsOptionsManager\n */\n private mainLocusUrl: string;\n\n /**\n * @param {MeetingRequest} request\n * @param {Object} options\n * @constructor\n * @memberof ControlsOptionsManager\n */\n constructor(\n request: MeetingRequest,\n options?: {\n locusUrl: string;\n displayHints?: Array<string>;\n }\n ) {\n this.initialize(request);\n this.set(options);\n }\n\n /**\n * @param {MeetingRequest} request\n * @returns {void}\n * @private\n * @memberof ControlsOptionsManager\n */\n private initialize(request: MeetingRequest) {\n this.request = request;\n }\n\n /**\n * @param {Object} options\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public set(options?: {locusUrl: string; displayHints?: Array<string>}) {\n this.extract(options);\n }\n\n /**\n * @param {string} url\n * @param {boolean} isMainLocus\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public setLocusUrl(url: string, isMainLocus?: boolean) {\n this.locusUrl = url;\n if (isMainLocus) {\n this.mainLocusUrl = url;\n }\n }\n\n /**\n * @param {Array} hints\n * @returns {void}\n * @public\n * @memberof ControlsOptionsManager\n */\n public setDisplayHints(hints: Array<string>) {\n this.displayHints = hints;\n }\n\n /**\n * @returns {string}\n * @public\n * @memberof ControlsOptionsManager\n */\n public getLocusUrl() {\n return this.locusUrl;\n }\n\n /**\n * @returns {Array}\n * @public\n * @memberof ControlsOptionsManager\n */\n public getDisplayHints() {\n return this.displayHints;\n }\n\n /**\n * @param {Object} options\n * @returns {void}\n * @private\n * @memberof ControlsOptionsManager\n */\n private extract(options?: {locusUrl: string; displayHints?: Array<string>}) {\n this.setDisplayHints(options?.displayHints);\n this.setLocusUrl(options?.locusUrl);\n }\n\n /**\n * Set controls for this meeting.\n *\n * @param {Array<ControlConfig>} controls - Spread Array of ControlConfigs\n * @returns {Promise<Array<any>>}- Promise resolving if the request was successful.\n */\n public update(...controls: Array<ControlConfig>) {\n const payloads = controls.map((control) => {\n if (!Object.keys(Control).includes(control.scope)) {\n throw new Error(\n `updating meeting control scope \"${control.scope}\" is not a supported scope`\n );\n }\n\n if (!Util.canUpdate(control, this.displayHints)) {\n throw new PermissionError(\n `updating meeting control scope \"${control.scope}\" not allowed, due to moderator property.`\n );\n }\n\n return {\n [control.scope]: control.properties,\n };\n });\n\n return payloads.reduce((previous, payload) => {\n const extraBody =\n this.mainLocusUrl && this.mainLocusUrl !== this.locusUrl\n ? {authorizingLocusUrl: this.locusUrl}\n : {};\n\n return previous.then(() =>\n // @ts-ignore\n this.request.request({\n uri: `${this.mainLocusUrl || this.locusUrl}/${CONTROLS}`,\n body: {...payload, ...extraBody},\n method: HTTP_VERBS.PATCH,\n })\n );\n }, Promise.resolve());\n }\n\n /**\n * @param {Setting} setting\n * @private\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n private setControls(setting: {\n [Setting.muted]?: boolean;\n [Setting.disallowUnmute]?: boolean;\n [Setting.muteOnEntry]?: boolean;\n [Setting.roles]?: Array<string>;\n }): Promise<any> {\n LoggerProxy.logger.log(\n `ControlsOptionsManager:index#setControls --> ${JSON.stringify(setting)}`\n );\n\n const body: Record<string, any> = {};\n let error: PermissionError;\n\n let shouldSkipCheckToMergeBody = false;\n\n Object.entries(setting).forEach(([key, value]) => {\n if (\n !shouldSkipCheckToMergeBody &&\n value !== undefined &&\n !Util?.[`${value ? CAN_SET : CAN_UNSET}${key}`](this.displayHints)\n ) {\n error = new PermissionError(`${key} [${value}] not allowed, due to moderator property.`);\n }\n\n if (error) {\n return;\n }\n\n switch (key) {\n case Setting.muted:\n shouldSkipCheckToMergeBody = true;\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n break;\n\n case Setting.disallowUnmute:\n case Setting.muteOnEntry:\n if (Object.keys(setting).includes(Setting.muted)) {\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n body.audio[camelCase(key)] = value;\n } else {\n body[camelCase(key)] = {[ENABLED]: value};\n }\n break;\n\n case Setting.roles:\n if (Array.isArray(value)) {\n body.audio = body.audio\n ? {...body.audio, [camelCase(key)]: value}\n : {[camelCase(key)]: value};\n }\n break;\n\n default:\n error = new PermissionError(`${key} [${value}] not allowed, due to moderator property.`);\n }\n });\n\n if (error) {\n return Promise.reject(error);\n }\n const extraBody =\n this.mainLocusUrl && this.mainLocusUrl !== this.locusUrl\n ? {authorizingLocusUrl: this.locusUrl}\n : {};\n\n // @ts-ignore\n return this.request.request({\n uri: `${this.mainLocusUrl || this.locusUrl}/${CONTROLS}`,\n body: {...body, ...extraBody},\n method: HTTP_VERBS.PATCH,\n });\n }\n\n /**\n * @public\n * @param {boolean} enabled\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setMuteOnEntry(enabled: boolean): Promise<any> {\n return this.setControls({[Setting.muteOnEntry]: enabled});\n }\n\n /**\n * @public\n * @param {boolean} enabled\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setDisallowUnmute(enabled: boolean): Promise<any> {\n return this.setControls({[Setting.disallowUnmute]: enabled});\n }\n\n /**\n * @public\n * @param {boolean} mutedEnabled\n * @param {boolean} disallowUnmuteEnabled\n * @param {boolean} muteOnEntryEnabled\n * @param {array} roles which should be muted\n * @memberof ControlsOptionsManager\n * @returns {Promise}\n */\n public setMuteAll(\n mutedEnabled: boolean,\n disallowUnmuteEnabled: boolean,\n muteOnEntryEnabled: boolean,\n roles: Array<string>\n ): Promise<any> {\n return this.setControls({\n [Setting.muted]: mutedEnabled,\n [Setting.disallowUnmute]: disallowUnmuteEnabled,\n [Setting.muteOnEntry]: muteOnEntryEnabled,\n [Setting.roles]: roles,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAEA,IAAAM,KAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAAwD,SAAAQ,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,aAAA,CAAAH,CAAA,OAAAI,6BAAA,QAAAC,CAAA,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B,EAAgB;MACpD,OAAO,IAAI,CAAC3B,WAAW,KAAA3D,gBAAA,CAAAC,OAAA,MAAG0E,cAAO,CAACK,WAAW,EAAGM,OAAO,CAAC,CAAC;IAC3D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAzE,GAAA;IAAAC,KAAA,EAMA,SAAOyE,iBAAiBA,CAACD,OAAgB,EAAgB;MACvD,OAAO,IAAI,CAAC3B,WAAW,KAAA3D,gBAAA,CAAAC,OAAA,MAAG0E,cAAO,CAACI,cAAc,EAAGO,OAAO,CAAC,CAAC;IAC9D;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EARE;IAAAzE,GAAA;IAAAC,KAAA,EASA,SAAO0E,UAAUA,CACfC,YAAqB,EACrBC,qBAA8B,EAC9BC,kBAA2B,EAC3BT,KAAoB,EACN;MACd,OAAO,IAAI,CAACvB,WAAW,KAAA3D,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MAAAD,gBAAA,CAAAC,OAAA,MACpB0E,cAAO,CAACC,KAAK,EAAGa,YAAY,GAC5Bd,cAAO,CAACI,cAAc,EAAGW,qBAAqB,GAC9Cf,cAAO,CAACK,WAAW,EAAGW,kBAAkB,GACxChB,cAAO,CAACO,KAAK,EAAGA,KAAK,CACvB,CAAC;IACJ;EAAC;AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {Control} from './enums';\n\nexport interface ControlProperties {\n /**\n * A list of additional properties that apply to various specific settings.\n *\n * @remarks\n * The values stored here, per the service, are fully ambiguous, an can vary\n * depending on which control scope is being configured.\n */\n [key: string]: boolean;\n}\n\nexport interface AudioProperties {\n muted?: boolean;\n disallowUnmute?: boolean;\n muteOnEntry?: boolean;\n}\n\nexport interface RaiseHandProperties {\n enabled?: boolean;\n}\n\nexport interface ReactionsProperties {\n enabled?: boolean;\n showDisplayNameWithReactions?: boolean;\n}\n\nexport interface ShareControlProperties {\n control?: 'ANYONE' | 'MODERATOR_PRESENTER';\n}\n\nexport interface VideoProperties {\n enabled?: boolean;\n}\n\nexport interface ViewTheParticipantListProperties {\n enabled?: boolean;\n panelistEnabled?: boolean;\n attendeeCount?: boolean;\n}\n\nexport interface AnnotationProperties {\n enabled?: boolean;\n}\n\nexport interface RemoteDesktopControlProperties {\n enabled?: boolean;\n}\n\nexport interface PollingQAProperties {\n enabled?: boolean;\n}\n\nexport type Properties =\n | AudioProperties\n | RaiseHandProperties\n | ReactionsProperties\n | ShareControlProperties\n | VideoProperties\n | ViewTheParticipantListProperties\n | AnnotationProperties\n | RemoteDesktopControlProperties\n | PollingQAProperties;\n\nexport interface ControlConfig<Props = Properties> {\n /**\n * The scope of the control within this object.\n */\n scope: Control;\n\n /**\n * The properties to assign to this control.\n */\n properties: Props;\n}\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import {Control} from './enums';\n\nexport interface ControlProperties {\n /**\n * A list of additional properties that apply to various specific settings.\n *\n * @remarks\n * The values stored here, per the service, are fully ambiguous, an can vary\n * depending on which control scope is being configured.\n */\n [key: string]: boolean;\n}\n\nexport interface AudioProperties {\n muted?: boolean;\n disallowUnmute?: boolean;\n muteOnEntry?: boolean;\n}\n\nexport interface RaiseHandProperties {\n enabled?: boolean;\n}\n\nexport interface ReactionsProperties {\n enabled?: boolean;\n showDisplayNameWithReactions?: boolean;\n}\n\nexport interface ShareControlProperties {\n control?: 'ANYONE' | 'MODERATOR_PRESENTER';\n}\n\nexport interface VideoProperties {\n enabled?: boolean;\n}\n\nexport interface ViewTheParticipantListProperties {\n enabled?: boolean;\n panelistEnabled?: boolean;\n attendeeCount?: boolean;\n}\n\nexport interface AnnotationProperties {\n enabled?: boolean;\n}\n\nexport interface RemoteDesktopControlProperties {\n enabled?: boolean;\n}\n\nexport interface PollingQAProperties {\n enabled?: boolean;\n}\n\nexport type Properties =\n | AudioProperties\n | RaiseHandProperties\n | ReactionsProperties\n | ShareControlProperties\n | VideoProperties\n | ViewTheParticipantListProperties\n | AnnotationProperties\n | RemoteDesktopControlProperties\n | PollingQAProperties;\n\nexport interface ControlConfig<Props = Properties> {\n /**\n * The scope of the control within this object.\n */\n scope: Control;\n\n /**\n * The properties to assign to this control.\n */\n properties: Props;\n}\n"],"mappings":"","ignoreList":[]}
@@ -19,7 +19,7 @@ var Utils = /*#__PURE__*/function () {
19
19
  function Utils() {
20
20
  (0, _classCallCheck2.default)(this, Utils);
21
21
  }
22
- (0, _createClass2.default)(Utils, null, [{
22
+ return (0, _createClass2.default)(Utils, null, [{
23
23
  key: "canSetMuteOnEntry",
24
24
  value:
25
25
  /**
@@ -402,7 +402,6 @@ var Utils = /*#__PURE__*/function () {
402
402
  return determinant;
403
403
  }
404
404
  }]);
405
- return Utils;
406
405
  }();
407
406
  var _default = exports.default = Utils;
408
407
  //# sourceMappingURL=util.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_constants","require","_enums","Utils","_classCallCheck2","default","_createClass2","key","value","canSetMuteOnEntry","displayHints","includes","DISPLAY_HINTS","ENABLE_MUTE_ON_ENTRY","canSetDisallowUnmute","ENABLE_HARD_MUTE","canUnsetMuteOnEntry","DISABLE_MUTE_ON_ENTRY","canUnsetDisallowUnmute","DISABLE_HARD_MUTE","canSetMuted","MUTE_ALL","canUnsetMuted","UNMUTE_ALL","hasHints","config","requiredHints","every","hint","hasPolicies","requiredPolicies","_config$policies","policies","canUpdateAudio","control","properties","muted","push","disallowUnmute","muteOnEntry","canUpdateRaiseHand","enabled","ENABLE_RAISE_HAND","DISABLE_RAISE_HAND","canUpdateReactions","showDisplayNameWithReactions","undefined","ENABLE_SHOW_DISPLAY_NAME","DISABLE_SHOW_DISPLAY_NAME","ENABLE_REACTIONS","DISABLE_REACTIONS","canUpdateShareControl","SHARE_CONTROL","canUpdateViewTheParticipantsList","ENABLE_VIEW_THE_PARTICIPANT_LIST","DISABLE_VIEW_THE_PARTICIPANT_LIST","panelistEnabled","ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST","DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST","attendeeCount","ENABLE_SHOW_ATTENDEE_COUNT","DISABLE_SHOW_ATTENDEE_COUNT","canUpdateVideo","ENABLE_VIDEO","DISABLE_VIDEO","canUpdateAnnotation","ENABLE_ANNOTATION_MEETING_OPTION","DISABLE_ANNOTATION_MEETING_OPTION","canUpdateRemoteDesktopControl","ENABLE_RDC_MEETING_OPTION","DISABLE_RDC_MEETING_OPTION","canUpdatePollingQA","ENABLE_ATTENDEE_START_POLLING_QA","DISABLE_ATTENDEE_START_POLLING_QA","canUpdate","determinant","scope","Control","audio","raiseHand","reactions","shareControl","video","viewTheParticipantList","annotation","rdc","pollingQA","_default","exports"],"sources":["util.ts"],"sourcesContent":["import {DISPLAY_HINTS} from '../constants';\nimport {Control} from './enums';\nimport {\n ControlConfig,\n AudioProperties,\n RaiseHandProperties,\n ReactionsProperties,\n ViewTheParticipantListProperties,\n VideoProperties,\n type RemoteDesktopControlProperties,\n type AnnotationProperties,\n type PollingQAProperties,\n} from './types';\n\n/**\n * The Controls Options Manager utilities\n *\n * @internal\n */\nclass Utils {\n /**\n * Validate if enabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if allowing unmuting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n\n /**\n * Validate if disabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if enabling muting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n\n /**\n * Validate if muting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.MUTE_ALL);\n }\n\n /**\n * Validate if unmuting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.UNMUTE_ALL);\n }\n\n /**\n * Validate an array of hints are allowed based on a full collection of hints.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredHints - Hints required for validation.\n * @param {Array<string>} config.displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasHints(config: {requiredHints: Array<string>; displayHints: Array<string>}) {\n const {requiredHints, displayHints} = config;\n\n return requiredHints.every((hint) => displayHints.includes(hint));\n }\n\n /**\n * Validate that the self policy object contains the required policies.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredPolicies - Policies required for validation.\n * @param {Array<string>} config.policies - All available policies.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasPolicies(config: {requiredPolicies: Array<string>; policies: Array<string>}) {\n const {requiredPolicies, policies = {}} = config;\n\n return requiredPolicies.every((hint) => policies[hint]);\n }\n\n /**\n * Validate if an audio-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AudioProperties>} control - Audio control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAudio(\n control: ControlConfig<AudioProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.muted === true) {\n requiredHints.push(DISPLAY_HINTS.MUTE_ALL);\n }\n if (control.properties.muted === false) {\n requiredHints.push(DISPLAY_HINTS.UNMUTE_ALL);\n }\n if (control.properties.disallowUnmute === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n if (control.properties.disallowUnmute === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n if (control.properties.muteOnEntry === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n if (control.properties.muteOnEntry === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n public static canUpdateRaiseHand(\n control: ControlConfig<RaiseHandProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_RAISE_HAND);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_RAISE_HAND);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an reactions-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ReactionsProperties>} control - Reaction control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateReactions(\n control: ControlConfig<ReactionsProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n // This additional if statement avoids the display hint discrepency due to\n // the service blocking partial requests with this property only.\n if (control.properties.showDisplayNameWithReactions !== undefined) {\n if (control.properties.showDisplayNameWithReactions === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_DISPLAY_NAME);\n }\n if (control.properties.showDisplayNameWithReactions === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_DISPLAY_NAME);\n }\n } else {\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_REACTIONS);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_REACTIONS);\n }\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an share-control-scoped control is allowed to be sent to the service.\n *\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateShareControl(displayHints: Array<string>) {\n return Utils.hasHints({requiredHints: [DISPLAY_HINTS.SHARE_CONTROL], displayHints});\n }\n\n /**\n * Validate if an view-the-participants-list-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ViewTheParticipantListProperties>} control - View Participants List control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateViewTheParticipantsList(\n control: ControlConfig<ViewTheParticipantListProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.panelistEnabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST);\n }\n if (control.properties.panelistEnabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST);\n }\n if (control.properties.attendeeCount === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_ATTENDEE_COUNT);\n }\n if (control.properties.attendeeCount === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_ATTENDEE_COUNT);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a video-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<VideoProperties>} control - Video control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateVideo(\n control: ControlConfig<VideoProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIDEO);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIDEO);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a annotation-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AnnotationProperties>} control - Annotation control config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAnnotation(\n control: ControlConfig<AnnotationProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_ANNOTATION_MEETING_OPTION);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_ANNOTATION_MEETING_OPTION);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a rdc-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<RemoteDesktopControlProperties>} control - Remote Desktop Control config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateRemoteDesktopControl(\n control: ControlConfig<RemoteDesktopControlProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_RDC_MEETING_OPTION);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_RDC_MEETING_OPTION);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a pollingQA-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<PollingQAProperties>} control - Polling QA config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdatePollingQA(\n control: ControlConfig<PollingQAProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_ATTENDEE_START_POLLING_QA);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_ATTENDEE_START_POLLING_QA);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate that a control can be sent to the service based on the provided\n * display hints.\n *\n * @param {ControlConfig} control - Control to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdate(control: ControlConfig, displayHints: Array<string>) {\n let determinant: boolean;\n\n switch (control.scope) {\n case Control.audio:\n determinant = Utils.canUpdateAudio(control as ControlConfig<AudioProperties>, displayHints);\n break;\n\n case Control.raiseHand:\n determinant = Utils.canUpdateRaiseHand(\n control as ControlConfig<RaiseHandProperties>,\n displayHints\n );\n break;\n\n case Control.reactions:\n determinant = Utils.canUpdateReactions(\n control as ControlConfig<ReactionsProperties>,\n displayHints\n );\n break;\n\n case Control.shareControl:\n determinant = Utils.canUpdateShareControl(displayHints);\n break;\n\n case Control.video:\n determinant = Utils.canUpdateVideo(control as ControlConfig<VideoProperties>, displayHints);\n break;\n\n case Control.viewTheParticipantList:\n determinant = Utils.canUpdateViewTheParticipantsList(\n control as ControlConfig<ViewTheParticipantListProperties>,\n displayHints\n );\n break;\n\n case Control.annotation:\n determinant = Utils.canUpdateAnnotation(\n control as ControlConfig<AnnotationProperties>,\n displayHints\n );\n break;\n\n case Control.rdc:\n determinant = Utils.canUpdateRemoteDesktopControl(\n control as ControlConfig<RemoteDesktopControlProperties>,\n displayHints\n );\n break;\n\n case Control.pollingQA:\n determinant = Utils.canUpdatePollingQA(\n control as ControlConfig<PollingQAProperties>,\n displayHints\n );\n break;\n\n default:\n determinant = false;\n }\n\n return determinant;\n }\n}\n\nexport default Utils;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAaA;AACA;AACA;AACA;AACA;AAJA,IAKME,KAAK;EAAA,SAAAA,MAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAF,KAAA;EAAA;EAAA,IAAAG,aAAA,CAAAD,OAAA,EAAAF,KAAA;IAAAI,GAAA;IAAAC,KAAA;IACT;AACF;AACA;AACA;AACA;AACA;IACE,SAAAC,kBAAgCC,YAA2B,EAAW;MACpE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACC,oBAAoB,CAAC;IAClE;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAN,GAAA;IAAAC,KAAA,EAMA,SAAAM,qBAAmCJ,YAA2B,EAAW;MACvE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACG,gBAAgB,CAAC;IAC9D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAR,GAAA;IAAAC,KAAA,EAMA,SAAAQ,oBAAkCN,YAA2B,EAAW;MACtE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACK,qBAAqB,CAAC;IACnE;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAV,GAAA;IAAAC,KAAA,EAMA,SAAAU,uBAAqCR,YAA2B,EAAW;MACzE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACO,iBAAiB,CAAC;IAC/D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAZ,GAAA;IAAAC,KAAA,EAMA,SAAAY,YAA0BV,YAA2B,EAAW;MAC9D,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACS,QAAQ,CAAC;IACtD;;IAEA;AACF;AACA;AACA;AACA;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ACM,sBAAsB;UACjCR,WAAW,GAAGxE,KAAK,CAACkD,gCAAgC,CAClDnB,OAAO,EACPxB,YACF,CAAC;UACD;QAEF,KAAKmE,cAAO,CAACO,UAAU;UACrBT,WAAW,GAAGxE,KAAK,CAAC8D,mBAAmB,CACrC/B,OAAO,EACPxB,YACF,CAAC;UACD;QAEF,KAAKmE,cAAO,CAACQ,GAAG;UACdV,WAAW,GAAGxE,KAAK,CAACiE,6BAA6B,CAC/ClC,OAAO,EACPxB,YACF,CAAC;UACD;QAEF,KAAKmE,cAAO,CAACS,SAAS;UACpBX,WAAW,GAAGxE,KAAK,CAACoE,kBAAkB,CACpCrC,OAAO,EACPxB,YACF,CAAC;UACD;QAEF;UACEiE,WAAW,GAAG,KAAK;MACvB;MAEA,OAAOA,WAAW;IACpB;EAAC;EAAA,OAAAxE,KAAA;AAAA;AAAA,IAAAoF,QAAA,GAAAC,OAAA,CAAAnF,OAAA,GAGYF,KAAK"}
1
+ {"version":3,"names":["_constants","require","_enums","Utils","_classCallCheck2","default","_createClass2","key","value","canSetMuteOnEntry","displayHints","includes","DISPLAY_HINTS","ENABLE_MUTE_ON_ENTRY","canSetDisallowUnmute","ENABLE_HARD_MUTE","canUnsetMuteOnEntry","DISABLE_MUTE_ON_ENTRY","canUnsetDisallowUnmute","DISABLE_HARD_MUTE","canSetMuted","MUTE_ALL","canUnsetMuted","UNMUTE_ALL","hasHints","config","requiredHints","every","hint","hasPolicies","requiredPolicies","_config$policies","policies","canUpdateAudio","control","properties","muted","push","disallowUnmute","muteOnEntry","canUpdateRaiseHand","enabled","ENABLE_RAISE_HAND","DISABLE_RAISE_HAND","canUpdateReactions","showDisplayNameWithReactions","undefined","ENABLE_SHOW_DISPLAY_NAME","DISABLE_SHOW_DISPLAY_NAME","ENABLE_REACTIONS","DISABLE_REACTIONS","canUpdateShareControl","SHARE_CONTROL","canUpdateViewTheParticipantsList","ENABLE_VIEW_THE_PARTICIPANT_LIST","DISABLE_VIEW_THE_PARTICIPANT_LIST","panelistEnabled","ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST","DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST","attendeeCount","ENABLE_SHOW_ATTENDEE_COUNT","DISABLE_SHOW_ATTENDEE_COUNT","canUpdateVideo","ENABLE_VIDEO","DISABLE_VIDEO","canUpdateAnnotation","ENABLE_ANNOTATION_MEETING_OPTION","DISABLE_ANNOTATION_MEETING_OPTION","canUpdateRemoteDesktopControl","ENABLE_RDC_MEETING_OPTION","DISABLE_RDC_MEETING_OPTION","canUpdatePollingQA","ENABLE_ATTENDEE_START_POLLING_QA","DISABLE_ATTENDEE_START_POLLING_QA","canUpdate","determinant","scope","Control","audio","raiseHand","reactions","shareControl","video","viewTheParticipantList","annotation","rdc","pollingQA","_default","exports"],"sources":["util.ts"],"sourcesContent":["import {DISPLAY_HINTS} from '../constants';\nimport {Control} from './enums';\nimport {\n ControlConfig,\n AudioProperties,\n RaiseHandProperties,\n ReactionsProperties,\n ViewTheParticipantListProperties,\n VideoProperties,\n type RemoteDesktopControlProperties,\n type AnnotationProperties,\n type PollingQAProperties,\n} from './types';\n\n/**\n * The Controls Options Manager utilities\n *\n * @internal\n */\nclass Utils {\n /**\n * Validate if enabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if allowing unmuting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n\n /**\n * Validate if disabling mute on entry can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuteOnEntry(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n /**\n * Validate if enabling muting can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetDisallowUnmute(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n\n /**\n * Validate if muting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canSetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.MUTE_ALL);\n }\n\n /**\n * Validate if unmuting all can be set.\n *\n * @param {Array<string>} displayHints - Display Hints to use when validating.\n * @returns {boolean} - True if the action is allowed.\n */\n public static canUnsetMuted(displayHints: Array<string>): boolean {\n return displayHints.includes(DISPLAY_HINTS.UNMUTE_ALL);\n }\n\n /**\n * Validate an array of hints are allowed based on a full collection of hints.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredHints - Hints required for validation.\n * @param {Array<string>} config.displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasHints(config: {requiredHints: Array<string>; displayHints: Array<string>}) {\n const {requiredHints, displayHints} = config;\n\n return requiredHints.every((hint) => displayHints.includes(hint));\n }\n\n /**\n * Validate that the self policy object contains the required policies.\n *\n * @param {Object} config - Configuration Object.\n * @param {Array<string>} config.requiredPolicies - Policies required for validation.\n * @param {Array<string>} config.policies - All available policies.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static hasPolicies(config: {requiredPolicies: Array<string>; policies: Array<string>}) {\n const {requiredPolicies, policies = {}} = config;\n\n return requiredPolicies.every((hint) => policies[hint]);\n }\n\n /**\n * Validate if an audio-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AudioProperties>} control - Audio control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAudio(\n control: ControlConfig<AudioProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.muted === true) {\n requiredHints.push(DISPLAY_HINTS.MUTE_ALL);\n }\n if (control.properties.muted === false) {\n requiredHints.push(DISPLAY_HINTS.UNMUTE_ALL);\n }\n if (control.properties.disallowUnmute === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_HARD_MUTE);\n }\n if (control.properties.disallowUnmute === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_HARD_MUTE);\n }\n if (control.properties.muteOnEntry === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_MUTE_ON_ENTRY);\n }\n if (control.properties.muteOnEntry === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_MUTE_ON_ENTRY);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n public static canUpdateRaiseHand(\n control: ControlConfig<RaiseHandProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_RAISE_HAND);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_RAISE_HAND);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an reactions-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ReactionsProperties>} control - Reaction control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateReactions(\n control: ControlConfig<ReactionsProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n // This additional if statement avoids the display hint discrepency due to\n // the service blocking partial requests with this property only.\n if (control.properties.showDisplayNameWithReactions !== undefined) {\n if (control.properties.showDisplayNameWithReactions === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_DISPLAY_NAME);\n }\n if (control.properties.showDisplayNameWithReactions === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_DISPLAY_NAME);\n }\n } else {\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_REACTIONS);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_REACTIONS);\n }\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if an share-control-scoped control is allowed to be sent to the service.\n *\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateShareControl(displayHints: Array<string>) {\n return Utils.hasHints({requiredHints: [DISPLAY_HINTS.SHARE_CONTROL], displayHints});\n }\n\n /**\n * Validate if an view-the-participants-list-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<ViewTheParticipantListProperties>} control - View Participants List control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateViewTheParticipantsList(\n control: ControlConfig<ViewTheParticipantListProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST);\n }\n if (control.properties.panelistEnabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST);\n }\n if (control.properties.panelistEnabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIEW_THE_PARTICIPANT_LIST_PANELIST);\n }\n if (control.properties.attendeeCount === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_SHOW_ATTENDEE_COUNT);\n }\n if (control.properties.attendeeCount === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_SHOW_ATTENDEE_COUNT);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a video-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<VideoProperties>} control - Video control config to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateVideo(\n control: ControlConfig<VideoProperties>,\n displayHints: Array<string>\n ) {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_VIDEO);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_VIDEO);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a annotation-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<AnnotationProperties>} control - Annotation control config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateAnnotation(\n control: ControlConfig<AnnotationProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_ANNOTATION_MEETING_OPTION);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_ANNOTATION_MEETING_OPTION);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a rdc-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<RemoteDesktopControlProperties>} control - Remote Desktop Control config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdateRemoteDesktopControl(\n control: ControlConfig<RemoteDesktopControlProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_RDC_MEETING_OPTION);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_RDC_MEETING_OPTION);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate if a pollingQA-scoped control is allowed to be sent to the service.\n *\n * @param {ControlConfig<PollingQAProperties>} control - Polling QA config to validate\n * @param {Array<string>} displayHints - All available hints\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdatePollingQA(\n control: ControlConfig<PollingQAProperties>,\n displayHints: Array<string>\n ): boolean {\n const requiredHints = [];\n\n if (control.properties.enabled === true) {\n requiredHints.push(DISPLAY_HINTS.ENABLE_ATTENDEE_START_POLLING_QA);\n }\n if (control.properties.enabled === false) {\n requiredHints.push(DISPLAY_HINTS.DISABLE_ATTENDEE_START_POLLING_QA);\n }\n\n return Utils.hasHints({requiredHints, displayHints});\n }\n\n /**\n * Validate that a control can be sent to the service based on the provided\n * display hints.\n *\n * @param {ControlConfig} control - Control to validate.\n * @param {Array<string>} displayHints - All available hints.\n * @returns {boolean} - True if all of the actions are allowed.\n */\n public static canUpdate(control: ControlConfig, displayHints: Array<string>) {\n let determinant: boolean;\n\n switch (control.scope) {\n case Control.audio:\n determinant = Utils.canUpdateAudio(control as ControlConfig<AudioProperties>, displayHints);\n break;\n\n case Control.raiseHand:\n determinant = Utils.canUpdateRaiseHand(\n control as ControlConfig<RaiseHandProperties>,\n displayHints\n );\n break;\n\n case Control.reactions:\n determinant = Utils.canUpdateReactions(\n control as ControlConfig<ReactionsProperties>,\n displayHints\n );\n break;\n\n case Control.shareControl:\n determinant = Utils.canUpdateShareControl(displayHints);\n break;\n\n case Control.video:\n determinant = Utils.canUpdateVideo(control as ControlConfig<VideoProperties>, displayHints);\n break;\n\n case Control.viewTheParticipantList:\n determinant = Utils.canUpdateViewTheParticipantsList(\n control as ControlConfig<ViewTheParticipantListProperties>,\n displayHints\n );\n break;\n\n case Control.annotation:\n determinant = Utils.canUpdateAnnotation(\n control as ControlConfig<AnnotationProperties>,\n displayHints\n );\n break;\n\n case Control.rdc:\n determinant = Utils.canUpdateRemoteDesktopControl(\n control as ControlConfig<RemoteDesktopControlProperties>,\n displayHints\n );\n break;\n\n case Control.pollingQA:\n determinant = Utils.canUpdatePollingQA(\n control as ControlConfig<PollingQAProperties>,\n displayHints\n );\n break;\n\n default:\n determinant = false;\n }\n\n return determinant;\n }\n}\n\nexport default Utils;\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAaA;AACA;AACA;AACA;AACA;AAJA,IAKME,KAAK;EAAA,SAAAA,MAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,QAAAF,KAAA;EAAA;EAAA,WAAAG,aAAA,CAAAD,OAAA,EAAAF,KAAA;IAAAI,GAAA;IAAAC,KAAA;IACT;AACF;AACA;AACA;AACA;AACA;IACE,SAAcC,iBAAiBA,CAACC,YAA2B,EAAW;MACpE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACC,oBAAoB,CAAC;IAClE;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAN,GAAA;IAAAC,KAAA,EAMA,SAAcM,oBAAoBA,CAACJ,YAA2B,EAAW;MACvE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACG,gBAAgB,CAAC;IAC9D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAR,GAAA;IAAAC,KAAA,EAMA,SAAcQ,mBAAmBA,CAACN,YAA2B,EAAW;MACtE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACK,qBAAqB,CAAC;IACnE;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAV,GAAA;IAAAC,KAAA,EAMA,SAAcU,sBAAsBA,CAACR,YAA2B,EAAW;MACzE,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACO,iBAAiB,CAAC;IAC/D;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAZ,GAAA;IAAAC,KAAA,EAMA,SAAcY,WAAWA,CAACV,YAA2B,EAAW;MAC9D,OAAOA,YAAY,CAACC,QAAQ,CAACC,wBAAa,CAACS,QAAQ,CAAC;IACtD;;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AKmE,cAAO,CAACK,KAAK;UAChBP,WAAW,GAAGxE,KAAK,CAAC2D,cAAc,CAAC5B,OAAO,EAAoCxB,YAAY,CAAC;UAC3F;QAEF,KAAKmE,cAAO,CAACM,sBAAsB;UACjCR,WAAW,GAAGxE,KAAK,CAACkD,gCAAgC,CAClDnB,OAAO,EACPxB,YACF,CAAC;UACD;QAEF,KAAKmE,cAAO,CAACO,UAAU;UACrBT,WAAW,GAAGxE,KAAK,CAAC8D,mBAAmB,CACrC/B,OAAO,EACPxB,YACF,CAAC;UACD;QAEF,KAAKmE,cAAO,CAACQ,GAAG;UACdV,WAAW,GAAGxE,KAAK,CAACiE,6BAA6B,CAC/ClC,OAAO,EACPxB,YACF,CAAC;UACD;QAEF,KAAKmE,cAAO,CAACS,SAAS;UACpBX,WAAW,GAAGxE,KAAK,CAACoE,kBAAkB,CACpCrC,OAAO,EACPxB,YACF,CAAC;UACD;QAEF;UACEiE,WAAW,GAAG,KAAK;MACvB;MAEA,OAAOA,WAAW;IACpB;EAAC;AAAA;AAAA,IAAAY,QAAA,GAAAC,OAAA,CAAAnF,OAAA,GAGYF,KAAK","ignoreList":[]}
package/dist/index.js CHANGED
@@ -241,8 +241,7 @@ var _MeetingInfoV = _interopRequireWildcard(require("./meeting-info/meeting-info
241
241
  exports.MeetingInfoV2 = _MeetingInfoV;
242
242
  var _remoteMedia = require("./multistream/remoteMedia");
243
243
  var _triggerProxy = _interopRequireDefault(require("./common/events/trigger-proxy"));
244
- function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
245
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
244
+ function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
246
245
  /* eslint-env browser */
247
246
 
248
247
  (0, _webexCore.registerPlugin)('meetings', _meetings.default, {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_webexCore","require","_meetings","_interopRequireDefault","_config","_interceptors","_captchaError","_intentToJoin","_passwordError","_permission","_joinWebinarError","_reclaimHostRoleErrors","_meeting","_utilv","_joinMeeting","_webexErrors","_mediaHelpers","_CONSTANTS","_interopRequireWildcard","exports","CONSTANTS","_REACTIONS","REACTIONS","_sdkAnnotationTypes","sdkAnnotationTypes","_MeetingInfoV","MeetingInfoV2","_remoteMedia","_triggerProxy","_getRequireWildcardCache","e","_WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","_Object$defineProperty","_Object$getOwnPropertyDescriptor","u","Object","prototype","hasOwnProperty","call","i","set","registerPlugin","Meetings","config","interceptors","LocusRetryStatusInterceptor","create","LocusRouteTokenInterceptor","_default"],"sources":["index.ts"],"sourcesContent":["/* eslint-env browser */\nimport {registerPlugin} from '@webex/webex-core';\n\nimport Meetings from './meetings';\nimport config from './config';\nimport {LocusRetryStatusInterceptor, LocusRouteTokenInterceptor} from './interceptors';\nimport CaptchaError from './common/errors/captcha-error';\nimport IntentToJoinError from './common/errors/intent-to-join';\nimport PasswordError from './common/errors/password-error';\nimport PermissionError from './common/errors/permission';\nimport JoinWebinarError from './common/errors/join-webinar-error';\nimport {\n ReclaimHostEmptyWrongKeyError,\n ReclaimHostIsHostAlreadyError,\n ReclaimHostNotAllowedError,\n ReclaimHostNotSupportedError,\n} from './common/errors/reclaim-host-role-errors';\nimport Meeting from './meeting';\nimport MeetingInfoUtil from './meeting-info/utilv2';\nimport JoinMeetingError from './common/errors/join-meeting';\nimport {SdpResponseTimeoutError} from './common/errors/webex-errors';\n\nregisterPlugin('meetings', Meetings, {\n config,\n interceptors: {\n LocusRetryStatusInterceptor: LocusRetryStatusInterceptor.create,\n LocusRouteTokenInterceptor: LocusRouteTokenInterceptor.create,\n },\n});\n\nexport {\n LocalStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalStreamEventNames,\n StreamEventNames,\n RemoteStreamEventNames,\n type ServerMuteReason,\n LocalMicrophoneStreamEventNames,\n LocalCameraStreamEventNames,\n LocalMicrophoneStream,\n LocalCameraStream,\n createMicrophoneStream,\n createCameraStream,\n createCameraAndMicrophoneStreams,\n createDisplayStream,\n createDisplayStreamWithAudio,\n createDisplayMedia,\n FacingMode,\n DisplaySurface,\n PresetCameraConstraints,\n type VideoContentHint,\n type StreamState,\n} from '@webex/media-helpers';\n\nexport default Meetings;\n\nexport * as CONSTANTS from './constants';\nexport * as REACTIONS from './reactions/reactions';\nexport * as sdkAnnotationTypes from './annotation/annotation.types';\nexport * as MeetingInfoV2 from './meeting-info/meeting-info-v2';\nexport {type Reaction} from './reactions/reactions.type';\n\nexport {\n CaptchaError,\n IntentToJoinError,\n JoinMeetingError,\n PasswordError,\n PermissionError,\n ReclaimHostIsHostAlreadyError,\n ReclaimHostNotAllowedError,\n ReclaimHostNotSupportedError,\n ReclaimHostEmptyWrongKeyError,\n Meeting,\n MeetingInfoUtil,\n JoinWebinarError,\n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ApB,CAAA,EAAAS,CAAA,GAAAA,CAAA;AAjFtE;;AAsBA,IAAAY,yBAAc,EAAC,UAAU,EAAEC,iBAAQ,EAAE;EACnCC,MAAM,EAANA,eAAM;EACNC,YAAY,EAAE;IACZC,2BAA2B,EAAEA,yCAA2B,CAACC,MAAM;IAC/DC,0BAA0B,EAAEA,wCAA0B,CAACD;EACzD;AACF,CAAC,CAAC;AAAC,IAAAE,QAAA,GAAAvC,OAAA,CAAAiB,OAAA,GA2BYgB,iBAAQ"}
1
+ {"version":3,"names":["_webexCore","require","_meetings","_interopRequireDefault","_config","_interceptors","_captchaError","_intentToJoin","_passwordError","_permission","_joinWebinarError","_reclaimHostRoleErrors","_meeting","_utilv","_joinMeeting","_webexErrors","_mediaHelpers","_CONSTANTS","_interopRequireWildcard","exports","CONSTANTS","_REACTIONS","REACTIONS","_sdkAnnotationTypes","sdkAnnotationTypes","_MeetingInfoV","MeetingInfoV2","_remoteMedia","_triggerProxy","e","t","_WeakMap","r","n","__esModule","o","i","f","__proto__","default","_typeof","has","get","set","_t","hasOwnProperty","call","_Object$defineProperty","_Object$getOwnPropertyDescriptor","registerPlugin","Meetings","config","interceptors","LocusRetryStatusInterceptor","create","LocusRouteTokenInterceptor","_default"],"sources":["index.ts"],"sourcesContent":["/* eslint-env browser */\nimport {registerPlugin} from '@webex/webex-core';\n\nimport Meetings from './meetings';\nimport config from './config';\nimport {LocusRetryStatusInterceptor, LocusRouteTokenInterceptor} from './interceptors';\nimport CaptchaError from './common/errors/captcha-error';\nimport IntentToJoinError from './common/errors/intent-to-join';\nimport PasswordError from './common/errors/password-error';\nimport PermissionError from './common/errors/permission';\nimport JoinWebinarError from './common/errors/join-webinar-error';\nimport {\n ReclaimHostEmptyWrongKeyError,\n ReclaimHostIsHostAlreadyError,\n ReclaimHostNotAllowedError,\n ReclaimHostNotSupportedError,\n} from './common/errors/reclaim-host-role-errors';\nimport Meeting from './meeting';\nimport MeetingInfoUtil from './meeting-info/utilv2';\nimport JoinMeetingError from './common/errors/join-meeting';\nimport {SdpResponseTimeoutError} from './common/errors/webex-errors';\n\nregisterPlugin('meetings', Meetings, {\n config,\n interceptors: {\n LocusRetryStatusInterceptor: LocusRetryStatusInterceptor.create,\n LocusRouteTokenInterceptor: LocusRouteTokenInterceptor.create,\n },\n});\n\nexport {\n LocalStream,\n LocalDisplayStream,\n LocalSystemAudioStream,\n LocalStreamEventNames,\n StreamEventNames,\n RemoteStreamEventNames,\n type ServerMuteReason,\n LocalMicrophoneStreamEventNames,\n LocalCameraStreamEventNames,\n LocalMicrophoneStream,\n LocalCameraStream,\n createMicrophoneStream,\n createCameraStream,\n createCameraAndMicrophoneStreams,\n createDisplayStream,\n createDisplayStreamWithAudio,\n createDisplayMedia,\n FacingMode,\n DisplaySurface,\n PresetCameraConstraints,\n type VideoContentHint,\n type StreamState,\n} from '@webex/media-helpers';\n\nexport default Meetings;\n\nexport * as CONSTANTS from './constants';\nexport * as REACTIONS from './reactions/reactions';\nexport * as sdkAnnotationTypes from './annotation/annotation.types';\nexport * as MeetingInfoV2 from './meeting-info/meeting-info-v2';\nexport {type Reaction} from './reactions/reactions.type';\n\nexport {\n CaptchaError,\n IntentToJoinError,\n JoinMeetingError,\n PasswordError,\n PermissionError,\n ReclaimHostIsHostAlreadyError,\n ReclaimHostNotAllowedError,\n ReclaimHostNotSupportedError,\n ReclaimHostEmptyWrongKeyError,\n Meeting,\n MeetingInfoUtil,\n JoinWebinarError,\n SdpResponseTimeoutError,\n};\n\nexport {RemoteMedia} from './multistream/remoteMedia';\n\nexport {default as TriggerProxy} from './common/events/trigger-proxy';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA,wBAAAW,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,gBAAAW,OAAA,CAAAX,CAAA,0BAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAM,GAAA,CAAAZ,CAAA,UAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,GAAAM,CAAA,CAAAQ,GAAA,CAAAd,CAAA,EAAAQ,CAAA,cAAAO,EAAA,IAAAf,CAAA,gBAAAe,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,EAAA,OAAAR,CAAA,IAAAD,CAAA,GAAAY,sBAAA,KAAAC,gCAAA,CAAAnB,CAAA,EAAAe,EAAA,OAAAR,CAAA,CAAAM,GAAA,IAAAN,CAAA,CAAAO,GAAA,IAAAR,CAAA,CAAAE,CAAA,EAAAO,EAAA,EAAAR,CAAA,IAAAC,CAAA,CAAAO,EAAA,IAAAf,CAAA,CAAAe,EAAA,WAAAP,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAjFtE;;AAsBA,IAAAmB,yBAAc,EAAC,UAAU,EAAEC,iBAAQ,EAAE;EACnCC,MAAM,EAANA,eAAM;EACNC,YAAY,EAAE;IACZC,2BAA2B,EAAEA,yCAA2B,CAACC,MAAM;IAC/DC,0BAA0B,EAAEA,wCAA0B,CAACD;EACzD;AACF,CAAC,CAAC;AAAC,IAAAE,QAAA,GAAArC,OAAA,CAAAoB,OAAA,GA2BYW,iBAAQ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_locusRetry","_interopRequireDefault","require","_locusRouteToken"],"sources":["index.ts"],"sourcesContent":["import LocusRetryStatusInterceptor from './locusRetry';\nimport LocusRouteTokenInterceptor from './locusRouteToken';\n\nexport {LocusRetryStatusInterceptor, LocusRouteTokenInterceptor};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA"}
1
+ {"version":3,"names":["_locusRetry","_interopRequireDefault","require","_locusRouteToken"],"sources":["index.ts"],"sourcesContent":["import LocusRetryStatusInterceptor from './locusRetry';\nimport LocusRouteTokenInterceptor from './locusRouteToken';\n\nexport {LocusRetryStatusInterceptor, LocusRouteTokenInterceptor};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA","ignoreList":[]}
@@ -9,14 +9,14 @@ _Object$defineProperty(exports, "__esModule", {
9
9
  exports.default = void 0;
10
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
11
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
12
- var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
13
12
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
14
13
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
14
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
15
15
  var _weakMap = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/weak-map"));
16
16
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
17
17
  var _httpCore = require("@webex/http-core");
18
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
19
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!
18
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
19
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /*!
20
20
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
21
21
  */
22
22
  var rateLimitExpiryTime = new _weakMap.default();
@@ -24,13 +24,12 @@ var rateLimitExpiryTime = new _weakMap.default();
24
24
  * @class
25
25
  */
26
26
  var LocusRetryStatusInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {
27
- (0, _inherits2.default)(LocusRetryStatusInterceptor, _Interceptor);
28
- var _super = _createSuper(LocusRetryStatusInterceptor);
29
27
  function LocusRetryStatusInterceptor() {
30
28
  (0, _classCallCheck2.default)(this, LocusRetryStatusInterceptor);
31
- return _super.apply(this, arguments);
29
+ return _callSuper(this, LocusRetryStatusInterceptor, arguments);
32
30
  }
33
- (0, _createClass2.default)(LocusRetryStatusInterceptor, [{
31
+ (0, _inherits2.default)(LocusRetryStatusInterceptor, _Interceptor);
32
+ return (0, _createClass2.default)(LocusRetryStatusInterceptor, [{
34
33
  key: "onResponseError",
35
34
  value:
36
35
  /**
@@ -89,6 +88,5 @@ var LocusRetryStatusInterceptor = exports.default = /*#__PURE__*/function (_Inte
89
88
  });
90
89
  }
91
90
  }]);
92
- return LocusRetryStatusInterceptor;
93
91
  }(_httpCore.Interceptor);
94
92
  //# sourceMappingURL=locusRetry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_httpCore","require","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","rateLimitExpiryTime","_weakMap","LocusRetryStatusInterceptor","exports","_Interceptor","_inherits2","_super","_classCallCheck2","_createClass2","key","value","onResponseError","options","reason","statusCode","uri","includes","hasRetriedLocusRequest","get","retryAfterTime","headers","set","_promise","reject","handleRetryRequestLocusServiceError","_this","resolve","timeout","setTimeout","clearTimeout","webex","request","method","body","then","catch","create","Interceptor"],"sources":["locusRetry.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {Interceptor} from '@webex/http-core';\n\nconst rateLimitExpiryTime = new WeakMap();\n/**\n * @class\n */\nexport default class LocusRetryStatusInterceptor extends Interceptor {\n /**\n * @returns {LocusRetryStatusInterceptor}\n */\n static create() {\n // @ts-ignore\n return new LocusRetryStatusInterceptor({webex: this});\n }\n\n /**\n * Handle response errors\n * @param {Object} options\n * @param {WebexHttpError} reason\n * @returns {Promise<WebexHttpError>}\n */\n onResponseError(options, reason) {\n if ((reason.statusCode === 503 || reason.statusCode === 429) && options.uri.includes('locus')) {\n const hasRetriedLocusRequest = rateLimitExpiryTime.get(this);\n const retryAfterTime = options.headers['retry-after'] || 2000;\n\n if (hasRetriedLocusRequest) {\n rateLimitExpiryTime.set(this, false);\n\n return Promise.reject(options);\n }\n rateLimitExpiryTime.set(this, true);\n\n return this.handleRetryRequestLocusServiceError(options, retryAfterTime);\n }\n\n return Promise.reject(reason);\n }\n\n /**\n * Handle retries for locus service unavailable errors\n * @param {Object} options associated with the request\n * @param {number} retryAfterTime retry after time in milliseconds\n * @returns {Promise}\n */\n handleRetryRequestLocusServiceError(options, retryAfterTime) {\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n clearTimeout(timeout);\n\n // @ts-ignore\n this.webex\n .request({\n method: options.method,\n uri: options.uri,\n body: options.body,\n })\n .then(resolve)\n .catch(reject);\n }, retryAfterTime);\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAA6C,SAAAC,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,kBAAA,CAAAO,OAAA,8CAAAI,CAAA,sBAJ7C;AACA;AACA;AAIA,IAAMC,mBAAmB,GAAG,IAAAC,QAAA,CAAAjB,OAAA,CAAY,CAAC;AACzC;AACA;AACA;AAFA,IAGqBkB,2BAA2B,GAAAC,OAAA,CAAAnB,OAAA,0BAAAoB,YAAA;EAAA,IAAAC,UAAA,CAAArB,OAAA,EAAAkB,2BAAA,EAAAE,YAAA;EAAA,IAAAE,MAAA,GAAA7B,YAAA,CAAAyB,2BAAA;EAAA,SAAAA,4BAAA;IAAA,IAAAK,gBAAA,CAAAvB,OAAA,QAAAkB,2BAAA;IAAA,OAAAI,MAAA,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;YACtBjB,GAAG,EAAEH,OAAO,CAACG,GAAG;YAChBkB,IAAI,EAAErB,OAAO,CAACqB;UAChB,CAAC,CAAC,CACDC,IAAI,CAACR,OAAO,CAAC,CACbS,KAAK,CAACZ,MAAM,CAAC;QAClB,CAAC,EAAEJ,cAAc,CAAC;MACpB,CAAC,CAAC;IACJ;EAAC;IAAAV,GAAA;IAAAC,KAAA;IAtDD;AACF;AACA;IACE,SAAA0B,OAAA,EAAgB;MACd;MACA,OAAO,IAAIlC,2BAA2B,CAAC;QAAC4B,KAAK,EAAE;MAAI,CAAC,CAAC;IACvD;EAAC;EAAA,OAAA5B,2BAAA;AAAA,EAPsDmC,qBAAW"}
1
+ {"version":3,"names":["_httpCore","require","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","rateLimitExpiryTime","_weakMap","LocusRetryStatusInterceptor","exports","_Interceptor","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","onResponseError","options","reason","statusCode","uri","includes","hasRetriedLocusRequest","get","retryAfterTime","headers","set","_promise","reject","handleRetryRequestLocusServiceError","_this","resolve","timeout","setTimeout","clearTimeout","webex","request","method","body","then","catch","create","Interceptor"],"sources":["locusRetry.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {Interceptor} from '@webex/http-core';\n\nconst rateLimitExpiryTime = new WeakMap();\n/**\n * @class\n */\nexport default class LocusRetryStatusInterceptor extends Interceptor {\n /**\n * @returns {LocusRetryStatusInterceptor}\n */\n static create() {\n // @ts-ignore\n return new LocusRetryStatusInterceptor({webex: this});\n }\n\n /**\n * Handle response errors\n * @param {Object} options\n * @param {WebexHttpError} reason\n * @returns {Promise<WebexHttpError>}\n */\n onResponseError(options, reason) {\n if ((reason.statusCode === 503 || reason.statusCode === 429) && options.uri.includes('locus')) {\n const hasRetriedLocusRequest = rateLimitExpiryTime.get(this);\n const retryAfterTime = options.headers['retry-after'] || 2000;\n\n if (hasRetriedLocusRequest) {\n rateLimitExpiryTime.set(this, false);\n\n return Promise.reject(options);\n }\n rateLimitExpiryTime.set(this, true);\n\n return this.handleRetryRequestLocusServiceError(options, retryAfterTime);\n }\n\n return Promise.reject(reason);\n }\n\n /**\n * Handle retries for locus service unavailable errors\n * @param {Object} options associated with the request\n * @param {number} retryAfterTime retry after time in milliseconds\n * @returns {Promise}\n */\n handleRetryRequestLocusServiceError(options, retryAfterTime) {\n return new Promise((resolve, reject) => {\n const timeout = setTimeout(() => {\n clearTimeout(timeout);\n\n // @ts-ignore\n this.webex\n .request({\n method: options.method,\n uri: options.uri,\n body: options.body,\n })\n .then(resolve)\n .catch(reject);\n }, retryAfterTime);\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAA6C,SAAAC,WAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,WAAAD,CAAA,OAAAE,gBAAA,CAAAC,OAAA,EAAAH,CAAA,OAAAI,2BAAA,CAAAD,OAAA,EAAAJ,CAAA,EAAAM,yBAAA,KAAAC,kBAAA,CAAAN,CAAA,EAAAC,CAAA,YAAAC,gBAAA,CAAAC,OAAA,EAAAJ,CAAA,EAAAQ,WAAA,IAAAP,CAAA,CAAAQ,KAAA,CAAAT,CAAA,EAAAE,CAAA;AAAA,SAAAI,0BAAA,cAAAN,CAAA,IAAAU,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAN,kBAAA,CAAAG,OAAA,iCAAAV,CAAA,aAAAM,yBAAA,YAAAA,0BAAA,aAAAN,CAAA,UAJ7C;AACA;AACA;AAIA,IAAMc,mBAAmB,GAAG,IAAAC,QAAA,CAAAX,OAAA,CAAY,CAAC;AACzC;AACA;AACA;AAFA,IAGqBY,2BAA2B,GAAAC,OAAA,CAAAb,OAAA,0BAAAc,YAAA;EAAA,SAAAF,4BAAA;IAAA,IAA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,YAAM;UAC/BC,YAAY,CAACF,OAAO,CAAC;;UAErB;UACAF,KAAI,CAACK,KAAK,CACPC,OAAO,CAAC;YACPC,MAAM,EAAEpB,OAAO,CAACoB,MAAM;YACtBjB,GAAG,EAAEH,OAAO,CAACG,GAAG;YAChBkB,IAAI,EAAErB,OAAO,CAACqB;UAChB,CAAC,CAAC,CACDC,IAAI,CAACR,OAAO,CAAC,CACbS,KAAK,CAACZ,MAAM,CAAC;QAClB,CAAC,EAAEJ,cAAc,CAAC;MACpB,CAAC,CAAC;IACJ;EAAC;IAAAV,GAAA;IAAAC,KAAA;IAtDD;AACF;AACA;IACE,SAAO0B,MAAMA,CAAA,EAAG;MACd;MACA,OAAO,IAAIlC,2BAA2B,CAAC;QAAC4B,KAAK,EAAE;MAAI,CAAC,CAAC;IACvD;EAAC;AAAA,EAPsDO,qBAAW","ignoreList":[]}
@@ -10,13 +10,13 @@ exports.default = void 0;
10
10
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
11
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
12
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
13
- var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
14
13
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
15
14
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
15
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
16
16
  var _httpCore = require("@webex/http-core");
17
17
  var _lodash = require("lodash");
18
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
19
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /*!
18
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
19
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /*!
20
20
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
21
21
  */
22
22
  var LOCUS_ID_REGEX = /\/locus\/api\/v1\/loci\/([a-f0-9-]{36})/i;
@@ -27,13 +27,12 @@ var ROUTE_TOKEN = {};
27
27
  * @class LocusRouteTokenInterceptor
28
28
  */
29
29
  var LocusRouteTokenInterceptor = exports.default = /*#__PURE__*/function (_Interceptor) {
30
- (0, _inherits2.default)(LocusRouteTokenInterceptor, _Interceptor);
31
- var _super = _createSuper(LocusRouteTokenInterceptor);
32
30
  function LocusRouteTokenInterceptor() {
33
31
  (0, _classCallCheck2.default)(this, LocusRouteTokenInterceptor);
34
- return _super.apply(this, arguments);
32
+ return _callSuper(this, LocusRouteTokenInterceptor, arguments);
35
33
  }
36
- (0, _createClass2.default)(LocusRouteTokenInterceptor, [{
34
+ (0, _inherits2.default)(LocusRouteTokenInterceptor, _Interceptor);
35
+ return (0, _createClass2.default)(LocusRouteTokenInterceptor, [{
37
36
  key: "getLocusIdByRequestUrl",
38
37
  value: function getLocusIdByRequestUrl(url) {
39
38
  var _url$match;
@@ -111,6 +110,5 @@ var LocusRouteTokenInterceptor = exports.default = /*#__PURE__*/function (_Inter
111
110
  });
112
111
  }
113
112
  }]);
114
- return LocusRouteTokenInterceptor;
115
113
  }(_httpCore.Interceptor);
116
114
  //# sourceMappingURL=locusRouteToken.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_httpCore","require","_lodash","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","LOCUS_ID_REGEX","X_CISCO_PART_ROUTE_TOKEN","ROUTE_TOKEN","LocusRouteTokenInterceptor","exports","_Interceptor","_inherits2","_super","_classCallCheck2","_createClass2","key","value","getLocusIdByRequestUrl","url","_url$match","match","onResponse","options","response","locusId","uri","hasRouteToken","has","headers","token","updateToken","_promise","resolve","onRequest","getToken","create","webex","Interceptor"],"sources":["locusRouteToken.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {Interceptor} from '@webex/http-core';\nimport {has} from 'lodash';\n\nconst LOCUS_ID_REGEX = /\\/locus\\/api\\/v1\\/loci\\/([a-f0-9-]{36})/i;\nconst X_CISCO_PART_ROUTE_TOKEN = 'X-Cisco-Part-Route-Token';\nconst ROUTE_TOKEN = {};\n\n/**\n * @class LocusRouteTokenInterceptor\n */\nexport default class LocusRouteTokenInterceptor extends Interceptor {\n /**\n * @returns {LocusRouteTokenInterceptor}\n */\n static create() {\n // @ts-ignore\n return new LocusRouteTokenInterceptor({webex: this});\n }\n\n getLocusIdByRequestUrl(url: string) {\n return url?.match(LOCUS_ID_REGEX)?.[1];\n }\n\n /**\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Promise<HttpResponse>}\n */\n onResponse(options, response) {\n const locusId = this.getLocusIdByRequestUrl(options.uri);\n if (locusId) {\n const hasRouteToken = has(response.headers, X_CISCO_PART_ROUTE_TOKEN);\n const token = response.headers[X_CISCO_PART_ROUTE_TOKEN];\n if (hasRouteToken) {\n this.updateToken(locusId, token);\n }\n }\n\n return Promise.resolve(response);\n }\n\n /**\n * @param {Object} options\n * @returns {Promise<Object>} options\n */\n onRequest(options) {\n const locusId = this.getLocusIdByRequestUrl(options.uri);\n if (locusId) {\n const token = this.getToken(locusId);\n if (token) {\n options.headers[X_CISCO_PART_ROUTE_TOKEN] = token;\n }\n }\n\n return Promise.resolve(options);\n }\n\n /**\n * Update the meeting route token\n * @param {string} locusId\n * @param {string} token\n * @returns {void}\n */\n updateToken(locusId, token) {\n ROUTE_TOKEN[locusId] = token;\n }\n\n /**\n * Get the meeting route token\n * @param {string} locusId\n * @returns {string|undefined}\n */\n getToken(locusId) {\n return ROUTE_TOKEN[locusId];\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAA2B,SAAAE,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,kBAAA,CAAAO,OAAA,8CAAAI,CAAA,sBAL3B;AACA;AACA;AAKA,IAAMC,cAAc,GAAG,0CAA0C;AACjE,IAAMC,wBAAwB,GAAG,0BAA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AiB,UAAUX,OAAO,EAAE;MACjB,IAAME,OAAO,GAAG,IAAI,CAACP,sBAAsB,CAACK,OAAO,CAACG,GAAG,CAAC;MACxD,IAAID,OAAO,EAAE;QACX,IAAMK,KAAK,GAAG,IAAI,CAACK,QAAQ,CAACV,OAAO,CAAC;QACpC,IAAIK,KAAK,EAAE;UACTP,OAAO,CAACM,OAAO,CAACtB,wBAAwB,CAAC,GAAGuB,KAAK;QACnD;MACF;MAEA,OAAOE,QAAA,CAAA1C,OAAA,CAAQ2C,OAAO,CAACV,OAAO,CAAC;IACjC;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAP,GAAA;IAAAC,KAAA,EAMA,SAAAc,YAAYN,OAAO,EAAEK,KAAK,EAAE;MAC1BtB,WAAW,CAACiB,OAAO,CAAC,GAAGK,KAAK;IAC9B;;IAEA;AACF;AACA;AACA;AACA;EAJE;IAAAd,GAAA;IAAAC,KAAA,EAKA,SAAAkB,SAASV,OAAO,EAAE;MAChB,OAAOjB,WAAW,CAACiB,OAAO,CAAC;IAC7B;EAAC;IAAAT,GAAA;IAAAC,KAAA;IA/DD;AACF;AACA;IACE,SAAAmB,OAAA,EAAgB;MACd;MACA,OAAO,IAAI3B,0BAA0B,CAAC;QAAC4B,KAAK,EAAE;MAAI,CAAC,CAAC;IACtD;EAAC;EAAA,OAAA5B,0BAAA;AAAA,EAPqD6B,qBAAW"}
1
+ {"version":3,"names":["_httpCore","require","_lodash","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","LOCUS_ID_REGEX","X_CISCO_PART_ROUTE_TOKEN","ROUTE_TOKEN","LocusRouteTokenInterceptor","exports","_Interceptor","_classCallCheck2","arguments","_inherits2","_createClass2","key","value","getLocusIdByRequestUrl","url","_url$match","match","onResponse","options","response","locusId","uri","hasRouteToken","has","headers","token","updateToken","_promise","resolve","onRequest","getToken","create","webex","Interceptor"],"sources":["locusRouteToken.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport {Interceptor} from '@webex/http-core';\nimport {has} from 'lodash';\n\nconst LOCUS_ID_REGEX = /\\/locus\\/api\\/v1\\/loci\\/([a-f0-9-]{36})/i;\nconst X_CISCO_PART_ROUTE_TOKEN = 'X-Cisco-Part-Route-Token';\nconst ROUTE_TOKEN = {};\n\n/**\n * @class LocusRouteTokenInterceptor\n */\nexport default class LocusRouteTokenInterceptor extends Interceptor {\n /**\n * @returns {LocusRouteTokenInterceptor}\n */\n static create() {\n // @ts-ignore\n return new LocusRouteTokenInterceptor({webex: this});\n }\n\n getLocusIdByRequestUrl(url: string) {\n return url?.match(LOCUS_ID_REGEX)?.[1];\n }\n\n /**\n * @param {Object} options\n * @param {HttpResponse} response\n * @returns {Promise<HttpResponse>}\n */\n onResponse(options, response) {\n const locusId = this.getLocusIdByRequestUrl(options.uri);\n if (locusId) {\n const hasRouteToken = has(response.headers, X_CISCO_PART_ROUTE_TOKEN);\n const token = response.headers[X_CISCO_PART_ROUTE_TOKEN];\n if (hasRouteToken) {\n this.updateToken(locusId, token);\n }\n }\n\n return Promise.resolve(response);\n }\n\n /**\n * @param {Object} options\n * @returns {Promise<Object>} options\n */\n onRequest(options) {\n const locusId = this.getLocusIdByRequestUrl(options.uri);\n if (locusId) {\n const token = this.getToken(locusId);\n if (token) {\n options.headers[X_CISCO_PART_ROUTE_TOKEN] = token;\n }\n }\n\n return Promise.resolve(options);\n }\n\n /**\n * Update the meeting route token\n * @param {string} locusId\n * @param {string} token\n * @returns {void}\n */\n updateToken(locusId, token) {\n ROUTE_TOKEN[locusId] = token;\n }\n\n /**\n * Get the meeting route token\n * @param {string} locusId\n * @returns {string|undefined}\n */\n getToken(locusId) {\n return ROUTE_TOKEN[locusId];\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GA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AC,KAAA;IA/DD;AACF;AACA;IACE,SAAOmB,MAAMA,CAAA,EAAG;MACd;MACA,OAAO,IAAI3B,0BAA0B,CAAC;QAAC4B,KAAK,EAAE;MAAI,CAAC,CAAC;IACtD;EAAC;AAAA,EAPqDC,qBAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_ampersandCollection","_interopRequireDefault","require","_constants","_siLanguage","SILanguageCollection","AmpCollection","extend","model","SILanguage","namespace","MEETINGS","mainIndex","_default","exports","default"],"sources":["collection.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport AmpCollection from 'ampersand-collection';\n\nimport {MEETINGS} from '../constants';\n\nimport SILanguage from './siLanguage';\n\nconst SILanguageCollection = AmpCollection.extend({\n model: SILanguage,\n\n namespace: MEETINGS,\n\n mainIndex: 'languageName',\n});\n\nexport default SILanguageCollection;\n"],"mappings":";;;;;;;;AAIA,IAAAA,oBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AARA;AACA;AACA;;AAQA,IAAMG,oBAAoB,GAAGC,4BAAa,CAACC,MAAM,CAAC;EAChDC,KAAK,EAAEC,mBAAU;EAEjBC,SAAS,EAAEC,mBAAQ;EAEnBC,SAAS,EAAE;AACb,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEYV,oBAAoB"}
1
+ {"version":3,"names":["_ampersandCollection","_interopRequireDefault","require","_constants","_siLanguage","SILanguageCollection","AmpCollection","extend","model","SILanguage","namespace","MEETINGS","mainIndex","_default","exports","default"],"sources":["collection.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.\n */\n\nimport AmpCollection from 'ampersand-collection';\n\nimport {MEETINGS} from '../constants';\n\nimport SILanguage from './siLanguage';\n\nconst SILanguageCollection = AmpCollection.extend({\n model: SILanguage,\n\n namespace: MEETINGS,\n\n mainIndex: 'languageName',\n});\n\nexport default SILanguageCollection;\n"],"mappings":";;;;;;;;AAIA,IAAAA,oBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AARA;AACA;AACA;;AAQA,IAAMG,oBAAoB,GAAGC,4BAAa,CAACC,MAAM,CAAC;EAChDC,KAAK,EAAEC,mBAAU;EAEjBC,SAAS,EAAEC,mBAAQ;EAEnBC,SAAS,EAAE;AACb,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEYV,oBAAoB","ignoreList":[]}
@@ -52,7 +52,6 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
52
52
  // appears the meeting host/interpreter feature of SI enabled
53
53
  selfIsInterpreter: 'boolean' // current user is interpreter or not
54
54
  },
55
-
56
55
  derived: {
57
56
  shouldQuerySupportLanguages: {
58
57
  cache: false,
@@ -373,7 +372,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
373
372
  throw error;
374
373
  });
375
374
  },
376
- version: "3.10.0-next.7"
375
+ version: "3.10.0-next.9"
377
376
  });
378
377
  var _default = exports.default = SimultaneousInterpretation;
379
378
  //# sourceMappingURL=index.js.map