@azure/communication-call-automation 1.5.0-alpha.20250519.1 → 1.5.0-beta.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 (407) hide show
  1. package/README.md +1 -51
  2. package/dist/browser/callAutomationClient.d.ts +2 -9
  3. package/dist/browser/callAutomationClient.d.ts.map +1 -1
  4. package/dist/browser/callAutomationClient.js +9 -106
  5. package/dist/browser/callAutomationClient.js.map +1 -1
  6. package/dist/browser/callAutomationEventParser.d.ts.map +1 -1
  7. package/dist/browser/callAutomationEventParser.js +0 -18
  8. package/dist/browser/callAutomationEventParser.js.map +1 -1
  9. package/dist/browser/callConnection.d.ts +4 -6
  10. package/dist/browser/callConnection.d.ts.map +1 -1
  11. package/dist/browser/callConnection.js +13 -112
  12. package/dist/browser/callConnection.js.map +1 -1
  13. package/dist/browser/callMedia.d.ts +10 -20
  14. package/dist/browser/callMedia.d.ts.map +1 -1
  15. package/dist/browser/callMedia.js +20 -188
  16. package/dist/browser/callMedia.js.map +1 -1
  17. package/dist/browser/callRecording.d.ts.map +1 -1
  18. package/dist/browser/callRecording.js +5 -2
  19. package/dist/browser/callRecording.js.map +1 -1
  20. package/dist/browser/generated/src/callAutomationApiClient.d.ts +1 -2
  21. package/dist/browser/generated/src/callAutomationApiClient.d.ts.map +1 -1
  22. package/dist/browser/generated/src/callAutomationApiClient.js +2 -3
  23. package/dist/browser/generated/src/callAutomationApiClient.js.map +1 -1
  24. package/dist/browser/generated/src/models/index.d.ts +205 -850
  25. package/dist/browser/generated/src/models/index.d.ts.map +1 -1
  26. package/dist/browser/generated/src/models/index.js +48 -126
  27. package/dist/browser/generated/src/models/index.js.map +1 -1
  28. package/dist/browser/generated/src/models/mappers.d.ts +11 -48
  29. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
  30. package/dist/browser/generated/src/models/mappers.js +460 -1644
  31. package/dist/browser/generated/src/models/mappers.js.map +1 -1
  32. package/dist/browser/generated/src/models/parameters.d.ts +1 -7
  33. package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
  34. package/dist/browser/generated/src/models/parameters.js +6 -41
  35. package/dist/browser/generated/src/models/parameters.js.map +1 -1
  36. package/dist/browser/generated/src/operations/callConnection.d.ts +2 -9
  37. package/dist/browser/generated/src/operations/callConnection.d.ts.map +1 -1
  38. package/dist/browser/generated/src/operations/callConnection.js +1 -33
  39. package/dist/browser/generated/src/operations/callConnection.js.map +1 -1
  40. package/dist/browser/generated/src/operations/callMedia.d.ts +8 -15
  41. package/dist/browser/generated/src/operations/callMedia.d.ts.map +1 -1
  42. package/dist/browser/generated/src/operations/callMedia.js +25 -50
  43. package/dist/browser/generated/src/operations/callMedia.js.map +1 -1
  44. package/dist/browser/generated/src/operations/callRecording.d.ts +1 -7
  45. package/dist/browser/generated/src/operations/callRecording.d.ts.map +1 -1
  46. package/dist/browser/generated/src/operations/callRecording.js +0 -24
  47. package/dist/browser/generated/src/operations/callRecording.js.map +1 -1
  48. package/dist/browser/generated/src/operations/index.d.ts +0 -1
  49. package/dist/browser/generated/src/operations/index.d.ts.map +1 -1
  50. package/dist/browser/generated/src/operations/index.js +0 -1
  51. package/dist/browser/generated/src/operations/index.js.map +1 -1
  52. package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts +2 -9
  53. package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  54. package/dist/browser/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  55. package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts +8 -15
  56. package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  57. package/dist/browser/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  58. package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts +1 -7
  59. package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
  60. package/dist/browser/generated/src/operationsInterfaces/callRecording.js.map +1 -1
  61. package/dist/browser/generated/src/operationsInterfaces/index.d.ts +0 -1
  62. package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -1
  63. package/dist/browser/generated/src/operationsInterfaces/index.js +0 -1
  64. package/dist/browser/generated/src/operationsInterfaces/index.js.map +1 -1
  65. package/dist/browser/index.d.ts +0 -2
  66. package/dist/browser/index.d.ts.map +1 -1
  67. package/dist/browser/index.js +0 -2
  68. package/dist/browser/index.js.map +1 -1
  69. package/dist/browser/models/constants.js +1 -1
  70. package/dist/browser/models/constants.js.map +1 -1
  71. package/dist/browser/models/events.d.ts +67 -155
  72. package/dist/browser/models/events.d.ts.map +1 -1
  73. package/dist/browser/models/events.js.map +1 -1
  74. package/dist/browser/models/models.d.ts +5 -14
  75. package/dist/browser/models/models.d.ts.map +1 -1
  76. package/dist/browser/models/models.js +1 -3
  77. package/dist/browser/models/models.js.map +1 -1
  78. package/dist/browser/models/options.d.ts +2 -35
  79. package/dist/browser/models/options.d.ts.map +1 -1
  80. package/dist/browser/models/options.js.map +1 -1
  81. package/dist/browser/models/responses.d.ts +10 -51
  82. package/dist/browser/models/responses.d.ts.map +1 -1
  83. package/dist/browser/models/responses.js.map +1 -1
  84. package/dist/browser/utli/converters.d.ts.map +1 -1
  85. package/dist/browser/utli/converters.js +19 -1
  86. package/dist/browser/utli/converters.js.map +1 -1
  87. package/dist/commonjs/callAutomationClient.d.ts +2 -9
  88. package/dist/commonjs/callAutomationClient.d.ts.map +1 -1
  89. package/dist/commonjs/callAutomationClient.js +11 -108
  90. package/dist/commonjs/callAutomationClient.js.map +1 -1
  91. package/dist/commonjs/callAutomationEventParser.d.ts.map +1 -1
  92. package/dist/commonjs/callAutomationEventParser.js +0 -18
  93. package/dist/commonjs/callAutomationEventParser.js.map +1 -1
  94. package/dist/commonjs/callConnection.d.ts +4 -6
  95. package/dist/commonjs/callConnection.d.ts.map +1 -1
  96. package/dist/commonjs/callConnection.js +15 -114
  97. package/dist/commonjs/callConnection.js.map +1 -1
  98. package/dist/commonjs/callMedia.d.ts +10 -20
  99. package/dist/commonjs/callMedia.d.ts.map +1 -1
  100. package/dist/commonjs/callMedia.js +39 -207
  101. package/dist/commonjs/callMedia.js.map +1 -1
  102. package/dist/commonjs/callRecording.d.ts.map +1 -1
  103. package/dist/commonjs/callRecording.js +5 -2
  104. package/dist/commonjs/callRecording.js.map +1 -1
  105. package/dist/commonjs/generated/src/callAutomationApiClient.d.ts +1 -2
  106. package/dist/commonjs/generated/src/callAutomationApiClient.d.ts.map +1 -1
  107. package/dist/commonjs/generated/src/callAutomationApiClient.js +1 -2
  108. package/dist/commonjs/generated/src/callAutomationApiClient.js.map +1 -1
  109. package/dist/commonjs/generated/src/models/index.d.ts +205 -850
  110. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
  111. package/dist/commonjs/generated/src/models/index.js +49 -127
  112. package/dist/commonjs/generated/src/models/index.js.map +1 -1
  113. package/dist/commonjs/generated/src/models/mappers.d.ts +11 -48
  114. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
  115. package/dist/commonjs/generated/src/models/mappers.js +463 -1647
  116. package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
  117. package/dist/commonjs/generated/src/models/parameters.d.ts +1 -7
  118. package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
  119. package/dist/commonjs/generated/src/models/parameters.js +6 -41
  120. package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
  121. package/dist/commonjs/generated/src/operations/callConnection.d.ts +2 -9
  122. package/dist/commonjs/generated/src/operations/callConnection.d.ts.map +1 -1
  123. package/dist/commonjs/generated/src/operations/callConnection.js +1 -33
  124. package/dist/commonjs/generated/src/operations/callConnection.js.map +1 -1
  125. package/dist/commonjs/generated/src/operations/callMedia.d.ts +8 -15
  126. package/dist/commonjs/generated/src/operations/callMedia.d.ts.map +1 -1
  127. package/dist/commonjs/generated/src/operations/callMedia.js +25 -50
  128. package/dist/commonjs/generated/src/operations/callMedia.js.map +1 -1
  129. package/dist/commonjs/generated/src/operations/callRecording.d.ts +1 -7
  130. package/dist/commonjs/generated/src/operations/callRecording.d.ts.map +1 -1
  131. package/dist/commonjs/generated/src/operations/callRecording.js +0 -24
  132. package/dist/commonjs/generated/src/operations/callRecording.js.map +1 -1
  133. package/dist/commonjs/generated/src/operations/index.d.ts +0 -1
  134. package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -1
  135. package/dist/commonjs/generated/src/operations/index.js +0 -1
  136. package/dist/commonjs/generated/src/operations/index.js.map +1 -1
  137. package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts +2 -9
  138. package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  139. package/dist/commonjs/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  140. package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts +8 -15
  141. package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  142. package/dist/commonjs/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  143. package/dist/commonjs/generated/src/operationsInterfaces/callRecording.d.ts +1 -7
  144. package/dist/commonjs/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
  145. package/dist/commonjs/generated/src/operationsInterfaces/callRecording.js.map +1 -1
  146. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +0 -1
  147. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -1
  148. package/dist/commonjs/generated/src/operationsInterfaces/index.js +0 -1
  149. package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -1
  150. package/dist/commonjs/index.d.ts +0 -2
  151. package/dist/commonjs/index.d.ts.map +1 -1
  152. package/dist/commonjs/index.js +0 -2
  153. package/dist/commonjs/index.js.map +1 -1
  154. package/dist/commonjs/models/constants.js +1 -1
  155. package/dist/commonjs/models/constants.js.map +1 -1
  156. package/dist/commonjs/models/events.d.ts +67 -155
  157. package/dist/commonjs/models/events.d.ts.map +1 -1
  158. package/dist/commonjs/models/events.js.map +1 -1
  159. package/dist/commonjs/models/models.d.ts +5 -14
  160. package/dist/commonjs/models/models.d.ts.map +1 -1
  161. package/dist/commonjs/models/models.js +6 -10
  162. package/dist/commonjs/models/models.js.map +1 -1
  163. package/dist/commonjs/models/options.d.ts +2 -35
  164. package/dist/commonjs/models/options.d.ts.map +1 -1
  165. package/dist/commonjs/models/options.js.map +1 -1
  166. package/dist/commonjs/models/responses.d.ts +10 -51
  167. package/dist/commonjs/models/responses.d.ts.map +1 -1
  168. package/dist/commonjs/models/responses.js.map +1 -1
  169. package/dist/commonjs/tsdoc-metadata.json +1 -1
  170. package/dist/commonjs/utli/converters.d.ts.map +1 -1
  171. package/dist/commonjs/utli/converters.js +18 -0
  172. package/dist/commonjs/utli/converters.js.map +1 -1
  173. package/dist/esm/callAutomationClient.d.ts +2 -9
  174. package/dist/esm/callAutomationClient.d.ts.map +1 -1
  175. package/dist/esm/callAutomationClient.js +9 -106
  176. package/dist/esm/callAutomationClient.js.map +1 -1
  177. package/dist/esm/callAutomationEventParser.d.ts.map +1 -1
  178. package/dist/esm/callAutomationEventParser.js +0 -18
  179. package/dist/esm/callAutomationEventParser.js.map +1 -1
  180. package/dist/esm/callConnection.d.ts +4 -6
  181. package/dist/esm/callConnection.d.ts.map +1 -1
  182. package/dist/esm/callConnection.js +13 -112
  183. package/dist/esm/callConnection.js.map +1 -1
  184. package/dist/esm/callMedia.d.ts +10 -20
  185. package/dist/esm/callMedia.d.ts.map +1 -1
  186. package/dist/esm/callMedia.js +20 -188
  187. package/dist/esm/callMedia.js.map +1 -1
  188. package/dist/esm/callRecording.d.ts.map +1 -1
  189. package/dist/esm/callRecording.js +5 -2
  190. package/dist/esm/callRecording.js.map +1 -1
  191. package/dist/esm/generated/src/callAutomationApiClient.d.ts +1 -2
  192. package/dist/esm/generated/src/callAutomationApiClient.d.ts.map +1 -1
  193. package/dist/esm/generated/src/callAutomationApiClient.js +2 -3
  194. package/dist/esm/generated/src/callAutomationApiClient.js.map +1 -1
  195. package/dist/esm/generated/src/models/index.d.ts +205 -850
  196. package/dist/esm/generated/src/models/index.d.ts.map +1 -1
  197. package/dist/esm/generated/src/models/index.js +48 -126
  198. package/dist/esm/generated/src/models/index.js.map +1 -1
  199. package/dist/esm/generated/src/models/mappers.d.ts +11 -48
  200. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
  201. package/dist/esm/generated/src/models/mappers.js +460 -1644
  202. package/dist/esm/generated/src/models/mappers.js.map +1 -1
  203. package/dist/esm/generated/src/models/parameters.d.ts +1 -7
  204. package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
  205. package/dist/esm/generated/src/models/parameters.js +6 -41
  206. package/dist/esm/generated/src/models/parameters.js.map +1 -1
  207. package/dist/esm/generated/src/operations/callConnection.d.ts +2 -9
  208. package/dist/esm/generated/src/operations/callConnection.d.ts.map +1 -1
  209. package/dist/esm/generated/src/operations/callConnection.js +1 -33
  210. package/dist/esm/generated/src/operations/callConnection.js.map +1 -1
  211. package/dist/esm/generated/src/operations/callMedia.d.ts +8 -15
  212. package/dist/esm/generated/src/operations/callMedia.d.ts.map +1 -1
  213. package/dist/esm/generated/src/operations/callMedia.js +25 -50
  214. package/dist/esm/generated/src/operations/callMedia.js.map +1 -1
  215. package/dist/esm/generated/src/operations/callRecording.d.ts +1 -7
  216. package/dist/esm/generated/src/operations/callRecording.d.ts.map +1 -1
  217. package/dist/esm/generated/src/operations/callRecording.js +0 -24
  218. package/dist/esm/generated/src/operations/callRecording.js.map +1 -1
  219. package/dist/esm/generated/src/operations/index.d.ts +0 -1
  220. package/dist/esm/generated/src/operations/index.d.ts.map +1 -1
  221. package/dist/esm/generated/src/operations/index.js +0 -1
  222. package/dist/esm/generated/src/operations/index.js.map +1 -1
  223. package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts +2 -9
  224. package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  225. package/dist/esm/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  226. package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts +8 -15
  227. package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  228. package/dist/esm/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  229. package/dist/esm/generated/src/operationsInterfaces/callRecording.d.ts +1 -7
  230. package/dist/esm/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
  231. package/dist/esm/generated/src/operationsInterfaces/callRecording.js.map +1 -1
  232. package/dist/esm/generated/src/operationsInterfaces/index.d.ts +0 -1
  233. package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -1
  234. package/dist/esm/generated/src/operationsInterfaces/index.js +0 -1
  235. package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -1
  236. package/dist/esm/index.d.ts +0 -2
  237. package/dist/esm/index.d.ts.map +1 -1
  238. package/dist/esm/index.js +0 -2
  239. package/dist/esm/index.js.map +1 -1
  240. package/dist/esm/models/constants.js +1 -1
  241. package/dist/esm/models/constants.js.map +1 -1
  242. package/dist/esm/models/events.d.ts +67 -155
  243. package/dist/esm/models/events.d.ts.map +1 -1
  244. package/dist/esm/models/events.js.map +1 -1
  245. package/dist/esm/models/models.d.ts +5 -14
  246. package/dist/esm/models/models.d.ts.map +1 -1
  247. package/dist/esm/models/models.js +1 -3
  248. package/dist/esm/models/models.js.map +1 -1
  249. package/dist/esm/models/options.d.ts +2 -35
  250. package/dist/esm/models/options.d.ts.map +1 -1
  251. package/dist/esm/models/options.js.map +1 -1
  252. package/dist/esm/models/responses.d.ts +10 -51
  253. package/dist/esm/models/responses.d.ts.map +1 -1
  254. package/dist/esm/models/responses.js.map +1 -1
  255. package/dist/esm/utli/converters.d.ts.map +1 -1
  256. package/dist/esm/utli/converters.js +19 -1
  257. package/dist/esm/utli/converters.js.map +1 -1
  258. package/dist/react-native/callAutomationClient.d.ts +2 -9
  259. package/dist/react-native/callAutomationClient.d.ts.map +1 -1
  260. package/dist/react-native/callAutomationClient.js +9 -106
  261. package/dist/react-native/callAutomationClient.js.map +1 -1
  262. package/dist/react-native/callAutomationEventParser.d.ts.map +1 -1
  263. package/dist/react-native/callAutomationEventParser.js +0 -18
  264. package/dist/react-native/callAutomationEventParser.js.map +1 -1
  265. package/dist/react-native/callConnection.d.ts +4 -6
  266. package/dist/react-native/callConnection.d.ts.map +1 -1
  267. package/dist/react-native/callConnection.js +13 -112
  268. package/dist/react-native/callConnection.js.map +1 -1
  269. package/dist/react-native/callMedia.d.ts +10 -20
  270. package/dist/react-native/callMedia.d.ts.map +1 -1
  271. package/dist/react-native/callMedia.js +20 -188
  272. package/dist/react-native/callMedia.js.map +1 -1
  273. package/dist/react-native/callRecording.d.ts.map +1 -1
  274. package/dist/react-native/callRecording.js +5 -2
  275. package/dist/react-native/callRecording.js.map +1 -1
  276. package/dist/react-native/generated/src/callAutomationApiClient.d.ts +1 -2
  277. package/dist/react-native/generated/src/callAutomationApiClient.d.ts.map +1 -1
  278. package/dist/react-native/generated/src/callAutomationApiClient.js +2 -3
  279. package/dist/react-native/generated/src/callAutomationApiClient.js.map +1 -1
  280. package/dist/react-native/generated/src/models/index.d.ts +205 -850
  281. package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
  282. package/dist/react-native/generated/src/models/index.js +48 -126
  283. package/dist/react-native/generated/src/models/index.js.map +1 -1
  284. package/dist/react-native/generated/src/models/mappers.d.ts +11 -48
  285. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
  286. package/dist/react-native/generated/src/models/mappers.js +460 -1644
  287. package/dist/react-native/generated/src/models/mappers.js.map +1 -1
  288. package/dist/react-native/generated/src/models/parameters.d.ts +1 -7
  289. package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
  290. package/dist/react-native/generated/src/models/parameters.js +6 -41
  291. package/dist/react-native/generated/src/models/parameters.js.map +1 -1
  292. package/dist/react-native/generated/src/operations/callConnection.d.ts +2 -9
  293. package/dist/react-native/generated/src/operations/callConnection.d.ts.map +1 -1
  294. package/dist/react-native/generated/src/operations/callConnection.js +1 -33
  295. package/dist/react-native/generated/src/operations/callConnection.js.map +1 -1
  296. package/dist/react-native/generated/src/operations/callMedia.d.ts +8 -15
  297. package/dist/react-native/generated/src/operations/callMedia.d.ts.map +1 -1
  298. package/dist/react-native/generated/src/operations/callMedia.js +25 -50
  299. package/dist/react-native/generated/src/operations/callMedia.js.map +1 -1
  300. package/dist/react-native/generated/src/operations/callRecording.d.ts +1 -7
  301. package/dist/react-native/generated/src/operations/callRecording.d.ts.map +1 -1
  302. package/dist/react-native/generated/src/operations/callRecording.js +0 -24
  303. package/dist/react-native/generated/src/operations/callRecording.js.map +1 -1
  304. package/dist/react-native/generated/src/operations/index.d.ts +0 -1
  305. package/dist/react-native/generated/src/operations/index.d.ts.map +1 -1
  306. package/dist/react-native/generated/src/operations/index.js +0 -1
  307. package/dist/react-native/generated/src/operations/index.js.map +1 -1
  308. package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts +2 -9
  309. package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  310. package/dist/react-native/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  311. package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts +8 -15
  312. package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  313. package/dist/react-native/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  314. package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts +1 -7
  315. package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
  316. package/dist/react-native/generated/src/operationsInterfaces/callRecording.js.map +1 -1
  317. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +0 -1
  318. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -1
  319. package/dist/react-native/generated/src/operationsInterfaces/index.js +0 -1
  320. package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -1
  321. package/dist/react-native/index.d.ts +0 -2
  322. package/dist/react-native/index.d.ts.map +1 -1
  323. package/dist/react-native/index.js +0 -2
  324. package/dist/react-native/index.js.map +1 -1
  325. package/dist/react-native/models/constants.js +1 -1
  326. package/dist/react-native/models/constants.js.map +1 -1
  327. package/dist/react-native/models/events.d.ts +67 -155
  328. package/dist/react-native/models/events.d.ts.map +1 -1
  329. package/dist/react-native/models/events.js.map +1 -1
  330. package/dist/react-native/models/models.d.ts +5 -14
  331. package/dist/react-native/models/models.d.ts.map +1 -1
  332. package/dist/react-native/models/models.js +1 -3
  333. package/dist/react-native/models/models.js.map +1 -1
  334. package/dist/react-native/models/options.d.ts +2 -35
  335. package/dist/react-native/models/options.d.ts.map +1 -1
  336. package/dist/react-native/models/options.js.map +1 -1
  337. package/dist/react-native/models/responses.d.ts +10 -51
  338. package/dist/react-native/models/responses.d.ts.map +1 -1
  339. package/dist/react-native/models/responses.js.map +1 -1
  340. package/dist/react-native/utli/converters.d.ts.map +1 -1
  341. package/dist/react-native/utli/converters.js +19 -1
  342. package/dist/react-native/utli/converters.js.map +1 -1
  343. package/package.json +17 -11
  344. package/dist/browser/eventprocessor/callAutomationEventProcessor.d.ts +0 -39
  345. package/dist/browser/eventprocessor/callAutomationEventProcessor.d.ts.map +0 -1
  346. package/dist/browser/eventprocessor/callAutomationEventProcessor.js +0 -137
  347. package/dist/browser/eventprocessor/callAutomationEventProcessor.js.map +0 -1
  348. package/dist/browser/eventprocessor/eventResponses.d.ts +0 -123
  349. package/dist/browser/eventprocessor/eventResponses.d.ts.map +0 -1
  350. package/dist/browser/eventprocessor/eventResponses.js +0 -4
  351. package/dist/browser/eventprocessor/eventResponses.js.map +0 -1
  352. package/dist/browser/generated/src/operations/callDialog.d.ts +0 -35
  353. package/dist/browser/generated/src/operations/callDialog.d.ts.map +0 -1
  354. package/dist/browser/generated/src/operations/callDialog.js +0 -111
  355. package/dist/browser/generated/src/operations/callDialog.js.map +0 -1
  356. package/dist/browser/generated/src/operationsInterfaces/callDialog.d.ts +0 -27
  357. package/dist/browser/generated/src/operationsInterfaces/callDialog.d.ts.map +0 -1
  358. package/dist/browser/generated/src/operationsInterfaces/callDialog.js +0 -9
  359. package/dist/browser/generated/src/operationsInterfaces/callDialog.js.map +0 -1
  360. package/dist/commonjs/eventprocessor/callAutomationEventProcessor.d.ts +0 -39
  361. package/dist/commonjs/eventprocessor/callAutomationEventProcessor.d.ts.map +0 -1
  362. package/dist/commonjs/eventprocessor/callAutomationEventProcessor.js +0 -141
  363. package/dist/commonjs/eventprocessor/callAutomationEventProcessor.js.map +0 -1
  364. package/dist/commonjs/eventprocessor/eventResponses.d.ts +0 -123
  365. package/dist/commonjs/eventprocessor/eventResponses.d.ts.map +0 -1
  366. package/dist/commonjs/eventprocessor/eventResponses.js +0 -5
  367. package/dist/commonjs/eventprocessor/eventResponses.js.map +0 -1
  368. package/dist/commonjs/generated/src/operations/callDialog.d.ts +0 -35
  369. package/dist/commonjs/generated/src/operations/callDialog.d.ts.map +0 -1
  370. package/dist/commonjs/generated/src/operations/callDialog.js +0 -116
  371. package/dist/commonjs/generated/src/operations/callDialog.js.map +0 -1
  372. package/dist/commonjs/generated/src/operationsInterfaces/callDialog.d.ts +0 -27
  373. package/dist/commonjs/generated/src/operationsInterfaces/callDialog.d.ts.map +0 -1
  374. package/dist/commonjs/generated/src/operationsInterfaces/callDialog.js +0 -10
  375. package/dist/commonjs/generated/src/operationsInterfaces/callDialog.js.map +0 -1
  376. package/dist/esm/eventprocessor/callAutomationEventProcessor.d.ts +0 -39
  377. package/dist/esm/eventprocessor/callAutomationEventProcessor.d.ts.map +0 -1
  378. package/dist/esm/eventprocessor/callAutomationEventProcessor.js +0 -137
  379. package/dist/esm/eventprocessor/callAutomationEventProcessor.js.map +0 -1
  380. package/dist/esm/eventprocessor/eventResponses.d.ts +0 -123
  381. package/dist/esm/eventprocessor/eventResponses.d.ts.map +0 -1
  382. package/dist/esm/eventprocessor/eventResponses.js +0 -4
  383. package/dist/esm/eventprocessor/eventResponses.js.map +0 -1
  384. package/dist/esm/generated/src/operations/callDialog.d.ts +0 -35
  385. package/dist/esm/generated/src/operations/callDialog.d.ts.map +0 -1
  386. package/dist/esm/generated/src/operations/callDialog.js +0 -111
  387. package/dist/esm/generated/src/operations/callDialog.js.map +0 -1
  388. package/dist/esm/generated/src/operationsInterfaces/callDialog.d.ts +0 -27
  389. package/dist/esm/generated/src/operationsInterfaces/callDialog.d.ts.map +0 -1
  390. package/dist/esm/generated/src/operationsInterfaces/callDialog.js +0 -9
  391. package/dist/esm/generated/src/operationsInterfaces/callDialog.js.map +0 -1
  392. package/dist/react-native/eventprocessor/callAutomationEventProcessor.d.ts +0 -39
  393. package/dist/react-native/eventprocessor/callAutomationEventProcessor.d.ts.map +0 -1
  394. package/dist/react-native/eventprocessor/callAutomationEventProcessor.js +0 -137
  395. package/dist/react-native/eventprocessor/callAutomationEventProcessor.js.map +0 -1
  396. package/dist/react-native/eventprocessor/eventResponses.d.ts +0 -123
  397. package/dist/react-native/eventprocessor/eventResponses.d.ts.map +0 -1
  398. package/dist/react-native/eventprocessor/eventResponses.js +0 -4
  399. package/dist/react-native/eventprocessor/eventResponses.js.map +0 -1
  400. package/dist/react-native/generated/src/operations/callDialog.d.ts +0 -35
  401. package/dist/react-native/generated/src/operations/callDialog.d.ts.map +0 -1
  402. package/dist/react-native/generated/src/operations/callDialog.js +0 -111
  403. package/dist/react-native/generated/src/operations/callDialog.js.map +0 -1
  404. package/dist/react-native/generated/src/operationsInterfaces/callDialog.d.ts +0 -27
  405. package/dist/react-native/generated/src/operationsInterfaces/callDialog.d.ts.map +0 -1
  406. package/dist/react-native/generated/src/operationsInterfaces/callDialog.js +0 -9
  407. package/dist/react-native/generated/src/operationsInterfaces/callDialog.js.map +0 -1
@@ -1,29 +1,31 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
3
  import { __asyncValues, __rest } from "tslib";
4
+ import { createCommunicationAuthPolicy, } from "@azure/communication-common";
4
5
  import { CallMedia } from "./callMedia.js";
6
+ import { CallAutomationApiClient, } from "./generated/src/index.js";
5
7
  import { CallConnectionImpl } from "./generated/src/operations/index.js";
6
8
  import { callParticipantConverter, communicationIdentifierConverter, communicationIdentifierModelConverter, communicationUserIdentifierConverter, phoneNumberIdentifierConverter, PhoneNumberIdentifierModelConverter, } from "./utli/converters.js";
7
9
  import { randomUUID } from "@azure/core-util";
8
- import { createCustomCallAutomationApiClient } from "./credential/callAutomationAuthPolicy.js";
9
10
  /**
10
11
  * CallConnection class represents call connection based APIs.
11
12
  */
12
13
  export class CallConnection {
13
- constructor(callConnectionId, endpoint, credential, eventProcessor, options) {
14
- this.callAutomationApiClient = createCustomCallAutomationApiClient(credential, options, endpoint);
14
+ constructor(callConnectionId, endpoint, credential, options) {
15
+ this.callAutomationApiClient = new CallAutomationApiClient(endpoint, options);
16
+ const authPolicy = createCommunicationAuthPolicy(credential);
17
+ this.callAutomationApiClient.pipeline.addPolicy(authPolicy);
15
18
  this.callConnectionId = callConnectionId;
16
19
  this.callConnection = new CallConnectionImpl(this.callAutomationApiClient);
17
20
  this.endpoint = endpoint;
18
21
  this.credential = credential;
19
- this.callAutomationEventProcessor = eventProcessor;
20
22
  this.callAutomationApiClientOptions = options;
21
23
  }
22
24
  /**
23
25
  * Initializes a new instance of CallMedia.
24
26
  */
25
27
  getCallMedia() {
26
- return new CallMedia(this.callConnectionId, this.endpoint, this.credential, this.callAutomationEventProcessor, this.callAutomationApiClientOptions);
28
+ return new CallMedia(this.callConnectionId, this.endpoint, this.credential, this.callAutomationApiClientOptions);
27
29
  }
28
30
  /**
29
31
  * Get call connection properties of the call
@@ -105,12 +107,7 @@ export class CallConnection {
105
107
  sipHeaders[`User-To-User`] = header.value;
106
108
  }
107
109
  else if (header.kind === "sipx") {
108
- if (header.sipHeaderPrefix === "X-") {
109
- sipHeaders[`X-${header.key}`] = header.value;
110
- }
111
- else {
112
- sipHeaders[`X-MS-Custom-${header.key}`] = header.value;
113
- }
110
+ sipHeaders[`X-MS-Custom-${header.key}`] = header.value;
114
111
  }
115
112
  else if (header.kind === "voip") {
116
113
  voipHeaders[`${header.key}`] = header.value;
@@ -131,7 +128,7 @@ export class CallConnection {
131
128
  sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(targetParticipant.sourceCallIdNumber),
132
129
  sourceDisplayName: targetParticipant.sourceDisplayName,
133
130
  invitationTimeoutInSeconds: options.invitationTimeoutInSeconds,
134
- operationContext: options.operationContext ? options.operationContext : randomUUID(),
131
+ operationContext: options.operationContext,
135
132
  operationCallbackUri: options.operationCallbackUrl,
136
133
  customCallingContext: this.createCustomCallingContextInternal(targetParticipant.customCallingContext),
137
134
  };
@@ -139,31 +136,7 @@ export class CallConnection {
139
136
  const result = await this.callConnection.addParticipant(this.callConnectionId, addParticipantRequest, optionsInternal);
140
137
  const addParticipantsResult = Object.assign(Object.assign({}, result), { participant: Object.assign(Object.assign({}, result.participant), { identifier: ((_a = result.participant) === null || _a === void 0 ? void 0 : _a.identifier)
141
138
  ? communicationIdentifierConverter((_b = result.participant) === null || _b === void 0 ? void 0 : _b.identifier)
142
- : undefined }), waitForEventProcessor: async (abortSignal, timeoutInMs) => {
143
- const addParticipantEventResult = {
144
- isSuccess: false,
145
- };
146
- await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
147
- if (event.callConnectionId === this.callConnectionId &&
148
- event.kind === "AddParticipantSucceeded" &&
149
- event.operationContext === addParticipantRequest.operationContext) {
150
- addParticipantEventResult.isSuccess = true;
151
- addParticipantEventResult.successResult = event;
152
- return true;
153
- }
154
- else if (event.callConnectionId === this.callConnectionId &&
155
- event.kind === "AddParticipantFailed" &&
156
- event.operationContext === addParticipantRequest.operationContext) {
157
- addParticipantEventResult.isSuccess = false;
158
- addParticipantEventResult.failureResult = event;
159
- return true;
160
- }
161
- else {
162
- return false;
163
- }
164
- }, abortSignal, timeoutInMs);
165
- return addParticipantEventResult;
166
- } });
139
+ : undefined }) });
167
140
  return addParticipantsResult;
168
141
  }
169
142
  /**
@@ -182,31 +155,7 @@ export class CallConnection {
182
155
  };
183
156
  const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: randomUUID() });
184
157
  const result = await this.callConnection.transferToParticipant(this.callConnectionId, transferToParticipantRequest, optionsInternal);
185
- const transferCallResult = Object.assign(Object.assign({}, result), { waitForEventProcessor: async (abortSignal, timeoutInMs) => {
186
- const transferCallToParticipantEventResult = {
187
- isSuccess: false,
188
- };
189
- await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
190
- if (event.callConnectionId === this.callConnectionId &&
191
- event.kind === "CallTransferAccepted" &&
192
- event.operationContext === transferToParticipantRequest.operationContext) {
193
- transferCallToParticipantEventResult.isSuccess = true;
194
- transferCallToParticipantEventResult.successResult = event;
195
- return true;
196
- }
197
- else if (event.callConnectionId === this.callConnectionId &&
198
- event.kind === "CallTransferFailed" &&
199
- event.operationContext === transferToParticipantRequest.operationContext) {
200
- transferCallToParticipantEventResult.isSuccess = false;
201
- transferCallToParticipantEventResult.failureResult = event;
202
- return true;
203
- }
204
- else {
205
- return false;
206
- }
207
- }, abortSignal, timeoutInMs);
208
- return transferCallToParticipantEventResult;
209
- } });
158
+ const transferCallResult = Object.assign({}, result);
210
159
  return transferCallResult;
211
160
  }
212
161
  /**
@@ -222,31 +171,7 @@ export class CallConnection {
222
171
  };
223
172
  const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: randomUUID() });
224
173
  const result = await this.callConnection.removeParticipant(this.callConnectionId, removeParticipantRequest, optionsInternal);
225
- const removeParticipantsResult = Object.assign(Object.assign({}, result), { waitForEventProcessor: async (abortSignal, timeoutInMs) => {
226
- const removeParticipantEventResult = {
227
- isSuccess: false,
228
- };
229
- await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
230
- if (event.callConnectionId === this.callConnectionId &&
231
- event.kind === "RemoveParticipantSucceeded" &&
232
- event.operationContext === removeParticipantRequest.operationContext) {
233
- removeParticipantEventResult.isSuccess = true;
234
- removeParticipantEventResult.successResult = event;
235
- return true;
236
- }
237
- else if (event.callConnectionId === this.callConnectionId &&
238
- event.kind === "RemoveParticipantFailed" &&
239
- event.operationContext === removeParticipantRequest.operationContext) {
240
- removeParticipantEventResult.isSuccess = false;
241
- removeParticipantEventResult.failureResult = event;
242
- return true;
243
- }
244
- else {
245
- return false;
246
- }
247
- }, abortSignal, timeoutInMs);
248
- return removeParticipantEventResult;
249
- } });
174
+ const removeParticipantsResult = Object.assign({}, result);
250
175
  return removeParticipantsResult;
251
176
  }
252
177
  /**
@@ -278,31 +203,7 @@ export class CallConnection {
278
203
  };
279
204
  const optionsInternal = Object.assign(Object.assign({}, operationOptions), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: randomUUID() });
280
205
  const result = await this.callConnection.cancelAddParticipant(this.callConnectionId, cancelAddParticipantRequest, optionsInternal);
281
- const cancelAddParticipantResult = Object.assign(Object.assign({}, result), { waitForEventProcessor: async (abortSignal, timeoutInMs) => {
282
- const cancelAddParticipantEventResult = {
283
- isSuccess: false,
284
- };
285
- await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
286
- if (event.callConnectionId === this.callConnectionId &&
287
- event.kind === "CancelAddParticipantSucceeded" &&
288
- event.operationContext === cancelAddParticipantRequest.operationContext) {
289
- cancelAddParticipantEventResult.isSuccess = true;
290
- cancelAddParticipantEventResult.successResult = event;
291
- return true;
292
- }
293
- else if (event.callConnectionId === this.callConnectionId &&
294
- event.kind === "CancelAddParticipantFailed" &&
295
- event.operationContext === cancelAddParticipantRequest.operationContext) {
296
- cancelAddParticipantEventResult.isSuccess = false;
297
- cancelAddParticipantEventResult.failureResult = event;
298
- return true;
299
- }
300
- else {
301
- return false;
302
- }
303
- }, abortSignal, timeoutInMs);
304
- return cancelAddParticipantEventResult;
305
- } });
206
+ const cancelAddParticipantResult = Object.assign({}, result);
306
207
  return cancelAddParticipantResult;
307
208
  }
308
209
  }
@@ -1 +1 @@
1
- {"version":3,"file":"callConnection.js","sourceRoot":"","sources":["../../src/callConnection.ts"],"names":[],"mappings":"AAAA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AAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE;gBACxD,MAAM,+BAA+B,GAAoC;oBACvE,SAAS,EAAE,KAAK;iBACjB,CAAC;gBACF,MAAM,IAAI,CAAC,4BAA4B,CAAC,qBAAqB,CAC3D,CAAC,KAAK,EAAE,EAAE;oBACR,IACE,KAAK,CAAC,gBAAgB,KAAK,IAAI,CAAC,gBAAgB;wBAChD,KAAK,CAAC,IAAI,KAAK,+BAA+B;wBAC9C,KAAK,CAAC,gBAAgB,KAAK,2BAA2B,CAAC,gBAAgB,EACvE,CAAC;wBACD,+BAA+B,CAAC,SAAS,GAAG,IAAI,CAAC;wBACjD,+BAA+B,CAAC,aAAa,GAAG,KAAK,CAAC;wBACtD,OAAO,IAAI,CAAC;oBACd,CAAC;yBAAM,IACL,KAAK,CAAC,gBAAgB,KAAK,IAAI,CAAC,gBAAgB;wBAChD,KAAK,CAAC,IAAI,KAAK,4BAA4B;wBAC3C,KAAK,CAAC,gBAAgB,KAAK,2BAA2B,CAAC,gBAAgB,EACvE,CAAC;wBACD,+BAA+B,CAAC,SAAS,GAAG,KAAK,CAAC;wBAClD,+BAA+B,CAAC,aAAa,GAAG,KAAK,CAAC;wBACtD,OAAO,IAAI,CAAC;oBACd,CAAC;yBAAM,CAAC;wBACN,OAAO,KAAK,CAAC;oBACf,CAAC;gBACH,CAAC,EACD,WAAW,EACX,WAAW,CACZ,CAAC;gBACF,OAAO,+BAA+B,CAAC;YACzC,CAAC,GACF,CAAC;QAEF,OAAO,0BAA0B,CAAC;IACpC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommunicationIdentifier } from \"@azure/communication-common\";\nimport { CallMedia } from \"./callMedia.js\";\nimport type {\n AddParticipantRequest,\n CallAutomationApiClient,\n CallAutomationApiClientOptionalParams,\n CustomCallingContextInternal,\n MuteParticipantsRequest,\n RemoveParticipantRequest,\n TransferToParticipantRequest,\n} from \"./generated/src/index.js\";\nimport { CallConnectionImpl } from \"./generated/src/operations/index.js\";\nimport {\n type CallConnectionProperties,\n type CallInvite,\n type CallParticipant,\n type CustomCallingContext,\n} from \"./models/models.js\";\nimport type {\n AddParticipantOptions,\n CancelAddParticipantOperationOptions,\n GetCallConnectionPropertiesOptions,\n GetParticipantOptions,\n HangUpOptions,\n MuteParticipantOption,\n RemoveParticipantsOption,\n TransferCallToParticipantOptions,\n} from \"./models/options.js\";\nimport type {\n ListParticipantsResult,\n TransferCallResult,\n AddParticipantResult,\n RemoveParticipantResult,\n MuteParticipantResult,\n CancelAddParticipantOperationResult,\n} from \"./models/responses.js\";\nimport {\n callParticipantConverter,\n communicationIdentifierConverter,\n communicationIdentifierModelConverter,\n communicationUserIdentifierConverter,\n phoneNumberIdentifierConverter,\n PhoneNumberIdentifierModelConverter,\n} from \"./utli/converters.js\";\nimport { randomUUID } from \"@azure/core-util\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport type { CallAutomationEventProcessor } from \"./eventprocessor/callAutomationEventProcessor.js\";\nimport type {\n AddParticipantEventResult,\n CancelAddParticipantEventResult,\n RemoveParticipantEventResult,\n TransferCallToParticipantEventResult,\n} from \"./eventprocessor/eventResponses.js\";\nimport { createCustomCallAutomationApiClient } from \"./credential/callAutomationAuthPolicy.js\";\n\n/**\n * CallConnection class represents call connection based APIs.\n */\nexport class CallConnection {\n private readonly callConnectionId: string;\n private readonly callConnection: CallConnectionImpl;\n private readonly callAutomationApiClient: CallAutomationApiClient;\n private readonly endpoint: string;\n private readonly credential: TokenCredential | KeyCredential;\n private readonly callAutomationApiClientOptions?: CallAutomationApiClientOptionalParams;\n private readonly callAutomationEventProcessor: CallAutomationEventProcessor;\n constructor(\n callConnectionId: string,\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n eventProcessor: CallAutomationEventProcessor,\n options?: CallAutomationApiClientOptionalParams,\n ) {\n this.callAutomationApiClient = createCustomCallAutomationApiClient(\n credential,\n options,\n endpoint,\n );\n this.callConnectionId = callConnectionId;\n this.callConnection = new CallConnectionImpl(this.callAutomationApiClient);\n this.endpoint = endpoint;\n this.credential = credential;\n this.callAutomationEventProcessor = eventProcessor;\n this.callAutomationApiClientOptions = options;\n }\n\n /**\n * Initializes a new instance of CallMedia.\n */\n public getCallMedia(): CallMedia {\n return new CallMedia(\n this.callConnectionId,\n this.endpoint,\n this.credential,\n this.callAutomationEventProcessor,\n this.callAutomationApiClientOptions,\n );\n }\n\n /**\n * Get call connection properties of the call\n */\n public async getCallConnectionProperties(\n options: GetCallConnectionPropertiesOptions = {},\n ): Promise<CallConnectionProperties> {\n const { targets, sourceCallerIdNumber, answeredBy, source, answeredFor, ...result } =\n await this.callConnection.getCall(this.callConnectionId, options);\n const callConnectionProperties: CallConnectionProperties = {\n ...result,\n source: source ? communicationIdentifierConverter(source) : undefined,\n answeredby: communicationUserIdentifierConverter(answeredBy),\n answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined,\n targetParticipants: targets?.map((target) => communicationIdentifierConverter(target)),\n sourceCallerIdNumber: sourceCallerIdNumber\n ? phoneNumberIdentifierConverter(sourceCallerIdNumber)\n : undefined,\n };\n return callConnectionProperties;\n }\n\n /**\n * Hang up the call for itself or terminate the whole call.\n *\n * @param isForEveryOne - Determine if every one in the call would be hung up or not.\n */\n public async hangUp(isForEveryone: boolean, options: HangUpOptions = {}): Promise<void> {\n if (isForEveryone) {\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n await this.callConnection.terminateCall(this.callConnectionId, optionsInternal);\n } else {\n await this.callConnection.hangupCall(this.callConnectionId, options);\n }\n return;\n }\n\n /**\n * Get a participant from the call\n *\n * @param targetParticipant - The communication identifier of requested participant.\n */\n public async getParticipant(\n targetParticipant: CommunicationIdentifier,\n options: GetParticipantOptions = {},\n ): Promise<CallParticipant> {\n let rawId: string | undefined = communicationIdentifierModelConverter(targetParticipant).rawId;\n rawId = rawId === undefined ? \"\" : rawId;\n\n const result = await this.callConnection.getParticipant(this.callConnectionId, rawId, options);\n const callParticipant: CallParticipant = {\n identifier: result.identifier\n ? communicationIdentifierConverter(result.identifier)\n : undefined,\n isMuted: result.isMuted,\n isOnHold: result.isOnHold,\n };\n return callParticipant;\n }\n\n /**\n * Get all participants from the call\n */\n public async listParticipants(\n options: GetParticipantOptions = {},\n ): Promise<ListParticipantsResult> {\n const result = this.callConnection.listParticipants(this.callConnectionId, options);\n const participants = [];\n const pages = result?.byPage();\n\n for await (const page of pages) {\n for (const participant of page) {\n participants.push(callParticipantConverter(participant));\n }\n }\n\n const listParticipantResponse: ListParticipantsResult = {\n ...result,\n values: participants,\n };\n return listParticipantResponse;\n }\n\n private createCustomCallingContextInternal(\n customCallingContext: CustomCallingContext,\n ): CustomCallingContextInternal {\n const sipHeaders: { [key: string]: string } = {};\n const voipHeaders: { [key: string]: string } = {};\n if (customCallingContext) {\n for (const header of customCallingContext) {\n if (header.kind === \"sipuui\") {\n sipHeaders[`User-To-User`] = header.value;\n } else if (header.kind === \"sipx\") {\n if (header.sipHeaderPrefix === \"X-\") {\n sipHeaders[`X-${header.key}`] = header.value;\n } else {\n sipHeaders[`X-MS-Custom-${header.key}`] = header.value;\n }\n } else if (header.kind === \"voip\") {\n voipHeaders[`${header.key}`] = header.value;\n }\n }\n }\n return { sipHeaders: sipHeaders, voipHeaders: voipHeaders };\n }\n\n /**\n * Add a participant to the call\n *\n * @param participant - The participant is going to be added.\n */\n public async addParticipant(\n targetParticipant: CallInvite,\n options: AddParticipantOptions = {},\n ): Promise<AddParticipantResult> {\n const addParticipantRequest: AddParticipantRequest = {\n participantToAdd: communicationIdentifierModelConverter(targetParticipant.targetParticipant),\n sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(\n targetParticipant.sourceCallIdNumber,\n ),\n sourceDisplayName: targetParticipant.sourceDisplayName,\n invitationTimeoutInSeconds: options.invitationTimeoutInSeconds,\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n customCallingContext: this.createCustomCallingContextInternal(\n targetParticipant.customCallingContext!,\n ),\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const result = await this.callConnection.addParticipant(\n this.callConnectionId,\n addParticipantRequest,\n optionsInternal,\n );\n const addParticipantsResult: AddParticipantResult = {\n ...result,\n participant: {\n ...result.participant,\n identifier: result.participant?.identifier\n ? communicationIdentifierConverter(result.participant?.identifier)\n : undefined,\n },\n waitForEventProcessor: async (abortSignal, timeoutInMs) => {\n const addParticipantEventResult: AddParticipantEventResult = {\n isSuccess: false,\n };\n await this.callAutomationEventProcessor.waitForEventProcessor(\n (event) => {\n if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"AddParticipantSucceeded\" &&\n event.operationContext === addParticipantRequest.operationContext\n ) {\n addParticipantEventResult.isSuccess = true;\n addParticipantEventResult.successResult = event;\n return true;\n } else if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"AddParticipantFailed\" &&\n event.operationContext === addParticipantRequest.operationContext\n ) {\n addParticipantEventResult.isSuccess = false;\n addParticipantEventResult.failureResult = event;\n return true;\n } else {\n return false;\n }\n },\n abortSignal,\n timeoutInMs,\n );\n return addParticipantEventResult;\n },\n };\n return addParticipantsResult;\n }\n\n /**\n * Transfer the call to a target participant\n *\n * @param targetParticipant - The target to be transferred to.\n */\n public async transferCallToParticipant(\n targetParticipant: CommunicationIdentifier,\n options: TransferCallToParticipantOptions = {},\n ): Promise<TransferCallResult> {\n const transferToParticipantRequest: TransferToParticipantRequest = {\n targetParticipant: communicationIdentifierModelConverter(targetParticipant),\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n transferee: options.transferee && communicationIdentifierModelConverter(options.transferee),\n customCallingContext: this.createCustomCallingContextInternal(options.customCallingContext!),\n sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(options.sourceCallIdNumber),\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const result = await this.callConnection.transferToParticipant(\n this.callConnectionId,\n transferToParticipantRequest,\n optionsInternal,\n );\n const transferCallResult: TransferCallResult = {\n ...result,\n waitForEventProcessor: async (abortSignal, timeoutInMs) => {\n const transferCallToParticipantEventResult: TransferCallToParticipantEventResult = {\n isSuccess: false,\n };\n await this.callAutomationEventProcessor.waitForEventProcessor(\n (event) => {\n if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"CallTransferAccepted\" &&\n event.operationContext === transferToParticipantRequest.operationContext\n ) {\n transferCallToParticipantEventResult.isSuccess = true;\n transferCallToParticipantEventResult.successResult = event;\n return true;\n } else if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"CallTransferFailed\" &&\n event.operationContext === transferToParticipantRequest.operationContext\n ) {\n transferCallToParticipantEventResult.isSuccess = false;\n transferCallToParticipantEventResult.failureResult = event;\n return true;\n } else {\n return false;\n }\n },\n abortSignal,\n timeoutInMs,\n );\n return transferCallToParticipantEventResult;\n },\n };\n return transferCallResult;\n }\n\n /**\n * Remove a participant from the call\n *\n * @param participant - The participant is going to be removed from the call.\n */\n public async removeParticipant(\n participant: CommunicationIdentifier,\n options: RemoveParticipantsOption = {},\n ): Promise<RemoveParticipantResult> {\n const removeParticipantRequest: RemoveParticipantRequest = {\n participantToRemove: communicationIdentifierModelConverter(participant),\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const result = await this.callConnection.removeParticipant(\n this.callConnectionId,\n removeParticipantRequest,\n optionsInternal,\n );\n const removeParticipantsResult: RemoveParticipantResult = {\n ...result,\n waitForEventProcessor: async (abortSignal, timeoutInMs) => {\n const removeParticipantEventResult: RemoveParticipantEventResult = {\n isSuccess: false,\n };\n await this.callAutomationEventProcessor.waitForEventProcessor(\n (event) => {\n if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"RemoveParticipantSucceeded\" &&\n event.operationContext === removeParticipantRequest.operationContext\n ) {\n removeParticipantEventResult.isSuccess = true;\n removeParticipantEventResult.successResult = event;\n return true;\n } else if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"RemoveParticipantFailed\" &&\n event.operationContext === removeParticipantRequest.operationContext\n ) {\n removeParticipantEventResult.isSuccess = false;\n removeParticipantEventResult.failureResult = event;\n return true;\n } else {\n return false;\n }\n },\n abortSignal,\n timeoutInMs,\n );\n return removeParticipantEventResult;\n },\n };\n return removeParticipantsResult;\n }\n\n /**\n * Mute participant from the call.\n *\n * @param participant - Participant to be muted from the call.\n * @param options - Additional attributes for mute participant.\n */\n public async muteParticipant(\n participant: CommunicationIdentifier,\n options: MuteParticipantOption = {},\n ): Promise<MuteParticipantResult> {\n const muteParticipantsRequest: MuteParticipantsRequest = {\n targetParticipants: [communicationIdentifierModelConverter(participant)],\n operationContext: options.operationContext,\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const result = await this.callConnection.mute(\n this.callConnectionId,\n muteParticipantsRequest,\n optionsInternal,\n );\n const muteParticipantResult: MuteParticipantResult = {\n ...result,\n };\n return muteParticipantResult;\n }\n\n /** Cancel add participant request.\n *\n * @param invitationId - Invitation ID used to cancel the add participant request.\n */\n public async cancelAddParticipantOperation(\n invitationId: string,\n options: CancelAddParticipantOperationOptions = {},\n ): Promise<CancelAddParticipantOperationResult> {\n const {\n operationContext,\n operationCallbackUrl: operationCallbackUri,\n ...operationOptions\n } = options;\n const cancelAddParticipantRequest = {\n invitationId,\n operationContext: operationContext ? operationContext : randomUUID(),\n operationCallbackUri,\n };\n const optionsInternal = {\n ...operationOptions,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n\n const result = await this.callConnection.cancelAddParticipant(\n this.callConnectionId,\n cancelAddParticipantRequest,\n optionsInternal,\n );\n\n const cancelAddParticipantResult: CancelAddParticipantOperationResult = {\n ...result,\n waitForEventProcessor: async (abortSignal, timeoutInMs) => {\n const cancelAddParticipantEventResult: CancelAddParticipantEventResult = {\n isSuccess: false,\n };\n await this.callAutomationEventProcessor.waitForEventProcessor(\n (event) => {\n if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"CancelAddParticipantSucceeded\" &&\n event.operationContext === cancelAddParticipantRequest.operationContext\n ) {\n cancelAddParticipantEventResult.isSuccess = true;\n cancelAddParticipantEventResult.successResult = event;\n return true;\n } else if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"CancelAddParticipantFailed\" &&\n event.operationContext === cancelAddParticipantRequest.operationContext\n ) {\n cancelAddParticipantEventResult.isSuccess = false;\n cancelAddParticipantEventResult.failureResult = event;\n return true;\n } else {\n return false;\n }\n },\n abortSignal,\n timeoutInMs,\n );\n return cancelAddParticipantEventResult;\n },\n };\n\n return cancelAddParticipantResult;\n }\n}\n"]}
1
+ {"version":3,"file":"callConnection.js","sourceRoot":"","sources":["../../src/callConnection.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAElC,OAAO,EAEL,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAEL,uBAAuB,GAMxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAyBzE,OAAO,EACL,wBAAwB,EACxB,gCAAgC,EAChC,qCAAqC,EACrC,oCAAoC,EACpC,8BAA8B,EAC9B,mCAAmC,GACpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C;;GAEG;AACH,MAAM,OAAO,cAAc;IAOzB,YACE,gBAAwB,EACxB,QAAgB,EAChB,UAA2C,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AAsB,EAAE,IAAI,IAAI,EAAE,EAClC,sBAAsB,EAAE,UAAU,EAAE,GACrC,CAAC;QAEF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,oBAAoB,CAC3D,IAAI,CAAC,gBAAgB,EACrB,2BAA2B,EAC3B,eAAe,CAChB,CAAC;QAEF,MAAM,0BAA0B,qBAC3B,MAAM,CACV,CAAC;QAEF,OAAO,0BAA0B,CAAC;IACpC,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CommunicationIdentifier,\n createCommunicationAuthPolicy,\n} from \"@azure/communication-common\";\nimport { CallMedia } from \"./callMedia.js\";\nimport {\n AddParticipantRequest,\n CallAutomationApiClient,\n CallAutomationApiClientOptionalParams,\n CustomCallingContextInternal,\n MuteParticipantsRequest,\n RemoveParticipantRequest,\n TransferToParticipantRequest,\n} from \"./generated/src/index.js\";\nimport { CallConnectionImpl } from \"./generated/src/operations/index.js\";\nimport type {\n CallConnectionProperties,\n CallInvite,\n CallParticipant,\n CustomCallingContext,\n} from \"./models/models.js\";\nimport type {\n AddParticipantOptions,\n CancelAddParticipantOperationOptions,\n GetCallConnectionPropertiesOptions,\n GetParticipantOptions,\n HangUpOptions,\n MuteParticipantOption,\n RemoveParticipantsOption,\n TransferCallToParticipantOptions,\n} from \"./models/options.js\";\nimport type {\n ListParticipantsResult,\n TransferCallResult,\n AddParticipantResult,\n RemoveParticipantResult,\n MuteParticipantResult,\n CancelAddParticipantOperationResult,\n} from \"./models/responses.js\";\nimport {\n callParticipantConverter,\n communicationIdentifierConverter,\n communicationIdentifierModelConverter,\n communicationUserIdentifierConverter,\n phoneNumberIdentifierConverter,\n PhoneNumberIdentifierModelConverter,\n} from \"./utli/converters.js\";\nimport { randomUUID } from \"@azure/core-util\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\n\n/**\n * CallConnection class represents call connection based APIs.\n */\nexport class CallConnection {\n private readonly callConnectionId: string;\n private readonly callConnection: CallConnectionImpl;\n private readonly callAutomationApiClient: CallAutomationApiClient;\n private readonly endpoint: string;\n private readonly credential: TokenCredential | KeyCredential;\n private readonly callAutomationApiClientOptions?: CallAutomationApiClientOptionalParams;\n constructor(\n callConnectionId: string,\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: CallAutomationApiClientOptionalParams,\n ) {\n this.callAutomationApiClient = new CallAutomationApiClient(endpoint, options);\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.callAutomationApiClient.pipeline.addPolicy(authPolicy);\n this.callConnectionId = callConnectionId;\n this.callConnection = new CallConnectionImpl(this.callAutomationApiClient);\n this.endpoint = endpoint;\n this.credential = credential;\n this.callAutomationApiClientOptions = options;\n }\n\n /**\n * Initializes a new instance of CallMedia.\n */\n public getCallMedia(): CallMedia {\n return new CallMedia(\n this.callConnectionId,\n this.endpoint,\n this.credential,\n this.callAutomationApiClientOptions,\n );\n }\n\n /**\n * Get call connection properties of the call\n */\n public async getCallConnectionProperties(\n options: GetCallConnectionPropertiesOptions = {},\n ): Promise<CallConnectionProperties> {\n const { targets, sourceCallerIdNumber, answeredBy, source, answeredFor, ...result } =\n await this.callConnection.getCall(this.callConnectionId, options);\n const callConnectionProperties: CallConnectionProperties = {\n ...result,\n source: source ? communicationIdentifierConverter(source) : undefined,\n answeredby: communicationUserIdentifierConverter(answeredBy),\n answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined,\n targetParticipants: targets?.map((target) => communicationIdentifierConverter(target)),\n sourceCallerIdNumber: sourceCallerIdNumber\n ? phoneNumberIdentifierConverter(sourceCallerIdNumber)\n : undefined,\n };\n return callConnectionProperties;\n }\n\n /**\n * Hang up the call for itself or terminate the whole call.\n *\n * @param isForEveryOne - Determine if every one in the call would be hung up or not.\n */\n public async hangUp(isForEveryone: boolean, options: HangUpOptions = {}): Promise<void> {\n if (isForEveryone) {\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n await this.callConnection.terminateCall(this.callConnectionId, optionsInternal);\n } else {\n await this.callConnection.hangupCall(this.callConnectionId, options);\n }\n return;\n }\n\n /**\n * Get a participant from the call\n *\n * @param targetParticipant - The communication identifier of requested participant.\n */\n public async getParticipant(\n targetParticipant: CommunicationIdentifier,\n options: GetParticipantOptions = {},\n ): Promise<CallParticipant> {\n let rawId: string | undefined = communicationIdentifierModelConverter(targetParticipant).rawId;\n rawId = rawId === undefined ? \"\" : rawId;\n\n const result = await this.callConnection.getParticipant(this.callConnectionId, rawId, options);\n const callParticipant: CallParticipant = {\n identifier: result.identifier\n ? communicationIdentifierConverter(result.identifier)\n : undefined,\n isMuted: result.isMuted,\n isOnHold: result.isOnHold,\n };\n return callParticipant;\n }\n\n /**\n * Get all participants from the call\n */\n public async listParticipants(\n options: GetParticipantOptions = {},\n ): Promise<ListParticipantsResult> {\n const result = this.callConnection.listParticipants(this.callConnectionId, options);\n const participants = [];\n const pages = result?.byPage();\n\n for await (const page of pages) {\n for (const participant of page) {\n participants.push(callParticipantConverter(participant));\n }\n }\n\n const listParticipantResponse: ListParticipantsResult = {\n ...result,\n values: participants,\n };\n return listParticipantResponse;\n }\n\n private createCustomCallingContextInternal(\n customCallingContext: CustomCallingContext,\n ): CustomCallingContextInternal {\n const sipHeaders: { [key: string]: string } = {};\n const voipHeaders: { [key: string]: string } = {};\n if (customCallingContext) {\n for (const header of customCallingContext) {\n if (header.kind === \"sipuui\") {\n sipHeaders[`User-To-User`] = header.value;\n } else if (header.kind === \"sipx\") {\n sipHeaders[`X-MS-Custom-${header.key}`] = header.value;\n } else if (header.kind === \"voip\") {\n voipHeaders[`${header.key}`] = header.value;\n }\n }\n }\n return { sipHeaders: sipHeaders, voipHeaders: voipHeaders };\n }\n\n /**\n * Add a participant to the call\n *\n * @param participant - The participant is going to be added.\n */\n public async addParticipant(\n targetParticipant: CallInvite,\n options: AddParticipantOptions = {},\n ): Promise<AddParticipantResult> {\n const addParticipantRequest: AddParticipantRequest = {\n participantToAdd: communicationIdentifierModelConverter(targetParticipant.targetParticipant),\n sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(\n targetParticipant.sourceCallIdNumber,\n ),\n sourceDisplayName: targetParticipant.sourceDisplayName,\n invitationTimeoutInSeconds: options.invitationTimeoutInSeconds,\n operationContext: options.operationContext,\n operationCallbackUri: options.operationCallbackUrl,\n customCallingContext: this.createCustomCallingContextInternal(\n targetParticipant.customCallingContext!,\n ),\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const result = await this.callConnection.addParticipant(\n this.callConnectionId,\n addParticipantRequest,\n optionsInternal,\n );\n const addParticipantsResult: AddParticipantResult = {\n ...result,\n participant: {\n ...result.participant,\n identifier: result.participant?.identifier\n ? communicationIdentifierConverter(result.participant?.identifier)\n : undefined,\n },\n };\n return addParticipantsResult;\n }\n\n /**\n * Transfer the call to a target participant\n *\n * @param targetParticipant - The target to be transferred to.\n */\n public async transferCallToParticipant(\n targetParticipant: CommunicationIdentifier,\n options: TransferCallToParticipantOptions = {},\n ): Promise<TransferCallResult> {\n const transferToParticipantRequest: TransferToParticipantRequest = {\n targetParticipant: communicationIdentifierModelConverter(targetParticipant),\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n transferee: options.transferee && communicationIdentifierModelConverter(options.transferee),\n customCallingContext: this.createCustomCallingContextInternal(options.customCallingContext!),\n sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(options.sourceCallIdNumber),\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const result = await this.callConnection.transferToParticipant(\n this.callConnectionId,\n transferToParticipantRequest,\n optionsInternal,\n );\n const transferCallResult: TransferCallResult = {\n ...result,\n };\n return transferCallResult;\n }\n\n /**\n * Remove a participant from the call\n *\n * @param participant - The participant is going to be removed from the call.\n */\n public async removeParticipant(\n participant: CommunicationIdentifier,\n options: RemoveParticipantsOption = {},\n ): Promise<RemoveParticipantResult> {\n const removeParticipantRequest: RemoveParticipantRequest = {\n participantToRemove: communicationIdentifierModelConverter(participant),\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const result = await this.callConnection.removeParticipant(\n this.callConnectionId,\n removeParticipantRequest,\n optionsInternal,\n );\n const removeParticipantsResult: RemoveParticipantResult = {\n ...result,\n };\n return removeParticipantsResult;\n }\n\n /**\n * Mute participant from the call.\n *\n * @param participant - Participant to be muted from the call.\n * @param options - Additional attributes for mute participant.\n */\n public async muteParticipant(\n participant: CommunicationIdentifier,\n options: MuteParticipantOption = {},\n ): Promise<MuteParticipantResult> {\n const muteParticipantsRequest: MuteParticipantsRequest = {\n targetParticipants: [communicationIdentifierModelConverter(participant)],\n operationContext: options.operationContext,\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const result = await this.callConnection.mute(\n this.callConnectionId,\n muteParticipantsRequest,\n optionsInternal,\n );\n const muteParticipantResult: MuteParticipantResult = {\n ...result,\n };\n return muteParticipantResult;\n }\n\n /** Cancel add participant request.\n *\n * @param invitationId - Invitation ID used to cancel the add participant request.\n */\n public async cancelAddParticipantOperation(\n invitationId: string,\n options: CancelAddParticipantOperationOptions = {},\n ): Promise<CancelAddParticipantOperationResult> {\n const {\n operationContext,\n operationCallbackUrl: operationCallbackUri,\n ...operationOptions\n } = options;\n const cancelAddParticipantRequest = {\n invitationId,\n operationContext: operationContext ? operationContext : randomUUID(),\n operationCallbackUri,\n };\n const optionsInternal = {\n ...operationOptions,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n\n const result = await this.callConnection.cancelAddParticipant(\n this.callConnectionId,\n cancelAddParticipantRequest,\n optionsInternal,\n );\n\n const cancelAddParticipantResult: CancelAddParticipantOperationResult = {\n ...result,\n };\n\n return cancelAddParticipantResult;\n }\n}\n"]}
@@ -1,10 +1,9 @@
1
- import type { CallAutomationApiClientOptionalParams, Tone } from "./generated/src/index.js";
2
- import type { CommunicationIdentifier } from "@azure/communication-common";
1
+ import { CallAutomationApiClientOptionalParams, Tone } from "./generated/src/index.js";
2
+ import { CommunicationIdentifier } from "@azure/communication-common";
3
3
  import type { FileSource, TextSource, SsmlSource, DtmfTone } from "./models/models.js";
4
- import type { PlayOptions, CallMediaRecognizeDtmfOptions, CallMediaRecognizeChoiceOptions, ContinuousDtmfRecognitionOptions, SendDtmfTonesOptions, CallMediaRecognizeSpeechOptions, CallMediaRecognizeSpeechOrDtmfOptions, StartTranscriptionOptions, StopTranscriptionOptions, HoldOptions, UnholdOptions, StartMediaStreamingOptions, StopMediaStreamingOptions, PlayToAllOptions, UpdateTranscriptionOptions, InterruptAudioAndAnnounceOptions } from "./models/options.js";
4
+ import type { PlayOptions, CallMediaRecognizeDtmfOptions, CallMediaRecognizeChoiceOptions, ContinuousDtmfRecognitionOptions, SendDtmfTonesOptions, CallMediaRecognizeSpeechOptions, CallMediaRecognizeSpeechOrDtmfOptions, StartTranscriptionOptions, StopTranscriptionOptions, HoldOptions, UnholdOptions, StartMediaStreamingOptions, StopMediaStreamingOptions, PlayToAllOptions, UpdateTranscriptionOptions } from "./models/options.js";
5
5
  import type { KeyCredential, TokenCredential } from "@azure/core-auth";
6
- import type { CancelAllMediaOperationsResult, PlayResult, SendDtmfTonesResult, StartRecognizingResult } from "./models/responses.js";
7
- import type { CallAutomationEventProcessor } from "./eventprocessor/callAutomationEventProcessor.js";
6
+ import type { SendDtmfTonesResult } from "./models/responses.js";
8
7
  /**
9
8
  * CallMedia class represents call media related APIs.
10
9
  */
@@ -12,8 +11,7 @@ export declare class CallMedia {
12
11
  private readonly callConnectionId;
13
12
  private readonly callMedia;
14
13
  private readonly callAutomationApiClient;
15
- private readonly callAutomationEventProcessor;
16
- constructor(callConnectionId: string, endpoint: string, credential: KeyCredential | TokenCredential, eventProcessor: CallAutomationEventProcessor, options?: CallAutomationApiClientOptionalParams);
14
+ constructor(callConnectionId: string, endpoint: string, credential: KeyCredential | TokenCredential, options?: CallAutomationApiClientOptionalParams);
17
15
  private createPlaySourceInternal;
18
16
  /**
19
17
  * Play audio to a specific participant.
@@ -22,14 +20,14 @@ export declare class CallMedia {
22
20
  * @param playTo - The targets to play to.
23
21
  * @param options - Additional attributes for play.
24
22
  */
25
- play(playSources: (FileSource | TextSource | SsmlSource)[], playTo: CommunicationIdentifier[], options?: PlayOptions): Promise<PlayResult>;
23
+ play(playSources: (FileSource | TextSource | SsmlSource)[], playTo: CommunicationIdentifier[], options?: PlayOptions): Promise<void>;
26
24
  /**
27
25
  * Play to all participants.
28
26
  *
29
27
  * @param playSources - A PlaySource representing the sources to play. Currently only single play source per request is supported.
30
28
  * @param options - Additional attributes for play.
31
29
  */
32
- playToAll(playSources: (FileSource | TextSource | SsmlSource)[], options?: PlayToAllOptions): Promise<PlayResult>;
30
+ playToAll(playSources: (FileSource | TextSource | SsmlSource)[], options?: PlayToAllOptions): Promise<void>;
33
31
  private createRecognizeRequest;
34
32
  /**
35
33
  * Recognize participant input.
@@ -38,17 +36,17 @@ export declare class CallMedia {
38
36
  * @param maxTonesToCollect - Maximum number of DTMF tones to be collected.
39
37
  * @param options - Different attributes for recognize.
40
38
  * */
41
- startRecognizing(targetParticipant: CommunicationIdentifier, maxTonesToCollect: number, options: CallMediaRecognizeDtmfOptions): Promise<StartRecognizingResult>;
39
+ startRecognizing(targetParticipant: CommunicationIdentifier, maxTonesToCollect: number, options: CallMediaRecognizeDtmfOptions): Promise<void>;
42
40
  /**
43
41
  * Recognize participant input.
44
42
  * @param targetParticipant - Target participant.
45
43
  * @param options - Different attributes for recognize.
46
44
  * */
47
- startRecognizing(targetParticipant: CommunicationIdentifier, options: CallMediaRecognizeDtmfOptions | CallMediaRecognizeChoiceOptions | CallMediaRecognizeSpeechOptions | CallMediaRecognizeSpeechOrDtmfOptions): Promise<StartRecognizingResult>;
45
+ startRecognizing(targetParticipant: CommunicationIdentifier, options: CallMediaRecognizeDtmfOptions | CallMediaRecognizeChoiceOptions | CallMediaRecognizeSpeechOptions | CallMediaRecognizeSpeechOrDtmfOptions): Promise<void>;
48
46
  /**
49
47
  * Cancels all the queued media operations.
50
48
  */
51
- cancelAllOperations(): Promise<CancelAllMediaOperationsResult>;
49
+ cancelAllOperations(): Promise<void>;
52
50
  /**
53
51
  * Start continuous Dtmf recognition by subscribing to tones.
54
52
  * @param targetParticipant - Target participant.
@@ -107,13 +105,5 @@ export declare class CallMedia {
107
105
  * @param options - Additional attributes for stop media streaming.
108
106
  */
109
107
  stopMediaStreaming(options?: StopMediaStreamingOptions): Promise<void>;
110
- /**
111
- * Interrupt audio and announce to specific participant.
112
- *
113
- * @param playSources - A PlaySource representing the sources to play.
114
- * @param playTo - The targets to play to.
115
- * @param options - Additional attributes for interrupt audio and announce.
116
- */
117
- interruptAudioAndAnnounce(playSources: (FileSource | TextSource | SsmlSource)[], playTo: CommunicationIdentifier, options?: InterruptAudioAndAnnounceOptions): Promise<void>;
118
108
  }
119
109
  //# sourceMappingURL=callMedia.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"callMedia.d.ts","sourceRoot":"","sources":["../../src/callMedia.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAUV,qCAAqC,EAGrC,IAAI,EASL,MAAM,0BAA0B,CAAC;AAKlC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAG3E,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,KAAK,EACV,WAAW,EACX,6BAA6B,EAC7B,+BAA+B,EAC/B,gCAAgC,EAChC,oBAAoB,EACpB,+BAA+B,EAC/B,qCAAqC,EACrC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