@azure/communication-call-automation 1.5.0-alpha.20250519.1 → 1.5.0-beta.2

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 +3 -4
  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 +2 -3
  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 +3 -4
  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 +3 -4
  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,41 +1,25 @@
1
1
  import type { CallConnection } from "../callConnection.js";
2
2
  import type { CallConnectionProperties, CallParticipant } from "./models.js";
3
- import type { RecordingState } from "../generated/src/index.js";
4
- import type { AddParticipantEventResult, AnswerCallEventResult, CancelAllMediaOperationsEventResult, CreateCallEventResult, PlayEventResult, RemoveParticipantEventResult, SendDtmfEventResult, StartRecognizingEventResult, TransferCallToParticipantEventResult, CancelAddParticipantEventResult, ConnectCallEventResult } from "../eventprocessor/eventResponses.js";
5
- import type { AbortSignalLike } from "@azure/abort-controller";
3
+ import { RecordingState, RecordingKind } from "../generated/src/index.js";
6
4
  /**
7
- * CreateCall result
5
+ * The interface used as parent of [action]CallResult
8
6
  */
9
- export interface CreateCallResult {
10
- /** The callConnectionProperties */
7
+ export interface CallResult {
11
8
  callConnectionProperties: CallConnectionProperties;
12
- /** The callConnection */
13
9
  callConnection: CallConnection;
14
- /** Waiting for event processor to process the event */
15
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CreateCallEventResult>;
16
10
  }
11
+ /**
12
+ * CreateCall result
13
+ */
14
+ export type CreateCallResult = CallResult;
17
15
  /**
18
16
  * AnswerCall result
19
17
  */
20
- export interface AnswerCallResult {
21
- /** The callConnectionProperties */
22
- callConnectionProperties: CallConnectionProperties;
23
- /** The callConnection */
24
- callConnection: CallConnection;
25
- /** Waiting for event processor to process the event */
26
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<AnswerCallEventResult>;
27
- }
18
+ export type AnswerCallResult = CallResult;
28
19
  /**
29
20
  * ConnectCall result
30
21
  */
31
- export interface ConnectCallResult {
32
- /** The callConnectionProperties */
33
- callConnectionProperties: CallConnectionProperties;
34
- /** The callConnection */
35
- callConnection: CallConnection;
36
- /** Waiting for event processor to process the event */
37
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<ConnectCallEventResult>;
38
- }
22
+ export type ConnectCallResult = CallResult;
39
23
  /** The response payload for getting participants of the call. */
40
24
  export interface ListParticipantsResult {
41
25
  /** List of the current participants in the call. */
@@ -51,22 +35,16 @@ export interface AddParticipantResult {
51
35
  participant?: CallParticipant;
52
36
  /** The operation context provided by client. */
53
37
  operationContext?: string;
54
- /** Waiting for event processor to process the event */
55
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<AddParticipantEventResult>;
56
38
  }
57
39
  /** The response payload for transferring the call. */
58
40
  export interface TransferCallResult {
59
41
  /** The operation context provided by client. */
60
42
  operationContext?: string;
61
- /** Waiting for event processor to process the event */
62
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<TransferCallToParticipantEventResult>;
63
43
  }
64
44
  /** The response payload for removing participants from the call. */
65
45
  export interface RemoveParticipantResult {
66
46
  /** The operation context provided by client. */
67
47
  operationContext?: string;
68
- /** Waiting for event processor to process the event */
69
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<RemoveParticipantEventResult>;
70
48
  }
71
49
  /** The response payload for muting participant from the call. */
72
50
  export interface MuteParticipantResult {
@@ -76,30 +54,13 @@ export interface MuteParticipantResult {
76
54
  /** The response payload for starting a call recording or getting call recording state. */
77
55
  export interface RecordingStateResult {
78
56
  recordingId: string;
79
- recordingKind: string;
57
+ recordingKind: RecordingKind;
80
58
  recordingState: RecordingState;
81
59
  }
82
- /** The response payload for starting a call recording or getting call recording state. */
83
- export interface CancelAllMediaOperationsResult {
84
- /** Waiting for event processor to process the event */
85
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CancelAllMediaOperationsEventResult>;
86
- }
87
- /** The response from play. */
88
- export interface PlayResult {
89
- /** Waiting for event processor to process the event */
90
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<PlayEventResult>;
91
- }
92
60
  /** The response payload for sending DTMF tones. */
93
61
  export interface SendDtmfTonesResult {
94
62
  /** The operation context provided by client. */
95
63
  operationContext?: string;
96
- /** Waiting for event processor to process the event */
97
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<SendDtmfEventResult>;
98
- }
99
- /** The response from recognizing. */
100
- export interface StartRecognizingResult {
101
- /** Waiting for event processor to process the event */
102
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<StartRecognizingEventResult>;
103
64
  }
104
65
  /** The response payload for cancelling add participant request. */
105
66
  export interface CancelAddParticipantOperationResult {
@@ -107,7 +68,5 @@ export interface CancelAddParticipantOperationResult {
107
68
  invitationId?: string;
108
69
  /** The operation context provided by client. */
109
70
  operationContext?: string;
110
- /** Waiting for event processor to process the event */
111
- waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CancelAddParticipantEventResult>;
112
71
  }
113
72
  //# sourceMappingURL=responses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/models/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EACV,yBAAyB,EACzB,qBAAqB,EACrB,mCAAmC,EACnC,qBAAqB,EACrB,eAAe,EACf,4BAA4B,EAC5B,mBAAmB,EACnB,2BAA2B,EAC3B,oCAAoC,EACpC,+BAA+B,EAC/B,sBAAsB,EACvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,wBAAwB,EAAE,wBAAwB,CAAC;IAEnD,yBAAyB;IACzB,cAAc,EAAE,cAAc,CAAC;IAE/B,uDAAuD;IACvD,qBAAqB,CACnB,WAAW,CAAC,EAAE,eAAe,EAC7B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mCAAmC;IACnC,wBAAwB,EAAE,wBAAwB,CAAC;IAEnD,yBAAyB;IACzB,cAAc,EAAE,cAAc,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AgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,iEAAiE;AACjE,MAAM,WAAW,qBAAqB;IACpC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,0FAA0F;AAC1F,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;CAChC;AAED,mDAAmD;AACnD,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,mEAAmE;AACnE,MAAM,WAAW,mCAAmC;IAClD,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/models/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CallConnection } from \"../callConnection.js\";\nimport type { CallConnectionProperties, CallParticipant } from \"./models.js\";\nimport type { RecordingState } from \"../generated/src/index.js\";\nimport type {\n AddParticipantEventResult,\n AnswerCallEventResult,\n CancelAllMediaOperationsEventResult,\n CreateCallEventResult,\n PlayEventResult,\n RemoveParticipantEventResult,\n SendDtmfEventResult,\n StartRecognizingEventResult,\n TransferCallToParticipantEventResult,\n CancelAddParticipantEventResult,\n ConnectCallEventResult,\n} from \"../eventprocessor/eventResponses.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * CreateCall result\n */\nexport interface CreateCallResult {\n /** The callConnectionProperties */\n callConnectionProperties: CallConnectionProperties;\n\n /** The callConnection */\n callConnection: CallConnection;\n\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<CreateCallEventResult>;\n}\n\n/**\n * AnswerCall result\n */\nexport interface AnswerCallResult {\n /** The callConnectionProperties */\n callConnectionProperties: CallConnectionProperties;\n\n /** The callConnection */\n callConnection: CallConnection;\n\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<AnswerCallEventResult>;\n}\n\n/**\n * ConnectCall result\n */\nexport interface ConnectCallResult {\n /** The callConnectionProperties */\n callConnectionProperties: CallConnectionProperties;\n\n /** The callConnection */\n callConnection: CallConnection;\n\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<ConnectCallEventResult>;\n}\n\n/** The response payload for getting participants of the call. */\nexport interface ListParticipantsResult {\n /** List of the current participants in the call. */\n values?: CallParticipant[];\n /** Continue of the list of participants */\n nextLink?: string;\n}\n\n/** The response payload for adding participants to the call. */\nexport interface AddParticipantResult {\n /** invitation ID used to add the participant. */\n invitationId?: string;\n /** List of current participants in the call. */\n participant?: CallParticipant;\n /** The operation context provided by client. */\n operationContext?: string;\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<AddParticipantEventResult>;\n}\n\n/** The response payload for transferring the call. */\nexport interface TransferCallResult {\n /** The operation context provided by client. */\n operationContext?: string;\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<TransferCallToParticipantEventResult>;\n}\n\n/** The response payload for removing participants from the call. */\nexport interface RemoveParticipantResult {\n /** The operation context provided by client. */\n operationContext?: string;\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<RemoveParticipantEventResult>;\n}\n\n/** The response payload for muting participant from the call. */\nexport interface MuteParticipantResult {\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for starting a call recording or getting call recording state. */\nexport interface RecordingStateResult {\n recordingId: string;\n recordingKind: string;\n recordingState: RecordingState;\n}\n\n/** The response payload for starting a call recording or getting call recording state. */\nexport interface CancelAllMediaOperationsResult {\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<CancelAllMediaOperationsEventResult>;\n}\n\n/** The response from play. */\nexport interface PlayResult {\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<PlayEventResult>;\n}\n\n/** The response payload for sending DTMF tones. */\nexport interface SendDtmfTonesResult {\n /** The operation context provided by client. */\n operationContext?: string;\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<SendDtmfEventResult>;\n}\n\n/** The response from recognizing. */\nexport interface StartRecognizingResult {\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<StartRecognizingEventResult>;\n}\n\n/** The response payload for cancelling add participant request. */\nexport interface CancelAddParticipantOperationResult {\n /** the invitation ID used to cancel the add participant request. */\n invitationId?: string;\n /** The operation context provided by client. */\n operationContext?: string;\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<CancelAddParticipantEventResult>;\n}\n"]}
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/models/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CallConnection } from \"../callConnection.js\";\nimport type { CallConnectionProperties, CallParticipant } from \"./models.js\";\nimport { RecordingState, RecordingKind } from \"../generated/src/index.js\";\n\n/**\n * The interface used as parent of [action]CallResult\n */\nexport interface CallResult {\n /*\n * The callConnectionProperties\n */\n callConnectionProperties: CallConnectionProperties;\n\n /*\n * The callConnection\n */\n callConnection: CallConnection;\n}\n\n/**\n * CreateCall result\n */\nexport type CreateCallResult = CallResult;\n\n/**\n * AnswerCall result\n */\nexport type AnswerCallResult = CallResult;\n\n/**\n * ConnectCall result\n */\nexport type ConnectCallResult = CallResult;\n\n/** The response payload for getting participants of the call. */\nexport interface ListParticipantsResult {\n /** List of the current participants in the call. */\n values?: CallParticipant[];\n /** Continue of the list of participants */\n nextLink?: string;\n}\n\n/** The response payload for adding participants to the call. */\nexport interface AddParticipantResult {\n /** invitation ID used to add the participant. */\n invitationId?: string;\n /** List of current participants in the call. */\n participant?: CallParticipant;\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for transferring the call. */\nexport interface TransferCallResult {\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for removing participants from the call. */\nexport interface RemoveParticipantResult {\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for muting participant from the call. */\nexport interface MuteParticipantResult {\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for starting a call recording or getting call recording state. */\nexport interface RecordingStateResult {\n recordingId: string;\n recordingKind: RecordingKind;\n recordingState: RecordingState;\n}\n\n/** The response payload for sending DTMF tones. */\nexport interface SendDtmfTonesResult {\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for cancelling add participant request. */\nexport interface CancelAddParticipantOperationResult {\n /** the invitation ID used to cancel the add participant request. */\n invitationId?: string;\n /** The operation context provided by client. */\n operationContext?: string;\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.52.7"
8
+ "packageVersion": "7.52.4"
9
9
  }
10
10
  ]
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"converters.d.ts","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,E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vD,2BAA2B,GAAG,SAAS,CAMzC"}
@@ -26,6 +26,9 @@ function extractKind(identifierModel) {
26
26
  if (identifierModel.microsoftTeamsApp !== undefined) {
27
27
  return index_js_1.KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp;
28
28
  }
29
+ if (identifierModel.teamsExtensionUser !== undefined) {
30
+ return index_js_1.KnownCommunicationIdentifierModelKind.TeamsExtensionUser;
31
+ }
29
32
  return index_js_1.KnownCommunicationIdentifierModelKind.Unknown;
30
33
  }
31
34
  /** Convert PhoneNumberIdentifier to PhoneNumberIdentifierModel(Internal usage class) */
@@ -85,6 +88,17 @@ function communicationIdentifierConverter(identifierModel) {
85
88
  };
86
89
  return microsoftTeamsAppIdentifier;
87
90
  }
91
+ if (kind === index_js_1.KnownCommunicationIdentifierModelKind.TeamsExtensionUser &&
92
+ identifierModel.teamsExtensionUser !== undefined) {
93
+ const teamsExtensionUserIdentifier = {
94
+ rawId: rawId,
95
+ userId: identifierModel.teamsExtensionUser.userId,
96
+ resourceId: identifierModel.teamsExtensionUser.resourceId,
97
+ tenantId: identifierModel.teamsExtensionUser.tenantId,
98
+ cloud: identifierModel.teamsExtensionUser.cloud,
99
+ };
100
+ return teamsExtensionUserIdentifier;
101
+ }
88
102
  const unknownIdentifier = {
89
103
  id: rawId ? rawId : "",
90
104
  };
@@ -109,6 +123,10 @@ function communicationIdentifierModelConverter(identifier) {
109
123
  const microsoftTeamsAppIdentifierModel = Object.assign({ kind: index_js_1.KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp }, serializedIdentifier);
110
124
  return microsoftTeamsAppIdentifierModel;
111
125
  }
126
+ if ((0, communication_common_1.isTeamsExtensionUserIdentifier)(identifier)) {
127
+ const teamsExtensionUserIdentifierModel = Object.assign({ kind: index_js_1.KnownCommunicationIdentifierModelKind.TeamsExtensionUser }, serializedIdentifier);
128
+ return teamsExtensionUserIdentifierModel;
129
+ }
112
130
  if ((0, communication_common_1.isUnknownIdentifier)(identifier)) {
113
131
  const unknownIdentifierModel = Object.assign({ kind: index_js_1.KnownCommunicationIdentifierModelKind.Unknown }, serializedIdentifier);
114
132
  return unknownIdentifierModel;
@@ -1 +1 @@
1
- {"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmDlC,kFAUC;AAGD,wEAcC;AAGD,4EAyDC;AAGD,sFA8CC;AAGD,4DAUC;AAGD,8FAQC;AAGD,oFAQC;AAGD,8FAQC;AAGD,oFAQC;AAxOD,sEAOqC;AAUrC,wDAAkF;AAGlF,SAAS,WAAW,CAClB,eAA6C;IAE7C,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gDAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,gDAAqC,CAAC,WAAW,CAAC;IAC3D,CAAC;IACD,IAAI,eAAe,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO,gDAAqC,CAAC,kBAAkB,CAAC;IAClE,CAAC;IACD,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gDAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,OAAO,gDAAqC,CAAC,OAAO,CAAC;AACvD,CAAC;AAED,wFAAwF;AACxF,SAAgB,mCAAmC,CACjD,qBAAwD;IAExD,IAAI,qBAAqB,KAAK,SAAS,IAAI,qBAAqB,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC3F,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,0BAA0B,GAC9B,IAAA,uDAAgC,EAAC,qBAAqB,CAAC,CAAC,WAAW,CAAC;IACtE,OAAO,0BAA0B,CAAC;AACpC,CAAC;AAED,2FAA2F;AAC3F,SAAgB,8BAA8B,CAC5C,+BAA4E;IAE5E,IACE,+BA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IACnB,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,CAAC;AAC1C,CAAC;AAED,mGAAmG;AACnG,SAAgB,oCAAoC,CAClD,UAAwD;IAExD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACrC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PhoneNumberIdentifier,\n CommunicationUserIdentifier,\n UnknownIdentifier,\n SerializedPhoneNumberIdentifier,\n CommunicationIdentifier,\n SerializedCommunicationIdentifier,\n MicrosoftTeamsUserIdentifier,\n MicrosoftTeamsAppIdentifier,\n} from \"@azure/communication-common\";\nimport {\n serializeCommunicationIdentifier,\n isCommunicationUserIdentifier,\n isPhoneNumberIdentifier,\n isUnknownIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isMicrosoftTeamsAppIdentifier,\n} from \"@azure/communication-common\";\nimport type {\n CallParticipantInternal,\n CommunicationIdentifierModel,\n CommunicationIdentifierModelKind,\n KnownCommunicationCloudEnvironmentModel,\n PhoneNumberIdentifierModel,\n CommunicationUserIdentifierModel,\n MicrosoftTeamsAppIdentifierModel,\n} from \"../generated/src/index.js\";\nimport { KnownCommunicationIdentifierModelKind } from \"../generated/src/index.js\";\nimport type { CallParticipant } from \"../models/models.js\";\n\nfunction extractKind(\n identifierModel: CommunicationIdentifierModel,\n): CommunicationIdentifierModelKind {\n if (identifierModel.communicationUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.CommunicationUser;\n }\n if (identifierModel.phoneNumber !== undefined) {\n return KnownCommunicationIdentifierModelKind.PhoneNumber;\n }\n if (identifierModel.microsoftTeamsUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser;\n }\n if (identifierModel.microsoftTeamsApp !== undefined) {\n return KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp;\n }\n return KnownCommunicationIdentifierModelKind.Unknown;\n}\n\n/** Convert PhoneNumberIdentifier to PhoneNumberIdentifierModel(Internal usage class) */\nexport function PhoneNumberIdentifierModelConverter(\n phoneNumberIdentifier: PhoneNumberIdentifier | undefined,\n): PhoneNumberIdentifierModel | undefined {\n if (phoneNumberIdentifier === undefined || phoneNumberIdentifier.phoneNumber === undefined) {\n return undefined;\n }\n\n const phoneNumberIdentifierModel =\n serializeCommunicationIdentifier(phoneNumberIdentifier).phoneNumber;\n return phoneNumberIdentifierModel;\n}\n\n/** Convert SerializedPhoneNumberIdentifier to PhoneNumberIdentifier(Public usage class) */\nexport function phoneNumberIdentifierConverter(\n serializedPhoneNumberIdentifier: SerializedPhoneNumberIdentifier | undefined,\n): PhoneNumberIdentifier | undefined {\n if (\n serializedPhoneNumberIdentifier === undefined ||\n serializedPhoneNumberIdentifier?.value === null\n ) {\n return undefined;\n }\n\n const phoneNumberIdentifier: PhoneNumberIdentifier = {\n phoneNumber: serializedPhoneNumberIdentifier.value,\n };\n return phoneNumberIdentifier;\n}\n\n/** Convert CommunicationIdentifierModel to CommunicationIdentifier(Public usage class) */\nexport function communicationIdentifierConverter(\n identifierModel: CommunicationIdentifierModel,\n): CommunicationIdentifier {\n const rawId = identifierModel.rawId;\n const kind =\n identifierModel.kind !== undefined ? identifierModel.kind : extractKind(identifierModel);\n\n if (\n kind === KnownCommunicationIdentifierModelKind.CommunicationUser &&\n identifierModel.communicationUser !== undefined\n ) {\n const communicationUserIdentifier: CommunicationUserIdentifier = {\n communicationUserId: identifierModel.communicationUser.id,\n };\n return communicationUserIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.PhoneNumber &&\n identifierModel.phoneNumber !== undefined\n ) {\n const phoneNumberIdentifier: PhoneNumberIdentifier = {\n phoneNumber: identifierModel.phoneNumber.value,\n rawId: rawId,\n };\n return phoneNumberIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser &&\n identifierModel.microsoftTeamsUser !== undefined\n ) {\n const microsoftTeamsUserIdentifier: MicrosoftTeamsUserIdentifier = {\n rawId: rawId,\n microsoftTeamsUserId: identifierModel.microsoftTeamsUser.userId,\n isAnonymous: identifierModel.microsoftTeamsUser.isAnonymous,\n cloud: identifierModel.microsoftTeamsUser.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return microsoftTeamsUserIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp &&\n identifierModel.microsoftTeamsApp !== undefined\n ) {\n const microsoftTeamsAppIdentifier: MicrosoftTeamsAppIdentifier = {\n rawId: rawId,\n teamsAppId: identifierModel.microsoftTeamsApp.appId,\n cloud: identifierModel.microsoftTeamsApp.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return microsoftTeamsAppIdentifier;\n }\n\n const unknownIdentifier: UnknownIdentifier = {\n id: rawId ? rawId : \"\",\n };\n return unknownIdentifier;\n}\n\n/** Convert CommunicationIdentifier to CommunicationIdentifierModel(Internal usage class) */\nexport function communicationIdentifierModelConverter(\n identifier: CommunicationIdentifier,\n): CommunicationIdentifierModel {\n const serializedIdentifier: SerializedCommunicationIdentifier =\n serializeCommunicationIdentifier(identifier);\n if (isCommunicationUserIdentifier(identifier)) {\n const communicationUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.CommunicationUser,\n ...serializedIdentifier,\n };\n return communicationUserIdentifierModel;\n }\n\n if (isPhoneNumberIdentifier(identifier)) {\n const phoneNumberIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.PhoneNumber,\n ...serializedIdentifier,\n };\n return phoneNumberIdentifierModel;\n }\n\n if (isMicrosoftTeamsUserIdentifier(identifier)) {\n const microsoftTeamsUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser,\n ...serializedIdentifier,\n };\n return microsoftTeamsUserIdentifierModel;\n }\n\n if (isMicrosoftTeamsAppIdentifier(identifier)) {\n const microsoftTeamsAppIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp,\n ...serializedIdentifier,\n };\n return microsoftTeamsAppIdentifierModel;\n }\n\n if (isUnknownIdentifier(identifier)) {\n const unknownIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.Unknown,\n ...serializedIdentifier,\n };\n return unknownIdentifierModel;\n }\n\n throw new Error();\n}\n\n/** Convert CallParticipantInternal to CallParticipant */\nexport function callParticipantConverter(\n acsCallParticipant: CallParticipantInternal,\n): CallParticipant {\n const callParticipant: CallParticipant = {\n ...acsCallParticipant,\n identifier: acsCallParticipant.identifier\n ? communicationIdentifierConverter(acsCallParticipant.identifier)\n : undefined,\n };\n return callParticipant;\n}\n\n/** Convert CommunicationUserIdentifier to CommunicationUserIdentifierModel (Internal usage class) */\nexport function communicationUserIdentifierModelConverter(\n identifier: CommunicationUserIdentifier | undefined,\n): CommunicationUserIdentifierModel | undefined {\n if (!identifier || !identifier.communicationUserId) {\n return undefined;\n }\n\n return { id: identifier.communicationUserId };\n}\n\n/** Convert CommunicationUserIdentifierModel to CommunicationUserIdentifier (Public usage class) */\nexport function communicationUserIdentifierConverter(\n identifier: CommunicationUserIdentifierModel | undefined,\n): CommunicationUserIdentifier | undefined {\n if (!identifier || !identifier.id) {\n return undefined;\n }\n\n return { communicationUserId: identifier.id };\n}\n\n/** Convert MicrosoftTeamsAppIdentifier to MicrosoftTeamsAppIdentifierModel (Internal usage class) */\nexport function microsoftTeamsAppIdentifierModelConverter(\n identifier: MicrosoftTeamsAppIdentifier | undefined,\n): MicrosoftTeamsAppIdentifierModel | undefined {\n if (!identifier || !identifier.teamsAppId) {\n return undefined;\n }\n\n return { appId: identifier.teamsAppId };\n}\n\n/** Convert MicrosoftTeamsAppIdentifierModel to MicrosoftTeamsAppIdentifier (Public usage class) */\nexport function microsoftTeamsAppIdentifierConverter(\n identifier: MicrosoftTeamsAppIdentifierModel | undefined,\n): MicrosoftTeamsAppIdentifier | undefined {\n if (!identifier || !identifier.appId) {\n return undefined;\n }\n\n return { teamsAppId: identifier.appId };\n}\n"]}
1
+ {"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAwDlC,kFAUC;AAGD,wEAcC;AAGD,4EAsEC;AAGD,sFAoDC;AAGD,4DAUC;AAGD,8FAQC;AAGD,oFAQC;AAGD,8FAQC;AAGD,oFAQC;AA/PD,sEAQqC;AAUrC,wDAAkF;AAGlF,SAAS,WAAW,CAClB,eAA6C;IAE7C,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gDAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,gDAAqC,CAAC,WAAW,CAAC;IAC3D,CAAC;IACD,IAAI,eAAe,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO,gDAAqC,CAAC,kBAAkB,CAAC;IAClE,CAAC;IACD,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gDAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO,gDAAqC,CAAC,kBAAkB,CAAC;IAClE,CAAC;IACD,OAAO,gDAAqC,CAAC,OAAO,CAAC;AACvD,CAAC;AAED,wFAAwF;AACxF,SAAgB,mCAAmC,CACjD,qBAAwD;IAExD,IAAI,qBAAqB,KAAK,SAAS,IAAI,qBAAqB,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC3F,OAAO,SAAS,CAAC;IACnB,CAAC;I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ChB,kBAAkB,KACrB,UAAU,EAAE,kBAAkB,CAAC,UAAU;YACvC,CAAC,CAAC,gCAAgC,CAAC,kBAAkB,CAAC,UAAU,CAAC;YACjE,CAAC,CAAC,SAAS,GACd,CAAC;IACF,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,qGAAqG;AACrG,SAAgB,yCAAyC,CACvD,UAAmD;IAEnD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC;QACnD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,mBAAmB,EAAE,CAAC;AAChD,CAAC;AAED,mGAAmG;AACnG,SAAgB,oCAAoC,CAClD,UAAwD;IAExD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC;AAChD,CAAC;AAED,qGAAqG;AACrG,SAAgB,yCAAyC,CACvD,UAAmD;IAEnD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,CAAC;AAC1C,CAAC;AAED,mGAAmG;AACnG,SAAgB,oCAAoC,CAClD,UAAwD;IAExD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACrC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PhoneNumberIdentifier,\n CommunicationUserIdentifier,\n UnknownIdentifier,\n SerializedPhoneNumberIdentifier,\n CommunicationIdentifier,\n SerializedCommunicationIdentifier,\n MicrosoftTeamsUserIdentifier,\n MicrosoftTeamsAppIdentifier,\n TeamsExtensionUserIdentifier,\n} from \"@azure/communication-common\";\nimport {\n serializeCommunicationIdentifier,\n isCommunicationUserIdentifier,\n isPhoneNumberIdentifier,\n isUnknownIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isMicrosoftTeamsAppIdentifier,\n isTeamsExtensionUserIdentifier,\n} from \"@azure/communication-common\";\nimport type {\n CallParticipantInternal,\n CommunicationIdentifierModel,\n CommunicationIdentifierModelKind,\n KnownCommunicationCloudEnvironmentModel,\n PhoneNumberIdentifierModel,\n CommunicationUserIdentifierModel,\n MicrosoftTeamsAppIdentifierModel,\n} from \"../generated/src/index.js\";\nimport { KnownCommunicationIdentifierModelKind } from \"../generated/src/index.js\";\nimport type { CallParticipant } from \"../models/models.js\";\n\nfunction extractKind(\n identifierModel: CommunicationIdentifierModel,\n): CommunicationIdentifierModelKind {\n if (identifierModel.communicationUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.CommunicationUser;\n }\n if (identifierModel.phoneNumber !== undefined) {\n return KnownCommunicationIdentifierModelKind.PhoneNumber;\n }\n if (identifierModel.microsoftTeamsUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser;\n }\n if (identifierModel.microsoftTeamsApp !== undefined) {\n return KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp;\n }\n if (identifierModel.teamsExtensionUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.TeamsExtensionUser;\n }\n return KnownCommunicationIdentifierModelKind.Unknown;\n}\n\n/** Convert PhoneNumberIdentifier to PhoneNumberIdentifierModel(Internal usage class) */\nexport function PhoneNumberIdentifierModelConverter(\n phoneNumberIdentifier: PhoneNumberIdentifier | undefined,\n): PhoneNumberIdentifierModel | undefined {\n if (phoneNumberIdentifier === undefined || phoneNumberIdentifier.phoneNumber === undefined) {\n return undefined;\n }\n\n const phoneNumberIdentifierModel =\n serializeCommunicationIdentifier(phoneNumberIdentifier).phoneNumber;\n return phoneNumberIdentifierModel;\n}\n\n/** Convert SerializedPhoneNumberIdentifier to PhoneNumberIdentifier(Public usage class) */\nexport function phoneNumberIdentifierConverter(\n serializedPhoneNumberIdentifier: SerializedPhoneNumberIdentifier | undefined,\n): PhoneNumberIdentifier | undefined {\n if (\n serializedPhoneNumberIdentifier === undefined ||\n serializedPhoneNumberIdentifier?.value === null\n ) {\n return undefined;\n }\n\n const phoneNumberIdentifier: PhoneNumberIdentifier = {\n phoneNumber: serializedPhoneNumberIdentifier.value,\n };\n return phoneNumberIdentifier;\n}\n\n/** Convert CommunicationIdentifierModel to CommunicationIdentifier(Public usage class) */\nexport function communicationIdentifierConverter(\n identifierModel: CommunicationIdentifierModel,\n): CommunicationIdentifier {\n const rawId = identifierModel.rawId;\n const kind =\n identifierModel.kind !== undefined ? identifierModel.kind : extractKind(identifierModel);\n\n if (\n kind === KnownCommunicationIdentifierModelKind.CommunicationUser &&\n identifierModel.communicationUser !== undefined\n ) {\n const communicationUserIdentifier: CommunicationUserIdentifier = {\n communicationUserId: identifierModel.communicationUser.id,\n };\n return communicationUserIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.PhoneNumber &&\n identifierModel.phoneNumber !== undefined\n ) {\n const phoneNumberIdentifier: PhoneNumberIdentifier = {\n phoneNumber: identifierModel.phoneNumber.value,\n rawId: rawId,\n };\n return phoneNumberIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser &&\n identifierModel.microsoftTeamsUser !== undefined\n ) {\n const microsoftTeamsUserIdentifier: MicrosoftTeamsUserIdentifier = {\n rawId: rawId,\n microsoftTeamsUserId: identifierModel.microsoftTeamsUser.userId,\n isAnonymous: identifierModel.microsoftTeamsUser.isAnonymous,\n cloud: identifierModel.microsoftTeamsUser.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return microsoftTeamsUserIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp &&\n identifierModel.microsoftTeamsApp !== undefined\n ) {\n const microsoftTeamsAppIdentifier: MicrosoftTeamsAppIdentifier = {\n rawId: rawId,\n teamsAppId: identifierModel.microsoftTeamsApp.appId,\n cloud: identifierModel.microsoftTeamsApp.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return microsoftTeamsAppIdentifier;\n }\n if (\n kind === KnownCommunicationIdentifierModelKind.TeamsExtensionUser &&\n identifierModel.teamsExtensionUser !== undefined\n ) {\n const teamsExtensionUserIdentifier: TeamsExtensionUserIdentifier = {\n rawId: rawId,\n userId: identifierModel.teamsExtensionUser.userId,\n resourceId: identifierModel.teamsExtensionUser.resourceId,\n tenantId: identifierModel.teamsExtensionUser.tenantId,\n cloud: identifierModel.teamsExtensionUser.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return teamsExtensionUserIdentifier;\n }\n\n const unknownIdentifier: UnknownIdentifier = {\n id: rawId ? rawId : \"\",\n };\n return unknownIdentifier;\n}\n\n/** Convert CommunicationIdentifier to CommunicationIdentifierModel(Internal usage class) */\nexport function communicationIdentifierModelConverter(\n identifier: CommunicationIdentifier,\n): CommunicationIdentifierModel {\n const serializedIdentifier: SerializedCommunicationIdentifier =\n serializeCommunicationIdentifier(identifier);\n if (isCommunicationUserIdentifier(identifier)) {\n const communicationUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.CommunicationUser,\n ...serializedIdentifier,\n };\n return communicationUserIdentifierModel;\n }\n\n if (isPhoneNumberIdentifier(identifier)) {\n const phoneNumberIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.PhoneNumber,\n ...serializedIdentifier,\n };\n return phoneNumberIdentifierModel;\n }\n\n if (isMicrosoftTeamsUserIdentifier(identifier)) {\n const microsoftTeamsUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser,\n ...serializedIdentifier,\n };\n return microsoftTeamsUserIdentifierModel;\n }\n\n if (isMicrosoftTeamsAppIdentifier(identifier)) {\n const microsoftTeamsAppIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp,\n ...serializedIdentifier,\n };\n return microsoftTeamsAppIdentifierModel;\n }\n if (isTeamsExtensionUserIdentifier(identifier)) {\n const teamsExtensionUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.TeamsExtensionUser,\n ...serializedIdentifier,\n };\n return teamsExtensionUserIdentifierModel;\n }\n if (isUnknownIdentifier(identifier)) {\n const unknownIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.Unknown,\n ...serializedIdentifier,\n };\n return unknownIdentifierModel;\n }\n\n throw new Error();\n}\n\n/** Convert CallParticipantInternal to CallParticipant */\nexport function callParticipantConverter(\n acsCallParticipant: CallParticipantInternal,\n): CallParticipant {\n const callParticipant: CallParticipant = {\n ...acsCallParticipant,\n identifier: acsCallParticipant.identifier\n ? communicationIdentifierConverter(acsCallParticipant.identifier)\n : undefined,\n };\n return callParticipant;\n}\n\n/** Convert CommunicationUserIdentifier to CommunicationUserIdentifierModel (Internal usage class) */\nexport function communicationUserIdentifierModelConverter(\n identifier: CommunicationUserIdentifier | undefined,\n): CommunicationUserIdentifierModel | undefined {\n if (!identifier || !identifier.communicationUserId) {\n return undefined;\n }\n\n return { id: identifier.communicationUserId };\n}\n\n/** Convert CommunicationUserIdentifierModel to CommunicationUserIdentifier (Public usage class) */\nexport function communicationUserIdentifierConverter(\n identifier: CommunicationUserIdentifierModel | undefined,\n): CommunicationUserIdentifier | undefined {\n if (!identifier || !identifier.id) {\n return undefined;\n }\n\n return { communicationUserId: identifier.id };\n}\n\n/** Convert MicrosoftTeamsAppIdentifier to MicrosoftTeamsAppIdentifierModel (Internal usage class) */\nexport function microsoftTeamsAppIdentifierModelConverter(\n identifier: MicrosoftTeamsAppIdentifier | undefined,\n): MicrosoftTeamsAppIdentifierModel | undefined {\n if (!identifier || !identifier.teamsAppId) {\n return undefined;\n }\n\n return { appId: identifier.teamsAppId };\n}\n\n/** Convert MicrosoftTeamsAppIdentifierModel to MicrosoftTeamsAppIdentifier (Public usage class) */\nexport function microsoftTeamsAppIdentifierConverter(\n identifier: MicrosoftTeamsAppIdentifierModel | undefined,\n): MicrosoftTeamsAppIdentifier | undefined {\n if (!identifier || !identifier.appId) {\n return undefined;\n }\n\n return { teamsAppId: identifier.appId };\n}\n"]}
@@ -1,12 +1,11 @@
1
1
  import type { KeyCredential, TokenCredential } from "@azure/core-auth";
2
2
  import type { CommonClientOptions } from "@azure/core-client";
3
- import type { CommunicationIdentifier, CommunicationUserIdentifier } from "@azure/communication-common";
3
+ import { CommunicationIdentifier, CommunicationUserIdentifier } from "@azure/communication-common";
4
4
  import { CallConnection } from "./callConnection.js";
5
5
  import { CallRecording } from "./callRecording.js";
6
6
  import type { AnswerCallOptions, ConnectCallOptions, CreateCallOptions, RedirectCallOptions, RejectCallOptions } from "./models/options.js";
7
7
  import type { AnswerCallResult, ConnectCallResult, CreateCallResult } from "./models/responses.js";
8
- import { type CallInvite, type CallLocator } from "./models/models.js";
9
- import { CallAutomationEventProcessor } from "./eventprocessor/callAutomationEventProcessor.js";
8
+ import type { CallInvite, CallLocator } from "./models/models.js";
10
9
  /**
11
10
  * Client options used to configure CallAutomation Client API requests.
12
11
  */
@@ -24,7 +23,6 @@ export declare class CallAutomationClient {
24
23
  private readonly sourceIdentity?;
25
24
  private readonly credential;
26
25
  private readonly internalPipelineOptions;
27
- private readonly callAutomationEventProcessor;
28
26
  private readonly endpoint;
29
27
  /**
30
28
  * Initializes a new instance of the CallAutomationClient class.
@@ -53,10 +51,6 @@ export declare class CallAutomationClient {
53
51
  * Get Source Identity that is used for create and answer call
54
52
  */
55
53
  getSourceIdentity(): CommunicationUserIdentifier | undefined;
56
- /**
57
- * Get event processor to work with call automation events
58
- */
59
- getEventProcessor(): CallAutomationEventProcessor;
60
54
  private createCallInternal;
61
55
  /**
62
56
  * Create an outgoing call from source to a target identity.
@@ -94,7 +88,6 @@ export declare class CallAutomationClient {
94
88
  * @param options - Additional request options contains rejectCall api options.
95
89
  */
96
90
  rejectCall(incomingCallContext: string, options?: RejectCallOptions): Promise<void>;
97
- private createCustomCallingContextInternal;
98
91
  /**
99
92
  * Create connection to room call.
100
93
  * @param callLocator - Call locator to create connection.
@@ -1 +1 @@
1
- {"version":3,"file":"callAutomationClient.d.ts","sourceRoot":"","sources":["../../src/callAutomationClient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,6BAA6B,CAAC;AAarC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,WAAW,EAEjB,MAAM,oBAAoB,CAAC;AAY5B,OAAO,EAAE,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAMhG;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE;;OAEG;IACH,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C;AAUD;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAA0B;IAClE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAmC;I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CA+D9B"}
@@ -1,13 +1,13 @@
1
1
  import { __rest } from "tslib";
2
2
  import { isTokenCredential } from "@azure/core-auth";
3
+ import { createCommunicationAuthPolicy, } from "@azure/communication-common";
3
4
  import { parseClientArguments, isKeyCredential } from "@azure/communication-common";
4
5
  import { logger } from "./models/logger.js";
6
+ import { CallAutomationApiClient, } from "./generated/src/index.js";
5
7
  import { CallConnection } from "./callConnection.js";
6
8
  import { CallRecording } from "./callRecording.js";
7
9
  import { communicationIdentifierConverter, communicationIdentifierModelConverter, communicationUserIdentifierConverter, communicationUserIdentifierModelConverter, microsoftTeamsAppIdentifierModelConverter, phoneNumberIdentifierConverter, PhoneNumberIdentifierModelConverter, } from "./utli/converters.js";
8
10
  import { randomUUID } from "@azure/core-util";
9
- import { createCustomCallAutomationApiClient } from "./credential/callAutomationAuthPolicy.js";
10
- import { CallAutomationEventProcessor } from "./eventprocessor/callAutomationEventProcessor.js";
11
11
  /**
12
12
  * Checks whether the type of a value is CallAutomationClientOptions or not.
13
13
  *
@@ -32,11 +32,10 @@ export class CallAutomationClient {
32
32
  });
33
33
  const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);
34
34
  this.endpoint = url;
35
+ const authPolicy = createCommunicationAuthPolicy(credential);
35
36
  this.credential = credential;
36
- // create event processor
37
- this.callAutomationEventProcessor = new CallAutomationEventProcessor();
38
- // create api client (using custom api endpoint if available)
39
- this.callAutomationApiClient = createCustomCallAutomationApiClient(credential, this.internalPipelineOptions, this.endpoint);
37
+ this.callAutomationApiClient = new CallAutomationApiClient(url, this.internalPipelineOptions);
38
+ this.callAutomationApiClient.pipeline.addPolicy(authPolicy);
40
39
  this.sourceIdentity = communicationUserIdentifierModelConverter(options.sourceIdentity);
41
40
  }
42
41
  /**
@@ -44,7 +43,7 @@ export class CallAutomationClient {
44
43
  * @param callConnectionId - The CallConnection id for the CallConnection instance. (ex: 421CONTOSO-cRD6-4RDc-a078-99dRANDOMf).
45
44
  */
46
45
  getCallConnection(callConnectionId) {
47
- return new CallConnection(callConnectionId, this.endpoint, this.credential, this.callAutomationEventProcessor, this.internalPipelineOptions);
46
+ return new CallConnection(callConnectionId, this.endpoint, this.credential, this.internalPipelineOptions);
48
47
  }
49
48
  /**
50
49
  * Initializes a new instance of CallRecording.
@@ -58,12 +57,6 @@ export class CallAutomationClient {
58
57
  getSourceIdentity() {
59
58
  return communicationUserIdentifierConverter(this.sourceIdentity);
60
59
  }
61
- /**
62
- * Get event processor to work with call automation events
63
- */
64
- getEventProcessor() {
65
- return this.callAutomationEventProcessor;
66
- }
67
60
  async createCallInternal(request, options) {
68
61
  const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: randomUUID() });
69
62
  const _a = await this.callAutomationApiClient.createCall(request, optionsInternal), { callConnectionId, answeredBy, targets, sourceCallerIdNumber, source, answeredFor } = _a, result = __rest(_a, ["callConnectionId", "answeredBy", "targets", "sourceCallerIdNumber", "source", "answeredFor"]);
@@ -71,32 +64,10 @@ export class CallAutomationClient {
71
64
  const callConnectionPropertiesDto = Object.assign(Object.assign({}, result), { callConnectionId: callConnectionId, source: source ? communicationIdentifierConverter(source) : undefined, answeredby: communicationUserIdentifierConverter(answeredBy), answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined, targetParticipants: targets === null || targets === void 0 ? void 0 : targets.map((returnedTarget) => communicationIdentifierConverter(returnedTarget)), sourceCallerIdNumber: sourceCallerIdNumber
72
65
  ? phoneNumberIdentifierConverter(sourceCallerIdNumber)
73
66
  : undefined });
74
- const callConnection = new CallConnection(callConnectionId, this.endpoint, this.credential, this.callAutomationEventProcessor, this.internalPipelineOptions);
67
+ const callConnection = new CallConnection(callConnectionId, this.endpoint, this.credential, this.internalPipelineOptions);
75
68
  const createCallResult = {
76
69
  callConnectionProperties: callConnectionPropertiesDto,
77
70
  callConnection: callConnection,
78
- waitForEventProcessor: async (abortSignal, timeoutInMs) => {
79
- const createCallEventResult = {
80
- isSuccess: false,
81
- };
82
- await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
83
- if (event.callConnectionId === callConnectionId && event.kind === "CallConnected") {
84
- createCallEventResult.isSuccess = true;
85
- createCallEventResult.successResult = event;
86
- return true;
87
- }
88
- else if (event.callConnectionId === callConnectionId &&
89
- event.kind === "CreateCallFailed") {
90
- createCallEventResult.isSuccess = false;
91
- createCallEventResult.failureResult = event;
92
- return true;
93
- }
94
- else {
95
- return false;
96
- }
97
- }, abortSignal, timeoutInMs);
98
- return createCallEventResult;
99
- },
100
71
  };
101
72
  return createCallResult;
102
73
  }
@@ -118,7 +89,6 @@ export class CallAutomationClient {
118
89
  callIntelligenceOptions: options.callIntelligenceOptions,
119
90
  mediaStreamingOptions: options.mediaStreamingOptions,
120
91
  transcriptionOptions: options.transcriptionOptions,
121
- customCallingContext: this.createCustomCallingContextInternal(targetParticipant.customCallingContext),
122
92
  sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(targetParticipant.sourceCallIdNumber),
123
93
  sourceDisplayName: targetParticipant.sourceDisplayName,
124
94
  };
@@ -160,7 +130,6 @@ export class CallAutomationClient {
160
130
  mediaStreamingOptions: mediaStreamingOptions,
161
131
  transcriptionOptions: transcriptionOptions,
162
132
  callIntelligenceOptions: callIntelligenceOptions,
163
- customCallingContext: this.createCustomCallingContextInternal(options.customCallingContext),
164
133
  operationContext: operationContext,
165
134
  callbackUri: callbackUrl,
166
135
  answeredBy: this.sourceIdentity,
@@ -171,31 +140,10 @@ export class CallAutomationClient {
171
140
  const callConnectionProperties = Object.assign(Object.assign({}, result), { callConnectionId: callConnectionId, source: source ? communicationIdentifierConverter(source) : undefined, answeredby: communicationUserIdentifierConverter(answeredBy), answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined, targetParticipants: targets === null || targets === void 0 ? void 0 : targets.map((target) => communicationIdentifierConverter(target)), sourceCallerIdNumber: sourceCallerIdNumber
172
141
  ? phoneNumberIdentifierConverter(sourceCallerIdNumber)
173
142
  : undefined });
174
- const callConnection = new CallConnection(callConnectionId, this.endpoint, this.credential, this.callAutomationEventProcessor, this.internalPipelineOptions);
143
+ const callConnection = new CallConnection(callConnectionId, this.endpoint, this.credential, this.internalPipelineOptions);
175
144
  const answerCallResult = {
176
145
  callConnectionProperties: callConnectionProperties,
177
146
  callConnection: callConnection,
178
- waitForEventProcessor: async (abortSignal, timeoutInMs) => {
179
- const answerCallEventResult = {
180
- isSuccess: false,
181
- };
182
- await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
183
- if (event.callConnectionId === callConnectionId && event.kind === "CallConnected") {
184
- answerCallEventResult.isSuccess = true;
185
- answerCallEventResult.successResult = event;
186
- return true;
187
- }
188
- if (event.callConnectionId === callConnectionId && event.kind === "AnswerFailed") {
189
- answerCallEventResult.isSuccess = false;
190
- answerCallEventResult.failureResult = event;
191
- return true;
192
- }
193
- else {
194
- return false;
195
- }
196
- }, abortSignal, timeoutInMs);
197
- return answerCallEventResult;
198
- },
199
147
  };
200
148
  return answerCallResult;
201
149
  }
@@ -212,7 +160,6 @@ export class CallAutomationClient {
212
160
  const request = {
213
161
  incomingCallContext: incomingCallContext,
214
162
  target: communicationIdentifierModelConverter(targetParticipant.targetParticipant),
215
- customCallingContext: this.createCustomCallingContextInternal(targetParticipant.customCallingContext),
216
163
  };
217
164
  const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: randomUUID() });
218
165
  return this.callAutomationApiClient.redirectCall(request, optionsInternal);
@@ -231,29 +178,6 @@ export class CallAutomationClient {
231
178
  const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: randomUUID() });
232
179
  return this.callAutomationApiClient.rejectCall(request, optionsInternal);
233
180
  }
234
- createCustomCallingContextInternal(customCallingContext) {
235
- const sipHeaders = {};
236
- const voipHeaders = {};
237
- if (customCallingContext) {
238
- for (const header of customCallingContext) {
239
- if (header.kind === "sipuui") {
240
- sipHeaders[`User-To-User`] = header.value;
241
- }
242
- else if (header.kind === "sipx") {
243
- if (header.sipHeaderPrefix === "X-") {
244
- sipHeaders[`X-${header.key}`] = header.value;
245
- }
246
- else {
247
- sipHeaders[`X-MS-Custom-${header.key}`] = header.value;
248
- }
249
- }
250
- else if (header.kind === "voip") {
251
- voipHeaders[`${header.key}`] = header.value;
252
- }
253
- }
254
- }
255
- return { sipHeaders: sipHeaders, voipHeaders: voipHeaders };
256
- }
257
181
  /**
258
182
  * Create connection to room call.
259
183
  * @param callLocator - Call locator to create connection.
@@ -287,31 +211,10 @@ export class CallAutomationClient {
287
211
  const callConnectionProperties = Object.assign(Object.assign({}, result), { callConnectionId: callConnectionId, source: source ? communicationIdentifierConverter(source) : undefined, answeredby: answeredBy ? communicationUserIdentifierConverter(answeredBy) : undefined, targetParticipants: targets === null || targets === void 0 ? void 0 : targets.map((target) => communicationIdentifierConverter(target)), answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined, sourceCallerIdNumber: sourceCallerIdNumber
288
212
  ? phoneNumberIdentifierConverter(sourceCallerIdNumber)
289
213
  : undefined });
290
- const callConnection = new CallConnection(callConnectionId, this.callAutomationApiClient.endpoint, this.credential, this.callAutomationEventProcessor, this.internalPipelineOptions);
214
+ const callConnection = new CallConnection(callConnectionId, this.callAutomationApiClient.endpoint, this.credential, this.internalPipelineOptions);
291
215
  const connectResult = {
292
216
  callConnectionProperties: callConnectionProperties,
293
217
  callConnection: callConnection,
294
- waitForEventProcessor: async (abortSignal, timeoutInMs) => {
295
- const connectCallEventResult = {
296
- isSuccess: false,
297
- };
298
- await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
299
- if (event.callConnectionId === callConnectionId && event.kind === "CallConnected") {
300
- connectCallEventResult.isSuccess = true;
301
- connectCallEventResult.successResult = event;
302
- return true;
303
- }
304
- if (event.callConnectionId === callConnectionId && event.kind === "ConnectFailed") {
305
- connectCallEventResult.isSuccess = false;
306
- connectCallEventResult.failureResult = event;
307
- return true;
308
- }
309
- else {
310
- return false;
311
- }
312
- }, abortSignal, timeoutInMs);
313
- return connectCallEventResult;
314
- },
315
218
  };
316
219
  return connectResult;
317
220
  }