@azure/communication-call-automation 1.6.0-beta.2 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/callAutomationClient.d.ts.map +1 -1
- package/dist/commonjs/callAutomationClient.js +328 -271
- package/dist/commonjs/callAutomationClient.js.map +7 -1
- package/dist/commonjs/callAutomationEventParser.d.ts.map +1 -1
- package/dist/commonjs/callAutomationEventParser.js +193 -184
- package/dist/commonjs/callAutomationEventParser.js.map +7 -1
- package/dist/commonjs/callConnection.d.ts +5 -5
- package/dist/commonjs/callConnection.d.ts.map +1 -1
- package/dist/commonjs/callConnection.js +339 -287
- package/dist/commonjs/callConnection.js.map +7 -1
- package/dist/commonjs/callMedia.d.ts +3 -8
- package/dist/commonjs/callMedia.d.ts.map +1 -1
- package/dist/commonjs/callMedia.js +402 -429
- package/dist/commonjs/callMedia.js.map +7 -1
- package/dist/commonjs/callRecording.js +214 -190
- package/dist/commonjs/callRecording.js.map +7 -1
- package/dist/commonjs/contentDownloader.d.ts +12 -0
- package/dist/commonjs/contentDownloader.d.ts.map +1 -1
- package/dist/commonjs/contentDownloader.js +139 -101
- package/dist/commonjs/contentDownloader.js.map +7 -1
- package/dist/commonjs/generated/src/callAutomationApiClient.d.ts +1 -1
- package/dist/commonjs/generated/src/callAutomationApiClient.js +258 -222
- package/dist/commonjs/generated/src/callAutomationApiClient.js.map +7 -1
- package/dist/commonjs/generated/src/index.js +36 -19
- package/dist/commonjs/generated/src/index.js.map +7 -1
- package/dist/commonjs/generated/src/models/index.d.ts +243 -457
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.js +278 -367
- package/dist/commonjs/generated/src/models/index.js.map +7 -1
- package/dist/commonjs/generated/src/models/mappers.d.ts +21 -26
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +4240 -4281
- package/dist/commonjs/generated/src/models/mappers.js.map +7 -1
- package/dist/commonjs/generated/src/models/parameters.d.ts +0 -1
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +287 -211
- package/dist/commonjs/generated/src/models/parameters.js.map +7 -1
- package/dist/commonjs/generated/src/operations/callConnection.d.ts +1 -1
- package/dist/commonjs/generated/src/operations/callConnection.js +454 -382
- package/dist/commonjs/generated/src/operations/callConnection.js.map +7 -1
- package/dist/commonjs/generated/src/operations/callMedia.d.ts +1 -8
- package/dist/commonjs/generated/src/operations/callMedia.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operations/callMedia.js +394 -354
- package/dist/commonjs/generated/src/operations/callMedia.js.map +7 -1
- package/dist/commonjs/generated/src/operations/callRecording.js +180 -139
- package/dist/commonjs/generated/src/operations/callRecording.js.map +7 -1
- package/dist/commonjs/generated/src/operations/index.js +26 -14
- package/dist/commonjs/generated/src/operations/index.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callConnection.js +16 -10
- package/dist/commonjs/generated/src/operationsInterfaces/callConnection.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts +1 -8
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.js +16 -10
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callRecording.js +16 -10
- package/dist/commonjs/generated/src/operationsInterfaces/callRecording.js.map +7 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +26 -14
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +7 -1
- package/dist/commonjs/generated/src/pagingHelper.js +40 -30
- package/dist/commonjs/generated/src/pagingHelper.js.map +7 -1
- package/dist/commonjs/index.d.ts +3 -3
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +36 -17
- package/dist/commonjs/index.js.map +7 -1
- package/dist/commonjs/models/events.d.ts +297 -237
- package/dist/commonjs/models/events.d.ts.map +1 -1
- package/dist/commonjs/models/events.js +16 -5
- package/dist/commonjs/models/events.js.map +7 -1
- package/dist/commonjs/models/logger.js +29 -11
- package/dist/commonjs/models/logger.js.map +7 -1
- package/dist/commonjs/models/mapper.js +99 -78
- package/dist/commonjs/models/mapper.js.map +7 -1
- package/dist/commonjs/models/models.d.ts +8 -29
- package/dist/commonjs/models/models.d.ts.map +1 -1
- package/dist/commonjs/models/models.js +68 -61
- package/dist/commonjs/models/models.js.map +7 -1
- package/dist/commonjs/models/options.d.ts +11 -65
- package/dist/commonjs/models/options.d.ts.map +1 -1
- package/dist/commonjs/models/options.js +16 -5
- package/dist/commonjs/models/options.js.map +7 -1
- package/dist/commonjs/models/responses.js +16 -5
- package/dist/commonjs/models/responses.js.map +7 -1
- package/dist/commonjs/models/streaming.d.ts +1 -12
- package/dist/commonjs/models/streaming.d.ts.map +1 -1
- package/dist/commonjs/models/streaming.js +55 -39
- package/dist/commonjs/models/streaming.js.map +7 -1
- package/dist/commonjs/streamingData.d.ts.map +1 -1
- package/dist/commonjs/streamingData.js +112 -99
- package/dist/commonjs/streamingData.js.map +7 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utli/converters.d.ts.map +1 -1
- package/dist/commonjs/utli/converters.js +285 -275
- package/dist/commonjs/utli/converters.js.map +7 -1
- package/dist/commonjs/utli/recordingUrlValidator.d.ts +9 -0
- package/dist/commonjs/utli/recordingUrlValidator.d.ts.map +1 -0
- package/dist/commonjs/utli/recordingUrlValidator.js +56 -0
- package/dist/commonjs/utli/recordingUrlValidator.js.map +7 -0
- package/dist/esm/callAutomationClient.d.ts.map +1 -1
- package/dist/esm/callAutomationClient.js +1 -4
- package/dist/esm/callAutomationClient.js.map +1 -1
- package/dist/esm/callAutomationEventParser.d.ts.map +1 -1
- package/dist/esm/callAutomationEventParser.js +8 -15
- package/dist/esm/callAutomationEventParser.js.map +1 -1
- package/dist/esm/callConnection.d.ts +5 -5
- package/dist/esm/callConnection.d.ts.map +1 -1
- package/dist/esm/callConnection.js +11 -10
- package/dist/esm/callConnection.js.map +1 -1
- package/dist/esm/callMedia.d.ts +3 -8
- package/dist/esm/callMedia.d.ts.map +1 -1
- package/dist/esm/callMedia.js +7 -35
- package/dist/esm/callMedia.js.map +1 -1
- package/dist/esm/contentDownloader.d.ts +12 -0
- package/dist/esm/contentDownloader.d.ts.map +1 -1
- package/dist/esm/contentDownloader.js +37 -8
- package/dist/esm/contentDownloader.js.map +1 -1
- package/dist/esm/generated/src/callAutomationApiClient.d.ts +1 -1
- package/dist/esm/generated/src/callAutomationApiClient.js +3 -3
- package/dist/esm/generated/src/callAutomationApiClient.js.map +1 -1
- package/dist/esm/generated/src/models/index.d.ts +243 -457
- package/dist/esm/generated/src/models/index.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.js +28 -40
- package/dist/esm/generated/src/models/index.js.map +1 -1
- package/dist/esm/generated/src/models/mappers.d.ts +21 -26
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/esm/generated/src/models/mappers.js +327 -602
- package/dist/esm/generated/src/models/mappers.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.d.ts +0 -1
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +2 -6
- package/dist/esm/generated/src/models/parameters.js.map +1 -1
- package/dist/esm/generated/src/operations/callConnection.d.ts +1 -1
- package/dist/esm/generated/src/operations/callConnection.js +1 -1
- package/dist/esm/generated/src/operations/callConnection.js.map +1 -1
- package/dist/esm/generated/src/operations/callMedia.d.ts +1 -8
- package/dist/esm/generated/src/operations/callMedia.d.ts.map +1 -1
- package/dist/esm/generated/src/operations/callMedia.js +0 -25
- package/dist/esm/generated/src/operations/callMedia.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callConnection.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts +1 -8
- package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callMedia.js.map +1 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/events.d.ts +297 -237
- package/dist/esm/models/events.d.ts.map +1 -1
- package/dist/esm/models/events.js.map +1 -1
- package/dist/esm/models/models.d.ts +8 -29
- package/dist/esm/models/models.d.ts.map +1 -1
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/models/options.d.ts +11 -65
- package/dist/esm/models/options.d.ts.map +1 -1
- package/dist/esm/models/options.js.map +1 -1
- package/dist/esm/models/streaming.d.ts +1 -12
- package/dist/esm/models/streaming.d.ts.map +1 -1
- package/dist/esm/models/streaming.js.map +1 -1
- package/dist/esm/streamingData.d.ts.map +1 -1
- package/dist/esm/streamingData.js +0 -5
- package/dist/esm/streamingData.js.map +1 -1
- package/dist/esm/utli/converters.d.ts.map +1 -1
- package/dist/esm/utli/converters.js +1 -1
- package/dist/esm/utli/converters.js.map +1 -1
- package/dist/esm/utli/recordingUrlValidator.d.ts +9 -0
- package/dist/esm/utli/recordingUrlValidator.d.ts.map +1 -0
- package/dist/esm/utli/recordingUrlValidator.js +45 -0
- package/dist/esm/utli/recordingUrlValidator.js.map +1 -0
- package/package.json +37 -50
- package/dist/browser/callAutomationClient.d.ts +0 -98
- package/dist/browser/callAutomationClient.d.ts.map +0 -1
- package/dist/browser/callAutomationClient.js +0 -275
- package/dist/browser/callAutomationClient.js.map +0 -1
- package/dist/browser/callAutomationEventParser.d.ts +0 -6
- package/dist/browser/callAutomationEventParser.d.ts.map +0 -1
- package/dist/browser/callAutomationEventParser.js +0 -189
- package/dist/browser/callAutomationEventParser.js.map +0 -1
- package/dist/browser/callConnection.d.ts +0 -83
- package/dist/browser/callConnection.d.ts.map +0 -1
- package/dist/browser/callConnection.js +0 -289
- package/dist/browser/callConnection.js.map +0 -1
- package/dist/browser/callMedia.d.ts +0 -114
- package/dist/browser/callMedia.d.ts.map +0 -1
- package/dist/browser/callMedia.js +0 -433
- package/dist/browser/callMedia.js.map +0 -1
- package/dist/browser/callRecording.d.ts +0 -70
- package/dist/browser/callRecording.d.ts.map +0 -1
- package/dist/browser/callRecording.js +0 -195
- package/dist/browser/callRecording.js.map +0 -1
- package/dist/browser/contentDownloader.d.ts +0 -25
- package/dist/browser/contentDownloader.d.ts.map +0 -1
- package/dist/browser/contentDownloader.js +0 -103
- package/dist/browser/contentDownloader.js.map +0 -1
- package/dist/browser/credential/callAutomationAccessKeyCredentialPolicy.d.ts +0 -10
- package/dist/browser/credential/callAutomationAccessKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/browser/credential/callAutomationAccessKeyCredentialPolicy.js +0 -38
- package/dist/browser/credential/callAutomationAccessKeyCredentialPolicy.js.map +0 -1
- package/dist/browser/credential/callAutomationAuthPolicy.d.ts +0 -22
- package/dist/browser/credential/callAutomationAuthPolicy.d.ts.map +0 -1
- package/dist/browser/credential/callAutomationAuthPolicy.js +0 -53
- package/dist/browser/credential/callAutomationAuthPolicy.js.map +0 -1
- package/dist/browser/credential/cryptoUtils-browser.d.mts.map +0 -1
- package/dist/browser/credential/cryptoUtils-browser.mjs.map +0 -1
- package/dist/browser/credential/cryptoUtils.d.ts +0 -3
- package/dist/browser/credential/cryptoUtils.js +0 -20
- package/dist/browser/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/browser/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/browser/credential/encodeUtils.browser.js +0 -26
- package/dist/browser/credential/encodeUtils.browser.js.map +0 -1
- package/dist/browser/generated/src/callAutomationApiClient.d.ts +0 -49
- package/dist/browser/generated/src/callAutomationApiClient.d.ts.map +0 -1
- package/dist/browser/generated/src/callAutomationApiClient.js +0 -235
- package/dist/browser/generated/src/callAutomationApiClient.js.map +0 -1
- package/dist/browser/generated/src/index.d.ts +0 -5
- package/dist/browser/generated/src/index.d.ts.map +0 -1
- package/dist/browser/generated/src/index.js +0 -13
- package/dist/browser/generated/src/index.js.map +0 -1
- package/dist/browser/generated/src/models/index.d.ts +0 -2342
- package/dist/browser/generated/src/models/index.d.ts.map +0 -1
- package/dist/browser/generated/src/models/index.js +0 -364
- package/dist/browser/generated/src/models/index.js.map +0 -1
- package/dist/browser/generated/src/models/mappers.d.ts +0 -123
- package/dist/browser/generated/src/models/mappers.d.ts.map +0 -1
- package/dist/browser/generated/src/models/mappers.js +0 -4395
- package/dist/browser/generated/src/models/mappers.js.map +0 -1
- package/dist/browser/generated/src/models/parameters.d.ts +0 -36
- package/dist/browser/generated/src/models/parameters.d.ts.map +0 -1
- package/dist/browser/generated/src/models/parameters.js +0 -208
- package/dist/browser/generated/src/models/parameters.js.map +0 -1
- package/dist/browser/generated/src/operations/callConnection.d.ts +0 -103
- package/dist/browser/generated/src/operations/callConnection.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/callConnection.js +0 -417
- package/dist/browser/generated/src/operations/callConnection.js.map +0 -1
- package/dist/browser/generated/src/operations/callMedia.d.ts +0 -110
- package/dist/browser/generated/src/operations/callMedia.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/callMedia.js +0 -378
- package/dist/browser/generated/src/operations/callMedia.js.map +0 -1
- package/dist/browser/generated/src/operations/callRecording.d.ts +0 -43
- package/dist/browser/generated/src/operations/callRecording.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/callRecording.js +0 -148
- package/dist/browser/generated/src/operations/callRecording.js.map +0 -1
- package/dist/browser/generated/src/operations/index.d.ts +0 -4
- package/dist/browser/generated/src/operations/index.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/index.js +0 -11
- package/dist/browser/generated/src/operations/index.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts +0 -80
- package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callConnection.js +0 -9
- package/dist/browser/generated/src/operationsInterfaces/callConnection.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts +0 -102
- package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callMedia.js +0 -9
- package/dist/browser/generated/src/operationsInterfaces/callMedia.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts +0 -35
- package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callRecording.js +0 -9
- package/dist/browser/generated/src/operationsInterfaces/callRecording.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +0 -4
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/index.js +0 -11
- package/dist/browser/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist/browser/generated/src/pagingHelper.d.ts +0 -13
- package/dist/browser/generated/src/pagingHelper.d.ts.map +0 -1
- package/dist/browser/generated/src/pagingHelper.js +0 -30
- package/dist/browser/generated/src/pagingHelper.js.map +0 -1
- package/dist/browser/index.d.ts +0 -12
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -14
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/models/constants.d.ts +0 -2
- package/dist/browser/models/constants.d.ts.map +0 -1
- package/dist/browser/models/constants.js +0 -4
- package/dist/browser/models/constants.js.map +0 -1
- package/dist/browser/models/events.d.ts +0 -689
- package/dist/browser/models/events.d.ts.map +0 -1
- package/dist/browser/models/events.js +0 -4
- package/dist/browser/models/events.js.map +0 -1
- package/dist/browser/models/logger.d.ts +0 -5
- package/dist/browser/models/logger.d.ts.map +0 -1
- package/dist/browser/models/logger.js +0 -8
- package/dist/browser/models/logger.js.map +0 -1
- package/dist/browser/models/mapper.d.ts +0 -3
- package/dist/browser/models/mapper.d.ts.map +0 -1
- package/dist/browser/models/mapper.js +0 -76
- package/dist/browser/models/mapper.js.map +0 -1
- package/dist/browser/models/models.d.ts +0 -305
- package/dist/browser/models/models.d.ts.map +0 -1
- package/dist/browser/models/models.js +0 -54
- package/dist/browser/models/models.js.map +0 -1
- package/dist/browser/models/options.d.ts +0 -463
- package/dist/browser/models/options.d.ts.map +0 -1
- package/dist/browser/models/options.js +0 -4
- package/dist/browser/models/options.js.map +0 -1
- package/dist/browser/models/responses.d.ts +0 -81
- package/dist/browser/models/responses.d.ts.map +0 -1
- package/dist/browser/models/responses.js +0 -4
- package/dist/browser/models/responses.js.map +0 -1
- package/dist/browser/models/streaming.d.ts +0 -128
- package/dist/browser/models/streaming.d.ts.map +0 -1
- package/dist/browser/models/streaming.js +0 -38
- package/dist/browser/models/streaming.js.map +0 -1
- package/dist/browser/package.json +0 -3
- package/dist/browser/streamingData.d.ts +0 -13
- package/dist/browser/streamingData.d.ts.map +0 -1
- package/dist/browser/streamingData.js +0 -99
- package/dist/browser/streamingData.js.map +0 -1
- package/dist/browser/utli/converters.d.ts +0 -46
- package/dist/browser/utli/converters.d.ts.map +0 -1
- package/dist/browser/utli/converters.js +0 -294
- package/dist/browser/utli/converters.js.map +0 -1
- package/dist/commonjs/credential/callAutomationAccessKeyCredentialPolicy.d.ts +0 -10
- package/dist/commonjs/credential/callAutomationAccessKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/commonjs/credential/callAutomationAccessKeyCredentialPolicy.js +0 -41
- package/dist/commonjs/credential/callAutomationAccessKeyCredentialPolicy.js.map +0 -1
- package/dist/commonjs/credential/callAutomationAuthPolicy.d.ts +0 -22
- package/dist/commonjs/credential/callAutomationAuthPolicy.d.ts.map +0 -1
- package/dist/commonjs/credential/callAutomationAuthPolicy.js +0 -57
- package/dist/commonjs/credential/callAutomationAuthPolicy.js.map +0 -1
- package/dist/commonjs/credential/cryptoUtils.d.ts +0 -3
- package/dist/commonjs/credential/cryptoUtils.d.ts.map +0 -1
- package/dist/commonjs/credential/cryptoUtils.js +0 -14
- package/dist/commonjs/credential/cryptoUtils.js.map +0 -1
- package/dist/commonjs/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/commonjs/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/commonjs/credential/encodeUtils.browser.js +0 -32
- package/dist/commonjs/credential/encodeUtils.browser.js.map +0 -1
- package/dist/commonjs/models/constants.d.ts +0 -2
- package/dist/commonjs/models/constants.d.ts.map +0 -1
- package/dist/commonjs/models/constants.js +0 -7
- package/dist/commonjs/models/constants.js.map +0 -1
- package/dist/esm/credential/callAutomationAccessKeyCredentialPolicy.d.ts +0 -10
- package/dist/esm/credential/callAutomationAccessKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/esm/credential/callAutomationAccessKeyCredentialPolicy.js +0 -38
- package/dist/esm/credential/callAutomationAccessKeyCredentialPolicy.js.map +0 -1
- package/dist/esm/credential/callAutomationAuthPolicy.d.ts +0 -22
- package/dist/esm/credential/callAutomationAuthPolicy.d.ts.map +0 -1
- package/dist/esm/credential/callAutomationAuthPolicy.js +0 -53
- package/dist/esm/credential/callAutomationAuthPolicy.js.map +0 -1
- package/dist/esm/credential/cryptoUtils.d.ts +0 -3
- package/dist/esm/credential/cryptoUtils.d.ts.map +0 -1
- package/dist/esm/credential/cryptoUtils.js +0 -9
- package/dist/esm/credential/cryptoUtils.js.map +0 -1
- package/dist/esm/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/esm/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/esm/credential/encodeUtils.browser.js +0 -26
- package/dist/esm/credential/encodeUtils.browser.js.map +0 -1
- package/dist/esm/models/constants.d.ts +0 -2
- package/dist/esm/models/constants.d.ts.map +0 -1
- package/dist/esm/models/constants.js +0 -4
- package/dist/esm/models/constants.js.map +0 -1
- package/dist/react-native/callAutomationClient.d.ts +0 -98
- package/dist/react-native/callAutomationClient.d.ts.map +0 -1
- package/dist/react-native/callAutomationClient.js +0 -275
- package/dist/react-native/callAutomationClient.js.map +0 -1
- package/dist/react-native/callAutomationEventParser.d.ts +0 -6
- package/dist/react-native/callAutomationEventParser.d.ts.map +0 -1
- package/dist/react-native/callAutomationEventParser.js +0 -189
- package/dist/react-native/callAutomationEventParser.js.map +0 -1
- package/dist/react-native/callConnection.d.ts +0 -83
- package/dist/react-native/callConnection.d.ts.map +0 -1
- package/dist/react-native/callConnection.js +0 -289
- package/dist/react-native/callConnection.js.map +0 -1
- package/dist/react-native/callMedia.d.ts +0 -114
- package/dist/react-native/callMedia.d.ts.map +0 -1
- package/dist/react-native/callMedia.js +0 -433
- package/dist/react-native/callMedia.js.map +0 -1
- package/dist/react-native/callRecording.d.ts +0 -70
- package/dist/react-native/callRecording.d.ts.map +0 -1
- package/dist/react-native/callRecording.js +0 -195
- package/dist/react-native/callRecording.js.map +0 -1
- package/dist/react-native/contentDownloader.d.ts +0 -25
- package/dist/react-native/contentDownloader.d.ts.map +0 -1
- package/dist/react-native/contentDownloader.js +0 -103
- package/dist/react-native/contentDownloader.js.map +0 -1
- package/dist/react-native/credential/callAutomationAccessKeyCredentialPolicy.d.ts +0 -10
- package/dist/react-native/credential/callAutomationAccessKeyCredentialPolicy.d.ts.map +0 -1
- package/dist/react-native/credential/callAutomationAccessKeyCredentialPolicy.js +0 -38
- package/dist/react-native/credential/callAutomationAccessKeyCredentialPolicy.js.map +0 -1
- package/dist/react-native/credential/callAutomationAuthPolicy.d.ts +0 -22
- package/dist/react-native/credential/callAutomationAuthPolicy.d.ts.map +0 -1
- package/dist/react-native/credential/callAutomationAuthPolicy.js +0 -53
- package/dist/react-native/credential/callAutomationAuthPolicy.js.map +0 -1
- package/dist/react-native/credential/cryptoUtils.d.ts +0 -3
- package/dist/react-native/credential/cryptoUtils.d.ts.map +0 -1
- package/dist/react-native/credential/cryptoUtils.js +0 -9
- package/dist/react-native/credential/cryptoUtils.js.map +0 -1
- package/dist/react-native/credential/encodeUtils.browser.d.ts +0 -4
- package/dist/react-native/credential/encodeUtils.browser.d.ts.map +0 -1
- package/dist/react-native/credential/encodeUtils.browser.js +0 -26
- package/dist/react-native/credential/encodeUtils.browser.js.map +0 -1
- package/dist/react-native/generated/src/callAutomationApiClient.d.ts +0 -49
- package/dist/react-native/generated/src/callAutomationApiClient.d.ts.map +0 -1
- package/dist/react-native/generated/src/callAutomationApiClient.js +0 -235
- package/dist/react-native/generated/src/callAutomationApiClient.js.map +0 -1
- package/dist/react-native/generated/src/index.d.ts +0 -5
- package/dist/react-native/generated/src/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/index.js +0 -13
- package/dist/react-native/generated/src/index.js.map +0 -1
- package/dist/react-native/generated/src/models/index.d.ts +0 -2342
- package/dist/react-native/generated/src/models/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/models/index.js +0 -364
- package/dist/react-native/generated/src/models/index.js.map +0 -1
- package/dist/react-native/generated/src/models/mappers.d.ts +0 -123
- package/dist/react-native/generated/src/models/mappers.d.ts.map +0 -1
- package/dist/react-native/generated/src/models/mappers.js +0 -4395
- package/dist/react-native/generated/src/models/mappers.js.map +0 -1
- package/dist/react-native/generated/src/models/parameters.d.ts +0 -36
- package/dist/react-native/generated/src/models/parameters.d.ts.map +0 -1
- package/dist/react-native/generated/src/models/parameters.js +0 -208
- package/dist/react-native/generated/src/models/parameters.js.map +0 -1
- package/dist/react-native/generated/src/operations/callConnection.d.ts +0 -103
- package/dist/react-native/generated/src/operations/callConnection.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/callConnection.js +0 -417
- package/dist/react-native/generated/src/operations/callConnection.js.map +0 -1
- package/dist/react-native/generated/src/operations/callMedia.d.ts +0 -110
- package/dist/react-native/generated/src/operations/callMedia.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/callMedia.js +0 -378
- package/dist/react-native/generated/src/operations/callMedia.js.map +0 -1
- package/dist/react-native/generated/src/operations/callRecording.d.ts +0 -43
- package/dist/react-native/generated/src/operations/callRecording.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/callRecording.js +0 -148
- package/dist/react-native/generated/src/operations/callRecording.js.map +0 -1
- package/dist/react-native/generated/src/operations/index.d.ts +0 -4
- package/dist/react-native/generated/src/operations/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/index.js +0 -11
- package/dist/react-native/generated/src/operations/index.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts +0 -80
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.js +0 -9
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts +0 -102
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.js +0 -9
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts +0 -35
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.js +0 -9
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +0 -4
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.js +0 -11
- package/dist/react-native/generated/src/operationsInterfaces/index.js.map +0 -1
- package/dist/react-native/generated/src/pagingHelper.d.ts +0 -13
- package/dist/react-native/generated/src/pagingHelper.d.ts.map +0 -1
- package/dist/react-native/generated/src/pagingHelper.js +0 -30
- package/dist/react-native/generated/src/pagingHelper.js.map +0 -1
- package/dist/react-native/index.d.ts +0 -12
- package/dist/react-native/index.d.ts.map +0 -1
- package/dist/react-native/index.js +0 -14
- package/dist/react-native/index.js.map +0 -1
- package/dist/react-native/models/constants.d.ts +0 -2
- package/dist/react-native/models/constants.d.ts.map +0 -1
- package/dist/react-native/models/constants.js +0 -4
- package/dist/react-native/models/constants.js.map +0 -1
- package/dist/react-native/models/events.d.ts +0 -689
- package/dist/react-native/models/events.d.ts.map +0 -1
- package/dist/react-native/models/events.js +0 -4
- package/dist/react-native/models/events.js.map +0 -1
- package/dist/react-native/models/logger.d.ts +0 -5
- package/dist/react-native/models/logger.d.ts.map +0 -1
- package/dist/react-native/models/logger.js +0 -8
- package/dist/react-native/models/logger.js.map +0 -1
- package/dist/react-native/models/mapper.d.ts +0 -3
- package/dist/react-native/models/mapper.d.ts.map +0 -1
- package/dist/react-native/models/mapper.js +0 -76
- package/dist/react-native/models/mapper.js.map +0 -1
- package/dist/react-native/models/models.d.ts +0 -305
- package/dist/react-native/models/models.d.ts.map +0 -1
- package/dist/react-native/models/models.js +0 -54
- package/dist/react-native/models/models.js.map +0 -1
- package/dist/react-native/models/options.d.ts +0 -463
- package/dist/react-native/models/options.d.ts.map +0 -1
- package/dist/react-native/models/options.js +0 -4
- package/dist/react-native/models/options.js.map +0 -1
- package/dist/react-native/models/responses.d.ts +0 -81
- package/dist/react-native/models/responses.d.ts.map +0 -1
- package/dist/react-native/models/responses.js +0 -4
- package/dist/react-native/models/responses.js.map +0 -1
- package/dist/react-native/models/streaming.d.ts +0 -128
- package/dist/react-native/models/streaming.d.ts.map +0 -1
- package/dist/react-native/models/streaming.js +0 -38
- package/dist/react-native/models/streaming.js.map +0 -1
- package/dist/react-native/package.json +0 -3
- package/dist/react-native/streamingData.d.ts +0 -13
- package/dist/react-native/streamingData.d.ts.map +0 -1
- package/dist/react-native/streamingData.js +0 -99
- package/dist/react-native/streamingData.js.map +0 -1
- package/dist/react-native/utli/converters.d.ts +0 -46
- package/dist/react-native/utli/converters.d.ts.map +0 -1
- package/dist/react-native/utli/converters.js +0 -294
- package/dist/react-native/utli/converters.js.map +0 -1
|
@@ -1,437 +1,410 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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 callMedia_exports = {};
|
|
19
|
+
__export(callMedia_exports, {
|
|
20
|
+
CallMedia: () => CallMedia
|
|
21
|
+
});
|
|
22
|
+
module.exports = __toCommonJS(callMedia_exports);
|
|
23
|
+
var import_src = require("./generated/src/index.js");
|
|
24
|
+
var import_src2 = require("./generated/src/index.js");
|
|
25
|
+
var import_operations = require("./generated/src/operations/index.js");
|
|
26
|
+
var import_communication_common = require("@azure/communication-common");
|
|
27
|
+
var import_core_util = require("@azure/core-util");
|
|
14
28
|
class CallMedia {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
29
|
+
callConnectionId;
|
|
30
|
+
callMedia;
|
|
31
|
+
callAutomationApiClient;
|
|
32
|
+
constructor(callConnectionId, endpoint, credential, options) {
|
|
33
|
+
this.callAutomationApiClient = new import_src.CallAutomationApiClient(endpoint, options);
|
|
34
|
+
const authPolicy = (0, import_communication_common.createCommunicationAuthPolicy)(credential);
|
|
35
|
+
this.callAutomationApiClient.pipeline.addPolicy(authPolicy);
|
|
36
|
+
this.callConnectionId = callConnectionId;
|
|
37
|
+
this.callMedia = new import_operations.CallMediaImpl(this.callAutomationApiClient);
|
|
38
|
+
}
|
|
39
|
+
createPlaySourceInternal(playSource) {
|
|
40
|
+
if (playSource.kind === "fileSource") {
|
|
41
|
+
const fileSource = {
|
|
42
|
+
uri: playSource.url
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
kind: import_src2.KnownPlaySourceType.File,
|
|
46
|
+
file: fileSource,
|
|
47
|
+
playSourceCacheId: playSource.playSourceCacheId ? playSource.playSourceCacheId : playSource.playsourcacheid
|
|
48
|
+
};
|
|
49
|
+
} else if (playSource.kind === "textSource") {
|
|
50
|
+
const textSource = {
|
|
51
|
+
text: playSource.text,
|
|
52
|
+
sourceLocale: playSource.sourceLocale,
|
|
53
|
+
voiceKind: playSource.voiceKind,
|
|
54
|
+
voiceName: playSource.voiceName,
|
|
55
|
+
customVoiceEndpointId: playSource.customVoiceEndpointId
|
|
56
|
+
};
|
|
57
|
+
return {
|
|
58
|
+
kind: import_src2.KnownPlaySourceType.Text,
|
|
59
|
+
text: textSource,
|
|
60
|
+
playSourceCacheId: playSource.playSourceCacheId ? playSource.playSourceCacheId : playSource.playsourcacheid
|
|
61
|
+
};
|
|
62
|
+
} else if (playSource.kind === "ssmlSource") {
|
|
63
|
+
const ssmlSource = {
|
|
64
|
+
ssmlText: playSource.ssmlText,
|
|
65
|
+
customVoiceEndpointId: playSource.customVoiceEndpointId
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
kind: import_src2.KnownPlaySourceType.Ssml,
|
|
69
|
+
ssml: ssmlSource,
|
|
70
|
+
playSourceCacheId: playSource.playSourceCacheId ? playSource.playSourceCacheId : playSource.playsourcacheid
|
|
71
|
+
};
|
|
24
72
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
kind: index_js_2.KnownPlaySourceType.Text,
|
|
48
|
-
text: textSource,
|
|
49
|
-
playSourceCacheId: playSource.playSourceCacheId
|
|
50
|
-
? playSource.playSourceCacheId
|
|
51
|
-
: playSource.playsourcacheid,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
else if (playSource.kind === "ssmlSource") {
|
|
55
|
-
const ssmlSource = {
|
|
56
|
-
ssmlText: playSource.ssmlText,
|
|
57
|
-
customVoiceEndpointId: playSource.customVoiceEndpointId,
|
|
58
|
-
};
|
|
59
|
-
return {
|
|
60
|
-
kind: index_js_2.KnownPlaySourceType.Ssml,
|
|
61
|
-
ssml: ssmlSource,
|
|
62
|
-
playSourceCacheId: playSource.playSourceCacheId
|
|
63
|
-
? playSource.playSourceCacheId
|
|
64
|
-
: playSource.playsourcacheid,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
throw new Error("Invalid play source");
|
|
73
|
+
throw new Error("Invalid play source");
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Play audio to a specific participant.
|
|
77
|
+
*
|
|
78
|
+
* @param playSources - A PlaySource representing the sources to play. Currently only single play source per request is supported.
|
|
79
|
+
* @param playTo - The targets to play to.
|
|
80
|
+
* @param options - Additional attributes for play.
|
|
81
|
+
*/
|
|
82
|
+
async play(playSources, playTo, options = { loop: false }) {
|
|
83
|
+
const playRequest = {
|
|
84
|
+
playSources: playSources.map((source) => this.createPlaySourceInternal(source)),
|
|
85
|
+
playTo: playTo.map((identifier) => (0, import_communication_common.serializeCommunicationIdentifier)(identifier)),
|
|
86
|
+
playOptions: {
|
|
87
|
+
loop: false
|
|
88
|
+
},
|
|
89
|
+
operationContext: options.operationContext,
|
|
90
|
+
operationCallbackUri: options.operationCallbackUrl
|
|
91
|
+
};
|
|
92
|
+
if (options.loop !== void 0) {
|
|
93
|
+
playRequest.playOptions = playRequest.playOptions || { loop: false };
|
|
94
|
+
playRequest.playOptions.loop = options.loop;
|
|
68
95
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
await this.callMedia.play(this.callConnectionId, playRequest, options);
|
|
96
|
+
await this.callMedia.play(this.callConnectionId, playRequest, options);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Play to all participants.
|
|
100
|
+
*
|
|
101
|
+
* @param playSources - A PlaySource representing the sources to play. Currently only single play source per request is supported.
|
|
102
|
+
* @param options - Additional attributes for play.
|
|
103
|
+
*/
|
|
104
|
+
async playToAll(playSources, options = { loop: false }) {
|
|
105
|
+
const playRequest = {
|
|
106
|
+
playSources: playSources.map((source) => this.createPlaySourceInternal(source)),
|
|
107
|
+
playTo: [],
|
|
108
|
+
playOptions: {
|
|
109
|
+
loop: false
|
|
110
|
+
},
|
|
111
|
+
operationContext: options.operationContext ? options.operationContext : (0, import_core_util.randomUUID)(),
|
|
112
|
+
operationCallbackUri: options.operationCallbackUrl
|
|
113
|
+
};
|
|
114
|
+
if (options.loop !== void 0) {
|
|
115
|
+
playRequest.playOptions = playRequest.playOptions || { loop: false };
|
|
116
|
+
playRequest.playOptions.loop = options.loop;
|
|
91
117
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*/
|
|
98
|
-
async playToAll(playSources, options = { loop: false }) {
|
|
99
|
-
const playRequest = {
|
|
100
|
-
playSources: playSources.map((source) => this.createPlaySourceInternal(source)),
|
|
101
|
-
playTo: [],
|
|
102
|
-
playOptions: {
|
|
103
|
-
loop: false,
|
|
104
|
-
},
|
|
105
|
-
operationContext: options.operationContext ? options.operationContext : (0, core_util_1.randomUUID)(),
|
|
106
|
-
operationCallbackUri: options.operationCallbackUrl,
|
|
107
|
-
};
|
|
108
|
-
if (options.loop !== undefined) {
|
|
109
|
-
playRequest.playOptions = playRequest.playOptions || { loop: false }; // Ensure playOptions is defined
|
|
110
|
-
playRequest.playOptions.loop = options.loop;
|
|
111
|
-
}
|
|
112
|
-
if (options.interruptCallMediaOperation !== undefined) {
|
|
113
|
-
playRequest.playOptions = playRequest.playOptions || {
|
|
114
|
-
loop: false,
|
|
115
|
-
}; // Ensure playOptions is defined
|
|
116
|
-
playRequest.interruptCallMediaOperation = options.interruptCallMediaOperation;
|
|
117
|
-
}
|
|
118
|
-
await this.callMedia.play(this.callConnectionId, playRequest, options);
|
|
118
|
+
if (options.interruptCallMediaOperation !== void 0) {
|
|
119
|
+
playRequest.playOptions = playRequest.playOptions || {
|
|
120
|
+
loop: false
|
|
121
|
+
};
|
|
122
|
+
playRequest.interruptCallMediaOperation = options.interruptCallMediaOperation;
|
|
119
123
|
}
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
else if (recognizeOptions.kind === "callMediaRecognizeSpeechOrDtmfOptions") {
|
|
211
|
-
const dtmfOptionsInternal = {
|
|
212
|
-
interToneTimeoutInSeconds: recognizeOptions.interToneTimeoutInSeconds
|
|
213
|
-
? recognizeOptions.interToneTimeoutInSeconds
|
|
214
|
-
: 2,
|
|
215
|
-
maxTonesToCollect: recognizeOptions.maxTonesToCollect,
|
|
216
|
-
stopTones: recognizeOptions.stopDtmfTones,
|
|
217
|
-
};
|
|
218
|
-
const speechOptions = {
|
|
219
|
-
endSilenceTimeoutInMs: recognizeOptions.endSilenceTimeoutInSeconds
|
|
220
|
-
? recognizeOptions.endSilenceTimeoutInSeconds * 1000
|
|
221
|
-
: 2000,
|
|
222
|
-
};
|
|
223
|
-
const recognizeOptionsInternal = {
|
|
224
|
-
interruptPrompt: recognizeOptions.interruptPrompt,
|
|
225
|
-
initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds
|
|
226
|
-
? recognizeOptions.initialSilenceTimeoutInSeconds
|
|
227
|
-
: 5,
|
|
228
|
-
targetParticipant: (0, communication_common_1.serializeCommunicationIdentifier)(targetParticipant),
|
|
229
|
-
speechOptions: speechOptions,
|
|
230
|
-
dtmfOptions: dtmfOptionsInternal,
|
|
231
|
-
speechLanguage: recognizeOptions.speechLanguage,
|
|
232
|
-
speechLanguages: recognizeOptions.speechLanguages,
|
|
233
|
-
enableSentimentAnalysis: recognizeOptions.enableSentimentAnalysis,
|
|
234
|
-
speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId,
|
|
235
|
-
};
|
|
236
|
-
return {
|
|
237
|
-
recognizeInputType: index_js_2.KnownRecognizeInputType.SpeechOrDtmf,
|
|
238
|
-
playPrompt: recognizeOptions.playPrompt
|
|
239
|
-
? this.createPlaySourceInternal(recognizeOptions.playPrompt)
|
|
240
|
-
: undefined,
|
|
241
|
-
playPrompts: recognizeOptions.playPrompts !== undefined
|
|
242
|
-
? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source))
|
|
243
|
-
: undefined,
|
|
244
|
-
interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,
|
|
245
|
-
recognizeOptions: recognizeOptionsInternal,
|
|
246
|
-
operationContext: recognizeOptions.operationContext,
|
|
247
|
-
operationCallbackUri: recognizeOptions.operationCallbackUrl,
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
throw new Error("Invalid recognizeOptions");
|
|
124
|
+
await this.callMedia.play(this.callConnectionId, playRequest, options);
|
|
125
|
+
}
|
|
126
|
+
createRecognizeRequest(targetParticipant, recognizeOptions) {
|
|
127
|
+
if (recognizeOptions.kind === "callMediaRecognizeDtmfOptions") {
|
|
128
|
+
const dtmfOptionsInternal = {
|
|
129
|
+
interToneTimeoutInSeconds: recognizeOptions.interToneTimeoutInSeconds ? recognizeOptions.interToneTimeoutInSeconds : 2,
|
|
130
|
+
maxTonesToCollect: recognizeOptions.maxTonesToCollect,
|
|
131
|
+
stopTones: recognizeOptions.stopDtmfTones
|
|
132
|
+
};
|
|
133
|
+
const recognizeOptionsInternal = {
|
|
134
|
+
interruptPrompt: recognizeOptions.interruptPrompt,
|
|
135
|
+
initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds ? recognizeOptions.initialSilenceTimeoutInSeconds : 5,
|
|
136
|
+
targetParticipant: (0, import_communication_common.serializeCommunicationIdentifier)(targetParticipant),
|
|
137
|
+
dtmfOptions: dtmfOptionsInternal
|
|
138
|
+
};
|
|
139
|
+
return {
|
|
140
|
+
recognizeInputType: import_src2.KnownRecognizeInputType.Dtmf,
|
|
141
|
+
playPrompt: recognizeOptions.playPrompt ? this.createPlaySourceInternal(recognizeOptions.playPrompt) : void 0,
|
|
142
|
+
playPrompts: recognizeOptions.playPrompts !== void 0 ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source)) : void 0,
|
|
143
|
+
interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,
|
|
144
|
+
recognizeOptions: recognizeOptionsInternal,
|
|
145
|
+
operationContext: recognizeOptions.operationContext,
|
|
146
|
+
operationCallbackUri: recognizeOptions.operationCallbackUrl
|
|
147
|
+
};
|
|
148
|
+
} else if (recognizeOptions.kind === "callMediaRecognizeChoiceOptions") {
|
|
149
|
+
const recognizeOptionsInternal = {
|
|
150
|
+
interruptPrompt: recognizeOptions.interruptPrompt,
|
|
151
|
+
initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds ? recognizeOptions.initialSilenceTimeoutInSeconds : 5,
|
|
152
|
+
targetParticipant: (0, import_communication_common.serializeCommunicationIdentifier)(targetParticipant),
|
|
153
|
+
speechLanguage: recognizeOptions.speechLanguage,
|
|
154
|
+
speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId,
|
|
155
|
+
choices: recognizeOptions.choices
|
|
156
|
+
};
|
|
157
|
+
return {
|
|
158
|
+
recognizeInputType: import_src2.KnownRecognizeInputType.Choices,
|
|
159
|
+
playPrompt: recognizeOptions.playPrompt ? this.createPlaySourceInternal(recognizeOptions.playPrompt) : void 0,
|
|
160
|
+
playPrompts: recognizeOptions.playPrompts !== void 0 ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source)) : void 0,
|
|
161
|
+
interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,
|
|
162
|
+
recognizeOptions: recognizeOptionsInternal,
|
|
163
|
+
operationContext: recognizeOptions.operationContext,
|
|
164
|
+
operationCallbackUri: recognizeOptions.operationCallbackUrl
|
|
165
|
+
};
|
|
166
|
+
} else if (recognizeOptions.kind === "callMediaRecognizeSpeechOptions") {
|
|
167
|
+
const speechOptions = {
|
|
168
|
+
endSilenceTimeoutInMs: recognizeOptions.endSilenceTimeoutInSeconds ? recognizeOptions.endSilenceTimeoutInSeconds * 1e3 : 2e3
|
|
169
|
+
};
|
|
170
|
+
const recognizeOptionsInternal = {
|
|
171
|
+
interruptPrompt: recognizeOptions.interruptPrompt,
|
|
172
|
+
initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds ? recognizeOptions.initialSilenceTimeoutInSeconds : 5,
|
|
173
|
+
targetParticipant: (0, import_communication_common.serializeCommunicationIdentifier)(targetParticipant),
|
|
174
|
+
speechOptions,
|
|
175
|
+
speechLanguage: recognizeOptions.speechLanguage,
|
|
176
|
+
speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId
|
|
177
|
+
};
|
|
178
|
+
return {
|
|
179
|
+
recognizeInputType: import_src2.KnownRecognizeInputType.Speech,
|
|
180
|
+
playPrompt: recognizeOptions.playPrompt ? this.createPlaySourceInternal(recognizeOptions.playPrompt) : void 0,
|
|
181
|
+
playPrompts: recognizeOptions.playPrompts !== void 0 ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source)) : void 0,
|
|
182
|
+
interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,
|
|
183
|
+
recognizeOptions: recognizeOptionsInternal,
|
|
184
|
+
operationContext: recognizeOptions.operationContext,
|
|
185
|
+
operationCallbackUri: recognizeOptions.operationCallbackUrl
|
|
186
|
+
};
|
|
187
|
+
} else if (recognizeOptions.kind === "callMediaRecognizeSpeechOrDtmfOptions") {
|
|
188
|
+
const dtmfOptionsInternal = {
|
|
189
|
+
interToneTimeoutInSeconds: recognizeOptions.interToneTimeoutInSeconds ? recognizeOptions.interToneTimeoutInSeconds : 2,
|
|
190
|
+
maxTonesToCollect: recognizeOptions.maxTonesToCollect,
|
|
191
|
+
stopTones: recognizeOptions.stopDtmfTones
|
|
192
|
+
};
|
|
193
|
+
const speechOptions = {
|
|
194
|
+
endSilenceTimeoutInMs: recognizeOptions.endSilenceTimeoutInSeconds ? recognizeOptions.endSilenceTimeoutInSeconds * 1e3 : 2e3
|
|
195
|
+
};
|
|
196
|
+
const recognizeOptionsInternal = {
|
|
197
|
+
interruptPrompt: recognizeOptions.interruptPrompt,
|
|
198
|
+
initialSilenceTimeoutInSeconds: recognizeOptions.initialSilenceTimeoutInSeconds ? recognizeOptions.initialSilenceTimeoutInSeconds : 5,
|
|
199
|
+
targetParticipant: (0, import_communication_common.serializeCommunicationIdentifier)(targetParticipant),
|
|
200
|
+
speechOptions,
|
|
201
|
+
speechLanguage: recognizeOptions.speechLanguage,
|
|
202
|
+
dtmfOptions: dtmfOptionsInternal,
|
|
203
|
+
speechRecognitionModelEndpointId: recognizeOptions.speechRecognitionModelEndpointId
|
|
204
|
+
};
|
|
205
|
+
return {
|
|
206
|
+
recognizeInputType: import_src2.KnownRecognizeInputType.SpeechOrDtmf,
|
|
207
|
+
playPrompt: recognizeOptions.playPrompt ? this.createPlaySourceInternal(recognizeOptions.playPrompt) : void 0,
|
|
208
|
+
playPrompts: recognizeOptions.playPrompts !== void 0 ? recognizeOptions.playPrompts.map((source) => this.createPlaySourceInternal(source)) : void 0,
|
|
209
|
+
interruptCallMediaOperation: recognizeOptions.interruptCallMediaOperation,
|
|
210
|
+
recognizeOptions: recognizeOptionsInternal,
|
|
211
|
+
operationContext: recognizeOptions.operationContext,
|
|
212
|
+
operationCallbackUri: recognizeOptions.operationCallbackUrl
|
|
213
|
+
};
|
|
251
214
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
await this.callMedia.cancelAllMediaOperations(this.callConnectionId, {});
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Start continuous Dtmf recognition by subscribing to tones.
|
|
276
|
-
* @param targetParticipant - Target participant.
|
|
277
|
-
* @param options - Additional attributes for continuous Dtmf recognition.
|
|
278
|
-
* */
|
|
279
|
-
async startContinuousDtmfRecognition(targetParticipant, options = {}) {
|
|
280
|
-
const continuousDtmfRecognitionRequest = {
|
|
281
|
-
targetParticipant: (0, communication_common_1.serializeCommunicationIdentifier)(targetParticipant),
|
|
282
|
-
operationContext: options.operationContext,
|
|
283
|
-
};
|
|
284
|
-
return this.callMedia.startContinuousDtmfRecognition(this.callConnectionId, continuousDtmfRecognitionRequest, {});
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Stop continuous Dtmf recognition by unsubscribing to tones.
|
|
288
|
-
* @param targetParticipant - Target participant.
|
|
289
|
-
* @param options - Additional attributes for continuous Dtmf recognition.
|
|
290
|
-
* */
|
|
291
|
-
async stopContinuousDtmfRecognition(targetParticipant, options = {}) {
|
|
292
|
-
const continuousDtmfRecognitionRequest = {
|
|
293
|
-
targetParticipant: (0, communication_common_1.serializeCommunicationIdentifier)(targetParticipant),
|
|
294
|
-
operationContext: options.operationContext,
|
|
295
|
-
operationCallbackUri: options.operationCallbackUrl,
|
|
296
|
-
};
|
|
297
|
-
return this.callMedia.stopContinuousDtmfRecognition(this.callConnectionId, continuousDtmfRecognitionRequest, {});
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Send Dtmf tones.
|
|
301
|
-
* @param tones - List of tones to be sent to target participant.
|
|
302
|
-
* @param targetParticipant - Target participant.
|
|
303
|
-
* @param options - Additional attributes for send Dtmf tones.
|
|
304
|
-
* */
|
|
305
|
-
async sendDtmfTones(tones, targetParticipant, options = {}) {
|
|
306
|
-
const sendDtmfTonesRequest = {
|
|
307
|
-
tones: tones,
|
|
308
|
-
targetParticipant: (0, communication_common_1.serializeCommunicationIdentifier)(targetParticipant),
|
|
309
|
-
operationContext: options.operationContext,
|
|
310
|
-
operationCallbackUri: options.operationCallbackUrl,
|
|
311
|
-
};
|
|
312
|
-
const optionsInternal = {
|
|
313
|
-
...options,
|
|
314
|
-
repeatabilityFirstSent: new Date(),
|
|
315
|
-
repeatabilityRequestID: (0, core_util_1.randomUUID)(),
|
|
316
|
-
};
|
|
317
|
-
const result = await this.callMedia.sendDtmfTones(this.callConnectionId, sendDtmfTonesRequest, optionsInternal);
|
|
318
|
-
const sendDtmfTonesResult = {
|
|
319
|
-
...result,
|
|
320
|
-
};
|
|
321
|
-
return sendDtmfTonesResult;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Put participant on hold while playing audio.
|
|
325
|
-
*
|
|
326
|
-
* @param targetParticipant - The targets to play to.
|
|
327
|
-
* @param options - Additional attributes for hold participant.
|
|
328
|
-
*/
|
|
329
|
-
async hold(targetParticipant, options = {}) {
|
|
330
|
-
const holdRequest = {
|
|
331
|
-
targetParticipant: (0, communication_common_1.serializeCommunicationIdentifier)(targetParticipant),
|
|
332
|
-
playSourceInfo: options.playSource !== undefined
|
|
333
|
-
? this.createPlaySourceInternal(options.playSource)
|
|
334
|
-
: undefined,
|
|
335
|
-
operationContext: options.operationContext !== undefined ? options.operationContext : undefined,
|
|
336
|
-
operationCallbackUri: options.operationCallbackUrl !== undefined ? options.operationCallbackUrl : undefined,
|
|
337
|
-
};
|
|
338
|
-
return this.callMedia.hold(this.callConnectionId, holdRequest);
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* Remove participant from hold.
|
|
342
|
-
*
|
|
343
|
-
* @param targetParticipant - The targets to play to.
|
|
344
|
-
* @param options - Additional attributes for unhold participant.
|
|
345
|
-
*/
|
|
346
|
-
async unhold(targetParticipant, options = {}) {
|
|
347
|
-
const unholdRequest = {
|
|
348
|
-
targetParticipant: (0, communication_common_1.serializeCommunicationIdentifier)(targetParticipant),
|
|
349
|
-
operationContext: options.operationContext !== undefined ? options.operationContext : undefined,
|
|
350
|
-
operationCallbackUri: options.operationCallbackUrl !== undefined ? options.operationCallbackUrl : undefined,
|
|
351
|
-
};
|
|
352
|
-
return this.callMedia.unhold(this.callConnectionId, unholdRequest);
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Starts transcription in the call
|
|
356
|
-
* @param locales - List of languages for Language Identification.
|
|
357
|
-
* @param options - Additional attributes for start transcription.
|
|
358
|
-
*/
|
|
359
|
-
async startTranscription(options = {}) {
|
|
360
|
-
const startTranscriptionRequest = {
|
|
361
|
-
locale: options.locale,
|
|
362
|
-
operationContext: options.operationContext,
|
|
363
|
-
speechModelEndpointId: options.speechRecognitionModelEndpointId,
|
|
364
|
-
operationCallbackUri: options.operationCallbackUrl,
|
|
365
|
-
piiRedactionOptions: options.piiRedactionOptions,
|
|
366
|
-
locales: options.locales,
|
|
367
|
-
enableSentimentAnalysis: options.enableSentimentAnalysis,
|
|
368
|
-
summarizationOptions: options.summarizationOptions,
|
|
369
|
-
};
|
|
370
|
-
return this.callMedia.startTranscription(this.callConnectionId, startTranscriptionRequest, {});
|
|
371
|
-
}
|
|
372
|
-
/**
|
|
373
|
-
* Stops transcription in the call.
|
|
374
|
-
* @param options - Additional attributes for stop transcription.
|
|
375
|
-
*/
|
|
376
|
-
async stopTranscription(options = {}) {
|
|
377
|
-
const stopTranscriptionRequest = {
|
|
378
|
-
operationContext: options.operationContext,
|
|
379
|
-
operationCallbackUri: options.operationCallbackUrl,
|
|
380
|
-
};
|
|
381
|
-
return this.callMedia.stopTranscription(this.callConnectionId, stopTranscriptionRequest, {});
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* Update transcription language.
|
|
385
|
-
*/
|
|
386
|
-
async updateTranscription(locale, options = {}) {
|
|
387
|
-
const updateTranscriptionRequest = {
|
|
388
|
-
locale: locale,
|
|
389
|
-
speechModelEndpointId: options.speechRecognitionModelEndpointId,
|
|
390
|
-
operationContext: options.operationContext,
|
|
391
|
-
operationCallbackUri: options.operationCallbackUrl,
|
|
392
|
-
piiRedactionOptions: options.piiRedactionOptions,
|
|
393
|
-
enableSentimentAnalysis: options.enableSentimentAnalysis,
|
|
394
|
-
summarizationOptions: options.summarizationOptions,
|
|
395
|
-
};
|
|
396
|
-
return this.callMedia.updateTranscription(this.callConnectionId, updateTranscriptionRequest, {});
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Summarize call details.
|
|
400
|
-
* @param options - Additional attributes for summarize call.
|
|
401
|
-
*/
|
|
402
|
-
async summarizeCall(options = {}) {
|
|
403
|
-
const summarizeCallRequest = {
|
|
404
|
-
operationContext: options.operationContext,
|
|
405
|
-
operationCallbackUri: options.operationCallbackUrl,
|
|
406
|
-
summarizationOptions: {
|
|
407
|
-
enableEndCallSummary: options.summarizationOptions?.enableEndCallSummary,
|
|
408
|
-
locale: options.summarizationOptions?.locale,
|
|
409
|
-
},
|
|
410
|
-
};
|
|
411
|
-
return this.callMedia.summarizeCall(this.callConnectionId, summarizeCallRequest, {});
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* Starts media streaming in the call.
|
|
415
|
-
* @param options - Additional attributes for start media streaming.
|
|
416
|
-
*/
|
|
417
|
-
async startMediaStreaming(options = {}) {
|
|
418
|
-
const startMediaStreamingRequest = {
|
|
419
|
-
operationContext: options.operationContext,
|
|
420
|
-
operationCallbackUri: options.operationCallbackUrl,
|
|
421
|
-
};
|
|
422
|
-
return this.callMedia.startMediaStreaming(this.callConnectionId, startMediaStreamingRequest, options);
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* Stops media streaming in the call.
|
|
426
|
-
* @param options - Additional attributes for stop media streaming.
|
|
427
|
-
*/
|
|
428
|
-
async stopMediaStreaming(options = {}) {
|
|
429
|
-
const stopMediaStreamingRequest = {
|
|
430
|
-
operationCallbackUri: options.operationCallbackUrl,
|
|
431
|
-
operationContext: options.operationContext,
|
|
432
|
-
};
|
|
433
|
-
return this.callMedia.stopMediaStreaming(this.callConnectionId, stopMediaStreamingRequest, options);
|
|
215
|
+
throw new Error("Invalid recognizeOptions");
|
|
216
|
+
}
|
|
217
|
+
async startRecognizing(targetParticipant, maxTonesOrOptions, options) {
|
|
218
|
+
if (typeof maxTonesOrOptions === "number" && options) {
|
|
219
|
+
console.warn(
|
|
220
|
+
"Deprecated function signature used. Please use the new signature with targetParticipant and options params instead, and set maxTonesToCollect in options."
|
|
221
|
+
);
|
|
222
|
+
options.maxTonesToCollect = maxTonesOrOptions;
|
|
223
|
+
return this.callMedia.recognize(
|
|
224
|
+
this.callConnectionId,
|
|
225
|
+
this.createRecognizeRequest(targetParticipant, options),
|
|
226
|
+
{}
|
|
227
|
+
);
|
|
228
|
+
} else if (typeof maxTonesOrOptions !== "number" && !options) {
|
|
229
|
+
maxTonesOrOptions.operationContext = maxTonesOrOptions.operationContext ? maxTonesOrOptions.operationContext : (0, import_core_util.randomUUID)();
|
|
230
|
+
return this.callMedia.recognize(
|
|
231
|
+
this.callConnectionId,
|
|
232
|
+
this.createRecognizeRequest(targetParticipant, maxTonesOrOptions),
|
|
233
|
+
{}
|
|
234
|
+
);
|
|
434
235
|
}
|
|
236
|
+
throw new Error("Invalid params");
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Cancels all the queued media operations.
|
|
240
|
+
*/
|
|
241
|
+
async cancelAllOperations() {
|
|
242
|
+
await this.callMedia.cancelAllMediaOperations(this.callConnectionId, {});
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Start continuous Dtmf recognition by subscribing to tones.
|
|
246
|
+
* @param targetParticipant - Target participant.
|
|
247
|
+
* @param options - Additional attributes for continuous Dtmf recognition.
|
|
248
|
+
* */
|
|
249
|
+
async startContinuousDtmfRecognition(targetParticipant, options = {}) {
|
|
250
|
+
const continuousDtmfRecognitionRequest = {
|
|
251
|
+
targetParticipant: (0, import_communication_common.serializeCommunicationIdentifier)(targetParticipant),
|
|
252
|
+
operationContext: options.operationContext
|
|
253
|
+
};
|
|
254
|
+
return this.callMedia.startContinuousDtmfRecognition(
|
|
255
|
+
this.callConnectionId,
|
|
256
|
+
continuousDtmfRecognitionRequest,
|
|
257
|
+
{}
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Stop continuous Dtmf recognition by unsubscribing to tones.
|
|
262
|
+
* @param targetParticipant - Target participant.
|
|
263
|
+
* @param options - Additional attributes for continuous Dtmf recognition.
|
|
264
|
+
* */
|
|
265
|
+
async stopContinuousDtmfRecognition(targetParticipant, options = {}) {
|
|
266
|
+
const continuousDtmfRecognitionRequest = {
|
|
267
|
+
targetParticipant: (0, import_communication_common.serializeCommunicationIdentifier)(targetParticipant),
|
|
268
|
+
operationContext: options.operationContext,
|
|
269
|
+
operationCallbackUri: options.operationCallbackUrl
|
|
270
|
+
};
|
|
271
|
+
return this.callMedia.stopContinuousDtmfRecognition(
|
|
272
|
+
this.callConnectionId,
|
|
273
|
+
continuousDtmfRecognitionRequest,
|
|
274
|
+
{}
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Send Dtmf tones.
|
|
279
|
+
* @param tones - List of tones to be sent to target participant.
|
|
280
|
+
* @param targetParticipant - Target participant.
|
|
281
|
+
* @param options - Additional attributes for send Dtmf tones.
|
|
282
|
+
* */
|
|
283
|
+
async sendDtmfTones(tones, targetParticipant, options = {}) {
|
|
284
|
+
const sendDtmfTonesRequest = {
|
|
285
|
+
tones,
|
|
286
|
+
targetParticipant: (0, import_communication_common.serializeCommunicationIdentifier)(targetParticipant),
|
|
287
|
+
operationContext: options.operationContext,
|
|
288
|
+
operationCallbackUri: options.operationCallbackUrl
|
|
289
|
+
};
|
|
290
|
+
const optionsInternal = {
|
|
291
|
+
...options,
|
|
292
|
+
repeatabilityFirstSent: /* @__PURE__ */ new Date(),
|
|
293
|
+
repeatabilityRequestID: (0, import_core_util.randomUUID)()
|
|
294
|
+
};
|
|
295
|
+
const result = await this.callMedia.sendDtmfTones(
|
|
296
|
+
this.callConnectionId,
|
|
297
|
+
sendDtmfTonesRequest,
|
|
298
|
+
optionsInternal
|
|
299
|
+
);
|
|
300
|
+
const sendDtmfTonesResult = {
|
|
301
|
+
...result
|
|
302
|
+
};
|
|
303
|
+
return sendDtmfTonesResult;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Put participant on hold while playing audio.
|
|
307
|
+
*
|
|
308
|
+
* @param targetParticipant - The targets to play to.
|
|
309
|
+
* @param options - Additional attributes for hold participant.
|
|
310
|
+
*/
|
|
311
|
+
async hold(targetParticipant, options = {}) {
|
|
312
|
+
const holdRequest = {
|
|
313
|
+
targetParticipant: (0, import_communication_common.serializeCommunicationIdentifier)(targetParticipant),
|
|
314
|
+
playSourceInfo: options.playSource !== void 0 ? this.createPlaySourceInternal(options.playSource) : void 0,
|
|
315
|
+
operationContext: options.operationContext !== void 0 ? options.operationContext : void 0,
|
|
316
|
+
operationCallbackUri: options.operationCallbackUrl !== void 0 ? options.operationCallbackUrl : void 0
|
|
317
|
+
};
|
|
318
|
+
return this.callMedia.hold(this.callConnectionId, holdRequest);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Remove participant from hold.
|
|
322
|
+
*
|
|
323
|
+
* @param targetParticipant - The targets to play to.
|
|
324
|
+
* @param options - Additional attributes for unhold participant.
|
|
325
|
+
*/
|
|
326
|
+
async unhold(targetParticipant, options = {}) {
|
|
327
|
+
const unholdRequest = {
|
|
328
|
+
targetParticipant: (0, import_communication_common.serializeCommunicationIdentifier)(targetParticipant),
|
|
329
|
+
operationContext: options.operationContext !== void 0 ? options.operationContext : void 0,
|
|
330
|
+
operationCallbackUri: options.operationCallbackUrl !== void 0 ? options.operationCallbackUrl : void 0
|
|
331
|
+
};
|
|
332
|
+
return this.callMedia.unhold(this.callConnectionId, unholdRequest);
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Starts transcription in the call
|
|
336
|
+
* @param options - Additional attributes for start transcription.
|
|
337
|
+
*/
|
|
338
|
+
async startTranscription(options = {}) {
|
|
339
|
+
const startTranscriptionRequest = {
|
|
340
|
+
locale: options.locale,
|
|
341
|
+
operationContext: options.operationContext,
|
|
342
|
+
speechModelEndpointId: options.speechRecognitionModelEndpointId,
|
|
343
|
+
operationCallbackUri: options.operationCallbackUrl
|
|
344
|
+
};
|
|
345
|
+
return this.callMedia.startTranscription(this.callConnectionId, startTranscriptionRequest, {});
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Stops transcription in the call.
|
|
349
|
+
* @param options - Additional attributes for stop transcription.
|
|
350
|
+
*/
|
|
351
|
+
async stopTranscription(options = {}) {
|
|
352
|
+
const stopTranscriptionRequest = {
|
|
353
|
+
operationContext: options.operationContext,
|
|
354
|
+
operationCallbackUri: options.operationCallbackUrl
|
|
355
|
+
};
|
|
356
|
+
return this.callMedia.stopTranscription(this.callConnectionId, stopTranscriptionRequest, {});
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Update transcription language.
|
|
360
|
+
* @param locale - Defines new locale for transcription.
|
|
361
|
+
*/
|
|
362
|
+
async updateTranscription(locale, options) {
|
|
363
|
+
const updateTranscriptionRequest = {
|
|
364
|
+
locale,
|
|
365
|
+
speechModelEndpointId: options?.speechRecognitionModelEndpointId,
|
|
366
|
+
operationContext: options?.operationContext,
|
|
367
|
+
operationCallbackUri: options?.operationCallbackUrl
|
|
368
|
+
};
|
|
369
|
+
return this.callMedia.updateTranscription(
|
|
370
|
+
this.callConnectionId,
|
|
371
|
+
updateTranscriptionRequest,
|
|
372
|
+
{}
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Starts media streaming in the call.
|
|
377
|
+
* @param options - Additional attributes for start media streaming.
|
|
378
|
+
*/
|
|
379
|
+
async startMediaStreaming(options = {}) {
|
|
380
|
+
const startMediaStreamingRequest = {
|
|
381
|
+
operationContext: options.operationContext,
|
|
382
|
+
operationCallbackUri: options.operationCallbackUrl
|
|
383
|
+
};
|
|
384
|
+
return this.callMedia.startMediaStreaming(
|
|
385
|
+
this.callConnectionId,
|
|
386
|
+
startMediaStreamingRequest,
|
|
387
|
+
options
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Stops media streaming in the call.
|
|
392
|
+
* @param options - Additional attributes for stop media streaming.
|
|
393
|
+
*/
|
|
394
|
+
async stopMediaStreaming(options = {}) {
|
|
395
|
+
const stopMediaStreamingRequest = {
|
|
396
|
+
operationCallbackUri: options.operationCallbackUrl,
|
|
397
|
+
operationContext: options.operationContext
|
|
398
|
+
};
|
|
399
|
+
return this.callMedia.stopMediaStreaming(
|
|
400
|
+
this.callConnectionId,
|
|
401
|
+
stopMediaStreamingRequest,
|
|
402
|
+
options
|
|
403
|
+
);
|
|
404
|
+
}
|
|
435
405
|
}
|
|
436
|
-
|
|
437
|
-
|
|
406
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
407
|
+
0 && (module.exports = {
|
|
408
|
+
CallMedia
|
|
409
|
+
});
|
|
410
|
+
//# sourceMappingURL=callMedia.js.map
|