@azure/communication-call-automation 1.5.0 → 1.6.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/dist/browser/callAutomationClient.d.ts.map +1 -1
  2. package/dist/browser/callAutomationClient.js +3 -0
  3. package/dist/browser/callAutomationClient.js.map +1 -1
  4. package/dist/browser/callAutomationEventParser.d.ts.map +1 -1
  5. package/dist/browser/callAutomationEventParser.js +15 -0
  6. package/dist/browser/callAutomationEventParser.js.map +1 -1
  7. package/dist/browser/callConnection.d.ts +10 -2
  8. package/dist/browser/callConnection.d.ts.map +1 -1
  9. package/dist/browser/callConnection.js +37 -2
  10. package/dist/browser/callConnection.js.map +1 -1
  11. package/dist/browser/callMedia.d.ts +7 -2
  12. package/dist/browser/callMedia.d.ts.map +1 -1
  13. package/dist/browser/callMedia.js +33 -5
  14. package/dist/browser/callMedia.js.map +1 -1
  15. package/dist/browser/generated/src/callAutomationApiClient.js +2 -2
  16. package/dist/browser/generated/src/callAutomationApiClient.js.map +1 -1
  17. package/dist/browser/generated/src/models/index.d.ts +255 -3
  18. package/dist/browser/generated/src/models/index.d.ts.map +1 -1
  19. package/dist/browser/generated/src/models/index.js +12 -0
  20. package/dist/browser/generated/src/models/index.js.map +1 -1
  21. package/dist/browser/generated/src/models/mappers.d.ts +13 -0
  22. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
  23. package/dist/browser/generated/src/models/mappers.js +652 -1
  24. package/dist/browser/generated/src/models/mappers.js.map +1 -1
  25. package/dist/browser/generated/src/models/parameters.d.ts +2 -0
  26. package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
  27. package/dist/browser/generated/src/models/parameters.js +10 -2
  28. package/dist/browser/generated/src/models/parameters.js.map +1 -1
  29. package/dist/browser/generated/src/operations/callConnection.d.ts +8 -1
  30. package/dist/browser/generated/src/operations/callConnection.d.ts.map +1 -1
  31. package/dist/browser/generated/src/operations/callConnection.js +32 -0
  32. package/dist/browser/generated/src/operations/callConnection.js.map +1 -1
  33. package/dist/browser/generated/src/operations/callMedia.d.ts +8 -1
  34. package/dist/browser/generated/src/operations/callMedia.d.ts.map +1 -1
  35. package/dist/browser/generated/src/operations/callMedia.js +25 -0
  36. package/dist/browser/generated/src/operations/callMedia.js.map +1 -1
  37. package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts +8 -1
  38. package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  39. package/dist/browser/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  40. package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts +8 -1
  41. package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  42. package/dist/browser/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  43. package/dist/browser/models/constants.d.ts.map +1 -1
  44. package/dist/browser/models/constants.js +1 -1
  45. package/dist/browser/models/constants.js.map +1 -1
  46. package/dist/browser/models/events.d.ts +245 -264
  47. package/dist/browser/models/events.d.ts.map +1 -1
  48. package/dist/browser/models/events.js.map +1 -1
  49. package/dist/browser/models/models.d.ts +78 -3
  50. package/dist/browser/models/models.d.ts.map +1 -1
  51. package/dist/browser/models/models.js.map +1 -1
  52. package/dist/browser/models/options.d.ts +65 -1
  53. package/dist/browser/models/options.d.ts.map +1 -1
  54. package/dist/browser/models/options.js.map +1 -1
  55. package/dist/browser/models/responses.d.ts +9 -0
  56. package/dist/browser/models/responses.d.ts.map +1 -1
  57. package/dist/browser/models/responses.js.map +1 -1
  58. package/dist/browser/models/streaming.d.ts +12 -1
  59. package/dist/browser/models/streaming.d.ts.map +1 -1
  60. package/dist/browser/models/streaming.js.map +1 -1
  61. package/dist/browser/streamingData.d.ts.map +1 -1
  62. package/dist/browser/streamingData.js +5 -0
  63. package/dist/browser/streamingData.js.map +1 -1
  64. package/dist/browser/utli/converters.d.ts +26 -2
  65. package/dist/browser/utli/converters.d.ts.map +1 -1
  66. package/dist/browser/utli/converters.js +113 -0
  67. package/dist/browser/utli/converters.js.map +1 -1
  68. package/dist/commonjs/callAutomationClient.d.ts.map +1 -1
  69. package/dist/commonjs/callAutomationClient.js +3 -0
  70. package/dist/commonjs/callAutomationClient.js.map +1 -1
  71. package/dist/commonjs/callAutomationEventParser.d.ts.map +1 -1
  72. package/dist/commonjs/callAutomationEventParser.js +15 -0
  73. package/dist/commonjs/callAutomationEventParser.js.map +1 -1
  74. package/dist/commonjs/callConnection.d.ts +10 -2
  75. package/dist/commonjs/callConnection.d.ts.map +1 -1
  76. package/dist/commonjs/callConnection.js +36 -1
  77. package/dist/commonjs/callConnection.js.map +1 -1
  78. package/dist/commonjs/callMedia.d.ts +7 -2
  79. package/dist/commonjs/callMedia.d.ts.map +1 -1
  80. package/dist/commonjs/callMedia.js +33 -5
  81. package/dist/commonjs/callMedia.js.map +1 -1
  82. package/dist/commonjs/generated/src/callAutomationApiClient.js +2 -2
  83. package/dist/commonjs/generated/src/callAutomationApiClient.js.map +1 -1
  84. package/dist/commonjs/generated/src/models/index.d.ts +255 -3
  85. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
  86. package/dist/commonjs/generated/src/models/index.js +13 -1
  87. package/dist/commonjs/generated/src/models/index.js.map +1 -1
  88. package/dist/commonjs/generated/src/models/mappers.d.ts +13 -0
  89. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
  90. package/dist/commonjs/generated/src/models/mappers.js +655 -4
  91. package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
  92. package/dist/commonjs/generated/src/models/parameters.d.ts +2 -0
  93. package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
  94. package/dist/commonjs/generated/src/models/parameters.js +10 -2
  95. package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
  96. package/dist/commonjs/generated/src/operations/callConnection.d.ts +8 -1
  97. package/dist/commonjs/generated/src/operations/callConnection.d.ts.map +1 -1
  98. package/dist/commonjs/generated/src/operations/callConnection.js +32 -0
  99. package/dist/commonjs/generated/src/operations/callConnection.js.map +1 -1
  100. package/dist/commonjs/generated/src/operations/callMedia.d.ts +8 -1
  101. package/dist/commonjs/generated/src/operations/callMedia.d.ts.map +1 -1
  102. package/dist/commonjs/generated/src/operations/callMedia.js +25 -0
  103. package/dist/commonjs/generated/src/operations/callMedia.js.map +1 -1
  104. package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts +8 -1
  105. package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  106. package/dist/commonjs/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  107. package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts +8 -1
  108. package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  109. package/dist/commonjs/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  110. package/dist/commonjs/models/constants.d.ts.map +1 -1
  111. package/dist/commonjs/models/constants.js +1 -1
  112. package/dist/commonjs/models/constants.js.map +1 -1
  113. package/dist/commonjs/models/events.d.ts +245 -264
  114. package/dist/commonjs/models/events.d.ts.map +1 -1
  115. package/dist/commonjs/models/events.js.map +1 -1
  116. package/dist/commonjs/models/models.d.ts +78 -3
  117. package/dist/commonjs/models/models.d.ts.map +1 -1
  118. package/dist/commonjs/models/models.js.map +1 -1
  119. package/dist/commonjs/models/options.d.ts +65 -1
  120. package/dist/commonjs/models/options.d.ts.map +1 -1
  121. package/dist/commonjs/models/options.js.map +1 -1
  122. package/dist/commonjs/models/responses.d.ts +9 -0
  123. package/dist/commonjs/models/responses.d.ts.map +1 -1
  124. package/dist/commonjs/models/responses.js.map +1 -1
  125. package/dist/commonjs/models/streaming.d.ts +12 -1
  126. package/dist/commonjs/models/streaming.d.ts.map +1 -1
  127. package/dist/commonjs/models/streaming.js.map +1 -1
  128. package/dist/commonjs/streamingData.d.ts.map +1 -1
  129. package/dist/commonjs/streamingData.js +5 -0
  130. package/dist/commonjs/streamingData.js.map +1 -1
  131. package/dist/commonjs/utli/converters.d.ts +26 -2
  132. package/dist/commonjs/utli/converters.d.ts.map +1 -1
  133. package/dist/commonjs/utli/converters.js +119 -0
  134. package/dist/commonjs/utli/converters.js.map +1 -1
  135. package/dist/esm/callAutomationClient.d.ts.map +1 -1
  136. package/dist/esm/callAutomationClient.js +3 -0
  137. package/dist/esm/callAutomationClient.js.map +1 -1
  138. package/dist/esm/callAutomationEventParser.d.ts.map +1 -1
  139. package/dist/esm/callAutomationEventParser.js +15 -0
  140. package/dist/esm/callAutomationEventParser.js.map +1 -1
  141. package/dist/esm/callConnection.d.ts +10 -2
  142. package/dist/esm/callConnection.d.ts.map +1 -1
  143. package/dist/esm/callConnection.js +37 -2
  144. package/dist/esm/callConnection.js.map +1 -1
  145. package/dist/esm/callMedia.d.ts +7 -2
  146. package/dist/esm/callMedia.d.ts.map +1 -1
  147. package/dist/esm/callMedia.js +33 -5
  148. package/dist/esm/callMedia.js.map +1 -1
  149. package/dist/esm/generated/src/callAutomationApiClient.js +2 -2
  150. package/dist/esm/generated/src/callAutomationApiClient.js.map +1 -1
  151. package/dist/esm/generated/src/models/index.d.ts +255 -3
  152. package/dist/esm/generated/src/models/index.d.ts.map +1 -1
  153. package/dist/esm/generated/src/models/index.js +12 -0
  154. package/dist/esm/generated/src/models/index.js.map +1 -1
  155. package/dist/esm/generated/src/models/mappers.d.ts +13 -0
  156. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
  157. package/dist/esm/generated/src/models/mappers.js +652 -1
  158. package/dist/esm/generated/src/models/mappers.js.map +1 -1
  159. package/dist/esm/generated/src/models/parameters.d.ts +2 -0
  160. package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
  161. package/dist/esm/generated/src/models/parameters.js +10 -2
  162. package/dist/esm/generated/src/models/parameters.js.map +1 -1
  163. package/dist/esm/generated/src/operations/callConnection.d.ts +8 -1
  164. package/dist/esm/generated/src/operations/callConnection.d.ts.map +1 -1
  165. package/dist/esm/generated/src/operations/callConnection.js +32 -0
  166. package/dist/esm/generated/src/operations/callConnection.js.map +1 -1
  167. package/dist/esm/generated/src/operations/callMedia.d.ts +8 -1
  168. package/dist/esm/generated/src/operations/callMedia.d.ts.map +1 -1
  169. package/dist/esm/generated/src/operations/callMedia.js +25 -0
  170. package/dist/esm/generated/src/operations/callMedia.js.map +1 -1
  171. package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts +8 -1
  172. package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  173. package/dist/esm/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  174. package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts +8 -1
  175. package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  176. package/dist/esm/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  177. package/dist/esm/models/constants.d.ts.map +1 -1
  178. package/dist/esm/models/constants.js +1 -1
  179. package/dist/esm/models/constants.js.map +1 -1
  180. package/dist/esm/models/events.d.ts +245 -264
  181. package/dist/esm/models/events.d.ts.map +1 -1
  182. package/dist/esm/models/events.js.map +1 -1
  183. package/dist/esm/models/models.d.ts +78 -3
  184. package/dist/esm/models/models.d.ts.map +1 -1
  185. package/dist/esm/models/models.js.map +1 -1
  186. package/dist/esm/models/options.d.ts +65 -1
  187. package/dist/esm/models/options.d.ts.map +1 -1
  188. package/dist/esm/models/options.js.map +1 -1
  189. package/dist/esm/models/responses.d.ts +9 -0
  190. package/dist/esm/models/responses.d.ts.map +1 -1
  191. package/dist/esm/models/responses.js.map +1 -1
  192. package/dist/esm/models/streaming.d.ts +12 -1
  193. package/dist/esm/models/streaming.d.ts.map +1 -1
  194. package/dist/esm/models/streaming.js.map +1 -1
  195. package/dist/esm/streamingData.d.ts.map +1 -1
  196. package/dist/esm/streamingData.js +5 -0
  197. package/dist/esm/streamingData.js.map +1 -1
  198. package/dist/esm/utli/converters.d.ts +26 -2
  199. package/dist/esm/utli/converters.d.ts.map +1 -1
  200. package/dist/esm/utli/converters.js +113 -0
  201. package/dist/esm/utli/converters.js.map +1 -1
  202. package/dist/react-native/callAutomationClient.d.ts.map +1 -1
  203. package/dist/react-native/callAutomationClient.js +3 -0
  204. package/dist/react-native/callAutomationClient.js.map +1 -1
  205. package/dist/react-native/callAutomationEventParser.d.ts.map +1 -1
  206. package/dist/react-native/callAutomationEventParser.js +15 -0
  207. package/dist/react-native/callAutomationEventParser.js.map +1 -1
  208. package/dist/react-native/callConnection.d.ts +10 -2
  209. package/dist/react-native/callConnection.d.ts.map +1 -1
  210. package/dist/react-native/callConnection.js +37 -2
  211. package/dist/react-native/callConnection.js.map +1 -1
  212. package/dist/react-native/callMedia.d.ts +7 -2
  213. package/dist/react-native/callMedia.d.ts.map +1 -1
  214. package/dist/react-native/callMedia.js +33 -5
  215. package/dist/react-native/callMedia.js.map +1 -1
  216. package/dist/react-native/generated/src/callAutomationApiClient.js +2 -2
  217. package/dist/react-native/generated/src/callAutomationApiClient.js.map +1 -1
  218. package/dist/react-native/generated/src/models/index.d.ts +255 -3
  219. package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
  220. package/dist/react-native/generated/src/models/index.js +12 -0
  221. package/dist/react-native/generated/src/models/index.js.map +1 -1
  222. package/dist/react-native/generated/src/models/mappers.d.ts +13 -0
  223. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
  224. package/dist/react-native/generated/src/models/mappers.js +652 -1
  225. package/dist/react-native/generated/src/models/mappers.js.map +1 -1
  226. package/dist/react-native/generated/src/models/parameters.d.ts +2 -0
  227. package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
  228. package/dist/react-native/generated/src/models/parameters.js +10 -2
  229. package/dist/react-native/generated/src/models/parameters.js.map +1 -1
  230. package/dist/react-native/generated/src/operations/callConnection.d.ts +8 -1
  231. package/dist/react-native/generated/src/operations/callConnection.d.ts.map +1 -1
  232. package/dist/react-native/generated/src/operations/callConnection.js +32 -0
  233. package/dist/react-native/generated/src/operations/callConnection.js.map +1 -1
  234. package/dist/react-native/generated/src/operations/callMedia.d.ts +8 -1
  235. package/dist/react-native/generated/src/operations/callMedia.d.ts.map +1 -1
  236. package/dist/react-native/generated/src/operations/callMedia.js +25 -0
  237. package/dist/react-native/generated/src/operations/callMedia.js.map +1 -1
  238. package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts +8 -1
  239. package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
  240. package/dist/react-native/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  241. package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts +8 -1
  242. package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
  243. package/dist/react-native/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  244. package/dist/react-native/models/constants.d.ts.map +1 -1
  245. package/dist/react-native/models/constants.js +1 -1
  246. package/dist/react-native/models/constants.js.map +1 -1
  247. package/dist/react-native/models/events.d.ts +245 -264
  248. package/dist/react-native/models/events.d.ts.map +1 -1
  249. package/dist/react-native/models/events.js.map +1 -1
  250. package/dist/react-native/models/models.d.ts +78 -3
  251. package/dist/react-native/models/models.d.ts.map +1 -1
  252. package/dist/react-native/models/models.js.map +1 -1
  253. package/dist/react-native/models/options.d.ts +65 -1
  254. package/dist/react-native/models/options.d.ts.map +1 -1
  255. package/dist/react-native/models/options.js.map +1 -1
  256. package/dist/react-native/models/responses.d.ts +9 -0
  257. package/dist/react-native/models/responses.d.ts.map +1 -1
  258. package/dist/react-native/models/responses.js.map +1 -1
  259. package/dist/react-native/models/streaming.d.ts +12 -1
  260. package/dist/react-native/models/streaming.d.ts.map +1 -1
  261. package/dist/react-native/models/streaming.js.map +1 -1
  262. package/dist/react-native/streamingData.d.ts.map +1 -1
  263. package/dist/react-native/streamingData.js +5 -0
  264. package/dist/react-native/streamingData.js.map +1 -1
  265. package/dist/react-native/utli/converters.d.ts +26 -2
  266. package/dist/react-native/utli/converters.d.ts.map +1 -1
  267. package/dist/react-native/utli/converters.js +113 -0
  268. package/dist/react-native/utli/converters.js.map +1 -1
  269. package/package.json +3 -3
@@ -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 * 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 operationCallbackUrl?: string;\n}\n\n/**\n * Options to Unhold participant.\n */\nexport interface UnholdOptions extends OperationOptions {\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 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"]}
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 PiiRedactionOptions,\n SummarizationOptions,\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 /**\n * List of locales for Language Identification.\n * Supports upto 4 locales in the format: [\"en-us\", \"fr-fr\", \"hi-in\"] etc.\n */\n speechLanguages?: string[];\n /** Value indicating if sentiment analysis should be used. */\n enableSentimentAnalysis?: boolean;\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 /**\n * List of locales for Language Identification.\n * Supports upto 4 locales in the format: [\"en-us\", \"fr-fr\", \"hi-in\"] etc.\n */\n speechLanguages?: string[];\n /** Value indicating if sentiment analysis should be used. */\n enableSentimentAnalysis?: boolean;\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 /** Gets or sets a list of languages for Language Identification. */\n speechLanguages?: string[];\n /** Gets or sets a value indicating if sentiment analysis should be used. */\n enableSentimentAnalysis?: boolean;\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 /** Enables loopback audio functionality for the call. */\n enableLoopbackAudio?: boolean;\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 /** Enables loopback audio functionality for the call. */\n enableLoopbackAudio?: boolean;\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 * 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 /** PII redaction configuration options. */\n piiRedactionOptions?: PiiRedactionOptions;\n /** Indicating if sentiment analysis should be used. */\n enableSentimentAnalysis?: boolean;\n /** Summarization configuration options. */\n summarizationOptions?: SummarizationOptions;\n /** Gets or sets a list of languages for Language Identification. */\n locales?: 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 operationCallbackUrl?: string;\n}\n\n/**\n * Options to Unhold participant.\n */\nexport interface UnholdOptions extends OperationOptions {\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 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 /** Enables loopback audio functionality for the call. */\n enableLoopbackAudio?: boolean;\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 /** Defines Locale for the transcription e,g en-US */\n locale?: string;\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 /** PII redaction configuration options. */\n piiRedactionOptions?: PiiRedactionOptions;\n /** Indicating if sentiment analysis should be used. */\n enableSentimentAnalysis?: boolean;\n /** Summarization configuration options. */\n summarizationOptions?: SummarizationOptions;\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 for summarize call details.\n */\nexport interface SummarizeCallOptions 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 /** Configuration options for call summarization. */\n summarizationOptions?: SummarizationOptions;\n}\n"]}
@@ -69,4 +69,13 @@ export interface CancelAddParticipantOperationResult {
69
69
  /** The operation context provided by client. */
70
70
  operationContext?: string;
71
71
  }
72
+ /** The response payload for moving participants to the call. */
73
+ export interface MoveParticipantsResult {
74
+ /** List of current participants in the call. */
75
+ participants?: CallParticipant[];
76
+ /** The operation context provided by client. */
77
+ operationContext?: string;
78
+ /** The CallConnectionId for the call you want to move the participant from */
79
+ fromCall?: string;
80
+ }
72
81
  //# sourceMappingURL=responses.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/models/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,UAAU;IAIzB,wBAAwB,EAAE,wBAAwB,CAAC;IAKnD,cAAc,EAAE,cAAc,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,gB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M,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;AAED,gEAAgE;AAChE,MAAM,WAAW,sBAAsB;IACrC,gDAAgD;IAChD,YAAY,CAAC,EAAE,eAAe,EAAE,CAAC;IACjC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/models/responses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CallConnection } from \"../callConnection.js\";\nimport type { CallConnectionProperties, CallParticipant } from \"./models.js\";\nimport type { RecordingState, 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 { 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\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}\n"]}
@@ -1,5 +1,6 @@
1
1
  import type { CommunicationIdentifier } from "@azure/communication-common";
2
- import type { TranscriptionResultState } from "../generated/src/index.js";
2
+ import type { SentimentAnalysisResult, TranscriptionResultState } from "../generated/src/index.js";
3
+ import { PiiRedactionOptions } from "./models.js";
3
4
  /**
4
5
  * Audio streaming data.
5
6
  */
@@ -54,12 +55,18 @@ export interface TranscriptionMetadata {
54
55
  subscriptionId: string;
55
56
  /** The target locale in which the translated text needs to be.*/
56
57
  locale: string;
58
+ /** The list of locale.*/
59
+ locales: string[];
57
60
  /** call connection Id.*/
58
61
  callConnectionId: string;
59
62
  /** correlation Id.*/
60
63
  correlationId: string;
61
64
  /** The custom speech recognition model endpoint id.*/
62
65
  speechRecognitionModelEndpointId: string;
66
+ /** Enable sentiment analysis.*/
67
+ enableSentimentAnalysis?: boolean;
68
+ /** PII Redaction options. */
69
+ piiRedactionOptions?: PiiRedactionOptions;
63
70
  }
64
71
  /**
65
72
  * Streaming Transcription.
@@ -81,6 +88,10 @@ export interface TranscriptionData {
81
88
  participant: CommunicationIdentifier;
82
89
  /** State of the result of transcription. */
83
90
  resultState: TranscriptionResultState;
91
+ /** Sentiment analysis result. */
92
+ sentimentAnalysisResult: SentimentAnalysisResult;
93
+ /** The identified language for a spoken phrase. */
94
+ languageIdentified: string;
84
95
  }
85
96
  /**
86
97
  * Dtmf streaming data.
@@ -1 +1 @@
1
- {"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../src/models/streaming.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb;;wDAEoD;IACpD,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,WAAW,CAAC,EAAE,uBAAuB,GAAG,SAAS,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,sGAAsG;IACtG,QAAQ,EAAE,MAAM,CAAC;IACjB,yFAAyF;IACzF,UAAU,EAAE,MAAM,CAAC;IACnB;mEAC+D;IAC/D,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,WAAW,CAAC;AAGlD,MAAM,WAAW,SA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B,GACzB,WAAW,GACX,eAAe,GACf,mBAAmB,GACnB,uBAAuB,GACvB,UAAU,CAAC;AAGf,oBAAY,OAAO;IACjB,OAAO,IAAI;IACX,IAAI,IAAI;CACT;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,IAAI,EAAE,SAAS,CAAC;IAChB,+BAA+B;IAC/B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,oCAAoC;IACpC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAc5D;AAED;;GAEG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,CAQpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"streaming.js","sourceRoot":"","sources":["../../../src/models/streaming.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAsHlC,oBAAoB;AACpB,MAAM,CAAN,IAAY,OAGX;AAHD,WAAY,OAAO;IACjB,2CAAW,CAAA;IACX,qCAAQ,CAAA;AACV,CAAC,EAHW,OAAO,KAAP,OAAO,QAGlB;AAcD;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,MAAM,gBAAgB,GAAqB;QACzC,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACT,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,KAAK;SAChB;QACD,SAAS,EAAE,EAAE;KACd,CAAC;IAEF,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B;IACzC,MAAM,gBAAgB,GAAqB;QACzC,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,EAAE;KACd,CAAC;IACF,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommunicationIdentifier } from \"@azure/communication-common\";\nimport type { TranscriptionResultState } from \"../generated/src/index.js\";\n\n/**\n * Audio streaming data.\n */\nexport interface AudioData {\n /** A unique identifier for the media subscription.*/\n data: string;\n /** The timestamp indicating when the media content was received by the bot,\n or if the bot is sending media, the timestamp of when the media was sourced.\n The format is ISO 8601 (yyyy-mm-ddThh:mm).*/\n timestamp?: Date;\n /** Indicates whether the received audio buffer contains only silence..*/\n isSilent?: boolean;\n /** The identified speaker based on participant raw ID. */\n participant?: CommunicationIdentifier | undefined;\n}\n\n/**\n * Audio streaming metadata.\n */\nexport interface AudioMetadata {\n /** Audio streaming subscription id.*/\n subscriptionId: string;\n /** The format used to encode the audio. Currently, only \"pcm\" (Pulse Code Modulation) is supported.*/\n encoding: string;\n /** The number of samples per second in the audio. Supported values are 16kHz or 24kHz.*/\n sampleRate: number;\n /** Specifies the number of audio channels in the audio configuration.\n Currently, only \"mono\" (single channel) is supported.*/\n channels: Channel;\n}\n\n/**\n * Streaming media kind.\n */\nexport type MediaKind = \"audioData\" | \"stopAudio\";\n\n// Out streaming Stop Audio Data\nexport interface StopAudio {}\n\n/**\n * Text in the phrase.\n */\nexport interface WordData {\n /** Text in the phrase.*/\n text: string;\n /** The word's position within the phrase.*/\n offsetInTicks: number;\n /** Duration in ticks. 1 tick = 100 nanoseconds.*/\n durationInTicks: number;\n}\n\n/**\n * Metadata for Transcription Streaming.\n */\nexport interface TranscriptionMetadata {\n /** Transcription Subscription Id.*/\n subscriptionId: string;\n /** The target locale in which the translated text needs to be.*/\n locale: string;\n /** call connection Id.*/\n callConnectionId: string;\n /** correlation Id.*/\n correlationId: string;\n /** The custom speech recognition model endpoint id.*/\n speechRecognitionModelEndpointId: string;\n}\n\n/**\n * Streaming Transcription.\n */\nexport interface TranscriptionData {\n /** The display form of the recognized word.*/\n text: string;\n /** The format of text.*/\n format: string;\n /** Confidence of recognition of the whole phrase, from 0.0 (no confidence) to 1.0 (full confidence). */\n confidence: number;\n /** The position of this payload. 1 tick = 100 nanoseconds. */\n offsetInTicks: number;\n /** Duration in ticks. 1 tick = 100 nanoseconds. */\n durationInTicks: number;\n /** The result for each word of the phrase. */\n words: WordData[];\n /** The identified speaker based on participant raw ID. */\n participant: CommunicationIdentifier;\n /** State of the result of transcription. */\n resultState: TranscriptionResultState;\n}\n\n/**\n * Dtmf streaming data.\n */\nexport interface DtmfData {\n /** A unique identifier for the media subscription.*/\n data: string;\n}\n\n// StreamingDataResult type | TranscriptionMetadata| TranscriptionData| AudioData| AudioMetadata;\nexport type StreamingDataResult =\n | TranscriptionMetadata\n | TranscriptionData\n | AudioData\n | AudioMetadata\n | DtmfData;\n\n// Enum for different kinds of streaming data in a call automation system\nexport type StreamingDataKind =\n | \"AudioData\"\n | \"AudioMetadata\"\n | \"TranscriptionData\"\n | \"TranscriptionMetadata\"\n | \"DtmfData\";\n\n// Enum for channel.\nexport enum Channel {\n Unknown = 0,\n Mono = 1,\n}\n\n/**\n * OutboundStreamingAudioData interface for outbound audio streaming payload.\n */\nexport interface OutStreamingData {\n /** Out streaming data kind ex. StopAudio, AudioData*/\n kind: MediaKind;\n /** Out streaming Audio Data */\n audioData?: AudioData;\n /** Out streaming Stop Audio Data */\n stopAudio?: StopAudio;\n}\n\n/**\n * Helper function to create outbound audio data payload.\n */\nexport function createOutboundAudioData(data: string): string {\n const outStreamingData: OutStreamingData = {\n kind: \"audioData\",\n audioData: {\n data: data,\n timestamp: undefined,\n participant: undefined,\n isSilent: false,\n },\n stopAudio: {},\n };\n\n const json = JSON.stringify(outStreamingData);\n return json;\n}\n\n/**\n * Helper function to create outbound stop audio data payload.\n */\nexport function createOutboundStopAudioData(): string {\n const outStreamingData: OutStreamingData = {\n kind: \"stopAudio\",\n audioData: undefined,\n stopAudio: {},\n };\n const json = JSON.stringify(outStreamingData);\n return json;\n}\n"]}
1
+ {"version":3,"file":"streaming.js","sourceRoot":"","sources":["../../../src/models/streaming.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAyIlC,oBAAoB;AACpB,MAAM,CAAN,IAAY,OAGX;AAHD,WAAY,OAAO;IACjB,2CAAW,CAAA;IACX,qCAAQ,CAAA;AACV,CAAC,EAHW,OAAO,KAAP,OAAO,QAGlB;AAcD;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAAY;IAClD,MAAM,gBAAgB,GAAqB;QACzC,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE;YACT,IAAI,EAAE,IAAI;YACV,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE,SAAS;YACtB,QAAQ,EAAE,KAAK;SAChB;QACD,SAAS,EAAE,EAAE;KACd,CAAC;IAEF,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B;IACzC,MAAM,gBAAgB,GAAqB;QACzC,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,SAAS;QACpB,SAAS,EAAE,EAAE;KACd,CAAC;IACF,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC9C,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommunicationIdentifier } from \"@azure/communication-common\";\nimport type { SentimentAnalysisResult, TranscriptionResultState } from \"../generated/src/index.js\";\nimport { PiiRedactionOptions } from \"./models.js\";\n\n/**\n * Audio streaming data.\n */\nexport interface AudioData {\n /** A unique identifier for the media subscription.*/\n data: string;\n /** The timestamp indicating when the media content was received by the bot,\n or if the bot is sending media, the timestamp of when the media was sourced.\n The format is ISO 8601 (yyyy-mm-ddThh:mm).*/\n timestamp?: Date;\n /** Indicates whether the received audio buffer contains only silence..*/\n isSilent?: boolean;\n /** The identified speaker based on participant raw ID. */\n participant?: CommunicationIdentifier | undefined;\n}\n\n/**\n * Audio streaming metadata.\n */\nexport interface AudioMetadata {\n /** Audio streaming subscription id.*/\n subscriptionId: string;\n /** The format used to encode the audio. Currently, only \"pcm\" (Pulse Code Modulation) is supported.*/\n encoding: string;\n /** The number of samples per second in the audio. Supported values are 16kHz or 24kHz.*/\n sampleRate: number;\n /** Specifies the number of audio channels in the audio configuration.\n Currently, only \"mono\" (single channel) is supported.*/\n channels: Channel;\n}\n\n/**\n * Streaming media kind.\n */\nexport type MediaKind = \"audioData\" | \"stopAudio\";\n\n// Out streaming Stop Audio Data\nexport interface StopAudio {}\n\n/**\n * Text in the phrase.\n */\nexport interface WordData {\n /** Text in the phrase.*/\n text: string;\n /** The word's position within the phrase.*/\n offsetInTicks: number;\n /** Duration in ticks. 1 tick = 100 nanoseconds.*/\n durationInTicks: number;\n}\n\n/**\n * Metadata for Transcription Streaming.\n */\nexport interface TranscriptionMetadata {\n /** Transcription Subscription Id.*/\n subscriptionId: string;\n /** The target locale in which the translated text needs to be.*/\n locale: string;\n /** The list of locale.*/\n locales: string[];\n /** call connection Id.*/\n callConnectionId: string;\n /** correlation Id.*/\n correlationId: string;\n /** The custom speech recognition model endpoint id.*/\n speechRecognitionModelEndpointId: string;\n /** Enable sentiment analysis.*/\n enableSentimentAnalysis?: boolean;\n /** PII Redaction options. */\n piiRedactionOptions?: PiiRedactionOptions;\n}\n\n/**\n * Streaming Transcription.\n */\nexport interface TranscriptionData {\n /** The display form of the recognized word.*/\n text: string;\n /** The format of text.*/\n format: string;\n /** Confidence of recognition of the whole phrase, from 0.0 (no confidence) to 1.0 (full confidence). */\n confidence: number;\n /** The position of this payload. 1 tick = 100 nanoseconds. */\n offsetInTicks: number;\n /** Duration in ticks. 1 tick = 100 nanoseconds. */\n durationInTicks: number;\n /** The result for each word of the phrase. */\n words: WordData[];\n /** The identified speaker based on participant raw ID. */\n participant: CommunicationIdentifier;\n /** State of the result of transcription. */\n resultState: TranscriptionResultState;\n /** Sentiment analysis result. */\n sentimentAnalysisResult: SentimentAnalysisResult;\n /** The identified language for a spoken phrase. */\n languageIdentified: string;\n}\n\n/**\n * Dtmf streaming data.\n */\nexport interface DtmfData {\n /** A unique identifier for the media subscription.*/\n data: string;\n}\n\n// /**\n// * Sentiment analysis result.\n// */\n// export interface SentimentAnalysisResult {\n// /** Gets or sets the value of the sentiment detected (positive, negative, neutral, mixed). */\n// sentiment:string\n// }\n\n// StreamingDataResult type | TranscriptionMetadata| TranscriptionData| AudioData| AudioMetadata;\nexport type StreamingDataResult =\n | TranscriptionMetadata\n | TranscriptionData\n | AudioData\n | AudioMetadata\n | DtmfData;\n\n// Enum for different kinds of streaming data in a call automation system\nexport type StreamingDataKind =\n | \"AudioData\"\n | \"AudioMetadata\"\n | \"TranscriptionData\"\n | \"TranscriptionMetadata\"\n | \"DtmfData\";\n\n// Enum for channel.\nexport enum Channel {\n Unknown = 0,\n Mono = 1,\n}\n\n/**\n * OutboundStreamingAudioData interface for outbound audio streaming payload.\n */\nexport interface OutStreamingData {\n /** Out streaming data kind ex. StopAudio, AudioData*/\n kind: MediaKind;\n /** Out streaming Audio Data */\n audioData?: AudioData;\n /** Out streaming Stop Audio Data */\n stopAudio?: StopAudio;\n}\n\n/**\n * Helper function to create outbound audio data payload.\n */\nexport function createOutboundAudioData(data: string): string {\n const outStreamingData: OutStreamingData = {\n kind: \"audioData\",\n audioData: {\n data: data,\n timestamp: undefined,\n participant: undefined,\n isSilent: false,\n },\n stopAudio: {},\n };\n\n const json = JSON.stringify(outStreamingData);\n return json;\n}\n\n/**\n * Helper function to create outbound stop audio data payload.\n */\nexport function createOutboundStopAudioData(): string {\n const outStreamingData: OutStreamingData = {\n kind: \"stopAudio\",\n audioData: undefined,\n stopAudio: {},\n };\n const json = JSON.stringify(outStreamingData);\n return json;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"streamingData.d.ts","sourceRoot":"","sources":["../../src/streamingData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAIV,iBAAiB,EACjB,mBAAmB,EAGpB,MAAM,uBAAuB,CAAC;AAE/B,8DAA8D;AAC9D,qBAAa,aAAa;IAExB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAoB;IAEhD;mIAC+H;IAC/H,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,mBAAmB;IAK7D,MAAM,CAAC,gBAAgB,IAAI,iBAAiB;IAI5C;mIAC+H;IAC/H,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAgFlC"}
1
+ {"version":3,"file":"streamingData.d.ts","sourceRoot":"","sources":["../../src/streamingData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAIV,iBAAiB,EACjB,mBAAmB,EAGpB,MAAM,uBAAuB,CAAC;AAE/B,8DAA8D;AAC9D,qBAAa,aAAa;IAExB,OAAO,CAAC,MAAM,CAAC,aAAa,CAAoB;IAEhD;mIAC+H;IAC/H,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,mBAAmB;IAK7D,MAAM,CAAC,gBAAgB,IAAI,iBAAiB;IAI5C;mIAC+H;IAC/H,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAqFlC"}
@@ -35,6 +35,9 @@ export class StreamingData {
35
35
  callConnectionId: jsonObject.transcriptionMetadata.callConnectionId,
36
36
  correlationId: jsonObject.transcriptionMetadata.correlationId,
37
37
  speechRecognitionModelEndpointId: jsonObject.transcriptionMetadata.speechRecognitionModelEndpointId,
38
+ enableSentimentAnalysis: jsonObject.transcriptionMetadata.enableSentimentAnalysis,
39
+ piiRedactionOptions: jsonObject.transcriptionMetadata.piiRedactionOptions,
40
+ locales: jsonObject.transcriptionMetadata.locales,
38
41
  };
39
42
  StreamingData.streamingKind = kind;
40
43
  return transcriptionMetadata;
@@ -53,6 +56,8 @@ export class StreamingData {
53
56
  })),
54
57
  participant: createIdentifierFromRawId(jsonObject.transcriptionData.participantRawID),
55
58
  resultState: jsonObject.transcriptionData.resultStatus,
59
+ sentimentAnalysisResult: jsonObject.transcriptionData.sentimentAnalysisResult,
60
+ languageIdentified: jsonObject.transcriptionData.languageIdentified,
56
61
  };
57
62
  StreamingData.streamingKind = kind;
58
63
  return transcriptionData;
@@ -1 +1 @@
1
- {"version":3,"file":"streamingData.js","sourceRoot":"","sources":["../../src/streamingData.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAWxE,8DAA8D;AAC9D,MAAM,OAAO,aAAa;IACxB,oGAAoG;IAC5F,MAAM,CAAC,aAAa,CAAoB;IAEhD;mIAC+H;IAC/H,MAAM,CAAC,KAAK,CAAC,IAA0B;QACrC,OAAO,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,2BAA2B;IAC3B,MAAM,CAAC,gBAAgB;QACrB,OAAO,aAAa,CAAC,aAAa,CAAC;IACrC,CAAC;IAED;mIAC+H;IACvH,MAAM,CAAC,kBAAkB,CAAC,IAA0B;QAC1D,IAAI,UAAkB,CAAC;QAEvB,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,UAAU,GAAG,IAAI,CAAC;QACpB,CAAC;aAAM,CAAC;YACN,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;YAClC,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,IAAI,GAAsB,UAAU,CAAC,IAAI,CAAC;QAEhD,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,uBAAuB,CAAC,CAAC,CAAC;gBAC7B,MAAM,qB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kB;oBACnC,cAAc,EAAE,UAAU,CAAC,aAAa,CAAC,cAAc;oBACvD,QAAQ,EAAE,UAAU,CAAC,aAAa,CAAC,QAAQ;oBAC3C,UAAU,EAAE,UAAU,CAAC,aAAa,CAAC,UAAU;oBAC/C,QAAQ,EAAE,UAAU,CAAC,aAAa,CAAC,QAAQ;iBAC5C,CAAC;gBACF,aAAa,CAAC,aAAa,GAAG,IAAI,CAAC;gBACnC,OAAO,aAAa,CAAC;YACvB,CAAC;YACD,KAAK,WAAW,CAAC,CAAC,CAAC;gBACjB,MAAM,SAAS,GAAc;oBAC3B,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC,IAAI;oBAC/B,SAAS,EAAE,UAAU,CAAC,SAAS,CAAC,SAAS;oBACzC,QAAQ,EAAE,UAAU,CAAC,SAAS,CAAC,MAAM;oBACrC,WAAW,EACT,UAAU,CAAC,SAAS,CAAC,gBAAgB,KAAK,SAAS;wBACjD,CAAC,CAAC,yBAAyB,CAAC,UAAU,CAAC,SAAS,CAAC,gBAAgB,CAAC;wBAClE,CAAC,CAAC,SAAS;iBAChB,CAAC;gBACF,aAAa,CAAC,aAAa,GAAG,IAAI,CAAC;gBACnC,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,MAAM,QAAQ,GAAa;oBACzB,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI;iBAC/B,CAAC;gBACF,aAAa,CAAC,aAAa,GAAG,IAAI,CAAC;gBACnC,OAAO,QAAQ,CAAC;YAClB,CAAC;YACD;gBACE,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createIdentifierFromRawId } from \"@azure/communication-common\";\nimport type {\n AudioData,\n AudioMetadata,\n DtmfData,\n StreamingDataKind,\n StreamingDataResult,\n TranscriptionData,\n TranscriptionMetadata,\n} from \"./models/streaming.js\";\n\n/** Class to handle the parsing of incoming streaming data. */\nexport class StreamingData {\n // Kind of the streaming data ex.AudioData, AudioMetadata, TranscriptionData, TranscriptionMetadata.\n private static streamingKind: StreamingDataKind;\n\n /** Parses a encoded json string or buffer into a StreamingData object,\n which can be one of the following subtypes: AudioData, AudioMetadata, TranscriptionData, or TranscriptionMetadata. */\n static parse(data: string | ArrayBuffer): StreamingDataResult {\n return StreamingData.parseStreamingData(data);\n }\n\n // Get Streaming data Kind.\n static getStreamingKind(): StreamingDataKind {\n return StreamingData.streamingKind;\n }\n\n /** Parses a encoded json string or buffer into a StreamingData object,\n which can be one of the following subtypes: AudioData, AudioMetadata, TranscriptionData, or TranscriptionMetadata. */\n private static parseStreamingData(data: string | ArrayBuffer): StreamingDataResult {\n let stringJson: string;\n\n if (typeof data === \"string\") {\n stringJson = data;\n } else {\n const decoder = new TextDecoder();\n stringJson = decoder.decode(data);\n }\n\n const jsonObject = JSON.parse(stringJson);\n const kind: StreamingDataKind = jsonObject.kind;\n\n switch (kind) {\n case \"TranscriptionMetadata\": {\n const transcriptionMetadata: TranscriptionMetadata = {\n subscriptionId: jsonObject.transcriptionMetadata.subscriptionId,\n locale: jsonObject.transcriptionMetadata.locale,\n callConnectionId: jsonObject.transcriptionMetadata.callConnectionId,\n correlationId: jsonObject.transcriptionMetadata.correlationId,\n speechRecognitionModelEndpointId:\n jsonObject.transcriptionMetadata.speechRecognitionModelEndpointId,\n };\n StreamingData.streamingKind = kind;\n return transcriptionMetadata;\n }\n case \"TranscriptionData\": {\n const transcriptionData: TranscriptionData = {\n text: jsonObject.transcriptionData.text,\n format: jsonObject.transcriptionData.format,\n confidence: jsonObject.transcriptionData.confidence,\n offsetInTicks: jsonObject.transcriptionData.offset,\n durationInTicks: jsonObject.transcriptionData.duration,\n words: jsonObject.transcriptionData.words.map(\n (word: { text: string; offset: number; duration: number }) => ({\n text: word.text,\n offsetInTicks: word.offset,\n durationInTicks: word.duration,\n }),\n ),\n participant: createIdentifierFromRawId(jsonObject.transcriptionData.participantRawID),\n resultState: jsonObject.transcriptionData.resultStatus,\n };\n StreamingData.streamingKind = kind;\n return transcriptionData;\n }\n case \"AudioMetadata\": {\n const audioMetadata: AudioMetadata = {\n subscriptionId: jsonObject.audioMetadata.subscriptionId,\n encoding: jsonObject.audioMetadata.encoding,\n sampleRate: jsonObject.audioMetadata.sampleRate,\n channels: jsonObject.audioMetadata.channels,\n };\n StreamingData.streamingKind = kind;\n return audioMetadata;\n }\n case \"AudioData\": {\n const audioData: AudioData = {\n data: jsonObject.audioData.data,\n timestamp: jsonObject.audioData.timestamp,\n isSilent: jsonObject.audioData.silent,\n participant:\n jsonObject.audioData.participantRawID !== undefined\n ? createIdentifierFromRawId(jsonObject.audioData.participantRawID)\n : undefined,\n };\n StreamingData.streamingKind = kind;\n return audioData;\n }\n case \"DtmfData\": {\n const dtmfData: DtmfData = {\n data: jsonObject.dtmfData.data,\n };\n StreamingData.streamingKind = kind;\n return dtmfData;\n }\n default:\n throw new Error(\"Unknown data kind: \" + jsonObject.kind);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"streamingData.js","sourceRoot":"","sources":["../../src/streamingData.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAWxE,8DAA8D;AAC9D,MAAM,OAAO,aAAa;IACxB,oGAAoG;IAC5F,MAAM,CAAC,aAAa,CAAoB;IAEhD;mIAC+H;IAC/H,MAAM,CAAC,KAAK,CAAC,IAA0B;QACrC,OAAO,aAAa,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,2BAA2B;IAC3B,MAAM,CAAC,gBAAgB;QACrB,OAAO,aAAa,CAAC,aAAa,CAAC;IACrC,CAAC;IAED;mIAC+H;IACvH,MAAM,CAAC,kBAAkB,CAAC,IAA0B;QAC1D,IAAI,UAAk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rC,WAAW,EACT,UAAU,CAAC,SAAS,CAAC,gBAAgB,KAAK,SAAS;wBACjD,CAAC,CAAC,yBAAyB,CAAC,UAAU,CAAC,SAAS,CAAC,gBAAgB,CAAC;wBAClE,CAAC,CAAC,SAAS;iBAChB,CAAC;gBACF,aAAa,CAAC,aAAa,GAAG,IAAI,CAAC;gBACnC,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,KAAK,UAAU,CAAC,CAAC,CAAC;gBAChB,MAAM,QAAQ,GAAa;oBACzB,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI;iBAC/B,CAAC;gBACF,aAAa,CAAC,aAAa,GAAG,IAAI,CAAC;gBACnC,OAAO,QAAQ,CAAC;YAClB,CAAC;YACD;gBACE,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createIdentifierFromRawId } from \"@azure/communication-common\";\nimport type {\n AudioData,\n AudioMetadata,\n DtmfData,\n StreamingDataKind,\n StreamingDataResult,\n TranscriptionData,\n TranscriptionMetadata,\n} from \"./models/streaming.js\";\n\n/** Class to handle the parsing of incoming streaming data. */\nexport class StreamingData {\n // Kind of the streaming data ex.AudioData, AudioMetadata, TranscriptionData, TranscriptionMetadata.\n private static streamingKind: StreamingDataKind;\n\n /** Parses a encoded json string or buffer into a StreamingData object,\n which can be one of the following subtypes: AudioData, AudioMetadata, TranscriptionData, or TranscriptionMetadata. */\n static parse(data: string | ArrayBuffer): StreamingDataResult {\n return StreamingData.parseStreamingData(data);\n }\n\n // Get Streaming data Kind.\n static getStreamingKind(): StreamingDataKind {\n return StreamingData.streamingKind;\n }\n\n /** Parses a encoded json string or buffer into a StreamingData object,\n which can be one of the following subtypes: AudioData, AudioMetadata, TranscriptionData, or TranscriptionMetadata. */\n private static parseStreamingData(data: string | ArrayBuffer): StreamingDataResult {\n let stringJson: string;\n\n if (typeof data === \"string\") {\n stringJson = data;\n } else {\n const decoder = new TextDecoder();\n stringJson = decoder.decode(data);\n }\n\n const jsonObject = JSON.parse(stringJson);\n const kind: StreamingDataKind = jsonObject.kind;\n\n switch (kind) {\n case \"TranscriptionMetadata\": {\n const transcriptionMetadata: TranscriptionMetadata = {\n subscriptionId: jsonObject.transcriptionMetadata.subscriptionId,\n locale: jsonObject.transcriptionMetadata.locale,\n callConnectionId: jsonObject.transcriptionMetadata.callConnectionId,\n correlationId: jsonObject.transcriptionMetadata.correlationId,\n speechRecognitionModelEndpointId:\n jsonObject.transcriptionMetadata.speechRecognitionModelEndpointId,\n enableSentimentAnalysis: jsonObject.transcriptionMetadata.enableSentimentAnalysis,\n piiRedactionOptions: jsonObject.transcriptionMetadata.piiRedactionOptions,\n locales: jsonObject.transcriptionMetadata.locales,\n };\n StreamingData.streamingKind = kind;\n return transcriptionMetadata;\n }\n case \"TranscriptionData\": {\n const transcriptionData: TranscriptionData = {\n text: jsonObject.transcriptionData.text,\n format: jsonObject.transcriptionData.format,\n confidence: jsonObject.transcriptionData.confidence,\n offsetInTicks: jsonObject.transcriptionData.offset,\n durationInTicks: jsonObject.transcriptionData.duration,\n words: jsonObject.transcriptionData.words.map(\n (word: { text: string; offset: number; duration: number }) => ({\n text: word.text,\n offsetInTicks: word.offset,\n durationInTicks: word.duration,\n }),\n ),\n participant: createIdentifierFromRawId(jsonObject.transcriptionData.participantRawID),\n resultState: jsonObject.transcriptionData.resultStatus,\n sentimentAnalysisResult: jsonObject.transcriptionData.sentimentAnalysisResult,\n languageIdentified: jsonObject.transcriptionData.languageIdentified,\n };\n StreamingData.streamingKind = kind;\n return transcriptionData;\n }\n case \"AudioMetadata\": {\n const audioMetadata: AudioMetadata = {\n subscriptionId: jsonObject.audioMetadata.subscriptionId,\n encoding: jsonObject.audioMetadata.encoding,\n sampleRate: jsonObject.audioMetadata.sampleRate,\n channels: jsonObject.audioMetadata.channels,\n };\n StreamingData.streamingKind = kind;\n return audioMetadata;\n }\n case \"AudioData\": {\n const audioData: AudioData = {\n data: jsonObject.audioData.data,\n timestamp: jsonObject.audioData.timestamp,\n isSilent: jsonObject.audioData.silent,\n participant:\n jsonObject.audioData.participantRawID !== undefined\n ? createIdentifierFromRawId(jsonObject.audioData.participantRawID)\n : undefined,\n };\n StreamingData.streamingKind = kind;\n return audioData;\n }\n case \"DtmfData\": {\n const dtmfData: DtmfData = {\n data: jsonObject.dtmfData.data,\n };\n StreamingData.streamingKind = kind;\n return dtmfData;\n }\n default:\n throw new Error(\"Unknown data kind: \" + jsonObject.kind);\n }\n }\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, TeamsPhoneSourceDetailsInternal, TeamsPhoneCallerDetailsInternal } 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,CAqEzB;AAED,4FAA4F;AAC5F,wBAAgB,qCAAqC,CACnD,UAAU,EAAE,uBAAuB,GAClC,4BAA4B,CAoD9B;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;AACrG,wBAAgB,yCAAyC,CACvD,UAAU,EAAE,2BAA2B,GAAG,SAAS,GAClD,gCAAgC,GAAG,SAAS,CAM9C;AAED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AAS,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"}
@@ -178,4 +178,117 @@ export function microsoftTeamsAppIdentifierConverter(identifier) {
178
178
  }
179
179
  return { teamsAppId: identifier.appId };
180
180
  }
181
+ /**
182
+ * Converts from public TeamsPhoneCallerDetails to internal TeamsPhoneCallerDetailsModel
183
+ */
184
+ export function teamsPhoneCallerDetailsModelConverter(teamsPhoneCallerDetails) {
185
+ if (!teamsPhoneCallerDetails) {
186
+ return undefined;
187
+ }
188
+ return {
189
+ caller: communicationIdentifierModelConverter(teamsPhoneCallerDetails.caller),
190
+ name: teamsPhoneCallerDetails.name,
191
+ phoneNumber: teamsPhoneCallerDetails.phoneNumber,
192
+ recordId: teamsPhoneCallerDetails.recordId,
193
+ screenPopUrl: teamsPhoneCallerDetails.screenPopUrl,
194
+ isAuthenticated: teamsPhoneCallerDetails.isAuthenticated,
195
+ additionalCallerInformation: teamsPhoneCallerDetails.additionalCallerInformation,
196
+ };
197
+ }
198
+ /**
199
+ * Converts from public TeamsPhoneSourceDetails to internal TeamsPhoneSourceDetailsModel
200
+ */
201
+ export function teamsPhoneSourceDetailsModelConverter(teamsPhoneSourceDetails) {
202
+ if (!teamsPhoneSourceDetails) {
203
+ return undefined;
204
+ }
205
+ const intendedTargets = {};
206
+ if (teamsPhoneSourceDetails.intendedTargets) {
207
+ for (const [key, value] of Object.entries(teamsPhoneSourceDetails.intendedTargets)) {
208
+ intendedTargets[key] = communicationIdentifierModelConverter(value);
209
+ }
210
+ }
211
+ return {
212
+ source: communicationIdentifierModelConverter(teamsPhoneSourceDetails.source),
213
+ language: teamsPhoneSourceDetails.language,
214
+ status: teamsPhoneSourceDetails.status,
215
+ intendedTargets: Object.keys(intendedTargets).length > 0 ? intendedTargets : undefined,
216
+ };
217
+ }
218
+ /**
219
+ * Converts from public TeamsPhoneCallDetails to internal TeamsPhoneCallDetailsModel
220
+ */
221
+ export function teamsPhoneCallDetailsModelConverter(teamsPhoneCallDetails) {
222
+ if (!teamsPhoneCallDetails) {
223
+ return undefined;
224
+ }
225
+ return {
226
+ teamsPhoneCallerDetails: teamsPhoneCallerDetailsModelConverter(teamsPhoneCallDetails.teamsPhoneCallerDetails),
227
+ teamsPhoneSourceDetails: teamsPhoneSourceDetailsModelConverter(teamsPhoneCallDetails.teamsPhoneSourceDetails),
228
+ sessionId: teamsPhoneCallDetails.sessionId,
229
+ intent: teamsPhoneCallDetails.intent,
230
+ callTopic: teamsPhoneCallDetails.callTopic,
231
+ callContext: teamsPhoneCallDetails.callContext,
232
+ transcriptUrl: teamsPhoneCallDetails.transcriptUrl,
233
+ callSentiment: teamsPhoneCallDetails.callSentiment,
234
+ suggestedActions: teamsPhoneCallDetails.suggestedActions,
235
+ };
236
+ }
237
+ /**
238
+ * Converts from internal TeamsPhoneCallerDetailsInternal to public TeamsPhoneCallerDetails (for incoming events)
239
+ */
240
+ export function teamsPhoneCallerDetailsConverter(teamsPhoneCallerDetails) {
241
+ if (!teamsPhoneCallerDetails) {
242
+ return undefined;
243
+ }
244
+ return {
245
+ caller: communicationIdentifierConverter(teamsPhoneCallerDetails.caller),
246
+ name: teamsPhoneCallerDetails.name,
247
+ phoneNumber: teamsPhoneCallerDetails.phoneNumber,
248
+ recordId: teamsPhoneCallerDetails.recordId,
249
+ screenPopUrl: teamsPhoneCallerDetails.screenPopUrl,
250
+ isAuthenticated: teamsPhoneCallerDetails.isAuthenticated,
251
+ additionalCallerInformation: teamsPhoneCallerDetails.additionalCallerInformation,
252
+ };
253
+ }
254
+ /**
255
+ * Converts from internal TeamsPhoneSourceDetailsInternal to public TeamsPhoneSourceDetails (for incoming events)
256
+ */
257
+ export function teamsPhoneSourceDetailsConverter(teamsPhoneSourceDetails) {
258
+ if (!teamsPhoneSourceDetails) {
259
+ return undefined;
260
+ }
261
+ const intendedTargets = {};
262
+ if (teamsPhoneSourceDetails.intendedTargets) {
263
+ for (const [key, value] of Object.entries(teamsPhoneSourceDetails.intendedTargets)) {
264
+ intendedTargets[key] = communicationIdentifierConverter(value);
265
+ }
266
+ }
267
+ return {
268
+ source: communicationIdentifierConverter(teamsPhoneSourceDetails.source),
269
+ language: teamsPhoneSourceDetails.language,
270
+ status: teamsPhoneSourceDetails.status,
271
+ intendedTargets: Object.keys(intendedTargets).length > 0 ? intendedTargets : undefined,
272
+ };
273
+ }
274
+ /**
275
+ * Converts from internal TeamsPhoneCallDetailsInternal to public TeamsPhoneCallDetails (for incoming events)
276
+ */
277
+ export function teamsPhoneCallDetailsConverter(teamsPhoneCallDetails) {
278
+ if (!teamsPhoneCallDetails) {
279
+ return undefined;
280
+ }
281
+ return {
282
+ kind: "teamsPhoneCallDetails",
283
+ teamsPhoneCallerDetails: teamsPhoneCallerDetailsConverter(teamsPhoneCallDetails.teamsPhoneCallerDetails),
284
+ teamsPhoneSourceDetails: teamsPhoneSourceDetailsConverter(teamsPhoneCallDetails.teamsPhoneSourceDetails),
285
+ sessionId: teamsPhoneCallDetails.sessionId,
286
+ intent: teamsPhoneCallDetails.intent,
287
+ callTopic: teamsPhoneCallDetails.callTopic,
288
+ callContext: teamsPhoneCallDetails.callContext,
289
+ transcriptUrl: teamsPhoneCallDetails.transcriptUrl,
290
+ callSentiment: teamsPhoneCallDetails.callSentiment,
291
+ suggestedActions: teamsPhoneCallDetails.suggestedActions,
292
+ };
293
+ }
181
294
  //# 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,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAGlF,SAAS,WAAW,CAClB,eAA6C;IAE7C,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,qCAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,qCAAqC,CAAC,WAAW,CAAC;IAC3D,CAAC;IACD,IAAI,eAAe,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO,qCAAqC,CAAC,kBAAkB,CAAC;IAClE,CAAC;IACD,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,qCAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI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AM,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\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\n if (isTeamsExtensionUserIdentifier(identifier)) {\n const teamsExtensionUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.TeamsExtensionUser,\n ...serializedIdentifier,\n };\n return teamsExtensionUserIdentifierModel;\n }\n\n if (isUnknownIdentifier(identifier)) {\n const unknownIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.Unknown,\n ...serializedIdentifier,\n };\n return unknownIdentifierModel;\n }\n\n throw new Error();\n}\n\n/** Convert CallParticipantInternal to CallParticipant */\nexport function callParticipantConverter(\n acsCallParticipant: CallParticipantInternal,\n): CallParticipant {\n const callParticipant: CallParticipant = {\n ...acsCallParticipant,\n identifier: acsCallParticipant.identifier\n ? communicationIdentifierConverter(acsCallParticipant.identifier)\n : undefined,\n };\n return callParticipant;\n}\n\n/** Convert CommunicationUserIdentifier to CommunicationUserIdentifierModel (Internal usage class) */\nexport function communicationUserIdentifierModelConverter(\n identifier: CommunicationUserIdentifier | undefined,\n): CommunicationUserIdentifierModel | undefined {\n if (!identifier || !identifier.communicationUserId) {\n return undefined;\n }\n\n return { id: identifier.communicationUserId };\n}\n\n/** Convert CommunicationUserIdentifierModel to CommunicationUserIdentifier (Public usage class) */\nexport function communicationUserIdentifierConverter(\n identifier: CommunicationUserIdentifierModel | undefined,\n): CommunicationUserIdentifier | undefined {\n if (!identifier || !identifier.id) {\n return undefined;\n }\n\n return { communicationUserId: identifier.id };\n}\n\n/** Convert MicrosoftTeamsAppIdentifier to MicrosoftTeamsAppIdentifierModel (Internal usage class) */\nexport function microsoftTeamsAppIdentifierModelConverter(\n identifier: MicrosoftTeamsAppIdentifier | undefined,\n): MicrosoftTeamsAppIdentifierModel | undefined {\n if (!identifier || !identifier.teamsAppId) {\n return undefined;\n }\n\n return { appId: identifier.teamsAppId };\n}\n\n/** Convert MicrosoftTeamsAppIdentifierModel to MicrosoftTeamsAppIdentifier (Public usage class) */\nexport function microsoftTeamsAppIdentifierConverter(\n identifier: MicrosoftTeamsAppIdentifierModel | undefined,\n): MicrosoftTeamsAppIdentifier | undefined {\n if (!identifier || !identifier.appId) {\n return undefined;\n }\n\n return { teamsAppId: identifier.appId };\n}\n"]}
1
+ {"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAalC,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EACnB,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,6BAA6B,CAAC;AAarC,OAAO,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAQlF,SAAS,WAAW,CAClB,eAA6C;IAE7C,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,qCAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,qCAAqC,CAAC,WAAW,CAAC;IAC3D,CAAC;IACD,IAA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C,MAAM,EAAE,qBAAqB,CAAC,MAAM;QACpC,SAAS,EAAE,qBAAqB,CAAC,SAAS;QAC1C,WAAW,EAAE,qBAAqB,CAAC,WAAW;QAC9C,aAAa,EAAE,qBAAqB,CAAC,aAAa;QAClD,aAAa,EAAE,qBAAqB,CAAC,aAAa;QAClD,gBAAgB,EAAE,qBAAqB,CAAC,gBAAgB;KACzD,CAAC;AACJ,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 TeamsPhoneCallDetailsInternal,\n TeamsPhoneSourceDetailsInternal,\n TeamsPhoneCallerDetailsInternal,\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 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\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\n if (isTeamsExtensionUserIdentifier(identifier)) {\n const teamsExtensionUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.TeamsExtensionUser,\n ...serializedIdentifier,\n };\n return teamsExtensionUserIdentifierModel;\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"callAutomationClient.d.ts","sourceRoot":"","sources":["../../src/callAutomationClient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,6BAA6B,CAAC;AAgBrC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,WAAW,EACjB,MAAM,oBAAoB,CAAC;AAW5B;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE;;OAEG;IACH,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C;AAUD;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAA0B;IAClE,OAAO,CAAC,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,EAAE,eAAe,GAAG,aAAa,EAC3C,OAAO,CAAC,EAAE,2BAA2B;IAmCvC;;;OAGG;IACI,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,GAAG,cAAc;IASlE;;OAEG;IACI,gBAAgB,IAAI,aAAa;IAQxC;;OAEG;IACI,iBAAiB,IAAI,2BAA2B,GAAG,SAAS;YAIrD,kBAAkB;IAgDhC;;;;;OAKG;IACU,UAAU,CACrB,iBAAiB,EAAE,UAAU,EAC7B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IAoB5B;;;;;OAKG;IACU,eAAe,CAC1B,kBAAkB,EAAE,uBAAuB,EAAE,EAC7C,WAAW,EAAE,MAAM,EAEnB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IAkB5B;;;;;OAKG;IACU,UAAU,CACrB,mBAAmB,EAAE,MAAM,EAC3B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IA4D5B;;;;;;OAMG;IACU,YAAY,CACvB,mBAAmB,EAAE,MAAM,EAC3B,iBAAiB,EAAE,UAAU,EAC7B,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC;IAchB;;;;;OAKG;IACU,UAAU,CACrB,mBAAmB,EAAE,MAAM,EAC3B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC;IAchB;;;;;OAKG;IACU,WAAW,CACtB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,iBAAiB,CAAC;CA+D9B"}
@@ -110,6 +110,7 @@ class CallAutomationClient {
110
110
  sourceCallerIdNumber: (0, converters_js_1.PhoneNumberIdentifierModelConverter)(targetParticipant.sourceCallIdNumber),
111
111
  sourceDisplayName: targetParticipant.sourceDisplayName,
112
112
  teamsAppSource: (0, converters_js_1.microsoftTeamsAppIdentifierModelConverter)(options.teamsAppSource),
113
+ enableLoopbackAudio: options.enableLoopbackAudio,
113
114
  };
114
115
  return this.createCallInternal(request, options);
115
116
  }
@@ -133,6 +134,7 @@ class CallAutomationClient {
133
134
  sourceCallerIdNumber: (0, converters_js_1.PhoneNumberIdentifierModelConverter)(options.sourceCallIdNumber),
134
135
  sourceDisplayName: options.sourceDisplayName,
135
136
  teamsAppSource: (0, converters_js_1.microsoftTeamsAppIdentifierModelConverter)(options.teamsAppSource),
137
+ enableLoopbackAudio: options.enableLoopbackAudio,
136
138
  };
137
139
  return this.createCallInternal(request, options);
138
140
  }
@@ -152,6 +154,7 @@ class CallAutomationClient {
152
154
  operationContext: operationContext,
153
155
  callbackUri: callbackUrl,
154
156
  answeredBy: this.sourceIdentity,
157
+ enableLoopbackAudio: options.enableLoopbackAudio,
155
158
  };
156
159
  const optionsInternal = {
157
160
  ...operationOptions,