@azure/communication-call-automation 1.5.0-alpha.20250519.1 → 1.5.0-beta.2
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 +3 -4
- 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 +2 -3
- 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 +3 -4
- 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 +3 -4
- 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,41 +1,25 @@
|
|
|
1
1
|
import type { CallConnection } from "../callConnection.js";
|
|
2
2
|
import type { CallConnectionProperties, CallParticipant } from "./models.js";
|
|
3
|
-
import
|
|
4
|
-
import type { AddParticipantEventResult, AnswerCallEventResult, CancelAllMediaOperationsEventResult, CreateCallEventResult, PlayEventResult, RemoveParticipantEventResult, SendDtmfEventResult, StartRecognizingEventResult, TransferCallToParticipantEventResult, CancelAddParticipantEventResult, ConnectCallEventResult } from "../eventprocessor/eventResponses.js";
|
|
5
|
-
import type { AbortSignalLike } from "@azure/abort-controller";
|
|
3
|
+
import { RecordingState, RecordingKind } from "../generated/src/index.js";
|
|
6
4
|
/**
|
|
7
|
-
*
|
|
5
|
+
* The interface used as parent of [action]CallResult
|
|
8
6
|
*/
|
|
9
|
-
export interface
|
|
10
|
-
/** The callConnectionProperties */
|
|
7
|
+
export interface CallResult {
|
|
11
8
|
callConnectionProperties: CallConnectionProperties;
|
|
12
|
-
/** The callConnection */
|
|
13
9
|
callConnection: CallConnection;
|
|
14
|
-
/** Waiting for event processor to process the event */
|
|
15
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CreateCallEventResult>;
|
|
16
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* CreateCall result
|
|
13
|
+
*/
|
|
14
|
+
export type CreateCallResult = CallResult;
|
|
17
15
|
/**
|
|
18
16
|
* AnswerCall result
|
|
19
17
|
*/
|
|
20
|
-
export
|
|
21
|
-
/** The callConnectionProperties */
|
|
22
|
-
callConnectionProperties: CallConnectionProperties;
|
|
23
|
-
/** The callConnection */
|
|
24
|
-
callConnection: CallConnection;
|
|
25
|
-
/** Waiting for event processor to process the event */
|
|
26
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<AnswerCallEventResult>;
|
|
27
|
-
}
|
|
18
|
+
export type AnswerCallResult = CallResult;
|
|
28
19
|
/**
|
|
29
20
|
* ConnectCall result
|
|
30
21
|
*/
|
|
31
|
-
export
|
|
32
|
-
/** The callConnectionProperties */
|
|
33
|
-
callConnectionProperties: CallConnectionProperties;
|
|
34
|
-
/** The callConnection */
|
|
35
|
-
callConnection: CallConnection;
|
|
36
|
-
/** Waiting for event processor to process the event */
|
|
37
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<ConnectCallEventResult>;
|
|
38
|
-
}
|
|
22
|
+
export type ConnectCallResult = CallResult;
|
|
39
23
|
/** The response payload for getting participants of the call. */
|
|
40
24
|
export interface ListParticipantsResult {
|
|
41
25
|
/** List of the current participants in the call. */
|
|
@@ -51,22 +35,16 @@ export interface AddParticipantResult {
|
|
|
51
35
|
participant?: CallParticipant;
|
|
52
36
|
/** The operation context provided by client. */
|
|
53
37
|
operationContext?: string;
|
|
54
|
-
/** Waiting for event processor to process the event */
|
|
55
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<AddParticipantEventResult>;
|
|
56
38
|
}
|
|
57
39
|
/** The response payload for transferring the call. */
|
|
58
40
|
export interface TransferCallResult {
|
|
59
41
|
/** The operation context provided by client. */
|
|
60
42
|
operationContext?: string;
|
|
61
|
-
/** Waiting for event processor to process the event */
|
|
62
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<TransferCallToParticipantEventResult>;
|
|
63
43
|
}
|
|
64
44
|
/** The response payload for removing participants from the call. */
|
|
65
45
|
export interface RemoveParticipantResult {
|
|
66
46
|
/** The operation context provided by client. */
|
|
67
47
|
operationContext?: string;
|
|
68
|
-
/** Waiting for event processor to process the event */
|
|
69
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<RemoveParticipantEventResult>;
|
|
70
48
|
}
|
|
71
49
|
/** The response payload for muting participant from the call. */
|
|
72
50
|
export interface MuteParticipantResult {
|
|
@@ -76,30 +54,13 @@ export interface MuteParticipantResult {
|
|
|
76
54
|
/** The response payload for starting a call recording or getting call recording state. */
|
|
77
55
|
export interface RecordingStateResult {
|
|
78
56
|
recordingId: string;
|
|
79
|
-
recordingKind:
|
|
57
|
+
recordingKind: RecordingKind;
|
|
80
58
|
recordingState: RecordingState;
|
|
81
59
|
}
|
|
82
|
-
/** The response payload for starting a call recording or getting call recording state. */
|
|
83
|
-
export interface CancelAllMediaOperationsResult {
|
|
84
|
-
/** Waiting for event processor to process the event */
|
|
85
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CancelAllMediaOperationsEventResult>;
|
|
86
|
-
}
|
|
87
|
-
/** The response from play. */
|
|
88
|
-
export interface PlayResult {
|
|
89
|
-
/** Waiting for event processor to process the event */
|
|
90
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<PlayEventResult>;
|
|
91
|
-
}
|
|
92
60
|
/** The response payload for sending DTMF tones. */
|
|
93
61
|
export interface SendDtmfTonesResult {
|
|
94
62
|
/** The operation context provided by client. */
|
|
95
63
|
operationContext?: string;
|
|
96
|
-
/** Waiting for event processor to process the event */
|
|
97
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<SendDtmfEventResult>;
|
|
98
|
-
}
|
|
99
|
-
/** The response from recognizing. */
|
|
100
|
-
export interface StartRecognizingResult {
|
|
101
|
-
/** Waiting for event processor to process the event */
|
|
102
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<StartRecognizingEventResult>;
|
|
103
64
|
}
|
|
104
65
|
/** The response payload for cancelling add participant request. */
|
|
105
66
|
export interface CancelAddParticipantOperationResult {
|
|
@@ -107,7 +68,5 @@ export interface CancelAddParticipantOperationResult {
|
|
|
107
68
|
invitationId?: string;
|
|
108
69
|
/** The operation context provided by client. */
|
|
109
70
|
operationContext?: string;
|
|
110
|
-
/** Waiting for event processor to process the event */
|
|
111
|
-
waitForEventProcessor(abortSignal?: AbortSignalLike, timeoutInMs?: number): Promise<CancelAddParticipantEventResult>;
|
|
112
71
|
}
|
|
113
72
|
//# sourceMappingURL=responses.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/models/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,
|
|
1
|
+
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/models/responses.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,UAAU;IAIzB,wBAAwB,EAAE,wBAAwB,CAAC;IAKnD,cAAc,EAAE,cAAc,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE3C,iEAAiE;AACjE,MAAM,WAAW,sBAAsB;IACrC,oDAAoD;IACpD,MAAM,CAAC,EAAE,eAAe,EAAE,CAAC;IAC3B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,gEAAgE;AAChE,MAAM,WAAW,oBAAoB;IACnC,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,sDAAsD;AACtD,MAAM,WAAW,kBAAkB;IACjC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,oEAAoE;AACpE,MAAM,WAAW,uBAAuB;IACtC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,iEAAiE;AACjE,MAAM,WAAW,qBAAqB;IACpC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,0FAA0F;AAC1F,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;CAChC;AAED,mDAAmD;AACnD,MAAM,WAAW,mBAAmB;IAClC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,mEAAmE;AACnE,MAAM,WAAW,mCAAmC;IAClD,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/models/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CallConnection } from \"../callConnection.js\";\nimport type { CallConnectionProperties, CallParticipant } from \"./models.js\";\nimport
|
|
1
|
+
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/models/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CallConnection } from \"../callConnection.js\";\nimport type { CallConnectionProperties, CallParticipant } from \"./models.js\";\nimport { RecordingState, RecordingKind } from \"../generated/src/index.js\";\n\n/**\n * The interface used as parent of [action]CallResult\n */\nexport interface CallResult {\n /*\n * The callConnectionProperties\n */\n callConnectionProperties: CallConnectionProperties;\n\n /*\n * The callConnection\n */\n callConnection: CallConnection;\n}\n\n/**\n * CreateCall result\n */\nexport type CreateCallResult = CallResult;\n\n/**\n * AnswerCall result\n */\nexport type AnswerCallResult = CallResult;\n\n/**\n * ConnectCall result\n */\nexport type ConnectCallResult = CallResult;\n\n/** The response payload for getting participants of the call. */\nexport interface ListParticipantsResult {\n /** List of the current participants in the call. */\n values?: CallParticipant[];\n /** Continue of the list of participants */\n nextLink?: string;\n}\n\n/** The response payload for adding participants to the call. */\nexport interface AddParticipantResult {\n /** invitation ID used to add the participant. */\n invitationId?: string;\n /** List of current participants in the call. */\n participant?: CallParticipant;\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for transferring the call. */\nexport interface TransferCallResult {\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for removing participants from the call. */\nexport interface RemoveParticipantResult {\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for muting participant from the call. */\nexport interface MuteParticipantResult {\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for starting a call recording or getting call recording state. */\nexport interface RecordingStateResult {\n recordingId: string;\n recordingKind: RecordingKind;\n recordingState: RecordingState;\n}\n\n/** The response payload for sending DTMF tones. */\nexport interface SendDtmfTonesResult {\n /** The operation context provided by client. */\n operationContext?: string;\n}\n\n/** The response payload for cancelling add participant request. */\nexport interface CancelAddParticipantOperationResult {\n /** the invitation ID used to cancel the add participant request. */\n invitationId?: string;\n /** The operation context provided by client. */\n operationContext?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converters.d.ts","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,qBAAqB,EACrB,2BAA2B,EAE3B,+BAA+B,EAC/B,uBAAuB,EAGvB,2BAA2B,
|
|
1
|
+
{"version":3,"file":"converters.d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SAAS,GACvD,2BAA2B,GAAG,SAAS,CAMzC"}
|
|
@@ -26,6 +26,9 @@ function extractKind(identifierModel) {
|
|
|
26
26
|
if (identifierModel.microsoftTeamsApp !== undefined) {
|
|
27
27
|
return index_js_1.KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp;
|
|
28
28
|
}
|
|
29
|
+
if (identifierModel.teamsExtensionUser !== undefined) {
|
|
30
|
+
return index_js_1.KnownCommunicationIdentifierModelKind.TeamsExtensionUser;
|
|
31
|
+
}
|
|
29
32
|
return index_js_1.KnownCommunicationIdentifierModelKind.Unknown;
|
|
30
33
|
}
|
|
31
34
|
/** Convert PhoneNumberIdentifier to PhoneNumberIdentifierModel(Internal usage class) */
|
|
@@ -85,6 +88,17 @@ function communicationIdentifierConverter(identifierModel) {
|
|
|
85
88
|
};
|
|
86
89
|
return microsoftTeamsAppIdentifier;
|
|
87
90
|
}
|
|
91
|
+
if (kind === index_js_1.KnownCommunicationIdentifierModelKind.TeamsExtensionUser &&
|
|
92
|
+
identifierModel.teamsExtensionUser !== undefined) {
|
|
93
|
+
const teamsExtensionUserIdentifier = {
|
|
94
|
+
rawId: rawId,
|
|
95
|
+
userId: identifierModel.teamsExtensionUser.userId,
|
|
96
|
+
resourceId: identifierModel.teamsExtensionUser.resourceId,
|
|
97
|
+
tenantId: identifierModel.teamsExtensionUser.tenantId,
|
|
98
|
+
cloud: identifierModel.teamsExtensionUser.cloud,
|
|
99
|
+
};
|
|
100
|
+
return teamsExtensionUserIdentifier;
|
|
101
|
+
}
|
|
88
102
|
const unknownIdentifier = {
|
|
89
103
|
id: rawId ? rawId : "",
|
|
90
104
|
};
|
|
@@ -109,6 +123,10 @@ function communicationIdentifierModelConverter(identifier) {
|
|
|
109
123
|
const microsoftTeamsAppIdentifierModel = Object.assign({ kind: index_js_1.KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp }, serializedIdentifier);
|
|
110
124
|
return microsoftTeamsAppIdentifierModel;
|
|
111
125
|
}
|
|
126
|
+
if ((0, communication_common_1.isTeamsExtensionUserIdentifier)(identifier)) {
|
|
127
|
+
const teamsExtensionUserIdentifierModel = Object.assign({ kind: index_js_1.KnownCommunicationIdentifierModelKind.TeamsExtensionUser }, serializedIdentifier);
|
|
128
|
+
return teamsExtensionUserIdentifierModel;
|
|
129
|
+
}
|
|
112
130
|
if ((0, communication_common_1.isUnknownIdentifier)(identifier)) {
|
|
113
131
|
const unknownIdentifierModel = Object.assign({ kind: index_js_1.KnownCommunicationIdentifierModelKind.Unknown }, serializedIdentifier);
|
|
114
132
|
return unknownIdentifierModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmDlC,kFAUC;AAGD,wEAcC;AAGD,4EAyDC;AAGD,sFA8CC;AAGD,4DAUC;AAGD,8FAQC;AAGD,oFAQC;AAGD,8FAQC;AAGD,oFAQC;AAxOD,sEAOqC;AAUrC,wDAAkF;AAGlF,SAAS,WAAW,CAClB,eAA6C;IAE7C,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gDAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,gDAAqC,CAAC,WAAW,CAAC;IAC3D,CAAC;IACD,IAAI,eAAe,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO,gDAAqC,CAAC,kBAAkB,CAAC;IAClE,CAAC;IACD,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gDAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,OAAO,gDAAqC,CAAC,OAAO,CAAC;AACvD,CAAC;AAED,wFAAwF;AACxF,SAAgB,mCAAmC,CACjD,qBAAwD;IAExD,IAAI,qBAAqB,K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AC,UAAU,CAAC,EAAE,EAAE,CAAC;QAClC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC;AAChD,CAAC;AAED,qGAAqG;AACrG,SAAgB,yCAAyC,CACvD,UAAmD;IAEnD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;QAC1C,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,CAAC;AAC1C,CAAC;AAED,mGAAmG;AACnG,SAAgB,oCAAoC,CAClD,UAAwD;IAExD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACrC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PhoneNumberIdentifier,\n CommunicationUserIdentifier,\n UnknownIdentifier,\n SerializedPhoneNumberIdentifier,\n CommunicationIdentifier,\n SerializedCommunicationIdentifier,\n MicrosoftTeamsUserIdentifier,\n MicrosoftTeamsAppIdentifier,\n} from \"@azure/communication-common\";\nimport {\n serializeCommunicationIdentifier,\n isCommunicationUserIdentifier,\n isPhoneNumberIdentifier,\n isUnknownIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isMicrosoftTeamsAppIdentifier,\n} from \"@azure/communication-common\";\nimport type {\n CallParticipantInternal,\n CommunicationIdentifierModel,\n CommunicationIdentifierModelKind,\n KnownCommunicationCloudEnvironmentModel,\n PhoneNumberIdentifierModel,\n CommunicationUserIdentifierModel,\n MicrosoftTeamsAppIdentifierModel,\n} from \"../generated/src/index.js\";\nimport { KnownCommunicationIdentifierModelKind } from \"../generated/src/index.js\";\nimport type { CallParticipant } from \"../models/models.js\";\n\nfunction extractKind(\n identifierModel: CommunicationIdentifierModel,\n): CommunicationIdentifierModelKind {\n if (identifierModel.communicationUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.CommunicationUser;\n }\n if (identifierModel.phoneNumber !== undefined) {\n return KnownCommunicationIdentifierModelKind.PhoneNumber;\n }\n if (identifierModel.microsoftTeamsUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser;\n }\n if (identifierModel.microsoftTeamsApp !== undefined) {\n return KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp;\n }\n return KnownCommunicationIdentifierModelKind.Unknown;\n}\n\n/** Convert PhoneNumberIdentifier to PhoneNumberIdentifierModel(Internal usage class) */\nexport function PhoneNumberIdentifierModelConverter(\n phoneNumberIdentifier: PhoneNumberIdentifier | undefined,\n): PhoneNumberIdentifierModel | undefined {\n if (phoneNumberIdentifier === undefined || phoneNumberIdentifier.phoneNumber === undefined) {\n return undefined;\n }\n\n const phoneNumberIdentifierModel =\n serializeCommunicationIdentifier(phoneNumberIdentifier).phoneNumber;\n return phoneNumberIdentifierModel;\n}\n\n/** Convert SerializedPhoneNumberIdentifier to PhoneNumberIdentifier(Public usage class) */\nexport function phoneNumberIdentifierConverter(\n serializedPhoneNumberIdentifier: SerializedPhoneNumberIdentifier | undefined,\n): PhoneNumberIdentifier | undefined {\n if (\n serializedPhoneNumberIdentifier === undefined ||\n serializedPhoneNumberIdentifier?.value === null\n ) {\n return undefined;\n }\n\n const phoneNumberIdentifier: PhoneNumberIdentifier = {\n phoneNumber: serializedPhoneNumberIdentifier.value,\n };\n return phoneNumberIdentifier;\n}\n\n/** Convert CommunicationIdentifierModel to CommunicationIdentifier(Public usage class) */\nexport function communicationIdentifierConverter(\n identifierModel: CommunicationIdentifierModel,\n): CommunicationIdentifier {\n const rawId = identifierModel.rawId;\n const kind =\n identifierModel.kind !== undefined ? identifierModel.kind : extractKind(identifierModel);\n\n if (\n kind === KnownCommunicationIdentifierModelKind.CommunicationUser &&\n identifierModel.communicationUser !== undefined\n ) {\n const communicationUserIdentifier: CommunicationUserIdentifier = {\n communicationUserId: identifierModel.communicationUser.id,\n };\n return communicationUserIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.PhoneNumber &&\n identifierModel.phoneNumber !== undefined\n ) {\n const phoneNumberIdentifier: PhoneNumberIdentifier = {\n phoneNumber: identifierModel.phoneNumber.value,\n rawId: rawId,\n };\n return phoneNumberIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser &&\n identifierModel.microsoftTeamsUser !== undefined\n ) {\n const microsoftTeamsUserIdentifier: MicrosoftTeamsUserIdentifier = {\n rawId: rawId,\n microsoftTeamsUserId: identifierModel.microsoftTeamsUser.userId,\n isAnonymous: identifierModel.microsoftTeamsUser.isAnonymous,\n cloud: identifierModel.microsoftTeamsUser.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return microsoftTeamsUserIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp &&\n identifierModel.microsoftTeamsApp !== undefined\n ) {\n const microsoftTeamsAppIdentifier: MicrosoftTeamsAppIdentifier = {\n rawId: rawId,\n teamsAppId: identifierModel.microsoftTeamsApp.appId,\n cloud: identifierModel.microsoftTeamsApp.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return microsoftTeamsAppIdentifier;\n }\n\n const unknownIdentifier: UnknownIdentifier = {\n id: rawId ? rawId : \"\",\n };\n return unknownIdentifier;\n}\n\n/** Convert CommunicationIdentifier to CommunicationIdentifierModel(Internal usage class) */\nexport function communicationIdentifierModelConverter(\n identifier: CommunicationIdentifier,\n): CommunicationIdentifierModel {\n const serializedIdentifier: SerializedCommunicationIdentifier =\n serializeCommunicationIdentifier(identifier);\n if (isCommunicationUserIdentifier(identifier)) {\n const communicationUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.CommunicationUser,\n ...serializedIdentifier,\n };\n return communicationUserIdentifierModel;\n }\n\n if (isPhoneNumberIdentifier(identifier)) {\n const phoneNumberIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.PhoneNumber,\n ...serializedIdentifier,\n };\n return phoneNumberIdentifierModel;\n }\n\n if (isMicrosoftTeamsUserIdentifier(identifier)) {\n const microsoftTeamsUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser,\n ...serializedIdentifier,\n };\n return microsoftTeamsUserIdentifierModel;\n }\n\n if (isMicrosoftTeamsAppIdentifier(identifier)) {\n const microsoftTeamsAppIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp,\n ...serializedIdentifier,\n };\n return microsoftTeamsAppIdentifierModel;\n }\n\n if (isUnknownIdentifier(identifier)) {\n const unknownIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.Unknown,\n ...serializedIdentifier,\n };\n return unknownIdentifierModel;\n }\n\n throw new Error();\n}\n\n/** Convert CallParticipantInternal to CallParticipant */\nexport function callParticipantConverter(\n acsCallParticipant: CallParticipantInternal,\n): CallParticipant {\n const callParticipant: CallParticipant = {\n ...acsCallParticipant,\n identifier: acsCallParticipant.identifier\n ? communicationIdentifierConverter(acsCallParticipant.identifier)\n : undefined,\n };\n return callParticipant;\n}\n\n/** Convert CommunicationUserIdentifier to CommunicationUserIdentifierModel (Internal usage class) */\nexport function communicationUserIdentifierModelConverter(\n identifier: CommunicationUserIdentifier | undefined,\n): CommunicationUserIdentifierModel | undefined {\n if (!identifier || !identifier.communicationUserId) {\n return undefined;\n }\n\n return { id: identifier.communicationUserId };\n}\n\n/** Convert CommunicationUserIdentifierModel to CommunicationUserIdentifier (Public usage class) */\nexport function communicationUserIdentifierConverter(\n identifier: CommunicationUserIdentifierModel | undefined,\n): CommunicationUserIdentifier | undefined {\n if (!identifier || !identifier.id) {\n return undefined;\n }\n\n return { communicationUserId: identifier.id };\n}\n\n/** Convert MicrosoftTeamsAppIdentifier to MicrosoftTeamsAppIdentifierModel (Internal usage class) */\nexport function microsoftTeamsAppIdentifierModelConverter(\n identifier: MicrosoftTeamsAppIdentifier | undefined,\n): MicrosoftTeamsAppIdentifierModel | undefined {\n if (!identifier || !identifier.teamsAppId) {\n return undefined;\n }\n\n return { appId: identifier.teamsAppId };\n}\n\n/** Convert MicrosoftTeamsAppIdentifierModel to MicrosoftTeamsAppIdentifier (Public usage class) */\nexport function microsoftTeamsAppIdentifierConverter(\n identifier: MicrosoftTeamsAppIdentifierModel | undefined,\n): MicrosoftTeamsAppIdentifier | undefined {\n if (!identifier || !identifier.appId) {\n return undefined;\n }\n\n return { teamsAppId: identifier.appId };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAwDlC,kFAUC;AAGD,wEAcC;AAGD,4EAsEC;AAGD,sFAoDC;AAGD,4DAUC;AAGD,8FAQC;AAGD,oFAQC;AAGD,8FAQC;AAGD,oFAQC;AA/PD,sEAQqC;AAUrC,wDAAkF;AAGlF,SAAS,WAAW,CAClB,eAA6C;IAE7C,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gDAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,gDAAqC,CAAC,WAAW,CAAC;IAC3D,CAAC;IACD,IAAI,eAAe,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO,gDAAqC,CAAC,kBAAkB,CAAC;IAClE,CAAC;IACD,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gDAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,kBAAkB,KAAK,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AAU,CAAC,KAAK,EAAE,CAAC;QACrC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC,KAAK,EAAE,CAAC;AAC1C,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PhoneNumberIdentifier,\n CommunicationUserIdentifier,\n UnknownIdentifier,\n SerializedPhoneNumberIdentifier,\n CommunicationIdentifier,\n SerializedCommunicationIdentifier,\n MicrosoftTeamsUserIdentifier,\n MicrosoftTeamsAppIdentifier,\n TeamsExtensionUserIdentifier,\n} from \"@azure/communication-common\";\nimport {\n serializeCommunicationIdentifier,\n isCommunicationUserIdentifier,\n isPhoneNumberIdentifier,\n isUnknownIdentifier,\n isMicrosoftTeamsUserIdentifier,\n isMicrosoftTeamsAppIdentifier,\n isTeamsExtensionUserIdentifier,\n} from \"@azure/communication-common\";\nimport type {\n CallParticipantInternal,\n CommunicationIdentifierModel,\n CommunicationIdentifierModelKind,\n KnownCommunicationCloudEnvironmentModel,\n PhoneNumberIdentifierModel,\n CommunicationUserIdentifierModel,\n MicrosoftTeamsAppIdentifierModel,\n} from \"../generated/src/index.js\";\nimport { KnownCommunicationIdentifierModelKind } from \"../generated/src/index.js\";\nimport type { CallParticipant } from \"../models/models.js\";\n\nfunction extractKind(\n identifierModel: CommunicationIdentifierModel,\n): CommunicationIdentifierModelKind {\n if (identifierModel.communicationUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.CommunicationUser;\n }\n if (identifierModel.phoneNumber !== undefined) {\n return KnownCommunicationIdentifierModelKind.PhoneNumber;\n }\n if (identifierModel.microsoftTeamsUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser;\n }\n if (identifierModel.microsoftTeamsApp !== undefined) {\n return KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp;\n }\n if (identifierModel.teamsExtensionUser !== undefined) {\n return KnownCommunicationIdentifierModelKind.TeamsExtensionUser;\n }\n return KnownCommunicationIdentifierModelKind.Unknown;\n}\n\n/** Convert PhoneNumberIdentifier to PhoneNumberIdentifierModel(Internal usage class) */\nexport function PhoneNumberIdentifierModelConverter(\n phoneNumberIdentifier: PhoneNumberIdentifier | undefined,\n): PhoneNumberIdentifierModel | undefined {\n if (phoneNumberIdentifier === undefined || phoneNumberIdentifier.phoneNumber === undefined) {\n return undefined;\n }\n\n const phoneNumberIdentifierModel =\n serializeCommunicationIdentifier(phoneNumberIdentifier).phoneNumber;\n return phoneNumberIdentifierModel;\n}\n\n/** Convert SerializedPhoneNumberIdentifier to PhoneNumberIdentifier(Public usage class) */\nexport function phoneNumberIdentifierConverter(\n serializedPhoneNumberIdentifier: SerializedPhoneNumberIdentifier | undefined,\n): PhoneNumberIdentifier | undefined {\n if (\n serializedPhoneNumberIdentifier === undefined ||\n serializedPhoneNumberIdentifier?.value === null\n ) {\n return undefined;\n }\n\n const phoneNumberIdentifier: PhoneNumberIdentifier = {\n phoneNumber: serializedPhoneNumberIdentifier.value,\n };\n return phoneNumberIdentifier;\n}\n\n/** Convert CommunicationIdentifierModel to CommunicationIdentifier(Public usage class) */\nexport function communicationIdentifierConverter(\n identifierModel: CommunicationIdentifierModel,\n): CommunicationIdentifier {\n const rawId = identifierModel.rawId;\n const kind =\n identifierModel.kind !== undefined ? identifierModel.kind : extractKind(identifierModel);\n\n if (\n kind === KnownCommunicationIdentifierModelKind.CommunicationUser &&\n identifierModel.communicationUser !== undefined\n ) {\n const communicationUserIdentifier: CommunicationUserIdentifier = {\n communicationUserId: identifierModel.communicationUser.id,\n };\n return communicationUserIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.PhoneNumber &&\n identifierModel.phoneNumber !== undefined\n ) {\n const phoneNumberIdentifier: PhoneNumberIdentifier = {\n phoneNumber: identifierModel.phoneNumber.value,\n rawId: rawId,\n };\n return phoneNumberIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser &&\n identifierModel.microsoftTeamsUser !== undefined\n ) {\n const microsoftTeamsUserIdentifier: MicrosoftTeamsUserIdentifier = {\n rawId: rawId,\n microsoftTeamsUserId: identifierModel.microsoftTeamsUser.userId,\n isAnonymous: identifierModel.microsoftTeamsUser.isAnonymous,\n cloud: identifierModel.microsoftTeamsUser.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return microsoftTeamsUserIdentifier;\n }\n\n if (\n kind === KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp &&\n identifierModel.microsoftTeamsApp !== undefined\n ) {\n const microsoftTeamsAppIdentifier: MicrosoftTeamsAppIdentifier = {\n rawId: rawId,\n teamsAppId: identifierModel.microsoftTeamsApp.appId,\n cloud: identifierModel.microsoftTeamsApp.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return microsoftTeamsAppIdentifier;\n }\n if (\n kind === KnownCommunicationIdentifierModelKind.TeamsExtensionUser &&\n identifierModel.teamsExtensionUser !== undefined\n ) {\n const teamsExtensionUserIdentifier: TeamsExtensionUserIdentifier = {\n rawId: rawId,\n userId: identifierModel.teamsExtensionUser.userId,\n resourceId: identifierModel.teamsExtensionUser.resourceId,\n tenantId: identifierModel.teamsExtensionUser.tenantId,\n cloud: identifierModel.teamsExtensionUser.cloud as KnownCommunicationCloudEnvironmentModel,\n };\n return teamsExtensionUserIdentifier;\n }\n\n const unknownIdentifier: UnknownIdentifier = {\n id: rawId ? rawId : \"\",\n };\n return unknownIdentifier;\n}\n\n/** Convert CommunicationIdentifier to CommunicationIdentifierModel(Internal usage class) */\nexport function communicationIdentifierModelConverter(\n identifier: CommunicationIdentifier,\n): CommunicationIdentifierModel {\n const serializedIdentifier: SerializedCommunicationIdentifier =\n serializeCommunicationIdentifier(identifier);\n if (isCommunicationUserIdentifier(identifier)) {\n const communicationUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.CommunicationUser,\n ...serializedIdentifier,\n };\n return communicationUserIdentifierModel;\n }\n\n if (isPhoneNumberIdentifier(identifier)) {\n const phoneNumberIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.PhoneNumber,\n ...serializedIdentifier,\n };\n return phoneNumberIdentifierModel;\n }\n\n if (isMicrosoftTeamsUserIdentifier(identifier)) {\n const microsoftTeamsUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsUser,\n ...serializedIdentifier,\n };\n return microsoftTeamsUserIdentifierModel;\n }\n\n if (isMicrosoftTeamsAppIdentifier(identifier)) {\n const microsoftTeamsAppIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp,\n ...serializedIdentifier,\n };\n return microsoftTeamsAppIdentifierModel;\n }\n if (isTeamsExtensionUserIdentifier(identifier)) {\n const teamsExtensionUserIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.TeamsExtensionUser,\n ...serializedIdentifier,\n };\n return teamsExtensionUserIdentifierModel;\n }\n if (isUnknownIdentifier(identifier)) {\n const unknownIdentifierModel: CommunicationIdentifierModel = {\n kind: KnownCommunicationIdentifierModelKind.Unknown,\n ...serializedIdentifier,\n };\n return unknownIdentifierModel;\n }\n\n throw new Error();\n}\n\n/** Convert CallParticipantInternal to CallParticipant */\nexport function callParticipantConverter(\n acsCallParticipant: CallParticipantInternal,\n): CallParticipant {\n const callParticipant: CallParticipant = {\n ...acsCallParticipant,\n identifier: acsCallParticipant.identifier\n ? communicationIdentifierConverter(acsCallParticipant.identifier)\n : undefined,\n };\n return callParticipant;\n}\n\n/** Convert CommunicationUserIdentifier to CommunicationUserIdentifierModel (Internal usage class) */\nexport function communicationUserIdentifierModelConverter(\n identifier: CommunicationUserIdentifier | undefined,\n): CommunicationUserIdentifierModel | undefined {\n if (!identifier || !identifier.communicationUserId) {\n return undefined;\n }\n\n return { id: identifier.communicationUserId };\n}\n\n/** Convert CommunicationUserIdentifierModel to CommunicationUserIdentifier (Public usage class) */\nexport function communicationUserIdentifierConverter(\n identifier: CommunicationUserIdentifierModel | undefined,\n): CommunicationUserIdentifier | undefined {\n if (!identifier || !identifier.id) {\n return undefined;\n }\n\n return { communicationUserId: identifier.id };\n}\n\n/** Convert MicrosoftTeamsAppIdentifier to MicrosoftTeamsAppIdentifierModel (Internal usage class) */\nexport function microsoftTeamsAppIdentifierModelConverter(\n identifier: MicrosoftTeamsAppIdentifier | undefined,\n): MicrosoftTeamsAppIdentifierModel | undefined {\n if (!identifier || !identifier.teamsAppId) {\n return undefined;\n }\n\n return { appId: identifier.teamsAppId };\n}\n\n/** Convert MicrosoftTeamsAppIdentifierModel to MicrosoftTeamsAppIdentifier (Public usage class) */\nexport function microsoftTeamsAppIdentifierConverter(\n identifier: MicrosoftTeamsAppIdentifierModel | undefined,\n): MicrosoftTeamsAppIdentifier | undefined {\n if (!identifier || !identifier.appId) {\n return undefined;\n }\n\n return { teamsAppId: identifier.appId };\n}\n"]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { KeyCredential, TokenCredential } from "@azure/core-auth";
|
|
2
2
|
import type { CommonClientOptions } from "@azure/core-client";
|
|
3
|
-
import
|
|
3
|
+
import { CommunicationIdentifier, CommunicationUserIdentifier } from "@azure/communication-common";
|
|
4
4
|
import { CallConnection } from "./callConnection.js";
|
|
5
5
|
import { CallRecording } from "./callRecording.js";
|
|
6
6
|
import type { AnswerCallOptions, ConnectCallOptions, CreateCallOptions, RedirectCallOptions, RejectCallOptions } from "./models/options.js";
|
|
7
7
|
import type { AnswerCallResult, ConnectCallResult, CreateCallResult } from "./models/responses.js";
|
|
8
|
-
import {
|
|
9
|
-
import { CallAutomationEventProcessor } from "./eventprocessor/callAutomationEventProcessor.js";
|
|
8
|
+
import type { CallInvite, CallLocator } from "./models/models.js";
|
|
10
9
|
/**
|
|
11
10
|
* Client options used to configure CallAutomation Client API requests.
|
|
12
11
|
*/
|
|
@@ -24,7 +23,6 @@ export declare class CallAutomationClient {
|
|
|
24
23
|
private readonly sourceIdentity?;
|
|
25
24
|
private readonly credential;
|
|
26
25
|
private readonly internalPipelineOptions;
|
|
27
|
-
private readonly callAutomationEventProcessor;
|
|
28
26
|
private readonly endpoint;
|
|
29
27
|
/**
|
|
30
28
|
* Initializes a new instance of the CallAutomationClient class.
|
|
@@ -53,10 +51,6 @@ export declare class CallAutomationClient {
|
|
|
53
51
|
* Get Source Identity that is used for create and answer call
|
|
54
52
|
*/
|
|
55
53
|
getSourceIdentity(): CommunicationUserIdentifier | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Get event processor to work with call automation events
|
|
58
|
-
*/
|
|
59
|
-
getEventProcessor(): CallAutomationEventProcessor;
|
|
60
54
|
private createCallInternal;
|
|
61
55
|
/**
|
|
62
56
|
* Create an outgoing call from source to a target identity.
|
|
@@ -94,7 +88,6 @@ export declare class CallAutomationClient {
|
|
|
94
88
|
* @param options - Additional request options contains rejectCall api options.
|
|
95
89
|
*/
|
|
96
90
|
rejectCall(incomingCallContext: string, options?: RejectCallOptions): Promise<void>;
|
|
97
|
-
private createCustomCallingContextInternal;
|
|
98
91
|
/**
|
|
99
92
|
* Create connection to room call.
|
|
100
93
|
* @param callLocator - Call locator to create connection.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callAutomationClient.d.ts","sourceRoot":"","sources":["../../src/callAutomationClient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,
|
|
1
|
+
{"version":3,"file":"callAutomationClient.d.ts","sourceRoot":"","sources":["../../src/callAutomationClient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE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iB,EAAE,UAAU,EAC7B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IAmB5B;;;;;OAKG;IACU,eAAe,CAC1B,kBAAkB,EAAE,uBAAuB,EAAE,EAC7C,WAAW,EAAE,MAAM,EAEnB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IAiB5B;;;;;OAKG;IACU,UAAU,CACrB,mBAAmB,EAAE,MAAM,EAC3B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,gBAAgB,CAAC;IA2D5B;;;;;;OAMG;IACU,YAAY,CACvB,mBAAmB,EAAE,MAAM,EAC3B,iBAAiB,EAAE,UAAU,EAC7B,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC;IAchB;;;;;OAKG;IACU,UAAU,CACrB,mBAAmB,EAAE,MAAM,EAC3B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC;IAchB;;;;;OAKG;IACU,WAAW,CACtB,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,iBAAiB,CAAC;CA+D9B"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { isTokenCredential } from "@azure/core-auth";
|
|
3
|
+
import { createCommunicationAuthPolicy, } from "@azure/communication-common";
|
|
3
4
|
import { parseClientArguments, isKeyCredential } from "@azure/communication-common";
|
|
4
5
|
import { logger } from "./models/logger.js";
|
|
6
|
+
import { CallAutomationApiClient, } from "./generated/src/index.js";
|
|
5
7
|
import { CallConnection } from "./callConnection.js";
|
|
6
8
|
import { CallRecording } from "./callRecording.js";
|
|
7
9
|
import { communicationIdentifierConverter, communicationIdentifierModelConverter, communicationUserIdentifierConverter, communicationUserIdentifierModelConverter, microsoftTeamsAppIdentifierModelConverter, phoneNumberIdentifierConverter, PhoneNumberIdentifierModelConverter, } from "./utli/converters.js";
|
|
8
10
|
import { randomUUID } from "@azure/core-util";
|
|
9
|
-
import { createCustomCallAutomationApiClient } from "./credential/callAutomationAuthPolicy.js";
|
|
10
|
-
import { CallAutomationEventProcessor } from "./eventprocessor/callAutomationEventProcessor.js";
|
|
11
11
|
/**
|
|
12
12
|
* Checks whether the type of a value is CallAutomationClientOptions or not.
|
|
13
13
|
*
|
|
@@ -32,11 +32,10 @@ export class CallAutomationClient {
|
|
|
32
32
|
});
|
|
33
33
|
const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);
|
|
34
34
|
this.endpoint = url;
|
|
35
|
+
const authPolicy = createCommunicationAuthPolicy(credential);
|
|
35
36
|
this.credential = credential;
|
|
36
|
-
|
|
37
|
-
this.
|
|
38
|
-
// create api client (using custom api endpoint if available)
|
|
39
|
-
this.callAutomationApiClient = createCustomCallAutomationApiClient(credential, this.internalPipelineOptions, this.endpoint);
|
|
37
|
+
this.callAutomationApiClient = new CallAutomationApiClient(url, this.internalPipelineOptions);
|
|
38
|
+
this.callAutomationApiClient.pipeline.addPolicy(authPolicy);
|
|
40
39
|
this.sourceIdentity = communicationUserIdentifierModelConverter(options.sourceIdentity);
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
@@ -44,7 +43,7 @@ export class CallAutomationClient {
|
|
|
44
43
|
* @param callConnectionId - The CallConnection id for the CallConnection instance. (ex: 421CONTOSO-cRD6-4RDc-a078-99dRANDOMf).
|
|
45
44
|
*/
|
|
46
45
|
getCallConnection(callConnectionId) {
|
|
47
|
-
return new CallConnection(callConnectionId, this.endpoint, this.credential, this.
|
|
46
|
+
return new CallConnection(callConnectionId, this.endpoint, this.credential, this.internalPipelineOptions);
|
|
48
47
|
}
|
|
49
48
|
/**
|
|
50
49
|
* Initializes a new instance of CallRecording.
|
|
@@ -58,12 +57,6 @@ export class CallAutomationClient {
|
|
|
58
57
|
getSourceIdentity() {
|
|
59
58
|
return communicationUserIdentifierConverter(this.sourceIdentity);
|
|
60
59
|
}
|
|
61
|
-
/**
|
|
62
|
-
* Get event processor to work with call automation events
|
|
63
|
-
*/
|
|
64
|
-
getEventProcessor() {
|
|
65
|
-
return this.callAutomationEventProcessor;
|
|
66
|
-
}
|
|
67
60
|
async createCallInternal(request, options) {
|
|
68
61
|
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: randomUUID() });
|
|
69
62
|
const _a = await this.callAutomationApiClient.createCall(request, optionsInternal), { callConnectionId, answeredBy, targets, sourceCallerIdNumber, source, answeredFor } = _a, result = __rest(_a, ["callConnectionId", "answeredBy", "targets", "sourceCallerIdNumber", "source", "answeredFor"]);
|
|
@@ -71,32 +64,10 @@ export class CallAutomationClient {
|
|
|
71
64
|
const callConnectionPropertiesDto = Object.assign(Object.assign({}, result), { callConnectionId: callConnectionId, source: source ? communicationIdentifierConverter(source) : undefined, answeredby: communicationUserIdentifierConverter(answeredBy), answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined, targetParticipants: targets === null || targets === void 0 ? void 0 : targets.map((returnedTarget) => communicationIdentifierConverter(returnedTarget)), sourceCallerIdNumber: sourceCallerIdNumber
|
|
72
65
|
? phoneNumberIdentifierConverter(sourceCallerIdNumber)
|
|
73
66
|
: undefined });
|
|
74
|
-
const callConnection = new CallConnection(callConnectionId, this.endpoint, this.credential, this.
|
|
67
|
+
const callConnection = new CallConnection(callConnectionId, this.endpoint, this.credential, this.internalPipelineOptions);
|
|
75
68
|
const createCallResult = {
|
|
76
69
|
callConnectionProperties: callConnectionPropertiesDto,
|
|
77
70
|
callConnection: callConnection,
|
|
78
|
-
waitForEventProcessor: async (abortSignal, timeoutInMs) => {
|
|
79
|
-
const createCallEventResult = {
|
|
80
|
-
isSuccess: false,
|
|
81
|
-
};
|
|
82
|
-
await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
|
|
83
|
-
if (event.callConnectionId === callConnectionId && event.kind === "CallConnected") {
|
|
84
|
-
createCallEventResult.isSuccess = true;
|
|
85
|
-
createCallEventResult.successResult = event;
|
|
86
|
-
return true;
|
|
87
|
-
}
|
|
88
|
-
else if (event.callConnectionId === callConnectionId &&
|
|
89
|
-
event.kind === "CreateCallFailed") {
|
|
90
|
-
createCallEventResult.isSuccess = false;
|
|
91
|
-
createCallEventResult.failureResult = event;
|
|
92
|
-
return true;
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
return false;
|
|
96
|
-
}
|
|
97
|
-
}, abortSignal, timeoutInMs);
|
|
98
|
-
return createCallEventResult;
|
|
99
|
-
},
|
|
100
71
|
};
|
|
101
72
|
return createCallResult;
|
|
102
73
|
}
|
|
@@ -118,7 +89,6 @@ export class CallAutomationClient {
|
|
|
118
89
|
callIntelligenceOptions: options.callIntelligenceOptions,
|
|
119
90
|
mediaStreamingOptions: options.mediaStreamingOptions,
|
|
120
91
|
transcriptionOptions: options.transcriptionOptions,
|
|
121
|
-
customCallingContext: this.createCustomCallingContextInternal(targetParticipant.customCallingContext),
|
|
122
92
|
sourceCallerIdNumber: PhoneNumberIdentifierModelConverter(targetParticipant.sourceCallIdNumber),
|
|
123
93
|
sourceDisplayName: targetParticipant.sourceDisplayName,
|
|
124
94
|
};
|
|
@@ -160,7 +130,6 @@ export class CallAutomationClient {
|
|
|
160
130
|
mediaStreamingOptions: mediaStreamingOptions,
|
|
161
131
|
transcriptionOptions: transcriptionOptions,
|
|
162
132
|
callIntelligenceOptions: callIntelligenceOptions,
|
|
163
|
-
customCallingContext: this.createCustomCallingContextInternal(options.customCallingContext),
|
|
164
133
|
operationContext: operationContext,
|
|
165
134
|
callbackUri: callbackUrl,
|
|
166
135
|
answeredBy: this.sourceIdentity,
|
|
@@ -171,31 +140,10 @@ export class CallAutomationClient {
|
|
|
171
140
|
const callConnectionProperties = Object.assign(Object.assign({}, result), { callConnectionId: callConnectionId, source: source ? communicationIdentifierConverter(source) : undefined, answeredby: communicationUserIdentifierConverter(answeredBy), answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined, targetParticipants: targets === null || targets === void 0 ? void 0 : targets.map((target) => communicationIdentifierConverter(target)), sourceCallerIdNumber: sourceCallerIdNumber
|
|
172
141
|
? phoneNumberIdentifierConverter(sourceCallerIdNumber)
|
|
173
142
|
: undefined });
|
|
174
|
-
const callConnection = new CallConnection(callConnectionId, this.endpoint, this.credential, this.
|
|
143
|
+
const callConnection = new CallConnection(callConnectionId, this.endpoint, this.credential, this.internalPipelineOptions);
|
|
175
144
|
const answerCallResult = {
|
|
176
145
|
callConnectionProperties: callConnectionProperties,
|
|
177
146
|
callConnection: callConnection,
|
|
178
|
-
waitForEventProcessor: async (abortSignal, timeoutInMs) => {
|
|
179
|
-
const answerCallEventResult = {
|
|
180
|
-
isSuccess: false,
|
|
181
|
-
};
|
|
182
|
-
await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
|
|
183
|
-
if (event.callConnectionId === callConnectionId && event.kind === "CallConnected") {
|
|
184
|
-
answerCallEventResult.isSuccess = true;
|
|
185
|
-
answerCallEventResult.successResult = event;
|
|
186
|
-
return true;
|
|
187
|
-
}
|
|
188
|
-
if (event.callConnectionId === callConnectionId && event.kind === "AnswerFailed") {
|
|
189
|
-
answerCallEventResult.isSuccess = false;
|
|
190
|
-
answerCallEventResult.failureResult = event;
|
|
191
|
-
return true;
|
|
192
|
-
}
|
|
193
|
-
else {
|
|
194
|
-
return false;
|
|
195
|
-
}
|
|
196
|
-
}, abortSignal, timeoutInMs);
|
|
197
|
-
return answerCallEventResult;
|
|
198
|
-
},
|
|
199
147
|
};
|
|
200
148
|
return answerCallResult;
|
|
201
149
|
}
|
|
@@ -212,7 +160,6 @@ export class CallAutomationClient {
|
|
|
212
160
|
const request = {
|
|
213
161
|
incomingCallContext: incomingCallContext,
|
|
214
162
|
target: communicationIdentifierModelConverter(targetParticipant.targetParticipant),
|
|
215
|
-
customCallingContext: this.createCustomCallingContextInternal(targetParticipant.customCallingContext),
|
|
216
163
|
};
|
|
217
164
|
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: randomUUID() });
|
|
218
165
|
return this.callAutomationApiClient.redirectCall(request, optionsInternal);
|
|
@@ -231,29 +178,6 @@ export class CallAutomationClient {
|
|
|
231
178
|
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: randomUUID() });
|
|
232
179
|
return this.callAutomationApiClient.rejectCall(request, optionsInternal);
|
|
233
180
|
}
|
|
234
|
-
createCustomCallingContextInternal(customCallingContext) {
|
|
235
|
-
const sipHeaders = {};
|
|
236
|
-
const voipHeaders = {};
|
|
237
|
-
if (customCallingContext) {
|
|
238
|
-
for (const header of customCallingContext) {
|
|
239
|
-
if (header.kind === "sipuui") {
|
|
240
|
-
sipHeaders[`User-To-User`] = header.value;
|
|
241
|
-
}
|
|
242
|
-
else if (header.kind === "sipx") {
|
|
243
|
-
if (header.sipHeaderPrefix === "X-") {
|
|
244
|
-
sipHeaders[`X-${header.key}`] = header.value;
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
sipHeaders[`X-MS-Custom-${header.key}`] = header.value;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
else if (header.kind === "voip") {
|
|
251
|
-
voipHeaders[`${header.key}`] = header.value;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
return { sipHeaders: sipHeaders, voipHeaders: voipHeaders };
|
|
256
|
-
}
|
|
257
181
|
/**
|
|
258
182
|
* Create connection to room call.
|
|
259
183
|
* @param callLocator - Call locator to create connection.
|
|
@@ -287,31 +211,10 @@ export class CallAutomationClient {
|
|
|
287
211
|
const callConnectionProperties = Object.assign(Object.assign({}, result), { callConnectionId: callConnectionId, source: source ? communicationIdentifierConverter(source) : undefined, answeredby: answeredBy ? communicationUserIdentifierConverter(answeredBy) : undefined, targetParticipants: targets === null || targets === void 0 ? void 0 : targets.map((target) => communicationIdentifierConverter(target)), answeredFor: answeredFor ? phoneNumberIdentifierConverter(answeredFor) : undefined, sourceCallerIdNumber: sourceCallerIdNumber
|
|
288
212
|
? phoneNumberIdentifierConverter(sourceCallerIdNumber)
|
|
289
213
|
: undefined });
|
|
290
|
-
const callConnection = new CallConnection(callConnectionId, this.callAutomationApiClient.endpoint, this.credential, this.
|
|
214
|
+
const callConnection = new CallConnection(callConnectionId, this.callAutomationApiClient.endpoint, this.credential, this.internalPipelineOptions);
|
|
291
215
|
const connectResult = {
|
|
292
216
|
callConnectionProperties: callConnectionProperties,
|
|
293
217
|
callConnection: callConnection,
|
|
294
|
-
waitForEventProcessor: async (abortSignal, timeoutInMs) => {
|
|
295
|
-
const connectCallEventResult = {
|
|
296
|
-
isSuccess: false,
|
|
297
|
-
};
|
|
298
|
-
await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
|
|
299
|
-
if (event.callConnectionId === callConnectionId && event.kind === "CallConnected") {
|
|
300
|
-
connectCallEventResult.isSuccess = true;
|
|
301
|
-
connectCallEventResult.successResult = event;
|
|
302
|
-
return true;
|
|
303
|
-
}
|
|
304
|
-
if (event.callConnectionId === callConnectionId && event.kind === "ConnectFailed") {
|
|
305
|
-
connectCallEventResult.isSuccess = false;
|
|
306
|
-
connectCallEventResult.failureResult = event;
|
|
307
|
-
return true;
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
return false;
|
|
311
|
-
}
|
|
312
|
-
}, abortSignal, timeoutInMs);
|
|
313
|
-
return connectCallEventResult;
|
|
314
|
-
},
|
|
315
218
|
};
|
|
316
219
|
return connectResult;
|
|
317
220
|
}
|