@azure/communication-call-automation 1.5.0-alpha.20250516.3 → 1.5.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -51
- package/dist/browser/callAutomationClient.d.ts +2 -9
- package/dist/browser/callAutomationClient.d.ts.map +1 -1
- package/dist/browser/callAutomationClient.js +9 -106
- package/dist/browser/callAutomationClient.js.map +1 -1
- package/dist/browser/callAutomationEventParser.d.ts.map +1 -1
- package/dist/browser/callAutomationEventParser.js +0 -18
- package/dist/browser/callAutomationEventParser.js.map +1 -1
- package/dist/browser/callConnection.d.ts +4 -6
- package/dist/browser/callConnection.d.ts.map +1 -1
- package/dist/browser/callConnection.js +13 -112
- package/dist/browser/callConnection.js.map +1 -1
- package/dist/browser/callMedia.d.ts +10 -20
- package/dist/browser/callMedia.d.ts.map +1 -1
- package/dist/browser/callMedia.js +20 -188
- package/dist/browser/callMedia.js.map +1 -1
- package/dist/browser/callRecording.d.ts.map +1 -1
- package/dist/browser/callRecording.js +5 -2
- package/dist/browser/callRecording.js.map +1 -1
- package/dist/browser/generated/src/callAutomationApiClient.d.ts +1 -2
- package/dist/browser/generated/src/callAutomationApiClient.d.ts.map +1 -1
- package/dist/browser/generated/src/callAutomationApiClient.js +2 -3
- package/dist/browser/generated/src/callAutomationApiClient.js.map +1 -1
- package/dist/browser/generated/src/models/index.d.ts +205 -850
- package/dist/browser/generated/src/models/index.d.ts.map +1 -1
- package/dist/browser/generated/src/models/index.js +48 -126
- package/dist/browser/generated/src/models/index.js.map +1 -1
- package/dist/browser/generated/src/models/mappers.d.ts +11 -48
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/browser/generated/src/models/mappers.js +460 -1644
- package/dist/browser/generated/src/models/mappers.js.map +1 -1
- package/dist/browser/generated/src/models/parameters.d.ts +1 -7
- package/dist/browser/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/browser/generated/src/models/parameters.js +6 -41
- package/dist/browser/generated/src/models/parameters.js.map +1 -1
- package/dist/browser/generated/src/operations/callConnection.d.ts +2 -9
- package/dist/browser/generated/src/operations/callConnection.d.ts.map +1 -1
- package/dist/browser/generated/src/operations/callConnection.js +1 -33
- package/dist/browser/generated/src/operations/callConnection.js.map +1 -1
- package/dist/browser/generated/src/operations/callMedia.d.ts +8 -15
- package/dist/browser/generated/src/operations/callMedia.d.ts.map +1 -1
- package/dist/browser/generated/src/operations/callMedia.js +25 -50
- package/dist/browser/generated/src/operations/callMedia.js.map +1 -1
- package/dist/browser/generated/src/operations/callRecording.d.ts +1 -7
- package/dist/browser/generated/src/operations/callRecording.d.ts.map +1 -1
- package/dist/browser/generated/src/operations/callRecording.js +0 -24
- package/dist/browser/generated/src/operations/callRecording.js.map +1 -1
- package/dist/browser/generated/src/operations/index.d.ts +0 -1
- package/dist/browser/generated/src/operations/index.d.ts.map +1 -1
- package/dist/browser/generated/src/operations/index.js +0 -1
- package/dist/browser/generated/src/operations/index.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts +2 -9
- package/dist/browser/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/callConnection.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts +8 -15
- package/dist/browser/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/callMedia.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts +1 -7
- package/dist/browser/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/callRecording.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +0 -1
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/index.js +0 -1
- package/dist/browser/generated/src/operationsInterfaces/index.js.map +1 -1
- package/dist/browser/index.d.ts +0 -2
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +0 -2
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/models/constants.js +1 -1
- package/dist/browser/models/constants.js.map +1 -1
- package/dist/browser/models/events.d.ts +67 -155
- package/dist/browser/models/events.d.ts.map +1 -1
- package/dist/browser/models/events.js.map +1 -1
- package/dist/browser/models/models.d.ts +5 -14
- package/dist/browser/models/models.d.ts.map +1 -1
- package/dist/browser/models/models.js +1 -3
- package/dist/browser/models/models.js.map +1 -1
- package/dist/browser/models/options.d.ts +2 -35
- package/dist/browser/models/options.d.ts.map +1 -1
- package/dist/browser/models/options.js.map +1 -1
- package/dist/browser/models/responses.d.ts +10 -51
- package/dist/browser/models/responses.d.ts.map +1 -1
- package/dist/browser/models/responses.js.map +1 -1
- package/dist/browser/utli/converters.d.ts.map +1 -1
- package/dist/browser/utli/converters.js +19 -1
- package/dist/browser/utli/converters.js.map +1 -1
- package/dist/commonjs/callAutomationClient.d.ts +2 -9
- package/dist/commonjs/callAutomationClient.d.ts.map +1 -1
- package/dist/commonjs/callAutomationClient.js +11 -108
- package/dist/commonjs/callAutomationClient.js.map +1 -1
- package/dist/commonjs/callAutomationEventParser.d.ts.map +1 -1
- package/dist/commonjs/callAutomationEventParser.js +0 -18
- package/dist/commonjs/callAutomationEventParser.js.map +1 -1
- package/dist/commonjs/callConnection.d.ts +4 -6
- package/dist/commonjs/callConnection.d.ts.map +1 -1
- package/dist/commonjs/callConnection.js +15 -114
- package/dist/commonjs/callConnection.js.map +1 -1
- package/dist/commonjs/callMedia.d.ts +10 -20
- package/dist/commonjs/callMedia.d.ts.map +1 -1
- package/dist/commonjs/callMedia.js +39 -207
- package/dist/commonjs/callMedia.js.map +1 -1
- package/dist/commonjs/callRecording.d.ts.map +1 -1
- package/dist/commonjs/callRecording.js +5 -2
- package/dist/commonjs/callRecording.js.map +1 -1
- package/dist/commonjs/generated/src/callAutomationApiClient.d.ts +1 -2
- package/dist/commonjs/generated/src/callAutomationApiClient.d.ts.map +1 -1
- package/dist/commonjs/generated/src/callAutomationApiClient.js +1 -2
- package/dist/commonjs/generated/src/callAutomationApiClient.js.map +1 -1
- package/dist/commonjs/generated/src/models/index.d.ts +205 -850
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.js +49 -127
- package/dist/commonjs/generated/src/models/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.d.ts +11 -48
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +463 -1647
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.d.ts +1 -7
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +6 -41
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/operations/callConnection.d.ts +2 -9
- package/dist/commonjs/generated/src/operations/callConnection.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operations/callConnection.js +1 -33
- package/dist/commonjs/generated/src/operations/callConnection.js.map +1 -1
- package/dist/commonjs/generated/src/operations/callMedia.d.ts +8 -15
- package/dist/commonjs/generated/src/operations/callMedia.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operations/callMedia.js +25 -50
- package/dist/commonjs/generated/src/operations/callMedia.js.map +1 -1
- package/dist/commonjs/generated/src/operations/callRecording.d.ts +1 -7
- package/dist/commonjs/generated/src/operations/callRecording.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operations/callRecording.js +0 -24
- package/dist/commonjs/generated/src/operations/callRecording.js.map +1 -1
- package/dist/commonjs/generated/src/operations/index.d.ts +0 -1
- package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operations/index.js +0 -1
- package/dist/commonjs/generated/src/operations/index.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts +2 -9
- package/dist/commonjs/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callConnection.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts +8 -15
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callMedia.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callRecording.d.ts +1 -7
- package/dist/commonjs/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callRecording.js.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +0 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +0 -1
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -1
- package/dist/commonjs/index.d.ts +0 -2
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +0 -2
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/models/constants.js +1 -1
- package/dist/commonjs/models/constants.js.map +1 -1
- package/dist/commonjs/models/events.d.ts +67 -155
- package/dist/commonjs/models/events.d.ts.map +1 -1
- package/dist/commonjs/models/events.js.map +1 -1
- package/dist/commonjs/models/models.d.ts +5 -14
- package/dist/commonjs/models/models.d.ts.map +1 -1
- package/dist/commonjs/models/models.js +6 -10
- package/dist/commonjs/models/models.js.map +1 -1
- package/dist/commonjs/models/options.d.ts +2 -35
- package/dist/commonjs/models/options.d.ts.map +1 -1
- package/dist/commonjs/models/options.js.map +1 -1
- package/dist/commonjs/models/responses.d.ts +10 -51
- package/dist/commonjs/models/responses.d.ts.map +1 -1
- package/dist/commonjs/models/responses.js.map +1 -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 +18 -0
- package/dist/commonjs/utli/converters.js.map +1 -1
- package/dist/esm/callAutomationClient.d.ts +2 -9
- package/dist/esm/callAutomationClient.d.ts.map +1 -1
- package/dist/esm/callAutomationClient.js +9 -106
- package/dist/esm/callAutomationClient.js.map +1 -1
- package/dist/esm/callAutomationEventParser.d.ts.map +1 -1
- package/dist/esm/callAutomationEventParser.js +0 -18
- package/dist/esm/callAutomationEventParser.js.map +1 -1
- package/dist/esm/callConnection.d.ts +4 -6
- package/dist/esm/callConnection.d.ts.map +1 -1
- package/dist/esm/callConnection.js +13 -112
- package/dist/esm/callConnection.js.map +1 -1
- package/dist/esm/callMedia.d.ts +10 -20
- package/dist/esm/callMedia.d.ts.map +1 -1
- package/dist/esm/callMedia.js +20 -188
- package/dist/esm/callMedia.js.map +1 -1
- package/dist/esm/callRecording.d.ts.map +1 -1
- package/dist/esm/callRecording.js +5 -2
- package/dist/esm/callRecording.js.map +1 -1
- package/dist/esm/generated/src/callAutomationApiClient.d.ts +1 -2
- package/dist/esm/generated/src/callAutomationApiClient.d.ts.map +1 -1
- package/dist/esm/generated/src/callAutomationApiClient.js +2 -3
- package/dist/esm/generated/src/callAutomationApiClient.js.map +1 -1
- package/dist/esm/generated/src/models/index.d.ts +205 -850
- package/dist/esm/generated/src/models/index.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.js +48 -126
- package/dist/esm/generated/src/models/index.js.map +1 -1
- package/dist/esm/generated/src/models/mappers.d.ts +11 -48
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/esm/generated/src/models/mappers.js +460 -1644
- package/dist/esm/generated/src/models/mappers.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.d.ts +1 -7
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +6 -41
- package/dist/esm/generated/src/models/parameters.js.map +1 -1
- package/dist/esm/generated/src/operations/callConnection.d.ts +2 -9
- package/dist/esm/generated/src/operations/callConnection.d.ts.map +1 -1
- package/dist/esm/generated/src/operations/callConnection.js +1 -33
- package/dist/esm/generated/src/operations/callConnection.js.map +1 -1
- package/dist/esm/generated/src/operations/callMedia.d.ts +8 -15
- package/dist/esm/generated/src/operations/callMedia.d.ts.map +1 -1
- package/dist/esm/generated/src/operations/callMedia.js +25 -50
- package/dist/esm/generated/src/operations/callMedia.js.map +1 -1
- package/dist/esm/generated/src/operations/callRecording.d.ts +1 -7
- package/dist/esm/generated/src/operations/callRecording.d.ts.map +1 -1
- package/dist/esm/generated/src/operations/callRecording.js +0 -24
- package/dist/esm/generated/src/operations/callRecording.js.map +1 -1
- package/dist/esm/generated/src/operations/index.d.ts +0 -1
- package/dist/esm/generated/src/operations/index.d.ts.map +1 -1
- package/dist/esm/generated/src/operations/index.js +0 -1
- package/dist/esm/generated/src/operations/index.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts +2 -9
- package/dist/esm/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callConnection.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callMedia.d.ts +8 -15
- 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/generated/src/operationsInterfaces/callRecording.d.ts +1 -7
- package/dist/esm/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/callRecording.js.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts +0 -1
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/esm/generated/src/operationsInterfaces/index.js +0 -1
- package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -1
- package/dist/esm/index.d.ts +0 -2
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +0 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/models/constants.js +1 -1
- package/dist/esm/models/constants.js.map +1 -1
- package/dist/esm/models/events.d.ts +67 -155
- 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 +5 -14
- package/dist/esm/models/models.d.ts.map +1 -1
- package/dist/esm/models/models.js +1 -3
- package/dist/esm/models/models.js.map +1 -1
- package/dist/esm/models/options.d.ts +2 -35
- package/dist/esm/models/options.d.ts.map +1 -1
- package/dist/esm/models/options.js.map +1 -1
- package/dist/esm/models/responses.d.ts +10 -51
- package/dist/esm/models/responses.d.ts.map +1 -1
- package/dist/esm/models/responses.js.map +1 -1
- package/dist/esm/utli/converters.d.ts.map +1 -1
- package/dist/esm/utli/converters.js +19 -1
- package/dist/esm/utli/converters.js.map +1 -1
- package/dist/react-native/callAutomationClient.d.ts +2 -9
- package/dist/react-native/callAutomationClient.d.ts.map +1 -1
- package/dist/react-native/callAutomationClient.js +9 -106
- package/dist/react-native/callAutomationClient.js.map +1 -1
- package/dist/react-native/callAutomationEventParser.d.ts.map +1 -1
- package/dist/react-native/callAutomationEventParser.js +0 -18
- package/dist/react-native/callAutomationEventParser.js.map +1 -1
- package/dist/react-native/callConnection.d.ts +4 -6
- package/dist/react-native/callConnection.d.ts.map +1 -1
- package/dist/react-native/callConnection.js +13 -112
- package/dist/react-native/callConnection.js.map +1 -1
- package/dist/react-native/callMedia.d.ts +10 -20
- package/dist/react-native/callMedia.d.ts.map +1 -1
- package/dist/react-native/callMedia.js +20 -188
- package/dist/react-native/callMedia.js.map +1 -1
- package/dist/react-native/callRecording.d.ts.map +1 -1
- package/dist/react-native/callRecording.js +5 -2
- package/dist/react-native/callRecording.js.map +1 -1
- package/dist/react-native/generated/src/callAutomationApiClient.d.ts +1 -2
- package/dist/react-native/generated/src/callAutomationApiClient.d.ts.map +1 -1
- package/dist/react-native/generated/src/callAutomationApiClient.js +2 -3
- package/dist/react-native/generated/src/callAutomationApiClient.js.map +1 -1
- package/dist/react-native/generated/src/models/index.d.ts +205 -850
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/index.js +48 -126
- package/dist/react-native/generated/src/models/index.js.map +1 -1
- package/dist/react-native/generated/src/models/mappers.d.ts +11 -48
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/mappers.js +460 -1644
- package/dist/react-native/generated/src/models/mappers.js.map +1 -1
- package/dist/react-native/generated/src/models/parameters.d.ts +1 -7
- package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/parameters.js +6 -41
- package/dist/react-native/generated/src/models/parameters.js.map +1 -1
- package/dist/react-native/generated/src/operations/callConnection.d.ts +2 -9
- package/dist/react-native/generated/src/operations/callConnection.d.ts.map +1 -1
- package/dist/react-native/generated/src/operations/callConnection.js +1 -33
- package/dist/react-native/generated/src/operations/callConnection.js.map +1 -1
- package/dist/react-native/generated/src/operations/callMedia.d.ts +8 -15
- package/dist/react-native/generated/src/operations/callMedia.d.ts.map +1 -1
- package/dist/react-native/generated/src/operations/callMedia.js +25 -50
- package/dist/react-native/generated/src/operations/callMedia.js.map +1 -1
- package/dist/react-native/generated/src/operations/callRecording.d.ts +1 -7
- package/dist/react-native/generated/src/operations/callRecording.d.ts.map +1 -1
- package/dist/react-native/generated/src/operations/callRecording.js +0 -24
- package/dist/react-native/generated/src/operations/callRecording.js.map +1 -1
- package/dist/react-native/generated/src/operations/index.d.ts +0 -1
- package/dist/react-native/generated/src/operations/index.d.ts.map +1 -1
- package/dist/react-native/generated/src/operations/index.js +0 -1
- package/dist/react-native/generated/src/operations/index.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts +2 -9
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.d.ts.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/callConnection.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts +8 -15
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.d.ts.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/callMedia.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts +1 -7
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.d.ts.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/callRecording.js.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.js +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -1
- package/dist/react-native/index.d.ts +0 -2
- package/dist/react-native/index.d.ts.map +1 -1
- package/dist/react-native/index.js +0 -2
- package/dist/react-native/index.js.map +1 -1
- package/dist/react-native/models/constants.js +1 -1
- package/dist/react-native/models/constants.js.map +1 -1
- package/dist/react-native/models/events.d.ts +67 -155
- package/dist/react-native/models/events.d.ts.map +1 -1
- package/dist/react-native/models/events.js.map +1 -1
- package/dist/react-native/models/models.d.ts +5 -14
- package/dist/react-native/models/models.d.ts.map +1 -1
- package/dist/react-native/models/models.js +1 -3
- package/dist/react-native/models/models.js.map +1 -1
- package/dist/react-native/models/options.d.ts +2 -35
- package/dist/react-native/models/options.d.ts.map +1 -1
- package/dist/react-native/models/options.js.map +1 -1
- package/dist/react-native/models/responses.d.ts +10 -51
- package/dist/react-native/models/responses.d.ts.map +1 -1
- package/dist/react-native/models/responses.js.map +1 -1
- package/dist/react-native/utli/converters.d.ts.map +1 -1
- package/dist/react-native/utli/converters.js +19 -1
- package/dist/react-native/utli/converters.js.map +1 -1
- package/package.json +17 -11
- package/dist/browser/eventprocessor/callAutomationEventProcessor.d.ts +0 -39
- package/dist/browser/eventprocessor/callAutomationEventProcessor.d.ts.map +0 -1
- package/dist/browser/eventprocessor/callAutomationEventProcessor.js +0 -137
- package/dist/browser/eventprocessor/callAutomationEventProcessor.js.map +0 -1
- package/dist/browser/eventprocessor/eventResponses.d.ts +0 -123
- package/dist/browser/eventprocessor/eventResponses.d.ts.map +0 -1
- package/dist/browser/eventprocessor/eventResponses.js +0 -4
- package/dist/browser/eventprocessor/eventResponses.js.map +0 -1
- package/dist/browser/generated/src/operations/callDialog.d.ts +0 -35
- package/dist/browser/generated/src/operations/callDialog.d.ts.map +0 -1
- package/dist/browser/generated/src/operations/callDialog.js +0 -111
- package/dist/browser/generated/src/operations/callDialog.js.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callDialog.d.ts +0 -27
- package/dist/browser/generated/src/operationsInterfaces/callDialog.d.ts.map +0 -1
- package/dist/browser/generated/src/operationsInterfaces/callDialog.js +0 -9
- package/dist/browser/generated/src/operationsInterfaces/callDialog.js.map +0 -1
- package/dist/commonjs/eventprocessor/callAutomationEventProcessor.d.ts +0 -39
- package/dist/commonjs/eventprocessor/callAutomationEventProcessor.d.ts.map +0 -1
- package/dist/commonjs/eventprocessor/callAutomationEventProcessor.js +0 -141
- package/dist/commonjs/eventprocessor/callAutomationEventProcessor.js.map +0 -1
- package/dist/commonjs/eventprocessor/eventResponses.d.ts +0 -123
- package/dist/commonjs/eventprocessor/eventResponses.d.ts.map +0 -1
- package/dist/commonjs/eventprocessor/eventResponses.js +0 -5
- package/dist/commonjs/eventprocessor/eventResponses.js.map +0 -1
- package/dist/commonjs/generated/src/operations/callDialog.d.ts +0 -35
- package/dist/commonjs/generated/src/operations/callDialog.d.ts.map +0 -1
- package/dist/commonjs/generated/src/operations/callDialog.js +0 -116
- package/dist/commonjs/generated/src/operations/callDialog.js.map +0 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callDialog.d.ts +0 -27
- package/dist/commonjs/generated/src/operationsInterfaces/callDialog.d.ts.map +0 -1
- package/dist/commonjs/generated/src/operationsInterfaces/callDialog.js +0 -10
- package/dist/commonjs/generated/src/operationsInterfaces/callDialog.js.map +0 -1
- package/dist/esm/eventprocessor/callAutomationEventProcessor.d.ts +0 -39
- package/dist/esm/eventprocessor/callAutomationEventProcessor.d.ts.map +0 -1
- package/dist/esm/eventprocessor/callAutomationEventProcessor.js +0 -137
- package/dist/esm/eventprocessor/callAutomationEventProcessor.js.map +0 -1
- package/dist/esm/eventprocessor/eventResponses.d.ts +0 -123
- package/dist/esm/eventprocessor/eventResponses.d.ts.map +0 -1
- package/dist/esm/eventprocessor/eventResponses.js +0 -4
- package/dist/esm/eventprocessor/eventResponses.js.map +0 -1
- package/dist/esm/generated/src/operations/callDialog.d.ts +0 -35
- package/dist/esm/generated/src/operations/callDialog.d.ts.map +0 -1
- package/dist/esm/generated/src/operations/callDialog.js +0 -111
- package/dist/esm/generated/src/operations/callDialog.js.map +0 -1
- package/dist/esm/generated/src/operationsInterfaces/callDialog.d.ts +0 -27
- package/dist/esm/generated/src/operationsInterfaces/callDialog.d.ts.map +0 -1
- package/dist/esm/generated/src/operationsInterfaces/callDialog.js +0 -9
- package/dist/esm/generated/src/operationsInterfaces/callDialog.js.map +0 -1
- package/dist/react-native/eventprocessor/callAutomationEventProcessor.d.ts +0 -39
- package/dist/react-native/eventprocessor/callAutomationEventProcessor.d.ts.map +0 -1
- package/dist/react-native/eventprocessor/callAutomationEventProcessor.js +0 -137
- package/dist/react-native/eventprocessor/callAutomationEventProcessor.js.map +0 -1
- package/dist/react-native/eventprocessor/eventResponses.d.ts +0 -123
- package/dist/react-native/eventprocessor/eventResponses.d.ts.map +0 -1
- package/dist/react-native/eventprocessor/eventResponses.js +0 -4
- package/dist/react-native/eventprocessor/eventResponses.js.map +0 -1
- package/dist/react-native/generated/src/operations/callDialog.d.ts +0 -35
- package/dist/react-native/generated/src/operations/callDialog.d.ts.map +0 -1
- package/dist/react-native/generated/src/operations/callDialog.js +0 -111
- package/dist/react-native/generated/src/operations/callDialog.js.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callDialog.d.ts +0 -27
- package/dist/react-native/generated/src/operationsInterfaces/callDialog.d.ts.map +0 -1
- package/dist/react-native/generated/src/operationsInterfaces/callDialog.js +0 -9
- package/dist/react-native/generated/src/operationsInterfaces/callDialog.js.map +0 -1
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import type { AddParticipantSucceeded, AddParticipantFailed, CallConnected, PlayCanceled, RecognizeCanceled, PlayCompleted, PlayFailed, RemoveParticipantSucceeded, RemoveParticipantFailed, SendDtmfTonesCompleted, SendDtmfTonesFailed, RecognizeCompleted, RecognizeFailed, CallTransferAccepted, CallTransferFailed, CancelAddParticipantSucceeded, CancelAddParticipantFailed, CreateCallFailed, AnswerFailed, ConnectFailed } from "../models/events.js";
|
|
2
|
-
/**
|
|
3
|
-
* AddParticipant event result
|
|
4
|
-
*/
|
|
5
|
-
export interface AddParticipantEventResult {
|
|
6
|
-
/** returns true if add participant was successful */
|
|
7
|
-
isSuccess: boolean;
|
|
8
|
-
/** contains success event if the result was successful */
|
|
9
|
-
successResult?: AddParticipantSucceeded;
|
|
10
|
-
/** contains failure event if the result was failure */
|
|
11
|
-
failureResult?: AddParticipantFailed;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* AnswerCall event result
|
|
15
|
-
*/
|
|
16
|
-
export interface AnswerCallEventResult {
|
|
17
|
-
/** returns true if answer call was successful */
|
|
18
|
-
isSuccess: boolean;
|
|
19
|
-
/** contains success event if the result was successful */
|
|
20
|
-
successResult?: CallConnected;
|
|
21
|
-
/** contains failure event if the result was failure */
|
|
22
|
-
failureResult?: AnswerFailed;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* CancelAllMediaOperations event result
|
|
26
|
-
*/
|
|
27
|
-
export interface CancelAllMediaOperationsEventResult {
|
|
28
|
-
/** returns true if cancel all media was successful */
|
|
29
|
-
isSuccess: boolean;
|
|
30
|
-
/** contains play cancel event if play media was canceled */
|
|
31
|
-
playCanceledSuccessResult?: PlayCanceled;
|
|
32
|
-
/** contains recognize cancel event if recognize media was canceled */
|
|
33
|
-
recognizeCanceledSuccessResult?: RecognizeCanceled;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* CreateCall event result
|
|
37
|
-
*/
|
|
38
|
-
export interface CreateCallEventResult {
|
|
39
|
-
/** returns true if create call was successful */
|
|
40
|
-
isSuccess: boolean;
|
|
41
|
-
/** contains success event if the result was successful */
|
|
42
|
-
successResult?: CallConnected;
|
|
43
|
-
/** contains failure event if the result was failure */
|
|
44
|
-
failureResult?: CreateCallFailed;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* ConnectCall event result
|
|
48
|
-
*/
|
|
49
|
-
export interface ConnectCallEventResult {
|
|
50
|
-
/** returns true if create call was successful */
|
|
51
|
-
isSuccess: boolean;
|
|
52
|
-
/** contains success event if the result was successful */
|
|
53
|
-
successResult?: CallConnected;
|
|
54
|
-
/** contains failure event if the result was failure */
|
|
55
|
-
failureResult?: ConnectFailed;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Play event result
|
|
59
|
-
*/
|
|
60
|
-
export interface PlayEventResult {
|
|
61
|
-
/** returns true if play was successful */
|
|
62
|
-
isSuccess: boolean;
|
|
63
|
-
/** contains success event if the result was successful */
|
|
64
|
-
successResult?: PlayCompleted;
|
|
65
|
-
/** contains failure event if the result was failure */
|
|
66
|
-
failureResult?: PlayFailed;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* RemoveParticipant event result
|
|
70
|
-
*/
|
|
71
|
-
export interface RemoveParticipantEventResult {
|
|
72
|
-
/** returns true if remove participant was successful */
|
|
73
|
-
isSuccess: boolean;
|
|
74
|
-
/** contains success event if the result was successful */
|
|
75
|
-
successResult?: RemoveParticipantSucceeded;
|
|
76
|
-
/** contains failure event if the result was failure */
|
|
77
|
-
failureResult?: RemoveParticipantFailed;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* SendDtmf event result
|
|
81
|
-
*/
|
|
82
|
-
export interface SendDtmfEventResult {
|
|
83
|
-
/** returns true if send dtmf was successful */
|
|
84
|
-
isSuccess: boolean;
|
|
85
|
-
/** contains success event if the result was successful */
|
|
86
|
-
successResult?: SendDtmfTonesCompleted;
|
|
87
|
-
/** contains failure event if the result was failure */
|
|
88
|
-
failureResult?: SendDtmfTonesFailed;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* StartRecognizing event result
|
|
92
|
-
*/
|
|
93
|
-
export interface StartRecognizingEventResult {
|
|
94
|
-
/** returns true if recognize was successful */
|
|
95
|
-
isSuccess: boolean;
|
|
96
|
-
/** contains success event if the result was successful */
|
|
97
|
-
successResult?: RecognizeCompleted;
|
|
98
|
-
/** contains failure event if the result was failure */
|
|
99
|
-
failureResult?: RecognizeFailed;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* TransferCallToParticipant event result
|
|
103
|
-
*/
|
|
104
|
-
export interface TransferCallToParticipantEventResult {
|
|
105
|
-
/** returns true if transfer call to participant was successful */
|
|
106
|
-
isSuccess: boolean;
|
|
107
|
-
/** contains success event if the result was successful */
|
|
108
|
-
successResult?: CallTransferAccepted;
|
|
109
|
-
/** contains failure event if the result was failure */
|
|
110
|
-
failureResult?: CallTransferFailed;
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* TransferCallToParticipant event result
|
|
114
|
-
*/
|
|
115
|
-
export interface CancelAddParticipantEventResult {
|
|
116
|
-
/** returns true if cancel add participant was successful */
|
|
117
|
-
isSuccess: boolean;
|
|
118
|
-
/** contains success event if the result was successful */
|
|
119
|
-
successResult?: CancelAddParticipantSucceeded;
|
|
120
|
-
/** contains failure event if the result was failure */
|
|
121
|
-
failureResult?: CancelAddParticipantFailed;
|
|
122
|
-
}
|
|
123
|
-
//# sourceMappingURL=eventResponses.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventResponses.d.ts","sourceRoot":"","sources":["../../../src/eventprocessor/eventResponses.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventResponses.js","sourceRoot":"","sources":["../../../src/eventprocessor/eventResponses.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n AddParticipantSucceeded,\n AddParticipantFailed,\n CallConnected,\n PlayCanceled,\n RecognizeCanceled,\n PlayCompleted,\n PlayFailed,\n RemoveParticipantSucceeded,\n RemoveParticipantFailed,\n SendDtmfTonesCompleted,\n SendDtmfTonesFailed,\n RecognizeCompleted,\n RecognizeFailed,\n CallTransferAccepted,\n CallTransferFailed,\n CancelAddParticipantSucceeded,\n CancelAddParticipantFailed,\n CreateCallFailed,\n AnswerFailed,\n ConnectFailed,\n} from \"../models/events.js\";\n\n/**\n * AddParticipant event result\n */\nexport interface AddParticipantEventResult {\n /** returns true if add participant was successful */\n isSuccess: boolean;\n\n /** contains success event if the result was successful */\n successResult?: AddParticipantSucceeded;\n\n /** contains failure event if the result was failure */\n failureResult?: AddParticipantFailed;\n}\n\n/**\n * AnswerCall event result\n */\nexport interface AnswerCallEventResult {\n /** returns true if answer call was successful */\n isSuccess: boolean;\n /** contains success event if the result was successful */\n successResult?: CallConnected;\n /** contains failure event if the result was failure */\n failureResult?: AnswerFailed;\n}\n\n/**\n * CancelAllMediaOperations event result\n */\nexport interface CancelAllMediaOperationsEventResult {\n /** returns true if cancel all media was successful */\n isSuccess: boolean;\n /** contains play cancel event if play media was canceled */\n playCanceledSuccessResult?: PlayCanceled;\n /** contains recognize cancel event if recognize media was canceled */\n recognizeCanceledSuccessResult?: RecognizeCanceled;\n}\n\n/**\n * CreateCall event result\n */\nexport interface CreateCallEventResult {\n /** returns true if create call was successful */\n isSuccess: boolean;\n /** contains success event if the result was successful */\n successResult?: CallConnected;\n /** contains failure event if the result was failure */\n failureResult?: CreateCallFailed;\n}\n\n/**\n * ConnectCall event result\n */\nexport interface ConnectCallEventResult {\n /** returns true if create call was successful */\n isSuccess: boolean;\n /** contains success event if the result was successful */\n successResult?: CallConnected;\n /** contains failure event if the result was failure */\n failureResult?: ConnectFailed;\n}\n\n/**\n * Play event result\n */\nexport interface PlayEventResult {\n /** returns true if play was successful */\n isSuccess: boolean;\n /** contains success event if the result was successful */\n successResult?: PlayCompleted;\n /** contains failure event if the result was failure */\n failureResult?: PlayFailed;\n}\n\n/**\n * RemoveParticipant event result\n */\nexport interface RemoveParticipantEventResult {\n /** returns true if remove participant was successful */\n isSuccess: boolean;\n /** contains success event if the result was successful */\n successResult?: RemoveParticipantSucceeded;\n /** contains failure event if the result was failure */\n failureResult?: RemoveParticipantFailed;\n}\n\n/**\n * SendDtmf event result\n */\nexport interface SendDtmfEventResult {\n /** returns true if send dtmf was successful */\n isSuccess: boolean;\n /** contains success event if the result was successful */\n successResult?: SendDtmfTonesCompleted;\n /** contains failure event if the result was failure */\n failureResult?: SendDtmfTonesFailed;\n}\n\n/**\n * StartRecognizing event result\n */\nexport interface StartRecognizingEventResult {\n /** returns true if recognize was successful */\n isSuccess: boolean;\n /** contains success event if the result was successful */\n successResult?: RecognizeCompleted;\n /** contains failure event if the result was failure */\n failureResult?: RecognizeFailed;\n}\n\n/**\n * TransferCallToParticipant event result\n */\nexport interface TransferCallToParticipantEventResult {\n /** returns true if transfer call to participant was successful */\n isSuccess: boolean;\n /** contains success event if the result was successful */\n successResult?: CallTransferAccepted;\n /** contains failure event if the result was failure */\n failureResult?: CallTransferFailed;\n}\n\n/**\n * TransferCallToParticipant event result\n */\nexport interface CancelAddParticipantEventResult {\n /** returns true if cancel add participant was successful */\n isSuccess: boolean;\n /** contains success event if the result was successful */\n successResult?: CancelAddParticipantSucceeded;\n /** contains failure event if the result was failure */\n failureResult?: CancelAddParticipantFailed;\n}\n"]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { CallDialog } from "../operationsInterfaces/index.js";
|
|
2
|
-
import { CallAutomationApiClient } from "../callAutomationApiClient.js";
|
|
3
|
-
import { StartDialogRequest, CallDialogStartDialogOptionalParams, CallDialogStartDialogResponse, CallDialogStopDialogOptionalParams, UpdateDialogRequest, CallDialogUpdateDialogOptionalParams } from "../models/index.js";
|
|
4
|
-
/** Class containing CallDialog operations. */
|
|
5
|
-
export declare class CallDialogImpl implements CallDialog {
|
|
6
|
-
private readonly client;
|
|
7
|
-
/**
|
|
8
|
-
* Initialize a new instance of the class CallDialog class.
|
|
9
|
-
* @param client Reference to the service client
|
|
10
|
-
*/
|
|
11
|
-
constructor(client: CallAutomationApiClient);
|
|
12
|
-
/**
|
|
13
|
-
* Start a dialog.
|
|
14
|
-
* @param callConnectionId The call connection id
|
|
15
|
-
* @param dialogId The dialog id
|
|
16
|
-
* @param startDialogRequest The start dialog request
|
|
17
|
-
* @param options The options parameters.
|
|
18
|
-
*/
|
|
19
|
-
startDialog(callConnectionId: string, dialogId: string, startDialogRequest: StartDialogRequest, options?: CallDialogStartDialogOptionalParams): Promise<CallDialogStartDialogResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* @param callConnectionId
|
|
22
|
-
* @param dialogId
|
|
23
|
-
* @param options The options parameters.
|
|
24
|
-
*/
|
|
25
|
-
stopDialog(callConnectionId: string, dialogId: string, options?: CallDialogStopDialogOptionalParams): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Update a dialog.
|
|
28
|
-
* @param callConnectionId The call connection id
|
|
29
|
-
* @param dialogId The dialog id
|
|
30
|
-
* @param updateDialogRequest The update dialog request
|
|
31
|
-
* @param options The options parameters.
|
|
32
|
-
*/
|
|
33
|
-
updateDialog(callConnectionId: string, dialogId: string, updateDialogRequest: UpdateDialogRequest, options?: CallDialogUpdateDialogOptionalParams): Promise<void>;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=callDialog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callDialog.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operations/callDialog.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAI9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACL,kBAAkB,EAClB,mCAAmC,EACnC,6BAA6B,EAC7B,kCAAkC,EAClC,mBAAmB,EACnB,oCAAoC,EACrC,MAAM,oBAAoB,CAAC;AAE5B,8CAA8C;AAC9C,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IAEjD;;;OAGG;gBACS,MAAM,EAAE,uBAAuB;IAI3C;;;;;;OAMG;IACH,WAAW,CACT,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,CAAC,EAAE,mCAAmC,GAC5C,OAAO,CAAC,6BAA6B,CAAC;IAOzC;;;;OAIG;IACH,UAAU,CACR,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,kCAAkC,GAC3C,OAAO,CAAC,IAAI,CAAC;IAOhB;;;;;;OAMG;IACH,YAAY,CACV,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,EAChB,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,CAAC,EAAE,oCAAoC,GAC7C,OAAO,CAAC,IAAI,CAAC;CAMjB"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
-
*/
|
|
8
|
-
import * as coreClient from "@azure/core-client";
|
|
9
|
-
import * as Mappers from "../models/mappers.js";
|
|
10
|
-
import * as Parameters from "../models/parameters.js";
|
|
11
|
-
/** Class containing CallDialog operations. */
|
|
12
|
-
export class CallDialogImpl {
|
|
13
|
-
/**
|
|
14
|
-
* Initialize a new instance of the class CallDialog class.
|
|
15
|
-
* @param client Reference to the service client
|
|
16
|
-
*/
|
|
17
|
-
constructor(client) {
|
|
18
|
-
this.client = client;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Start a dialog.
|
|
22
|
-
* @param callConnectionId The call connection id
|
|
23
|
-
* @param dialogId The dialog id
|
|
24
|
-
* @param startDialogRequest The start dialog request
|
|
25
|
-
* @param options The options parameters.
|
|
26
|
-
*/
|
|
27
|
-
startDialog(callConnectionId, dialogId, startDialogRequest, options) {
|
|
28
|
-
return this.client.sendOperationRequest({ callConnectionId, dialogId, startDialogRequest, options }, startDialogOperationSpec);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @param callConnectionId
|
|
32
|
-
* @param dialogId
|
|
33
|
-
* @param options The options parameters.
|
|
34
|
-
*/
|
|
35
|
-
stopDialog(callConnectionId, dialogId, options) {
|
|
36
|
-
return this.client.sendOperationRequest({ callConnectionId, dialogId, options }, stopDialogOperationSpec);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Update a dialog.
|
|
40
|
-
* @param callConnectionId The call connection id
|
|
41
|
-
* @param dialogId The dialog id
|
|
42
|
-
* @param updateDialogRequest The update dialog request
|
|
43
|
-
* @param options The options parameters.
|
|
44
|
-
*/
|
|
45
|
-
updateDialog(callConnectionId, dialogId, updateDialogRequest, options) {
|
|
46
|
-
return this.client.sendOperationRequest({ callConnectionId, dialogId, updateDialogRequest, options }, updateDialogOperationSpec);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
// Operation Specifications
|
|
50
|
-
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
51
|
-
const startDialogOperationSpec = {
|
|
52
|
-
path: "/calling/callConnections/{callConnectionId}/dialogs/{dialogId}",
|
|
53
|
-
httpMethod: "PUT",
|
|
54
|
-
responses: {
|
|
55
|
-
201: {
|
|
56
|
-
bodyMapper: Mappers.DialogStateResponse,
|
|
57
|
-
},
|
|
58
|
-
default: {
|
|
59
|
-
bodyMapper: Mappers.CommunicationErrorResponse,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
requestBody: Parameters.startDialogRequest,
|
|
63
|
-
queryParameters: [Parameters.apiVersion],
|
|
64
|
-
urlParameters: [
|
|
65
|
-
Parameters.endpoint,
|
|
66
|
-
Parameters.callConnectionId,
|
|
67
|
-
Parameters.dialogId,
|
|
68
|
-
],
|
|
69
|
-
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
70
|
-
mediaType: "json",
|
|
71
|
-
serializer,
|
|
72
|
-
};
|
|
73
|
-
const stopDialogOperationSpec = {
|
|
74
|
-
path: "/calling/callConnections/{callConnectionId}/dialogs/{dialogId}",
|
|
75
|
-
httpMethod: "DELETE",
|
|
76
|
-
responses: {
|
|
77
|
-
204: {},
|
|
78
|
-
default: {
|
|
79
|
-
bodyMapper: Mappers.CommunicationErrorResponse,
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
queryParameters: [Parameters.apiVersion, Parameters.operationCallbackUri],
|
|
83
|
-
urlParameters: [
|
|
84
|
-
Parameters.endpoint,
|
|
85
|
-
Parameters.callConnectionId,
|
|
86
|
-
Parameters.dialogId,
|
|
87
|
-
],
|
|
88
|
-
headerParameters: [Parameters.accept],
|
|
89
|
-
serializer,
|
|
90
|
-
};
|
|
91
|
-
const updateDialogOperationSpec = {
|
|
92
|
-
path: "/calling/callConnections/{callConnectionId}/dialogs/{dialogId}",
|
|
93
|
-
httpMethod: "PATCH",
|
|
94
|
-
responses: {
|
|
95
|
-
200: {},
|
|
96
|
-
default: {
|
|
97
|
-
bodyMapper: Mappers.CommunicationErrorResponse,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
requestBody: Parameters.updateDialogRequest,
|
|
101
|
-
queryParameters: [Parameters.apiVersion],
|
|
102
|
-
urlParameters: [
|
|
103
|
-
Parameters.endpoint,
|
|
104
|
-
Parameters.callConnectionId,
|
|
105
|
-
Parameters.dialogId,
|
|
106
|
-
],
|
|
107
|
-
headerParameters: [Parameters.contentType, Parameters.accept],
|
|
108
|
-
mediaType: "json",
|
|
109
|
-
serializer,
|
|
110
|
-
};
|
|
111
|
-
//# sourceMappingURL=callDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callDialog.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/callDialog.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { CallDialog } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CallAutomationApiClient } from \"../callAutomationApiClient.js\";\nimport {\n StartDialogRequest,\n CallDialogStartDialogOptionalParams,\n CallDialogStartDialogResponse,\n CallDialogStopDialogOptionalParams,\n UpdateDialogRequest,\n CallDialogUpdateDialogOptionalParams,\n} from \"../models/index.js\";\n\n/** Class containing CallDialog operations. */\nexport class CallDialogImpl implements CallDialog {\n private readonly client: CallAutomationApiClient;\n\n /**\n * Initialize a new instance of the class CallDialog class.\n * @param client Reference to the service client\n */\n constructor(client: CallAutomationApiClient) {\n this.client = client;\n }\n\n /**\n * Start a dialog.\n * @param callConnectionId The call connection id\n * @param dialogId The dialog id\n * @param startDialogRequest The start dialog request\n * @param options The options parameters.\n */\n startDialog(\n callConnectionId: string,\n dialogId: string,\n startDialogRequest: StartDialogRequest,\n options?: CallDialogStartDialogOptionalParams,\n ): Promise<CallDialogStartDialogResponse> {\n return this.client.sendOperationRequest(\n { callConnectionId, dialogId, startDialogRequest, options },\n startDialogOperationSpec,\n );\n }\n\n /**\n * @param callConnectionId\n * @param dialogId\n * @param options The options parameters.\n */\n stopDialog(\n callConnectionId: string,\n dialogId: string,\n options?: CallDialogStopDialogOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { callConnectionId, dialogId, options },\n stopDialogOperationSpec,\n );\n }\n\n /**\n * Update a dialog.\n * @param callConnectionId The call connection id\n * @param dialogId The dialog id\n * @param updateDialogRequest The update dialog request\n * @param options The options parameters.\n */\n updateDialog(\n callConnectionId: string,\n dialogId: string,\n updateDialogRequest: UpdateDialogRequest,\n options?: CallDialogUpdateDialogOptionalParams,\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { callConnectionId, dialogId, updateDialogRequest, options },\n updateDialogOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst startDialogOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections/{callConnectionId}/dialogs/{dialogId}\",\n httpMethod: \"PUT\",\n responses: {\n 201: {\n bodyMapper: Mappers.DialogStateResponse,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.startDialogRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.callConnectionId,\n Parameters.dialogId,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\nconst stopDialogOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections/{callConnectionId}/dialogs/{dialogId}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.operationCallbackUri],\n urlParameters: [\n Parameters.endpoint,\n Parameters.callConnectionId,\n Parameters.dialogId,\n ],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateDialogOperationSpec: coreClient.OperationSpec = {\n path: \"/calling/callConnections/{callConnectionId}/dialogs/{dialogId}\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: Parameters.updateDialogRequest,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.endpoint,\n Parameters.callConnectionId,\n Parameters.dialogId,\n ],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer,\n};\n"]}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { StartDialogRequest, CallDialogStartDialogOptionalParams, CallDialogStartDialogResponse, CallDialogStopDialogOptionalParams, UpdateDialogRequest, CallDialogUpdateDialogOptionalParams } from "../models/index.js";
|
|
2
|
-
/** Interface representing a CallDialog. */
|
|
3
|
-
export interface CallDialog {
|
|
4
|
-
/**
|
|
5
|
-
* Start a dialog.
|
|
6
|
-
* @param callConnectionId The call connection id
|
|
7
|
-
* @param dialogId The dialog id
|
|
8
|
-
* @param startDialogRequest The start dialog request
|
|
9
|
-
* @param options The options parameters.
|
|
10
|
-
*/
|
|
11
|
-
startDialog(callConnectionId: string, dialogId: string, startDialogRequest: StartDialogRequest, options?: CallDialogStartDialogOptionalParams): Promise<CallDialogStartDialogResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* @param callConnectionId
|
|
14
|
-
* @param dialogId
|
|
15
|
-
* @param options The options parameters.
|
|
16
|
-
*/
|
|
17
|
-
stopDialog(callConnectionId: string, dialogId: string, options?: CallDialogStopDialogOptionalParams): Promise<void>;
|
|
18
|
-
/**
|
|
19
|
-
* Update a dialog.
|
|
20
|
-
* @param callConnectionId The call connection id
|
|
21
|
-
* @param dialogId The dialog id
|
|
22
|
-
* @param updateDialogRequest The update dialog request
|
|
23
|
-
* @param options The options parameters.
|
|
24
|
-
*/
|
|
25
|
-
updateDialog(callConnectionId: string, dialogId: string, updateDialogRequest: UpdateDialogRequest, options?: CallDialogUpdateDialogOptionalParams): Promise<void>;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=callDialog.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callDialog.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/callDialog.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,kBAAkB,EAClB,mCAAmC,EACnC,6BAA6B,EAC7B,kCAAkC,EAClC,mBAAmB,EACnB,oCAAoC,EACrC,MAAM,oBAAoB,CAAC;AAE5B,2CAA2C;AAC3C,MAAM,WAAW,UAAU;IACzB;;;;;;OAMG;IACH,WAAW,CACT,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,EAChB,kBAAkB,EAAE,kBAAkB,EACtC,OAAO,CAAC,EAAE,mCAAmC,GAC5C,OAAO,CAAC,6BAA6B,CAAC,CAAC;IAC1C;;;;OAIG;IACH,UAAU,CACR,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,kCAAkC,GAC3C,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;;;;OAMG;IACH,YAAY,CACV,gBAAgB,EAAE,MAAM,EACxB,QAAQ,EAAE,MAAM,EAChB,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,CAAC,EAAE,oCAAoC,GAC7C,OAAO,CAAC,IAAI,CAAC,CAAC;CAClB"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
*
|
|
5
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
-
*/
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=callDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callDialog.js","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/callDialog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n StartDialogRequest,\n CallDialogStartDialogOptionalParams,\n CallDialogStartDialogResponse,\n CallDialogStopDialogOptionalParams,\n UpdateDialogRequest,\n CallDialogUpdateDialogOptionalParams,\n} from \"../models/index.js\";\n\n/** Interface representing a CallDialog. */\nexport interface CallDialog {\n /**\n * Start a dialog.\n * @param callConnectionId The call connection id\n * @param dialogId The dialog id\n * @param startDialogRequest The start dialog request\n * @param options The options parameters.\n */\n startDialog(\n callConnectionId: string,\n dialogId: string,\n startDialogRequest: StartDialogRequest,\n options?: CallDialogStartDialogOptionalParams,\n ): Promise<CallDialogStartDialogResponse>;\n /**\n * @param callConnectionId\n * @param dialogId\n * @param options The options parameters.\n */\n stopDialog(\n callConnectionId: string,\n dialogId: string,\n options?: CallDialogStopDialogOptionalParams,\n ): Promise<void>;\n /**\n * Update a dialog.\n * @param callConnectionId The call connection id\n * @param dialogId The dialog id\n * @param updateDialogRequest The update dialog request\n * @param options The options parameters.\n */\n updateDialog(\n callConnectionId: string,\n dialogId: string,\n updateDialogRequest: UpdateDialogRequest,\n options?: CallDialogUpdateDialogOptionalParams,\n ): Promise<void>;\n}\n"]}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { CallAutomationEvent } from "../models/events.js";
|
|
2
|
-
import type { AbortSignalLike } from "@azure/abort-controller";
|
|
3
|
-
/**
|
|
4
|
-
* Call Automation's EventProcessor for incoming events for ease of use.
|
|
5
|
-
*/
|
|
6
|
-
export declare class CallAutomationEventProcessor {
|
|
7
|
-
private readonly defaultTimeout;
|
|
8
|
-
private readonly defaultEventBacklogTimeout;
|
|
9
|
-
private readonly emitter;
|
|
10
|
-
private readonly eventsBacklog;
|
|
11
|
-
private readonly ongoingEvents;
|
|
12
|
-
/**
|
|
13
|
-
* Process incoming events. Pass incoming events to get it processed to have other method like WaitForEventProcessor to function.
|
|
14
|
-
* @param event - Incoming CloudEvent object.
|
|
15
|
-
*/
|
|
16
|
-
processEvents(event: string | Record<string, unknown> | CallAutomationEvent): void;
|
|
17
|
-
/**
|
|
18
|
-
* Wait for matching incoming event. This is blocking Call. Returns the CallAutomationEvent once it arrives in ProcessEvent method.
|
|
19
|
-
* @param predicate - Conditional Predicate for waiting on event.
|
|
20
|
-
* @param abortSignal - Abort signal to abort the operation.
|
|
21
|
-
* @param timeoutInMs - maximum timeout in milliseconds for the operation.
|
|
22
|
-
*/
|
|
23
|
-
waitForEventProcessor(predicate: (event: CallAutomationEvent) => boolean, abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CallAutomationEvent>;
|
|
24
|
-
/**
|
|
25
|
-
* Attach Ongoing EventProcessor for specific event for a call.
|
|
26
|
-
* @param eventTypeKind - Matching event.
|
|
27
|
-
* @param callConnectionId - CallConnectionId of the call.
|
|
28
|
-
* @param eventProcessor - Method that will execute once the matching event arrives.
|
|
29
|
-
*/
|
|
30
|
-
attachOngoingEventProcessor(callConnectionId: string, eventTypeKind: CallAutomationEvent["kind"], eventProcessor: (event: CallAutomationEvent) => Promise<void>): Promise<void>;
|
|
31
|
-
/**
|
|
32
|
-
* Detach Ongoing EventProcessor for specific event.
|
|
33
|
-
* @param eventTypeKind - Matching event.
|
|
34
|
-
* @param callConnectionId - CallConnectionId of the call.
|
|
35
|
-
*/
|
|
36
|
-
detachOngoingEventProcessor(callConnectionId: string, eventTypeKind: CallAutomationEvent["kind"]): Promise<void>;
|
|
37
|
-
private generateIdTypeKey;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=callAutomationEventProcessor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callAutomationEventProcessor.d.ts","sourceRoot":"","sources":["../../../src/eventprocessor/callAutomationEventProcessor.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D;;GAEG;AACH,qBAAa,4BAA4B;IACvC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAQ;IACnD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsB;IAC9C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAkC;IAChE,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA+B;IAE7D;;;OAGG;IACI,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,mBAAmB,GAAG,IAAI;IAsCzF;;;;;OAKG;IACU,qBAAqB,CAChC,SAAS,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,EAClD,WAAW,CAAC,EAAE,eAAe,EAC7B,WAAW,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,mBAAmB,CAAC;IAmD/B;;;;;OAKG;IACU,2BAA2B,CACtC,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,mBAAmB,CAAC,MAAM,CAAC,EAC1C,cAAc,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,OAAO,CAAC,IAAI,CAAC,GAC5D,OAAO,CAAC,IAAI,CAAC;IAchB;;;;OAIG;IACU,2BAA2B,CACtC,gBAAgB,EAAE,MAAM,EACxB,aAAa,EAAE,mBAAmB,CAAC,MAAM,CAAC,GACzC,OAAO,CAAC,IAAI,CAAC;IAWhB,OAAO,CAAC,iBAAiB;CAG1B"}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Microsoft Corporation.
|
|
2
|
-
// Licensed under the MIT License.
|
|
3
|
-
import { EventEmitter } from "events";
|
|
4
|
-
import { parseCallAutomationEvent } from "../callAutomationEventParser.js";
|
|
5
|
-
/**
|
|
6
|
-
* Call Automation's EventProcessor for incoming events for ease of use.
|
|
7
|
-
*/
|
|
8
|
-
export class CallAutomationEventProcessor {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.defaultTimeout = 240000; // 240 seconds in milliseconds
|
|
11
|
-
this.defaultEventBacklogTimeout = 5000; // 5 seconds in milliseconds
|
|
12
|
-
this.emitter = new EventEmitter();
|
|
13
|
-
this.eventsBacklog = [];
|
|
14
|
-
this.ongoingEvents = new Map();
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Process incoming events. Pass incoming events to get it processed to have other method like WaitForEventProcessor to function.
|
|
18
|
-
* @param event - Incoming CloudEvent object.
|
|
19
|
-
*/
|
|
20
|
-
processEvents(event) {
|
|
21
|
-
if (event) {
|
|
22
|
-
let callAutomationEvent;
|
|
23
|
-
// parse the event if not parsed already
|
|
24
|
-
if (typeof event === "string" || Array.isArray(event)) {
|
|
25
|
-
callAutomationEvent = parseCallAutomationEvent(event || event);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
callAutomationEvent = event;
|
|
29
|
-
}
|
|
30
|
-
// add to eventbacklog
|
|
31
|
-
this.eventsBacklog.push(callAutomationEvent);
|
|
32
|
-
setTimeout(() => {
|
|
33
|
-
const index = this.eventsBacklog.indexOf(callAutomationEvent);
|
|
34
|
-
if (index !== -1) {
|
|
35
|
-
this.eventsBacklog.splice(index, 1);
|
|
36
|
-
}
|
|
37
|
-
}, this.defaultEventBacklogTimeout);
|
|
38
|
-
// parse event if needed
|
|
39
|
-
this.emitter.emit("event", callAutomationEvent);
|
|
40
|
-
// check if event is disconnect, remove all related items in memory
|
|
41
|
-
if (callAutomationEvent.kind === "CallDisconnected") {
|
|
42
|
-
// remove from ongoingevent list
|
|
43
|
-
for (const [key, evProcessor] of this.ongoingEvents.entries()) {
|
|
44
|
-
if (key.includes(callAutomationEvent.callConnectionId)) {
|
|
45
|
-
// Deregister the event listener
|
|
46
|
-
this.ongoingEvents.delete(key);
|
|
47
|
-
this.emitter.off("event", evProcessor);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Wait for matching incoming event. This is blocking Call. Returns the CallAutomationEvent once it arrives in ProcessEvent method.
|
|
55
|
-
* @param predicate - Conditional Predicate for waiting on event.
|
|
56
|
-
* @param abortSignal - Abort signal to abort the operation.
|
|
57
|
-
* @param timeoutInMs - maximum timeout in milliseconds for the operation.
|
|
58
|
-
*/
|
|
59
|
-
async waitForEventProcessor(predicate, abortSignal, timeoutInMs) {
|
|
60
|
-
const controller = new AbortController();
|
|
61
|
-
if (!timeoutInMs) {
|
|
62
|
-
timeoutInMs = this.defaultTimeout;
|
|
63
|
-
}
|
|
64
|
-
const filteredEvents = this.eventsBacklog.filter((event) => predicate(event));
|
|
65
|
-
if (filteredEvents.length > 0) {
|
|
66
|
-
// item found - delete from the list and return the event
|
|
67
|
-
this.eventsBacklog.splice(0, this.eventsBacklog.length, ...filteredEvents);
|
|
68
|
-
return filteredEvents[0];
|
|
69
|
-
}
|
|
70
|
-
// await for this event to comeback
|
|
71
|
-
let eventAwaiter;
|
|
72
|
-
const eventPromise = new Promise((resolve, reject) => {
|
|
73
|
-
// set abort signal
|
|
74
|
-
if (abortSignal) {
|
|
75
|
-
// If an external abortSignal is provided, link it with the controller.
|
|
76
|
-
abortSignal.addEventListener("abort", () => {
|
|
77
|
-
controller.abort();
|
|
78
|
-
this.emitter.off("event", eventAwaiter);
|
|
79
|
-
reject(new Error("Abort: Operation was aborted."));
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
// set timeout for this event
|
|
83
|
-
const timer = setTimeout(() => {
|
|
84
|
-
this.emitter.off("event", eventAwaiter);
|
|
85
|
-
reject(new Error("Timeout: Matching event did not arrive within timeout."));
|
|
86
|
-
}, timeoutInMs);
|
|
87
|
-
eventAwaiter = (event) => {
|
|
88
|
-
if (predicate(event)) {
|
|
89
|
-
// Deregister timer and the event listener
|
|
90
|
-
clearTimeout(timer);
|
|
91
|
-
this.emitter.off("event", eventAwaiter);
|
|
92
|
-
// Resolve with the matching event
|
|
93
|
-
resolve(event);
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
// Register the event awaiter
|
|
97
|
-
this.emitter.on("event", eventAwaiter);
|
|
98
|
-
});
|
|
99
|
-
return eventPromise;
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Attach Ongoing EventProcessor for specific event for a call.
|
|
103
|
-
* @param eventTypeKind - Matching event.
|
|
104
|
-
* @param callConnectionId - CallConnectionId of the call.
|
|
105
|
-
* @param eventProcessor - Method that will execute once the matching event arrives.
|
|
106
|
-
*/
|
|
107
|
-
async attachOngoingEventProcessor(callConnectionId, eventTypeKind, eventProcessor) {
|
|
108
|
-
const eventAwaiter = (event) => {
|
|
109
|
-
if (event.callConnectionId === callConnectionId && event.kind === eventTypeKind) {
|
|
110
|
-
eventProcessor(event);
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
// Register the event awaiter
|
|
114
|
-
this.emitter.on("event", eventAwaiter);
|
|
115
|
-
// attach the ongoing event processor to the map
|
|
116
|
-
const uniqueId = this.generateIdTypeKey(callConnectionId, eventTypeKind);
|
|
117
|
-
this.ongoingEvents.set(uniqueId, eventAwaiter);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Detach Ongoing EventProcessor for specific event.
|
|
121
|
-
* @param eventTypeKind - Matching event.
|
|
122
|
-
* @param callConnectionId - CallConnectionId of the call.
|
|
123
|
-
*/
|
|
124
|
-
async detachOngoingEventProcessor(callConnectionId, eventTypeKind) {
|
|
125
|
-
const uniqueId = this.generateIdTypeKey(callConnectionId, eventTypeKind);
|
|
126
|
-
const value = this.ongoingEvents.get(uniqueId);
|
|
127
|
-
if (value) {
|
|
128
|
-
// Deregister the event listener
|
|
129
|
-
this.ongoingEvents.delete(uniqueId);
|
|
130
|
-
this.emitter.off("event", value);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
generateIdTypeKey(callConnectionId, eventType) {
|
|
134
|
-
return `${callConnectionId}:${eventType}`;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
//# sourceMappingURL=callAutomationEventProcessor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"callAutomationEventProcessor.js","sourceRoot":"","sources":["../../../src/eventprocessor/callAutomationEventProcessor.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { EventEmitter } from \"events\";\nimport type { CallAutomationEvent } from \"../models/events.js\";\nimport { parseCallAutomationEvent } from \"../callAutomationEventParser.js\";\nimport type { AbortSignalLike } from \"@azure/abort-controller\";\n\n/**\n * Call Automation's EventProcessor for incoming events for ease of use.\n */\nexport class CallAutomationEventProcessor {\n private readonly defaultTimeout = 240000; // 240 seconds in milliseconds\n private readonly defaultEventBacklogTimeout = 5000; // 5 seconds in milliseconds\n private readonly emitter = new EventEmitter();\n private readonly eventsBacklog: Array<CallAutomationEvent> = [];\n private readonly ongoingEvents: Map<string, any> = new Map();\n\n /**\n * Process incoming events. Pass incoming events to get it processed to have other method like WaitForEventProcessor to function.\n * @param event - Incoming CloudEvent object.\n */\n public processEvents(event: string | Record<string, unknown> | CallAutomationEvent): void {\n if (event) {\n let callAutomationEvent: CallAutomationEvent;\n // parse the event if not parsed already\n if (typeof event === \"string\" || Array.isArray(event)) {\n callAutomationEvent = parseCallAutomationEvent(\n (event as string) || (event as Record<string, unknown>),\n );\n } else {\n callAutomationEvent = event as CallAutomationEvent;\n }\n\n // add to eventbacklog\n this.eventsBacklog.push(callAutomationEvent);\n setTimeout(() => {\n const index = this.eventsBacklog.indexOf(callAutomationEvent);\n if (index !== -1) {\n this.eventsBacklog.splice(index, 1);\n }\n }, this.defaultEventBacklogTimeout);\n\n // parse event if needed\n this.emitter.emit(\"event\", callAutomationEvent);\n\n // check if event is disconnect, remove all related items in memory\n if (callAutomationEvent.kind === \"CallDisconnected\") {\n // remove from ongoingevent list\n for (const [key, evProcessor] of this.ongoingEvents.entries()) {\n if (key.includes(callAutomationEvent.callConnectionId)) {\n // Deregister the event listener\n this.ongoingEvents.delete(key);\n this.emitter.off(\"event\", evProcessor);\n }\n }\n }\n }\n }\n\n /**\n * Wait for matching incoming event. This is blocking Call. Returns the CallAutomationEvent once it arrives in ProcessEvent method.\n * @param predicate - Conditional Predicate for waiting on event.\n * @param abortSignal - Abort signal to abort the operation.\n * @param timeoutInMs - maximum timeout in milliseconds for the operation.\n */\n public async waitForEventProcessor(\n predicate: (event: CallAutomationEvent) => boolean,\n abortSignal?: AbortSignalLike,\n timeoutInMs?: number,\n ): Promise<CallAutomationEvent> {\n const controller = new AbortController();\n if (!timeoutInMs) {\n timeoutInMs = this.defaultTimeout;\n }\n\n const filteredEvents = this.eventsBacklog.filter((event) => predicate(event));\n if (filteredEvents.length > 0) {\n // item found - delete from the list and return the event\n this.eventsBacklog.splice(0, this.eventsBacklog.length, ...filteredEvents);\n return filteredEvents[0];\n }\n\n // await for this event to comeback\n let eventAwaiter: (event: CallAutomationEvent) => void;\n\n const eventPromise = new Promise<CallAutomationEvent>((resolve, reject) => {\n // set abort signal\n if (abortSignal) {\n // If an external abortSignal is provided, link it with the controller.\n abortSignal.addEventListener(\"abort\", () => {\n controller.abort();\n this.emitter.off(\"event\", eventAwaiter);\n reject(new Error(\"Abort: Operation was aborted.\"));\n });\n }\n\n // set timeout for this event\n const timer = setTimeout(() => {\n this.emitter.off(\"event\", eventAwaiter);\n reject(new Error(\"Timeout: Matching event did not arrive within timeout.\"));\n }, timeoutInMs);\n\n eventAwaiter = (event: CallAutomationEvent) => {\n if (predicate(event)) {\n // Deregister timer and the event listener\n clearTimeout(timer);\n this.emitter.off(\"event\", eventAwaiter);\n\n // Resolve with the matching event\n resolve(event);\n }\n };\n\n // Register the event awaiter\n this.emitter.on(\"event\", eventAwaiter);\n });\n\n return eventPromise;\n }\n\n /**\n * Attach Ongoing EventProcessor for specific event for a call.\n * @param eventTypeKind - Matching event.\n * @param callConnectionId - CallConnectionId of the call.\n * @param eventProcessor - Method that will execute once the matching event arrives.\n */\n public async attachOngoingEventProcessor(\n callConnectionId: string,\n eventTypeKind: CallAutomationEvent[\"kind\"],\n eventProcessor: (event: CallAutomationEvent) => Promise<void>,\n ): Promise<void> {\n const eventAwaiter = (event: CallAutomationEvent): void => {\n if (event.callConnectionId === callConnectionId && event.kind === eventTypeKind) {\n eventProcessor(event);\n }\n };\n // Register the event awaiter\n this.emitter.on(\"event\", eventAwaiter);\n\n // attach the ongoing event processor to the map\n const uniqueId = this.generateIdTypeKey(callConnectionId, eventTypeKind);\n this.ongoingEvents.set(uniqueId, eventAwaiter);\n }\n\n /**\n * Detach Ongoing EventProcessor for specific event.\n * @param eventTypeKind - Matching event.\n * @param callConnectionId - CallConnectionId of the call.\n */\n public async detachOngoingEventProcessor(\n callConnectionId: string,\n eventTypeKind: CallAutomationEvent[\"kind\"],\n ): Promise<void> {\n const uniqueId = this.generateIdTypeKey(callConnectionId, eventTypeKind);\n const value = this.ongoingEvents.get(uniqueId);\n\n if (value) {\n // Deregister the event listener\n this.ongoingEvents.delete(uniqueId);\n this.emitter.off(\"event\", value);\n }\n }\n\n private generateIdTypeKey(callConnectionId: string, eventType: string): string {\n return `${callConnectionId}:${eventType}`;\n }\n}\n"]}
|