@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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
|
-
import { serializeCommunicationIdentifier, isCommunicationUserIdentifier, isPhoneNumberIdentifier, isUnknownIdentifier, isMicrosoftTeamsUserIdentifier, isMicrosoftTeamsAppIdentifier, } from "@azure/communication-common";
|
|
3
|
+
import { serializeCommunicationIdentifier, isCommunicationUserIdentifier, isPhoneNumberIdentifier, isUnknownIdentifier, isMicrosoftTeamsUserIdentifier, isMicrosoftTeamsAppIdentifier, isTeamsExtensionUserIdentifier, } from "@azure/communication-common";
|
|
4
4
|
import { KnownCommunicationIdentifierModelKind } from "../generated/src/index.js";
|
|
5
5
|
function extractKind(identifierModel) {
|
|
6
6
|
if (identifierModel.communicationUser !== undefined) {
|
|
@@ -15,6 +15,9 @@ function extractKind(identifierModel) {
|
|
|
15
15
|
if (identifierModel.microsoftTeamsApp !== undefined) {
|
|
16
16
|
return KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp;
|
|
17
17
|
}
|
|
18
|
+
if (identifierModel.teamsExtensionUser !== undefined) {
|
|
19
|
+
return KnownCommunicationIdentifierModelKind.TeamsExtensionUser;
|
|
20
|
+
}
|
|
18
21
|
return KnownCommunicationIdentifierModelKind.Unknown;
|
|
19
22
|
}
|
|
20
23
|
/** Convert PhoneNumberIdentifier to PhoneNumberIdentifierModel(Internal usage class) */
|
|
@@ -74,6 +77,17 @@ export function communicationIdentifierConverter(identifierModel) {
|
|
|
74
77
|
};
|
|
75
78
|
return microsoftTeamsAppIdentifier;
|
|
76
79
|
}
|
|
80
|
+
if (kind === KnownCommunicationIdentifierModelKind.TeamsExtensionUser &&
|
|
81
|
+
identifierModel.teamsExtensionUser !== undefined) {
|
|
82
|
+
const teamsExtensionUserIdentifier = {
|
|
83
|
+
rawId: rawId,
|
|
84
|
+
userId: identifierModel.teamsExtensionUser.userId,
|
|
85
|
+
resourceId: identifierModel.teamsExtensionUser.resourceId,
|
|
86
|
+
tenantId: identifierModel.teamsExtensionUser.tenantId,
|
|
87
|
+
cloud: identifierModel.teamsExtensionUser.cloud,
|
|
88
|
+
};
|
|
89
|
+
return teamsExtensionUserIdentifier;
|
|
90
|
+
}
|
|
77
91
|
const unknownIdentifier = {
|
|
78
92
|
id: rawId ? rawId : "",
|
|
79
93
|
};
|
|
@@ -98,6 +112,10 @@ export function communicationIdentifierModelConverter(identifier) {
|
|
|
98
112
|
const microsoftTeamsAppIdentifierModel = Object.assign({ kind: KnownCommunicationIdentifierModelKind.MicrosoftTeamsApp }, serializedIdentifier);
|
|
99
113
|
return microsoftTeamsAppIdentifierModel;
|
|
100
114
|
}
|
|
115
|
+
if (isTeamsExtensionUserIdentifier(identifier)) {
|
|
116
|
+
const teamsExtensionUserIdentifierModel = Object.assign({ kind: KnownCommunicationIdentifierModelKind.TeamsExtensionUser }, serializedIdentifier);
|
|
117
|
+
return teamsExtensionUserIdentifierModel;
|
|
118
|
+
}
|
|
101
119
|
if (isUnknownIdentifier(identifier)) {
|
|
102
120
|
const unknownIdentifierModel = Object.assign({ kind: KnownCommunicationIdentifierModelKind.Unknown }, serializedIdentifier);
|
|
103
121
|
return unknownIdentifierModel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAYlC,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EACnB,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC;AAUrC,OAAO,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAGlF,SAAS,WAAW,CAClB,eAA6C;IAE7C,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,qCAAqC,CAAC,iBAAiB,CA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AU;YACvC,CAAC,CAAC,gCAAgC,CAAC,kBAAkB,CAAC,UAAU,CAAC;YACjE,CAAC,CAAC,SAAS,GACd,CAAC;IACF,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,yCAAyC,CACvD,UAAmD;IAEnD,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC;QACnD,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,UAAU,CAAC,mBAAmB,EAAE,CAAC;AAChD,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,oCAAoC,CAClD,UAAwD;IAExD,IAAI,CAAC,UAAU,IAAI,CAAC,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,MAAM,UAAU,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,MAAM,UAAU,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;AAalC,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EACnB,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,GAC/B,MAAM,6BAA6B,CAAC;AAUrC,OAAO,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AA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IAExD,IAAI,CAAC,UAAU,IAAI,CAAC,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,MAAM,UAAU,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,MAAM,UAAU,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 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;AAE9D,OAAO,EACL,uBAAuB,EAEvB,2BAA2B,EAC5B,MAAM,6BAA6B,CAAC;AAYrC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACnG,OAAO,KAAK,EAA4B,UAAU,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAW5F;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE;;OAEG;IACH,cAAc,CAAC,EAAE,2BAA2B,CAAC;CAC9C;AAUD;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAA0B;IAClE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAmC;IACnE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAkC;IAC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AO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,iBAAiB,CAAC;CA+D9B"}
|
|
@@ -4,19 +4,19 @@ exports.CallAutomationClient = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const core_auth_1 = require("@azure/core-auth");
|
|
6
6
|
const communication_common_1 = require("@azure/communication-common");
|
|
7
|
+
const communication_common_2 = require("@azure/communication-common");
|
|
7
8
|
const logger_js_1 = require("./models/logger.js");
|
|
9
|
+
const index_js_1 = require("./generated/src/index.js");
|
|
8
10
|
const callConnection_js_1 = require("./callConnection.js");
|
|
9
11
|
const callRecording_js_1 = require("./callRecording.js");
|
|
10
12
|
const converters_js_1 = require("./utli/converters.js");
|
|
11
13
|
const core_util_1 = require("@azure/core-util");
|
|
12
|
-
const callAutomationAuthPolicy_js_1 = require("./credential/callAutomationAuthPolicy.js");
|
|
13
|
-
const callAutomationEventProcessor_js_1 = require("./eventprocessor/callAutomationEventProcessor.js");
|
|
14
14
|
/**
|
|
15
15
|
* Checks whether the type of a value is CallAutomationClientOptions or not.
|
|
16
16
|
*
|
|
17
17
|
* @param options - The value being checked.
|
|
18
18
|
*/
|
|
19
|
-
const isCallAutomationClientOptions = (options) => !!options && !(0, core_auth_1.isTokenCredential)(options) && !(0,
|
|
19
|
+
const isCallAutomationClientOptions = (options) => !!options && !(0, core_auth_1.isTokenCredential)(options) && !(0, communication_common_2.isKeyCredential)(options);
|
|
20
20
|
/**
|
|
21
21
|
* A CallAutomationClient represents a Client to the Azure Communication CallAutomation service.
|
|
22
22
|
*/
|
|
@@ -33,13 +33,12 @@ class CallAutomationClient {
|
|
|
33
33
|
logger: logger_js_1.logger.info,
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
|
-
const { url, credential } = (0,
|
|
36
|
+
const { url, credential } = (0, communication_common_2.parseClientArguments)(connectionStringOrUrl, credentialOrOptions);
|
|
37
37
|
this.endpoint = url;
|
|
38
|
+
const authPolicy = (0, communication_common_1.createCommunicationAuthPolicy)(credential);
|
|
38
39
|
this.credential = credential;
|
|
39
|
-
|
|
40
|
-
this.
|
|
41
|
-
// create api client (using custom api endpoint if available)
|
|
42
|
-
this.callAutomationApiClient = (0, callAutomationAuthPolicy_js_1.createCustomCallAutomationApiClient)(credential, this.internalPipelineOptions, this.endpoint);
|
|
40
|
+
this.callAutomationApiClient = new index_js_1.CallAutomationApiClient(url, this.internalPipelineOptions);
|
|
41
|
+
this.callAutomationApiClient.pipeline.addPolicy(authPolicy);
|
|
43
42
|
this.sourceIdentity = (0, converters_js_1.communicationUserIdentifierModelConverter)(options.sourceIdentity);
|
|
44
43
|
}
|
|
45
44
|
/**
|
|
@@ -47,7 +46,7 @@ class CallAutomationClient {
|
|
|
47
46
|
* @param callConnectionId - The CallConnection id for the CallConnection instance. (ex: 421CONTOSO-cRD6-4RDc-a078-99dRANDOMf).
|
|
48
47
|
*/
|
|
49
48
|
getCallConnection(callConnectionId) {
|
|
50
|
-
return new callConnection_js_1.CallConnection(callConnectionId, this.endpoint, this.credential, this.
|
|
49
|
+
return new callConnection_js_1.CallConnection(callConnectionId, this.endpoint, this.credential, this.internalPipelineOptions);
|
|
51
50
|
}
|
|
52
51
|
/**
|
|
53
52
|
* Initializes a new instance of CallRecording.
|
|
@@ -61,12 +60,6 @@ class CallAutomationClient {
|
|
|
61
60
|
getSourceIdentity() {
|
|
62
61
|
return (0, converters_js_1.communicationUserIdentifierConverter)(this.sourceIdentity);
|
|
63
62
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Get event processor to work with call automation events
|
|
66
|
-
*/
|
|
67
|
-
getEventProcessor() {
|
|
68
|
-
return this.callAutomationEventProcessor;
|
|
69
|
-
}
|
|
70
63
|
async createCallInternal(request, options) {
|
|
71
64
|
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: (0, core_util_1.randomUUID)() });
|
|
72
65
|
const _a = await this.callAutomationApiClient.createCall(request, optionsInternal), { callConnectionId, answeredBy, targets, sourceCallerIdNumber, source, answeredFor } = _a, result = tslib_1.__rest(_a, ["callConnectionId", "answeredBy", "targets", "sourceCallerIdNumber", "source", "answeredFor"]);
|
|
@@ -74,32 +67,10 @@ class CallAutomationClient {
|
|
|
74
67
|
const callConnectionPropertiesDto = Object.assign(Object.assign({}, result), { callConnectionId: callConnectionId, source: source ? (0, converters_js_1.communicationIdentifierConverter)(source) : undefined, answeredby: (0, converters_js_1.communicationUserIdentifierConverter)(answeredBy), answeredFor: answeredFor ? (0, converters_js_1.phoneNumberIdentifierConverter)(answeredFor) : undefined, targetParticipants: targets === null || targets === void 0 ? void 0 : targets.map((returnedTarget) => (0, converters_js_1.communicationIdentifierConverter)(returnedTarget)), sourceCallerIdNumber: sourceCallerIdNumber
|
|
75
68
|
? (0, converters_js_1.phoneNumberIdentifierConverter)(sourceCallerIdNumber)
|
|
76
69
|
: undefined });
|
|
77
|
-
const callConnection = new callConnection_js_1.CallConnection(callConnectionId, this.endpoint, this.credential, this.
|
|
70
|
+
const callConnection = new callConnection_js_1.CallConnection(callConnectionId, this.endpoint, this.credential, this.internalPipelineOptions);
|
|
78
71
|
const createCallResult = {
|
|
79
72
|
callConnectionProperties: callConnectionPropertiesDto,
|
|
80
73
|
callConnection: callConnection,
|
|
81
|
-
waitForEventProcessor: async (abortSignal, timeoutInMs) => {
|
|
82
|
-
const createCallEventResult = {
|
|
83
|
-
isSuccess: false,
|
|
84
|
-
};
|
|
85
|
-
await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
|
|
86
|
-
if (event.callConnectionId === callConnectionId && event.kind === "CallConnected") {
|
|
87
|
-
createCallEventResult.isSuccess = true;
|
|
88
|
-
createCallEventResult.successResult = event;
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
else if (event.callConnectionId === callConnectionId &&
|
|
92
|
-
event.kind === "CreateCallFailed") {
|
|
93
|
-
createCallEventResult.isSuccess = false;
|
|
94
|
-
createCallEventResult.failureResult = event;
|
|
95
|
-
return true;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
}, abortSignal, timeoutInMs);
|
|
101
|
-
return createCallEventResult;
|
|
102
|
-
},
|
|
103
74
|
};
|
|
104
75
|
return createCallResult;
|
|
105
76
|
}
|
|
@@ -121,7 +92,6 @@ class CallAutomationClient {
|
|
|
121
92
|
callIntelligenceOptions: options.callIntelligenceOptions,
|
|
122
93
|
mediaStreamingOptions: options.mediaStreamingOptions,
|
|
123
94
|
transcriptionOptions: options.transcriptionOptions,
|
|
124
|
-
customCallingContext: this.createCustomCallingContextInternal(targetParticipant.customCallingContext),
|
|
125
95
|
sourceCallerIdNumber: (0, converters_js_1.PhoneNumberIdentifierModelConverter)(targetParticipant.sourceCallIdNumber),
|
|
126
96
|
sourceDisplayName: targetParticipant.sourceDisplayName,
|
|
127
97
|
};
|
|
@@ -163,7 +133,6 @@ class CallAutomationClient {
|
|
|
163
133
|
mediaStreamingOptions: mediaStreamingOptions,
|
|
164
134
|
transcriptionOptions: transcriptionOptions,
|
|
165
135
|
callIntelligenceOptions: callIntelligenceOptions,
|
|
166
|
-
customCallingContext: this.createCustomCallingContextInternal(options.customCallingContext),
|
|
167
136
|
operationContext: operationContext,
|
|
168
137
|
callbackUri: callbackUrl,
|
|
169
138
|
answeredBy: this.sourceIdentity,
|
|
@@ -174,31 +143,10 @@ class CallAutomationClient {
|
|
|
174
143
|
const callConnectionProperties = Object.assign(Object.assign({}, result), { callConnectionId: callConnectionId, source: source ? (0, converters_js_1.communicationIdentifierConverter)(source) : undefined, answeredby: (0, converters_js_1.communicationUserIdentifierConverter)(answeredBy), answeredFor: answeredFor ? (0, converters_js_1.phoneNumberIdentifierConverter)(answeredFor) : undefined, targetParticipants: targets === null || targets === void 0 ? void 0 : targets.map((target) => (0, converters_js_1.communicationIdentifierConverter)(target)), sourceCallerIdNumber: sourceCallerIdNumber
|
|
175
144
|
? (0, converters_js_1.phoneNumberIdentifierConverter)(sourceCallerIdNumber)
|
|
176
145
|
: undefined });
|
|
177
|
-
const callConnection = new callConnection_js_1.CallConnection(callConnectionId, this.endpoint, this.credential, this.
|
|
146
|
+
const callConnection = new callConnection_js_1.CallConnection(callConnectionId, this.endpoint, this.credential, this.internalPipelineOptions);
|
|
178
147
|
const answerCallResult = {
|
|
179
148
|
callConnectionProperties: callConnectionProperties,
|
|
180
149
|
callConnection: callConnection,
|
|
181
|
-
waitForEventProcessor: async (abortSignal, timeoutInMs) => {
|
|
182
|
-
const answerCallEventResult = {
|
|
183
|
-
isSuccess: false,
|
|
184
|
-
};
|
|
185
|
-
await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
|
|
186
|
-
if (event.callConnectionId === callConnectionId && event.kind === "CallConnected") {
|
|
187
|
-
answerCallEventResult.isSuccess = true;
|
|
188
|
-
answerCallEventResult.successResult = event;
|
|
189
|
-
return true;
|
|
190
|
-
}
|
|
191
|
-
if (event.callConnectionId === callConnectionId && event.kind === "AnswerFailed") {
|
|
192
|
-
answerCallEventResult.isSuccess = false;
|
|
193
|
-
answerCallEventResult.failureResult = event;
|
|
194
|
-
return true;
|
|
195
|
-
}
|
|
196
|
-
else {
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
}, abortSignal, timeoutInMs);
|
|
200
|
-
return answerCallEventResult;
|
|
201
|
-
},
|
|
202
150
|
};
|
|
203
151
|
return answerCallResult;
|
|
204
152
|
}
|
|
@@ -215,7 +163,6 @@ class CallAutomationClient {
|
|
|
215
163
|
const request = {
|
|
216
164
|
incomingCallContext: incomingCallContext,
|
|
217
165
|
target: (0, converters_js_1.communicationIdentifierModelConverter)(targetParticipant.targetParticipant),
|
|
218
|
-
customCallingContext: this.createCustomCallingContextInternal(targetParticipant.customCallingContext),
|
|
219
166
|
};
|
|
220
167
|
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: (0, core_util_1.randomUUID)() });
|
|
221
168
|
return this.callAutomationApiClient.redirectCall(request, optionsInternal);
|
|
@@ -234,29 +181,6 @@ class CallAutomationClient {
|
|
|
234
181
|
const optionsInternal = Object.assign(Object.assign({}, options), { repeatabilityFirstSent: new Date(), repeatabilityRequestID: (0, core_util_1.randomUUID)() });
|
|
235
182
|
return this.callAutomationApiClient.rejectCall(request, optionsInternal);
|
|
236
183
|
}
|
|
237
|
-
createCustomCallingContextInternal(customCallingContext) {
|
|
238
|
-
const sipHeaders = {};
|
|
239
|
-
const voipHeaders = {};
|
|
240
|
-
if (customCallingContext) {
|
|
241
|
-
for (const header of customCallingContext) {
|
|
242
|
-
if (header.kind === "sipuui") {
|
|
243
|
-
sipHeaders[`User-To-User`] = header.value;
|
|
244
|
-
}
|
|
245
|
-
else if (header.kind === "sipx") {
|
|
246
|
-
if (header.sipHeaderPrefix === "X-") {
|
|
247
|
-
sipHeaders[`X-${header.key}`] = header.value;
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
sipHeaders[`X-MS-Custom-${header.key}`] = header.value;
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
else if (header.kind === "voip") {
|
|
254
|
-
voipHeaders[`${header.key}`] = header.value;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
return { sipHeaders: sipHeaders, voipHeaders: voipHeaders };
|
|
259
|
-
}
|
|
260
184
|
/**
|
|
261
185
|
* Create connection to room call.
|
|
262
186
|
* @param callLocator - Call locator to create connection.
|
|
@@ -290,31 +214,10 @@ class CallAutomationClient {
|
|
|
290
214
|
const callConnectionProperties = Object.assign(Object.assign({}, result), { callConnectionId: callConnectionId, source: source ? (0, converters_js_1.communicationIdentifierConverter)(source) : undefined, answeredby: answeredBy ? (0, converters_js_1.communicationUserIdentifierConverter)(answeredBy) : undefined, targetParticipants: targets === null || targets === void 0 ? void 0 : targets.map((target) => (0, converters_js_1.communicationIdentifierConverter)(target)), answeredFor: answeredFor ? (0, converters_js_1.phoneNumberIdentifierConverter)(answeredFor) : undefined, sourceCallerIdNumber: sourceCallerIdNumber
|
|
291
215
|
? (0, converters_js_1.phoneNumberIdentifierConverter)(sourceCallerIdNumber)
|
|
292
216
|
: undefined });
|
|
293
|
-
const callConnection = new callConnection_js_1.CallConnection(callConnectionId, this.callAutomationApiClient.endpoint, this.credential, this.
|
|
217
|
+
const callConnection = new callConnection_js_1.CallConnection(callConnectionId, this.callAutomationApiClient.endpoint, this.credential, this.internalPipelineOptions);
|
|
294
218
|
const connectResult = {
|
|
295
219
|
callConnectionProperties: callConnectionProperties,
|
|
296
220
|
callConnection: callConnection,
|
|
297
|
-
waitForEventProcessor: async (abortSignal, timeoutInMs) => {
|
|
298
|
-
const connectCallEventResult = {
|
|
299
|
-
isSuccess: false,
|
|
300
|
-
};
|
|
301
|
-
await this.callAutomationEventProcessor.waitForEventProcessor((event) => {
|
|
302
|
-
if (event.callConnectionId === callConnectionId && event.kind === "CallConnected") {
|
|
303
|
-
connectCallEventResult.isSuccess = true;
|
|
304
|
-
connectCallEventResult.successResult = event;
|
|
305
|
-
return true;
|
|
306
|
-
}
|
|
307
|
-
if (event.callConnectionId === callConnectionId && event.kind === "ConnectFailed") {
|
|
308
|
-
connectCallEventResult.isSuccess = false;
|
|
309
|
-
connectCallEventResult.failureResult = event;
|
|
310
|
-
return true;
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
return false;
|
|
314
|
-
}
|
|
315
|
-
}, abortSignal, timeoutInMs);
|
|
316
|
-
return connectCallEventResult;
|
|
317
|
-
},
|
|
318
221
|
};
|
|
319
222
|
return connectResult;
|
|
320
223
|
}
|