@azure/communication-call-automation 1.5.0-beta.1 → 1.6.0-alpha.20250711.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 (415) hide show
  1. package/README.md +51 -1
  2. package/dist/browser/callAutomationClient.d.ts +9 -2
  3. package/dist/browser/callAutomationClient.d.ts.map +1 -1
  4. package/dist/browser/callAutomationClient.js +115 -10
  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 +47 -1
  8. package/dist/browser/callAutomationEventParser.js.map +1 -1
  9. package/dist/browser/callConnection.d.ts +16 -6
  10. package/dist/browser/callConnection.d.ts.map +1 -1
  11. package/dist/browser/callConnection.js +166 -15
  12. package/dist/browser/callConnection.js.map +1 -1
  13. package/dist/browser/callMedia.d.ts +20 -10
  14. package/dist/browser/callMedia.d.ts.map +1 -1
  15. package/dist/browser/callMedia.js +190 -22
  16. package/dist/browser/callMedia.js.map +1 -1
  17. package/dist/browser/callRecording.d.ts +8 -2
  18. package/dist/browser/callRecording.d.ts.map +1 -1
  19. package/dist/browser/callRecording.js +20 -5
  20. package/dist/browser/callRecording.js.map +1 -1
  21. package/dist/browser/eventprocessor/callAutomationEventProcessor.d.ts +39 -0
  22. package/dist/browser/eventprocessor/callAutomationEventProcessor.d.ts.map +1 -0
  23. package/dist/browser/eventprocessor/callAutomationEventProcessor.js +137 -0
  24. package/dist/browser/eventprocessor/callAutomationEventProcessor.js.map +1 -0
  25. package/dist/browser/eventprocessor/eventResponses.d.ts +134 -0
  26. package/dist/browser/eventprocessor/eventResponses.d.ts.map +1 -0
  27. package/dist/browser/eventprocessor/eventResponses.js +4 -0
  28. package/dist/browser/eventprocessor/eventResponses.js.map +1 -0
  29. package/dist/browser/generated/src/callAutomationApiClient.d.ts +2 -1
  30. package/dist/browser/generated/src/callAutomationApiClient.d.ts.map +1 -1
  31. package/dist/browser/generated/src/callAutomationApiClient.js +4 -3
  32. package/dist/browser/generated/src/callAutomationApiClient.js.map +1 -1
  33. package/dist/browser/generated/src/models/index.d.ts +971 -206
  34. package/dist/browser/generated/src/models/index.d.ts.map +1 -1
  35. package/dist/browser/generated/src/models/index.js +124 -46
  36. package/dist/browser/generated/src/models/index.js.map +1 -1
  37. package/dist/browser/generated/src/models/mappers.d.ts +59 -11
  38. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
  39. package/dist/browser/generated/src/models/mappers.js +2122 -466
  40. package/dist/browser/generated/src/models/mappers.js.map +1 -1
  41. package/dist/browser/generated/src/models/parameters.d.ts +8 -1
  42. package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
  43. package/dist/browser/generated/src/models/parameters.js +45 -6
  44. package/dist/browser/generated/src/models/parameters.js.map +1 -1
  45. package/dist/browser/generated/src/operations/callConnection.d.ts +16 -2
  46. package/dist/browser/generated/src/operations/callConnection.d.ts.map +1 -1
  47. package/dist/browser/generated/src/operations/callConnection.js +65 -1
  48. package/dist/browser/generated/src/operations/callConnection.js.map +1 -1
  49. package/dist/browser/generated/src/operations/callDialog.d.ts +35 -0
  50. package/dist/browser/generated/src/operations/callDialog.d.ts.map +1 -0
  51. package/dist/browser/generated/src/operations/callDialog.js +111 -0
  52. package/dist/browser/generated/src/operations/callDialog.js.map +1 -0
  53. package/dist/browser/generated/src/operations/callMedia.d.ts +15 -8
  54. package/dist/browser/generated/src/operations/callMedia.d.ts.map +1 -1
  55. package/dist/browser/generated/src/operations/callMedia.js +50 -25
  56. package/dist/browser/generated/src/operations/callMedia.js.map +1 -1
  57. package/dist/browser/generated/src/operations/callRecording.d.ts +7 -1
  58. package/dist/browser/generated/src/operations/callRecording.d.ts.map +1 -1
  59. package/dist/browser/generated/src/operations/callRecording.js +24 -0
  60. package/dist/browser/generated/src/operations/callRecording.js.map +1 -1
  61. package/dist/browser/generated/src/operations/index.d.ts +1 -0
  62. package/dist/browser/generated/src/operations/index.d.ts.map +1 -1
  63. package/dist/browser/generated/src/operations/index.js +1 -0
  64. package/dist/browser/generated/src/operations/index.js.map +1 -1
  65. package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts +16 -2
  66. package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  67. package/dist/browser/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  68. package/dist/browser/generated/src/operationsInterfaces/callDialog.d.ts +27 -0
  69. package/dist/browser/generated/src/operationsInterfaces/callDialog.d.ts.map +1 -0
  70. package/dist/browser/generated/src/operationsInterfaces/callDialog.js +9 -0
  71. package/dist/browser/generated/src/operationsInterfaces/callDialog.js.map +1 -0
  72. package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts +15 -8
  73. package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  74. package/dist/browser/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  75. package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts +7 -1
  76. package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
  77. package/dist/browser/generated/src/operationsInterfaces/callRecording.js.map +1 -1
  78. package/dist/browser/generated/src/operationsInterfaces/index.d.ts +1 -0
  79. package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -1
  80. package/dist/browser/generated/src/operationsInterfaces/index.js +1 -0
  81. package/dist/browser/generated/src/operationsInterfaces/index.js.map +1 -1
  82. package/dist/browser/index.d.ts +2 -0
  83. package/dist/browser/index.d.ts.map +1 -1
  84. package/dist/browser/index.js +2 -0
  85. package/dist/browser/index.js.map +1 -1
  86. package/dist/browser/models/constants.js +1 -1
  87. package/dist/browser/models/constants.js.map +1 -1
  88. package/dist/browser/models/events.d.ts +188 -62
  89. package/dist/browser/models/events.d.ts.map +1 -1
  90. package/dist/browser/models/events.js.map +1 -1
  91. package/dist/browser/models/models.d.ts +85 -7
  92. package/dist/browser/models/models.d.ts.map +1 -1
  93. package/dist/browser/models/models.js +3 -1
  94. package/dist/browser/models/models.js.map +1 -1
  95. package/dist/browser/models/options.d.ts +49 -2
  96. package/dist/browser/models/options.d.ts.map +1 -1
  97. package/dist/browser/models/options.js.map +1 -1
  98. package/dist/browser/models/responses.d.ts +82 -10
  99. package/dist/browser/models/responses.d.ts.map +1 -1
  100. package/dist/browser/models/responses.js.map +1 -1
  101. package/dist/browser/utli/converters.d.ts +26 -2
  102. package/dist/browser/utli/converters.d.ts.map +1 -1
  103. package/dist/browser/utli/converters.js +114 -19
  104. package/dist/browser/utli/converters.js.map +1 -1
  105. package/dist/commonjs/callAutomationClient.d.ts +9 -2
  106. package/dist/commonjs/callAutomationClient.d.ts.map +1 -1
  107. package/dist/commonjs/callAutomationClient.js +116 -11
  108. package/dist/commonjs/callAutomationClient.js.map +1 -1
  109. package/dist/commonjs/callAutomationEventParser.d.ts.map +1 -1
  110. package/dist/commonjs/callAutomationEventParser.js +46 -0
  111. package/dist/commonjs/callAutomationEventParser.js.map +1 -1
  112. package/dist/commonjs/callConnection.d.ts +16 -6
  113. package/dist/commonjs/callConnection.d.ts.map +1 -1
  114. package/dist/commonjs/callConnection.js +167 -16
  115. package/dist/commonjs/callConnection.js.map +1 -1
  116. package/dist/commonjs/callMedia.d.ts +20 -10
  117. package/dist/commonjs/callMedia.d.ts.map +1 -1
  118. package/dist/commonjs/callMedia.js +209 -41
  119. package/dist/commonjs/callMedia.js.map +1 -1
  120. package/dist/commonjs/callRecording.d.ts +8 -2
  121. package/dist/commonjs/callRecording.d.ts.map +1 -1
  122. package/dist/commonjs/callRecording.js +20 -5
  123. package/dist/commonjs/callRecording.js.map +1 -1
  124. package/dist/commonjs/eventprocessor/callAutomationEventProcessor.d.ts +39 -0
  125. package/dist/commonjs/eventprocessor/callAutomationEventProcessor.d.ts.map +1 -0
  126. package/dist/commonjs/eventprocessor/callAutomationEventProcessor.js +141 -0
  127. package/dist/commonjs/eventprocessor/callAutomationEventProcessor.js.map +1 -0
  128. package/dist/commonjs/eventprocessor/eventResponses.d.ts +134 -0
  129. package/dist/commonjs/eventprocessor/eventResponses.d.ts.map +1 -0
  130. package/dist/commonjs/eventprocessor/eventResponses.js +5 -0
  131. package/dist/commonjs/eventprocessor/eventResponses.js.map +1 -0
  132. package/dist/commonjs/generated/src/callAutomationApiClient.d.ts +2 -1
  133. package/dist/commonjs/generated/src/callAutomationApiClient.d.ts.map +1 -1
  134. package/dist/commonjs/generated/src/callAutomationApiClient.js +3 -2
  135. package/dist/commonjs/generated/src/callAutomationApiClient.js.map +1 -1
  136. package/dist/commonjs/generated/src/models/index.d.ts +971 -206
  137. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
  138. package/dist/commonjs/generated/src/models/index.js +125 -47
  139. package/dist/commonjs/generated/src/models/index.js.map +1 -1
  140. package/dist/commonjs/generated/src/models/mappers.d.ts +59 -11
  141. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
  142. package/dist/commonjs/generated/src/models/mappers.js +2125 -469
  143. package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
  144. package/dist/commonjs/generated/src/models/parameters.d.ts +8 -1
  145. package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
  146. package/dist/commonjs/generated/src/models/parameters.js +45 -6
  147. package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
  148. package/dist/commonjs/generated/src/operations/callConnection.d.ts +16 -2
  149. package/dist/commonjs/generated/src/operations/callConnection.d.ts.map +1 -1
  150. package/dist/commonjs/generated/src/operations/callConnection.js +65 -1
  151. package/dist/commonjs/generated/src/operations/callConnection.js.map +1 -1
  152. package/dist/commonjs/generated/src/operations/callDialog.d.ts +35 -0
  153. package/dist/commonjs/generated/src/operations/callDialog.d.ts.map +1 -0
  154. package/dist/commonjs/generated/src/operations/callDialog.js +116 -0
  155. package/dist/commonjs/generated/src/operations/callDialog.js.map +1 -0
  156. package/dist/commonjs/generated/src/operations/callMedia.d.ts +15 -8
  157. package/dist/commonjs/generated/src/operations/callMedia.d.ts.map +1 -1
  158. package/dist/commonjs/generated/src/operations/callMedia.js +50 -25
  159. package/dist/commonjs/generated/src/operations/callMedia.js.map +1 -1
  160. package/dist/commonjs/generated/src/operations/callRecording.d.ts +7 -1
  161. package/dist/commonjs/generated/src/operations/callRecording.d.ts.map +1 -1
  162. package/dist/commonjs/generated/src/operations/callRecording.js +24 -0
  163. package/dist/commonjs/generated/src/operations/callRecording.js.map +1 -1
  164. package/dist/commonjs/generated/src/operations/index.d.ts +1 -0
  165. package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -1
  166. package/dist/commonjs/generated/src/operations/index.js +1 -0
  167. package/dist/commonjs/generated/src/operations/index.js.map +1 -1
  168. package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts +16 -2
  169. package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  170. package/dist/commonjs/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  171. package/dist/commonjs/generated/src/operationsInterfaces/callDialog.d.ts +27 -0
  172. package/dist/commonjs/generated/src/operationsInterfaces/callDialog.d.ts.map +1 -0
  173. package/dist/commonjs/generated/src/operationsInterfaces/callDialog.js +10 -0
  174. package/dist/commonjs/generated/src/operationsInterfaces/callDialog.js.map +1 -0
  175. package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts +15 -8
  176. package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  177. package/dist/commonjs/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  178. package/dist/commonjs/generated/src/operationsInterfaces/callRecording.d.ts +7 -1
  179. package/dist/commonjs/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
  180. package/dist/commonjs/generated/src/operationsInterfaces/callRecording.js.map +1 -1
  181. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +1 -0
  182. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -1
  183. package/dist/commonjs/generated/src/operationsInterfaces/index.js +1 -0
  184. package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -1
  185. package/dist/commonjs/index.d.ts +2 -0
  186. package/dist/commonjs/index.d.ts.map +1 -1
  187. package/dist/commonjs/index.js +2 -0
  188. package/dist/commonjs/index.js.map +1 -1
  189. package/dist/commonjs/models/constants.js +1 -1
  190. package/dist/commonjs/models/constants.js.map +1 -1
  191. package/dist/commonjs/models/events.d.ts +188 -62
  192. package/dist/commonjs/models/events.d.ts.map +1 -1
  193. package/dist/commonjs/models/events.js.map +1 -1
  194. package/dist/commonjs/models/models.d.ts +85 -7
  195. package/dist/commonjs/models/models.d.ts.map +1 -1
  196. package/dist/commonjs/models/models.js +11 -6
  197. package/dist/commonjs/models/models.js.map +1 -1
  198. package/dist/commonjs/models/options.d.ts +49 -2
  199. package/dist/commonjs/models/options.d.ts.map +1 -1
  200. package/dist/commonjs/models/options.js.map +1 -1
  201. package/dist/commonjs/models/responses.d.ts +82 -10
  202. package/dist/commonjs/models/responses.d.ts.map +1 -1
  203. package/dist/commonjs/models/responses.js.map +1 -1
  204. package/dist/commonjs/tsdoc-metadata.json +1 -1
  205. package/dist/commonjs/utli/converters.d.ts +26 -2
  206. package/dist/commonjs/utli/converters.d.ts.map +1 -1
  207. package/dist/commonjs/utli/converters.js +119 -18
  208. package/dist/commonjs/utli/converters.js.map +1 -1
  209. package/dist/esm/callAutomationClient.d.ts +9 -2
  210. package/dist/esm/callAutomationClient.d.ts.map +1 -1
  211. package/dist/esm/callAutomationClient.js +115 -10
  212. package/dist/esm/callAutomationClient.js.map +1 -1
  213. package/dist/esm/callAutomationEventParser.d.ts.map +1 -1
  214. package/dist/esm/callAutomationEventParser.js +47 -1
  215. package/dist/esm/callAutomationEventParser.js.map +1 -1
  216. package/dist/esm/callConnection.d.ts +16 -6
  217. package/dist/esm/callConnection.d.ts.map +1 -1
  218. package/dist/esm/callConnection.js +166 -15
  219. package/dist/esm/callConnection.js.map +1 -1
  220. package/dist/esm/callMedia.d.ts +20 -10
  221. package/dist/esm/callMedia.d.ts.map +1 -1
  222. package/dist/esm/callMedia.js +190 -22
  223. package/dist/esm/callMedia.js.map +1 -1
  224. package/dist/esm/callRecording.d.ts +8 -2
  225. package/dist/esm/callRecording.d.ts.map +1 -1
  226. package/dist/esm/callRecording.js +20 -5
  227. package/dist/esm/callRecording.js.map +1 -1
  228. package/dist/esm/eventprocessor/callAutomationEventProcessor.d.ts +39 -0
  229. package/dist/esm/eventprocessor/callAutomationEventProcessor.d.ts.map +1 -0
  230. package/dist/esm/eventprocessor/callAutomationEventProcessor.js +137 -0
  231. package/dist/esm/eventprocessor/callAutomationEventProcessor.js.map +1 -0
  232. package/dist/esm/eventprocessor/eventResponses.d.ts +134 -0
  233. package/dist/esm/eventprocessor/eventResponses.d.ts.map +1 -0
  234. package/dist/esm/eventprocessor/eventResponses.js +4 -0
  235. package/dist/esm/eventprocessor/eventResponses.js.map +1 -0
  236. package/dist/esm/generated/src/callAutomationApiClient.d.ts +2 -1
  237. package/dist/esm/generated/src/callAutomationApiClient.d.ts.map +1 -1
  238. package/dist/esm/generated/src/callAutomationApiClient.js +4 -3
  239. package/dist/esm/generated/src/callAutomationApiClient.js.map +1 -1
  240. package/dist/esm/generated/src/models/index.d.ts +971 -206
  241. package/dist/esm/generated/src/models/index.d.ts.map +1 -1
  242. package/dist/esm/generated/src/models/index.js +124 -46
  243. package/dist/esm/generated/src/models/index.js.map +1 -1
  244. package/dist/esm/generated/src/models/mappers.d.ts +59 -11
  245. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
  246. package/dist/esm/generated/src/models/mappers.js +2122 -466
  247. package/dist/esm/generated/src/models/mappers.js.map +1 -1
  248. package/dist/esm/generated/src/models/parameters.d.ts +8 -1
  249. package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
  250. package/dist/esm/generated/src/models/parameters.js +45 -6
  251. package/dist/esm/generated/src/models/parameters.js.map +1 -1
  252. package/dist/esm/generated/src/operations/callConnection.d.ts +16 -2
  253. package/dist/esm/generated/src/operations/callConnection.d.ts.map +1 -1
  254. package/dist/esm/generated/src/operations/callConnection.js +65 -1
  255. package/dist/esm/generated/src/operations/callConnection.js.map +1 -1
  256. package/dist/esm/generated/src/operations/callDialog.d.ts +35 -0
  257. package/dist/esm/generated/src/operations/callDialog.d.ts.map +1 -0
  258. package/dist/esm/generated/src/operations/callDialog.js +111 -0
  259. package/dist/esm/generated/src/operations/callDialog.js.map +1 -0
  260. package/dist/esm/generated/src/operations/callMedia.d.ts +15 -8
  261. package/dist/esm/generated/src/operations/callMedia.d.ts.map +1 -1
  262. package/dist/esm/generated/src/operations/callMedia.js +50 -25
  263. package/dist/esm/generated/src/operations/callMedia.js.map +1 -1
  264. package/dist/esm/generated/src/operations/callRecording.d.ts +7 -1
  265. package/dist/esm/generated/src/operations/callRecording.d.ts.map +1 -1
  266. package/dist/esm/generated/src/operations/callRecording.js +24 -0
  267. package/dist/esm/generated/src/operations/callRecording.js.map +1 -1
  268. package/dist/esm/generated/src/operations/index.d.ts +1 -0
  269. package/dist/esm/generated/src/operations/index.d.ts.map +1 -1
  270. package/dist/esm/generated/src/operations/index.js +1 -0
  271. package/dist/esm/generated/src/operations/index.js.map +1 -1
  272. package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts +16 -2
  273. package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  274. package/dist/esm/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  275. package/dist/esm/generated/src/operationsInterfaces/callDialog.d.ts +27 -0
  276. package/dist/esm/generated/src/operationsInterfaces/callDialog.d.ts.map +1 -0
  277. package/dist/esm/generated/src/operationsInterfaces/callDialog.js +9 -0
  278. package/dist/esm/generated/src/operationsInterfaces/callDialog.js.map +1 -0
  279. package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts +15 -8
  280. package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  281. package/dist/esm/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  282. package/dist/esm/generated/src/operationsInterfaces/callRecording.d.ts +7 -1
  283. package/dist/esm/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
  284. package/dist/esm/generated/src/operationsInterfaces/callRecording.js.map +1 -1
  285. package/dist/esm/generated/src/operationsInterfaces/index.d.ts +1 -0
  286. package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -1
  287. package/dist/esm/generated/src/operationsInterfaces/index.js +1 -0
  288. package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -1
  289. package/dist/esm/index.d.ts +2 -0
  290. package/dist/esm/index.d.ts.map +1 -1
  291. package/dist/esm/index.js +2 -0
  292. package/dist/esm/index.js.map +1 -1
  293. package/dist/esm/models/constants.js +1 -1
  294. package/dist/esm/models/constants.js.map +1 -1
  295. package/dist/esm/models/events.d.ts +188 -62
  296. package/dist/esm/models/events.d.ts.map +1 -1
  297. package/dist/esm/models/events.js.map +1 -1
  298. package/dist/esm/models/models.d.ts +85 -7
  299. package/dist/esm/models/models.d.ts.map +1 -1
  300. package/dist/esm/models/models.js +3 -1
  301. package/dist/esm/models/models.js.map +1 -1
  302. package/dist/esm/models/options.d.ts +49 -2
  303. package/dist/esm/models/options.d.ts.map +1 -1
  304. package/dist/esm/models/options.js.map +1 -1
  305. package/dist/esm/models/responses.d.ts +82 -10
  306. package/dist/esm/models/responses.d.ts.map +1 -1
  307. package/dist/esm/models/responses.js.map +1 -1
  308. package/dist/esm/utli/converters.d.ts +26 -2
  309. package/dist/esm/utli/converters.d.ts.map +1 -1
  310. package/dist/esm/utli/converters.js +114 -19
  311. package/dist/esm/utli/converters.js.map +1 -1
  312. package/dist/react-native/callAutomationClient.d.ts +9 -2
  313. package/dist/react-native/callAutomationClient.d.ts.map +1 -1
  314. package/dist/react-native/callAutomationClient.js +115 -10
  315. package/dist/react-native/callAutomationClient.js.map +1 -1
  316. package/dist/react-native/callAutomationEventParser.d.ts.map +1 -1
  317. package/dist/react-native/callAutomationEventParser.js +47 -1
  318. package/dist/react-native/callAutomationEventParser.js.map +1 -1
  319. package/dist/react-native/callConnection.d.ts +16 -6
  320. package/dist/react-native/callConnection.d.ts.map +1 -1
  321. package/dist/react-native/callConnection.js +166 -15
  322. package/dist/react-native/callConnection.js.map +1 -1
  323. package/dist/react-native/callMedia.d.ts +20 -10
  324. package/dist/react-native/callMedia.d.ts.map +1 -1
  325. package/dist/react-native/callMedia.js +190 -22
  326. package/dist/react-native/callMedia.js.map +1 -1
  327. package/dist/react-native/callRecording.d.ts +8 -2
  328. package/dist/react-native/callRecording.d.ts.map +1 -1
  329. package/dist/react-native/callRecording.js +20 -5
  330. package/dist/react-native/callRecording.js.map +1 -1
  331. package/dist/react-native/eventprocessor/callAutomationEventProcessor.d.ts +39 -0
  332. package/dist/react-native/eventprocessor/callAutomationEventProcessor.d.ts.map +1 -0
  333. package/dist/react-native/eventprocessor/callAutomationEventProcessor.js +137 -0
  334. package/dist/react-native/eventprocessor/callAutomationEventProcessor.js.map +1 -0
  335. package/dist/react-native/eventprocessor/eventResponses.d.ts +134 -0
  336. package/dist/react-native/eventprocessor/eventResponses.d.ts.map +1 -0
  337. package/dist/react-native/eventprocessor/eventResponses.js +4 -0
  338. package/dist/react-native/eventprocessor/eventResponses.js.map +1 -0
  339. package/dist/react-native/generated/src/callAutomationApiClient.d.ts +2 -1
  340. package/dist/react-native/generated/src/callAutomationApiClient.d.ts.map +1 -1
  341. package/dist/react-native/generated/src/callAutomationApiClient.js +4 -3
  342. package/dist/react-native/generated/src/callAutomationApiClient.js.map +1 -1
  343. package/dist/react-native/generated/src/models/index.d.ts +971 -206
  344. package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
  345. package/dist/react-native/generated/src/models/index.js +124 -46
  346. package/dist/react-native/generated/src/models/index.js.map +1 -1
  347. package/dist/react-native/generated/src/models/mappers.d.ts +59 -11
  348. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
  349. package/dist/react-native/generated/src/models/mappers.js +2122 -466
  350. package/dist/react-native/generated/src/models/mappers.js.map +1 -1
  351. package/dist/react-native/generated/src/models/parameters.d.ts +8 -1
  352. package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
  353. package/dist/react-native/generated/src/models/parameters.js +45 -6
  354. package/dist/react-native/generated/src/models/parameters.js.map +1 -1
  355. package/dist/react-native/generated/src/operations/callConnection.d.ts +16 -2
  356. package/dist/react-native/generated/src/operations/callConnection.d.ts.map +1 -1
  357. package/dist/react-native/generated/src/operations/callConnection.js +65 -1
  358. package/dist/react-native/generated/src/operations/callConnection.js.map +1 -1
  359. package/dist/react-native/generated/src/operations/callDialog.d.ts +35 -0
  360. package/dist/react-native/generated/src/operations/callDialog.d.ts.map +1 -0
  361. package/dist/react-native/generated/src/operations/callDialog.js +111 -0
  362. package/dist/react-native/generated/src/operations/callDialog.js.map +1 -0
  363. package/dist/react-native/generated/src/operations/callMedia.d.ts +15 -8
  364. package/dist/react-native/generated/src/operations/callMedia.d.ts.map +1 -1
  365. package/dist/react-native/generated/src/operations/callMedia.js +50 -25
  366. package/dist/react-native/generated/src/operations/callMedia.js.map +1 -1
  367. package/dist/react-native/generated/src/operations/callRecording.d.ts +7 -1
  368. package/dist/react-native/generated/src/operations/callRecording.d.ts.map +1 -1
  369. package/dist/react-native/generated/src/operations/callRecording.js +24 -0
  370. package/dist/react-native/generated/src/operations/callRecording.js.map +1 -1
  371. package/dist/react-native/generated/src/operations/index.d.ts +1 -0
  372. package/dist/react-native/generated/src/operations/index.d.ts.map +1 -1
  373. package/dist/react-native/generated/src/operations/index.js +1 -0
  374. package/dist/react-native/generated/src/operations/index.js.map +1 -1
  375. package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts +16 -2
  376. package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  377. package/dist/react-native/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  378. package/dist/react-native/generated/src/operationsInterfaces/callDialog.d.ts +27 -0
  379. package/dist/react-native/generated/src/operationsInterfaces/callDialog.d.ts.map +1 -0
  380. package/dist/react-native/generated/src/operationsInterfaces/callDialog.js +9 -0
  381. package/dist/react-native/generated/src/operationsInterfaces/callDialog.js.map +1 -0
  382. package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts +15 -8
  383. package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  384. package/dist/react-native/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  385. package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts +7 -1
  386. package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
  387. package/dist/react-native/generated/src/operationsInterfaces/callRecording.js.map +1 -1
  388. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +1 -0
  389. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -1
  390. package/dist/react-native/generated/src/operationsInterfaces/index.js +1 -0
  391. package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -1
  392. package/dist/react-native/index.d.ts +2 -0
  393. package/dist/react-native/index.d.ts.map +1 -1
  394. package/dist/react-native/index.js +2 -0
  395. package/dist/react-native/index.js.map +1 -1
  396. package/dist/react-native/models/constants.js +1 -1
  397. package/dist/react-native/models/constants.js.map +1 -1
  398. package/dist/react-native/models/events.d.ts +188 -62
  399. package/dist/react-native/models/events.d.ts.map +1 -1
  400. package/dist/react-native/models/events.js.map +1 -1
  401. package/dist/react-native/models/models.d.ts +85 -7
  402. package/dist/react-native/models/models.d.ts.map +1 -1
  403. package/dist/react-native/models/models.js +3 -1
  404. package/dist/react-native/models/models.js.map +1 -1
  405. package/dist/react-native/models/options.d.ts +49 -2
  406. package/dist/react-native/models/options.d.ts.map +1 -1
  407. package/dist/react-native/models/options.js.map +1 -1
  408. package/dist/react-native/models/responses.d.ts +82 -10
  409. package/dist/react-native/models/responses.d.ts.map +1 -1
  410. package/dist/react-native/models/responses.js.map +1 -1
  411. package/dist/react-native/utli/converters.d.ts +26 -2
  412. package/dist/react-native/utli/converters.d.ts.map +1 -1
  413. package/dist/react-native/utli/converters.js +114 -19
  414. package/dist/react-native/utli/converters.js.map +1 -1
  415. package/package.json +16 -22
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PhoneNumberIdentifier,\n CommunicationIdentifier,\n MicrosoftTeamsAppIdentifier,\n} from \"@azure/communication-common\";\nimport type { OperationOptions } from \"@azure/core-client\";\nimport type {\n MediaStreamingOptions,\n TranscriptionOptions,\n CallRejectReason,\n FileSource,\n TextSource,\n SsmlSource,\n DtmfTone,\n RecognitionChoice,\n RecordingContent,\n RecordingChannel,\n RecordingFormat,\n RecordingStorage,\n CallLocator,\n ChannelAffinity,\n CallIntelligenceOptions,\n CustomCallingContext,\n} from \"./models.js\";\n\n/** Options to configure the recognize operation. */\nexport interface CallMediaRecognizeOptions extends OperationOptions {\n /** The source of the audio to be played for recognition. */\n playPrompt?: FileSource | TextSource | SsmlSource;\n /** The list source of the audio to be played for recognition. */\n playPrompts?: (FileSource | TextSource | SsmlSource)[];\n /** If set recognize can barge into other existing queued-up/currently-processing requests. */\n interruptCallMediaOperation?: boolean;\n /** @deprecated Not in use, instead use interruptCallMediaOperation for similar functionality*/\n stopCurrentOperations?: boolean;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /** Determines if we interrupt the prompt and start recognizing. */\n interruptPrompt?: boolean;\n /** Time to wait for first input after prompt. */\n initialSilenceTimeoutInSeconds?: number;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/** The recognize configuration specific to Dtmf. */\nexport interface CallMediaRecognizeDtmfOptions extends CallMediaRecognizeOptions {\n /** Time to wait between DTMF inputs to stop recognizing. */\n interToneTimeoutInSeconds?: number;\n /** List of tones that will stop recognizing. */\n stopDtmfTones?: DtmfTone[];\n /** Maximum number of DTMF tones to be collected. */\n maxTonesToCollect?: number;\n readonly kind: \"callMediaRecognizeDtmfOptions\";\n}\n\n/** The recognize configuration specific to Choices. */\nexport interface CallMediaRecognizeChoiceOptions extends CallMediaRecognizeOptions {\n /** The IvR choices for recognize. */\n choices: RecognitionChoice[];\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeChoiceOptions\";\n}\n\n/** The recognize configuration specific to Speech. */\nexport interface CallMediaRecognizeSpeechOptions extends CallMediaRecognizeOptions {\n /** The length of end silence when user stops speaking and cogservice send response. */\n endSilenceTimeoutInSeconds?: number;\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeSpeechOptions\";\n}\n\n/** The recognize configuration for Speech or Dtmf */\nexport interface CallMediaRecognizeSpeechOrDtmfOptions extends CallMediaRecognizeOptions {\n /** The length of end silence when user stops speaking and cogservice send response. */\n endSilenceTimeoutInSeconds?: number;\n /** Time to wait between DTMF inputs to stop recognizing. */\n interToneTimeoutInSeconds?: number;\n /** List of tones that will stop recognizing. */\n stopDtmfTones?: DtmfTone[];\n /** Maximum number of DTMF tones to be collected. */\n maxTonesToCollect?: number;\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeSpeechOrDtmfOptions\";\n}\n\n/**\n * Options to create a call.\n */\nexport interface CreateCallOptions extends OperationOptions {\n /**\n * The source caller Id, a phone number, that's shown to the PSTN participant being invited.\n * Required only when calling a PSTN callee.\n */\n sourceCallIdNumber?: PhoneNumberIdentifier;\n /** Display name of the call if dialing out to a pstn number */\n sourceDisplayName?: string;\n /** The operation context. */\n operationContext?: string;\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n /** Options for Media streaming. */\n mediaStreamingOptions?: MediaStreamingOptions;\n /** Options for live transcription. */\n transcriptionOptions?: TranscriptionOptions;\n /**\n * Overrides default client source by a MicrosoftTeamsAppIdentifier type source.\n * Required for creating call with Teams resource account ID.\n * This is per-operation setting and does not change the client's default source.\n */\n teamsAppSource?: MicrosoftTeamsAppIdentifier;\n}\n\n/**\n * Options to answer a call.\n */\nexport interface AnswerCallOptions extends OperationOptions {\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n /** Options for Media streaming. */\n mediaStreamingOptions?: MediaStreamingOptions;\n /** Options for live transcription. */\n transcriptionOptions?: TranscriptionOptions;\n /** The operation context. */\n operationContext?: string;\n}\n\n/**\n * Options to redirect call.\n */\nexport type RedirectCallOptions = OperationOptions;\n\n/**\n * Options to reject call.\n */\nexport interface RejectCallOptions extends OperationOptions {\n /** The rejection reason. */\n callRejectReason?: CallRejectReason;\n}\n\n/**\n * Options to transfer participants.\n */\nexport interface TransferCallToParticipantOptions extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** Transferee is the participant who is transferred away. */\n transferee?: CommunicationIdentifier;\n /** Used by customer to send custom context to targets. */\n customCallingContext?: CustomCallingContext;\n /** The source caller Id, a phone number, that's will be used as the transferor's(Contoso) caller id when transfering a call a pstn target. */\n sourceCallIdNumber?: PhoneNumberIdentifier;\n}\n\n/** Options to add participants. */\nexport interface AddParticipantOptions extends OperationOptions {\n /**\n * Gets or sets the timeout to wait for the invited participant to pickup.\n * The maximum value of this is 180 seconds\n */\n invitationTimeoutInSeconds?: number;\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to remove participants.\n */\nexport interface RemoveParticipantsOption extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to mute participant.\n */\nexport interface MuteParticipantOption extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n}\n\n/**\n * Options to play audio.\n */\nexport interface PlayOptions extends OperationOptions {\n /** Determine if it is looping */\n loop?: boolean;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to playToAll audio.\n */\nexport interface PlayToAllOptions extends PlayOptions {\n /** If set play can barge into other existing queued-up/currently-processing requests. */\n interruptCallMediaOperation?: boolean;\n}\n\n/**\n * Options to get call connection properties.\n */\nexport type GetCallConnectionPropertiesOptions = OperationOptions;\n\n/**\n * Options to hang up the call\n */\nexport type HangUpOptions = OperationOptions;\n\n/**\n * Options to get a participant.\n */\nexport type GetParticipantOptions = OperationOptions;\n\n/**\n * Options to get a start a recording.\n */\nexport interface StartRecordingOptions extends OperationOptions {\n /** The call locator. (Only one of callLocator or callConnectionId to be used) */\n callLocator?: CallLocator;\n /** The call connectionId. (Only one of callLocator or callConnectionId to be used) */\n callConnectionId?: string;\n /** The url to send notifications to. */\n recordingStateCallbackEndpointUrl?: string;\n /** The content type of call recording. */\n recordingContent?: RecordingContent;\n /** The channel type of call recording. */\n recordingChannel?: RecordingChannel;\n /** The format type of call recording. */\n recordingFormat?: RecordingFormat;\n /** Recording storage option. */\n recordingStorage?: RecordingStorage;\n /** Pause on start call recording option. */\n pauseOnStart?: boolean;\n /**\n * The sequential order in which audio channels are assigned to participants in the unmixed recording.\n * When 'recordingChannelType' is set to 'unmixed' and `audioChannelParticipantOrdering` is not specified,\n * the audio channel to participant mapping will be automatically assigned based on the order in which participant\n * first audio was detected. Channel to participant mapping details can be found in the metadata of the recording.\n */\n audioChannelParticipantOrdering?: CommunicationIdentifier[];\n /**\n * The channel affinity of call recording\n * When 'recordingChannelType' is set to 'unmixed', if channelAffinity is not specified, 'channel' will be automatically assigned.\n * Channel-Participant mapping details can be found in the metadata of the recording.\n */\n channelAffinity?: ChannelAffinity[];\n}\n\n/**\n * Options to get a stop a recording.\n */\nexport type StopRecordingOptions = OperationOptions;\n\n/**\n * Options to get a pause a recording.\n */\nexport type PauseRecordingOptions = OperationOptions;\n\n/**\n * Options to get recording properties.\n */\nexport type GetRecordingPropertiesOptions = OperationOptions;\n\n/**\n * Options to resume recording.\n */\nexport type ResumeRecordingOptions = OperationOptions;\n\n/**\n * Options to delete recording.\n */\nexport type DeleteRecordingOptions = OperationOptions;\n\n/**\n * Options to download recording.\n */\nexport interface DownloadRecordingOptions extends OperationOptions {\n /** Offset byte to start download from. */\n offset?: number;\n /** Max content length in bytes. */\n length?: number;\n}\n\n/**\n * Options to continuous Dtmf recognition.\n */\nexport interface ContinuousDtmfRecognitionOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to send Dtmf tones.\n */\nexport interface SendDtmfTonesOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/** Options for cancelling add participant request. */\nexport interface CancelAddParticipantOperationOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to start transcription\n */\nexport interface StartTranscriptionOptions extends OperationOptions {\n /** Defines Locale for the transcription e,g en-US */\n locale?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n}\n\n/**\n * Options to stop transcription\n */\nexport interface StopTranscriptionOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n\n/**\n * Options to hold participant.\n */\nexport interface HoldOptions extends OperationOptions {\n /** A PlaySource representing the source to play. */\n playSource?: FileSource | TextSource | SsmlSource;\n /** Operation Context. */\n operationContext?: string;\n /** Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to Unhold participant.\n */\nexport interface UnholdOptions extends OperationOptions {\n /** Operation Context. */\n operationContext?: string;\n}\n\n/**\n * Options to Connect request.\n */\nexport interface ConnectCallOptions extends OperationOptions {\n /** Used by customers to correlate the request to the response event. */\n operationContext?: string;\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n /** Options for Media streaming. */\n mediaStreamingOptions?: MediaStreamingOptions;\n /** Options for live transcription. */\n transcriptionOptions?: TranscriptionOptions;\n}\n\n/** Options for start media streaming request. */\nexport interface StartMediaStreamingOptions extends OperationOptions {\n /**\n * Set a callback URL that overrides the default callback URI set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n\n/** Options for stop media streaming request. */\nexport interface StopMediaStreamingOptions extends OperationOptions {\n /**\n * Set a callback URL that overrides the default callback URI set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n\n/**\n * Options to update transcription\n */\nexport interface UpdateTranscriptionOptions extends OperationOptions {\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PhoneNumberIdentifier,\n CommunicationIdentifier,\n MicrosoftTeamsAppIdentifier,\n} from \"@azure/communication-common\";\nimport type { OperationOptions } from \"@azure/core-client\";\nimport type {\n MediaStreamingOptions,\n TranscriptionOptions,\n CallRejectReason,\n FileSource,\n TextSource,\n SsmlSource,\n DtmfTone,\n RecognitionChoice,\n RecordingContent,\n RecordingChannel,\n RecordingFormat,\n RecordingStorage,\n CallLocator,\n ChannelAffinity,\n CallIntelligenceOptions,\n CustomCallingContext,\n} from \"./models.js\";\n\n/** Options to configure the recognize operation. */\nexport interface CallMediaRecognizeOptions extends OperationOptions {\n /** The source of the audio to be played for recognition. */\n playPrompt?: FileSource | TextSource | SsmlSource;\n /** The list source of the audio to be played for recognition. */\n playPrompts?: (FileSource | TextSource | SsmlSource)[];\n /** If set recognize can barge into other existing queued-up/currently-processing requests. */\n interruptCallMediaOperation?: boolean;\n /** @deprecated Not in use, instead use interruptCallMediaOperation for similar functionality*/\n stopCurrentOperations?: boolean;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /** Determines if we interrupt the prompt and start recognizing. */\n interruptPrompt?: boolean;\n /** Time to wait for first input after prompt. */\n initialSilenceTimeoutInSeconds?: number;\n /** speechModelEndpointId. */\n speechModelEndpointId?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/** The recognize configuration specific to Dtmf. */\nexport interface CallMediaRecognizeDtmfOptions extends CallMediaRecognizeOptions {\n /** Time to wait between DTMF inputs to stop recognizing. */\n interToneTimeoutInSeconds?: number;\n /** List of tones that will stop recognizing. */\n stopDtmfTones?: DtmfTone[];\n /** Maximum number of DTMF tones to be collected. */\n maxTonesToCollect?: number;\n readonly kind: \"callMediaRecognizeDtmfOptions\";\n}\n\n/** The recognize configuration specific to Choices. */\nexport interface CallMediaRecognizeChoiceOptions extends CallMediaRecognizeOptions {\n /** The IvR choices for recognize. */\n choices: RecognitionChoice[];\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeChoiceOptions\";\n}\n\n/** The recognize configuration specific to Speech. */\nexport interface CallMediaRecognizeSpeechOptions extends CallMediaRecognizeOptions {\n /** The length of end silence when user stops speaking and cogservice send response. */\n endSilenceTimeoutInSeconds?: number;\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeSpeechOptions\";\n}\n\n/** The recognize configuration for Speech or Dtmf */\nexport interface CallMediaRecognizeSpeechOrDtmfOptions extends CallMediaRecognizeOptions {\n /** The length of end silence when user stops speaking and cogservice send response. */\n endSilenceTimeoutInSeconds?: number;\n /** Time to wait between DTMF inputs to stop recognizing. */\n interToneTimeoutInSeconds?: number;\n /** List of tones that will stop recognizing. */\n stopDtmfTones?: DtmfTone[];\n /** Maximum number of DTMF tones to be collected. */\n maxTonesToCollect?: number;\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeSpeechOrDtmfOptions\";\n}\n\n/**\n * Options to create a call.\n */\nexport interface CreateCallOptions extends OperationOptions {\n /**\n * The source caller Id, a phone number, that's shown to the PSTN participant being invited.\n * Required only when calling a PSTN callee.\n */\n sourceCallIdNumber?: PhoneNumberIdentifier;\n /** Display name of the call if dialing out to a pstn number */\n sourceDisplayName?: string;\n /** The operation context. */\n operationContext?: string;\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n /** Options for Media streaming. */\n mediaStreamingOptions?: MediaStreamingOptions;\n /** Options for live transcription. */\n transcriptionOptions?: TranscriptionOptions;\n /** The Custom Context. */\n customCallingContext?: CustomCallingContext;\n /**\n * Overrides default client source by a MicrosoftTeamsAppIdentifier type source.\n * Required for creating call with Teams resource account ID.\n * This is per-operation setting and does not change the client's default source.\n */\n teamsAppSource?: MicrosoftTeamsAppIdentifier;\n}\n\n/**\n * Options to answer a call.\n */\nexport interface AnswerCallOptions extends OperationOptions {\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n /** Used by customer to send custom context to targets. */\n customCallingContext?: CustomCallingContext;\n /** Options for Media streaming. */\n mediaStreamingOptions?: MediaStreamingOptions;\n /** Options for live transcription. */\n transcriptionOptions?: TranscriptionOptions;\n /** The operation context. */\n operationContext?: string;\n}\n\n/**\n * Options to redirect call.\n */\nexport interface RedirectCallOptions extends OperationOptions {\n /** The Custom Context. */\n customCallingContext?: CustomCallingContext;\n}\n\n/**\n * Options to reject call.\n */\nexport interface RejectCallOptions extends OperationOptions {\n /** The rejection reason. */\n callRejectReason?: CallRejectReason;\n}\n\n/**\n * Options to transfer participants.\n */\nexport interface TransferCallToParticipantOptions extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** Transferee is the participant who is transferred away. */\n transferee?: CommunicationIdentifier;\n /** Used by customer to send custom context to targets. */\n customCallingContext?: CustomCallingContext;\n /** The source caller Id, a phone number, that's will be used as the transferor's(Contoso) caller id when transfering a call a pstn target. */\n sourceCallIdNumber?: PhoneNumberIdentifier;\n}\n\n/** Options to add participants. */\nexport interface AddParticipantOptions extends OperationOptions {\n /**\n * Gets or sets the timeout to wait for the invited participant to pickup.\n * The maximum value of this is 180 seconds\n */\n invitationTimeoutInSeconds?: number;\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/** Options to move participants. */\nexport interface MoveParticipantsOptions extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to remove participants.\n */\nexport interface RemoveParticipantsOption extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to mute participant.\n */\nexport interface MuteParticipantOption extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n}\n\n/**\n * Options to play audio.\n */\nexport interface PlayOptions extends OperationOptions {\n /** Determine if it is looping */\n loop?: boolean;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** If set, hold audio will be interrupted, then this request will be played, and then the hold audio will be resumed. */\n interruptHoldAudio?: boolean;\n}\n\n/**\n * Options to playToAll audio.\n */\nexport interface PlayToAllOptions extends PlayOptions {\n /** If set play can barge into other existing queued-up/currently-processing requests. */\n interruptCallMediaOperation?: boolean;\n}\n\n/**\n * Options to get call connection properties.\n */\nexport type GetCallConnectionPropertiesOptions = OperationOptions;\n\n/**\n * Options to hang up the call\n */\nexport type HangUpOptions = OperationOptions;\n\n/**\n * Options to get a participant.\n */\nexport type GetParticipantOptions = OperationOptions;\n\n/**\n * Options to get a start a recording.\n */\nexport interface StartRecordingOptions extends OperationOptions {\n /** The call locator. (Only one of callLocator or callConnectionId to be used) */\n callLocator?: CallLocator;\n /** The call connectionId. (Only one of callLocator or callConnectionId to be used) */\n callConnectionId?: string;\n /** The url to send notifications to. */\n recordingStateCallbackEndpointUrl?: string;\n /** The content type of call recording. */\n recordingContent?: RecordingContent;\n /** The channel type of call recording. */\n recordingChannel?: RecordingChannel;\n /** The format type of call recording. */\n recordingFormat?: RecordingFormat;\n /** Recording storage option. */\n recordingStorage?: RecordingStorage;\n /** Pause on start call recording option. */\n pauseOnStart?: boolean;\n /**\n * The sequential order in which audio channels are assigned to participants in the unmixed recording.\n * When 'recordingChannelType' is set to 'unmixed' and `audioChannelParticipantOrdering` is not specified,\n * the audio channel to participant mapping will be automatically assigned based on the order in which participant\n * first audio was detected. Channel to participant mapping details can be found in the metadata of the recording.\n */\n audioChannelParticipantOrdering?: CommunicationIdentifier[];\n /**\n * The channel affinity of call recording\n * When 'recordingChannelType' is set to 'unmixed', if channelAffinity is not specified, 'channel' will be automatically assigned.\n * Channel-Participant mapping details can be found in the metadata of the recording.\n */\n channelAffinity?: ChannelAffinity[];\n}\n\n/**\n * Options to get a stop a recording.\n */\nexport type StopRecordingOptions = OperationOptions;\n\n/**\n * Options to get a pause a recording.\n */\nexport type PauseRecordingOptions = OperationOptions;\n\n/**\n * Options to get recording properties.\n */\nexport type GetRecordingPropertiesOptions = OperationOptions;\n\n/**\n * Options to get recording result.\n */\nexport type GetRecordingResultOptions = OperationOptions;\n\n/**\n * Options to resume recording.\n */\nexport type ResumeRecordingOptions = OperationOptions;\n\n/**\n * Options to delete recording.\n */\nexport type DeleteRecordingOptions = OperationOptions;\n\n/**\n * Options to download recording.\n */\nexport interface DownloadRecordingOptions extends OperationOptions {\n /** Offset byte to start download from. */\n offset?: number;\n /** Max content length in bytes. */\n length?: number;\n}\n\n/**\n * Options to continuous Dtmf recognition.\n */\nexport interface ContinuousDtmfRecognitionOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to send Dtmf tones.\n */\nexport interface SendDtmfTonesOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/** Options for cancelling add participant request. */\nexport interface CancelAddParticipantOperationOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to start transcription\n */\nexport interface StartTranscriptionOptions extends OperationOptions {\n /** Defines Locale for the transcription e,g en-US */\n locale?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n /**\n * Set a callback URL that overrides the default callback URI set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to stop transcription\n */\nexport interface StopTranscriptionOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URI set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to hold participant.\n */\nexport interface HoldOptions extends OperationOptions {\n /** A PlaySource representing the source to play. */\n playSource?: FileSource | TextSource | SsmlSource;\n /** Operation Context. */\n operationContext?: string;\n /** Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. */\n operationCallbackUri?: string;\n}\n\n/**\n * Options to Unhold participant.\n */\nexport interface UnholdOptions extends OperationOptions {\n /** Operation Context. */\n operationContext?: string;\n}\n\n/**\n * Options to Connect request.\n */\nexport interface ConnectCallOptions extends OperationOptions {\n /** Used by customers to correlate the request to the response event. */\n operationContext?: string;\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n /** Options for Media streaming. */\n mediaStreamingOptions?: MediaStreamingOptions;\n /** Options for live transcription. */\n transcriptionOptions?: TranscriptionOptions;\n}\n\n/** Options for start media streaming request. */\nexport interface StartMediaStreamingOptions extends OperationOptions {\n /**\n * Set a callback URL that overrides the default callback URI set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n\n/** Options for stop media streaming request. */\nexport interface StopMediaStreamingOptions extends OperationOptions {\n /**\n * Set a callback URL that overrides the default callback URI set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n\n/**\n * Options to update transcription\n */\nexport interface UpdateTranscriptionOptions extends OperationOptions {\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URI set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to interrupt audio and announce.\n */\nexport interface InterruptAudioAndAnnounceOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n"]}
@@ -1,25 +1,41 @@
1
1
  import type { CallConnection } from "../callConnection.js";
2
2
  import type { CallConnectionProperties, CallParticipant } from "./models.js";
3
- import { RecordingState, RecordingKind } from "../generated/src/index.js";
3
+ import type { CallSessionEndReason, ErrorModel, RecordingState, RecordingStorageInfo } from "../generated/src/index.js";
4
+ import type { AddParticipantEventResult, AnswerCallEventResult, CancelAllMediaOperationsEventResult, CreateCallEventResult, PlayEventResult, RemoveParticipantEventResult, SendDtmfEventResult, StartRecognizingEventResult, TransferCallToParticipantEventResult, CancelAddParticipantEventResult, ConnectCallEventResult, MoveParticipantEventResult } from "../eventprocessor/eventResponses.js";
5
+ import type { AbortSignalLike } from "@azure/abort-controller";
4
6
  /**
5
- * The interface used as parent of [action]CallResult
7
+ * CreateCall result
6
8
  */
7
- export interface CallResult {
9
+ export interface CreateCallResult {
10
+ /** The callConnectionProperties */
8
11
  callConnectionProperties: CallConnectionProperties;
12
+ /** The callConnection */
9
13
  callConnection: CallConnection;
14
+ /** Waiting for event processor to process the event */
15
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CreateCallEventResult>;
10
16
  }
11
- /**
12
- * CreateCall result
13
- */
14
- export type CreateCallResult = CallResult;
15
17
  /**
16
18
  * AnswerCall result
17
19
  */
18
- export type AnswerCallResult = CallResult;
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
+ }
19
28
  /**
20
29
  * ConnectCall result
21
30
  */
22
- export type ConnectCallResult = CallResult;
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
+ }
23
39
  /** The response payload for getting participants of the call. */
24
40
  export interface ListParticipantsResult {
25
41
  /** List of the current participants in the call. */
@@ -35,16 +51,33 @@ export interface AddParticipantResult {
35
51
  participant?: CallParticipant;
36
52
  /** The operation context provided by client. */
37
53
  operationContext?: string;
54
+ /** Waiting for event processor to process the event */
55
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<AddParticipantEventResult>;
38
56
  }
39
57
  /** The response payload for transferring the call. */
40
58
  export interface TransferCallResult {
41
59
  /** The operation context provided by client. */
42
60
  operationContext?: string;
61
+ /** Waiting for event processor to process the event */
62
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<TransferCallToParticipantEventResult>;
43
63
  }
44
64
  /** The response payload for removing participants from the call. */
45
65
  export interface RemoveParticipantResult {
46
66
  /** The operation context provided by client. */
47
67
  operationContext?: string;
68
+ /** Waiting for event processor to process the event */
69
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<RemoveParticipantEventResult>;
70
+ }
71
+ /** The response payload for moving participants to the call. */
72
+ export interface MoveParticipantsResult {
73
+ /** List of current participants in the call. */
74
+ participants?: CallParticipant[];
75
+ /** The operation context provided by client. */
76
+ operationContext?: string;
77
+ /** The CallConnectionId for the call you want to move the participant from */
78
+ fromCall?: string;
79
+ /** Waiting for event processor to process the event */
80
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<MoveParticipantEventResult>;
48
81
  }
49
82
  /** The response payload for muting participant from the call. */
50
83
  export interface MuteParticipantResult {
@@ -53,14 +86,51 @@ export interface MuteParticipantResult {
53
86
  }
54
87
  /** The response payload for starting a call recording or getting call recording state. */
55
88
  export interface RecordingStateResult {
89
+ /** The unique recording identifier. */
56
90
  recordingId: string;
57
- recordingKind: RecordingKind;
91
+ /** The kind of recording (e.g., AzureCommunicationServices, Teams). */
92
+ recordingKind: string;
93
+ /** The current state of the recording. */
58
94
  recordingState: RecordingState;
59
95
  }
96
+ /** The response payload for starting a call recording or getting call recording result. */
97
+ export interface RecordingResult {
98
+ /** The unique identifier for the recording */
99
+ recordingId: string;
100
+ /** Container for recording storage information and chunks */
101
+ readonly recordingStorageInfo?: RecordingStorageInfo;
102
+ /** List of errors that occurred during recording, if any */
103
+ readonly errors?: ErrorModel[];
104
+ /** The timestamp when the recording started */
105
+ readonly recordingStartTime?: Date;
106
+ /** The duration of the recording in milliseconds */
107
+ readonly recordingDurationMs?: number;
108
+ /** The reason why the call session ended */
109
+ readonly sessionEndReason?: CallSessionEndReason;
110
+ /** The timestamp when the recording will expire */
111
+ readonly recordingExpirationTime?: Date;
112
+ }
113
+ /** The response payload for starting a call recording or getting call recording state. */
114
+ export interface CancelAllMediaOperationsResult {
115
+ /** Waiting for event processor to process the event */
116
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CancelAllMediaOperationsEventResult>;
117
+ }
118
+ /** The response from play. */
119
+ export interface PlayResult {
120
+ /** Waiting for event processor to process the event */
121
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<PlayEventResult>;
122
+ }
60
123
  /** The response payload for sending DTMF tones. */
61
124
  export interface SendDtmfTonesResult {
62
125
  /** The operation context provided by client. */
63
126
  operationContext?: string;
127
+ /** Waiting for event processor to process the event */
128
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<SendDtmfEventResult>;
129
+ }
130
+ /** The response from recognizing. */
131
+ export interface StartRecognizingResult {
132
+ /** Waiting for event processor to process the event */
133
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<StartRecognizingEventResult>;
64
134
  }
65
135
  /** The response payload for cancelling add participant request. */
66
136
  export interface CancelAddParticipantOperationResult {
@@ -68,5 +138,7 @@ export interface CancelAddParticipantOperationResult {
68
138
  invitationId?: string;
69
139
  /** The operation context provided by client. */
70
140
  operationContext?: string;
141
+ /** Waiting for event processor to process the event */
142
+ waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CancelAddParticipantEventResult>;
71
143
  }
72
144
  //# 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,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,UAAU;IAIzB,wBAAwB,EAAE,wBAAwB,CAAC;IAKnD,cAAc,EAAE,cAAc,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE3C,iEAAiE;AACjE,MAAM,WAAW,sBAAsB;IACrC,oDAAoD;IACpD,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,gEAAgE;AAChE,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,oEAAoE;AACpE,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,gBAAgB,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
+ {"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,EACV,oBAAoB,EACpB,U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C,EAAE,eAAe,EAC7B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC;AAED,qCAAqC;AACrC,MAAM,WAAW,sBAAsB;IACrC,uDAAuD;IACvD,qBAAqB,CACnB,WAAW,CAAC,EAAE,eAAe,EAC7B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,2BAA2B,CAAC,CAAC;CACzC;AAED,mEAAmE;AACnE,MAAM,WAAW,mCAAmC;IAClD,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uDAAuD;IACvD,qBAAqB,CACnB,WAAW,CAAC,EAAE,eAAe,EAC7B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,+BAA+B,CAAC,CAAC;CAC7C"}
@@ -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 { 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"]}
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 {\n CallSessionEndReason,\n ErrorModel,\n RecordingState,\n RecordingStorageInfo,\n} 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 MoveParticipantEventResult,\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 moving participants to the call. */\nexport interface MoveParticipantsResult {\n /** List of current participants in the call. */\n participants?: CallParticipant[];\n /** The operation context provided by client. */\n operationContext?: string;\n /** The CallConnectionId for the call you want to move the participant from */\n fromCall?: string;\n /** Waiting for event processor to process the event */\n waitForEventProcessor(\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<MoveParticipantEventResult>;\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 /** The unique recording identifier. */\n recordingId: string;\n /** The kind of recording (e.g., AzureCommunicationServices, Teams). */\n recordingKind: string;\n /** The current state of the recording. */\n recordingState: RecordingState;\n}\n\n/** The response payload for starting a call recording or getting call recording result. */\nexport interface RecordingResult {\n /** The unique identifier for the recording */\n recordingId: string;\n /** Container for recording storage information and chunks */\n readonly recordingStorageInfo?: RecordingStorageInfo;\n /** List of errors that occurred during recording, if any */\n readonly errors?: ErrorModel[];\n /** The timestamp when the recording started */\n readonly recordingStartTime?: Date;\n /** The duration of the recording in milliseconds */\n readonly recordingDurationMs?: number;\n /** The reason why the call session ended */\n readonly sessionEndReason?: CallSessionEndReason;\n /** The timestamp when the recording will expire */\n readonly recordingExpirationTime?: Date;\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,6 +1,6 @@
1
1
  import type { PhoneNumberIdentifier, CommunicationUserIdentifier, SerializedPhoneNumberIdentifier, CommunicationIdentifier, MicrosoftTeamsAppIdentifier } from "@azure/communication-common";
2
- import type { CallParticipantInternal, CommunicationIdentifierModel, PhoneNumberIdentifierModel, CommunicationUserIdentifierModel, MicrosoftTeamsAppIdentifierModel } from "../generated/src/index.js";
3
- import type { CallParticipant } from "../models/models.js";
2
+ import type { CallParticipantInternal, CommunicationIdentifierModel, PhoneNumberIdentifierModel, CommunicationUserIdentifierModel, MicrosoftTeamsAppIdentifierModel, TeamsPhoneCallDetailsInternal, TeamsPhoneCallerDetailsInternal, TeamsPhoneSourceDetailsInternal } from "../generated/src/index.js";
3
+ import type { CallParticipant, TeamsPhoneCallDetails, TeamsPhoneCallerDetails, TeamsPhoneSourceDetails } from "../models/models.js";
4
4
  /** Convert PhoneNumberIdentifier to PhoneNumberIdentifierModel(Internal usage class) */
5
5
  export declare function PhoneNumberIdentifierModelConverter(phoneNumberIdentifier: PhoneNumberIdentifier | undefined): PhoneNumberIdentifierModel | undefined;
6
6
  /** Convert SerializedPhoneNumberIdentifier to PhoneNumberIdentifier(Public usage class) */
@@ -19,4 +19,28 @@ export declare function communicationUserIdentifierConverter(identifier: Communi
19
19
  export declare function microsoftTeamsAppIdentifierModelConverter(identifier: MicrosoftTeamsAppIdentifier | undefined): MicrosoftTeamsAppIdentifierModel | undefined;
20
20
  /** Convert MicrosoftTeamsAppIdentifierModel to MicrosoftTeamsAppIdentifier (Public usage class) */
21
21
  export declare function microsoftTeamsAppIdentifierConverter(identifier: MicrosoftTeamsAppIdentifierModel | undefined): MicrosoftTeamsAppIdentifier | undefined;
22
+ /**
23
+ * Converts from public TeamsPhoneCallerDetails to internal TeamsPhoneCallerDetailsModel
24
+ */
25
+ export declare function teamsPhoneCallerDetailsModelConverter(teamsPhoneCallerDetails?: TeamsPhoneCallerDetails): TeamsPhoneCallerDetailsInternal | undefined;
26
+ /**
27
+ * Converts from public TeamsPhoneSourceDetails to internal TeamsPhoneSourceDetailsModel
28
+ */
29
+ export declare function teamsPhoneSourceDetailsModelConverter(teamsPhoneSourceDetails?: TeamsPhoneSourceDetails): TeamsPhoneSourceDetailsInternal | undefined;
30
+ /**
31
+ * Converts from public TeamsPhoneCallDetails to internal TeamsPhoneCallDetailsModel
32
+ */
33
+ export declare function teamsPhoneCallDetailsModelConverter(teamsPhoneCallDetails?: TeamsPhoneCallDetails): TeamsPhoneCallDetailsInternal | undefined;
34
+ /**
35
+ * Converts from internal TeamsPhoneCallerDetailsInternal to public TeamsPhoneCallerDetails (for incoming events)
36
+ */
37
+ export declare function teamsPhoneCallerDetailsConverter(teamsPhoneCallerDetails?: TeamsPhoneCallerDetailsInternal): TeamsPhoneCallerDetails | undefined;
38
+ /**
39
+ * Converts from internal TeamsPhoneSourceDetailsInternal to public TeamsPhoneSourceDetails (for incoming events)
40
+ */
41
+ export declare function teamsPhoneSourceDetailsConverter(teamsPhoneSourceDetails?: TeamsPhoneSourceDetailsInternal): TeamsPhoneSourceDetails | undefined;
42
+ /**
43
+ * Converts from internal TeamsPhoneCallDetailsInternal to public TeamsPhoneCallDetails (for incoming events)
44
+ */
45
+ export declare function teamsPhoneCallDetailsConverter(teamsPhoneCallDetails?: TeamsPhoneCallDetailsInternal): TeamsPhoneCallDetails | undefined;
22
46
  //# sourceMappingURL=converters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"converters.d.ts","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qBAAqB,EACrB,2BAA2B,EAE3B,+BAA+B,EAC/B,uBAAuB,EAGvB,2BAA2B,EAE5B,MAAM,6BAA6B,CAAC;AAUrC,OAAO,KAAK,EACV,uBAAuB,EACvB,4BAA4B,EAG5B,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EACjC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAuB3D,wFAAwF;AACxF,wBAAgB,mCAAmC,CACjD,qBAAqB,EAAE,qBAAqB,GAAG,SAAS,GACvD,0BAA0B,GAAG,SAAS,CAQxC;AAED,2FAA2F;AAC3F,wBAAgB,8BAA8B,CAC5C,+BAA+B,EAAE,+BAA+B,GAAG,SAAS,GAC3E,qBAAqB,GAAG,SAAS,CAYnC;AAED,0FAA0F;AAC1F,wBAAgB,gCAAgC,CAC9C,eAAe,EAAE,4BAA4B,GAC5C,uBAAuB,CAoEzB;AAED,4FAA4F;AAC5F,wBAAgB,qCAAqC,CACnD,UAAU,EAAE,uBAAuB,GAClC,4BAA4B,CAkD9B;AAED,yDAAyD;AACzD,wBAAgB,wBAAwB,CACtC,kBAAkB,EAAE,uBAAuB,GAC1C,eAAe,CAQjB;AAED,qGAAqG;AACrG,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,2BAA2B,GAAG,SAAS,GAClD,gCAAgC,GAAG,SAAS,CAM9C;AAED,mGAAmG;AACnG,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,gCAAgC,GAAG,SAAS,GACvD,2BAA2B,GAAG,SAAS,CAMzC;AAED,qGAAqG;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gCAAgC,GAAG,SAAS,CAM9C;AAED,mGAAmG;AACnG,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,gCAAgC,GAAG,SAAS,GACvD,2BAA2B,GAAG,SAAS,CAMzC;AAED,qGAAqG;AACrG,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,2BAA2B,GAAG,SAAS,GAClD,gCAAgC,GAAG,SAAS,CAM9C;AAED,mGAAmG;AACnG,wBAAgB,oCAAoC,CAClD,UAAU,EAAE,gCAAgC,GAAG,SAAS,GACvD,2BAA2B,GAAG,SAAS,CAMzC;AAED;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,uBAAuB,CAAC,EAAE,uBAAuB,GAChD,+BAA+B,GAAG,SAAS,CAc7C;AAED;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,uBAAuB,CAAC,EAAE,uBAAuB,GAChD,+BAA+B,GAAG,SAAS,CAmB7C;AAED;;GAEG;AACH,wBAAgB,mCAAmC,CACjD,qBAAqB,CAAC,EAAE,qBAAqB,GAC5C,6BAA6B,GAAG,SAAS,CAoB3C;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,uBAAuB,CAAC,EAAE,+BAA+B,GACxD,uBAAuB,GAAG,SAAS,CAcrC;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,uBAAuB,CAAC,EAAE,+BAA+B,GACxD,uBAAuB,GAAG,SAAS,CAmBrC;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,qBAAqB,CAAC,EAAE,6BAA6B,GACpD,qBAAqB,GAAG,SAAS,CAqBnC"}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- import { serializeCommunicationIdentifier, isCommunicationUserIdentifier, isPhoneNumberIdentifier, isUnknownIdentifier, isMicrosoftTeamsUserIdentifier, isMicrosoftTeamsAppIdentifier, isTeamsExtensionUserIdentifier, } from "@azure/communication-common";
3
+ import { serializeCommunicationIdentifier, isCommunicationUserIdentifier, isPhoneNumberIdentifier, isUnknownIdentifier, isMicrosoftTeamsUserIdentifier, isMicrosoftTeamsAppIdentifier, } from "@azure/communication-common";
4
4
  import { KnownCommunicationIdentifierModelKind } from "../generated/src/index.js";
5
5
  function extractKind(identifierModel) {
6
6
  if (identifierModel.communicationUser !== undefined) {
@@ -15,9 +15,6 @@ function extractKind(identifierModel) {
15
15
  if (identifierModel.microsoftTeamsApp !== undefined) {
16
16
  return KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp;
17
17
  }
18
- if (identifierModel.teamsExtensionUser !== undefined) {
19
- return KnownCommunicationIdentifierModelKind.TeamsExtensionUser;
20
- }
21
18
  return KnownCommunicationIdentifierModelKind.Unknown;
22
19
  }
23
20
  /** Convert PhoneNumberIdentifier to PhoneNumberIdentifierModel(Internal usage class) */
@@ -77,17 +74,6 @@ export function communicationIdentifierConverter(identifierModel) {
77
74
  };
78
75
  return microsoftTeamsAppIdentifier;
79
76
  }
80
- if (kind === KnownCommunicationIdentifierModelKind.TeamsExtensionUser &&
81
- identifierModel.teamsExtensionUser !== undefined) {
82
- const teamsExtensionUserIdentifier = {
83
- rawId: rawId,
84
- userId: identifierModel.teamsExtensionUser.userId,
85
- resourceId: identifierModel.teamsExtensionUser.resourceId,
86
- tenantId: identifierModel.teamsExtensionUser.tenantId,
87
- cloud: identifierModel.teamsExtensionUser.cloud,
88
- };
89
- return teamsExtensionUserIdentifier;
90
- }
91
77
  const unknownIdentifier = {
92
78
  id: rawId ? rawId : "",
93
79
  };
@@ -112,10 +98,6 @@ export function communicationIdentifierModelConverter(identifier) {
112
98
  const microsoftTeamsAppIdentifierModel = Object.assign({ kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp }, serializedIdentifier);
113
99
  return microsoftTeamsAppIdentifierModel;
114
100
  }
115
- if (isTeamsExtensionUserIdentifier(identifier)) {
116
- const teamsExtensionUserIdentifierModel = Object.assign({ kind: KnownCommunicationIdentifierModelKind.TeamsExtensionUser }, serializedIdentifier);
117
- return teamsExtensionUserIdentifierModel;
118
- }
119
101
  if (isUnknownIdentifier(identifier)) {
120
102
  const unknownIdentifierModel = Object.assign({ kind: KnownCommunicationIdentifierModelKind.Unknown }, serializedIdentifier);
121
103
  return unknownIdentifierModel;
@@ -157,4 +139,117 @@ export function microsoftTeamsAppIdentifierConverter(identifier) {
157
139
  }
158
140
  return { teamsAppId: identifier.appId };
159
141
  }
142
+ /**
143
+ * Converts from public TeamsPhoneCallerDetails to internal TeamsPhoneCallerDetailsModel
144
+ */
145
+ export function teamsPhoneCallerDetailsModelConverter(teamsPhoneCallerDetails) {
146
+ if (!teamsPhoneCallerDetails) {
147
+ return undefined;
148
+ }
149
+ return {
150
+ caller: communicationIdentifierModelConverter(teamsPhoneCallerDetails.caller),
151
+ name: teamsPhoneCallerDetails.name,
152
+ phoneNumber: teamsPhoneCallerDetails.phoneNumber,
153
+ recordId: teamsPhoneCallerDetails.recordId,
154
+ screenPopUrl: teamsPhoneCallerDetails.screenPopUrl,
155
+ isAuthenticated: teamsPhoneCallerDetails.isAuthenticated,
156
+ additionalCallerInformation: teamsPhoneCallerDetails.additionalCallerInformation,
157
+ };
158
+ }
159
+ /**
160
+ * Converts from public TeamsPhoneSourceDetails to internal TeamsPhoneSourceDetailsModel
161
+ */
162
+ export function teamsPhoneSourceDetailsModelConverter(teamsPhoneSourceDetails) {
163
+ if (!teamsPhoneSourceDetails) {
164
+ return undefined;
165
+ }
166
+ const intendedTargets = {};
167
+ if (teamsPhoneSourceDetails.intendedTargets) {
168
+ for (const [key, value] of Object.entries(teamsPhoneSourceDetails.intendedTargets)) {
169
+ intendedTargets[key] = communicationIdentifierModelConverter(value);
170
+ }
171
+ }
172
+ return {
173
+ source: communicationIdentifierModelConverter(teamsPhoneSourceDetails.source),
174
+ language: teamsPhoneSourceDetails.language,
175
+ status: teamsPhoneSourceDetails.status,
176
+ intendedTargets: Object.keys(intendedTargets).length > 0 ? intendedTargets : undefined,
177
+ };
178
+ }
179
+ /**
180
+ * Converts from public TeamsPhoneCallDetails to internal TeamsPhoneCallDetailsModel
181
+ */
182
+ export function teamsPhoneCallDetailsModelConverter(teamsPhoneCallDetails) {
183
+ if (!teamsPhoneCallDetails) {
184
+ return undefined;
185
+ }
186
+ return {
187
+ teamsPhoneCallerDetails: teamsPhoneCallerDetailsModelConverter(teamsPhoneCallDetails.teamsPhoneCallerDetails),
188
+ teamsPhoneSourceDetails: teamsPhoneSourceDetailsModelConverter(teamsPhoneCallDetails.teamsPhoneSourceDetails),
189
+ sessionId: teamsPhoneCallDetails.sessionId,
190
+ intent: teamsPhoneCallDetails.intent,
191
+ callTopic: teamsPhoneCallDetails.callTopic,
192
+ callContext: teamsPhoneCallDetails.callContext,
193
+ transcriptUrl: teamsPhoneCallDetails.transcriptUrl,
194
+ callSentiment: teamsPhoneCallDetails.callSentiment,
195
+ suggestedActions: teamsPhoneCallDetails.suggestedActions,
196
+ };
197
+ }
198
+ /**
199
+ * Converts from internal TeamsPhoneCallerDetailsInternal to public TeamsPhoneCallerDetails (for incoming events)
200
+ */
201
+ export function teamsPhoneCallerDetailsConverter(teamsPhoneCallerDetails) {
202
+ if (!teamsPhoneCallerDetails) {
203
+ return undefined;
204
+ }
205
+ return {
206
+ caller: communicationIdentifierConverter(teamsPhoneCallerDetails.caller),
207
+ name: teamsPhoneCallerDetails.name,
208
+ phoneNumber: teamsPhoneCallerDetails.phoneNumber,
209
+ recordId: teamsPhoneCallerDetails.recordId,
210
+ screenPopUrl: teamsPhoneCallerDetails.screenPopUrl,
211
+ isAuthenticated: teamsPhoneCallerDetails.isAuthenticated,
212
+ additionalCallerInformation: teamsPhoneCallerDetails.additionalCallerInformation,
213
+ };
214
+ }
215
+ /**
216
+ * Converts from internal TeamsPhoneSourceDetailsInternal to public TeamsPhoneSourceDetails (for incoming events)
217
+ */
218
+ export function teamsPhoneSourceDetailsConverter(teamsPhoneSourceDetails) {
219
+ if (!teamsPhoneSourceDetails) {
220
+ return undefined;
221
+ }
222
+ const intendedTargets = {};
223
+ if (teamsPhoneSourceDetails.intendedTargets) {
224
+ for (const [key, value] of Object.entries(teamsPhoneSourceDetails.intendedTargets)) {
225
+ intendedTargets[key] = communicationIdentifierConverter(value);
226
+ }
227
+ }
228
+ return {
229
+ source: communicationIdentifierConverter(teamsPhoneSourceDetails.source),
230
+ language: teamsPhoneSourceDetails.language,
231
+ status: teamsPhoneSourceDetails.status,
232
+ intendedTargets: Object.keys(intendedTargets).length > 0 ? intendedTargets : undefined,
233
+ };
234
+ }
235
+ /**
236
+ * Converts from internal TeamsPhoneCallDetailsInternal to public TeamsPhoneCallDetails (for incoming events)
237
+ */
238
+ export function teamsPhoneCallDetailsConverter(teamsPhoneCallDetails) {
239
+ if (!teamsPhoneCallDetails) {
240
+ return undefined;
241
+ }
242
+ return {
243
+ kind: "teamsPhoneCallDetails",
244
+ teamsPhoneCallerDetails: teamsPhoneCallerDetailsConverter(teamsPhoneCallDetails.teamsPhoneCallerDetails),
245
+ teamsPhoneSourceDetails: teamsPhoneSourceDetailsConverter(teamsPhoneCallDetails.teamsPhoneSourceDetails),
246
+ sessionId: teamsPhoneCallDetails.sessionId,
247
+ intent: teamsPhoneCallDetails.intent,
248
+ callTopic: teamsPhoneCallDetails.callTopic,
249
+ callContext: teamsPhoneCallDetails.callContext,
250
+ transcriptUrl: teamsPhoneCallDetails.transcriptUrl,
251
+ callSentiment: teamsPhoneCallDetails.callSentiment,
252
+ suggestedActions: teamsPhoneCallDetails.suggestedActions,
253
+ };
254
+ }
160
255
  //# sourceMappingURL=converters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAalC,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EACnB,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,6BAA6B,CAAC;AAUrC,OAAO,E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G;AACnG,MAAM,UAAU,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,MAAM,UAAU,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,MAAM,UAAU,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
+ {"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,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ation.\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 TeamsPhoneCallDetailsInternal,\n TeamsPhoneCallerDetailsInternal,\n TeamsPhoneSourceDetailsInternal,\n} from \"../generated/src/index.js\";\nimport { KnownCommunicationIdentifierModelKind } from \"../generated/src/index.js\";\nimport type {\n CallParticipant,\n TeamsPhoneCallDetails,\n TeamsPhoneCallerDetails,\n TeamsPhoneSourceDetails,\n} 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\n/**\n * Converts from public TeamsPhoneCallerDetails to internal TeamsPhoneCallerDetailsModel\n */\nexport function teamsPhoneCallerDetailsModelConverter(\n teamsPhoneCallerDetails?: TeamsPhoneCallerDetails,\n): TeamsPhoneCallerDetailsInternal | undefined {\n if (!teamsPhoneCallerDetails) {\n return undefined;\n }\n\n return {\n caller: communicationIdentifierModelConverter(teamsPhoneCallerDetails.caller),\n name: teamsPhoneCallerDetails.name,\n phoneNumber: teamsPhoneCallerDetails.phoneNumber,\n recordId: teamsPhoneCallerDetails.recordId,\n screenPopUrl: teamsPhoneCallerDetails.screenPopUrl,\n isAuthenticated: teamsPhoneCallerDetails.isAuthenticated,\n additionalCallerInformation: teamsPhoneCallerDetails.additionalCallerInformation,\n };\n}\n\n/**\n * Converts from public TeamsPhoneSourceDetails to internal TeamsPhoneSourceDetailsModel\n */\nexport function teamsPhoneSourceDetailsModelConverter(\n teamsPhoneSourceDetails?: TeamsPhoneSourceDetails,\n): TeamsPhoneSourceDetailsInternal | undefined {\n if (!teamsPhoneSourceDetails) {\n return undefined;\n }\n\n const intendedTargets: { [key: string]: CommunicationIdentifierModel } = {};\n\n if (teamsPhoneSourceDetails.intendedTargets) {\n for (const [key, value] of Object.entries(teamsPhoneSourceDetails.intendedTargets)) {\n intendedTargets[key] = communicationIdentifierModelConverter(value);\n }\n }\n\n return {\n source: communicationIdentifierModelConverter(teamsPhoneSourceDetails.source),\n language: teamsPhoneSourceDetails.language,\n status: teamsPhoneSourceDetails.status,\n intendedTargets: Object.keys(intendedTargets).length > 0 ? intendedTargets : undefined,\n };\n}\n\n/**\n * Converts from public TeamsPhoneCallDetails to internal TeamsPhoneCallDetailsModel\n */\nexport function teamsPhoneCallDetailsModelConverter(\n teamsPhoneCallDetails?: TeamsPhoneCallDetails,\n): TeamsPhoneCallDetailsInternal | undefined {\n if (!teamsPhoneCallDetails) {\n return undefined;\n }\n\n return {\n teamsPhoneCallerDetails: teamsPhoneCallerDetailsModelConverter(\n teamsPhoneCallDetails.teamsPhoneCallerDetails,\n ),\n teamsPhoneSourceDetails: teamsPhoneSourceDetailsModelConverter(\n teamsPhoneCallDetails.teamsPhoneSourceDetails,\n ),\n sessionId: teamsPhoneCallDetails.sessionId,\n intent: teamsPhoneCallDetails.intent,\n callTopic: teamsPhoneCallDetails.callTopic,\n callContext: teamsPhoneCallDetails.callContext,\n transcriptUrl: teamsPhoneCallDetails.transcriptUrl,\n callSentiment: teamsPhoneCallDetails.callSentiment,\n suggestedActions: teamsPhoneCallDetails.suggestedActions,\n };\n}\n\n/**\n * Converts from internal TeamsPhoneCallerDetailsInternal to public TeamsPhoneCallerDetails (for incoming events)\n */\nexport function teamsPhoneCallerDetailsConverter(\n teamsPhoneCallerDetails?: TeamsPhoneCallerDetailsInternal,\n): TeamsPhoneCallerDetails | undefined {\n if (!teamsPhoneCallerDetails) {\n return undefined;\n }\n\n return {\n caller: communicationIdentifierConverter(teamsPhoneCallerDetails.caller),\n name: teamsPhoneCallerDetails.name,\n phoneNumber: teamsPhoneCallerDetails.phoneNumber,\n recordId: teamsPhoneCallerDetails.recordId,\n screenPopUrl: teamsPhoneCallerDetails.screenPopUrl,\n isAuthenticated: teamsPhoneCallerDetails.isAuthenticated,\n additionalCallerInformation: teamsPhoneCallerDetails.additionalCallerInformation,\n };\n}\n\n/**\n * Converts from internal TeamsPhoneSourceDetailsInternal to public TeamsPhoneSourceDetails (for incoming events)\n */\nexport function teamsPhoneSourceDetailsConverter(\n teamsPhoneSourceDetails?: TeamsPhoneSourceDetailsInternal,\n): TeamsPhoneSourceDetails | undefined {\n if (!teamsPhoneSourceDetails) {\n return undefined;\n }\n\n const intendedTargets: { [key: string]: CommunicationIdentifier } = {};\n\n if (teamsPhoneSourceDetails.intendedTargets) {\n for (const [key, value] of Object.entries(teamsPhoneSourceDetails.intendedTargets)) {\n intendedTargets[key] = communicationIdentifierConverter(value);\n }\n }\n\n return {\n source: communicationIdentifierConverter(teamsPhoneSourceDetails.source),\n language: teamsPhoneSourceDetails.language,\n status: teamsPhoneSourceDetails.status,\n intendedTargets: Object.keys(intendedTargets).length > 0 ? intendedTargets : undefined,\n };\n}\n\n/**\n * Converts from internal TeamsPhoneCallDetailsInternal to public TeamsPhoneCallDetails (for incoming events)\n */\nexport function teamsPhoneCallDetailsConverter(\n teamsPhoneCallDetails?: TeamsPhoneCallDetailsInternal,\n): TeamsPhoneCallDetails | undefined {\n if (!teamsPhoneCallDetails) {\n return undefined;\n }\n\n return {\n kind: \"teamsPhoneCallDetails\",\n teamsPhoneCallerDetails: teamsPhoneCallerDetailsConverter(\n teamsPhoneCallDetails.teamsPhoneCallerDetails,\n ),\n teamsPhoneSourceDetails: teamsPhoneSourceDetailsConverter(\n teamsPhoneCallDetails.teamsPhoneSourceDetails,\n ),\n sessionId: teamsPhoneCallDetails.sessionId,\n intent: teamsPhoneCallDetails.intent,\n callTopic: teamsPhoneCallDetails.callTopic,\n callContext: teamsPhoneCallDetails.callContext,\n transcriptUrl: teamsPhoneCallDetails.transcriptUrl,\n callSentiment: teamsPhoneCallDetails.callSentiment,\n suggestedActions: teamsPhoneCallDetails.suggestedActions,\n };\n}\n"]}