@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 +1 @@
1
- {"version":3,"file":"callMedia.js","sourceRoot":"","sources":["../../src/callMedia.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAyBlC,uDAAwF;AAExF,kEAAoE;AAGpE,sEAA+E;AAmC/E,gDAA8C;AAC9C,0FAA+F;AAG/F;;GAEG;AACH,MAAa,SAAS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gB,EACrB,0BAA0B,EAC1B,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,kBAAkB,CAAC,UAAqC,EAAE;QACrE,MAAM,yBAAyB,GAA8B;YAC3D,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;YAClD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;SAC3C,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CACtC,IAAI,CAAC,gBAAgB,EACrB,yBAAyB,EACzB,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,yBAAyB,CACpC,WAAqD,EACrD,MAA+B,EAC/B,UAA4C,EAAE;QAE9C,MAAM,gCAAgC,GAAqC;YACzE,WAAW,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,CAAC;YAC/E,MAAM,EAAE,IAAA,uDAAgC,EAAC,MAAM,CAAC;YAChD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;SAC3C,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,yBAAyB,CAC7C,IAAI,CAAC,gBAAgB,EACrB,gCAAgC,CACjC,CAAC;IACJ,CAAC;CACF;AA1sBD,8BA0sBC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PlayRequest,\n PlaySourceInternal,\n FileSourceInternal,\n TextSourceInternal,\n SsmlSourceInternal,\n RecognizeRequest,\n RecognizeOptions,\n DtmfOptions,\n CallAutomationApiClient,\n CallAutomationApiClientOptionalParams,\n ContinuousDtmfRecognitionRequest,\n SendDtmfTonesRequest,\n Tone,\n SpeechOptions,\n StartTranscriptionRequest,\n StopTranscriptionRequest,\n UpdateTranscriptionRequest,\n HoldRequest,\n UnholdRequest,\n StartMediaStreamingRequest,\n StopMediaStreamingRequest,\n} from \"./generated/src/index.js\";\nimport { KnownPlaySourceType, KnownRecognizeInputType } from \"./generated/src/index.js\";\n\nimport { CallMediaImpl } from \"./generated/src/operations/index.js\";\n\nimport type { CommunicationIdentifier } from \"@azure/communication-common\";\nimport { serializeCommunicationIdentifier } from \"@azure/communication-common\";\n\nimport type { FileSource, TextSource, SsmlSource, DtmfTone } from \"./models/models.js\";\nimport type {\n PlayOptions,\n CallMediaRecognizeDtmfOptions,\n CallMediaRecognizeChoiceOptions,\n ContinuousDtmfRecognitionOptions,\n SendDtmfTonesOptions,\n CallMediaRecognizeSpeechOptions,\n CallMediaRecognizeSpeechOrDtmfOptions,\n StartTranscriptionOptions,\n StopTranscriptionOptions,\n HoldOptions,\n UnholdOptions,\n StartMediaStreamingOptions,\n StopMediaStreamingOptions,\n PlayToAllOptions,\n UpdateTranscriptionOptions,\n InterruptAudioAndAnnounceOptions,\n} from \"./models/options.js\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport type {\n CancelAllMediaOperationsResult,\n PlayResult,\n SendDtmfTonesResult,\n StartRecognizingResult,\n} from \"./models/responses.js\";\nimport type {\n CancelAllMediaOperationsEventResult,\n PlayEventResult,\n SendDtmfEventResult,\n StartRecognizingEventResult,\n} from \"./eventprocessor/eventResponses.js\";\nimport type { CallAutomationEventProcessor } from \"./eventprocessor/callAutomationEventProcessor.js\";\nimport { randomUUID } from \"@azure/core-util\";\nimport { createCustomCallAutomationApiClient } from \"./credential/callAutomationAuthPolicy.js\";\nimport { InterruptAudioAndAnnounceRequest } from \"./generated/src/models/index.js\";\n\n/**\n * CallMedia class represents call media related APIs.\n */\nexport class CallMedia {\n private readonly callConnectionId: string;\n private readonly callMedia: CallMediaImpl;\n private readonly callAutomationApiClient: CallAutomationApiClient;\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.callAutomationEventProcessor = eventProcessor;\n this.callMedia = new CallMediaImpl(this.callAutomationApiClient);\n }\n\n private createPlaySourceInternal(\n playSource: FileSource | TextSource | SsmlSource,\n ): PlaySourceInternal {\n if (playSource.kind === \"fileSource\") {\n const fileSource: FileSourceInternal = {\n uri: playSource.url,\n };\n return {\n kind: KnownPlaySourceType.File,\n file: fileSource,\n playSourceCacheId: playSource.playSourceCacheId\n ? playSource.playSourceCacheId\n : playSource.playsourcacheid,\n };\n } else if (playSource.kind === \"textSource\") {\n const textSource: TextSourceInternal = {\n text: playSource.text,\n sourceLocale: playSource.sourceLocale,\n voiceKind: playSource.voiceKind,\n voiceName: playSource.voiceName,\n customVoiceEndpointId: playSource.customVoiceEndpointId,\n };\n return {\n kind: KnownPlaySourceType.Text,\n text: textSource,\n playSourceCacheId: playSource.playSourceCacheId\n ? playSource.playSourceCacheId\n : playSource.playsourcacheid,\n };\n } else if (playSource.kind === \"ssmlSource\") {\n const ssmlSource: SsmlSourceInternal = {\n ssmlText: playSource.ssmlText,\n customVoiceEndpointId: playSource.customVoiceEndpointId,\n };\n return {\n kind: KnownPlaySourceType.Ssml,\n ssml: ssmlSource,\n playSourceCacheId: playSource.playSourceCacheId\n ? playSource.playSourceCacheId\n : playSource.playsourcacheid,\n };\n }\n throw new Error(\"Invalid play source\");\n }\n\n /**\n * Play audio to a specific participant.\n *\n * @param playSources - A PlaySource representing the sources to play. Currently only single play source per request is supported.\n * @param playTo - The targets to play to.\n * @param options - Additional attributes for play.\n */\n public async play(\n playSources: (FileSource | TextSource | SsmlSource)[],\n playTo: CommunicationIdentifier[],\n options: PlayOptions = { loop: false },\n ): Promise<PlayResult> {\n const playRequest: PlayRequest = {\n playSources: playSources.map((source) => this.createPlaySourceInternal(source)),\n playTo: playTo.map((identifier) => serializeCommunicationIdentifier(identifier)),\n playOptions: {\n loop: false,\n interruptHoldAudio: false,\n },\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n };\n\n if (options.loop !== undefined) {\n playRequest.playOptions = playRequest.playOptions || { loop: false }; // Ensure playOptions is defined\n playRequest.playOptions.loop = options.loop;\n }\n if (options.interruptHoldAudio !== undefined) {\n playRequest.playOptions = playRequest.playOptions || {\n loop: false,\n interruptHoldAudio: false,\n }; // Ensure playOptions is defined\n playRequest.playOptions.interruptHoldAudio = options.interruptHoldAudio;\n }\n await this.callMedia.play(this.callConnectionId, playRequest, options);\n\n const playResult: PlayResult = {\n waitForEventProcessor: async (abortSignal, timeoutInMs) => {\n const playEventResult: PlayEventResult = {\n isSuccess: false,\n };\n await this.callAutomationEventProcessor.waitForEventProcessor(\n (event) => {\n if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"PlayCompleted\" &&\n event.operationContext === playRequest.operationContext\n ) {\n playEventResult.isSuccess = true;\n playEventResult.successResult = event;\n return true;\n } else if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"PlayFailed\" &&\n event.operationContext === playRequest.operationContext\n ) {\n playEventResult.isSuccess = false;\n playEventResult.failureResult = event;\n return true;\n } else {\n return false;\n }\n },\n abortSignal,\n timeoutInMs,\n );\n return playEventResult;\n },\n };\n return playResult;\n }\n\n /**\n * Play to all participants.\n *\n * @param playSources - A PlaySource representing the sources to play. Currently only single play source per request is supported.\n * @param options - Additional attributes for play.\n */\n public async playToAll(\n playSources: (FileSource | TextSource | SsmlSource)[],\n options: PlayToAllOptions = { loop: false },\n ): Promise<PlayResult> {\n const playRequest: PlayRequest = {\n playSources: playSources.map((source) => this.createPlaySourceInternal(source)),\n playTo: [],\n playOptions: {\n loop: false,\n },\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n };\n\n if (options.loop !== undefined) {\n playRequest.playOptions = playRequest.playOptions || { loop: false }; // Ensure playOptions is defined\n playRequest.playOptions.loop = options.loop;\n }\n\n if (options.interruptCallMediaOperation !== undefined) {\n playRequest.playOptions = playRequest.playOptions || {\n loop: false,\n interruptCallMediaOperation: false,\n }; // Ensure playOptions is defined\n playRequest.playOptions.interruptCallMediaOperation = options.interruptCallMediaOperation;\n }\n\n await this.callMedia.play(this.callConnectionId, playRequest, options);\n\n const playResult: PlayResult = {\n waitForEventProcessor: async (abortSignal, timeoutInMs) => {\n const playEventResult: PlayEventResult = {\n isSuccess: false,\n };\n await this.callAutomationEventProcessor.waitForEventProcessor(\n (event) => {\n if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"PlayCompleted\" &&\n event.operationContext === playRequest.operationContext\n ) {\n playEventResult.isSuccess = true;\n playEventResult.successResult = event;\n return true;\n } else if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"PlayFailed\" &&\n event.operationContext === playRequest.operationContext\n ) {\n playEventResult.isSuccess = false;\n playEventResult.failureResult = event;\n return true;\n } else {\n return false;\n }\n },\n abortSignal,\n timeoutInMs,\n );\n return playEventResult;\n },\n };\n return playResult;\n }\n\n private createRecognizeRequest(\n targetParticipant: CommunicationIdentifier,\n recognizeOptions:\n | CallMediaRecognizeDtmfOptions\n | CallMediaRecognizeChoiceOptions\n | CallMediaRecognizeSpeechOptions\n | CallMediaRecognizeSpeechOrDtmfOptions,\n ): RecognizeRequest {\n if (recognizeOptions.kind === \"callMediaRecognizeDtmfOptions\") {\n const dtmfOptionsInternal: DtmfOptions = {\n interToneTimeoutInSeconds: recognizeOptions.interToneTimeoutInSeconds\n ? recognizeOptions.interToneTimeoutInSeconds\n : 2,\n maxTonesToCollect: recognizeOptions.maxTonesToCollect,\n stopTones: recognizeOptions.stopDtmfTones,\n };\n const recognizeOptionsInternal: RecognizeOptions = {\n interruptPrompt: recognizeOptions.interruptPrompt,\n initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds\n ? recognizeOptions.initialSilenceTimeoutInSeconds\n : 5,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n dtmfOptions: dtmfOptionsInternal,\n };\n return {\n recognizeInputType: KnownRecognizeInputType.Dtmf,\n playPrompt: recognizeOptions.playPrompt\n ? this.createPlaySourceInternal(recognizeOptions.playPrompt)\n : undefined,\n playPrompts:\n recognizeOptions.playPrompts !== undefined\n ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source))\n : undefined,\n interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,\n recognizeOptions: recognizeOptionsInternal,\n operationContext: recognizeOptions.operationContext,\n operationCallbackUri: recognizeOptions.operationCallbackUrl,\n };\n } else if (recognizeOptions.kind === \"callMediaRecognizeChoiceOptions\") {\n const recognizeOptionsInternal: RecognizeOptions = {\n interruptPrompt: recognizeOptions.interruptPrompt,\n initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds\n ? recognizeOptions.initialSilenceTimeoutInSeconds\n : 5,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n speechLanguage: recognizeOptions.speechLanguage,\n speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId,\n choices: recognizeOptions.choices,\n };\n return {\n recognizeInputType: KnownRecognizeInputType.Choices,\n playPrompt: recognizeOptions.playPrompt\n ? this.createPlaySourceInternal(recognizeOptions.playPrompt)\n : undefined,\n playPrompts:\n recognizeOptions.playPrompts !== undefined\n ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source))\n : undefined,\n interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,\n recognizeOptions: recognizeOptionsInternal,\n operationContext: recognizeOptions.operationContext,\n operationCallbackUri: recognizeOptions.operationCallbackUrl,\n };\n } else if (recognizeOptions.kind === \"callMediaRecognizeSpeechOptions\") {\n const speechOptions: SpeechOptions = {\n endSilenceTimeoutInMs: recognizeOptions.endSilenceTimeoutInSeconds\n ? recognizeOptions.endSilenceTimeoutInSeconds * 1000\n : 2000,\n };\n const recognizeOptionsInternal: RecognizeOptions = {\n interruptPrompt: recognizeOptions.interruptPrompt,\n initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds\n ? recognizeOptions.initialSilenceTimeoutInSeconds\n : 5,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n speechOptions: speechOptions,\n speechLanguage: recognizeOptions.speechLanguage,\n speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId,\n };\n return {\n recognizeInputType: KnownRecognizeInputType.Speech,\n playPrompt: recognizeOptions.playPrompt\n ? this.createPlaySourceInternal(recognizeOptions.playPrompt)\n : undefined,\n playPrompts:\n recognizeOptions.playPrompts !== undefined\n ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source))\n : undefined,\n interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,\n recognizeOptions: recognizeOptionsInternal,\n operationContext: recognizeOptions.operationContext,\n operationCallbackUri: recognizeOptions.operationCallbackUrl,\n };\n } else if (recognizeOptions.kind === \"callMediaRecognizeSpeechOrDtmfOptions\") {\n const dtmfOptionsInternal: DtmfOptions = {\n interToneTimeoutInSeconds: recognizeOptions.interToneTimeoutInSeconds\n ? recognizeOptions.interToneTimeoutInSeconds\n : 2,\n maxTonesToCollect: recognizeOptions.maxTonesToCollect,\n stopTones: recognizeOptions.stopDtmfTones,\n };\n const speechOptions: SpeechOptions = {\n endSilenceTimeoutInMs: recognizeOptions.endSilenceTimeoutInSeconds\n ? recognizeOptions.endSilenceTimeoutInSeconds * 1000\n : 2000,\n };\n const recognizeOptionsInternal: RecognizeOptions = {\n interruptPrompt: recognizeOptions.interruptPrompt,\n initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds\n ? recognizeOptions.initialSilenceTimeoutInSeconds\n : 5,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n speechOptions: speechOptions,\n dtmfOptions: dtmfOptionsInternal,\n speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId,\n };\n return {\n recognizeInputType: KnownRecognizeInputType.SpeechOrDtmf,\n playPrompt: recognizeOptions.playPrompt\n ? this.createPlaySourceInternal(recognizeOptions.playPrompt)\n : undefined,\n playPrompts:\n recognizeOptions.playPrompts !== undefined\n ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source))\n : undefined,\n interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,\n recognizeOptions: recognizeOptionsInternal,\n operationContext: recognizeOptions.operationContext,\n operationCallbackUri: recognizeOptions.operationCallbackUrl,\n };\n }\n throw new Error(\"Invalid recognizeOptions\");\n }\n\n /**\n * Recognize participant input.\n * @deprecated This method signature is deprecated. Please use the new signature with targetParticipant and options params instead, and set maxTonesToCollect in options.\n * @param targetParticipant - Target participant.\n * @param maxTonesToCollect - Maximum number of DTMF tones to be collected.\n * @param options - Different attributes for recognize.\n * */\n public async startRecognizing(\n targetParticipant: CommunicationIdentifier,\n maxTonesToCollect: number,\n options: CallMediaRecognizeDtmfOptions,\n ): Promise<StartRecognizingResult>;\n\n /**\n * Recognize participant input.\n * @param targetParticipant - Target participant.\n * @param options - Different attributes for recognize.\n * */\n public async startRecognizing(\n targetParticipant: CommunicationIdentifier,\n options:\n | CallMediaRecognizeDtmfOptions\n | CallMediaRecognizeChoiceOptions\n | CallMediaRecognizeSpeechOptions\n | CallMediaRecognizeSpeechOrDtmfOptions,\n ): Promise<StartRecognizingResult>;\n async startRecognizing(\n targetParticipant: CommunicationIdentifier,\n maxTonesOrOptions:\n | number\n | CallMediaRecognizeDtmfOptions\n | CallMediaRecognizeChoiceOptions\n | CallMediaRecognizeSpeechOptions\n | CallMediaRecognizeSpeechOrDtmfOptions,\n options?: CallMediaRecognizeDtmfOptions,\n ): Promise<StartRecognizingResult> {\n if (typeof maxTonesOrOptions === \"number\" && options) {\n // Old function signature logic\n console.warn(\n \"Deprecated function signature used. Please use the new signature with targetParticipant and options params instead, and set maxTonesToCollect in options.\",\n );\n options.maxTonesToCollect = maxTonesOrOptions;\n await this.callMedia.recognize(\n this.callConnectionId,\n this.createRecognizeRequest(targetParticipant, options),\n {},\n );\n } else if (typeof maxTonesOrOptions !== \"number\" && !options) {\n maxTonesOrOptions.operationContext = maxTonesOrOptions.operationContext\n ? maxTonesOrOptions.operationContext\n : randomUUID();\n // New function signature logic\n await this.callMedia.recognize(\n this.callConnectionId,\n this.createRecognizeRequest(targetParticipant, maxTonesOrOptions),\n {},\n );\n const startRecognizingResult: StartRecognizingResult = {\n waitForEventProcessor: async (abortSignal, timeoutInMs) => {\n const startRecognizingEventResult: StartRecognizingEventResult = {\n isSuccess: false,\n };\n await this.callAutomationEventProcessor.waitForEventProcessor(\n (event) => {\n if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"RecognizeCompleted\" &&\n event.operationContext === maxTonesOrOptions.operationContext\n ) {\n startRecognizingEventResult.isSuccess = true;\n startRecognizingEventResult.successResult = event;\n return true;\n } else if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"RecognizeFailed\" &&\n event.operationContext === maxTonesOrOptions.operationContext\n ) {\n startRecognizingEventResult.isSuccess = false;\n startRecognizingEventResult.failureResult = event;\n return true;\n } else {\n return false;\n }\n },\n abortSignal,\n timeoutInMs,\n );\n return startRecognizingEventResult;\n },\n };\n return startRecognizingResult;\n }\n throw new Error(\"Invalid params\");\n }\n\n /**\n * Cancels all the queued media operations.\n */\n public async cancelAllOperations(): Promise<CancelAllMediaOperationsResult> {\n await this.callMedia.cancelAllMediaOperations(this.callConnectionId, {});\n\n const cancelAllMediaOperationsResult: CancelAllMediaOperationsResult = {\n waitForEventProcessor: async (abortSignal, timeoutInMs) => {\n const cancelAllMediaOperationsEventResult: CancelAllMediaOperationsEventResult = {\n isSuccess: false,\n };\n await this.callAutomationEventProcessor.waitForEventProcessor(\n (event) => {\n if (event.callConnectionId === this.callConnectionId && event.kind === \"PlayCanceled\") {\n cancelAllMediaOperationsEventResult.isSuccess = true;\n cancelAllMediaOperationsEventResult.playCanceledSuccessResult = event;\n return true;\n } else if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"RecognizeCanceled\"\n ) {\n cancelAllMediaOperationsEventResult.isSuccess = false;\n cancelAllMediaOperationsEventResult.recognizeCanceledSuccessResult = event;\n return true;\n } else {\n return false;\n }\n },\n abortSignal,\n timeoutInMs,\n );\n return cancelAllMediaOperationsEventResult;\n },\n };\n return cancelAllMediaOperationsResult;\n }\n\n /**\n * Start continuous Dtmf recognition by subscribing to tones.\n * @param targetParticipant - Target participant.\n * @param options - Additional attributes for continuous Dtmf recognition.\n * */\n public async startContinuousDtmfRecognition(\n targetParticipant: CommunicationIdentifier,\n options: ContinuousDtmfRecognitionOptions = {},\n ): Promise<void> {\n const continuousDtmfRecognitionRequest: ContinuousDtmfRecognitionRequest = {\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n };\n return this.callMedia.startContinuousDtmfRecognition(\n this.callConnectionId,\n continuousDtmfRecognitionRequest,\n {},\n );\n }\n\n /**\n * Stop continuous Dtmf recognition by unsubscribing to tones.\n * @param targetParticipant - Target participant.\n * @param options - Additional attributes for continuous Dtmf recognition.\n * */\n public async stopContinuousDtmfRecognition(\n targetParticipant: CommunicationIdentifier,\n options: ContinuousDtmfRecognitionOptions = {},\n ): Promise<void> {\n const continuousDtmfRecognitionRequest: ContinuousDtmfRecognitionRequest = {\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n };\n return this.callMedia.stopContinuousDtmfRecognition(\n this.callConnectionId,\n continuousDtmfRecognitionRequest,\n {},\n );\n }\n\n /**\n * Send Dtmf tones.\n * @param tones - List of tones to be sent to target participant.\n * @param targetParticipant - Target participant.\n * @param options - Additional attributes for send Dtmf tones.\n * */\n public async sendDtmfTones(\n tones: Tone[] | DtmfTone[],\n targetParticipant: CommunicationIdentifier,\n options: SendDtmfTonesOptions = {},\n ): Promise<SendDtmfTonesResult> {\n const sendDtmfTonesRequest: SendDtmfTonesRequest = {\n tones: tones,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n };\n await this.callMedia.sendDtmfTones(this.callConnectionId, sendDtmfTonesRequest, {});\n\n const sendDtmfTonesResult: SendDtmfTonesResult = {\n waitForEventProcessor: async (abortSignal, timeoutInMs) => {\n const sendDtmfEventResult: SendDtmfEventResult = {\n isSuccess: false,\n };\n await this.callAutomationEventProcessor.waitForEventProcessor(\n (event) => {\n if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"SendDtmfTonesCompleted\" &&\n event.operationContext === sendDtmfTonesResult.operationContext\n ) {\n sendDtmfEventResult.isSuccess = true;\n sendDtmfEventResult.successResult = event;\n return true;\n } else if (\n event.callConnectionId === this.callConnectionId &&\n event.kind === \"SendDtmfTonesFailed\" &&\n event.operationContext === sendDtmfTonesResult.operationContext\n ) {\n sendDtmfEventResult.isSuccess = false;\n sendDtmfEventResult.failureResult = event;\n return true;\n } else {\n return false;\n }\n },\n abortSignal,\n timeoutInMs,\n );\n return sendDtmfEventResult;\n },\n };\n return sendDtmfTonesResult;\n }\n\n /**\n * Put participant on hold while playing audio.\n *\n * @param targetParticipant - The targets to play to.\n * @param options - Additional attributes for hold participant.\n */\n public async hold(\n targetParticipant: CommunicationIdentifier,\n options: HoldOptions = {},\n ): Promise<void> {\n const holdRequest: HoldRequest = {\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n playSourceInfo:\n options.playSource !== undefined\n ? this.createPlaySourceInternal(options.playSource)\n : undefined,\n operationContext:\n options.operationContext !== undefined ? options.operationContext : undefined,\n operationCallbackUri:\n options.operationCallbackUri !== undefined ? options.operationCallbackUri : undefined,\n };\n return this.callMedia.hold(this.callConnectionId, holdRequest);\n }\n\n /**\n * Remove participant from hold.\n *\n * @param targetParticipant - The targets to play to.\n * @param options - Additional attributes for unhold participant.\n */\n public async unhold(\n targetParticipant: CommunicationIdentifier,\n options: UnholdOptions = {},\n ): Promise<void> {\n const unholdRequest: UnholdRequest = {\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n operationContext:\n options.operationContext !== undefined ? options.operationContext : undefined,\n };\n return this.callMedia.unhold(this.callConnectionId, unholdRequest);\n }\n\n /**\n * Starts transcription in the call\n * @param options - Additional attributes for start transcription.\n */\n public async startTranscription(options: StartTranscriptionOptions = {}): Promise<void> {\n const startTranscriptionRequest: StartTranscriptionRequest = {\n locale: options.locale,\n operationContext: options.operationContext,\n speechRecognitionModelEndpointId: options.speechRecognitionModelEndpointId,\n operationCallbackUri: options.operationCallbackUrl,\n };\n return this.callMedia.startTranscription(this.callConnectionId, startTranscriptionRequest, {});\n }\n\n /**\n * Stops transcription in the call.\n * @param options - Additional attributes for stop transcription.\n */\n public async stopTranscription(options: StopTranscriptionOptions = {}): Promise<void> {\n const stopTranscriptionRequest: StopTranscriptionRequest = {\n operationContext: options.operationContext,\n operationCallbackUri: options.operationCallbackUrl,\n };\n return this.callMedia.stopTranscription(this.callConnectionId, stopTranscriptionRequest, {});\n }\n\n /**\n * Update transcription language.\n * @param locale - Defines new locale for transcription.\n */\n public async updateTranscription(\n locale: string,\n options?: UpdateTranscriptionOptions,\n ): Promise<void> {\n const updateTranscriptionRequest: UpdateTranscriptionRequest = {\n locale: locale,\n speechRecognitionModelEndpointId: options?.speechRecognitionModelEndpointId,\n operationContext: options?.operationContext,\n operationCallbackUri: options?.operationCallbackUrl,\n };\n return this.callMedia.updateTranscription(\n this.callConnectionId,\n updateTranscriptionRequest,\n {},\n );\n }\n /**\n * Starts media streaming in the call.\n * @param options - Additional attributes for start media streaming.\n */\n public async startMediaStreaming(options: StartMediaStreamingOptions = {}): Promise<void> {\n const startMediaStreamingRequest: StartMediaStreamingRequest = {\n operationContext: options.operationContext,\n operationCallbackUri: options.operationCallbackUrl,\n };\n return this.callMedia.startMediaStreaming(\n this.callConnectionId,\n startMediaStreamingRequest,\n options,\n );\n }\n\n /**\n * Stops media streaming in the call.\n * @param options - Additional attributes for stop media streaming.\n */\n public async stopMediaStreaming(options: StopMediaStreamingOptions = {}): Promise<void> {\n const stopMediaStreamingRequest: StopMediaStreamingRequest = {\n operationCallbackUri: options.operationCallbackUrl,\n operationContext: options.operationContext,\n };\n return this.callMedia.stopMediaStreaming(\n this.callConnectionId,\n stopMediaStreamingRequest,\n options,\n );\n }\n\n /**\n * Interrupt audio and announce to specific participant.\n *\n * @param playSources - A PlaySource representing the sources to play.\n * @param playTo - The targets to play to.\n * @param options - Additional attributes for interrupt audio and announce.\n */\n public async interruptAudioAndAnnounce(\n playSources: (FileSource | TextSource | SsmlSource)[],\n playTo: CommunicationIdentifier,\n options: InterruptAudioAndAnnounceOptions = {},\n ): Promise<void> {\n const interruptAudioAndAnnounceRequest: InterruptAudioAndAnnounceRequest = {\n playSources: playSources.map((source) => this.createPlaySourceInternal(source)),\n playTo: serializeCommunicationIdentifier(playTo),\n operationContext: options.operationContext,\n };\n return this.callMedia.interruptAudioAndAnnounce(\n this.callConnectionId,\n interruptAudioAndAnnounceRequest,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"callMedia.js","sourceRoot":"","sources":["../../src/callMedia.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,uDAsBkC;AAClC,uDAAwF;AAExF,kEAAoE;AAEpE,sEAGqC;AACrC,sEAA+E;AAsB/E,gDAA8C;AAE9C;;GAEG;AACH,MAAa,SAAS;IAIpB,YACE,gBAAwB,EACxB,QAAgB,EAChB,UAA2C,EAC3C,OAA+C;QAE/C,IAAI,CAAC,uBAAuB,GAAG,IAAI,kCAAuB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9E,MAAM,UAAU,GAAG,IAAA,oDAA6B,EAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QAC5D,IAAI,CAA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OAAO,CAAC,gBAAgB;YAC1C,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;SACnD,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,mBAAmB,CACvC,IAAI,CAAC,gBAAgB,EACrB,0BAA0B,EAC1B,OAAO,CACR,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,kBAAkB,CAAC,UAAqC,EAAE;QACrE,MAAM,yBAAyB,GAA8B;YAC3D,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;YAClD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;SAC3C,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CACtC,IAAI,CAAC,gBAAgB,EACrB,yBAAyB,EACzB,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AA/fD,8BA+fC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n PlayRequest,\n PlaySourceInternal,\n FileSourceInternal,\n TextSourceInternal,\n SsmlSourceInternal,\n RecognizeRequest,\n RecognizeOptions,\n DtmfOptions,\n CallAutomationApiClient,\n CallAutomationApiClientOptionalParams,\n ContinuousDtmfRecognitionRequest,\n SendDtmfTonesRequest,\n Tone,\n SpeechOptions,\n StartTranscriptionRequest,\n StopTranscriptionRequest,\n UpdateTranscriptionRequest,\n HoldRequest,\n UnholdRequest,\n StartMediaStreamingRequest,\n StopMediaStreamingRequest,\n} from \"./generated/src/index.js\";\nimport { KnownPlaySourceType, KnownRecognizeInputType } from \"./generated/src/index.js\";\n\nimport { CallMediaImpl } from \"./generated/src/operations/index.js\";\n\nimport {\n CommunicationIdentifier,\n createCommunicationAuthPolicy,\n} from \"@azure/communication-common\";\nimport { serializeCommunicationIdentifier } from \"@azure/communication-common\";\n\nimport type { FileSource, TextSource, SsmlSource, DtmfTone } from \"./models/models.js\";\nimport type {\n PlayOptions,\n CallMediaRecognizeDtmfOptions,\n CallMediaRecognizeChoiceOptions,\n ContinuousDtmfRecognitionOptions,\n SendDtmfTonesOptions,\n CallMediaRecognizeSpeechOptions,\n CallMediaRecognizeSpeechOrDtmfOptions,\n StartTranscriptionOptions,\n StopTranscriptionOptions,\n HoldOptions,\n UnholdOptions,\n StartMediaStreamingOptions,\n StopMediaStreamingOptions,\n PlayToAllOptions,\n UpdateTranscriptionOptions,\n} from \"./models/options.js\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport type { SendDtmfTonesResult } from \"./models/responses.js\";\nimport { randomUUID } from \"@azure/core-util\";\n\n/**\n * CallMedia class represents call media related APIs.\n */\nexport class CallMedia {\n private readonly callConnectionId: string;\n private readonly callMedia: CallMediaImpl;\n private readonly callAutomationApiClient: CallAutomationApiClient;\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.callMedia = new CallMediaImpl(this.callAutomationApiClient);\n }\n\n private createPlaySourceInternal(\n playSource: FileSource | TextSource | SsmlSource,\n ): PlaySourceInternal {\n if (playSource.kind === \"fileSource\") {\n const fileSource: FileSourceInternal = {\n uri: playSource.url,\n };\n return {\n kind: KnownPlaySourceType.File,\n file: fileSource,\n };\n } else if (playSource.kind === \"textSource\") {\n const textSource: TextSourceInternal = {\n text: playSource.text,\n sourceLocale: playSource.sourceLocale,\n voiceKind: playSource.voiceKind,\n voiceName: playSource.voiceName,\n customVoiceEndpointId: playSource.customVoiceEndpointId,\n };\n return {\n kind: KnownPlaySourceType.Text,\n text: textSource,\n };\n } else if (playSource.kind === \"ssmlSource\") {\n const ssmlSource: SsmlSourceInternal = {\n ssmlText: playSource.ssmlText,\n customVoiceEndpointId: playSource.customVoiceEndpointId,\n };\n return {\n kind: KnownPlaySourceType.Ssml,\n ssml: ssmlSource,\n };\n }\n throw new Error(\"Invalid play source\");\n }\n\n /**\n * Play audio to a specific participant.\n *\n * @param playSources - A PlaySource representing the sources to play. Currently only single play source per request is supported.\n * @param playTo - The targets to play to.\n * @param options - Additional attributes for play.\n */\n public async play(\n playSources: (FileSource | TextSource | SsmlSource)[],\n playTo: CommunicationIdentifier[],\n options: PlayOptions = { loop: false },\n ): Promise<void> {\n const playRequest: PlayRequest = {\n playSources: playSources.map((source) => this.createPlaySourceInternal(source)),\n playTo: playTo.map((identifier) => serializeCommunicationIdentifier(identifier)),\n playOptions: {\n loop: false,\n },\n operationContext: options.operationContext,\n operationCallbackUri: options.operationCallbackUrl,\n };\n\n if (options.loop !== undefined) {\n playRequest.playOptions = playRequest.playOptions || { loop: false }; // Ensure playOptions is defined\n playRequest.playOptions.loop = options.loop;\n }\n return this.callMedia.play(this.callConnectionId, playRequest, options);\n }\n\n /**\n * Play to all participants.\n *\n * @param playSources - A PlaySource representing the sources to play. Currently only single play source per request is supported.\n * @param options - Additional attributes for play.\n */\n public async playToAll(\n playSources: (FileSource | TextSource | SsmlSource)[],\n options: PlayToAllOptions = { loop: false },\n ): Promise<void> {\n const playRequest: PlayRequest = {\n playSources: playSources.map((source) => this.createPlaySourceInternal(source)),\n playTo: [],\n playOptions: {\n loop: false,\n },\n operationContext: options.operationContext ? options.operationContext : randomUUID(),\n operationCallbackUri: options.operationCallbackUrl,\n };\n\n if (options.loop !== undefined) {\n playRequest.playOptions = playRequest.playOptions || { loop: false }; // Ensure playOptions is defined\n playRequest.playOptions.loop = options.loop;\n }\n\n if (options.interruptCallMediaOperation !== undefined) {\n playRequest.playOptions = playRequest.playOptions || {\n loop: false,\n };\n playRequest.interruptCallMediaOperation = options.interruptCallMediaOperation;\n }\n\n return this.callMedia.play(this.callConnectionId, playRequest, options);\n }\n\n private createRecognizeRequest(\n targetParticipant: CommunicationIdentifier,\n recognizeOptions:\n | CallMediaRecognizeDtmfOptions\n | CallMediaRecognizeChoiceOptions\n | CallMediaRecognizeSpeechOptions\n | CallMediaRecognizeSpeechOrDtmfOptions,\n ): RecognizeRequest {\n if (recognizeOptions.kind === \"callMediaRecognizeDtmfOptions\") {\n const dtmfOptionsInternal: DtmfOptions = {\n interToneTimeoutInSeconds: recognizeOptions.interToneTimeoutInSeconds\n ? recognizeOptions.interToneTimeoutInSeconds\n : 2,\n maxTonesToCollect: recognizeOptions.maxTonesToCollect,\n stopTones: recognizeOptions.stopDtmfTones,\n };\n const recognizeOptionsInternal: RecognizeOptions = {\n interruptPrompt: recognizeOptions.interruptPrompt,\n initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds\n ? recognizeOptions.initialSilenceTimeoutInSeconds\n : 5,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n dtmfOptions: dtmfOptionsInternal,\n };\n return {\n recognizeInputType: KnownRecognizeInputType.Dtmf,\n playPrompt: recognizeOptions.playPrompt\n ? this.createPlaySourceInternal(recognizeOptions.playPrompt)\n : undefined,\n playPrompts:\n recognizeOptions.playPrompts !== undefined\n ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source))\n : undefined,\n interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,\n recognizeOptions: recognizeOptionsInternal,\n operationContext: recognizeOptions.operationContext,\n operationCallbackUri: recognizeOptions.operationCallbackUrl,\n };\n } else if (recognizeOptions.kind === \"callMediaRecognizeChoiceOptions\") {\n const recognizeOptionsInternal: RecognizeOptions = {\n interruptPrompt: recognizeOptions.interruptPrompt,\n initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds\n ? recognizeOptions.initialSilenceTimeoutInSeconds\n : 5,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n speechLanguage: recognizeOptions.speechLanguage,\n speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId,\n choices: recognizeOptions.choices,\n };\n return {\n recognizeInputType: KnownRecognizeInputType.Choices,\n playPrompt: recognizeOptions.playPrompt\n ? this.createPlaySourceInternal(recognizeOptions.playPrompt)\n : undefined,\n playPrompts:\n recognizeOptions.playPrompts !== undefined\n ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source))\n : undefined,\n interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,\n recognizeOptions: recognizeOptionsInternal,\n operationContext: recognizeOptions.operationContext,\n operationCallbackUri: recognizeOptions.operationCallbackUrl,\n };\n } else if (recognizeOptions.kind === \"callMediaRecognizeSpeechOptions\") {\n const speechOptions: SpeechOptions = {\n endSilenceTimeoutInMs: recognizeOptions.endSilenceTimeoutInSeconds\n ? recognizeOptions.endSilenceTimeoutInSeconds * 1000\n : 2000,\n };\n const recognizeOptionsInternal: RecognizeOptions = {\n interruptPrompt: recognizeOptions.interruptPrompt,\n initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds\n ? recognizeOptions.initialSilenceTimeoutInSeconds\n : 5,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n speechOptions: speechOptions,\n speechLanguage: recognizeOptions.speechLanguage,\n speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId,\n };\n return {\n recognizeInputType: KnownRecognizeInputType.Speech,\n playPrompt: recognizeOptions.playPrompt\n ? this.createPlaySourceInternal(recognizeOptions.playPrompt)\n : undefined,\n playPrompts:\n recognizeOptions.playPrompts !== undefined\n ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source))\n : undefined,\n interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,\n recognizeOptions: recognizeOptionsInternal,\n operationContext: recognizeOptions.operationContext,\n operationCallbackUri: recognizeOptions.operationCallbackUrl,\n };\n } else if (recognizeOptions.kind === \"callMediaRecognizeSpeechOrDtmfOptions\") {\n const dtmfOptionsInternal: DtmfOptions = {\n interToneTimeoutInSeconds: recognizeOptions.interToneTimeoutInSeconds\n ? recognizeOptions.interToneTimeoutInSeconds\n : 2,\n maxTonesToCollect: recognizeOptions.maxTonesToCollect,\n stopTones: recognizeOptions.stopDtmfTones,\n };\n const speechOptions: SpeechOptions = {\n endSilenceTimeoutInMs: recognizeOptions.endSilenceTimeoutInSeconds\n ? recognizeOptions.endSilenceTimeoutInSeconds * 1000\n : 2000,\n };\n const recognizeOptionsInternal: RecognizeOptions = {\n interruptPrompt: recognizeOptions.interruptPrompt,\n initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds\n ? recognizeOptions.initialSilenceTimeoutInSeconds\n : 5,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n speechOptions: speechOptions,\n dtmfOptions: dtmfOptionsInternal,\n speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId,\n };\n return {\n recognizeInputType: KnownRecognizeInputType.SpeechOrDtmf,\n playPrompt: recognizeOptions.playPrompt\n ? this.createPlaySourceInternal(recognizeOptions.playPrompt)\n : undefined,\n playPrompts:\n recognizeOptions.playPrompts !== undefined\n ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source))\n : undefined,\n interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,\n recognizeOptions: recognizeOptionsInternal,\n operationContext: recognizeOptions.operationContext,\n operationCallbackUri: recognizeOptions.operationCallbackUrl,\n };\n }\n throw new Error(\"Invalid recognizeOptions\");\n }\n\n /**\n * Recognize participant input.\n * @deprecated This method signature is deprecated. Please use the new signature with targetParticipant and options params instead, and set maxTonesToCollect in options.\n * @param targetParticipant - Target participant.\n * @param maxTonesToCollect - Maximum number of DTMF tones to be collected.\n * @param options - Different attributes for recognize.\n * */\n public async startRecognizing(\n targetParticipant: CommunicationIdentifier,\n maxTonesToCollect: number,\n options: CallMediaRecognizeDtmfOptions,\n ): Promise<void>;\n\n /**\n * Recognize participant input.\n * @param targetParticipant - Target participant.\n * @param options - Different attributes for recognize.\n * */\n public async startRecognizing(\n targetParticipant: CommunicationIdentifier,\n options:\n | CallMediaRecognizeDtmfOptions\n | CallMediaRecognizeChoiceOptions\n | CallMediaRecognizeSpeechOptions\n | CallMediaRecognizeSpeechOrDtmfOptions,\n ): Promise<void>;\n async startRecognizing(\n targetParticipant: CommunicationIdentifier,\n maxTonesOrOptions:\n | number\n | CallMediaRecognizeDtmfOptions\n | CallMediaRecognizeChoiceOptions\n | CallMediaRecognizeSpeechOptions\n | CallMediaRecognizeSpeechOrDtmfOptions,\n options?: CallMediaRecognizeDtmfOptions,\n ): Promise<void> {\n if (typeof maxTonesOrOptions === \"number\" && options) {\n // Old function signature logic\n console.warn(\n \"Deprecated function signature used. Please use the new signature with targetParticipant and options params instead, and set maxTonesToCollect in options.\",\n );\n options.maxTonesToCollect = maxTonesOrOptions;\n await this.callMedia.recognize(\n this.callConnectionId,\n this.createRecognizeRequest(targetParticipant, options),\n {},\n );\n } else if (typeof maxTonesOrOptions !== \"number\" && !options) {\n maxTonesOrOptions.operationContext = maxTonesOrOptions.operationContext\n ? maxTonesOrOptions.operationContext\n : randomUUID();\n // New function signature logic\n return this.callMedia.recognize(\n this.callConnectionId,\n this.createRecognizeRequest(targetParticipant, maxTonesOrOptions),\n {},\n );\n }\n throw new Error(\"Invalid params\");\n }\n\n /**\n * Cancels all the queued media operations.\n */\n public async cancelAllOperations(): Promise<void> {\n return this.callMedia.cancelAllMediaOperations(this.callConnectionId, {});\n }\n\n /**\n * Start continuous Dtmf recognition by subscribing to tones.\n * @param targetParticipant - Target participant.\n * @param options - Additional attributes for continuous Dtmf recognition.\n * */\n public async startContinuousDtmfRecognition(\n targetParticipant: CommunicationIdentifier,\n options: ContinuousDtmfRecognitionOptions = {},\n ): Promise<void> {\n const continuousDtmfRecognitionRequest: ContinuousDtmfRecognitionRequest = {\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n operationContext: options.operationContext,\n };\n return this.callMedia.startContinuousDtmfRecognition(\n this.callConnectionId,\n continuousDtmfRecognitionRequest,\n {},\n );\n }\n\n /**\n * Stop continuous Dtmf recognition by unsubscribing to tones.\n * @param targetParticipant - Target participant.\n * @param options - Additional attributes for continuous Dtmf recognition.\n * */\n public async stopContinuousDtmfRecognition(\n targetParticipant: CommunicationIdentifier,\n options: ContinuousDtmfRecognitionOptions = {},\n ): Promise<void> {\n const continuousDtmfRecognitionRequest: ContinuousDtmfRecognitionRequest = {\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n operationContext: options.operationContext,\n operationCallbackUri: options.operationCallbackUrl,\n };\n return this.callMedia.stopContinuousDtmfRecognition(\n this.callConnectionId,\n continuousDtmfRecognitionRequest,\n {},\n );\n }\n\n /**\n * Send Dtmf tones.\n * @param tones - List of tones to be sent to target participant.\n * @param targetParticipant - Target participant.\n * @param options - Additional attributes for send Dtmf tones.\n * */\n public async sendDtmfTones(\n tones: Tone[] | DtmfTone[],\n targetParticipant: CommunicationIdentifier,\n options: SendDtmfTonesOptions = {},\n ): Promise<SendDtmfTonesResult> {\n const sendDtmfTonesRequest: SendDtmfTonesRequest = {\n tones: tones,\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n operationContext: options.operationContext,\n operationCallbackUri: options.operationCallbackUrl,\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const result = await this.callMedia.sendDtmfTones(\n this.callConnectionId,\n sendDtmfTonesRequest,\n optionsInternal,\n );\n\n const sendDtmfTonesResult: SendDtmfTonesResult = {\n ...result,\n };\n\n return sendDtmfTonesResult;\n }\n\n /**\n * Put participant on hold while playing audio.\n *\n * @param targetParticipant - The targets to play to.\n * @param options - Additional attributes for hold participant.\n */\n public async hold(\n targetParticipant: CommunicationIdentifier,\n options: HoldOptions = {},\n ): Promise<void> {\n const holdRequest: HoldRequest = {\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n playSourceInfo:\n options.playSource !== undefined\n ? this.createPlaySourceInternal(options.playSource)\n : undefined,\n operationContext:\n options.operationContext !== undefined ? options.operationContext : undefined,\n operationCallbackUri:\n options.operationCallbackUrl !== undefined ? options.operationCallbackUrl : undefined,\n };\n return this.callMedia.hold(this.callConnectionId, holdRequest);\n }\n\n /**\n * Remove participant from hold.\n *\n * @param targetParticipant - The targets to play to.\n * @param options - Additional attributes for unhold participant.\n */\n public async unhold(\n targetParticipant: CommunicationIdentifier,\n options: UnholdOptions = {},\n ): Promise<void> {\n const unholdRequest: UnholdRequest = {\n targetParticipant: serializeCommunicationIdentifier(targetParticipant),\n operationContext:\n options.operationContext !== undefined ? options.operationContext : undefined,\n };\n return this.callMedia.unhold(this.callConnectionId, unholdRequest);\n }\n\n /**\n * Starts transcription in the call\n * @param options - Additional attributes for start transcription.\n */\n public async startTranscription(options: StartTranscriptionOptions = {}): Promise<void> {\n const startTranscriptionRequest: StartTranscriptionRequest = {\n locale: options.locale,\n operationContext: options.operationContext,\n speechRecognitionModelEndpointId: options.speechRecognitionModelEndpointId,\n };\n return this.callMedia.startTranscription(this.callConnectionId, startTranscriptionRequest, {});\n }\n\n /**\n * Stops transcription in the call.\n * @param options - Additional attributes for stop transcription.\n */\n public async stopTranscription(options: StopTranscriptionOptions = {}): Promise<void> {\n const stopTranscriptionRequest: StopTranscriptionRequest = {\n operationContext: options.operationContext,\n };\n return this.callMedia.stopTranscription(this.callConnectionId, stopTranscriptionRequest, {});\n }\n\n /**\n * Update transcription language.\n * @param locale - Defines new locale for transcription.\n */\n public async updateTranscription(\n locale: string,\n options?: UpdateTranscriptionOptions,\n ): Promise<void> {\n const updateTranscriptionRequest: UpdateTranscriptionRequest = {\n locale: locale,\n speechRecognitionModelEndpointId: options?.speechRecognitionModelEndpointId,\n operationContext: options?.operationContext,\n };\n return this.callMedia.updateTranscription(\n this.callConnectionId,\n updateTranscriptionRequest,\n {},\n );\n }\n /**\n * Starts media streaming in the call.\n * @param options - Additional attributes for start media streaming.\n */\n public async startMediaStreaming(options: StartMediaStreamingOptions = {}): Promise<void> {\n const startMediaStreamingRequest: StartMediaStreamingRequest = {\n operationContext: options.operationContext,\n operationCallbackUri: options.operationCallbackUrl,\n };\n return this.callMedia.startMediaStreaming(\n this.callConnectionId,\n startMediaStreamingRequest,\n options,\n );\n }\n\n /**\n * Stops media streaming in the call.\n * @param options - Additional attributes for stop media streaming.\n */\n public async stopMediaStreaming(options: StopMediaStreamingOptions = {}): Promise<void> {\n const stopMediaStreamingRequest: StopMediaStreamingRequest = {\n operationCallbackUri: options.operationCallbackUrl,\n operationContext: options.operationContext,\n };\n return this.callMedia.stopMediaStreaming(\n this.callConnectionId,\n stopMediaStreamingRequest,\n options,\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"callRecording.d.ts","sourceRoot":"","sources":["../../src/callRecording.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qCAAqC,EAEtC,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,EAC7B,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIvE;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAoB;IACtD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAwB;IAC1D,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAA0B;gBAGhE,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,aAAa,GAAG,eAAe,EAC3C,OAAO,CAAC,EAAE,qCAAqC;IAYjD;;;;OAIG;IACU,KAAK,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAuEjF;;;;OAIG;IACU,QAAQ,CACnB,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,6BAAkC,GAC1C,OAAO,CAAC,oBAAoB,CAAC;IAYhC;;;;OAIG;I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c,CACzB,iBAAiB,EAAE,MAAM,EACzB,eAAe,EAAE,MAAM,EACvB,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,IAAI,CAAC;CAejB"}
@@ -9,13 +9,16 @@ const converters_js_1 = require("./utli/converters.js");
9
9
  const contentDownloader_js_1 = require("./contentDownloader.js");
10
10
  const fs = tslib_1.__importStar(require("node:fs"));
11
11
  const core_util_1 = require("@azure/core-util");
12
- const callAutomationAuthPolicy_js_1 = require("./credential/callAutomationAuthPolicy.js");
12
+ const index_js_2 = require("./generated/src/index.js");
13
+ const communication_common_1 = require("@azure/communication-common");
13
14
  /**
14
15
  * CallRecording class represents call recording related APIs.
15
16
  */
16
17
  class CallRecording {
17
18
  constructor(endpoint, credential, options) {
18
- this.callAutomationApiClient = (0, callAutomationAuthPolicy_js_1.createCustomCallAutomationApiClient)(credential, options, endpoint);
19
+ this.callAutomationApiClient = new index_js_2.CallAutomationApiClient(endpoint, options);
20
+ const authPolicy = (0, communication_common_1.createCommunicationAuthPolicy)(credential);
21
+ this.callAutomationApiClient.pipeline.addPolicy(authPolicy);
19
22
  this.callRecordingImpl = new index_js_1.CallRecordingImpl(this.callAutomationApiClient);
20
23
  this.contentDownloader = new contentDownloader_js_1.ContentDownloaderImpl(this.callAutomationApiClient);
21
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"callRecording.js","sourceRoot":"","sources":["../../src/callRecording.ts"],"names":[],"mappings":";;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,kEAAwE;AAexE,wDAA6E;AAC7E,iEAA+D;AAC/D,oDAA8B;AAC9B,gDAA8C;AAG9C,0FAA+F;AAE/F;;GAEG;AACH,MAAa,aAAa;IAKxB,YACE,QAAgB,EAChB,UAA2C,EAC3C,OAA+C;QAE/C,IAAI,CAAC,uBAAuB,GAAG,IAAA,iEAAmC,EAChE,UAAU,EACV,OAAO,EACP,QAAQ,CACT,CAAC;QAEF,IAAI,CAAC,iBAAiB,GAAG,IAAI,4BAAiB,CAA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e,CAAC,CAAC;YAC9D,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YACtC,MAAM,MAAM,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACnD,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;gBACtC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;YACH,MAAM,MAAM,CAAC;QACf,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF;AA/ND,sCA+NC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { CallRecordingImpl } from \"./generated/src/operations/index.js\";\nimport type {\n CallAutomationApiClientOptionalParams,\n StartCallRecordingRequest,\n} from \"./generated/src/models/index.js\";\nimport type { RecordingStateResult } from \"./models/responses.js\";\nimport type {\n StartRecordingOptions,\n StopRecordingOptions,\n PauseRecordingOptions,\n GetRecordingPropertiesOptions,\n ResumeRecordingOptions,\n DeleteRecordingOptions,\n DownloadRecordingOptions,\n} from \"./models/options.js\";\nimport { communicationIdentifierModelConverter } from \"./utli/converters.js\";\nimport { ContentDownloaderImpl } from \"./contentDownloader.js\";\nimport * as fs from \"node:fs\";\nimport { randomUUID } from \"@azure/core-util\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport type { CallAutomationApiClient } from \"./generated/src/index.js\";\nimport { createCustomCallAutomationApiClient } from \"./credential/callAutomationAuthPolicy.js\";\n\n/**\n * CallRecording class represents call recording related APIs.\n */\nexport class CallRecording {\n private readonly callRecordingImpl: CallRecordingImpl;\n private readonly contentDownloader: ContentDownloaderImpl;\n private readonly callAutomationApiClient: CallAutomationApiClient;\n\n constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: CallAutomationApiClientOptionalParams,\n ) {\n this.callAutomationApiClient = createCustomCallAutomationApiClient(\n credential,\n options,\n endpoint,\n );\n\n this.callRecordingImpl = new CallRecordingImpl(this.callAutomationApiClient);\n this.contentDownloader = new ContentDownloaderImpl(this.callAutomationApiClient);\n }\n\n /**\n * Starts a call recording with the specified options.\n * @param startCallRecordingRequest - options to start the call recording\n * @param options - Operation options.\n */\n public async start(options: StartRecordingOptions): Promise<RecordingStateResult> {\n const startCallRecordingRequest: StartCallRecordingRequest = {\n callLocator: options.callLocator ? options.callLocator : undefined,\n };\n\n startCallRecordingRequest.recordingChannelType = options.recordingChannel;\n startCallRecordingRequest.recordingContentType = options.recordingContent;\n startCallRecordingRequest.recordingFormatType = options.recordingFormat;\n startCallRecordingRequest.recordingStateCallbackUri = options.recordingStateCallbackEndpointUrl;\n startCallRecordingRequest.pauseOnStart = options.pauseOnStart;\n startCallRecordingRequest.recordingStorage = options.recordingStorage;\n startCallRecordingRequest.callConnectionId = options.callConnectionId\n ? options.callConnectionId\n : undefined;\n\n if (options.channelAffinity) {\n startCallRecordingRequest.channelAffinity = [];\n options.channelAffinity.forEach((identifier) => {\n startCallRecordingRequest.channelAffinity?.push({\n participant: communicationIdentifierModelConverter(identifier.targetParticipant),\n channel: identifier.channel,\n });\n });\n }\n\n if (options.audioChannelParticipantOrdering) {\n startCallRecordingRequest.audioChannelParticipantOrdering = [];\n options.audioChannelParticipantOrdering.forEach((identifier) => {\n startCallRecordingRequest.audioChannelParticipantOrdering?.push(\n communicationIdentifierModelConverter(identifier),\n );\n });\n }\n if (options.callLocator) {\n if (options.callLocator.kind === \"groupCallLocator\") {\n startCallRecordingRequest.callLocator = {\n groupCallId: options.callLocator.id,\n kind: \"groupCallLocator\",\n };\n } else if (options.callLocator.kind === \"roomCallLocator\") {\n startCallRecordingRequest.callLocator = {\n roomId: options.callLocator.id,\n kind: \"roomCallLocator\",\n };\n } else {\n startCallRecordingRequest.callLocator = {\n serverCallId: options.callLocator.id,\n kind: \"serverCallLocator\",\n };\n }\n }\n\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const response = await this.callRecordingImpl.startRecording(\n startCallRecordingRequest,\n optionsInternal,\n );\n\n const result: RecordingStateResult = {\n recordingId: response.recordingId!,\n recordingKind: response.recordingKind!,\n recordingState: response.recordingState!,\n };\n\n return result;\n }\n\n /**\n * Returns call recording properties.\n * @param recordingId - The recordingId associated with the recording.\n * @param options - Additional request options contains getRecordingProperties api options.\n */\n public async getState(\n recordingId: string,\n options: GetRecordingPropertiesOptions = {},\n ): Promise<RecordingStateResult> {\n const response = await this.callRecordingImpl.getRecordingProperties(recordingId, options);\n\n const result: RecordingStateResult = {\n recordingId: response.recordingId!,\n recordingKind: response.recordingKind!,\n recordingState: response.recordingState!,\n };\n\n return result;\n }\n\n /**\n * Stops a call recording.\n * @param recordingId - The recordingId associated with the recording.\n * @param options - Additional request options contains stopRecording api options.\n */\n public async stop(recordingId: string, options: StopRecordingOptions = {}): Promise<void> {\n return this.callRecordingImpl.stopRecording(recordingId, options);\n }\n\n /**\n * Pauses a call recording.\n * @param recordingId - The recordingId associated with the recording.\n * @param options - Additional request options contains pauseRecording api options.\n */\n public async pause(recordingId: string, options: PauseRecordingOptions = {}): Promise<void> {\n return this.callRecordingImpl.pauseRecording(recordingId, options);\n }\n\n /**\n * Resumes a call recording.\n * @param recordingId - The recordingId associated with the recording.\n * @param options - Additional request options contains resumeRecording api options.\n */\n public async resume(recordingId: string, options: ResumeRecordingOptions = {}): Promise<void> {\n return this.callRecordingImpl.resumeRecording(recordingId, options);\n }\n\n /**\n * Deletes a recording.\n * @param recordingLocationUrl - The recording location url. Required.\n * @param options - Additional request options contains deleteRecording api options.\n */\n public async delete(\n recordingLocationUrl: string,\n options: DeleteRecordingOptions = {},\n ): Promise<void> {\n await this.contentDownloader.deleteRecording(recordingLocationUrl, options);\n }\n\n /**\n * Returns a stream with a call recording.\n * @param sourceLocationUrl - The source location url. Required.\n * @param options - Additional request options contains downloadRecording api options.\n */\n public async downloadStreaming(\n sourceLocationUrl: string,\n options: DownloadRecordingOptions = {},\n ): Promise<NodeJS.ReadableStream> {\n const result = this.contentDownloader.download(sourceLocationUrl, options);\n const recordingStream = (await result).readableStreamBody;\n if (recordingStream) {\n return recordingStream;\n } else {\n throw Error(\"failed to get stream\");\n }\n }\n\n /**\n * Downloads a call recording file to the specified stream.\n * @param sourceLocationUrl - The source location url. Required.\n * @param destinationStream - The destination stream. Required.\n * @param options - Additional request options contains downloadRecording api options.\n */\n public async downloadToStream(\n sourceLocationUrl: string,\n destinationStream: NodeJS.WritableStream,\n options: DownloadRecordingOptions = {},\n ): Promise<void> {\n const result = this.contentDownloader.download(sourceLocationUrl, options);\n const recordingStream = (await result).readableStreamBody;\n if (recordingStream) {\n recordingStream.pipe(destinationStream);\n const finish = new Promise<void>((resolve, reject) => {\n destinationStream.on(\"finish\", resolve);\n destinationStream.on(\"error\", reject);\n });\n await finish;\n } else {\n throw Error(\"failed to get stream\");\n }\n }\n\n /**\n * Downloads a call recording file to the specified path.\n * @param sourceLocationUrl - The source location url. Required.\n * @param destinationPath - The destination path. Required.\n * @param options - Additional request options contains downloadRecording api options.\n */\n public async downloadToPath(\n sourceLocationUrl: string,\n destinationPath: string,\n options: DownloadRecordingOptions = {},\n ): Promise<void> {\n const result = this.contentDownloader.download(sourceLocationUrl, options);\n const recordingStream = (await result).readableStreamBody;\n if (recordingStream) {\n const writeFileStream = fs.createWriteStream(destinationPath);\n recordingStream.pipe(writeFileStream);\n const finish = new Promise<void>((resolve, reject) => {\n writeFileStream.on(\"finish\", resolve);\n writeFileStream.on(\"error\", reject);\n });\n await finish;\n } else {\n throw Error(\"failed to get stream\");\n }\n }\n}\n"]}
1
+ {"version":3,"file":"callRecording.js","sourceRoot":"","sources":["../../src/callRecording.ts"],"names":[],"mappings":";;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,kEAAwE;AAexE,wDAA6E;AAC7E,iEAA+D;AAC/D,oDAA8B;AAC9B,g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KAAK,CAAC,sBAAsB,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,cAAc,CACzB,iBAAyB,EACzB,eAAuB,EACvB,UAAoC,EAAE;QAEtC,MAAM,MAAM,GAAG,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;QAC3E,MAAM,eAAe,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC,kBAAkB,CAAC;QAC1D,IAAI,eAAe,EAAE,CAAC;YACpB,MAAM,eAAe,GAAG,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;YAC9D,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;YACtC,MAAM,MAAM,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACnD,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;gBACtC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACtC,CAAC,CAAC,CAAC;YACH,MAAM,MAAM,CAAC;QACf,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF;AA7ND,sCA6NC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { CallRecordingImpl } from \"./generated/src/operations/index.js\";\nimport type {\n CallAutomationApiClientOptionalParams,\n StartCallRecordingRequest,\n} from \"./generated/src/models/index.js\";\nimport type { RecordingStateResult } from \"./models/responses.js\";\nimport type {\n StartRecordingOptions,\n StopRecordingOptions,\n PauseRecordingOptions,\n GetRecordingPropertiesOptions,\n ResumeRecordingOptions,\n DeleteRecordingOptions,\n DownloadRecordingOptions,\n} from \"./models/options.js\";\nimport { communicationIdentifierModelConverter } from \"./utli/converters.js\";\nimport { ContentDownloaderImpl } from \"./contentDownloader.js\";\nimport * as fs from \"node:fs\";\nimport { randomUUID } from \"@azure/core-util\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { CallAutomationApiClient } from \"./generated/src/index.js\";\nimport { createCommunicationAuthPolicy } from \"@azure/communication-common\";\n\n/**\n * CallRecording class represents call recording related APIs.\n */\nexport class CallRecording {\n private readonly callRecordingImpl: CallRecordingImpl;\n private readonly contentDownloader: ContentDownloaderImpl;\n private readonly callAutomationApiClient: CallAutomationApiClient;\n\n constructor(\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\n this.callRecordingImpl = new CallRecordingImpl(this.callAutomationApiClient);\n this.contentDownloader = new ContentDownloaderImpl(this.callAutomationApiClient);\n }\n\n /**\n * Starts a call recording with the specified options.\n * @param startCallRecordingRequest - options to start the call recording\n * @param options - Operation options.\n */\n public async start(options: StartRecordingOptions): Promise<RecordingStateResult> {\n const startCallRecordingRequest: StartCallRecordingRequest = {\n callLocator: options.callLocator ? options.callLocator : undefined,\n };\n\n startCallRecordingRequest.recordingChannelType = options.recordingChannel;\n startCallRecordingRequest.recordingContentType = options.recordingContent;\n startCallRecordingRequest.recordingFormatType = options.recordingFormat;\n startCallRecordingRequest.recordingStateCallbackUri = options.recordingStateCallbackEndpointUrl;\n startCallRecordingRequest.pauseOnStart = options.pauseOnStart;\n startCallRecordingRequest.recordingStorage = options.recordingStorage;\n startCallRecordingRequest.callConnectionId = options.callConnectionId\n ? options.callConnectionId\n : undefined;\n\n if (options.channelAffinity) {\n startCallRecordingRequest.channelAffinity = [];\n options.channelAffinity.forEach((identifier) => {\n startCallRecordingRequest.channelAffinity?.push({\n participant: communicationIdentifierModelConverter(identifier.targetParticipant),\n channel: identifier.channel,\n });\n });\n }\n\n if (options.audioChannelParticipantOrdering) {\n startCallRecordingRequest.audioChannelParticipantOrdering = [];\n options.audioChannelParticipantOrdering.forEach((identifier) => {\n startCallRecordingRequest.audioChannelParticipantOrdering?.push(\n communicationIdentifierModelConverter(identifier),\n );\n });\n }\n if (options.callLocator) {\n if (options.callLocator.kind === \"groupCallLocator\") {\n startCallRecordingRequest.callLocator = {\n groupCallId: options.callLocator.id,\n kind: \"groupCallLocator\",\n };\n } else if (options.callLocator.kind === \"roomCallLocator\") {\n startCallRecordingRequest.callLocator = {\n roomId: options.callLocator.id,\n kind: \"roomCallLocator\",\n };\n } else {\n startCallRecordingRequest.callLocator = {\n serverCallId: options.callLocator.id,\n kind: \"serverCallLocator\",\n };\n }\n }\n\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const response = await this.callRecordingImpl.startRecording(\n startCallRecordingRequest,\n optionsInternal,\n );\n\n const result: RecordingStateResult = {\n recordingId: response.recordingId!,\n recordingKind: response.recordingKind!,\n recordingState: response.recordingState!,\n };\n\n return result;\n }\n\n /**\n * Returns call recording properties.\n * @param recordingId - The recordingId associated with the recording.\n * @param options - Additional request options contains getRecordingProperties api options.\n */\n public async getState(\n recordingId: string,\n options: GetRecordingPropertiesOptions = {},\n ): Promise<RecordingStateResult> {\n const response = await this.callRecordingImpl.getRecordingProperties(recordingId, options);\n\n const result: RecordingStateResult = {\n recordingId: response.recordingId!,\n recordingKind: response.recordingKind!,\n recordingState: response.recordingState!,\n };\n\n return result;\n }\n\n /**\n * Stops a call recording.\n * @param recordingId - The recordingId associated with the recording.\n * @param options - Additional request options contains stopRecording api options.\n */\n public async stop(recordingId: string, options: StopRecordingOptions = {}): Promise<void> {\n return this.callRecordingImpl.stopRecording(recordingId, options);\n }\n\n /**\n * Pauses a call recording.\n * @param recordingId - The recordingId associated with the recording.\n * @param options - Additional request options contains pauseRecording api options.\n */\n public async pause(recordingId: string, options: PauseRecordingOptions = {}): Promise<void> {\n return this.callRecordingImpl.pauseRecording(recordingId, options);\n }\n\n /**\n * Resumes a call recording.\n * @param recordingId - The recordingId associated with the recording.\n * @param options - Additional request options contains resumeRecording api options.\n */\n public async resume(recordingId: string, options: ResumeRecordingOptions = {}): Promise<void> {\n return this.callRecordingImpl.resumeRecording(recordingId, options);\n }\n\n /**\n * Deletes a recording.\n * @param recordingLocationUrl - The recording location url. Required.\n * @param options - Additional request options contains deleteRecording api options.\n */\n public async delete(\n recordingLocationUrl: string,\n options: DeleteRecordingOptions = {},\n ): Promise<void> {\n await this.contentDownloader.deleteRecording(recordingLocationUrl, options);\n }\n\n /**\n * Returns a stream with a call recording.\n * @param sourceLocationUrl - The source location url. Required.\n * @param options - Additional request options contains downloadRecording api options.\n */\n public async downloadStreaming(\n sourceLocationUrl: string,\n options: DownloadRecordingOptions = {},\n ): Promise<NodeJS.ReadableStream> {\n const result = this.contentDownloader.download(sourceLocationUrl, options);\n const recordingStream = (await result).readableStreamBody;\n if (recordingStream) {\n return recordingStream;\n } else {\n throw Error(\"failed to get stream\");\n }\n }\n\n /**\n * Downloads a call recording file to the specified stream.\n * @param sourceLocationUrl - The source location url. Required.\n * @param destinationStream - The destination stream. Required.\n * @param options - Additional request options contains downloadRecording api options.\n */\n public async downloadToStream(\n sourceLocationUrl: string,\n destinationStream: NodeJS.WritableStream,\n options: DownloadRecordingOptions = {},\n ): Promise<void> {\n const result = this.contentDownloader.download(sourceLocationUrl, options);\n const recordingStream = (await result).readableStreamBody;\n if (recordingStream) {\n recordingStream.pipe(destinationStream);\n const finish = new Promise<void>((resolve, reject) => {\n destinationStream.on(\"finish\", resolve);\n destinationStream.on(\"error\", reject);\n });\n await finish;\n } else {\n throw Error(\"failed to get stream\");\n }\n }\n\n /**\n * Downloads a call recording file to the specified path.\n * @param sourceLocationUrl - The source location url. Required.\n * @param destinationPath - The destination path. Required.\n * @param options - Additional request options contains downloadRecording api options.\n */\n public async downloadToPath(\n sourceLocationUrl: string,\n destinationPath: string,\n options: DownloadRecordingOptions = {},\n ): Promise<void> {\n const result = this.contentDownloader.download(sourceLocationUrl, options);\n const recordingStream = (await result).readableStreamBody;\n if (recordingStream) {\n const writeFileStream = fs.createWriteStream(destinationPath);\n recordingStream.pipe(writeFileStream);\n const finish = new Promise<void>((resolve, reject) => {\n writeFileStream.on(\"finish\", resolve);\n writeFileStream.on(\"error\", reject);\n });\n await finish;\n } else {\n throw Error(\"failed to get stream\");\n }\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import * as coreClient from "@azure/core-client";
2
- import { CallConnection, CallMedia, CallDialog, CallRecording } from "./operationsInterfaces/index.js";
2
+ import { CallConnection, CallMedia, CallRecording } from "./operationsInterfaces/index.js";
3
3
  import { CallAutomationApiClientOptionalParams, CreateCallRequest, CreateCallOptionalParams, CreateCallResponse, AnswerCallRequest, AnswerCallOptionalParams, AnswerCallResponse, RedirectCallRequest, RedirectCallOptionalParams, RejectCallRequest, RejectCallOptionalParams, ConnectRequest, ConnectOptionalParams, ConnectResponse } from "./models/index.js";
4
4
  export declare class CallAutomationApiClient extends coreClient.ServiceClient {
5
5
  endpoint: string;
@@ -44,7 +44,6 @@ export declare class CallAutomationApiClient extends coreClient.ServiceClient {
44
44
  connect(connectRequest: ConnectRequest, options?: ConnectOptionalParams): Promise<ConnectResponse>;
45
45
  callConnection: CallConnection;
46
46
  callMedia: CallMedia;
47
- callDialog: CallDialog;
48
47
  callRecording: CallRecording;
49
48
  }
50
49
  //# sourceMappingURL=callAutomationApiClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"callAutomationApiClient.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/callAutomationApiClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAYjD,OAAO,EACL,cAAc,EACd,SAAS,EACT,UAAU,EACV,aAAa,EACd,MAAM,iCAAiC,CAAC;AAGzC,OAAO,EACL,qCAAqC,EACrC,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,mBAAmB,EACnB,0BAA0B,EAC1B,iBAAiB,EACjB,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAE3B,qBAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;gBAED,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,qCAAqC;IAyCjD,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC;;;;OAIG;IACH,UAAU,CACR,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,kBAAkB,CAAC;IAO9B;;;;OAIG;IACH,UAAU,CACR,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,kBAAkB,CAAC;IAO9B;;;;OAIG;IACH,YAAY,CACV,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,IAAI,CAAC;IAOhB;;;;OAIG;IACH,UAAU,CACR,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,CAAC,EAAE,wBAAwB,GACjC,OAAO,CAAC,IAAI,CAAC;IAOhB;;;;OAIG;IACH,OAAO,CACL,cAAc,EAAE,cAAc,EAC9B,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,eAAe,CAAC;IAO3B,cAAc,EAAE,cAAc,CAAC;IAC/B,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,EAAE,aAAa,CAAC;CAC9B"}
1
+ {"version":3,"file":"callAutomationApiClient.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/callAutomationApiClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAo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C9B"}
@@ -42,10 +42,9 @@ class CallAutomationApiClient extends coreClient.ServiceClient {
42
42
  // Parameter assignments
43
43
  this.endpoint = endpoint;
44
44
  // Assigning values to Constant parameters
45
- this.apiVersion = options.apiVersion || "2024-09-01-preview";
45
+ this.apiVersion = options.apiVersion || "2025-03-30-preview";
46
46
  this.callConnection = new index_js_1.CallConnectionImpl(this);
47
47
  this.callMedia = new index_js_1.CallMediaImpl(this);
48
- this.callDialog = new index_js_1.CallDialogImpl(this);
49
48
  this.callRecording = new index_js_1.CallRecordingImpl(this);
50
49
  this.addCustomApiVersionPolicy(options.apiVersion);
51
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"callAutomationApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/callAutomationApiClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAMjD,oDAK+B;AAO/B,2EAAqD;AACrD,qEAA+C;AAkB/C,MAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IAInE;;;;OAIG;IACH,YACE,QAAgB,EAChB,OAA+C;;QAE/C,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAA0C;YACtD,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,qDAAqD,CAAC;QAC7E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAg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AAQ,CAAC;IACpC,gBAAgB,EAAE;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,sBAAsB;QACjC,UAAU,CAAC,sBAAsB;KAClC;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport {\n CallConnectionImpl,\n CallMediaImpl,\n CallDialogImpl,\n CallRecordingImpl,\n} from \"./operations/index.js\";\nimport {\n CallConnection,\n CallMedia,\n CallDialog,\n CallRecording,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n CallAutomationApiClientOptionalParams,\n CreateCallRequest,\n CreateCallOptionalParams,\n CreateCallResponse,\n AnswerCallRequest,\n AnswerCallOptionalParams,\n AnswerCallResponse,\n RedirectCallRequest,\n RedirectCallOptionalParams,\n RejectCallRequest,\n RejectCallOptionalParams,\n ConnectRequest,\n ConnectOptionalParams,\n ConnectResponse,\n} from \"./models/index.js\";\n\nexport class CallAutomationApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the CallAutomationApiClient class.\n * @param endpoint The endpoint of the Azure Communication resource.\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n options?: CallAutomationApiClientOptionalParams,\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: CallAutomationApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-call-automation/1.4.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2024-09-01-preview\";\n this.callConnection = new CallConnectionImpl(this);\n this.callMedia = new CallMediaImpl(this);\n this.callDialog = new CallDialogImpl(this);\n this.callRecording = new CallRecordingImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Create an outbound call.\n * @param createCallRequest The create call request.\n * @param options The options parameters.\n */\n createCall(\n createCallRequest: CreateCallRequest,\n options?: CreateCallOptionalParams,\n ): Promise<CreateCallResponse> {\n return this.sendOperationRequest(\n { createCallRequest, options },\n createCallOperationSpec,\n );\n }\n\n /**\n * Answer a call using the IncomingCallContext from Event Grid.\n * @param answerCallRequest The answer call request.\n * @param options The options parameters.\n */\n answerCall(\n answerCallRequest: AnswerCallRequest,\n options?: AnswerCallOptionalParams,\n ): Promise<AnswerCallResponse> {\n return this.sendOperationRequest(\n { answerCallRequest, options },\n answerCallOperationSpec,\n );\n }\n\n /**\n * Redirect a call.\n * @param redirectCallRequest The redirect call request.\n * @param options The options parameters.\n */\n redirectCall(\n redirectCallRequest: RedirectCallRequest,\n options?: RedirectCallOptionalParams,\n ): Promise<void> {\n return this.sendOperationRequest(\n { redirectCallRequest, options },\n redirectCallOperationSpec,\n );\n }\n\n /**\n * Reject the call.\n * @param rejectCallRequest The reject call request.\n * @param options The options parameters.\n */\n rejectCall(\n rejectCallRequest: RejectCallRequest,\n options?: RejectCallOptionalParams,\n ): Promise<void> {\n return this.sendOperationRequest(\n { rejectCallRequest, options },\n rejectCallOperationSpec,\n );\n }\n\n /**\n * Create a connection to a CallLocator.\n * @param connectRequest The create connection request.\n * @param options The options parameters.\n */\n connect(\n connectRequest: ConnectRequest,\n options?: ConnectOptionalParams,\n ): Promise<ConnectResponse> {\n return this.sendOperationRequest(\n { connectRequest, options },\n connectOperationSpec,\n );\n }\n\n callConnection: CallConnection;\n callMedia: CallMedia;\n callDialog: CallDialog;\n callRecording: CallRecording;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createCallOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.CallConnectionPropertiesInternal,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.createCallRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst answerCallOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections:answer\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CallConnectionPropertiesInternal,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.answerCallRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst redirectCallOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections:redirect\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.redirectCallRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst rejectCallOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections:reject\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.rejectCallRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst connectOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections:connect\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CallConnectionPropertiesInternal,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.connectRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\n"]}
1
+ {"version":3,"file":"callAutomationApiClient.js","sourceRoot":"","sources":["../../../../src/generated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EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,WAAW,EAAE,UAAU,CAAC,iBAAiB;IACzC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,sBAAsB;QACjC,UAAU,CAAC,sBAAsB;KAClC;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,oBAAoB,GAA6B;IACrD,IAAI,EAAE,kCAAkC;IACxC,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,WAAW,EAAE,UAAU,CAAC,cAAc;IACtC,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE;QAChB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,sBAAsB;QACjC,UAAU,CAAC,sBAAsB;KAClC;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport {\n CallConnectionImpl,\n CallMediaImpl,\n CallRecordingImpl,\n} from \"./operations/index.js\";\nimport {\n CallConnection,\n CallMedia,\n CallRecording,\n} from \"./operationsInterfaces/index.js\";\nimport * as Parameters from \"./models/parameters.js\";\nimport * as Mappers from \"./models/mappers.js\";\nimport {\n CallAutomationApiClientOptionalParams,\n CreateCallRequest,\n CreateCallOptionalParams,\n CreateCallResponse,\n AnswerCallRequest,\n AnswerCallOptionalParams,\n AnswerCallResponse,\n RedirectCallRequest,\n RedirectCallOptionalParams,\n RejectCallRequest,\n RejectCallOptionalParams,\n ConnectRequest,\n ConnectOptionalParams,\n ConnectResponse,\n} from \"./models/index.js\";\n\nexport class CallAutomationApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the CallAutomationApiClient class.\n * @param endpoint The endpoint of the Azure Communication resource.\n * @param options The parameter options\n */\n constructor(\n endpoint: string,\n options?: CallAutomationApiClientOptionalParams,\n ) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: CallAutomationApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-call-automation/1.4.0-beta.2`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2025-03-30-preview\";\n this.callConnection = new CallConnectionImpl(this);\n this.callMedia = new CallMediaImpl(this);\n this.callRecording = new CallRecordingImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n /**\n * Create an outbound call.\n * @param createCallRequest The create call request.\n * @param options The options parameters.\n */\n createCall(\n createCallRequest: CreateCallRequest,\n options?: CreateCallOptionalParams,\n ): Promise<CreateCallResponse> {\n return this.sendOperationRequest(\n { createCallRequest, options },\n createCallOperationSpec,\n );\n }\n\n /**\n * Answer a call using the IncomingCallContext from Event Grid.\n * @param answerCallRequest The answer call request.\n * @param options The options parameters.\n */\n answerCall(\n answerCallRequest: AnswerCallRequest,\n options?: AnswerCallOptionalParams,\n ): Promise<AnswerCallResponse> {\n return this.sendOperationRequest(\n { answerCallRequest, options },\n answerCallOperationSpec,\n );\n }\n\n /**\n * Redirect a call.\n * @param redirectCallRequest The redirect call request.\n * @param options The options parameters.\n */\n redirectCall(\n redirectCallRequest: RedirectCallRequest,\n options?: RedirectCallOptionalParams,\n ): Promise<void> {\n return this.sendOperationRequest(\n { redirectCallRequest, options },\n redirectCallOperationSpec,\n );\n }\n\n /**\n * Reject the call.\n * @param rejectCallRequest The reject call request.\n * @param options The options parameters.\n */\n rejectCall(\n rejectCallRequest: RejectCallRequest,\n options?: RejectCallOptionalParams,\n ): Promise<void> {\n return this.sendOperationRequest(\n { rejectCallRequest, options },\n rejectCallOperationSpec,\n );\n }\n\n /**\n * Create a connection to a CallLocator.\n * @param connectRequest The create connection request.\n * @param options The options parameters.\n */\n connect(\n connectRequest: ConnectRequest,\n options?: ConnectOptionalParams,\n ): Promise<ConnectResponse> {\n return this.sendOperationRequest(\n { connectRequest, options },\n connectOperationSpec,\n );\n }\n\n callConnection: CallConnection;\n callMedia: CallMedia;\n callRecording: CallRecording;\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createCallOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.CallConnectionPropertiesInternal,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.createCallRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst answerCallOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections:answer\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CallConnectionPropertiesInternal,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.answerCallRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst redirectCallOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections:redirect\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.redirectCallRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst rejectCallOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections:reject\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.rejectCallRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\nconst connectOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections:connect\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CallConnectionPropertiesInternal,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.connectRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.contentType,\n Parameters.accept,\n Parameters.repeatabilityRequestID,\n Parameters.repeatabilityFirstSent,\n ],\n mediaType: \"json\",\n serializer,\n};\n"]}