@webex/calling 3.12.0-task-refactor.1 → 3.12.0-webex-services-ready.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (259) hide show
  1. package/dist/CallHistory/CallHistory.js +68 -51
  2. package/dist/CallHistory/CallHistory.js.map +1 -1
  3. package/dist/CallRecording/CallRecording.js +160 -0
  4. package/dist/CallRecording/CallRecording.js.map +1 -0
  5. package/dist/CallRecording/CallRecording.test.js +257 -0
  6. package/dist/CallRecording/CallRecording.test.js.map +1 -0
  7. package/dist/CallRecording/WxcCallRecordingConnector.js +577 -0
  8. package/dist/CallRecording/WxcCallRecordingConnector.js.map +1 -0
  9. package/dist/CallRecording/WxcCallRecordingConnector.test.js +652 -0
  10. package/dist/CallRecording/WxcCallRecordingConnector.test.js.map +1 -0
  11. package/dist/CallRecording/callRecordingFixtures.js +235 -0
  12. package/dist/CallRecording/callRecordingFixtures.js.map +1 -0
  13. package/dist/CallRecording/constants.js +50 -0
  14. package/dist/CallRecording/constants.js.map +1 -0
  15. package/dist/CallRecording/types.js +137 -0
  16. package/dist/CallRecording/types.js.map +1 -0
  17. package/dist/CallRecording/utils.js +42 -0
  18. package/dist/CallRecording/utils.js.map +1 -0
  19. package/dist/CallRecording/utils.test.js +97 -0
  20. package/dist/CallRecording/utils.test.js.map +1 -0
  21. package/dist/CallingClient/CallingClient.js +520 -193
  22. package/dist/CallingClient/CallingClient.js.map +1 -1
  23. package/dist/CallingClient/CallingClient.test.js +607 -133
  24. package/dist/CallingClient/CallingClient.test.js.map +1 -1
  25. package/dist/CallingClient/calling/call.js +599 -454
  26. package/dist/CallingClient/calling/call.js.map +1 -1
  27. package/dist/CallingClient/calling/call.test.js +834 -443
  28. package/dist/CallingClient/calling/call.test.js.map +1 -1
  29. package/dist/CallingClient/calling/callManager.js +88 -31
  30. package/dist/CallingClient/calling/callManager.js.map +1 -1
  31. package/dist/CallingClient/calling/callManager.test.js +123 -0
  32. package/dist/CallingClient/calling/callManager.test.js.map +1 -1
  33. package/dist/CallingClient/calling/types.js +2 -0
  34. package/dist/CallingClient/calling/types.js.map +1 -1
  35. package/dist/CallingClient/constants.js +30 -3
  36. package/dist/CallingClient/constants.js.map +1 -1
  37. package/dist/CallingClient/line/index.js +4 -1
  38. package/dist/CallingClient/line/index.js.map +1 -1
  39. package/dist/CallingClient/line/line.test.js +16 -1
  40. package/dist/CallingClient/line/line.test.js.map +1 -1
  41. package/dist/CallingClient/registration/register.js +740 -407
  42. package/dist/CallingClient/registration/register.js.map +1 -1
  43. package/dist/CallingClient/registration/register.test.js +380 -58
  44. package/dist/CallingClient/registration/register.test.js.map +1 -1
  45. package/dist/CallingClient/registration/types.js.map +1 -1
  46. package/dist/CallingClient/registration/webWorker.js +41 -104
  47. package/dist/CallingClient/registration/webWorker.js.map +1 -1
  48. package/dist/CallingClient/registration/webWorker.test.js +39 -153
  49. package/dist/CallingClient/registration/webWorker.test.js.map +1 -1
  50. package/dist/CallingClient/registration/webWorkerStr.js +1 -1
  51. package/dist/CallingClient/registration/webWorkerStr.js.map +1 -1
  52. package/dist/CallingClient/types.js.map +1 -1
  53. package/dist/CallingClient/utils/constants.js +58 -0
  54. package/dist/CallingClient/utils/constants.js.map +1 -0
  55. package/dist/CallingClient/utils/index.js +63 -0
  56. package/dist/CallingClient/utils/index.js.map +1 -0
  57. package/dist/CallingClient/utils/mobiusSocketMapper.js +122 -0
  58. package/dist/CallingClient/utils/mobiusSocketMapper.js.map +1 -0
  59. package/dist/CallingClient/utils/mobiusSocketMapper.test.js +221 -0
  60. package/dist/CallingClient/utils/mobiusSocketMapper.test.js.map +1 -0
  61. package/dist/CallingClient/utils/request.js +435 -0
  62. package/dist/CallingClient/utils/request.js.map +1 -0
  63. package/dist/CallingClient/utils/request.test.js +999 -0
  64. package/dist/CallingClient/utils/request.test.js.map +1 -0
  65. package/dist/CallingClient/utils/types.js +7 -0
  66. package/dist/CallingClient/utils/types.js.map +1 -0
  67. package/dist/CallingClient/utils/wsFeatureFlag.js +70 -0
  68. package/dist/CallingClient/utils/wsFeatureFlag.js.map +1 -0
  69. package/dist/CallingClient/utils/wsFeatureFlag.test.js +139 -0
  70. package/dist/CallingClient/utils/wsFeatureFlag.test.js.map +1 -0
  71. package/dist/Contacts/ContactsClient.js +13 -11
  72. package/dist/Contacts/ContactsClient.js.map +1 -1
  73. package/dist/Contacts/ContactsClient.test.js +3 -8
  74. package/dist/Contacts/ContactsClient.test.js.map +1 -1
  75. package/dist/Events/types.js +38 -11
  76. package/dist/Events/types.js.map +1 -1
  77. package/dist/Metrics/index.js +63 -2
  78. package/dist/Metrics/index.js.map +1 -1
  79. package/dist/Metrics/index.test.js +357 -1
  80. package/dist/Metrics/index.test.js.map +1 -1
  81. package/dist/Metrics/types.js +19 -1
  82. package/dist/Metrics/types.js.map +1 -1
  83. package/dist/SDKConnector/types.js.map +1 -1
  84. package/dist/api.js +56 -0
  85. package/dist/api.js.map +1 -1
  86. package/dist/common/Utils.js +161 -53
  87. package/dist/common/Utils.js.map +1 -1
  88. package/dist/common/Utils.test.js +207 -46
  89. package/dist/common/Utils.test.js.map +1 -1
  90. package/dist/common/testUtil.js +10 -5
  91. package/dist/common/testUtil.js.map +1 -1
  92. package/dist/common/types.js +3 -0
  93. package/dist/common/types.js.map +1 -1
  94. package/dist/index.js +165 -40
  95. package/dist/index.js.map +1 -1
  96. package/dist/mobius-socket/config.js +24 -0
  97. package/dist/mobius-socket/config.js.map +1 -0
  98. package/dist/mobius-socket/errors.js +143 -0
  99. package/dist/mobius-socket/errors.js.map +1 -0
  100. package/dist/mobius-socket/errors.test.js +20 -0
  101. package/dist/mobius-socket/errors.test.js.map +1 -0
  102. package/dist/mobius-socket/index.js +57 -0
  103. package/dist/mobius-socket/index.js.map +1 -0
  104. package/dist/mobius-socket/mobius-socket-events.test.js +492 -0
  105. package/dist/mobius-socket/mobius-socket-events.test.js.map +1 -0
  106. package/dist/mobius-socket/mobius-socket.js +849 -0
  107. package/dist/mobius-socket/mobius-socket.js.map +1 -0
  108. package/dist/mobius-socket/mobius-socket.test.js +1898 -0
  109. package/dist/mobius-socket/mobius-socket.test.js.map +1 -0
  110. package/dist/mobius-socket/socket/constants.js +55 -0
  111. package/dist/mobius-socket/socket/constants.js.map +1 -0
  112. package/dist/mobius-socket/socket/index.js +15 -0
  113. package/dist/mobius-socket/socket/index.js.map +1 -0
  114. package/dist/mobius-socket/socket/socket-base.js +604 -0
  115. package/dist/mobius-socket/socket/socket-base.js.map +1 -0
  116. package/dist/mobius-socket/socket/socket.js +19 -0
  117. package/dist/mobius-socket/socket/socket.js.map +1 -0
  118. package/dist/mobius-socket/socket/socket.shim.js +26 -0
  119. package/dist/mobius-socket/socket/socket.shim.js.map +1 -0
  120. package/dist/mobius-socket/socket/types.js +7 -0
  121. package/dist/mobius-socket/socket/types.js.map +1 -0
  122. package/dist/mobius-socket/socket.test.js +727 -0
  123. package/dist/mobius-socket/socket.test.js.map +1 -0
  124. package/dist/mobius-socket/test/mocha-helpers.js +23 -0
  125. package/dist/mobius-socket/test/mocha-helpers.js.map +1 -0
  126. package/dist/mobius-socket/test/promise-tick.js +28 -0
  127. package/dist/mobius-socket/test/promise-tick.js.map +1 -0
  128. package/dist/mobius-socket/types.js +7 -0
  129. package/dist/mobius-socket/types.js.map +1 -0
  130. package/dist/module/CallHistory/CallHistory.js +28 -17
  131. package/dist/module/CallRecording/CallRecording.js +56 -0
  132. package/dist/module/CallRecording/WxcCallRecordingConnector.js +257 -0
  133. package/dist/module/CallRecording/callRecordingFixtures.js +201 -0
  134. package/dist/module/CallRecording/constants.js +28 -0
  135. package/dist/module/CallRecording/types.js +19 -0
  136. package/dist/module/CallRecording/utils.js +14 -0
  137. package/dist/module/CallingClient/CallingClient.js +166 -8
  138. package/dist/module/CallingClient/calling/call.js +181 -64
  139. package/dist/module/CallingClient/calling/callManager.js +46 -7
  140. package/dist/module/CallingClient/calling/types.js +2 -0
  141. package/dist/module/CallingClient/constants.js +26 -0
  142. package/dist/module/CallingClient/line/index.js +2 -2
  143. package/dist/module/CallingClient/registration/register.js +247 -63
  144. package/dist/module/CallingClient/registration/webWorker.js +42 -61
  145. package/dist/module/CallingClient/registration/webWorkerStr.js +47 -82
  146. package/dist/module/CallingClient/utils/constants.js +36 -0
  147. package/dist/module/CallingClient/utils/index.js +5 -0
  148. package/dist/module/CallingClient/utils/mobiusSocketMapper.js +72 -0
  149. package/dist/module/CallingClient/utils/request.js +211 -0
  150. package/dist/module/CallingClient/utils/types.js +1 -0
  151. package/dist/module/CallingClient/utils/wsFeatureFlag.js +41 -0
  152. package/dist/module/Contacts/ContactsClient.js +1 -1
  153. package/dist/module/Events/types.js +23 -10
  154. package/dist/module/Metrics/index.js +48 -1
  155. package/dist/module/Metrics/types.js +18 -0
  156. package/dist/module/api.js +3 -2
  157. package/dist/module/common/Utils.js +65 -18
  158. package/dist/module/common/testUtil.js +6 -1
  159. package/dist/module/common/types.js +3 -0
  160. package/dist/module/index.js +7 -3
  161. package/dist/module/mobius-socket/config.js +15 -0
  162. package/dist/module/mobius-socket/errors.js +58 -0
  163. package/dist/module/mobius-socket/index.js +24 -0
  164. package/dist/module/mobius-socket/mobius-socket.js +593 -0
  165. package/dist/module/mobius-socket/socket/constants.js +26 -0
  166. package/dist/module/mobius-socket/socket/index.js +4 -0
  167. package/dist/module/mobius-socket/socket/socket-base.js +368 -0
  168. package/dist/module/mobius-socket/socket/socket.js +9 -0
  169. package/dist/module/mobius-socket/socket/socket.shim.js +12 -0
  170. package/dist/module/mobius-socket/socket/types.js +1 -0
  171. package/dist/module/mobius-socket/types.js +1 -0
  172. package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
  173. package/dist/types/CallRecording/CallRecording.d.ts +18 -0
  174. package/dist/types/CallRecording/CallRecording.d.ts.map +1 -0
  175. package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts +23 -0
  176. package/dist/types/CallRecording/WxcCallRecordingConnector.d.ts.map +1 -0
  177. package/dist/types/CallRecording/callRecordingFixtures.d.ts +61 -0
  178. package/dist/types/CallRecording/callRecordingFixtures.d.ts.map +1 -0
  179. package/dist/types/CallRecording/constants.d.ts +29 -0
  180. package/dist/types/CallRecording/constants.d.ts.map +1 -0
  181. package/dist/types/CallRecording/types.d.ts +176 -0
  182. package/dist/types/CallRecording/types.d.ts.map +1 -0
  183. package/dist/types/CallRecording/utils.d.ts +3 -0
  184. package/dist/types/CallRecording/utils.d.ts.map +1 -0
  185. package/dist/types/CallingClient/CallingClient.d.ts +10 -1
  186. package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
  187. package/dist/types/CallingClient/calling/call.d.ts +12 -0
  188. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  189. package/dist/types/CallingClient/calling/callManager.d.ts +4 -2
  190. package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
  191. package/dist/types/CallingClient/calling/types.d.ts +34 -9
  192. package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
  193. package/dist/types/CallingClient/constants.d.ts +26 -0
  194. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  195. package/dist/types/CallingClient/line/index.d.ts +1 -1
  196. package/dist/types/CallingClient/line/index.d.ts.map +1 -1
  197. package/dist/types/CallingClient/registration/register.d.ts +9 -2
  198. package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
  199. package/dist/types/CallingClient/registration/types.d.ts +6 -3
  200. package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
  201. package/dist/types/CallingClient/registration/webWorker.d.ts.map +1 -1
  202. package/dist/types/CallingClient/registration/webWorkerStr.d.ts +1 -1
  203. package/dist/types/CallingClient/registration/webWorkerStr.d.ts.map +1 -1
  204. package/dist/types/CallingClient/types.d.ts +3 -1
  205. package/dist/types/CallingClient/types.d.ts.map +1 -1
  206. package/dist/types/CallingClient/utils/constants.d.ts +35 -0
  207. package/dist/types/CallingClient/utils/constants.d.ts.map +1 -0
  208. package/dist/types/CallingClient/utils/index.d.ts +6 -0
  209. package/dist/types/CallingClient/utils/index.d.ts.map +1 -0
  210. package/dist/types/CallingClient/utils/mobiusSocketMapper.d.ts +5 -0
  211. package/dist/types/CallingClient/utils/mobiusSocketMapper.d.ts.map +1 -0
  212. package/dist/types/CallingClient/utils/request.d.ts +28 -0
  213. package/dist/types/CallingClient/utils/request.d.ts.map +1 -0
  214. package/dist/types/CallingClient/utils/types.d.ts +34 -0
  215. package/dist/types/CallingClient/utils/types.d.ts.map +1 -0
  216. package/dist/types/CallingClient/utils/wsFeatureFlag.d.ts +4 -0
  217. package/dist/types/CallingClient/utils/wsFeatureFlag.d.ts.map +1 -0
  218. package/dist/types/Events/types.d.ts +79 -15
  219. package/dist/types/Events/types.d.ts.map +1 -1
  220. package/dist/types/Metrics/index.d.ts.map +1 -1
  221. package/dist/types/Metrics/types.d.ts +19 -2
  222. package/dist/types/Metrics/types.d.ts.map +1 -1
  223. package/dist/types/SDKConnector/types.d.ts +39 -12
  224. package/dist/types/SDKConnector/types.d.ts.map +1 -1
  225. package/dist/types/api.d.ts +6 -4
  226. package/dist/types/api.d.ts.map +1 -1
  227. package/dist/types/common/Utils.d.ts +11 -3
  228. package/dist/types/common/Utils.d.ts.map +1 -1
  229. package/dist/types/common/testUtil.d.ts +5 -1
  230. package/dist/types/common/testUtil.d.ts.map +1 -1
  231. package/dist/types/common/types.d.ts +9 -1
  232. package/dist/types/common/types.d.ts.map +1 -1
  233. package/dist/types/index.d.ts +8 -3
  234. package/dist/types/index.d.ts.map +1 -1
  235. package/dist/types/mobius-socket/config.d.ts +17 -0
  236. package/dist/types/mobius-socket/config.d.ts.map +1 -0
  237. package/dist/types/mobius-socket/errors.d.ts +32 -0
  238. package/dist/types/mobius-socket/errors.d.ts.map +1 -0
  239. package/dist/types/mobius-socket/index.d.ts +14 -0
  240. package/dist/types/mobius-socket/index.d.ts.map +1 -0
  241. package/dist/types/mobius-socket/mobius-socket.d.ts +48 -0
  242. package/dist/types/mobius-socket/mobius-socket.d.ts.map +1 -0
  243. package/dist/types/mobius-socket/socket/constants.d.ts +27 -0
  244. package/dist/types/mobius-socket/socket/constants.d.ts.map +1 -0
  245. package/dist/types/mobius-socket/socket/index.d.ts +5 -0
  246. package/dist/types/mobius-socket/socket/index.d.ts.map +1 -0
  247. package/dist/types/mobius-socket/socket/socket-base.d.ts +43 -0
  248. package/dist/types/mobius-socket/socket/socket-base.d.ts.map +1 -0
  249. package/dist/types/mobius-socket/socket/socket.d.ts +6 -0
  250. package/dist/types/mobius-socket/socket/socket.d.ts.map +1 -0
  251. package/dist/types/mobius-socket/socket/socket.shim.d.ts +6 -0
  252. package/dist/types/mobius-socket/socket/socket.shim.d.ts.map +1 -0
  253. package/dist/types/mobius-socket/socket/types.d.ts +61 -0
  254. package/dist/types/mobius-socket/socket/types.d.ts.map +1 -0
  255. package/dist/types/mobius-socket/types.d.ts +21 -0
  256. package/dist/types/mobius-socket/types.d.ts.map +1 -0
  257. package/package.json +20 -5
  258. package/src/mobius-socket/socket/socket.shim.ts +22 -0
  259. package/src/mobius-socket/socket/socket.ts +14 -0
@@ -0,0 +1,577 @@
1
+ "use strict";
2
+
3
+ var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
4
+ var _Object$keys = require("@babel/runtime-corejs2/core-js/object/keys");
5
+ var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs2/core-js/object/get-own-property-symbols");
6
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptor");
7
+ var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
8
+ var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
9
+ var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
10
+ var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
11
+ _Object$defineProperty(exports, "__esModule", {
12
+ value: true
13
+ });
14
+ exports.WxcCallRecordingConnector = void 0;
15
+ var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
16
+ var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
17
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/slicedToArray"));
18
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
19
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
20
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
21
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
22
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
23
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
24
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
25
+ var _SDKConnector = _interopRequireDefault(require("../SDKConnector"));
26
+ var _types = require("../common/types");
27
+ var _Logger = _interopRequireDefault(require("../Logger"));
28
+ var _Utils = require("../common/Utils");
29
+ var _constants = require("../common/constants");
30
+ var _types2 = require("../Events/types");
31
+ var _impl = require("../Events/impl");
32
+ var _types3 = require("./types");
33
+ var _constants2 = require("./constants");
34
+ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
35
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
36
+ 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)); }
37
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable dot-notation */ /* eslint-disable no-underscore-dangle */
38
+ /**
39
+ * Webex Calling (WXC) backend connector for Post Call Recording.
40
+ *
41
+ * Owns everything backend-specific for the Webex Calling cloud `convergedRecordings` capability:
42
+ * resolving the hydra developer API base URL from the u2c catalog, the REST read/delete calls, and
43
+ * subscribing to the `convergedRecordings.*` Mercury events (re-emitting them as typed
44
+ * `callRecording:*` events). The {@link CallRecording} facade selects this connector when the
45
+ * resolved calling backend is WXC.
46
+ */
47
+ var WxcCallRecordingConnector = exports.WxcCallRecordingConnector = /*#__PURE__*/function (_Eventing) {
48
+ /**
49
+ * @param webex - `Webex SDK` instance.
50
+ * @param logger - Logger interface used to set the log level for the module.
51
+ */
52
+ function WxcCallRecordingConnector(webex, logger) {
53
+ var _this$webex$internal$, _this$webex$internal$2;
54
+ var _this;
55
+ (0, _classCallCheck2.default)(this, WxcCallRecordingConnector);
56
+ _this = _callSuper(this, WxcCallRecordingConnector);
57
+ (0, _defineProperty2.default)(_this, "sdkConnector", void 0);
58
+ (0, _defineProperty2.default)(_this, "webex", void 0);
59
+ (0, _defineProperty2.default)(_this, "recordingServiceUrl", void 0);
60
+ // `event` is optional because SDKConnector.registerListener invokes callbacks as `(data?: T)`.
61
+ // `data` uses optional chaining at runtime because malformed Mercury payloads may omit it.
62
+ (0, _defineProperty2.default)(_this, "handleRecordingCreatedEvent", /*#__PURE__*/function () {
63
+ var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(event) {
64
+ var _event$data;
65
+ return _regenerator.default.wrap(function (_context) {
66
+ while (1) switch (_context.prev = _context.next) {
67
+ case 0:
68
+ if (event !== null && event !== void 0 && (_event$data = event.data) !== null && _event$data !== void 0 && _event$data.activity) {
69
+ _context.next = 1;
70
+ break;
71
+ }
72
+ return _context.abrupt("return");
73
+ case 1:
74
+ _this.emit(_types2.COMMON_EVENT_KEYS.CALL_RECORDING_CREATED, event);
75
+ case 2:
76
+ case "end":
77
+ return _context.stop();
78
+ }
79
+ }, _callee);
80
+ }));
81
+ return function (_x) {
82
+ return _ref.apply(this, arguments);
83
+ };
84
+ }());
85
+ /**
86
+ * The backend expresses the full recording lifecycle through `convergedRecordings.updated` events
87
+ * qualified by an `eventSubType` (rather than dedicated created/deleted events):
88
+ * - `TRASH` (soft delete) / `PURGE` (permanent delete) -> surfaced as `callRecording:deleted`
89
+ * so consumers can drop the recording from the active list.
90
+ * - `RESTORE` (restored from trash) -> surfaced as `callRecording:created` so it is re-added.
91
+ * - `SUMMARY_CREATE` (AI summary/transcript ready) and anything else -> `callRecording:updated`.
92
+ *
93
+ * The full event (including `data.eventSubType`) is always forwarded, so consumers that need to
94
+ * distinguish a soft delete from a permanent purge can still inspect it.
95
+ */
96
+ (0, _defineProperty2.default)(_this, "handleRecordingUpdatedEvent", /*#__PURE__*/function () {
97
+ var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2(event) {
98
+ var _event$data2;
99
+ var _t;
100
+ return _regenerator.default.wrap(function (_context2) {
101
+ while (1) switch (_context2.prev = _context2.next) {
102
+ case 0:
103
+ if (event !== null && event !== void 0 && (_event$data2 = event.data) !== null && _event$data2 !== void 0 && _event$data2.activity) {
104
+ _context2.next = 1;
105
+ break;
106
+ }
107
+ return _context2.abrupt("return");
108
+ case 1:
109
+ _t = event.data.eventSubType;
110
+ _context2.next = _t === _types2.RECORDING_EVENT_SUBTYPE.TRASH ? 2 : _t === _types2.RECORDING_EVENT_SUBTYPE.PURGE ? 2 : _t === _types2.RECORDING_EVENT_SUBTYPE.RESTORE ? 3 : 4;
111
+ break;
112
+ case 2:
113
+ _this.emit(_types2.COMMON_EVENT_KEYS.CALL_RECORDING_DELETED, event);
114
+ return _context2.abrupt("continue", 5);
115
+ case 3:
116
+ _this.emit(_types2.COMMON_EVENT_KEYS.CALL_RECORDING_CREATED, event);
117
+ return _context2.abrupt("continue", 5);
118
+ case 4:
119
+ _this.emit(_types2.COMMON_EVENT_KEYS.CALL_RECORDING_UPDATED, event);
120
+ case 5:
121
+ case "end":
122
+ return _context2.stop();
123
+ }
124
+ }, _callee2);
125
+ }));
126
+ return function (_x2) {
127
+ return _ref2.apply(this, arguments);
128
+ };
129
+ }());
130
+ (0, _defineProperty2.default)(_this, "handleRecordingDeletedEvent", /*#__PURE__*/function () {
131
+ var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(event) {
132
+ var _event$data3;
133
+ return _regenerator.default.wrap(function (_context3) {
134
+ while (1) switch (_context3.prev = _context3.next) {
135
+ case 0:
136
+ if (event !== null && event !== void 0 && (_event$data3 = event.data) !== null && _event$data3 !== void 0 && _event$data3.activity) {
137
+ _context3.next = 1;
138
+ break;
139
+ }
140
+ return _context3.abrupt("return");
141
+ case 1:
142
+ _this.emit(_types2.COMMON_EVENT_KEYS.CALL_RECORDING_DELETED, event);
143
+ case 2:
144
+ case "end":
145
+ return _context3.stop();
146
+ }
147
+ }, _callee3);
148
+ }));
149
+ return function (_x3) {
150
+ return _ref3.apply(this, arguments);
151
+ };
152
+ }());
153
+ _this.sdkConnector = _SDKConnector.default;
154
+ if (!_this.sdkConnector.getWebex()) {
155
+ _SDKConnector.default.setWebex(webex);
156
+ }
157
+ _this.webex = _this.sdkConnector.getWebex();
158
+
159
+ // Resolve the Post Call Recording base URL (hydra developer API) directly from the u2c
160
+ // service catalog. The catalog is populated by the host SDK's service discovery, so no
161
+ // dedicated recording plugin is required.
162
+ _this.recordingServiceUrl = ((_this$webex$internal$ = _this.webex.internal.services._serviceUrls) === null || _this$webex$internal$ === void 0 ? void 0 : _this$webex$internal$.hydraDeveloperApi) || _this.webex.internal.services.get((_this$webex$internal$2 = _this.webex.internal.services._activeServices) === null || _this$webex$internal$2 === void 0 ? void 0 : _this$webex$internal$2.hydraDeveloperApi);
163
+ _this.registerRecordingListeners();
164
+ _Logger.default.setLogger(logger.level, _constants2.CALL_RECORDING_FILE);
165
+ return _this;
166
+ }
167
+
168
+ /**
169
+ * Builds the `convergedRecordings` collection URL with the list query parameters.
170
+ *
171
+ * The converged recordings API only returns results when the request is bounded by BOTH a
172
+ * `from` and a `to` timestamp, so this method always sends both (a `from`-only request comes
173
+ * back empty). When the caller does not supply an explicit `from`, it is derived from the
174
+ * `days` lookback (`now - days`, default {@link DEFAULT_NUMBER_OF_DAYS}); when `to` is omitted
175
+ * it defaults to the current time (`now`). `status` and `max` default to `available` and `30`.
176
+ * The remaining filters (`serviceType`, `format`, `ownerType`, `storageRegion`, `locationId`,
177
+ * `topic`) are pass-through and only appended when the caller provides them.
178
+ *
179
+ * @param options - Optional time window/filtering/pagination from {@link GetRecordingsOptions}.
180
+ * @returns The fully-qualified request URL.
181
+ */
182
+ (0, _inherits2.default)(WxcCallRecordingConnector, _Eventing);
183
+ return (0, _createClass2.default)(WxcCallRecordingConnector, [{
184
+ key: "buildRecordingsUrl",
185
+ value: function buildRecordingsUrl(options) {
186
+ var _options$to, _options$status, _options$max;
187
+ var params = new URLSearchParams();
188
+ var fromDate = options === null || options === void 0 ? void 0 : options.from;
189
+ if (!fromDate) {
190
+ var _options$days;
191
+ var date = new Date();
192
+ date.setDate(date.getDate() - ((_options$days = options === null || options === void 0 ? void 0 : options.days) !== null && _options$days !== void 0 ? _options$days : _constants2.DEFAULT_NUMBER_OF_DAYS));
193
+ fromDate = date.toISOString();
194
+ }
195
+ var toDate = (_options$to = options === null || options === void 0 ? void 0 : options.to) !== null && _options$to !== void 0 ? _options$to : new Date().toISOString();
196
+ params.append(_constants2.FROM, fromDate);
197
+ params.append(_constants2.TO, toDate);
198
+ params.append(_constants2.STATUS, (_options$status = options === null || options === void 0 ? void 0 : options.status) !== null && _options$status !== void 0 ? _options$status : _constants2.DEFAULT_STATUS);
199
+ params.append(_constants2.MAX, "".concat((_options$max = options === null || options === void 0 ? void 0 : options.max) !== null && _options$max !== void 0 ? _options$max : _constants2.DEFAULT_MAX));
200
+
201
+ // Optional pass-through filters: only sent when the caller provides them so the API can apply
202
+ // its own defaults for any that are omitted.
203
+ var optionalParams = [[_constants2.SERVICE_TYPE, options === null || options === void 0 ? void 0 : options.serviceType], [_constants2.FORMAT, options === null || options === void 0 ? void 0 : options.format], [_constants2.OWNER_TYPE, options === null || options === void 0 ? void 0 : options.ownerType], [_constants2.STORAGE_REGION, options === null || options === void 0 ? void 0 : options.storageRegion], [_constants2.LOCATION_ID, options === null || options === void 0 ? void 0 : options.locationId], [_constants2.TOPIC, options === null || options === void 0 ? void 0 : options.topic]];
204
+ optionalParams.forEach(function (_ref4) {
205
+ var _ref5 = (0, _slicedToArray2.default)(_ref4, 2),
206
+ key = _ref5[0],
207
+ value = _ref5[1];
208
+ if (value) {
209
+ params.append(key, value);
210
+ }
211
+ });
212
+ return "".concat(this.recordingServiceUrl, "/").concat(_constants2.CONVERGED_RECORDINGS, "?").concat(params.toString());
213
+ }
214
+
215
+ /**
216
+ * Reads Post Call Recordings, dispatching to the matching operation based on the request `type`.
217
+ * The concrete response type is inferred per request via {@link RecordingResponseFor}.
218
+ *
219
+ * @param request - The discriminated read request.
220
+ */
221
+ }, {
222
+ key: "getCallRecording",
223
+ value: function getCallRecording(request) {
224
+ return this.dispatchGetCallRecording(request);
225
+ }
226
+
227
+ /**
228
+ * Internal dispatcher for {@link getCallRecording}. Routes the discriminated request to the
229
+ * backend-specific read method. Kept separate from the public generic signature so the switch
230
+ * runs against a concrete union (with exhaustiveness checking) and the conditional return type is
231
+ * narrowed in exactly one place.
232
+ *
233
+ * @param request - The discriminated read request.
234
+ */
235
+ }, {
236
+ key: "dispatchGetCallRecording",
237
+ value: function dispatchGetCallRecording(request) {
238
+ switch (request.type) {
239
+ case _types3.RecordingRequestType.LIST:
240
+ return this.getRecordings(request.options);
241
+ case _types3.RecordingRequestType.DETAIL:
242
+ return this.getRecording(request.recordingId);
243
+ case _types3.RecordingRequestType.METADATA:
244
+ return this.getRecordingMetadata(request.recordingId);
245
+ case _types3.RecordingRequestType.BY_CALL_SESSION:
246
+ return this.getRecordingsByCallSessionId(request.callSessionId, request.options);
247
+ default:
248
+ {
249
+ var exhaustiveCheck = request;
250
+ throw new Error("Unsupported recording request type: ".concat((0, _stringify.default)(exhaustiveCheck)));
251
+ }
252
+ }
253
+ }
254
+
255
+ /**
256
+ * Fetches the converged recordings for the current user.
257
+ * @param options - Optional filters and pagination parameters.
258
+ */
259
+ }, {
260
+ key: "getRecordings",
261
+ value: (function () {
262
+ var _getRecordings = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(options) {
263
+ var loggerContext, _response$headers, _response$body, _body$items, _responseDetails$data, _responseDetails$data2, url, response, body, responseDetails, errorInfo, _t2;
264
+ return _regenerator.default.wrap(function (_context4) {
265
+ while (1) switch (_context4.prev = _context4.next) {
266
+ case 0:
267
+ loggerContext = {
268
+ file: _constants2.CALL_RECORDING_FILE,
269
+ method: _constants2.METHODS.GET_RECORDINGS
270
+ };
271
+ _Logger.default.info("".concat(_constants.METHOD_START_MESSAGE, " with options=").concat((0, _stringify.default)(options !== null && options !== void 0 ? options : {})), loggerContext);
272
+ _context4.prev = 1;
273
+ url = this.buildRecordingsUrl(options);
274
+ _context4.next = 2;
275
+ return this.webex.request(_objectSpread({
276
+ uri: url,
277
+ method: _types.HTTP_METHODS.GET,
278
+ service: _types.ALLOWED_SERVICES.HYDRA_DEVELOPER_API
279
+ }, options !== null && options !== void 0 && options.webexUserRequest ? {
280
+ headers: (0, _defineProperty2.default)({}, _constants2.WEBEX_USER_REQUEST_HEADER, 'true')
281
+ } : {}));
282
+ case 2:
283
+ response = _context4.sent;
284
+ _Logger.default.log("Response trackingId: ".concat(response === null || response === void 0 ? void 0 : (_response$headers = response.headers) === null || _response$headers === void 0 ? void 0 : _response$headers.trackingid), loggerContext);
285
+ body = (_response$body = response.body) !== null && _response$body !== void 0 ? _response$body : {};
286
+ responseDetails = {
287
+ statusCode: Number(response.statusCode) || _constants.SUCCESS_STATUS_CODE,
288
+ data: {
289
+ recordings: (_body$items = body.items) !== null && _body$items !== void 0 ? _body$items : []
290
+ },
291
+ message: _constants.SUCCESS_MESSAGE
292
+ };
293
+ _Logger.default.log("Successfully retrieved ".concat((_responseDetails$data = (_responseDetails$data2 = responseDetails.data.recordings) === null || _responseDetails$data2 === void 0 ? void 0 : _responseDetails$data2.length) !== null && _responseDetails$data !== void 0 ? _responseDetails$data : 0, " recordings"), loggerContext);
294
+ return _context4.abrupt("return", responseDetails);
295
+ case 3:
296
+ _context4.prev = 3;
297
+ _t2 = _context4["catch"](1);
298
+ _Logger.default.error("Failed to get recordings: ".concat((0, _stringify.default)(_t2)), loggerContext);
299
+ _context4.next = 4;
300
+ return (0, _Utils.uploadLogs)();
301
+ case 4:
302
+ errorInfo = _t2;
303
+ return _context4.abrupt("return", (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext));
304
+ case 5:
305
+ case "end":
306
+ return _context4.stop();
307
+ }
308
+ }, _callee4, this, [[1, 3]]);
309
+ }));
310
+ function getRecordings(_x4) {
311
+ return _getRecordings.apply(this, arguments);
312
+ }
313
+ return getRecordings;
314
+ }()
315
+ /**
316
+ * Fetches a single converged recording by its id.
317
+ * @param recordingId - The recording id (`id`).
318
+ */
319
+ )
320
+ }, {
321
+ key: "getRecording",
322
+ value: (function () {
323
+ var _getRecording = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee5(recordingId) {
324
+ var loggerContext, _response$headers2, url, response, responseDetails, errorInfo, _t3;
325
+ return _regenerator.default.wrap(function (_context5) {
326
+ while (1) switch (_context5.prev = _context5.next) {
327
+ case 0:
328
+ loggerContext = {
329
+ file: _constants2.CALL_RECORDING_FILE,
330
+ method: _constants2.METHODS.GET_RECORDING
331
+ };
332
+ _Logger.default.info("".concat(_constants.METHOD_START_MESSAGE, " with recordingId=").concat(recordingId), loggerContext);
333
+ _context5.prev = 1;
334
+ url = "".concat(this.recordingServiceUrl, "/").concat(_constants2.CONVERGED_RECORDINGS, "/").concat(recordingId);
335
+ _context5.next = 2;
336
+ return this.webex.request({
337
+ uri: url,
338
+ method: _types.HTTP_METHODS.GET,
339
+ service: _types.ALLOWED_SERVICES.HYDRA_DEVELOPER_API
340
+ });
341
+ case 2:
342
+ response = _context5.sent;
343
+ _Logger.default.log("Response trackingId: ".concat(response === null || response === void 0 ? void 0 : (_response$headers2 = response.headers) === null || _response$headers2 === void 0 ? void 0 : _response$headers2.trackingid), loggerContext);
344
+ responseDetails = {
345
+ statusCode: Number(response.statusCode) || _constants.SUCCESS_STATUS_CODE,
346
+ data: {
347
+ recording: response.body
348
+ },
349
+ message: _constants.SUCCESS_MESSAGE
350
+ };
351
+ _Logger.default.log("Successfully retrieved recording ".concat(recordingId), loggerContext);
352
+ return _context5.abrupt("return", responseDetails);
353
+ case 3:
354
+ _context5.prev = 3;
355
+ _t3 = _context5["catch"](1);
356
+ _Logger.default.error("Failed to get recording: ".concat((0, _stringify.default)(_t3)), loggerContext);
357
+ _context5.next = 4;
358
+ return (0, _Utils.uploadLogs)();
359
+ case 4:
360
+ errorInfo = _t3;
361
+ return _context5.abrupt("return", (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext));
362
+ case 5:
363
+ case "end":
364
+ return _context5.stop();
365
+ }
366
+ }, _callee5, this, [[1, 3]]);
367
+ }));
368
+ function getRecording(_x5) {
369
+ return _getRecording.apply(this, arguments);
370
+ }
371
+ return getRecording;
372
+ }()
373
+ /**
374
+ * Returns all recordings linked to a given call session id.
375
+ *
376
+ * Note (documented API gap): the recording API does not expose a confirmed server-side query parameter
377
+ * to filter by call session id, so a list is fetched and filtered client-side on
378
+ * `serviceData.callSessionId`. The scan is bounded by the list query, so `options` is forwarded
379
+ * to {@link getRecordings} to let callers widen the time window/status/page when the target
380
+ * session may fall outside the defaults.
381
+ *
382
+ * @param callSessionId - The call session id to filter by.
383
+ * @param options - Optional list query forwarded to {@link getRecordings} to control the
384
+ * set of recordings scanned before filtering.
385
+ */
386
+ )
387
+ }, {
388
+ key: "getRecordingsByCallSessionId",
389
+ value: (function () {
390
+ var _getRecordingsByCallSessionId = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee6(callSessionId, options) {
391
+ var _listResponse$data$re;
392
+ var loggerContext, listResponse, filtered;
393
+ return _regenerator.default.wrap(function (_context6) {
394
+ while (1) switch (_context6.prev = _context6.next) {
395
+ case 0:
396
+ loggerContext = {
397
+ file: _constants2.CALL_RECORDING_FILE,
398
+ method: _constants2.METHODS.GET_RECORDINGS_BY_CALL_SESSION_ID
399
+ };
400
+ _Logger.default.info("".concat(_constants.METHOD_START_MESSAGE, " with callSessionId=").concat(callSessionId), loggerContext);
401
+ _context6.next = 1;
402
+ return this.getRecordings(options);
403
+ case 1:
404
+ listResponse = _context6.sent;
405
+ if (!(listResponse.statusCode !== _constants.SUCCESS_STATUS_CODE)) {
406
+ _context6.next = 2;
407
+ break;
408
+ }
409
+ return _context6.abrupt("return", listResponse);
410
+ case 2:
411
+ filtered = ((_listResponse$data$re = listResponse.data.recordings) !== null && _listResponse$data$re !== void 0 ? _listResponse$data$re : []).filter(function (recording) {
412
+ var _recording$serviceDat;
413
+ return ((_recording$serviceDat = recording.serviceData) === null || _recording$serviceDat === void 0 ? void 0 : _recording$serviceDat.callSessionId) === callSessionId;
414
+ });
415
+ if (filtered.length === 0) {
416
+ _Logger.default.info(_constants2.RECORDING_NOT_FOUND_MESSAGE, loggerContext);
417
+ } else {
418
+ _Logger.default.log("Successfully retrieved ".concat(filtered.length, " recordings for call session ").concat(callSessionId), loggerContext);
419
+ }
420
+ return _context6.abrupt("return", {
421
+ statusCode: _constants.SUCCESS_STATUS_CODE,
422
+ data: {
423
+ recordings: filtered
424
+ },
425
+ message: _constants.SUCCESS_MESSAGE
426
+ });
427
+ case 3:
428
+ case "end":
429
+ return _context6.stop();
430
+ }
431
+ }, _callee6, this);
432
+ }));
433
+ function getRecordingsByCallSessionId(_x6, _x7) {
434
+ return _getRecordingsByCallSessionId.apply(this, arguments);
435
+ }
436
+ return getRecordingsByCallSessionId;
437
+ }()
438
+ /**
439
+ * Fetches the metadata for a single recording.
440
+ * @param recordingId - The recording id (`id`).
441
+ */
442
+ )
443
+ }, {
444
+ key: "getRecordingMetadata",
445
+ value: (function () {
446
+ var _getRecordingMetadata = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee7(recordingId) {
447
+ var loggerContext, _response$headers3, url, response, responseDetails, errorInfo, _t4;
448
+ return _regenerator.default.wrap(function (_context7) {
449
+ while (1) switch (_context7.prev = _context7.next) {
450
+ case 0:
451
+ loggerContext = {
452
+ file: _constants2.CALL_RECORDING_FILE,
453
+ method: _constants2.METHODS.GET_RECORDING_METADATA
454
+ };
455
+ _Logger.default.info("".concat(_constants.METHOD_START_MESSAGE, " with recordingId=").concat(recordingId), loggerContext);
456
+ _context7.prev = 1;
457
+ url = "".concat(this.recordingServiceUrl, "/").concat(_constants2.CONVERGED_RECORDINGS, "/").concat(recordingId, "/").concat(_constants2.METADATA);
458
+ _context7.next = 2;
459
+ return this.webex.request({
460
+ uri: url,
461
+ method: _types.HTTP_METHODS.GET,
462
+ service: _types.ALLOWED_SERVICES.HYDRA_DEVELOPER_API
463
+ });
464
+ case 2:
465
+ response = _context7.sent;
466
+ _Logger.default.log("Response trackingId: ".concat(response === null || response === void 0 ? void 0 : (_response$headers3 = response.headers) === null || _response$headers3 === void 0 ? void 0 : _response$headers3.trackingid), loggerContext);
467
+ responseDetails = {
468
+ statusCode: Number(response.statusCode) || _constants.SUCCESS_STATUS_CODE,
469
+ data: {
470
+ metadata: response.body
471
+ },
472
+ message: _constants.SUCCESS_MESSAGE
473
+ };
474
+ _Logger.default.log("Successfully retrieved metadata for recording ".concat(recordingId), loggerContext);
475
+ return _context7.abrupt("return", responseDetails);
476
+ case 3:
477
+ _context7.prev = 3;
478
+ _t4 = _context7["catch"](1);
479
+ _Logger.default.error("Failed to get recording metadata: ".concat((0, _stringify.default)(_t4)), loggerContext);
480
+ _context7.next = 4;
481
+ return (0, _Utils.uploadLogs)();
482
+ case 4:
483
+ errorInfo = _t4;
484
+ return _context7.abrupt("return", (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext));
485
+ case 5:
486
+ case "end":
487
+ return _context7.stop();
488
+ }
489
+ }, _callee7, this, [[1, 3]]);
490
+ }));
491
+ function getRecordingMetadata(_x8) {
492
+ return _getRecordingMetadata.apply(this, arguments);
493
+ }
494
+ return getRecordingMetadata;
495
+ }()
496
+ /**
497
+ * Moves a recording to the recycle bin (soft delete). Matches native Webex user delete:
498
+ * `POST /convergedRecordings/softDelete` with `recordingIds: [recordingId]`.
499
+ * Requires `spark:recordings_write` on the access token.
500
+ *
501
+ * Mercury emits `convergedRecordings.updated` + `eventSubType: TRASH`, which this connector
502
+ * surfaces as `callRecording:deleted`.
503
+ *
504
+ * @param recordingId - The recording id (`id`) to move to the recycle bin.
505
+ * @param _options - Deprecated. Ignored. Compliance permanent delete uses a separate API.
506
+ */
507
+ )
508
+ }, {
509
+ key: "deleteRecording",
510
+ value: (function () {
511
+ var _deleteRecording = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee8(recordingId,
512
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- kept for ICallRecording signature parity; soft delete ignores options
513
+ _options) {
514
+ var loggerContext, _response$headers4, url, response, responseDetails, errorInfo, _t5;
515
+ return _regenerator.default.wrap(function (_context8) {
516
+ while (1) switch (_context8.prev = _context8.next) {
517
+ case 0:
518
+ loggerContext = {
519
+ file: _constants2.CALL_RECORDING_FILE,
520
+ method: _constants2.METHODS.DELETE_RECORDING
521
+ };
522
+ _Logger.default.info("".concat(_constants.METHOD_START_MESSAGE, " with recordingId=").concat(recordingId), loggerContext);
523
+ _context8.prev = 1;
524
+ url = "".concat(this.recordingServiceUrl, "/").concat(_constants2.CONVERGED_RECORDINGS, "/").concat(_constants2.SOFT_DELETE);
525
+ _context8.next = 2;
526
+ return this.webex.request({
527
+ uri: url,
528
+ method: _types.HTTP_METHODS.POST,
529
+ service: _types.ALLOWED_SERVICES.HYDRA_DEVELOPER_API,
530
+ body: {
531
+ recordingIds: [recordingId]
532
+ }
533
+ });
534
+ case 2:
535
+ response = _context8.sent;
536
+ _Logger.default.log("Response trackingId: ".concat(response === null || response === void 0 ? void 0 : (_response$headers4 = response.headers) === null || _response$headers4 === void 0 ? void 0 : _response$headers4.trackingid), loggerContext);
537
+ responseDetails = {
538
+ statusCode: Number(response.statusCode) || _constants.SUCCESS_STATUS_CODE,
539
+ data: {},
540
+ message: _constants.SUCCESS_MESSAGE
541
+ };
542
+ _Logger.default.log("Successfully moved recording ".concat(recordingId, " to recycle bin"), loggerContext);
543
+ return _context8.abrupt("return", responseDetails);
544
+ case 3:
545
+ _context8.prev = 3;
546
+ _t5 = _context8["catch"](1);
547
+ _Logger.default.error("Failed to delete recording: ".concat((0, _stringify.default)(_t5)), loggerContext);
548
+ _context8.next = 4;
549
+ return (0, _Utils.uploadLogs)();
550
+ case 4:
551
+ errorInfo = _t5;
552
+ return _context8.abrupt("return", (0, _Utils.serviceErrorCodeHandler)(errorInfo, loggerContext));
553
+ case 5:
554
+ case "end":
555
+ return _context8.stop();
556
+ }
557
+ }, _callee8, this, [[1, 3]]);
558
+ }));
559
+ function deleteRecording(_x9, _x0) {
560
+ return _deleteRecording.apply(this, arguments);
561
+ }
562
+ return deleteRecording;
563
+ }())
564
+ }, {
565
+ key: "registerRecordingListeners",
566
+ value:
567
+ /**
568
+ * Subscribes to the recording Mercury events and re-emits them as typed client events.
569
+ */
570
+ function registerRecordingListeners() {
571
+ this.sdkConnector.registerListener(_types2.MOBIUS_EVENT_KEYS.RECORDING_EVENT_CREATED, this.handleRecordingCreatedEvent);
572
+ this.sdkConnector.registerListener(_types2.MOBIUS_EVENT_KEYS.RECORDING_EVENT_UPDATED, this.handleRecordingUpdatedEvent);
573
+ this.sdkConnector.registerListener(_types2.MOBIUS_EVENT_KEYS.RECORDING_EVENT_DELETED, this.handleRecordingDeletedEvent);
574
+ }
575
+ }]);
576
+ }(_impl.Eventing);
577
+ //# sourceMappingURL=WxcCallRecordingConnector.js.map