@azure/communication-call-automation 1.6.0-beta.1 → 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 -428
- 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 -34
- 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 -432
- 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 -432
- 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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C,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;gBACrE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,IAAA,oDAAoC,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS;gBACrF,kBAAkB,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAA,gDAAgC,EAAC,MAAM,CAAC,CAAC;gBACtF,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,IAAA,8CAA8B,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;gBAClF,oBAAoB,EAAE,oBAAoB;oBACxC,CAAC,CAAC,IAAA,8CAA8B,EAAC,oBAAoB,CAAC;oBACtD,CAAC,CAAC,SAAS;aACd,CAAC;YACF,MAAM,cAAc,GAAG,IAAI,kCAAc,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;AAnYD,oDAmYC","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
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/callAutomationClient.ts"],
|
|
4
|
+
"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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,uBAAkC;AAOlC,kCAIO;AACP,oBAAuB;AASvB,iBAAwC;AACxC,4BAA+B;AAC/B,2BAA8B;AAc9B,wBAQO;AACP,uBAA2B;AAgB3B,MAAM,gCAAgC,CAAC,YACrC,CAAC,CAAC,WAAW,KAAC,oCAAkB,OAAO,KAAK,KAAC,6CAAgB,OAAO;AAK/D,MAAM,qBAAqB;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAqBjB,YACE,uBACA,qBACA,eAA4C,CAAC,GAC7C;AACA,UAAM,UAAU,8BAA8B,mBAAmB,IAC7D,sBACA;AAEJ,QAAI,CAAC,SAAS,kBAAkB;AAC9B,cAAQ,mBAAmB,CAAC;AAAA,IAC9B;AAE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;AAAA,IACxD;AAEA,UAAM,kBAAkB;AAAA,MACtB,GAAG;AAAA,MACH,wBAAwB,oBAAI,KAAK;AAAA,MACjC,4BAAwB,6BAAW;AAAA,IACrC;AAEA,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI,MAAM,KAAK,wBAAwB,QAAQ,gBAAgB,eAAe;AAE9E,QAAI,kBAAkB;AACpB,YAAM,2BAAqD;AAAA,QACzD,GAAG;AAAA,QACH;AAAA,QACA,QAAQ,aAAS,oDAAiC,MAAM,IAAI;AAAA,QAC5D,YAAY,iBAAa,wDAAqC,UAAU,IAAI;AAAA,QAC5E,oBAAoB,SAAS,IAAI,CAAC,eAAW,oDAAiC,MAAM,CAAC;AAAA,QACrF,aAAa,kBAAc,kDAA+B,WAAW,IAAI;AAAA,QACzE,sBAAsB,2BAClB,kDAA+B,oBAAoB,IACnD;AAAA,MACN;AACA,YAAM,iBAAiB,IAAI;AAAA,QACzB;AAAA,QACA,KAAK,wBAAwB;AAAA,QAC7B,KAAK;AAAA,QACL,KAAK;AAAA,MACP;AACA,YAAM,gBAAmC;AAAA,QACvC;AAAA,QACA;AAAA,MACF;AACA,aAAO;AAAA,IACT;AACA,UAAM;AAAA,EACR;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -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"}
|
|
@@ -1,192 +1,201 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 callAutomationEventParser_exports = {};
|
|
19
|
+
__export(callAutomationEventParser_exports, {
|
|
20
|
+
parseCallAutomationEvent: () => parseCallAutomationEvent
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(callAutomationEventParser_exports);
|
|
23
|
+
var import_core_client = require("@azure/core-client");
|
|
24
|
+
var import_converters = require("./utli/converters.js");
|
|
25
|
+
var import_mapper = require("./models/mapper.js");
|
|
26
|
+
const serializer = (0, import_core_client.createSerializer)();
|
|
13
27
|
function parseCallAutomationEvent(encodedEvents) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
case "Microsoft.Communication.MoveParticipantFailed":
|
|
153
|
-
callbackEvent = { kind: "MoveParticipantFailed" };
|
|
154
|
-
parsed.participant = (0, converters_js_1.communicationIdentifierConverter)(data.participant);
|
|
155
|
-
parsed.fromCall = data.fromCall;
|
|
156
|
-
break;
|
|
157
|
-
default:
|
|
158
|
-
throw new TypeError(`Unknown Call Automation Event type: ${eventType}`);
|
|
159
|
-
}
|
|
160
|
-
return { ...parsed, ...callbackEvent };
|
|
28
|
+
const decodedInput = parseAndWrap(encodedEvents);
|
|
29
|
+
const deserialized = serializer.deserialize(import_mapper.CloudEventMapper, decodedInput, "");
|
|
30
|
+
const data = deserialized.data;
|
|
31
|
+
const eventType = deserialized.type;
|
|
32
|
+
let callbackEvent;
|
|
33
|
+
let parsed = data;
|
|
34
|
+
switch (eventType) {
|
|
35
|
+
case "Microsoft.Communication.AddParticipantSucceeded":
|
|
36
|
+
callbackEvent = { kind: "AddParticipantSucceeded" };
|
|
37
|
+
parsed.participant = (0, import_converters.communicationIdentifierConverter)(data.participant);
|
|
38
|
+
break;
|
|
39
|
+
case "Microsoft.Communication.AddParticipantFailed":
|
|
40
|
+
callbackEvent = { kind: "AddParticipantFailed" };
|
|
41
|
+
parsed.participant = (0, import_converters.communicationIdentifierConverter)(data.participant);
|
|
42
|
+
break;
|
|
43
|
+
case "Microsoft.Communication.RemoveParticipantSucceeded":
|
|
44
|
+
callbackEvent = { kind: "RemoveParticipantSucceeded" };
|
|
45
|
+
parsed.participant = (0, import_converters.communicationIdentifierConverter)(data.participant);
|
|
46
|
+
break;
|
|
47
|
+
case "Microsoft.Communication.RemoveParticipantFailed":
|
|
48
|
+
callbackEvent = { kind: "RemoveParticipantFailed" };
|
|
49
|
+
parsed.participant = (0, import_converters.communicationIdentifierConverter)(data.participant);
|
|
50
|
+
break;
|
|
51
|
+
case "Microsoft.Communication.MoveParticipantSucceeded":
|
|
52
|
+
callbackEvent = { kind: "MoveParticipantSucceeded" };
|
|
53
|
+
parsed.participant = (0, import_converters.communicationIdentifierConverter)(data.participant);
|
|
54
|
+
break;
|
|
55
|
+
case "Microsoft.Communication.MoveParticipantFailed":
|
|
56
|
+
callbackEvent = { kind: "MoveParticipantFailed" };
|
|
57
|
+
parsed.participant = (0, import_converters.communicationIdentifierConverter)(data.participant);
|
|
58
|
+
break;
|
|
59
|
+
case "Microsoft.Communication.CallConnected":
|
|
60
|
+
callbackEvent = { kind: "CallConnected" };
|
|
61
|
+
break;
|
|
62
|
+
case "Microsoft.Communication.CallDisconnected":
|
|
63
|
+
callbackEvent = { kind: "CallDisconnected" };
|
|
64
|
+
break;
|
|
65
|
+
case "Microsoft.Communication.CallTransferAccepted":
|
|
66
|
+
callbackEvent = { kind: "CallTransferAccepted" };
|
|
67
|
+
break;
|
|
68
|
+
case "Microsoft.Communication.CallTransferFailed":
|
|
69
|
+
callbackEvent = { kind: "CallTransferFailed" };
|
|
70
|
+
break;
|
|
71
|
+
case "Microsoft.Communication.ParticipantsUpdated":
|
|
72
|
+
callbackEvent = { kind: "ParticipantsUpdated" };
|
|
73
|
+
parsed = participantsParserForEvent(data);
|
|
74
|
+
break;
|
|
75
|
+
case "Microsoft.Communication.RecordingStateChanged":
|
|
76
|
+
callbackEvent = { kind: "RecordingStateChanged" };
|
|
77
|
+
break;
|
|
78
|
+
case "Microsoft.Communication.PlayCompleted":
|
|
79
|
+
callbackEvent = { kind: "PlayCompleted" };
|
|
80
|
+
break;
|
|
81
|
+
case "Microsoft.Communication.PlayFailed":
|
|
82
|
+
callbackEvent = { kind: "PlayFailed" };
|
|
83
|
+
break;
|
|
84
|
+
case "Microsoft.Communication.PlayCanceled":
|
|
85
|
+
callbackEvent = { kind: "PlayCanceled" };
|
|
86
|
+
break;
|
|
87
|
+
case "Microsoft.Communication.RecognizeCompleted":
|
|
88
|
+
callbackEvent = { kind: "RecognizeCompleted" };
|
|
89
|
+
break;
|
|
90
|
+
case "Microsoft.Communication.RecognizeCanceled":
|
|
91
|
+
callbackEvent = { kind: "RecognizeCanceled" };
|
|
92
|
+
break;
|
|
93
|
+
case "Microsoft.Communication.RecognizeFailed":
|
|
94
|
+
callbackEvent = { kind: "RecognizeFailed" };
|
|
95
|
+
break;
|
|
96
|
+
case "Microsoft.Communication.ContinuousDtmfRecognitionToneReceived":
|
|
97
|
+
callbackEvent = {
|
|
98
|
+
kind: "ContinuousDtmfRecognitionToneReceived"
|
|
99
|
+
};
|
|
100
|
+
break;
|
|
101
|
+
case "Microsoft.Communication.ContinuousDtmfRecognitionToneFailed":
|
|
102
|
+
callbackEvent = {
|
|
103
|
+
kind: "ContinuousDtmfRecognitionToneFailed"
|
|
104
|
+
};
|
|
105
|
+
break;
|
|
106
|
+
case "Microsoft.Communication.ContinuousDtmfRecognitionStopped":
|
|
107
|
+
callbackEvent = {
|
|
108
|
+
kind: "ContinuousDtmfRecognitionStopped"
|
|
109
|
+
};
|
|
110
|
+
break;
|
|
111
|
+
case "Microsoft.Communication.SendDtmfTonesCompleted":
|
|
112
|
+
callbackEvent = { kind: "SendDtmfTonesCompleted" };
|
|
113
|
+
break;
|
|
114
|
+
case "Microsoft.Communication.SendDtmfTonesFailed":
|
|
115
|
+
callbackEvent = { kind: "SendDtmfTonesFailed" };
|
|
116
|
+
break;
|
|
117
|
+
case "Microsoft.Communication.CancelAddParticipantSucceeded":
|
|
118
|
+
callbackEvent = { kind: "CancelAddParticipantSucceeded" };
|
|
119
|
+
break;
|
|
120
|
+
case "Microsoft.Communication.CancelAddParticipantFailed":
|
|
121
|
+
callbackEvent = { kind: "CancelAddParticipantFailed" };
|
|
122
|
+
break;
|
|
123
|
+
case "Microsoft.Communication.TranscriptionStarted":
|
|
124
|
+
callbackEvent = { kind: "TranscriptionStarted" };
|
|
125
|
+
break;
|
|
126
|
+
case "Microsoft.Communication.TranscriptionStopped":
|
|
127
|
+
callbackEvent = { kind: "TranscriptionStopped" };
|
|
128
|
+
break;
|
|
129
|
+
case "Microsoft.Communication.TranscriptionUpdated":
|
|
130
|
+
callbackEvent = { kind: "TranscriptionUpdated" };
|
|
131
|
+
break;
|
|
132
|
+
case "Microsoft.Communication.TranscriptionFailed":
|
|
133
|
+
callbackEvent = { kind: "TranscriptionFailed" };
|
|
134
|
+
break;
|
|
135
|
+
case "Microsoft.Communication.CreateCallFailed":
|
|
136
|
+
callbackEvent = { kind: "CreateCallFailed" };
|
|
137
|
+
break;
|
|
138
|
+
case "Microsoft.Communication.AnswerFailed":
|
|
139
|
+
callbackEvent = { kind: "AnswerFailed" };
|
|
140
|
+
break;
|
|
141
|
+
case "Microsoft.Communication.HoldFailed":
|
|
142
|
+
callbackEvent = { kind: "HoldFailed" };
|
|
143
|
+
break;
|
|
144
|
+
case "Microsoft.Communication.ConnectFailed":
|
|
145
|
+
callbackEvent = { kind: "ConnectFailed" };
|
|
146
|
+
break;
|
|
147
|
+
case "Microsoft.Communication.MediaStreamingStarted":
|
|
148
|
+
callbackEvent = { kind: "MediaStreamingStarted" };
|
|
149
|
+
break;
|
|
150
|
+
case "Microsoft.Communication.MediaStreamingStopped":
|
|
151
|
+
callbackEvent = { kind: "MediaStreamingStopped" };
|
|
152
|
+
break;
|
|
153
|
+
case "Microsoft.Communication.MediaStreamingFailed":
|
|
154
|
+
callbackEvent = { kind: "MediaStreamingFailed" };
|
|
155
|
+
break;
|
|
156
|
+
case "Microsoft.Communication.PlayStarted":
|
|
157
|
+
callbackEvent = { kind: "PlayStarted" };
|
|
158
|
+
break;
|
|
159
|
+
case "Microsoft.Communication.StartRecordingFailed":
|
|
160
|
+
callbackEvent = { kind: "StartRecordingFailed" };
|
|
161
|
+
break;
|
|
162
|
+
default:
|
|
163
|
+
throw new TypeError(`Unknown Call Automation Event type: ${eventType}`);
|
|
164
|
+
}
|
|
165
|
+
return { ...parsed, ...callbackEvent };
|
|
161
166
|
}
|
|
162
167
|
function parseAndWrap(jsonStringOrObject) {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return o;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
if (Array.isArray(jsonStringOrObject)) {
|
|
176
|
-
if (jsonStringOrObject.length === 0) {
|
|
177
|
-
throw Error("Empty event array.");
|
|
178
|
-
}
|
|
179
|
-
return jsonStringOrObject[0];
|
|
168
|
+
if (typeof jsonStringOrObject === "string") {
|
|
169
|
+
const o = JSON.parse(jsonStringOrObject);
|
|
170
|
+
if (Array.isArray(o)) {
|
|
171
|
+
if (o.length === 0) {
|
|
172
|
+
throw Error("Empty event array.");
|
|
173
|
+
}
|
|
174
|
+
return o[0];
|
|
175
|
+
} else {
|
|
176
|
+
return o;
|
|
180
177
|
}
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
}
|
|
179
|
+
if (Array.isArray(jsonStringOrObject)) {
|
|
180
|
+
if (jsonStringOrObject.length === 0) {
|
|
181
|
+
throw Error("Empty event array.");
|
|
183
182
|
}
|
|
183
|
+
return jsonStringOrObject[0];
|
|
184
|
+
} else {
|
|
185
|
+
return jsonStringOrObject;
|
|
186
|
+
}
|
|
184
187
|
}
|
|
185
188
|
function participantsParserForEvent(data) {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
const { participants, ...rest } = data;
|
|
190
|
+
return {
|
|
191
|
+
...rest,
|
|
192
|
+
participants: participants?.map(
|
|
193
|
+
(participant) => (0, import_converters.callParticipantConverter)(participant)
|
|
194
|
+
)
|
|
195
|
+
};
|
|
191
196
|
}
|
|
192
|
-
|
|
197
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
198
|
+
0 && (module.exports = {
|
|
199
|
+
parseCallAutomationEvent
|
|
200
|
+
});
|
|
201
|
+
//# sourceMappingURL=callAutomationEventParser.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{"version":3,"file":"callAutomationEventParser.js","sourceRoot":"","sources":["../../src/callAutomationEventParser.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAuDlC,4DAyJC;AA9MD,oDAAsD;AACtD,wDAAkG;AA4ClG,kDAAsD;AAGtD,MAAM,UAAU,GAAG,IAAA,8BAAgB,GAAE,CAAC;AAEtC;;GAEG;AACH,SAAgB,wBAAwB,CACtC,aAA+C;IAE/C,MAAM,YAAY,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;IAEjD,mBAAmB;IACnB,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW,CAAC,4BAAgB,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,IAAA,gDAAgC,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACxE,MAAM;QACR,KAAK,8CAA8C;YACjD,aAAa,GAAG,EAAE,IAAI,EAAE,sBAAsB,EAA0B,CAAC;YACzE,MAAM,CAAC,W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vE,IAAA,wCAAwB,EAAC,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
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/callAutomationEventParser.ts"],
|
|
4
|
+
"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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,yBAAiC;AACjC,wBAA2E;AA2C3E,oBAAiC;AAGjC,MAAM,iBAAa,qCAAiB;AAK7B,SAAS,yBACd,eACqB;AACrB,QAAM,eAAe,aAAa,aAAa;AAG/C,QAAM,eAAe,WAAW,YAAY,gCAAkB,cAAc,EAAE;AAC9E,QAAM,OAAO,aAAa;AAC1B,QAAM,YAAY,aAAa;AAG/B,MAAI;AACJ,MAAI,SAAc;AAClB,UAAQ,WAAW;AAAA,IACjB,KAAK;AACH,sBAAgB,EAAE,MAAM,0BAA0B;AAClD,aAAO,kBAAc,oDAAiC,KAAK,WAAW;AACtE;AAAA,IACF,KAAK;AACH,sBAAgB,EAAE,MAAM,uBAAuB;AAC/C,aAAO,kBAAc,oDAAiC,KAAK,WAAW;A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B;AACvC,QAAI,MAAM,QAAQ,CAAC,GAAG;AACpB,UAAI,EAAE,WAAW,GAAG;AAClB,cAAM,MAAM,oBAAoB;AAAA,MAClC;AACA,aAAO,EAAE,CAAC;AAAA,IACZ,OAAO;AACL,aAAO;AAAA,IACT;AAAA,EACF;AAEA,MAAI,MAAM,QAAQ,kBAAkB,GAAG;AACrC,QAAI,mBAAmB,WAAW,GAAG;AACnC,YAAM,MAAM,oBAAoB;AAAA,IAClC;AACA,WAAO,mBAAmB,CAAC;AAAA,EAC7B,OAAO;AACL,WAAO;AAAA,EACT;AACF;AAEA,SAAS,2BAA2B,MAAgB;AAClD,QAAM,EAAE,cAAc,GAAG,KAAK,IAAI;AAClC,SAAO;AAAA,IACL,GAAG;AAAA,IACH,cAAc,cAAc;AAAA,MAAI,CAAC,oBAC/B,4CAAyB,WAAW;AAAA,IACtC;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -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
|
}
|