@azure/communication-call-automation 1.6.0-beta.2 → 1.6.0
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.
- package/dist/commonjs/callAutomationClient.d.ts.map +1 -1
- package/dist/commonjs/callAutomationClient.js +328 -271
- package/dist/commonjs/callAutomationClient.js.map +7 -1
- package/dist/commonjs/callAutomationEventParser.d.ts.map +1 -1
- package/dist/commonjs/callAutomationEventParser.js +193 -184
- package/dist/commonjs/callAutomationEventParser.js.map +7 -1
- package/dist/commonjs/callConnection.d.ts +5 -5
- package/dist/commonjs/callConnection.d.ts.map +1 -1
- package/dist/commonjs/callConnection.js +339 -287
- package/dist/commonjs/callConnection.js.map +7 -1
- package/dist/commonjs/callMedia.d.ts +3 -8
- package/dist/commonjs/callMedia.d.ts.map +1 -1
- package/dist/commonjs/callMedia.js +402 -429
- package/dist/commonjs/callMedia.js.map +7 -1
- package/dist/commonjs/callRecording.js +214 -190
- package/dist/commonjs/callRecording.js.map +7 -1
- package/dist/commonjs/contentDownloader.d.ts +12 -0
- package/dist/commonjs/contentDownloader.d.ts.map +1 -1
- package/dist/commonjs/contentDownloader.js +139 -101
- package/dist/commonjs/contentDownloader.js.map +7 -1
- package/dist/commonjs/generated/src/callAutomationApiClient.d.ts +1 -1
- package/dist/commonjs/generated/src/callAutomationApiClient.js +258 -222
- package/dist/commonjs/generated/src/callAutomationApiClient.js.map +7 -1
- package/dist/commonjs/generated/src/index.js +36 -19
- package/dist/commonjs/generated/src/index.js.map +7 -1
- package/dist/commonjs/generated/src/models/index.d.ts +243 -457
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.js +278 -367
- package/dist/commonjs/generated/src/models/index.js.map +7 -1
- package/dist/commonjs/generated/src/models/mappers.d.ts +21 -26
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +4240 -4281
- package/dist/commonjs/generated/src/models/mappers.js.map +7 -1
- package/dist/commonjs/generated/src/models/parameters.d.ts +0 -1
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +287 -211
- package/dist/commonjs/generated/src/models/parameters.js.map +7 -1
- package/dist/commonjs/generated/src/operations/callConnection.d.ts +1 -1
- package/dist/commonjs/generated/src/operations/callConnection.js +454 -382
- package/dist/commonjs/generated/src/operations/callConnection.js.map +7 -1
- package/dist/commonjs/generated/src/operations/callMedia.d.ts +1 -8
- package/dist/commonjs/generated/src/operations/callMedia.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operations/callMedia.js +394 -354
- package/dist/commonjs/generated/src/operations/callMedia.js.map +7 -1
- package/dist/commonjs/generated/src/operations/callRecording.js +180 -139
- package/dist/commonjs/generated/src/operations/callRecording.js.map +7 -1
- package/dist/commonjs/generated/src/operations/index.js +26 -14
- package/dist/commonjs/generated/src/operations/index.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callConnection.js +16 -10
- package/dist/commonjs/generated/src/operationsInterfaces/callConnection.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts +1 -8
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.js +16 -10
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callRecording.js +16 -10
- package/dist/commonjs/generated/src/operationsInterfaces/callRecording.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +26 -14
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +7 -1
- package/dist/commonjs/generated/src/pagingHelper.js +40 -30
- package/dist/commonjs/generated/src/pagingHelper.js.map +7 -1
- package/dist/commonjs/index.d.ts +3 -3
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +36 -17
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/models/events.d.ts +297 -237
- package/dist/commonjs/models/events.d.ts.map +1 -1
- package/dist/commonjs/models/events.js +16 -5
- package/dist/commonjs/models/events.js.map +7 -1
- package/dist/commonjs/models/logger.js +29 -11
- package/dist/commonjs/models/logger.js.map +7 -1
- package/dist/commonjs/models/mapper.js +99 -78
- package/dist/commonjs/models/mapper.js.map +7 -1
- package/dist/commonjs/models/models.d.ts +8 -29
- package/dist/commonjs/models/models.d.ts.map +1 -1
- package/dist/commonjs/models/models.js +68 -61
- package/dist/commonjs/models/models.js.map +7 -1
- package/dist/commonjs/models/options.d.ts +11 -65
- package/dist/commonjs/models/options.d.ts.map +1 -1
- package/dist/commonjs/models/options.js +16 -5
- package/dist/commonjs/models/options.js.map +7 -1
- package/dist/commonjs/models/responses.js +16 -5
- package/dist/commonjs/models/responses.js.map +7 -1
- package/dist/commonjs/models/streaming.d.ts +1 -12
- package/dist/commonjs/models/streaming.d.ts.map +1 -1
- package/dist/commonjs/models/streaming.js +55 -39
- package/dist/commonjs/models/streaming.js.map +7 -1
- package/dist/commonjs/streamingData.d.ts.map +1 -1
- package/dist/commonjs/streamingData.js +112 -99
- package/dist/commonjs/streamingData.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utli/converters.d.ts.map +1 -1
- package/dist/commonjs/utli/converters.js +285 -275
- package/dist/commonjs/utli/converters.js.map +7 -1
- package/dist/commonjs/utli/recordingUrlValidator.d.ts +9 -0
- package/dist/commonjs/utli/recordingUrlValidator.d.ts.map +1 -0
- package/dist/commonjs/utli/recordingUrlValidator.js +56 -0
- package/dist/commonjs/utli/recordingUrlValidator.js.map +7 -0
- package/dist/esm/callAutomationClient.d.ts.map +1 -1
- package/dist/esm/callAutomationClient.js +1 -4
- package/dist/esm/callAutomationClient.js.map +1 -1
- package/dist/esm/callAutomationEventParser.d.ts.map +1 -1
- package/dist/esm/callAutomationEventParser.js +8 -15
- package/dist/esm/callAutomationEventParser.js.map +1 -1
- package/dist/esm/callConnection.d.ts +5 -5
- package/dist/esm/callConnection.d.ts.map +1 -1
- package/dist/esm/callConnection.js +11 -10
- package/dist/esm/callConnection.js.map +1 -1
- package/dist/esm/callMedia.d.ts +3 -8
- package/dist/esm/callMedia.d.ts.map +1 -1
- package/dist/esm/callMedia.js +7 -35
- package/dist/esm/callMedia.js.map +1 -1
- package/dist/esm/contentDownloader.d.ts +12 -0
- package/dist/esm/contentDownloader.d.ts.map +1 -1
- package/dist/esm/contentDownloader.js +37 -8
- package/dist/esm/contentDownloader.js.map +1 -1
- package/dist/esm/generated/src/callAutomationApiClient.d.ts +1 -1
- package/dist/esm/generated/src/callAutomationApiClient.js +3 -3
- package/dist/esm/generated/src/callAutomationApiClient.js.map +1 -1
- package/dist/esm/generated/src/models/index.d.ts +243 -457
- package/dist/esm/generated/src/models/index.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.js +28 -40
- package/dist/esm/generated/src/models/index.js.map +1 -1
- package/dist/esm/generated/src/models/mappers.d.ts +21 -26
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/esm/generated/src/models/mappers.js +327 -602
- package/dist/esm/generated/src/models/mappers.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.d.ts +0 -1
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +2 -6
- package/dist/esm/generated/src/models/parameters.js.map +1 -1
- package/dist/esm/generated/src/operations/callConnection.d.ts +1 -1
- package/dist/esm/generated/src/operations/callConnection.js +1 -1
- package/dist/esm/generated/src/operations/callConnection.js.map +1 -1
- package/dist/esm/generated/src/operations/callMedia.d.ts +1 -8
- package/dist/esm/generated/src/operations/callMedia.d.ts.map +1 -1
- package/dist/esm/generated/src/operations/callMedia.js +0 -25
- package/dist/esm/generated/src/operations/callMedia.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callConnection.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts +1 -8
- package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callMedia.js.map +1 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/events.d.ts +297 -237
- package/dist/esm/models/events.d.ts.map +1 -1
- package/dist/esm/models/events.js.map +1 -1
- package/dist/esm/models/models.d.ts +8 -29
- package/dist/esm/models/models.d.ts.map +1 -1
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/models/options.d.ts +11 -65
- package/dist/esm/models/options.d.ts.map +1 -1
- package/dist/esm/models/options.js.map +1 -1
- package/dist/esm/models/streaming.d.ts +1 -12
- package/dist/esm/models/streaming.d.ts.map +1 -1
- package/dist/esm/models/streaming.js.map +1 -1
- package/dist/esm/streamingData.d.ts.map +1 -1
- package/dist/esm/streamingData.js +0 -5
- package/dist/esm/streamingData.js.map +1 -1
- package/dist/esm/utli/converters.d.ts.map +1 -1
- package/dist/esm/utli/converters.js +1 -1
- package/dist/esm/utli/converters.js.map +1 -1
- package/dist/esm/utli/recordingUrlValidator.d.ts +9 -0
- package/dist/esm/utli/recordingUrlValidator.d.ts.map +1 -0
- package/dist/esm/utli/recordingUrlValidator.js +45 -0
- package/dist/esm/utli/recordingUrlValidator.js.map +1 -0
- package/package.json +37 -50
- package/dist/browser/callAutomationClient.d.ts +0 -98
- package/dist/browser/callAutomationClient.d.ts.map +0 -1
- package/dist/browser/callAutomationClient.js +0 -275
- package/dist/browser/callAutomationClient.js.map +0 -1
- package/dist/browser/callAutomationEventParser.d.ts +0 -6
- package/dist/browser/callAutomationEventParser.d.ts.map +0 -1
- package/dist/browser/callAutomationEventParser.js +0 -189
- package/dist/browser/callAutomationEventParser.js.map +0 -1
- package/dist/browser/callConnection.d.ts +0 -83
- package/dist/browser/callConnection.d.ts.map +0 -1
- package/dist/browser/callConnection.js +0 -289
- package/dist/browser/callConnection.js.map +0 -1
- package/dist/browser/callMedia.d.ts +0 -114
- package/dist/browser/callMedia.d.ts.map +0 -1
- package/dist/browser/callMedia.js +0 -433
- package/dist/browser/callMedia.js.map +0 -1
- package/dist/browser/callRecording.d.ts +0 -70
- package/dist/browser/callRecording.d.ts.map +0 -1
- package/dist/browser/callRecording.js +0 -195
- package/dist/browser/callRecording.js.map +0 -1
- package/dist/browser/contentDownloader.d.ts +0 -25
- package/dist/browser/contentDownloader.d.ts.map +0 -1
- package/dist/browser/contentDownloader.js +0 -103
- package/dist/browser/contentDownloader.js.map +0 -1
- package/dist/browser/credential/callAutomationAccessKeyCredentialPolicy.d.ts +0 -10
- package/dist/browser/credential/callAutomationAccessKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/browser/credential/callAutomationAccessKeyCredentialPolicy.js +0 -38
- package/dist/browser/credential/callAutomationAccessKeyCredentialPolicy.js.map +0 -1
- package/dist/browser/credential/callAutomationAuthPolicy.d.ts +0 -22
- package/dist/browser/credential/callAutomationAuthPolicy.d.ts.map +0 -1
- package/dist/browser/credential/callAutomationAuthPolicy.js +0 -53
- package/dist/browser/credential/callAutomationAuthPolicy.js.map +0 -1
- package/dist/browser/credential/cryptoUtils-browser.d.mts.map +0 -1
- package/dist/browser/credential/cryptoUtils-browser.mjs.map +0 -1
- package/dist/browser/credential/cryptoUtils.d.ts +0 -3
- package/dist/browser/credential/cryptoUtils.js +0 -20
- package/dist/browser/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/browser/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/browser/credential/encodeUtils.browser.js +0 -26
- package/dist/browser/credential/encodeUtils.browser.js.map +0 -1
- package/dist/browser/generated/src/callAutomationApiClient.d.ts +0 -49
- package/dist/browser/generated/src/callAutomationApiClient.d.ts.map +0 -1
- package/dist/browser/generated/src/callAutomationApiClient.js +0 -235
- package/dist/browser/generated/src/callAutomationApiClient.js.map +0 -1
- package/dist/browser/generated/src/index.d.ts +0 -5
- package/dist/browser/generated/src/index.d.ts.map +0 -1
- package/dist/browser/generated/src/index.js +0 -13
- package/dist/browser/generated/src/index.js.map +0 -1
- package/dist/browser/generated/src/models/index.d.ts +0 -2342
- package/dist/browser/generated/src/models/index.d.ts.map +0 -1
- package/dist/browser/generated/src/models/index.js +0 -364
- package/dist/browser/generated/src/models/index.js.map +0 -1
- package/dist/browser/generated/src/models/mappers.d.ts +0 -123
- package/dist/browser/generated/src/models/mappers.d.ts.map +0 -1
- package/dist/browser/generated/src/models/mappers.js +0 -4395
- package/dist/browser/generated/src/models/mappers.js.map +0 -1
- package/dist/browser/generated/src/models/parameters.d.ts +0 -36
- package/dist/browser/generated/src/models/parameters.d.ts.map +0 -1
- package/dist/browser/generated/src/models/parameters.js +0 -208
- package/dist/browser/generated/src/models/parameters.js.map +0 -1
- package/dist/browser/generated/src/operations/callConnection.d.ts +0 -103
- package/dist/browser/generated/src/operations/callConnection.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/callConnection.js +0 -417
- package/dist/browser/generated/src/operations/callConnection.js.map +0 -1
- package/dist/browser/generated/src/operations/callMedia.d.ts +0 -110
- package/dist/browser/generated/src/operations/callMedia.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/callMedia.js +0 -378
- package/dist/browser/generated/src/operations/callMedia.js.map +0 -1
- package/dist/browser/generated/src/operations/callRecording.d.ts +0 -43
- package/dist/browser/generated/src/operations/callRecording.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/callRecording.js +0 -148
- package/dist/browser/generated/src/operations/callRecording.js.map +0 -1
- package/dist/browser/generated/src/operations/index.d.ts +0 -4
- package/dist/browser/generated/src/operations/index.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/index.js +0 -11
- package/dist/browser/generated/src/operations/index.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts +0 -80
- package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callConnection.js +0 -9
- package/dist/browser/generated/src/operationsInterfaces/callConnection.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts +0 -102
- package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callMedia.js +0 -9
- package/dist/browser/generated/src/operationsInterfaces/callMedia.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts +0 -35
- package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callRecording.js +0 -9
- package/dist/browser/generated/src/operationsInterfaces/callRecording.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +0 -4
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/index.js +0 -11
- package/dist/browser/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist/browser/generated/src/pagingHelper.d.ts +0 -13
- package/dist/browser/generated/src/pagingHelper.d.ts.map +0 -1
- package/dist/browser/generated/src/pagingHelper.js +0 -30
- package/dist/browser/generated/src/pagingHelper.js.map +0 -1
- package/dist/browser/index.d.ts +0 -12
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -14
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/models/constants.d.ts +0 -2
- package/dist/browser/models/constants.d.ts.map +0 -1
- package/dist/browser/models/constants.js +0 -4
- package/dist/browser/models/constants.js.map +0 -1
- package/dist/browser/models/events.d.ts +0 -689
- package/dist/browser/models/events.d.ts.map +0 -1
- package/dist/browser/models/events.js +0 -4
- package/dist/browser/models/events.js.map +0 -1
- package/dist/browser/models/logger.d.ts +0 -5
- package/dist/browser/models/logger.d.ts.map +0 -1
- package/dist/browser/models/logger.js +0 -8
- package/dist/browser/models/logger.js.map +0 -1
- package/dist/browser/models/mapper.d.ts +0 -3
- package/dist/browser/models/mapper.d.ts.map +0 -1
- package/dist/browser/models/mapper.js +0 -76
- package/dist/browser/models/mapper.js.map +0 -1
- package/dist/browser/models/models.d.ts +0 -305
- package/dist/browser/models/models.d.ts.map +0 -1
- package/dist/browser/models/models.js +0 -54
- package/dist/browser/models/models.js.map +0 -1
- package/dist/browser/models/options.d.ts +0 -463
- package/dist/browser/models/options.d.ts.map +0 -1
- package/dist/browser/models/options.js +0 -4
- package/dist/browser/models/options.js.map +0 -1
- package/dist/browser/models/responses.d.ts +0 -81
- package/dist/browser/models/responses.d.ts.map +0 -1
- package/dist/browser/models/responses.js +0 -4
- package/dist/browser/models/responses.js.map +0 -1
- package/dist/browser/models/streaming.d.ts +0 -128
- package/dist/browser/models/streaming.d.ts.map +0 -1
- package/dist/browser/models/streaming.js +0 -38
- package/dist/browser/models/streaming.js.map +0 -1
- package/dist/browser/package.json +0 -3
- package/dist/browser/streamingData.d.ts +0 -13
- package/dist/browser/streamingData.d.ts.map +0 -1
- package/dist/browser/streamingData.js +0 -99
- package/dist/browser/streamingData.js.map +0 -1
- package/dist/browser/utli/converters.d.ts +0 -46
- package/dist/browser/utli/converters.d.ts.map +0 -1
- package/dist/browser/utli/converters.js +0 -294
- package/dist/browser/utli/converters.js.map +0 -1
- package/dist/commonjs/credential/callAutomationAccessKeyCredentialPolicy.d.ts +0 -10
- package/dist/commonjs/credential/callAutomationAccessKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/commonjs/credential/callAutomationAccessKeyCredentialPolicy.js +0 -41
- package/dist/commonjs/credential/callAutomationAccessKeyCredentialPolicy.js.map +0 -1
- package/dist/commonjs/credential/callAutomationAuthPolicy.d.ts +0 -22
- package/dist/commonjs/credential/callAutomationAuthPolicy.d.ts.map +0 -1
- package/dist/commonjs/credential/callAutomationAuthPolicy.js +0 -57
- package/dist/commonjs/credential/callAutomationAuthPolicy.js.map +0 -1
- package/dist/commonjs/credential/cryptoUtils.d.ts +0 -3
- package/dist/commonjs/credential/cryptoUtils.d.ts.map +0 -1
- package/dist/commonjs/credential/cryptoUtils.js +0 -14
- package/dist/commonjs/credential/cryptoUtils.js.map +0 -1
- package/dist/commonjs/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/commonjs/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/commonjs/credential/encodeUtils.browser.js +0 -32
- package/dist/commonjs/credential/encodeUtils.browser.js.map +0 -1
- package/dist/commonjs/models/constants.d.ts +0 -2
- package/dist/commonjs/models/constants.d.ts.map +0 -1
- package/dist/commonjs/models/constants.js +0 -7
- package/dist/commonjs/models/constants.js.map +0 -1
- package/dist/esm/credential/callAutomationAccessKeyCredentialPolicy.d.ts +0 -10
- package/dist/esm/credential/callAutomationAccessKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/esm/credential/callAutomationAccessKeyCredentialPolicy.js +0 -38
- package/dist/esm/credential/callAutomationAccessKeyCredentialPolicy.js.map +0 -1
- package/dist/esm/credential/callAutomationAuthPolicy.d.ts +0 -22
- package/dist/esm/credential/callAutomationAuthPolicy.d.ts.map +0 -1
- package/dist/esm/credential/callAutomationAuthPolicy.js +0 -53
- package/dist/esm/credential/callAutomationAuthPolicy.js.map +0 -1
- package/dist/esm/credential/cryptoUtils.d.ts +0 -3
- package/dist/esm/credential/cryptoUtils.d.ts.map +0 -1
- package/dist/esm/credential/cryptoUtils.js +0 -9
- package/dist/esm/credential/cryptoUtils.js.map +0 -1
- package/dist/esm/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/esm/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/esm/credential/encodeUtils.browser.js +0 -26
- package/dist/esm/credential/encodeUtils.browser.js.map +0 -1
- package/dist/esm/models/constants.d.ts +0 -2
- package/dist/esm/models/constants.d.ts.map +0 -1
- package/dist/esm/models/constants.js +0 -4
- package/dist/esm/models/constants.js.map +0 -1
- package/dist/react-native/callAutomationClient.d.ts +0 -98
- package/dist/react-native/callAutomationClient.d.ts.map +0 -1
- package/dist/react-native/callAutomationClient.js +0 -275
- package/dist/react-native/callAutomationClient.js.map +0 -1
- package/dist/react-native/callAutomationEventParser.d.ts +0 -6
- package/dist/react-native/callAutomationEventParser.d.ts.map +0 -1
- package/dist/react-native/callAutomationEventParser.js +0 -189
- package/dist/react-native/callAutomationEventParser.js.map +0 -1
- package/dist/react-native/callConnection.d.ts +0 -83
- package/dist/react-native/callConnection.d.ts.map +0 -1
- package/dist/react-native/callConnection.js +0 -289
- package/dist/react-native/callConnection.js.map +0 -1
- package/dist/react-native/callMedia.d.ts +0 -114
- package/dist/react-native/callMedia.d.ts.map +0 -1
- package/dist/react-native/callMedia.js +0 -433
- package/dist/react-native/callMedia.js.map +0 -1
- package/dist/react-native/callRecording.d.ts +0 -70
- package/dist/react-native/callRecording.d.ts.map +0 -1
- package/dist/react-native/callRecording.js +0 -195
- package/dist/react-native/callRecording.js.map +0 -1
- package/dist/react-native/contentDownloader.d.ts +0 -25
- package/dist/react-native/contentDownloader.d.ts.map +0 -1
- package/dist/react-native/contentDownloader.js +0 -103
- package/dist/react-native/contentDownloader.js.map +0 -1
- package/dist/react-native/credential/callAutomationAccessKeyCredentialPolicy.d.ts +0 -10
- package/dist/react-native/credential/callAutomationAccessKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/react-native/credential/callAutomationAccessKeyCredentialPolicy.js +0 -38
- package/dist/react-native/credential/callAutomationAccessKeyCredentialPolicy.js.map +0 -1
- package/dist/react-native/credential/callAutomationAuthPolicy.d.ts +0 -22
- package/dist/react-native/credential/callAutomationAuthPolicy.d.ts.map +0 -1
- package/dist/react-native/credential/callAutomationAuthPolicy.js +0 -53
- package/dist/react-native/credential/callAutomationAuthPolicy.js.map +0 -1
- package/dist/react-native/credential/cryptoUtils.d.ts +0 -3
- package/dist/react-native/credential/cryptoUtils.d.ts.map +0 -1
- package/dist/react-native/credential/cryptoUtils.js +0 -9
- package/dist/react-native/credential/cryptoUtils.js.map +0 -1
- package/dist/react-native/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/react-native/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/react-native/credential/encodeUtils.browser.js +0 -26
- package/dist/react-native/credential/encodeUtils.browser.js.map +0 -1
- package/dist/react-native/generated/src/callAutomationApiClient.d.ts +0 -49
- package/dist/react-native/generated/src/callAutomationApiClient.d.ts.map +0 -1
- package/dist/react-native/generated/src/callAutomationApiClient.js +0 -235
- package/dist/react-native/generated/src/callAutomationApiClient.js.map +0 -1
- package/dist/react-native/generated/src/index.d.ts +0 -5
- package/dist/react-native/generated/src/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/index.js +0 -13
- package/dist/react-native/generated/src/index.js.map +0 -1
- package/dist/react-native/generated/src/models/index.d.ts +0 -2342
- package/dist/react-native/generated/src/models/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/models/index.js +0 -364
- package/dist/react-native/generated/src/models/index.js.map +0 -1
- package/dist/react-native/generated/src/models/mappers.d.ts +0 -123
- package/dist/react-native/generated/src/models/mappers.d.ts.map +0 -1
- package/dist/react-native/generated/src/models/mappers.js +0 -4395
- package/dist/react-native/generated/src/models/mappers.js.map +0 -1
- package/dist/react-native/generated/src/models/parameters.d.ts +0 -36
- package/dist/react-native/generated/src/models/parameters.d.ts.map +0 -1
- package/dist/react-native/generated/src/models/parameters.js +0 -208
- package/dist/react-native/generated/src/models/parameters.js.map +0 -1
- package/dist/react-native/generated/src/operations/callConnection.d.ts +0 -103
- package/dist/react-native/generated/src/operations/callConnection.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/callConnection.js +0 -417
- package/dist/react-native/generated/src/operations/callConnection.js.map +0 -1
- package/dist/react-native/generated/src/operations/callMedia.d.ts +0 -110
- package/dist/react-native/generated/src/operations/callMedia.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/callMedia.js +0 -378
- package/dist/react-native/generated/src/operations/callMedia.js.map +0 -1
- package/dist/react-native/generated/src/operations/callRecording.d.ts +0 -43
- package/dist/react-native/generated/src/operations/callRecording.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/callRecording.js +0 -148
- package/dist/react-native/generated/src/operations/callRecording.js.map +0 -1
- package/dist/react-native/generated/src/operations/index.d.ts +0 -4
- package/dist/react-native/generated/src/operations/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/index.js +0 -11
- package/dist/react-native/generated/src/operations/index.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts +0 -80
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.js +0 -9
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts +0 -102
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.js +0 -9
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts +0 -35
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.js +0 -9
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +0 -4
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.js +0 -11
- package/dist/react-native/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist/react-native/generated/src/pagingHelper.d.ts +0 -13
- package/dist/react-native/generated/src/pagingHelper.d.ts.map +0 -1
- package/dist/react-native/generated/src/pagingHelper.js +0 -30
- package/dist/react-native/generated/src/pagingHelper.js.map +0 -1
- package/dist/react-native/index.d.ts +0 -12
- package/dist/react-native/index.d.ts.map +0 -1
- package/dist/react-native/index.js +0 -14
- package/dist/react-native/index.js.map +0 -1
- package/dist/react-native/models/constants.d.ts +0 -2
- package/dist/react-native/models/constants.d.ts.map +0 -1
- package/dist/react-native/models/constants.js +0 -4
- package/dist/react-native/models/constants.js.map +0 -1
- package/dist/react-native/models/events.d.ts +0 -689
- package/dist/react-native/models/events.d.ts.map +0 -1
- package/dist/react-native/models/events.js +0 -4
- package/dist/react-native/models/events.js.map +0 -1
- package/dist/react-native/models/logger.d.ts +0 -5
- package/dist/react-native/models/logger.d.ts.map +0 -1
- package/dist/react-native/models/logger.js +0 -8
- package/dist/react-native/models/logger.js.map +0 -1
- package/dist/react-native/models/mapper.d.ts +0 -3
- package/dist/react-native/models/mapper.d.ts.map +0 -1
- package/dist/react-native/models/mapper.js +0 -76
- package/dist/react-native/models/mapper.js.map +0 -1
- package/dist/react-native/models/models.d.ts +0 -305
- package/dist/react-native/models/models.d.ts.map +0 -1
- package/dist/react-native/models/models.js +0 -54
- package/dist/react-native/models/models.js.map +0 -1
- package/dist/react-native/models/options.d.ts +0 -463
- package/dist/react-native/models/options.d.ts.map +0 -1
- package/dist/react-native/models/options.js +0 -4
- package/dist/react-native/models/options.js.map +0 -1
- package/dist/react-native/models/responses.d.ts +0 -81
- package/dist/react-native/models/responses.d.ts.map +0 -1
- package/dist/react-native/models/responses.js +0 -4
- package/dist/react-native/models/responses.js.map +0 -1
- package/dist/react-native/models/streaming.d.ts +0 -128
- package/dist/react-native/models/streaming.d.ts.map +0 -1
- package/dist/react-native/models/streaming.js +0 -38
- package/dist/react-native/models/streaming.js.map +0 -1
- package/dist/react-native/package.json +0 -3
- package/dist/react-native/streamingData.d.ts +0 -13
- package/dist/react-native/streamingData.d.ts.map +0 -1
- package/dist/react-native/streamingData.js +0 -99
- package/dist/react-native/streamingData.js.map +0 -1
- package/dist/react-native/utli/converters.d.ts +0 -46
- package/dist/react-native/utli/converters.d.ts.map +0 -1
- package/dist/react-native/utli/converters.js +0 -294
- package/dist/react-native/utli/converters.js.map +0 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E,gCAAgC,CAAC,uBAAuB,CAAC,MAAM,CAAC;QACxE,QAAQ,EAAE,uBAAuB,CAAC,QAAQ;QAC1C,MAAM,EAAE,uBAAuB,CAAC,MAAM;QACtC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;KACvF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,8BAA8B,CAC5C,qBAAqD;IAErD,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO;QACL,IAAI,EAAE,uBAAuB;QAC7B,uBAAuB,EAAE,gCAAgC,CACvD,qBAAqB,CAAC,uBAAuB,CAC9C;QACD,uBAAuB,EAAE,gCAAgC,CACvD,qBAAqB,CAAC,uBAAuB,CAC9C;QACD,SAAS,EAAE,qBAAqB,CAAC,SAAS;QAC1C,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
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utli/converters.ts"],
|
|
4
|
+
"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(\n value as CommunicationIdentifierModel,\n );\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AwB;AAAA,IACrC,UAAU,wBAAwB;AAAA,IAClC,cAAc,wBAAwB;AAAA,IACtC,iBAAiB,wBAAwB;AAAA,IACzC,6BAA6B,wBAAwB;AAAA,EACvD;AACF;AAKO,SAAS,iCACd,yBACqC;AACrC,MAAI,CAAC,yBAAyB;AAC5B,WAAO;AAAA,EACT;AAEA,QAAM,kBAA8D,CAAC;AAErE,MAAI,wBAAwB,iBAAiB;AAC3C,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,wBAAwB,eAAe,GAAG;AAClF,sBAAgB,GAAG,IAAI;AAAA,QACrB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,QAAQ,iCAAiC,wBAAwB,MAAM;AAAA,IACvE,UAAU,wBAAwB;AAAA,IAClC,QAAQ,wBAAwB;AAAA,IAChC,iBAAiB,OAAO,KAAK,eAAe,EAAE,SAAS,IAAI,kBAAkB;AAAA,EAC/E;AACF;AAKO,SAAS,+BACd,uBACmC;AACnC,MAAI,CAAC,uBAAuB;AAC1B,WAAO;AAAA,EACT;AAEA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,yBAAyB;AAAA,MACvB,sBAAsB;AAAA,IACxB;AAAA,IACA,yBAAyB;AAAA,MACvB,sBAAsB;AAAA,IACxB;AAAA,IACA,WAAW,sBAAsB;AAAA,IACjC,QAAQ,sBAAsB;AAAA,IAC9B,WAAW,sBAAsB;AAAA,IACjC,aAAa,sBAAsB;AAAA,IACnC,eAAe,sBAAsB;AAAA,IACrC,eAAe,sBAAsB;AAAA,IACrC,kBAAkB,sBAAsB;AAAA,EAC1C;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates that a recording URL points to Azure Communication Services
|
|
3
|
+
* This prevents credential exfiltration via SSRF attacks.
|
|
4
|
+
*
|
|
5
|
+
* @param recordingUrl - The recording URL to validate.
|
|
6
|
+
* @param parameterName - The parameter name for exception messages.
|
|
7
|
+
*/
|
|
8
|
+
export declare function validateRecordingUrl(recordingUrl: string, parameterName: string): void;
|
|
9
|
+
//# sourceMappingURL=recordingUrlValidator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordingUrlValidator.d.ts","sourceRoot":"","sources":["../../../src/utli/recordingUrlValidator.ts"],"names":[],"mappings":"AAaA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAgCtF"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var recordingUrlValidator_exports = {};
|
|
19
|
+
__export(recordingUrlValidator_exports, {
|
|
20
|
+
validateRecordingUrl: () => validateRecordingUrl
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(recordingUrlValidator_exports);
|
|
23
|
+
const ALLOWED_HOST_SUFFIXES = [
|
|
24
|
+
".asm.skype.com",
|
|
25
|
+
".asyncgw.teams.microsoft.com",
|
|
26
|
+
".ams.gov.teams.microsoft.us"
|
|
27
|
+
];
|
|
28
|
+
function validateRecordingUrl(recordingUrl, parameterName) {
|
|
29
|
+
if (!recordingUrl) {
|
|
30
|
+
throw new TypeError(`${parameterName} cannot be null or undefined.`);
|
|
31
|
+
}
|
|
32
|
+
let parsedUrl;
|
|
33
|
+
try {
|
|
34
|
+
parsedUrl = new URL(recordingUrl);
|
|
35
|
+
} catch (error) {
|
|
36
|
+
throw new Error(`${parameterName} must be a valid absolute URI.`);
|
|
37
|
+
}
|
|
38
|
+
if (!parsedUrl.protocol) {
|
|
39
|
+
throw new Error(`${parameterName} must be an absolute URI.`);
|
|
40
|
+
}
|
|
41
|
+
if (parsedUrl.protocol.toLowerCase() !== "https:") {
|
|
42
|
+
throw new Error(`${parameterName} must use HTTPS scheme for security.`);
|
|
43
|
+
}
|
|
44
|
+
const host = parsedUrl.hostname.toLowerCase();
|
|
45
|
+
const isValidEndpoint = ALLOWED_HOST_SUFFIXES.some((suffix) => host.endsWith(suffix));
|
|
46
|
+
if (!isValidEndpoint) {
|
|
47
|
+
throw new Error(
|
|
48
|
+
`${parameterName} host '${host}' is not a valid Azure Communication Services recording endpoint. Only URLs pointing to *.asm.skype.com, *.asyncgw.teams.microsoft.com are allowed.`
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
+
0 && (module.exports = {
|
|
54
|
+
validateRecordingUrl
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=recordingUrlValidator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/utli/recordingUrlValidator.ts"],
|
|
4
|
+
"sourcesContent": ["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Allowed recording endpoint host suffixes.\n * These are the only domains permitted for recording URLs to prevent credential exfiltration.\n */\nconst ALLOWED_HOST_SUFFIXES = [\n \".asm.skype.com\",\n \".asyncgw.teams.microsoft.com\",\n \".ams.gov.teams.microsoft.us\",\n] as const;\n\n/**\n * Validates that a recording URL points to Azure Communication Services\n * This prevents credential exfiltration via SSRF attacks.\n *\n * @param recordingUrl - The recording URL to validate.\n * @param parameterName - The parameter name for exception messages.\n */\nexport function validateRecordingUrl(recordingUrl: string, parameterName: string): void {\n if (!recordingUrl) {\n throw new TypeError(`${parameterName} cannot be null or undefined.`);\n }\n\n let parsedUrl: URL;\n try {\n parsedUrl = new URL(recordingUrl);\n } catch (error) {\n throw new Error(`${parameterName} must be a valid absolute URI.`);\n }\n\n // Ensure the URL is absolute and uses HTTPS\n if (!parsedUrl.protocol) {\n throw new Error(`${parameterName} must be an absolute URI.`);\n }\n\n if (parsedUrl.protocol.toLowerCase() !== \"https:\") {\n throw new Error(`${parameterName} must use HTTPS scheme for security.`);\n }\n\n const host = parsedUrl.hostname.toLowerCase();\n\n // Check against allowed suffixes\n const isValidEndpoint = ALLOWED_HOST_SUFFIXES.some((suffix) => host.endsWith(suffix));\n\n if (!isValidEndpoint) {\n throw new Error(\n `${parameterName} host '${host}' is not a valid Azure Communication Services recording endpoint. ` +\n \"Only URLs pointing to *.asm.skype.com, *.asyncgw.teams.microsoft.com are allowed.\",\n );\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,MAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AACF;AASO,SAAS,qBAAqB,cAAsB,eAA6B;AACtF,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI,UAAU,GAAG,aAAa,+BAA+B;AAAA,EACrE;AAEA,MAAI;AACJ,MAAI;AACF,gBAAY,IAAI,IAAI,YAAY;AAAA,EAClC,SAAS,OAAO;AACd,UAAM,IAAI,MAAM,GAAG,aAAa,gCAAgC;AAAA,EAClE;AAGA,MAAI,CA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@
|
|
|
1
1
|
import { isTokenCredential } from "@azure/core-auth";
|
|
2
2
|
import { parseClientArguments, isKeyCredential, createCommunicationAuthPolicy, } from "@azure/communication-common";
|
|
3
3
|
import { logger } from "./models/logger.js";
|
|
4
|
-
import { CallAutomationApiClient
|
|
4
|
+
import { CallAutomationApiClient } from "./generated/src/index.js";
|
|
5
5
|
import { CallConnection } from "./callConnection.js";
|
|
6
6
|
import { CallRecording } from "./callRecording.js";
|
|
7
7
|
import { communicationIdentifierConverter, communicationIdentifierModelConverter, communicationUserIdentifierConverter, communicationUserIdentifierModelConverter, phoneNumberIdentifierConverter, microsoftTeamsAppIdentifierModelConverter, PhoneNumberIdentifierModelConverter, } from "./utli/converters.js";
|
|
@@ -107,7 +107,6 @@ export class CallAutomationClient {
|
|
|
107
107
|
sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(targetParticipant.sourceCallIdNumber),
|
|
108
108
|
sourceDisplayName: targetParticipant.sourceDisplayName,
|
|
109
109
|
teamsAppSource: microsoftTeamsAppIdentifierModelConverter(options.teamsAppSource),
|
|
110
|
-
enableLoopbackAudio: options.enableLoopbackAudio,
|
|
111
110
|
};
|
|
112
111
|
return this.createCallInternal(request, options);
|
|
113
112
|
}
|
|
@@ -131,7 +130,6 @@ export class CallAutomationClient {
|
|
|
131
130
|
sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(options.sourceCallIdNumber),
|
|
132
131
|
sourceDisplayName: options.sourceDisplayName,
|
|
133
132
|
teamsAppSource: microsoftTeamsAppIdentifierModelConverter(options.teamsAppSource),
|
|
134
|
-
enableLoopbackAudio: options.enableLoopbackAudio,
|
|
135
133
|
};
|
|
136
134
|
return this.createCallInternal(request, options);
|
|
137
135
|
}
|
|
@@ -151,7 +149,6 @@ export class CallAutomationClient {
|
|
|
151
149
|
operationContext: operationContext,
|
|
152
150
|
callbackUri: callbackUrl,
|
|
153
151
|
answeredBy: this.sourceIdentity,
|
|
154
|
-
enableLoopbackAudio: options.enableLoopbackAudio,
|
|
155
152
|
};
|
|
156
153
|
const optionsInternal = {
|
|
157
154
|
...operationOptions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callAutomationClient.js","sourceRoot":"","sources":["../../src/callAutomationClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOrD,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAEL,uBAAuB,GAMxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAcnD,OAAO,EACL,gCAAgC,EAChC,qCAAqC,EACrC,oCAAoC,EACpC,yCAAyC,EACzC,8BAA8B,EAC9B,yCAAyC,EACzC,mCAAmC,GACpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAW9C;;;;GAIG;AACH,MAAM,6BAA6B,GAAG,CAAC,OAAY,EAA0C,EAAE,CAC7F,CAAC,CAAC,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,OAAO,oBAAoB;IACd,uBAAuB,CAA0B;IACjD,cAAc,CAAoC;IAClD,UAAU,CAAkC;IAC5C,uBAAuB,CAA0B;IAsBlE,YACE,qBAA6B,EAC7B,mBAAmF,EACnF,eAA4C,EAAE;QAE9C,MAAM,OAAO,GAAG,6BAA6B,CAAC,mBAAmB,CAAC;YAChE,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,YAAY,CAAC;QAEjB,IAAI,CAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC;YAC/B,OAAO,CAAC,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U,EACV,MAAM,EACN,WAAW,EACX,GAAG,MAAM,EACV,GAAG,MAAM,IAAI,CAAC,uBAAuB,CAAC,OAAO,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAEhF,IAAI,gBAAgB,EAAE,CAAC;YACrB,MAAM,wBAAwB,GAA6B;gBACzD,GAAG,MAAM;gBACT,gBAAgB,EAAE,gBAAgB;gBAClC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,gCAAgC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;gBACrE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,oCAAoC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;gBACrF,kBAAkB,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,gCAAgC,CAAC,MAAM,CAAC,CAAC;gBACtF,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,8BAA8B,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;gBAClF,oBAAoB,EAAE,oBAAoB;oBACxC,CAAC,CAAC,8BAA8B,CAAC,oBAAoB,CAAC;oBACtD,CAAC,CAAC,SAAS;aACd,CAAC;YACF,MAAM,cAAc,GAAG,IAAI,cAAc,CACvC,gBAAgB,EAChB,IAAI,CAAC,uBAAuB,CAAC,QAAQ,EACrC,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,uBAAuB,CAC7B,CAAC;YACF,MAAM,aAAa,GAAsB;gBACvC,wBAAwB,EAAE,wBAAwB;gBAClD,cAAc,EAAE,cAAc;aAC/B,CAAC;YACF,OAAO,aAAa,CAAC;QACvB,CAAC;QACD,MAAM,0EAA0E,CAAC;IACnF,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { CommonClientOptions } from \"@azure/core-client\";\nimport type { InternalPipelineOptions } from \"@azure/core-rest-pipeline\";\nimport type {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n} from \"@azure/communication-common\";\nimport {\n parseClientArguments,\n isKeyCredential,\n createCommunicationAuthPolicy,\n} from \"@azure/communication-common\";\nimport { logger } from \"./models/logger.js\";\nimport {\n AnswerCallRequest,\n CallAutomationApiClient,\n CommunicationUserIdentifierModel,\n CreateCallRequest,\n RedirectCallRequest,\n RejectCallRequest,\n ConnectRequest,\n} from \"./generated/src/index.js\";\nimport { CallConnection } from \"./callConnection.js\";\nimport { CallRecording } from \"./callRecording.js\";\nimport type {\n AnswerCallOptions,\n ConnectCallOptions,\n CreateCallOptions,\n RedirectCallOptions,\n RejectCallOptions,\n} from \"./models/options.js\";\nimport type { AnswerCallResult, ConnectCallResult, CreateCallResult } from \"./models/responses.js\";\nimport {\n type CallConnectionProperties,\n type CallInvite,\n type CallLocator,\n} from \"./models/models.js\";\nimport {\n communicationIdentifierConverter,\n communicationIdentifierModelConverter,\n communicationUserIdentifierConverter,\n communicationUserIdentifierModelConverter,\n phoneNumberIdentifierConverter,\n microsoftTeamsAppIdentifierModelConverter,\n PhoneNumberIdentifierModelConverter,\n} from \"./utli/converters.js\";\nimport { randomUUID } from \"@azure/core-util\";\n/**\n * Client options used to configure CallAutomation Client API requests.\n */\nexport interface CallAutomationClientOptions extends CommonClientOptions {\n /**\n * The identifier of the source of the call for call creating/answering/inviting operation.\n */\n sourceIdentity?: CommunicationUserIdentifier;\n}\n\n/**\n * Checks whether the type of a value is CallAutomationClientOptions or not.\n *\n * @param options - The value being checked.\n */\nconst isCallAutomationClientOptions = (options: any): options is CallAutomationClientOptions =>\n !!options && !isTokenCredential(options) && !isKeyCredential(options);\n\n/**\n * A CallAutomationClient represents a Client to the Azure Communication CallAutomation service.\n */\nexport class CallAutomationClient {\n private readonly callAutomationApiClient: CallAutomationApiClient;\n private readonly sourceIdentity?: CommunicationUserIdentifierModel;\n private readonly credential: TokenCredential | KeyCredential;\n private readonly internalPipelineOptions: InternalPipelineOptions;\n\n /**\n * Initializes a new instance of the CallAutomationClient class.\n * @param connectionString - Connection string to connect to an Azure Communication Service resource.\n * Example: \"endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret\";\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(connectionString: string, options?: CallAutomationClientOptions);\n\n /**\n * Initializes a new instance of the CallAutomationClient class using a TokenCredential or KeyCredential.\n * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - TokenCredential or KeyCredential that is used to authenticate requests to the service.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n endpoint: string,\n credential: TokenCredential | KeyCredential,\n options?: CallAutomationClientOptions,\n );\n\n constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | CallAutomationClientOptions,\n maybeOptions: CallAutomationClientOptions = {},\n ) {\n const options = isCallAutomationClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n if (!options?.userAgentOptions) {\n options.userAgentOptions = {};\n }\n\n this.internalPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n\n this.credential = credential;\n this.callAutomationApiClient = new CallAutomationApiClient(url, this.internalPipelineOptions);\n this.callAutomationApiClient.pipeline.addPolicy(authPolicy);\n\n this.sourceIdentity = communicationUserIdentifierModelConverter(options.sourceIdentity);\n }\n\n /**\n * Initializes a new instance of CallConnection.\n * @param callConnectionId - The CallConnection id for the CallConnection instance. (ex: 421CONTOSO-cRD6-4RDc-a078-99dRANDOMf).\n */\n public getCallConnection(callConnectionId: string): CallConnection {\n return new CallConnection(\n callConnectionId,\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n }\n\n /**\n * Initializes a new instance of CallRecording.\n */\n public getCallRecording(): CallRecording {\n return new CallRecording(\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n }\n\n /**\n * Get Source Identity that is used for create and answer call\n */\n public getSourceIdentity(): CommunicationUserIdentifier | undefined {\n return communicationUserIdentifierConverter(this.sourceIdentity);\n }\n\n private async createCallInternal(\n request: CreateCallRequest,\n options?: CreateCallOptions,\n ): Promise<CreateCallResult> {\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const {\n callConnectionId,\n answeredBy,\n targets,\n sourceCallerIdNumber,\n source,\n answeredFor,\n ...result\n } = await this.callAutomationApiClient.createCall(request, optionsInternal);\n\n if (callConnectionId) {\n const callConnectionPropertiesDto: CallConnectionProperties = {\n ...result,\n callConnectionId: callConnectionId,\n source: source ? communicationIdentifierConverter(source) : undefined,\n answeredby: communicationUserIdentifierConverter(answeredBy),\n answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined,\n targetParticipants: targets?.map((returnedTarget) =>\n communicationIdentifierConverter(returnedTarget),\n ),\n sourceCallerIdNumber: sourceCallerIdNumber\n ? phoneNumberIdentifierConverter(sourceCallerIdNumber)\n : undefined,\n };\n const callConnection = new CallConnection(\n callConnectionId,\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n const createCallResult: CreateCallResult = {\n callConnectionProperties: callConnectionPropertiesDto,\n callConnection: callConnection,\n };\n return createCallResult;\n }\n throw \"callConnectionProperties / callConnectionId is missing in createCall result\";\n }\n\n /**\n * Create an outgoing call from source to a target identity.\n * @param targetParticipant - A single target.\n * @param callbackUrl - The callback url.\n * @param options - Additional request options contains createCallConnection api options.\n */\n public async createCall(\n targetParticipant: CallInvite,\n callbackUrl: string,\n options: CreateCallOptions = {},\n ): Promise<CreateCallResult> {\n const request: CreateCallRequest = {\n source: this.sourceIdentity,\n targets: [communicationIdentifierModelConverter(targetParticipant.targetParticipant)],\n callbackUri: callbackUrl,\n operationContext: options.operationContext,\n callIntelligenceOptions: options.callIntelligenceOptions,\n mediaStreamingOptions: options.mediaStreamingOptions,\n transcriptionOptions: options.transcriptionOptions,\n sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(\n targetParticipant.sourceCallIdNumber,\n ),\n sourceDisplayName: targetParticipant.sourceDisplayName,\n teamsAppSource: microsoftTeamsAppIdentifierModelConverter(options.teamsAppSource),\n enableLoopbackAudio: options.enableLoopbackAudio,\n };\n\n return this.createCallInternal(request, options);\n }\n\n /**\n * Create an outgoing call from source to a group of targets identities.\n * @param targetParticipants - A group of targets identities.\n * @param callbackUrl - The callback url.\n * @param options - Additional request options contains createCallConnection api options.\n */\n public async createGroupCall(\n targetParticipants: CommunicationIdentifier[],\n callbackUrl: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateCallOptions = {},\n ): Promise<CreateCallResult> {\n const request: CreateCallRequest = {\n source: this.sourceIdentity,\n targets: targetParticipants.map((target) => communicationIdentifierModelConverter(target)),\n callbackUri: callbackUrl,\n operationContext: options.operationContext,\n callIntelligenceOptions: options.callIntelligenceOptions,\n mediaStreamingOptions: options.mediaStreamingOptions,\n transcriptionOptions: options.transcriptionOptions,\n sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(options.sourceCallIdNumber),\n sourceDisplayName: options.sourceDisplayName,\n teamsAppSource: microsoftTeamsAppIdentifierModelConverter(options.teamsAppSource),\n enableLoopbackAudio: options.enableLoopbackAudio,\n };\n\n return this.createCallInternal(request, options);\n }\n\n /**\n * Answer the call.\n * @param incomingCallContext - The context associated with the call.\n * @param callbackUrl - The callback url.\n * @param options - Additional request options contains answerCall api options.\n */\n public async answerCall(\n incomingCallContext: string,\n callbackUrl: string,\n options: AnswerCallOptions = {},\n ): Promise<AnswerCallResult> {\n const {\n callIntelligenceOptions,\n mediaStreamingOptions,\n transcriptionOptions,\n operationContext,\n ...operationOptions\n } = options;\n const request: AnswerCallRequest = {\n incomingCallContext: incomingCallContext,\n mediaStreamingOptions: mediaStreamingOptions,\n transcriptionOptions: transcriptionOptions,\n callIntelligenceOptions: callIntelligenceOptions,\n operationContext: operationContext,\n callbackUri: callbackUrl,\n answeredBy: this.sourceIdentity,\n enableLoopbackAudio: options.enableLoopbackAudio,\n };\n const optionsInternal = {\n ...operationOptions,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const {\n callConnectionId,\n targets,\n sourceCallerIdNumber,\n answeredBy,\n source,\n answeredFor,\n ...result\n } = await this.callAutomationApiClient.answerCall(request, optionsInternal);\n\n if (callConnectionId) {\n const callConnectionProperties: CallConnectionProperties = {\n ...result,\n callConnectionId: callConnectionId,\n source: source ? communicationIdentifierConverter(source) : undefined,\n answeredby: communicationUserIdentifierConverter(answeredBy),\n answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined,\n targetParticipants: targets?.map((target) => communicationIdentifierConverter(target)),\n sourceCallerIdNumber: sourceCallerIdNumber\n ? phoneNumberIdentifierConverter(sourceCallerIdNumber)\n : undefined,\n };\n const callConnection = new CallConnection(\n callConnectionId,\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n const answerCallResult: AnswerCallResult = {\n callConnectionProperties: callConnectionProperties,\n callConnection: callConnection,\n };\n return answerCallResult;\n }\n throw \"callConnectionProperties / callConnectionId is missing in createCall result\";\n }\n\n /**\n * Redirect the call.\n *\n * @param incomingCallContext - The context associated with the call.\n * @param targetParticipant - The target identity to redirect the call to.\n * @param options - Additional request options contains redirectCall api options.\n */\n public async redirectCall(\n incomingCallContext: string,\n targetParticipant: CallInvite,\n options: RedirectCallOptions = {},\n ): Promise<void> {\n const request: RedirectCallRequest = {\n incomingCallContext: incomingCallContext,\n target: communicationIdentifierModelConverter(targetParticipant.targetParticipant),\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n\n return this.callAutomationApiClient.redirectCall(request, optionsInternal);\n }\n\n /**\n * Reject the call.\n *\n * @param incomingCallContext - The context associated with the call.\n * @param options - Additional request options contains rejectCall api options.\n */\n public async rejectCall(\n incomingCallContext: string,\n options: RejectCallOptions = {},\n ): Promise<void> {\n const request: RejectCallRequest = {\n incomingCallContext: incomingCallContext,\n callRejectReason: options.callRejectReason,\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n\n return this.callAutomationApiClient.rejectCall(request, optionsInternal);\n }\n\n /**\n * Create connection to room call.\n * @param callLocator - Call locator to create connection.\n * @param callbackUrl - The callback url\n * @param options - Additional request options contains connect api options.\n */\n public async connectCall(\n callLocator: CallLocator,\n callbackUrl: string,\n options: ConnectCallOptions = {},\n ): Promise<ConnectCallResult> {\n const connectRequest: ConnectRequest = {\n callLocator: callLocator,\n callbackUri: callbackUrl,\n operationContext: options.operationContext,\n callIntelligenceOptions: options.callIntelligenceOptions,\n mediaStreamingOptions: options.mediaStreamingOptions,\n transcriptionOptions: options.transcriptionOptions,\n };\n\n if (callLocator.kind === \"groupCallLocator\") {\n connectRequest.callLocator.kind = \"groupCallLocator\";\n connectRequest.callLocator.groupCallId = callLocator.id;\n } else if (callLocator.kind === \"roomCallLocator\") {\n connectRequest.callLocator.kind = \"roomCallLocator\";\n connectRequest.callLocator.roomId = callLocator.id;\n } else {\n connectRequest.callLocator.kind = \"serverCallLocator\";\n connectRequest.callLocator.serverCallId = callLocator.id;\n }\n\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n\n const {\n callConnectionId,\n targets,\n sourceCallerIdNumber,\n answeredBy,\n source,\n answeredFor,\n ...result\n } = await this.callAutomationApiClient.connect(connectRequest, optionsInternal);\n\n if (callConnectionId) {\n const callConnectionProperties: CallConnectionProperties = {\n ...result,\n callConnectionId: callConnectionId,\n source: source ? communicationIdentifierConverter(source) : undefined,\n answeredby: answeredBy ? communicationUserIdentifierConverter(answeredBy) : undefined,\n targetParticipants: targets?.map((target) => communicationIdentifierConverter(target)),\n answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined,\n sourceCallerIdNumber: sourceCallerIdNumber\n ? phoneNumberIdentifierConverter(sourceCallerIdNumber)\n : undefined,\n };\n const callConnection = new CallConnection(\n callConnectionId,\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n const connectResult: ConnectCallResult = {\n callConnectionProperties: callConnectionProperties,\n callConnection: callConnection,\n };\n return connectResult;\n }\n throw \"callConnectionProperties / callConnectionId is missing in connect result\";\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"callAutomationClient.js","sourceRoot":"","sources":["../../src/callAutomationClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAOrD,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAS5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAcnD,OAAO,EACL,gCAAgC,EAChC,qCAAqC,EACrC,oCAAoC,EACpC,yCAAyC,EACzC,8BAA8B,EAC9B,yCAAyC,EACzC,mCAAmC,GACpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAW9C;;;;GAIG;AACH,MAAM,6BAA6B,GAAG,CAAC,OAAY,EAA0C,EAAE,CAC7F,CAAC,CAAC,OAAO,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,OAAO,oBAAoB;IACd,uBAAuB,CAA0B;IAC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F","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { CommonClientOptions } from \"@azure/core-client\";\nimport type { InternalPipelineOptions } from \"@azure/core-rest-pipeline\";\nimport type {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n} from \"@azure/communication-common\";\nimport {\n parseClientArguments,\n isKeyCredential,\n createCommunicationAuthPolicy,\n} from \"@azure/communication-common\";\nimport { logger } from \"./models/logger.js\";\nimport type {\n AnswerCallRequest,\n CommunicationUserIdentifierModel,\n CreateCallRequest,\n RedirectCallRequest,\n RejectCallRequest,\n ConnectRequest,\n} from \"./generated/src/index.js\";\nimport { CallAutomationApiClient } from \"./generated/src/index.js\";\nimport { CallConnection } from \"./callConnection.js\";\nimport { CallRecording } from \"./callRecording.js\";\nimport type {\n AnswerCallOptions,\n ConnectCallOptions,\n CreateCallOptions,\n RedirectCallOptions,\n RejectCallOptions,\n} from \"./models/options.js\";\nimport type { AnswerCallResult, ConnectCallResult, CreateCallResult } from \"./models/responses.js\";\nimport {\n type CallConnectionProperties,\n type CallInvite,\n type CallLocator,\n} from \"./models/models.js\";\nimport {\n communicationIdentifierConverter,\n communicationIdentifierModelConverter,\n communicationUserIdentifierConverter,\n communicationUserIdentifierModelConverter,\n phoneNumberIdentifierConverter,\n microsoftTeamsAppIdentifierModelConverter,\n PhoneNumberIdentifierModelConverter,\n} from \"./utli/converters.js\";\nimport { randomUUID } from \"@azure/core-util\";\n/**\n * Client options used to configure CallAutomation Client API requests.\n */\nexport interface CallAutomationClientOptions extends CommonClientOptions {\n /**\n * The identifier of the source of the call for call creating/answering/inviting operation.\n */\n sourceIdentity?: CommunicationUserIdentifier;\n}\n\n/**\n * Checks whether the type of a value is CallAutomationClientOptions or not.\n *\n * @param options - The value being checked.\n */\nconst isCallAutomationClientOptions = (options: any): options is CallAutomationClientOptions =>\n !!options && !isTokenCredential(options) && !isKeyCredential(options);\n\n/**\n * A CallAutomationClient represents a Client to the Azure Communication CallAutomation service.\n */\nexport class CallAutomationClient {\n private readonly callAutomationApiClient: CallAutomationApiClient;\n private readonly sourceIdentity?: CommunicationUserIdentifierModel;\n private readonly credential: TokenCredential | KeyCredential;\n private readonly internalPipelineOptions: InternalPipelineOptions;\n /**\n * Initializes a new instance of the CallAutomationClient class.\n * @param connectionString - Connection string to connect to an Azure Communication Service resource.\n * Example: \"endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret\";\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(connectionString: string, options?: CallAutomationClientOptions);\n\n /**\n * Initializes a new instance of the CallAutomationClient class using a TokenCredential or KeyCredential.\n * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - TokenCredential or KeyCredential that is used to authenticate requests to the service.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n endpoint: string,\n credential: TokenCredential | KeyCredential,\n options?: CallAutomationClientOptions,\n );\n\n constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | CallAutomationClientOptions,\n maybeOptions: CallAutomationClientOptions = {},\n ) {\n const options = isCallAutomationClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n if (!options?.userAgentOptions) {\n options.userAgentOptions = {};\n }\n\n this.internalPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n\n this.credential = credential;\n this.callAutomationApiClient = new CallAutomationApiClient(url, this.internalPipelineOptions);\n this.callAutomationApiClient.pipeline.addPolicy(authPolicy);\n\n this.sourceIdentity = communicationUserIdentifierModelConverter(options.sourceIdentity);\n }\n\n /**\n * Initializes a new instance of CallConnection.\n * @param callConnectionId - The CallConnection id for the CallConnection instance. (ex: 421CONTOSO-cRD6-4RDc-a078-99dRANDOMf).\n */\n public getCallConnection(callConnectionId: string): CallConnection {\n return new CallConnection(\n callConnectionId,\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n }\n\n /**\n * Initializes a new instance of CallRecording.\n */\n public getCallRecording(): CallRecording {\n return new CallRecording(\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n }\n\n /**\n * Get Source Identity that is used for create and answer call\n */\n public getSourceIdentity(): CommunicationUserIdentifier | undefined {\n return communicationUserIdentifierConverter(this.sourceIdentity);\n }\n\n private async createCallInternal(\n request: CreateCallRequest,\n options?: CreateCallOptions,\n ): Promise<CreateCallResult> {\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const {\n callConnectionId,\n answeredBy,\n targets,\n sourceCallerIdNumber,\n source,\n answeredFor,\n ...result\n } = await this.callAutomationApiClient.createCall(request, optionsInternal);\n\n if (callConnectionId) {\n const callConnectionPropertiesDto: CallConnectionProperties = {\n ...result,\n callConnectionId: callConnectionId,\n source: source ? communicationIdentifierConverter(source) : undefined,\n answeredby: communicationUserIdentifierConverter(answeredBy),\n answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined,\n targetParticipants: targets?.map((returnedTarget) =>\n communicationIdentifierConverter(returnedTarget),\n ),\n sourceCallerIdNumber: sourceCallerIdNumber\n ? phoneNumberIdentifierConverter(sourceCallerIdNumber)\n : undefined,\n };\n const callConnection = new CallConnection(\n callConnectionId,\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n const createCallResult: CreateCallResult = {\n callConnectionProperties: callConnectionPropertiesDto,\n callConnection: callConnection,\n };\n return createCallResult;\n }\n throw \"callConnectionProperties / callConnectionId is missing in createCall result\";\n }\n\n /**\n * Create an outgoing call from source to a target identity.\n * @param targetParticipant - A single target.\n * @param callbackUrl - The callback url.\n * @param options - Additional request options contains createCallConnection api options.\n */\n public async createCall(\n targetParticipant: CallInvite,\n callbackUrl: string,\n options: CreateCallOptions = {},\n ): Promise<CreateCallResult> {\n const request: CreateCallRequest = {\n source: this.sourceIdentity,\n targets: [communicationIdentifierModelConverter(targetParticipant.targetParticipant)],\n callbackUri: callbackUrl,\n operationContext: options.operationContext,\n callIntelligenceOptions: options.callIntelligenceOptions,\n mediaStreamingOptions: options.mediaStreamingOptions,\n transcriptionOptions: options.transcriptionOptions,\n sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(\n targetParticipant.sourceCallIdNumber,\n ),\n sourceDisplayName: targetParticipant.sourceDisplayName,\n teamsAppSource: microsoftTeamsAppIdentifierModelConverter(options.teamsAppSource),\n };\n\n return this.createCallInternal(request, options);\n }\n\n /**\n * Create an outgoing call from source to a group of targets identities.\n * @param targetParticipants - A group of targets identities.\n * @param callbackUrl - The callback url.\n * @param options - Additional request options contains createCallConnection api options.\n */\n public async createGroupCall(\n targetParticipants: CommunicationIdentifier[],\n callbackUrl: string,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: CreateCallOptions = {},\n ): Promise<CreateCallResult> {\n const request: CreateCallRequest = {\n source: this.sourceIdentity,\n targets: targetParticipants.map((target) => communicationIdentifierModelConverter(target)),\n callbackUri: callbackUrl,\n operationContext: options.operationContext,\n callIntelligenceOptions: options.callIntelligenceOptions,\n mediaStreamingOptions: options.mediaStreamingOptions,\n transcriptionOptions: options.transcriptionOptions,\n sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(options.sourceCallIdNumber),\n sourceDisplayName: options.sourceDisplayName,\n teamsAppSource: microsoftTeamsAppIdentifierModelConverter(options.teamsAppSource),\n };\n\n return this.createCallInternal(request, options);\n }\n\n /**\n * Answer the call.\n * @param incomingCallContext - The context associated with the call.\n * @param callbackUrl - The callback url.\n * @param options - Additional request options contains answerCall api options.\n */\n public async answerCall(\n incomingCallContext: string,\n callbackUrl: string,\n options: AnswerCallOptions = {},\n ): Promise<AnswerCallResult> {\n const {\n callIntelligenceOptions,\n mediaStreamingOptions,\n transcriptionOptions,\n operationContext,\n ...operationOptions\n } = options;\n const request: AnswerCallRequest = {\n incomingCallContext: incomingCallContext,\n mediaStreamingOptions: mediaStreamingOptions,\n transcriptionOptions: transcriptionOptions,\n callIntelligenceOptions: callIntelligenceOptions,\n operationContext: operationContext,\n callbackUri: callbackUrl,\n answeredBy: this.sourceIdentity,\n };\n const optionsInternal = {\n ...operationOptions,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n const {\n callConnectionId,\n targets,\n sourceCallerIdNumber,\n answeredBy,\n source,\n answeredFor,\n ...result\n } = await this.callAutomationApiClient.answerCall(request, optionsInternal);\n\n if (callConnectionId) {\n const callConnectionProperties: CallConnectionProperties = {\n ...result,\n callConnectionId: callConnectionId,\n source: source ? communicationIdentifierConverter(source) : undefined,\n answeredby: communicationUserIdentifierConverter(answeredBy),\n answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined,\n targetParticipants: targets?.map((target) => communicationIdentifierConverter(target)),\n sourceCallerIdNumber: sourceCallerIdNumber\n ? phoneNumberIdentifierConverter(sourceCallerIdNumber)\n : undefined,\n };\n const callConnection = new CallConnection(\n callConnectionId,\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n const answerCallResult: AnswerCallResult = {\n callConnectionProperties: callConnectionProperties,\n callConnection: callConnection,\n };\n return answerCallResult;\n }\n throw \"callConnectionProperties / callConnectionId is missing in createCall result\";\n }\n\n /**\n * Redirect the call.\n *\n * @param incomingCallContext - The context associated with the call.\n * @param targetParticipant - The target identity to redirect the call to.\n * @param options - Additional request options contains redirectCall api options.\n */\n public async redirectCall(\n incomingCallContext: string,\n targetParticipant: CallInvite,\n options: RedirectCallOptions = {},\n ): Promise<void> {\n const request: RedirectCallRequest = {\n incomingCallContext: incomingCallContext,\n target: communicationIdentifierModelConverter(targetParticipant.targetParticipant),\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n\n return this.callAutomationApiClient.redirectCall(request, optionsInternal);\n }\n\n /**\n * Reject the call.\n *\n * @param incomingCallContext - The context associated with the call.\n * @param options - Additional request options contains rejectCall api options.\n */\n public async rejectCall(\n incomingCallContext: string,\n options: RejectCallOptions = {},\n ): Promise<void> {\n const request: RejectCallRequest = {\n incomingCallContext: incomingCallContext,\n callRejectReason: options.callRejectReason,\n };\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n\n return this.callAutomationApiClient.rejectCall(request, optionsInternal);\n }\n\n /**\n * Create connection to room call.\n * @param callLocator - Call locator to create connection.\n * @param callbackUrl - The callback url\n * @param options - Additional request options contains connect api options.\n */\n public async connectCall(\n callLocator: CallLocator,\n callbackUrl: string,\n options: ConnectCallOptions = {},\n ): Promise<ConnectCallResult> {\n const connectRequest: ConnectRequest = {\n callLocator: callLocator,\n callbackUri: callbackUrl,\n operationContext: options.operationContext,\n callIntelligenceOptions: options.callIntelligenceOptions,\n mediaStreamingOptions: options.mediaStreamingOptions,\n transcriptionOptions: options.transcriptionOptions,\n };\n\n if (callLocator.kind === \"groupCallLocator\") {\n connectRequest.callLocator.kind = \"groupCallLocator\";\n connectRequest.callLocator.groupCallId = callLocator.id;\n } else if (callLocator.kind === \"roomCallLocator\") {\n connectRequest.callLocator.kind = \"roomCallLocator\";\n connectRequest.callLocator.roomId = callLocator.id;\n } else {\n connectRequest.callLocator.kind = \"serverCallLocator\";\n connectRequest.callLocator.serverCallId = callLocator.id;\n }\n\n const optionsInternal = {\n ...options,\n repeatabilityFirstSent: new Date(),\n repeatabilityRequestID: randomUUID(),\n };\n\n const {\n callConnectionId,\n targets,\n sourceCallerIdNumber,\n answeredBy,\n source,\n answeredFor,\n ...result\n } = await this.callAutomationApiClient.connect(connectRequest, optionsInternal);\n\n if (callConnectionId) {\n const callConnectionProperties: CallConnectionProperties = {\n ...result,\n callConnectionId: callConnectionId,\n source: source ? communicationIdentifierConverter(source) : undefined,\n answeredby: answeredBy ? communicationUserIdentifierConverter(answeredBy) : undefined,\n targetParticipants: targets?.map((target) => communicationIdentifierConverter(target)),\n answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined,\n sourceCallerIdNumber: sourceCallerIdNumber\n ? phoneNumberIdentifierConverter(sourceCallerIdNumber)\n : undefined,\n };\n const callConnection = new CallConnection(\n callConnectionId,\n this.callAutomationApiClient.endpoint,\n this.credential,\n this.internalPipelineOptions,\n );\n const connectResult: ConnectCallResult = {\n callConnectionProperties: callConnectionProperties,\n callConnection: callConnection,\n };\n return connectResult;\n }\n throw \"callConnectionProperties / callConnectionId is missing in connect result\";\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callAutomationEventParser.d.ts","sourceRoot":"","sources":["../../src/callAutomationEventParser.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,mBAAmB,
|
|
1
|
+
{"version":3,"file":"callAutomationEventParser.d.ts","sourceRoot":"","sources":["../../src/callAutomationEventParser.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,mBAAmB,EAuCpB,MAAM,oBAAoB,CAAC;AAO5B;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9C,mBAAmB,CAgJrB"}
|
|
@@ -33,6 +33,14 @@ export function parseCallAutomationEvent(encodedEvents) {
|
|
|
33
33
|
callbackEvent = { kind: "RemoveParticipantFailed" };
|
|
34
34
|
parsed.participant = communicationIdentifierConverter(data.participant);
|
|
35
35
|
break;
|
|
36
|
+
case "Microsoft.Communication.MoveParticipantSucceeded":
|
|
37
|
+
callbackEvent = { kind: "MoveParticipantSucceeded" };
|
|
38
|
+
parsed.participant = communicationIdentifierConverter(data.participant);
|
|
39
|
+
break;
|
|
40
|
+
case "Microsoft.Communication.MoveParticipantFailed":
|
|
41
|
+
callbackEvent = { kind: "MoveParticipantFailed" };
|
|
42
|
+
parsed.participant = communicationIdentifierConverter(data.participant);
|
|
43
|
+
break;
|
|
36
44
|
case "Microsoft.Communication.CallConnected":
|
|
37
45
|
callbackEvent = { kind: "CallConnected" };
|
|
38
46
|
break;
|
|
@@ -109,11 +117,6 @@ export function parseCallAutomationEvent(encodedEvents) {
|
|
|
109
117
|
case "Microsoft.Communication.TranscriptionFailed":
|
|
110
118
|
callbackEvent = { kind: "TranscriptionFailed" };
|
|
111
119
|
break;
|
|
112
|
-
case "Microsoft.Communication.TranscriptionCallSummaryUpdated":
|
|
113
|
-
callbackEvent = {
|
|
114
|
-
kind: "TranscriptionCallSummaryUpdated",
|
|
115
|
-
};
|
|
116
|
-
break;
|
|
117
120
|
case "Microsoft.Communication.CreateCallFailed":
|
|
118
121
|
callbackEvent = { kind: "CreateCallFailed" };
|
|
119
122
|
break;
|
|
@@ -141,16 +144,6 @@ export function parseCallAutomationEvent(encodedEvents) {
|
|
|
141
144
|
case "Microsoft.Communication.StartRecordingFailed":
|
|
142
145
|
callbackEvent = { kind: "StartRecordingFailed" };
|
|
143
146
|
break;
|
|
144
|
-
case "Microsoft.Communication.MoveParticipantSucceeded":
|
|
145
|
-
callbackEvent = { kind: "MoveParticipantSucceeded" };
|
|
146
|
-
parsed.participant = communicationIdentifierConverter(data.participant);
|
|
147
|
-
parsed.fromCall = data.fromCall;
|
|
148
|
-
break;
|
|
149
|
-
case "Microsoft.Communication.MoveParticipantFailed":
|
|
150
|
-
callbackEvent = { kind: "MoveParticipantFailed" };
|
|
151
|
-
parsed.participant = communicationIdentifierConverter(data.participant);
|
|
152
|
-
parsed.fromCall = data.fromCall;
|
|
153
|
-
break;
|
|
154
147
|
default:
|
|
155
148
|
throw new TypeError(`Unknown Call Automation Event type: ${eventType}`);
|
|
156
149
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callAutomationEventParser.js","s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AG,aAAa,EAAyB,CAAC;AAChE,CAAC;AAED,SAAS,YAAY,CAAC,kBAAoD;IACxE,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE,CAAC;QAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACzC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnB,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;YACpC,CAAC;YACD,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACd,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACtC,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpC,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;SAAM,CAAC;QACN,OAAO,kBAAkB,CAAC;IAC5B,CAAC;AACH,CAAC;AAED,SAAS,0BAA0B,CAAC,IAAS;IAC3C,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IACvC,OAAO;QACL,GAAG,IAAI;QACP,YAAY,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC,WAAoC,EAAE,EAAE,CACvE,wBAAwB,CAAC,WAAW,CAAC,CACtC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createSerializer } from \"@azure/core-client\";\nimport { communicationIdentifierConverter, callParticipantConverter } from \"./utli/converters.js\";\nimport type {\n CallAutomationEvent,\n AddParticipantSucceeded,\n AddParticipantFailed,\n CallConnected,\n CallDisconnected,\n CallTransferAccepted,\n CallTransferFailed,\n ParticipantsUpdated,\n RecordingStateChanged,\n PlayCompleted,\n PlayFailed,\n PlayCanceled,\n RecognizeCompleted,\n RecognizeCanceled,\n RecognizeFailed,\n RemoveParticipantSucceeded,\n RemoveParticipantFailed,\n ContinuousDtmfRecognitionToneReceived,\n ContinuousDtmfRecognitionToneFailed,\n ContinuousDtmfRecognitionStopped,\n SendDtmfTonesCompleted,\n SendDtmfTonesFailed,\n CancelAddParticipantSucceeded,\n CancelAddParticipantFailed,\n TranscriptionStarted,\n TranscriptionStopped,\n TranscriptionUpdated,\n TranscriptionFailed,\n CreateCallFailed,\n AnswerFailed,\n HoldFailed,\n ConnectFailed,\n MediaStreamingStarted,\n MediaStreamingStopped,\n MediaStreamingFailed,\n PlayStarted,\n StartRecordingFailed,\n MoveParticipantSucceeded,\n MoveParticipantFailed,\n TranscriptionCallSummaryUpdated,\n} from \"./models/events.js\";\n\nimport { CloudEventMapper } from \"./models/mapper.js\";\nimport type { CallParticipantInternal } from \"./generated/src/index.js\";\n\nconst serializer = createSerializer();\n\n/**\n * Helper function for parsing Acs callback events.\n */\nexport function parseCallAutomationEvent(\n encodedEvents: string | Record<string, unknown>,\n): CallAutomationEvent {\n const decodedInput = parseAndWrap(encodedEvents);\n\n // parse cloudevent\n const deserialized = serializer.deserialize(CloudEventMapper, decodedInput, \"\");\n const data = deserialized.data;\n const eventType = deserialized.type;\n\n // get proper callbackevent and its parser\n let callbackEvent: CallAutomationEvent;\n let parsed: any = data;\n switch (eventType) {\n case \"Microsoft.Communication.AddParticipantSucceeded\":\n callbackEvent = { kind: \"AddParticipantSucceeded\" } as AddParticipantSucceeded;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.AddParticipantFailed\":\n callbackEvent = { kind: \"AddParticipantFailed\" } as AddParticipantFailed;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.RemoveParticipantSucceeded\":\n callbackEvent = { kind: \"RemoveParticipantSucceeded\" } as RemoveParticipantSucceeded;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.RemoveParticipantFailed\":\n callbackEvent = { kind: \"RemoveParticipantFailed\" } as RemoveParticipantFailed;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.CallConnected\":\n callbackEvent = { kind: \"CallConnected\" } as CallConnected;\n break;\n case \"Microsoft.Communication.CallDisconnected\":\n callbackEvent = { kind: \"CallDisconnected\" } as CallDisconnected;\n break;\n case \"Microsoft.Communication.CallTransferAccepted\":\n callbackEvent = { kind: \"CallTransferAccepted\" } as CallTransferAccepted;\n break;\n case \"Microsoft.Communication.CallTransferFailed\":\n callbackEvent = { kind: \"CallTransferFailed\" } as CallTransferFailed;\n break;\n case \"Microsoft.Communication.ParticipantsUpdated\":\n callbackEvent = { kind: \"ParticipantsUpdated\" } as ParticipantsUpdated;\n parsed = participantsParserForEvent(data);\n break;\n case \"Microsoft.Communication.RecordingStateChanged\":\n callbackEvent = { kind: \"RecordingStateChanged\" } as RecordingStateChanged;\n break;\n case \"Microsoft.Communication.PlayCompleted\":\n callbackEvent = { kind: \"PlayCompleted\" } as PlayCompleted;\n break;\n case \"Microsoft.Communication.PlayFailed\":\n callbackEvent = { kind: \"PlayFailed\" } as PlayFailed;\n break;\n case \"Microsoft.Communication.PlayCanceled\":\n callbackEvent = { kind: \"PlayCanceled\" } as PlayCanceled;\n break;\n case \"Microsoft.Communication.RecognizeCompleted\":\n callbackEvent = { kind: \"RecognizeCompleted\" } as RecognizeCompleted;\n break;\n case \"Microsoft.Communication.RecognizeCanceled\":\n callbackEvent = { kind: \"RecognizeCanceled\" } as RecognizeCanceled;\n break;\n case \"Microsoft.Communication.RecognizeFailed\":\n callbackEvent = { kind: \"RecognizeFailed\" } as RecognizeFailed;\n break;\n case \"Microsoft.Communication.ContinuousDtmfRecognitionToneReceived\":\n callbackEvent = {\n kind: \"ContinuousDtmfRecognitionToneReceived\",\n } as ContinuousDtmfRecognitionToneReceived;\n break;\n case \"Microsoft.Communication.ContinuousDtmfRecognitionToneFailed\":\n callbackEvent = {\n kind: \"ContinuousDtmfRecognitionToneFailed\",\n } as ContinuousDtmfRecognitionToneFailed;\n break;\n case \"Microsoft.Communication.ContinuousDtmfRecognitionStopped\":\n callbackEvent = {\n kind: \"ContinuousDtmfRecognitionStopped\",\n } as ContinuousDtmfRecognitionStopped;\n break;\n case \"Microsoft.Communication.SendDtmfTonesCompleted\":\n callbackEvent = { kind: \"SendDtmfTonesCompleted\" } as SendDtmfTonesCompleted;\n break;\n case \"Microsoft.Communication.SendDtmfTonesFailed\":\n callbackEvent = { kind: \"SendDtmfTonesFailed\" } as SendDtmfTonesFailed;\n break;\n case \"Microsoft.Communication.CancelAddParticipantSucceeded\":\n callbackEvent = { kind: \"CancelAddParticipantSucceeded\" } as CancelAddParticipantSucceeded;\n break;\n case \"Microsoft.Communication.CancelAddParticipantFailed\":\n callbackEvent = { kind: \"CancelAddParticipantFailed\" } as CancelAddParticipantFailed;\n break;\n case \"Microsoft.Communication.TranscriptionStarted\":\n callbackEvent = { kind: \"TranscriptionStarted\" } as TranscriptionStarted;\n break;\n case \"Microsoft.Communication.TranscriptionStopped\":\n callbackEvent = { kind: \"TranscriptionStopped\" } as TranscriptionStopped;\n break;\n case \"Microsoft.Communication.TranscriptionUpdated\":\n callbackEvent = { kind: \"TranscriptionUpdated\" } as TranscriptionUpdated;\n break;\n case \"Microsoft.Communication.TranscriptionFailed\":\n callbackEvent = { kind: \"TranscriptionFailed\" } as TranscriptionFailed;\n break;\n case \"Microsoft.Communication.TranscriptionCallSummaryUpdated\":\n callbackEvent = {\n kind: \"TranscriptionCallSummaryUpdated\",\n } as TranscriptionCallSummaryUpdated;\n break;\n case \"Microsoft.Communication.CreateCallFailed\":\n callbackEvent = { kind: \"CreateCallFailed\" } as CreateCallFailed;\n break;\n case \"Microsoft.Communication.AnswerFailed\":\n callbackEvent = { kind: \"AnswerFailed\" } as AnswerFailed;\n break;\n case \"Microsoft.Communication.HoldFailed\":\n callbackEvent = { kind: \"HoldFailed\" } as HoldFailed;\n break;\n case \"Microsoft.Communication.ConnectFailed\":\n callbackEvent = { kind: \"ConnectFailed\" } as ConnectFailed;\n break;\n case \"Microsoft.Communication.MediaStreamingStarted\":\n callbackEvent = { kind: \"MediaStreamingStarted\" } as MediaStreamingStarted;\n break;\n case \"Microsoft.Communication.MediaStreamingStopped\":\n callbackEvent = { kind: \"MediaStreamingStopped\" } as MediaStreamingStopped;\n break;\n case \"Microsoft.Communication.MediaStreamingFailed\":\n callbackEvent = { kind: \"MediaStreamingFailed\" } as MediaStreamingFailed;\n break;\n case \"Microsoft.Communication.PlayStarted\":\n callbackEvent = { kind: \"PlayStarted\" } as PlayStarted;\n break;\n case \"Microsoft.Communication.StartRecordingFailed\":\n callbackEvent = { kind: \"StartRecordingFailed\" } as StartRecordingFailed;\n break;\n case \"Microsoft.Communication.MoveParticipantSucceeded\":\n callbackEvent = { kind: \"MoveParticipantSucceeded\" } as MoveParticipantSucceeded;\n parsed.participant = communicationIdentifierConverter(data.participant);\n parsed.fromCall = data.fromCall;\n break;\n case \"Microsoft.Communication.MoveParticipantFailed\":\n callbackEvent = { kind: \"MoveParticipantFailed\" } as MoveParticipantFailed;\n parsed.participant = communicationIdentifierConverter(data.participant);\n parsed.fromCall = data.fromCall;\n break;\n default:\n throw new TypeError(`Unknown Call Automation Event type: ${eventType}`);\n }\n\n return { ...parsed, ...callbackEvent } as CallAutomationEvent;\n}\n\nfunction parseAndWrap(jsonStringOrObject: string | Record<string, unknown>): any {\n if (typeof jsonStringOrObject === \"string\") {\n const o = JSON.parse(jsonStringOrObject);\n if (Array.isArray(o)) {\n if (o.length === 0) {\n throw Error(\"Empty event array.\");\n }\n return o[0];\n } else {\n return o;\n }\n }\n\n if (Array.isArray(jsonStringOrObject)) {\n if (jsonStringOrObject.length === 0) {\n throw Error(\"Empty event array.\");\n }\n return jsonStringOrObject[0];\n } else {\n return jsonStringOrObject;\n }\n}\n\nfunction participantsParserForEvent(data: any): any {\n const { participants, ...rest } = data;\n return {\n ...rest,\n participants: participants?.map((participant: CallParticipantInternal) =>\n callParticipantConverter(participant),\n ),\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"callAutomationEventParser.js","sourceRoot":"","sources":["../../src/callAutomationEventParser.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gCAAgC,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AA2ClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,UAAU,GAAG,gBAAgB,EAAE,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,wBAAwB,CACtC,aAA+C;IAE/C,MAAM,YAAY,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;IAEjD,mBAAmB;IACnB,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,EAAE,YAAY,EAAE,EAAE,CAAC,CAAC;IAChF,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;IAC/B,MAAM,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC;IAEpC,0CAA0C;IAC1C,IAAI,aAAkC,CAAC;IACvC,IAAI,MAAM,GAAQ,IAAI,CAAC;IACvB,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,iDAAiD;YACpD,aAAa,GAAG,EAAE,IAAI,EAAE,yBAAyB,EAA6B,CAAC;YAC/E,MAAM,CAAC,WAAW,GAAG,gCAAgC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACxE,MAAM;QACR,KAAK,8CAA8C;YACjD,aAAa,GAAG,EAAE,IAAI,EAAE,sBAAsB,EAA0B,CAAC;YACzE,MAAM,CAAC,WAAW,GAAG,gCAAgC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACxE,MAAM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;AAChE,CAAC;AAED,SAAS,YAAY,CAAC,kBAAoD;IACxE,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE,CAAC;QAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;QACzC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACnB,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;YACpC,CAAC;YACD,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACd,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;QACtC,IAAI,kBAAkB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACpC,MAAM,KAAK,CAAC,oBAAoB,CAAC,CAAC;QACpC,CAAC;QACD,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC;IAC/B,CAAC;SAAM,CAAC;QACN,OAAO,kBAAkB,CAAC;IAC5B,CAAC;AACH,CAAC;AAED,SAAS,0BAA0B,CAAC,IAAS;IAC3C,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC;IACvC,OAAO;QACL,GAAG,IAAI;QACP,YAAY,EAAE,YAAY,EAAE,GAAG,CAAC,CAAC,WAAoC,EAAE,EAAE,CACvE,wBAAwB,CAAC,WAAW,CAAC,CACtC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createSerializer } from \"@azure/core-client\";\nimport { communicationIdentifierConverter, callParticipantConverter } from \"./utli/converters.js\";\nimport type {\n CallAutomationEvent,\n AddParticipantSucceeded,\n AddParticipantFailed,\n CallConnected,\n CallDisconnected,\n CallTransferAccepted,\n CallTransferFailed,\n ParticipantsUpdated,\n RecordingStateChanged,\n PlayCompleted,\n PlayFailed,\n PlayCanceled,\n RecognizeCompleted,\n RecognizeCanceled,\n RecognizeFailed,\n RemoveParticipantSucceeded,\n RemoveParticipantFailed,\n MoveParticipantSucceeded,\n MoveParticipantFailed,\n ContinuousDtmfRecognitionToneReceived,\n ContinuousDtmfRecognitionToneFailed,\n ContinuousDtmfRecognitionStopped,\n SendDtmfTonesCompleted,\n SendDtmfTonesFailed,\n CancelAddParticipantSucceeded,\n CancelAddParticipantFailed,\n TranscriptionStarted,\n TranscriptionStopped,\n TranscriptionUpdated,\n TranscriptionFailed,\n CreateCallFailed,\n AnswerFailed,\n HoldFailed,\n ConnectFailed,\n MediaStreamingStarted,\n MediaStreamingStopped,\n MediaStreamingFailed,\n PlayStarted,\n StartRecordingFailed,\n} from \"./models/events.js\";\n\nimport { CloudEventMapper } from \"./models/mapper.js\";\nimport type { CallParticipantInternal } from \"./generated/src/index.js\";\n\nconst serializer = createSerializer();\n\n/**\n * Helper function for parsing Acs callback events.\n */\nexport function parseCallAutomationEvent(\n encodedEvents: string | Record<string, unknown>,\n): CallAutomationEvent {\n const decodedInput = parseAndWrap(encodedEvents);\n\n // parse cloudevent\n const deserialized = serializer.deserialize(CloudEventMapper, decodedInput, \"\");\n const data = deserialized.data;\n const eventType = deserialized.type;\n\n // get proper callbackevent and its parser\n let callbackEvent: CallAutomationEvent;\n let parsed: any = data;\n switch (eventType) {\n case \"Microsoft.Communication.AddParticipantSucceeded\":\n callbackEvent = { kind: \"AddParticipantSucceeded\" } as AddParticipantSucceeded;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.AddParticipantFailed\":\n callbackEvent = { kind: \"AddParticipantFailed\" } as AddParticipantFailed;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.RemoveParticipantSucceeded\":\n callbackEvent = { kind: \"RemoveParticipantSucceeded\" } as RemoveParticipantSucceeded;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.RemoveParticipantFailed\":\n callbackEvent = { kind: \"RemoveParticipantFailed\" } as RemoveParticipantFailed;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.MoveParticipantSucceeded\":\n callbackEvent = { kind: \"MoveParticipantSucceeded\" } as MoveParticipantSucceeded;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.MoveParticipantFailed\":\n callbackEvent = { kind: \"MoveParticipantFailed\" } as MoveParticipantFailed;\n parsed.participant = communicationIdentifierConverter(data.participant);\n break;\n case \"Microsoft.Communication.CallConnected\":\n callbackEvent = { kind: \"CallConnected\" } as CallConnected;\n break;\n case \"Microsoft.Communication.CallDisconnected\":\n callbackEvent = { kind: \"CallDisconnected\" } as CallDisconnected;\n break;\n case \"Microsoft.Communication.CallTransferAccepted\":\n callbackEvent = { kind: \"CallTransferAccepted\" } as CallTransferAccepted;\n break;\n case \"Microsoft.Communication.CallTransferFailed\":\n callbackEvent = { kind: \"CallTransferFailed\" } as CallTransferFailed;\n break;\n case \"Microsoft.Communication.ParticipantsUpdated\":\n callbackEvent = { kind: \"ParticipantsUpdated\" } as ParticipantsUpdated;\n parsed = participantsParserForEvent(data);\n break;\n case \"Microsoft.Communication.RecordingStateChanged\":\n callbackEvent = { kind: \"RecordingStateChanged\" } as RecordingStateChanged;\n break;\n case \"Microsoft.Communication.PlayCompleted\":\n callbackEvent = { kind: \"PlayCompleted\" } as PlayCompleted;\n break;\n case \"Microsoft.Communication.PlayFailed\":\n callbackEvent = { kind: \"PlayFailed\" } as PlayFailed;\n break;\n case \"Microsoft.Communication.PlayCanceled\":\n callbackEvent = { kind: \"PlayCanceled\" } as PlayCanceled;\n break;\n case \"Microsoft.Communication.RecognizeCompleted\":\n callbackEvent = { kind: \"RecognizeCompleted\" } as RecognizeCompleted;\n break;\n case \"Microsoft.Communication.RecognizeCanceled\":\n callbackEvent = { kind: \"RecognizeCanceled\" } as RecognizeCanceled;\n break;\n case \"Microsoft.Communication.RecognizeFailed\":\n callbackEvent = { kind: \"RecognizeFailed\" } as RecognizeFailed;\n break;\n case \"Microsoft.Communication.ContinuousDtmfRecognitionToneReceived\":\n callbackEvent = {\n kind: \"ContinuousDtmfRecognitionToneReceived\",\n } as ContinuousDtmfRecognitionToneReceived;\n break;\n case \"Microsoft.Communication.ContinuousDtmfRecognitionToneFailed\":\n callbackEvent = {\n kind: \"ContinuousDtmfRecognitionToneFailed\",\n } as ContinuousDtmfRecognitionToneFailed;\n break;\n case \"Microsoft.Communication.ContinuousDtmfRecognitionStopped\":\n callbackEvent = {\n kind: \"ContinuousDtmfRecognitionStopped\",\n } as ContinuousDtmfRecognitionStopped;\n break;\n case \"Microsoft.Communication.SendDtmfTonesCompleted\":\n callbackEvent = { kind: \"SendDtmfTonesCompleted\" } as SendDtmfTonesCompleted;\n break;\n case \"Microsoft.Communication.SendDtmfTonesFailed\":\n callbackEvent = { kind: \"SendDtmfTonesFailed\" } as SendDtmfTonesFailed;\n break;\n case \"Microsoft.Communication.CancelAddParticipantSucceeded\":\n callbackEvent = { kind: \"CancelAddParticipantSucceeded\" } as CancelAddParticipantSucceeded;\n break;\n case \"Microsoft.Communication.CancelAddParticipantFailed\":\n callbackEvent = { kind: \"CancelAddParticipantFailed\" } as CancelAddParticipantFailed;\n break;\n case \"Microsoft.Communication.TranscriptionStarted\":\n callbackEvent = { kind: \"TranscriptionStarted\" } as TranscriptionStarted;\n break;\n case \"Microsoft.Communication.TranscriptionStopped\":\n callbackEvent = { kind: \"TranscriptionStopped\" } as TranscriptionStopped;\n break;\n case \"Microsoft.Communication.TranscriptionUpdated\":\n callbackEvent = { kind: \"TranscriptionUpdated\" } as TranscriptionUpdated;\n break;\n case \"Microsoft.Communication.TranscriptionFailed\":\n callbackEvent = { kind: \"TranscriptionFailed\" } as TranscriptionFailed;\n break;\n case \"Microsoft.Communication.CreateCallFailed\":\n callbackEvent = { kind: \"CreateCallFailed\" } as CreateCallFailed;\n break;\n case \"Microsoft.Communication.AnswerFailed\":\n callbackEvent = { kind: \"AnswerFailed\" } as AnswerFailed;\n break;\n case \"Microsoft.Communication.HoldFailed\":\n callbackEvent = { kind: \"HoldFailed\" } as HoldFailed;\n break;\n case \"Microsoft.Communication.ConnectFailed\":\n callbackEvent = { kind: \"ConnectFailed\" } as ConnectFailed;\n break;\n case \"Microsoft.Communication.MediaStreamingStarted\":\n callbackEvent = { kind: \"MediaStreamingStarted\" } as MediaStreamingStarted;\n break;\n case \"Microsoft.Communication.MediaStreamingStopped\":\n callbackEvent = { kind: \"MediaStreamingStopped\" } as MediaStreamingStopped;\n break;\n case \"Microsoft.Communication.MediaStreamingFailed\":\n callbackEvent = { kind: \"MediaStreamingFailed\" } as MediaStreamingFailed;\n break;\n case \"Microsoft.Communication.PlayStarted\":\n callbackEvent = { kind: \"PlayStarted\" } as PlayStarted;\n break;\n case \"Microsoft.Communication.StartRecordingFailed\":\n callbackEvent = { kind: \"StartRecordingFailed\" } as StartRecordingFailed;\n break;\n default:\n throw new TypeError(`Unknown Call Automation Event type: ${eventType}`);\n }\n\n return { ...parsed, ...callbackEvent } as CallAutomationEvent;\n}\n\nfunction parseAndWrap(jsonStringOrObject: string | Record<string, unknown>): any {\n if (typeof jsonStringOrObject === \"string\") {\n const o = JSON.parse(jsonStringOrObject);\n if (Array.isArray(o)) {\n if (o.length === 0) {\n throw Error(\"Empty event array.\");\n }\n return o[0];\n } else {\n return o;\n }\n }\n\n if (Array.isArray(jsonStringOrObject)) {\n if (jsonStringOrObject.length === 0) {\n throw Error(\"Empty event array.\");\n }\n return jsonStringOrObject[0];\n } else {\n return jsonStringOrObject;\n }\n}\n\nfunction participantsParserForEvent(data: any): any {\n const { participants, ...rest } = data;\n return {\n ...rest,\n participants: participants?.map((participant: CallParticipantInternal) =>\n callParticipantConverter(participant),\n ),\n };\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { CommunicationIdentifier } from "@azure/communication-common";
|
|
1
|
+
import type { CommunicationIdentifier } from "@azure/communication-common";
|
|
2
2
|
import { CallMedia } from "./callMedia.js";
|
|
3
|
-
import { CallAutomationApiClientOptionalParams } from "./generated/src/index.js";
|
|
3
|
+
import type { CallAutomationApiClientOptionalParams } from "./generated/src/index.js";
|
|
4
4
|
import { type CallConnectionProperties, type CallInvite, type CallParticipant } from "./models/models.js";
|
|
5
5
|
import type { AddParticipantOptions, CancelAddParticipantOperationOptions, GetCallConnectionPropertiesOptions, GetParticipantOptions, HangUpOptions, MoveParticipantsOptions, MuteParticipantOption, RemoveParticipantsOption, TransferCallToParticipantOptions } from "./models/options.js";
|
|
6
6
|
import type { ListParticipantsResult, TransferCallResult, AddParticipantResult, RemoveParticipantResult, MuteParticipantResult, CancelAddParticipantOperationResult, MoveParticipantsResult } from "./models/responses.js";
|
|
@@ -72,11 +72,11 @@ export declare class CallConnection {
|
|
|
72
72
|
*/
|
|
73
73
|
cancelAddParticipantOperation(invitationId: string, options?: CancelAddParticipantOperationOptions): Promise<CancelAddParticipantOperationResult>;
|
|
74
74
|
/**
|
|
75
|
-
* Move participants to the call
|
|
75
|
+
* Move participants to the call.
|
|
76
76
|
*
|
|
77
|
-
* @param targetParticipants - The participants to
|
|
77
|
+
* @param targetParticipants - The participants to move to the call.
|
|
78
78
|
* @param fromCall - The CallConnectionId for the call you want to move the participant from.
|
|
79
|
-
* @param options - Additional
|
|
79
|
+
* @param options - Additional options for moving participants.
|
|
80
80
|
*/
|
|
81
81
|
moveParticipants(targetParticipants: CommunicationIdentifier[], fromCall: string, options?: MoveParticipantsOptions): Promise<MoveParticipantsResult>;
|
|
82
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callConnection.d.ts","sourceRoot":"","sources":["../../src/callConnection.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"callConnection.d.ts","sourceRoot":"","sources":["../../src/callConnection.ts"],"names":[],"mappings":"AAGA,OA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AM,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAcvF;;;;OAIG;IACU,cAAc,CACzB,iBAAiB,EAAE,uBAAuB,EAC1C,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,eAAe,CAAC;IAe3B;;OAEG;IACU,gBAAgB,CAC3B,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,sBAAsB,CAAC;IAkBlC,OAAO,CAAC,kCAAkC;IA8B1C;;;;OAIG;IACU,cAAc,CACzB,iBAAiB,EAAE,UAAU,EAC7B,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,oBAAoB,CAAC;IAoChC;;;;OAIG;IACU,yBAAyB,CACpC,iBAAiB,EAAE,uBAAuB,EAC1C,OAAO,GAAE,gCAAqC,GAC7C,OAAO,CAAC,kBAAkB,CAAC;IAyB9B;;;;OAIG;IACU,iBAAiB,CAC5B,WAAW,EAAE,uBAAuB,EACpC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,uBAAuB,CAAC;IAsBnC;;;;;OAKG;IACU,eAAe,CAC1B,WAAW,EAAE,uBAAuB,EACpC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,qBAAqB,CAAC;IAqBjC;;;OAGG;IACU,6BAA6B,CACxC,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,oCAAyC,GACjD,OAAO,CAAC,mCAAmC,CAAC;IA8B/C;;;;;;OAMG;IACU,gBAAgB,CAC3B,kBAAkB,EAAE,uBAAuB,EAAE,EAC7C,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,sBAAsB,CAAC;CAoCnC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { createCommunicationAuthPolicy
|
|
3
|
+
import { createCommunicationAuthPolicy } from "@azure/communication-common";
|
|
4
4
|
import { CallMedia } from "./callMedia.js";
|
|
5
|
-
import { CallAutomationApiClient
|
|
5
|
+
import { CallAutomationApiClient } from "./generated/src/index.js";
|
|
6
6
|
import { CallConnectionImpl } from "./generated/src/operations/index.js";
|
|
7
7
|
import { callParticipantConverter, communicationIdentifierConverter, communicationIdentifierModelConverter, communicationUserIdentifierConverter, phoneNumberIdentifierConverter, PhoneNumberIdentifierModelConverter, teamsPhoneCallDetailsModelConverter, } from "./utli/converters.js";
|
|
8
8
|
import { randomUUID } from "@azure/core-util";
|
|
@@ -124,7 +124,7 @@ export class CallConnection {
|
|
|
124
124
|
else if (header.kind === "voip") {
|
|
125
125
|
voipHeaders[`${header.key}`] = header.value;
|
|
126
126
|
}
|
|
127
|
-
else if (header.kind === "
|
|
127
|
+
else if (header.kind === "TeamsPhoneCallDetails") {
|
|
128
128
|
teamsPhoneCallDetails = teamsPhoneCallDetailsModelConverter(header);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
@@ -259,21 +259,22 @@ export class CallConnection {
|
|
|
259
259
|
return cancelAddParticipantResult;
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
262
|
-
* Move participants to the call
|
|
262
|
+
* Move participants to the call.
|
|
263
263
|
*
|
|
264
|
-
* @param targetParticipants - The participants to
|
|
264
|
+
* @param targetParticipants - The participants to move to the call.
|
|
265
265
|
* @param fromCall - The CallConnectionId for the call you want to move the participant from.
|
|
266
|
-
* @param options - Additional
|
|
266
|
+
* @param options - Additional options for moving participants.
|
|
267
267
|
*/
|
|
268
268
|
async moveParticipants(targetParticipants, fromCall, options = {}) {
|
|
269
|
+
const { operationContext, operationCallbackUrl: operationCallbackUri, ...operationOptions } = options;
|
|
269
270
|
const moveParticipantsRequest = {
|
|
270
271
|
targetParticipants: targetParticipants.map((participant) => communicationIdentifierModelConverter(participant)),
|
|
271
|
-
fromCall
|
|
272
|
-
operationContext:
|
|
273
|
-
operationCallbackUri
|
|
272
|
+
fromCall,
|
|
273
|
+
operationContext: operationContext ? operationContext : randomUUID(),
|
|
274
|
+
operationCallbackUri,
|
|
274
275
|
};
|
|
275
276
|
const optionsInternal = {
|
|
276
|
-
...
|
|
277
|
+
...operationOptions,
|
|
277
278
|
repeatabilityFirstSent: new Date(),
|
|
278
279
|
repeatabilityRequestID: randomUUID(),
|
|
279
280
|
};
|