@azure/communication-call-automation 1.3.0-beta.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +213 -1240
  3. package/dist/index.js.map +1 -1
  4. package/dist-esm/src/callAutomationClient.js +5 -9
  5. package/dist-esm/src/callAutomationClient.js.map +1 -1
  6. package/dist-esm/src/callAutomationEventParser.js +5 -20
  7. package/dist-esm/src/callAutomationEventParser.js.map +1 -1
  8. package/dist-esm/src/callConnection.js +1 -1
  9. package/dist-esm/src/callConnection.js.map +1 -1
  10. package/dist-esm/src/callMedia.js +1 -57
  11. package/dist-esm/src/callMedia.js.map +1 -1
  12. package/dist-esm/src/callRecording.js +1 -1
  13. package/dist-esm/src/callRecording.js.map +1 -1
  14. package/dist-esm/src/contentDownloader.js +2 -2
  15. package/dist-esm/src/contentDownloader.js.map +1 -1
  16. package/dist-esm/src/credential/callAutomationAccessKeyCredentialPolicy.js +1 -1
  17. package/dist-esm/src/credential/callAutomationAccessKeyCredentialPolicy.js.map +1 -1
  18. package/dist-esm/src/credential/callAutomationAuthPolicy.js +2 -2
  19. package/dist-esm/src/credential/callAutomationAuthPolicy.js.map +1 -1
  20. package/dist-esm/src/credential/cryptoUtils.browser.js +1 -1
  21. package/dist-esm/src/credential/cryptoUtils.browser.js.map +1 -1
  22. package/dist-esm/src/credential/cryptoUtils.js +1 -1
  23. package/dist-esm/src/credential/cryptoUtils.js.map +1 -1
  24. package/dist-esm/src/credential/encodeUtils.browser.js +1 -1
  25. package/dist-esm/src/credential/encodeUtils.browser.js.map +1 -1
  26. package/dist-esm/src/generated/src/callAutomationApiClient.js +2 -2
  27. package/dist-esm/src/generated/src/callAutomationApiClient.js.map +1 -1
  28. package/dist-esm/src/generated/src/models/index.js +2 -150
  29. package/dist-esm/src/generated/src/models/index.js.map +1 -1
  30. package/dist-esm/src/generated/src/models/mappers.js +132 -696
  31. package/dist-esm/src/generated/src/models/mappers.js.map +1 -1
  32. package/dist-esm/src/generated/src/models/parameters.js +2 -22
  33. package/dist-esm/src/generated/src/models/parameters.js.map +1 -1
  34. package/dist-esm/src/generated/src/operations/callConnection.js +1 -1
  35. package/dist-esm/src/generated/src/operations/callConnection.js.map +1 -1
  36. package/dist-esm/src/generated/src/operations/callMedia.js +0 -125
  37. package/dist-esm/src/generated/src/operations/callMedia.js.map +1 -1
  38. package/dist-esm/src/generated/src/operationsInterfaces/callConnection.js.map +1 -1
  39. package/dist-esm/src/generated/src/operationsInterfaces/callMedia.js.map +1 -1
  40. package/dist-esm/src/index.js +1 -4
  41. package/dist-esm/src/index.js.map +1 -1
  42. package/dist-esm/src/models/constants.js +2 -2
  43. package/dist-esm/src/models/constants.js.map +1 -1
  44. package/dist-esm/src/models/events.js +1 -1
  45. package/dist-esm/src/models/events.js.map +1 -1
  46. package/dist-esm/src/models/logger.js +1 -1
  47. package/dist-esm/src/models/logger.js.map +1 -1
  48. package/dist-esm/src/models/mapper.js +1 -1
  49. package/dist-esm/src/models/mapper.js.map +1 -1
  50. package/dist-esm/src/models/models.js +2 -2
  51. package/dist-esm/src/models/models.js.map +1 -1
  52. package/dist-esm/src/models/options.js +1 -1
  53. package/dist-esm/src/models/options.js.map +1 -1
  54. package/dist-esm/src/models/responses.js +1 -1
  55. package/dist-esm/src/models/responses.js.map +1 -1
  56. package/dist-esm/src/utli/converters.js +2 -2
  57. package/dist-esm/src/utli/converters.js.map +1 -1
  58. package/package.json +12 -15
  59. package/types/communication-call-automation.d.ts +86 -708
  60. package/dist-esm/src/models/audio.js +0 -2
  61. package/dist-esm/src/models/audio.js.map +0 -1
  62. package/dist-esm/src/models/transcription.js +0 -11
  63. package/dist-esm/src/models/transcription.js.map +0 -1
  64. package/dist-esm/src/streamingDataParser.js +0 -68
  65. package/dist-esm/src/streamingDataParser.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/models/events.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CommunicationIdentifier } from \"@azure/communication-common\";\n\nimport {\n AddParticipantSucceeded as RestAddParticipantSucceeded,\n AddParticipantFailed as RestAddParticipantFailed,\n RemoveParticipantSucceeded as RestRemoveParticipantSucceeded,\n RemoveParticipantFailed as RestRemoveParticipantFailed,\n CallConnected as RestCallConnected,\n CallDisconnected as RestCallDisconnected,\n CallTransferAccepted as RestCallTransferAccepted,\n CallTransferFailed as RestCallTransferFailed,\n ParticipantsUpdated as RestParticipantsUpdated,\n RecordingStateChanged as RestRecordingStateChanged,\n PlayStarted as RestPlayStarted,\n PlayCompleted as RestPlayCompleted,\n PlayFailed as RestPlayFailed,\n PlayCanceled as RestPlayCanceled,\n RecognizeCompleted as RestRecognizeCompleted,\n RecognizeFailed as RestRecognizeFailed,\n RecognizeCanceled as RestRecognizeCanceled,\n ResultInformation as RestResultInformation,\n ContinuousDtmfRecognitionToneReceived as RestContinuousDtmfRecognitionToneReceived,\n ContinuousDtmfRecognitionToneFailed as RestContinuousDtmfRecognitionToneFailed,\n ContinuousDtmfRecognitionStopped as RestContinuousDtmfRecognitionStopped,\n SendDtmfTonesCompleted as RestSendDtmfTonesCompleted,\n SendDtmfTonesFailed as RestSendDtmfTonesFailed,\n Tone,\n CancelAddParticipantSucceeded as RestCancelAddParticipantSucceeded,\n CancelAddParticipantFailed as RestCancelAddParticipantFailed,\n ConnectFailed as RestConnectFailed,\n TranscriptionStarted as RestTranscriptionStarted,\n TranscriptionStopped as RestTranscriptionStopped,\n TranscriptionUpdated as RestTranscriptionUpdated,\n TranscriptionFailed as RestTranscriptionFailed,\n HoldFailed as RestHoldFailed,\n MediaStreamingStarted as RestMediaStreamingStarted,\n MediaStreamingStopped as RestMediaStreamingStopped,\n MediaStreamingFailed as RestMediaStreamingFailed,\n} from \"../generated/src/models\";\n\nimport { CallParticipant } from \"./models\";\n\n/** Callback events for Call Automation */\nexport type CallAutomationEvent =\n | AddParticipantSucceeded\n | AddParticipantFailed\n | RemoveParticipantSucceeded\n | RemoveParticipantFailed\n | CallConnected\n | CallDisconnected\n | CallTransferAccepted\n | CallTransferFailed\n | ParticipantsUpdated\n | RecordingStateChanged\n | PlayStarted\n | PlayCompleted\n | PlayFailed\n | PlayCanceled\n | RecognizeCompleted\n | RecognizeCanceled\n | RecognizeFailed\n | ContinuousDtmfRecognitionToneReceived\n | ContinuousDtmfRecognitionToneFailed\n | ContinuousDtmfRecognitionStopped\n | SendDtmfTonesCompleted\n | SendDtmfTonesFailed\n | CancelAddParticipantSucceeded\n | CancelAddParticipantFailed\n | ConnectFailed\n | TranscriptionStarted\n | TranscriptionStopped\n | TranscriptionUpdated\n | TranscriptionFailed\n | HoldFailed\n | MediaStreamingStarted\n | MediaStreamingStopped\n | MediaStreamingFailed;\n\nexport {\n RestAddParticipantSucceeded,\n RestAddParticipantFailed,\n RestRemoveParticipantSucceeded,\n RestRemoveParticipantFailed,\n RestCallConnected,\n RestCallDisconnected,\n RestCallTransferAccepted,\n RestCallTransferFailed,\n RestParticipantsUpdated,\n RestRecordingStateChanged,\n RestPlayStarted,\n RestPlayCompleted,\n RestPlayFailed,\n RestPlayCanceled,\n RestRecognizeCompleted,\n RestRecognizeFailed,\n RestRecognizeCanceled,\n RestResultInformation,\n RestContinuousDtmfRecognitionToneReceived,\n RestContinuousDtmfRecognitionToneFailed,\n RestContinuousDtmfRecognitionStopped,\n RestSendDtmfTonesCompleted,\n RestSendDtmfTonesFailed,\n RestCancelAddParticipantSucceeded,\n RestCancelAddParticipantFailed,\n RestConnectFailed,\n RestTranscriptionStarted,\n RestTranscriptionStopped,\n RestTranscriptionUpdated,\n RestTranscriptionFailed,\n RestHoldFailed,\n RestMediaStreamingStarted,\n RestMediaStreamingStopped,\n RestMediaStreamingFailed,\n};\nexport interface ResultInformation\n extends Omit<RestResultInformation, \"code\" | \"subCode\" | \"message\"> {\n /** The error code. */\n code: number;\n /** The sub code of error. */\n subCode: number;\n /** The detailed message of the error. */\n message: string;\n}\n\n/** The participant successfully added event. */\nexport interface AddParticipantSucceeded\n extends Omit<\n RestAddParticipantSucceeded,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participant\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** The participant in the call. */\n participant?: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"AddParticipantSucceeded\";\n}\n\n/** The failed to add participant event. */\nexport interface AddParticipantFailed\n extends Omit<\n RestAddParticipantFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participant\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** The participant in the call. */\n participant?: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"AddParticipantFailed\";\n}\n\n/** The participant successfully removed event. */\nexport interface RemoveParticipantSucceeded\n extends Omit<\n RestRemoveParticipantSucceeded,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participant\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** The participant in the call. */\n participant?: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"RemoveParticipantSucceeded\";\n}\n\n/** The failed to remove participant event. */\nexport interface RemoveParticipantFailed\n extends Omit<\n RestRemoveParticipantFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participant\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** The participant in the call. */\n participant?: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"RemoveParticipantFailed\";\n}\n\n/** Event when call was established. */\nexport interface CallConnected\n extends Omit<RestCallConnected, \"callConnectionId\" | \"serverCallId\" | \"correlationId\"> {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"CallConnected\";\n}\n\n/** Event when all participants left and call was terminated. */\nexport interface CallDisconnected\n extends Omit<RestCallDisconnected, \"callConnectionId\" | \"serverCallId\" | \"correlationId\"> {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"CallDisconnected\";\n}\n\n/** Event when transfer request was successful. */\nexport interface CallTransferAccepted\n extends Omit<\n RestCallTransferAccepted,\n | \"callConnectionId\"\n | \"serverCallId\"\n | \"correlationId\"\n | \"resultInformation\"\n | \"transferee\"\n | \"transferTarget\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Participant that was transferred away */\n transferee: CommunicationIdentifier;\n /** Target that transferee is transferred to */\n transferTarget: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"CallTransferAccepted\";\n}\n\n/** Event when transfer request was failed. */\nexport interface CallTransferFailed\n extends Omit<\n RestCallTransferFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"CallTransferFailed\";\n}\n\n/** Event when there was an update to participant(s). */\nexport interface ParticipantsUpdated\n extends Omit<\n RestParticipantsUpdated,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participants\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** The list of participants in the call. */\n participants: CallParticipant[];\n /** kind of this event. */\n kind: \"ParticipantsUpdated\";\n}\n\n/** Event when Recording state has been changed. */\nexport interface RecordingStateChanged\n extends Omit<RestRecordingStateChanged, \"callConnectionId\" | \"serverCallId\" | \"correlationId\"> {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"RecordingStateChanged\";\n}\n\n/** Event when Media play was successfully started. */\nexport interface PlayStarted\n extends Omit<\n RestPlayStarted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"PlayStarted\";\n}\n\n/** Event when Media play was successfully completed. */\nexport interface PlayCompleted\n extends Omit<\n RestPlayCompleted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"PlayCompleted\";\n}\n\n/** Event when Media play was failed. */\nexport interface PlayFailed\n extends Omit<\n RestPlayFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"PlayFailed\";\n}\n\n/** Event when Media play was canceled by Cancel operation. */\nexport interface PlayCanceled\n extends Omit<RestPlayCanceled, \"callConnectionId\" | \"serverCallId\" | \"correlationId\"> {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"PlayCanceled\";\n}\n\n/** Event when Media recognize was successfully completed. */\nexport interface RecognizeCompleted\n extends Omit<\n RestRecognizeCompleted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"RecognizeCompleted\";\n}\n\n/** Event when Media recognize was failed. */\nexport interface RecognizeFailed\n extends Omit<\n RestRecognizeFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"RecognizeFailed\";\n}\n\n/** Event when Media recognize was canceled by Cancel operation. */\nexport interface RecognizeCanceled\n extends Omit<RestRecognizeCanceled, \"callConnectionId\" | \"serverCallId\" | \"correlationId\"> {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"RecognizeCanceled\";\n}\n\n/** Event sent when Dtmf tone received from targeted participant in call. */\nexport interface ContinuousDtmfRecognitionToneReceived\n extends Omit<\n RestContinuousDtmfRecognitionToneReceived,\n | \"sequenceId\"\n | \"tone\"\n | \"callConnectionId\"\n | \"serverCallId\"\n | \"correlationId\"\n | \"resultInformation\"\n > {\n /** The sequence id which can be used to determine if the same tone was played multiple times or if any tones were missed. */\n sequenceId: number;\n /** Defines values for Tone. */\n tone: Tone;\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId or skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"ContinuousDtmfRecognitionToneReceived\";\n}\n\n/** Event sent when failed to recognize continuous Dtmf tone. */\nexport interface ContinuousDtmfRecognitionToneFailed\n extends Omit<\n RestContinuousDtmfRecognitionToneFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"ContinuousDtmfRecognitionToneFailed\";\n}\n\n/** Event sent when continuous Dtmf recognition stopped. */\nexport interface ContinuousDtmfRecognitionStopped\n extends Omit<\n RestContinuousDtmfRecognitionStopped,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"ContinuousDtmfRecognitionStopped\";\n}\n\n/** Event sent when Dtmf tones send successfully. */\nexport interface SendDtmfTonesCompleted\n extends Omit<\n RestSendDtmfTonesCompleted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"SendDtmfTonesCompleted\";\n}\n\n/** Event sent when Dtmf tones send failed. */\nexport interface SendDtmfTonesFailed\n extends Omit<\n RestSendDtmfTonesFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"SendDtmfTonesFailed\";\n}\n\n/** Successful cancel add participant event. */\nexport interface CancelAddParticipantSucceeded\n extends Omit<\n RestCancelAddParticipantSucceeded,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"invitationId\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Invitation ID used to cancel the add participant request. */\n invitationId: string;\n /** kind of this event. */\n kind: \"CancelAddParticipantSucceeded\";\n}\n\n/** The failed to cancel add participant event. */\nexport interface CancelAddParticipantFailed\n extends Omit<\n RestCancelAddParticipantFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"invitationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Invitation ID used to cancel the add participant request. */\n invitationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"CancelAddParticipantFailed\";\n}\n\nexport interface ConnectFailed\n extends Omit<\n RestConnectFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"ConnectFailed\";\n}\n\nexport interface TranscriptionStarted\n extends Omit<\n RestTranscriptionStarted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: RestResultInformation;\n /** kind of this event. */\n kind: \"TranscriptionStarted\";\n}\n\nexport interface TranscriptionStopped\n extends Omit<\n RestTranscriptionStopped,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: RestResultInformation;\n /** kind of this event. */\n kind: \"TranscriptionStopped\";\n}\n\nexport interface TranscriptionUpdated\n extends Omit<\n RestTranscriptionUpdated,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: RestResultInformation;\n /** kind of this event. */\n kind: \"TranscriptionUpdated\";\n}\n\nexport interface TranscriptionFailed\n extends Omit<\n RestTranscriptionFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: RestResultInformation;\n /** kind of this event. */\n kind: \"TranscriptionFailed\";\n}\n\nexport interface HoldFailed\n extends Omit<\n RestHoldFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"HoldFailed\";\n}\n\nexport interface MediaStreamingStarted\n extends Omit<\n RestMediaStreamingStarted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"MediaStreamingStarted\";\n}\n\nexport interface MediaStreamingStopped\n extends Omit<\n RestMediaStreamingStopped,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"MediaStreamingStopped\";\n}\n\nexport interface MediaStreamingFailed\n extends Omit<\n RestMediaStreamingFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"MediaStreamingFailed\";\n}\n"]}
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/models/events.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CommunicationIdentifier } from \"@azure/communication-common\";\n\nimport {\n AddParticipantSucceeded as RestAddParticipantSucceeded,\n AddParticipantFailed as RestAddParticipantFailed,\n RemoveParticipantSucceeded as RestRemoveParticipantSucceeded,\n RemoveParticipantFailed as RestRemoveParticipantFailed,\n CallConnected as RestCallConnected,\n CallDisconnected as RestCallDisconnected,\n CallTransferAccepted as RestCallTransferAccepted,\n CallTransferFailed as RestCallTransferFailed,\n ParticipantsUpdated as RestParticipantsUpdated,\n RecordingStateChanged as RestRecordingStateChanged,\n PlayStarted as RestPlayStarted,\n PlayCompleted as RestPlayCompleted,\n PlayFailed as RestPlayFailed,\n PlayCanceled as RestPlayCanceled,\n RecognizeCompleted as RestRecognizeCompleted,\n RecognizeFailed as RestRecognizeFailed,\n RecognizeCanceled as RestRecognizeCanceled,\n ResultInformation as RestResultInformation,\n ContinuousDtmfRecognitionToneReceived as RestContinuousDtmfRecognitionToneReceived,\n ContinuousDtmfRecognitionToneFailed as RestContinuousDtmfRecognitionToneFailed,\n ContinuousDtmfRecognitionStopped as RestContinuousDtmfRecognitionStopped,\n SendDtmfTonesCompleted as RestSendDtmfTonesCompleted,\n SendDtmfTonesFailed as RestSendDtmfTonesFailed,\n Tone,\n CancelAddParticipantSucceeded as RestCancelAddParticipantSucceeded,\n CancelAddParticipantFailed as RestCancelAddParticipantFailed,\n ConnectFailed as RestConnectFailed,\n HoldFailed as RestHoldFailed,\n AnswerFailed as RestAnswerFailed,\n CreateCallFailed as RestCreateCallFailed,\n} from \"../generated/src/models\";\n\nimport { CallParticipant } from \"./models\";\n\n/** Callback events for Call Automation */\nexport type CallAutomationEvent =\n | AddParticipantSucceeded\n | AddParticipantFailed\n | RemoveParticipantSucceeded\n | RemoveParticipantFailed\n | CallConnected\n | CallDisconnected\n | CallTransferAccepted\n | CallTransferFailed\n | ParticipantsUpdated\n | RecordingStateChanged\n | PlayStarted\n | PlayCompleted\n | PlayFailed\n | PlayCanceled\n | RecognizeCompleted\n | RecognizeCanceled\n | RecognizeFailed\n | ContinuousDtmfRecognitionToneReceived\n | ContinuousDtmfRecognitionToneFailed\n | ContinuousDtmfRecognitionStopped\n | SendDtmfTonesCompleted\n | SendDtmfTonesFailed\n | CancelAddParticipantSucceeded\n | CancelAddParticipantFailed\n | ConnectFailed\n | HoldFailed\n | AnswerFailed\n | CreateCallFailed;\n\nexport {\n RestAddParticipantSucceeded,\n RestAddParticipantFailed,\n RestRemoveParticipantSucceeded,\n RestRemoveParticipantFailed,\n RestCallConnected,\n RestCallDisconnected,\n RestCallTransferAccepted,\n RestCallTransferFailed,\n RestParticipantsUpdated,\n RestRecordingStateChanged,\n RestPlayStarted,\n RestPlayCompleted,\n RestPlayFailed,\n RestPlayCanceled,\n RestRecognizeCompleted,\n RestRecognizeFailed,\n RestRecognizeCanceled,\n RestResultInformation,\n RestContinuousDtmfRecognitionToneReceived,\n RestContinuousDtmfRecognitionToneFailed,\n RestContinuousDtmfRecognitionStopped,\n RestSendDtmfTonesCompleted,\n RestSendDtmfTonesFailed,\n RestCancelAddParticipantSucceeded,\n RestCancelAddParticipantFailed,\n RestConnectFailed,\n RestHoldFailed,\n RestAnswerFailed,\n RestCreateCallFailed,\n};\nexport interface ResultInformation\n extends Omit<RestResultInformation, \"code\" | \"subCode\" | \"message\"> {\n /** The error code. */\n code: number;\n /** The sub code of error. */\n subCode: number;\n /** The detailed message of the error. */\n message: string;\n}\n\n/** The participant successfully added event. */\nexport interface AddParticipantSucceeded\n extends Omit<\n RestAddParticipantSucceeded,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participant\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** The participant in the call. */\n participant?: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"AddParticipantSucceeded\";\n}\n\n/** The failed to add participant event. */\nexport interface AddParticipantFailed\n extends Omit<\n RestAddParticipantFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participant\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** The participant in the call. */\n participant?: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"AddParticipantFailed\";\n}\n\n/** The participant successfully removed event. */\nexport interface RemoveParticipantSucceeded\n extends Omit<\n RestRemoveParticipantSucceeded,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participant\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** The participant in the call. */\n participant?: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"RemoveParticipantSucceeded\";\n}\n\n/** The failed to remove participant event. */\nexport interface RemoveParticipantFailed\n extends Omit<\n RestRemoveParticipantFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participant\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** The participant in the call. */\n participant?: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"RemoveParticipantFailed\";\n}\n\n/** Event when call was established. */\nexport interface CallConnected\n extends Omit<\n RestCallConnected,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"CallConnected\";\n}\n\n/** Event when all participants left and call was terminated. */\nexport interface CallDisconnected\n extends Omit<\n RestCallDisconnected,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"CallDisconnected\";\n}\n\n/** Event when transfer request was successful. */\nexport interface CallTransferAccepted\n extends Omit<\n RestCallTransferAccepted,\n | \"callConnectionId\"\n | \"serverCallId\"\n | \"correlationId\"\n | \"resultInformation\"\n | \"transferee\"\n | \"transferTarget\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Participant that was transferred away */\n transferee: CommunicationIdentifier;\n /** Target that transferee is transferred to */\n transferTarget: CommunicationIdentifier;\n /** kind of this event. */\n kind: \"CallTransferAccepted\";\n}\n\n/** Event when transfer request was failed. */\nexport interface CallTransferFailed\n extends Omit<\n RestCallTransferFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"CallTransferFailed\";\n}\n\n/** Event when there was an update to participant(s). */\nexport interface ParticipantsUpdated\n extends Omit<\n RestParticipantsUpdated,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"participants\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** The list of participants in the call. */\n participants: CallParticipant[];\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"ParticipantsUpdated\";\n}\n\n/** Event when Recording state has been changed. */\nexport interface RecordingStateChanged\n extends Omit<\n RestRecordingStateChanged,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"RecordingStateChanged\";\n}\n\n/** Event when Media play was successfully started. */\nexport interface PlayStarted\n extends Omit<\n RestPlayStarted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"PlayStarted\";\n}\n\n/** Event when Media play was successfully completed. */\nexport interface PlayCompleted\n extends Omit<\n RestPlayCompleted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"PlayCompleted\";\n}\n\n/** Event when Media play was failed. */\nexport interface PlayFailed\n extends Omit<\n RestPlayFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"PlayFailed\";\n}\n\n/** Event when Media play was canceled by Cancel operation. */\nexport interface PlayCanceled\n extends Omit<\n RestPlayCanceled,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"PlayCanceled\";\n}\n\n/** Event when Media recognize was successfully completed. */\nexport interface RecognizeCompleted\n extends Omit<\n RestRecognizeCompleted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"RecognizeCompleted\";\n}\n\n/** Event when Media recognize was failed. */\nexport interface RecognizeFailed\n extends Omit<\n RestRecognizeFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** kind of this event. */\n kind: \"RecognizeFailed\";\n}\n\n/** Event when Media recognize was canceled by Cancel operation. */\nexport interface RecognizeCanceled\n extends Omit<\n RestRecognizeCanceled,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"RecognizeCanceled\";\n}\n\n/** Event sent when Dtmf tone received from targeted participant in call. */\nexport interface ContinuousDtmfRecognitionToneReceived\n extends Omit<\n RestContinuousDtmfRecognitionToneReceived,\n | \"sequenceId\"\n | \"tone\"\n | \"callConnectionId\"\n | \"serverCallId\"\n | \"correlationId\"\n | \"resultInformation\"\n > {\n /** The sequence id which can be used to determine if the same tone was played multiple times or if any tones were missed. */\n sequenceId: number;\n /** Defines values for Tone. */\n tone: Tone;\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId or skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"ContinuousDtmfRecognitionToneReceived\";\n}\n\n/** Event sent when failed to recognize continuous Dtmf tone. */\nexport interface ContinuousDtmfRecognitionToneFailed\n extends Omit<\n RestContinuousDtmfRecognitionToneFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"ContinuousDtmfRecognitionToneFailed\";\n}\n\n/** Event sent when continuous Dtmf recognition stopped. */\nexport interface ContinuousDtmfRecognitionStopped\n extends Omit<\n RestContinuousDtmfRecognitionStopped,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"ContinuousDtmfRecognitionStopped\";\n}\n\n/** Event sent when Dtmf tones send successfully. */\nexport interface SendDtmfTonesCompleted\n extends Omit<\n RestSendDtmfTonesCompleted,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"SendDtmfTonesCompleted\";\n}\n\n/** Event sent when Dtmf tones send failed. */\nexport interface SendDtmfTonesFailed\n extends Omit<\n RestSendDtmfTonesFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"SendDtmfTonesFailed\";\n}\n\n/** Successful cancel add participant event. */\nexport interface CancelAddParticipantSucceeded\n extends Omit<\n RestCancelAddParticipantSucceeded,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"invitationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Invitation ID used to cancel the add participant request. */\n invitationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"CancelAddParticipantSucceeded\";\n}\n\n/** The failed to cancel add participant event. */\nexport interface CancelAddParticipantFailed\n extends Omit<\n RestCancelAddParticipantFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"invitationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Invitation ID used to cancel the add participant request. */\n invitationId: string;\n /** Contains the resulting SIP code/sub-code and message from NGC services. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"CancelAddParticipantFailed\";\n}\n\nexport interface ConnectFailed\n extends Omit<\n RestConnectFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"ConnectFailed\";\n}\n\nexport interface HoldFailed\n extends Omit<\n RestHoldFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"HoldFailed\";\n}\n\nexport interface AnswerFailed\n extends Omit<\n RestAnswerFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"AnswerFailed\";\n}\n\nexport interface CreateCallFailed\n extends Omit<\n RestCreateCallFailed,\n \"callConnectionId\" | \"serverCallId\" | \"correlationId\" | \"resultInformation\"\n > {\n /** Call connection ID. */\n callConnectionId: string;\n /** Server call ID. */\n serverCallId: string;\n /** Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */\n correlationId: string;\n /** Contains the resulting SIP code, sub-code and message. */\n resultInformation?: ResultInformation;\n /** kind of this event. */\n kind: \"CreateCallFailed\";\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { createClientLogger } from "@azure/logger";
4
4
  /**
5
5
  * The \@azure/logger configuration for this package.
@@ -1 +1 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/models/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,+BAA+B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n */\nexport const logger = createClientLogger(\"communication-call-automation\");\n"]}
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/models/logger.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,kBAAkB,CAAC,+BAA+B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n */\nexport const logger = createClientLogger(\"communication-call-automation\");\n"]}
@@ -1,5 +1,5 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export const CloudEventMapper = {
4
4
  type: {
5
5
  name: "Composite",
@@ -1 +1 @@
1
- {"version":3,"file":"mapper.js","sourceRoot":"","sources":["../../../src/models/mapper.ts"],"names":[],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OAAO,EAAE;gBACP,cAAc,EAAE,SAAS;gBACzB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CompositeMapper } from \"@azure/core-client\";\n\nexport const CloudEventMapper: CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudEvent\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n id: {\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n source: {\n serializedName: \"source\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n data: {\n serializedName: \"data\",\n type: {\n name: \"any\",\n },\n },\n dataBase64: {\n serializedName: \"data_base64\",\n type: {\n name: \"ByteArray\",\n },\n },\n type: {\n serializedName: \"type\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n time: {\n serializedName: \"time\",\n type: {\n name: \"DateTime\",\n },\n },\n specversion: {\n serializedName: \"specversion\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n dataschema: {\n serializedName: \"dataschema\",\n type: {\n name: \"String\",\n },\n },\n datacontenttype: {\n serializedName: \"datacontenttype\",\n type: {\n name: \"String\",\n },\n },\n subject: {\n serializedName: \"subject\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n"]}
1
+ {"version":3,"file":"mapper.js","sourceRoot":"","sources":["../../../src/models/mapper.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,MAAM,CAAC,MAAM,gBAAgB,GAAoB;IAC/C,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,YAAY;QACvB,oBAAoB,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;QAClD,eAAe,EAAE;YACf,EAAE,EAAE;gBACF,cAAc,EAAE,IAAI;gBACpB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,MAAM,EAAE;gBACN,cAAc,EAAE,QAAQ;gBACxB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,IAAI,EAAE;oBACJ,IAAI,EAAE,KAAK;iBACZ;aACF;YACD,UAAU,EAAE;gBACV,cAAc,EAAE,aAAa;gBAC7B,IAAI,EAAE;oBACJ,IAAI,EAAE,WAAW;iBAClB;aACF;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;iBACjB;aACF;YACD,WAAW,EAAE;gBACX,cAAc,EAAE,aAAa;gBAC7B,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,UAAU,EAAE;gBACV,cAAc,EAAE,YAAY;gBAC5B,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,eAAe,EAAE;gBACf,cAAc,EAAE,iBAAiB;gBACjC,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,OAAO,EAAE;gBACP,cAAc,EAAE,SAAS;gBACzB,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CompositeMapper } from \"@azure/core-client\";\n\nexport const CloudEventMapper: CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CloudEvent\",\n additionalProperties: { type: { name: \"Object\" } },\n modelProperties: {\n id: {\n serializedName: \"id\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n source: {\n serializedName: \"source\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n data: {\n serializedName: \"data\",\n type: {\n name: \"any\",\n },\n },\n dataBase64: {\n serializedName: \"data_base64\",\n type: {\n name: \"ByteArray\",\n },\n },\n type: {\n serializedName: \"type\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n time: {\n serializedName: \"time\",\n type: {\n name: \"DateTime\",\n },\n },\n specversion: {\n serializedName: \"specversion\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n dataschema: {\n serializedName: \"dataschema\",\n type: {\n name: \"String\",\n },\n },\n datacontenttype: {\n serializedName: \"datacontenttype\",\n type: {\n name: \"String\",\n },\n },\n subject: {\n serializedName: \"subject\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export { KnownCallRejectReason, KnownMediaStreamingAudioChannelType, KnownMediaStreamingContentType, KnownMediaStreamingTransportType, } from "../generated/src/models/index";
2
+ // Licensed under the MIT License.
3
+ export { KnownCallRejectReason, } from "../generated/src/models/index";
4
4
  /** Defines values for VoiceKind that the service accepts. */
5
5
  export var VoiceKind;
6
6
  (function (VoiceKind) {
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAelC,OAAO,EAGL,qBAAqB,EACrB,mCAAmC,EACnC,8BAA8B,EAC9B,gCAAgC,GAejC,MAAM,+BAA+B,CAAC;AAmDvC,6DAA6D;AAC7D,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,WAAW;IACX,0BAAa,CAAA;IACb,aAAa;IACb,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AA+BD,mBAAmB;AACnB,MAAM,CAAN,IAAY,QAiCX;AAjCD,WAAY,QAAQ;IAClB,WAAW;IACX,yBAAa,CAAA;IACb,UAAU;IACV,uBAAW,CAAA;IACX,UAAU;IACV,uBAAW,CAAA;IACX,YAAY;IACZ,2BAAe,CAAA;IACf,WAAW;IACX,yBAAa,CAAA;IACb,WAAW;IACX,yBAAa,CAAA;IACb,UAAU;IACV,uBAAW,CAAA;IACX,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,2BAAe,CAAA;IACf,WAAW;IACX,yBAAa,CAAA;IACb,QAAQ;IACR,mBAAO,CAAA;IACP,QAAQ;IACR,mBAAO,CAAA;IACP,QAAQ;IACR,mBAAO,CAAA;IACP,QAAQ;IACR,mBAAO,CAAA;IACP,YAAY;IACZ,2BAAe,CAAA;IACf,eAAe;IACf,iCAAqB,CAAA;AACvB,CAAC,EAjCW,QAAQ,KAAR,QAAQ,QAiCnB;AAWD,4DAA4D;AAC5D,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,WAAW;IACX,mCAAa,CAAA;AACf,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n MicrosoftTeamsUserIdentifier,\n MicrosoftTeamsAppIdentifier,\n PhoneNumberIdentifier,\n} from \"@azure/communication-common\";\nimport {\n CallConnectionStateModel,\n MediaStreamingSubscription,\n TranscriptionSubscription,\n} from \"../generated/src\";\n\nexport {\n CallConnectionStateModel,\n CallRejectReason,\n KnownCallRejectReason,\n KnownMediaStreamingAudioChannelType,\n KnownMediaStreamingContentType,\n KnownMediaStreamingTransportType,\n MediaStreamingAudioChannelType,\n MediaStreamingOptions,\n MediaStreamingContentType,\n MediaStreamingTransportType,\n MediaStreamingSubscription,\n TranscriptionOptions,\n TranscriptionTransportType,\n TranscriptionSubscription,\n RecognitionType,\n ChoiceResult,\n DtmfResult,\n SpeechResult,\n RecordingState,\n Tone,\n} from \"../generated/src/models/index\";\n\n/** Properties of a call connection */\nexport interface CallConnectionProperties {\n /** The call connection id. */\n callConnectionId?: string;\n /** The server call id. */\n serverCallId?: string;\n /**\n * The source caller Id, a phone number, that's shown to the PSTN participant being invited.\n * Required only when calling a PSTN callee.\n */\n sourceCallerIdNumber?: PhoneNumberIdentifier;\n /** Display name of the call if dialing out to a pstn number. */\n sourceDisplayName?: string;\n /** Source identity. */\n source?: CommunicationIdentifier;\n /** The targets of the call. */\n targetParticipants?: CommunicationIdentifier[];\n /** The state of the call connection. */\n callConnectionState?: CallConnectionStateModel;\n /** The callback URL. */\n callbackUrl?: string;\n /** Subscription for media streaming */\n mediaStreamingSubscription?: MediaStreamingSubscription;\n /** Subscription for transcription */\n transcriptionSubscription?: TranscriptionSubscription;\n /** The correlation ID. */\n correlationId?: string;\n /** Identity of the answering entity. Only populated when identity is provided in the request. */\n answeredby?: CommunicationUserIdentifier;\n /** Identity of the original Pstn target of an incoming Call. Only populated when the original target is a Pstn number. */\n answeredFor?: PhoneNumberIdentifier;\n}\n\n/** Contract model of an ACS call participant */\nexport interface CallParticipant {\n /** Communication identifier of the participant */\n identifier?: CommunicationIdentifier;\n /** Is participant muted */\n isMuted?: boolean;\n /** Is participant on hold. */\n isOnHold?: boolean;\n}\n\n/** The locator used for joining or taking action on a call. */\nexport interface CallLocator {\n id: string;\n kind: CallLocatorType;\n}\n\n/** Defines values for VoiceKind that the service accepts. */\nexport enum VoiceKind {\n /** Male */\n Male = \"male\",\n /** Female */\n Female = \"female\",\n}\n\n/** The PlaySource model. */\nexport interface PlaySource {\n /** @deprecated Not in use, instead use playsourcecacheid for similar functionality*/\n playsourcacheid?: string;\n}\n\n/** The FileSource model. */\nexport interface FileSource extends PlaySource {\n url: string;\n readonly kind: \"fileSource\";\n}\n\n/** The TextSource model. */\nexport interface TextSource extends PlaySource {\n text: string;\n sourceLocale?: string;\n voiceKind?: VoiceKind;\n voiceName?: string;\n customVoiceEndpointId?: string;\n readonly kind: \"textSource\";\n}\n\n/** The SsmlSource model. */\nexport interface SsmlSource extends PlaySource {\n ssmlText: string;\n customVoiceEndpointId?: string;\n readonly kind: \"ssmlSource\";\n}\n\n/** A Dtmf Tone. */\nexport enum DtmfTone {\n /** Zero */\n Zero = \"zero\",\n /** One */\n One = \"one\",\n /** Two */\n Two = \"two\",\n /** Three */\n Three = \"three\",\n /** Four */\n Four = \"four\",\n /** Five */\n Five = \"five\",\n /** Six */\n Six = \"six\",\n /** Seven */\n Seven = \"seven\",\n /** Eight */\n Eight = \"eight\",\n /** Nine */\n Nine = \"nine\",\n /** A */\n A = \"a\",\n /** B */\n B = \"b\",\n /** C */\n C = \"c\",\n /** D */\n D = \"d\",\n /** Pound */\n Pound = \"pound\",\n /** Asterisk */\n Asterisk = \"asterisk\",\n}\n\n/** A Recognition Choice */\nexport interface RecognitionChoice {\n /** Identifier for a given choice */\n label: string;\n /** List of phrases to recognize */\n phrases: string[];\n tone?: DtmfTone;\n}\n\n/** The type of the recognition that the service accepts. */\nexport enum RecognizeInputType {\n /** Dtmf */\n Dtmf = \"dtmf\",\n}\n\n/** Call invitee details. */\nexport interface CallInvite {\n /** The Target's PhoneNumberIdentifier, CommunicationUserIdentifier, MicrosoftTeamsUserIdentifier or MicrosoftTeamsAppIdentifier. */\n readonly targetParticipant:\n | PhoneNumberIdentifier\n | CommunicationUserIdentifier\n | MicrosoftTeamsUserIdentifier\n | MicrosoftTeamsAppIdentifier;\n /** Caller's phone number identifier. */\n readonly sourceCallIdNumber?: PhoneNumberIdentifier;\n sourceDisplayName?: string;\n /** Used by customer to send custom context to targets. */\n customCallingContext?: CustomCallingContext;\n}\n\n/** The locator type of a call. */\nexport type CallLocatorType = \"serverCallLocator\" | \"groupCallLocator\" | \"roomCallLocator\";\n\n/** The content type of a call recording. */\nexport type RecordingContent = \"audio\" | \"audioVideo\";\n\n/** The channel type of a call recording. */\nexport type RecordingChannel = \"mixed\" | \"unmixed\";\n\n/** The format type of a call recording. */\nexport type RecordingFormat = \"mp3\" | \"mp4\" | \"wav\";\n\n/** The format type of a call recording. */\nexport type RecordingKind = \"azureCommunicationServices\" | \"teams\" | \"teamsCompliance\";\n\n/** The storage type of a call recording. */\nexport type RecordingStorageKind = \"azureCommunicationServices\" | \"azureBlobStorage\";\n\n/** Channel affinity for a participant */\nexport interface ChannelAffinity {\n /** Channel number to which bitstream from a particular participant will be written. */\n channel?: number;\n /**\n * The identifier for the participant whose bitstream will be written to the channel\n * represented by the channel number.\n */\n targetParticipant: CommunicationIdentifier;\n}\n\n/** The recording storage */\nexport interface RecordingStorage {\n /** Defines the kind of recording storage */\n recordingStorageKind: RecordingStorageKind;\n /** Uri of a container or a location within a container */\n recordingDestinationContainerUrl?: string;\n}\n\ninterface CustomCallingContextHeader {\n key: string;\n value: string;\n}\n\n/** VOIP header. */\nexport interface VoipHeader extends CustomCallingContextHeader {\n kind: \"voip\";\n}\n\n/** SIP User To User header. */\nexport interface SipUserToUserHeader extends CustomCallingContextHeader {\n kind: \"sipuui\";\n}\n\n/** SIP Custom header. */\nexport interface SipCustomHeader extends CustomCallingContextHeader {\n kind: \"sipx\";\n}\n\n/** Custom Calling Context */\nexport type CustomCallingContext = (VoipHeader | SipUserToUserHeader | SipCustomHeader)[];\n\n/** AI options for the call. */\nexport interface CallIntelligenceOptions {\n /** The identifier of the Cognitive Service resource assigned to this call. */\n cognitiveServicesEndpoint?: string;\n}\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../src/models/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,OAAO,EAGL,qBAAqB,GAOtB,MAAM,+BAA+B,CAAC;AA+CvC,6DAA6D;AAC7D,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,WAAW;IACX,0BAAa,CAAA;IACb,aAAa;IACb,8BAAiB,CAAA;AACnB,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AA+BD,mBAAmB;AACnB,MAAM,CAAN,IAAY,QAiCX;AAjCD,WAAY,QAAQ;IAClB,WAAW;IACX,yBAAa,CAAA;IACb,UAAU;IACV,uBAAW,CAAA;IACX,UAAU;IACV,uBAAW,CAAA;IACX,YAAY;IACZ,2BAAe,CAAA;IACf,WAAW;IACX,yBAAa,CAAA;IACb,WAAW;IACX,yBAAa,CAAA;IACb,UAAU;IACV,uBAAW,CAAA;IACX,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,2BAAe,CAAA;IACf,WAAW;IACX,yBAAa,CAAA;IACb,QAAQ;IACR,mBAAO,CAAA;IACP,QAAQ;IACR,mBAAO,CAAA;IACP,QAAQ;IACR,mBAAO,CAAA;IACP,QAAQ;IACR,mBAAO,CAAA;IACP,YAAY;IACZ,2BAAe,CAAA;IACf,eAAe;IACf,iCAAqB,CAAA;AACvB,CAAC,EAjCW,QAAQ,KAAR,QAAQ,QAiCnB;AAWD,4DAA4D;AAC5D,MAAM,CAAN,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,WAAW;IACX,mCAAa,CAAA;AACf,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,QAG7B","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CommunicationIdentifier,\n CommunicationUserIdentifier,\n MicrosoftTeamsUserIdentifier,\n MicrosoftTeamsAppIdentifier,\n PhoneNumberIdentifier,\n} from \"@azure/communication-common\";\nimport { CallConnectionStateModel } from \"../generated/src\";\n\nexport {\n CallConnectionStateModel,\n CallRejectReason,\n KnownCallRejectReason,\n RecognitionType,\n ChoiceResult,\n DtmfResult,\n SpeechResult,\n RecordingState,\n Tone,\n} from \"../generated/src/models/index\";\n\n/** Properties of a call connection */\nexport interface CallConnectionProperties {\n /** The call connection id. */\n callConnectionId?: string;\n /** The server call id. */\n serverCallId?: string;\n /**\n * The source caller Id, a phone number, that's shown to the PSTN participant being invited.\n * Required only when calling a PSTN callee.\n */\n sourceCallerIdNumber?: PhoneNumberIdentifier;\n /** Display name of the call if dialing out to a pstn number. */\n sourceDisplayName?: string;\n /** Source identity. */\n source?: CommunicationIdentifier;\n /** The targets of the call. */\n targetParticipants?: CommunicationIdentifier[];\n /** The state of the call connection. */\n callConnectionState?: CallConnectionStateModel;\n /** The callback URL. */\n callbackUrl?: string;\n /** The correlation ID. */\n correlationId?: string;\n /** Identity of the answering entity. Only populated when identity is provided in the request. */\n answeredby?: CommunicationUserIdentifier;\n /** Identity of the original Pstn target of an incoming Call. Only populated when the original target is a Pstn number. */\n answeredFor?: PhoneNumberIdentifier;\n}\n\n/** Contract model of an ACS call participant */\nexport interface CallParticipant {\n /** Communication identifier of the participant */\n identifier?: CommunicationIdentifier;\n /** Is participant muted */\n isMuted?: boolean;\n /** Is participant on hold. */\n isOnHold?: boolean;\n}\n\n/** The locator used for joining or taking action on a call. */\nexport interface CallLocator {\n id: string;\n kind: CallLocatorType;\n}\n\n/** Defines values for VoiceKind that the service accepts. */\nexport enum VoiceKind {\n /** Male */\n Male = \"male\",\n /** Female */\n Female = \"female\",\n}\n\n/** The PlaySource model. */\nexport interface PlaySource {\n /** @deprecated Not in use, instead use playsourcecacheid for similar functionality*/\n playsourcacheid?: string;\n}\n\n/** The FileSource model. */\nexport interface FileSource extends PlaySource {\n url: string;\n readonly kind: \"fileSource\";\n}\n\n/** The TextSource model. */\nexport interface TextSource extends PlaySource {\n text: string;\n sourceLocale?: string;\n voiceKind?: VoiceKind;\n voiceName?: string;\n customVoiceEndpointId?: string;\n readonly kind: \"textSource\";\n}\n\n/** The SsmlSource model. */\nexport interface SsmlSource extends PlaySource {\n ssmlText: string;\n customVoiceEndpointId?: string;\n readonly kind: \"ssmlSource\";\n}\n\n/** A Dtmf Tone. */\nexport enum DtmfTone {\n /** Zero */\n Zero = \"zero\",\n /** One */\n One = \"one\",\n /** Two */\n Two = \"two\",\n /** Three */\n Three = \"three\",\n /** Four */\n Four = \"four\",\n /** Five */\n Five = \"five\",\n /** Six */\n Six = \"six\",\n /** Seven */\n Seven = \"seven\",\n /** Eight */\n Eight = \"eight\",\n /** Nine */\n Nine = \"nine\",\n /** A */\n A = \"a\",\n /** B */\n B = \"b\",\n /** C */\n C = \"c\",\n /** D */\n D = \"d\",\n /** Pound */\n Pound = \"pound\",\n /** Asterisk */\n Asterisk = \"asterisk\",\n}\n\n/** A Recognition Choice */\nexport interface RecognitionChoice {\n /** Identifier for a given choice */\n label: string;\n /** List of phrases to recognize */\n phrases: string[];\n tone?: DtmfTone;\n}\n\n/** The type of the recognition that the service accepts. */\nexport enum RecognizeInputType {\n /** Dtmf */\n Dtmf = \"dtmf\",\n}\n\n/** Call invitee details. */\nexport interface CallInvite {\n /** The Target's PhoneNumberIdentifier, CommunicationUserIdentifier, MicrosoftTeamsUserIdentifier or MicrosoftTeamsAppIdentifier. */\n readonly targetParticipant:\n | PhoneNumberIdentifier\n | CommunicationUserIdentifier\n | MicrosoftTeamsUserIdentifier\n | MicrosoftTeamsAppIdentifier;\n /** Caller's phone number identifier. */\n readonly sourceCallIdNumber?: PhoneNumberIdentifier;\n sourceDisplayName?: string;\n /** Used by customer to send custom context to targets. */\n customCallingContext?: CustomCallingContext;\n}\n\n/** The locator type of a call. */\nexport type CallLocatorType = \"serverCallLocator\" | \"groupCallLocator\" | \"roomCallLocator\";\n\n/** The content type of a call recording. */\nexport type RecordingContent = \"audio\" | \"audioVideo\";\n\n/** The channel type of a call recording. */\nexport type RecordingChannel = \"mixed\" | \"unmixed\";\n\n/** The format type of a call recording. */\nexport type RecordingFormat = \"mp3\" | \"mp4\" | \"wav\";\n\n/** The format type of a call recording. */\nexport type RecordingKind = \"azureCommunicationServices\" | \"teams\" | \"teamsCompliance\";\n\n/** The storage type of a call recording. */\nexport type RecordingStorageKind = \"azureCommunicationServices\" | \"azureBlobStorage\";\n\n/** Channel affinity for a participant */\nexport interface ChannelAffinity {\n /** Channel number to which bitstream from a particular participant will be written. */\n channel?: number;\n /**\n * The identifier for the participant whose bitstream will be written to the channel\n * represented by the channel number.\n */\n targetParticipant: CommunicationIdentifier;\n}\n\n/** The recording storage */\nexport interface RecordingStorage {\n /** Defines the kind of recording storage */\n recordingStorageKind: RecordingStorageKind;\n /** Uri of a container or a location within a container */\n recordingDestinationContainerUrl?: string;\n}\n\ninterface CustomCallingContextHeader {\n key: string;\n value: string;\n}\n\n/** VOIP header. */\nexport interface VoipHeader extends CustomCallingContextHeader {\n kind: \"voip\";\n}\n\n/** SIP User To User header. */\nexport interface SipUserToUserHeader extends CustomCallingContextHeader {\n kind: \"sipuui\";\n}\n\n/** SIP Custom header. */\nexport interface SipCustomHeader extends CustomCallingContextHeader {\n kind: \"sipx\";\n}\n\n/** Custom Calling Context */\nexport type CustomCallingContext = (VoipHeader | SipUserToUserHeader | SipCustomHeader)[];\n\n/** AI options for the call. */\nexport interface CallIntelligenceOptions {\n /** The identifier of the Cognitive Service resource assigned to this call. */\n cognitiveServicesEndpoint?: string;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { PhoneNumberIdentifier, CommunicationIdentifier } from \"@azure/communication-common\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n MediaStreamingOptions,\n TranscriptionOptions,\n CallRejectReason,\n FileSource,\n TextSource,\n SsmlSource,\n DtmfTone,\n RecognitionChoice,\n RecordingContent,\n RecordingChannel,\n RecordingFormat,\n RecordingStorage,\n CallLocator,\n ChannelAffinity,\n CallIntelligenceOptions,\n CustomCallingContext,\n} from \"./models\";\n\n/** Options to configure the recognize operation. */\nexport interface CallMediaRecognizeOptions extends OperationOptions {\n /** The source of the audio to be played for recognition. */\n playPrompt?: FileSource | TextSource | SsmlSource;\n /** The list source of the audio to be played for recognition. */\n playPrompts?: (FileSource | TextSource | SsmlSource)[];\n /** If set recognize can barge into other existing queued-up/currently-processing requests. */\n interruptCallMediaOperation?: boolean;\n /** @deprecated Not in use, instead use interruptCallMediaOperation for similar functionality*/\n stopCurrentOperations?: boolean;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /** Determines if we interrupt the prompt and start recognizing. */\n interruptPrompt?: boolean;\n /** Time to wait for first input after prompt. */\n initialSilenceTimeoutInSeconds?: number;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/** The recognize configuration specific to Dtmf. */\nexport interface CallMediaRecognizeDtmfOptions extends CallMediaRecognizeOptions {\n /** Time to wait between DTMF inputs to stop recognizing. */\n interToneTimeoutInSeconds?: number;\n /** List of tones that will stop recognizing. */\n stopDtmfTones?: DtmfTone[];\n /** Maximum number of DTMF tones to be collected. */\n maxTonesToCollect?: number;\n readonly kind: \"callMediaRecognizeDtmfOptions\";\n}\n\n/** The recognize configuration specific to Choices. */\nexport interface CallMediaRecognizeChoiceOptions extends CallMediaRecognizeOptions {\n /** The IvR choices for recognize. */\n choices: RecognitionChoice[];\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeChoiceOptions\";\n}\n\n/** The recognize configuration specific to Speech. */\nexport interface CallMediaRecognizeSpeechOptions extends CallMediaRecognizeOptions {\n /** The length of end silence when user stops speaking and cogservice send response. */\n endSilenceTimeoutInSeconds?: number;\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeSpeechOptions\";\n}\n\n/** The recognize configuration for Speech or Dtmf */\nexport interface CallMediaRecognizeSpeechOrDtmfOptions extends CallMediaRecognizeOptions {\n /** The length of end silence when user stops speaking and cogservice send response. */\n endSilenceTimeoutInSeconds?: number;\n /** Time to wait between DTMF inputs to stop recognizing. */\n interToneTimeoutInSeconds?: number;\n /** List of tones that will stop recognizing. */\n stopDtmfTones?: DtmfTone[];\n /** Maximum number of DTMF tones to be collected. */\n maxTonesToCollect?: number;\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeSpeechOrDtmfOptions\";\n}\n\n/**\n * Options to create a call.\n */\nexport interface CreateCallOptions extends OperationOptions {\n /**\n * The source caller Id, a phone number, that's shown to the PSTN participant being invited.\n * Required only when calling a PSTN callee.\n */\n sourceCallIdNumber?: PhoneNumberIdentifier;\n /** Display name of the call if dialing out to a pstn number */\n sourceDisplayName?: string;\n /** The operation context. */\n operationContext?: string;\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n /** Configuration of Media streaming. */\n mediaStreamingOptions?: MediaStreamingOptions;\n /** Configuration of live transcription. */\n transcriptionOptions?: TranscriptionOptions;\n}\n\n/**\n * Options to answer a call.\n */\nexport interface AnswerCallOptions extends OperationOptions {\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n /** Configuration of Media streaming. */\n mediaStreamingOptions?: MediaStreamingOptions;\n /** Configuration of live transcription. */\n transcriptionOptions?: TranscriptionOptions;\n /** The operation context. */\n operationContext?: string;\n}\n\n/**\n * Options to redirect call.\n */\nexport type RedirectCallOptions = OperationOptions;\n/**\n * Options to reject call.\n */\nexport interface RejectCallOptions extends OperationOptions {\n /** The rejection reason. */\n callRejectReason?: CallRejectReason;\n}\n\n/**\n * Options to transfer participants.\n */\nexport interface TransferCallToParticipantOptions extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** Transferee is the participant who is transferred away. */\n transferee?: CommunicationIdentifier;\n /** Used by customer to send custom context to targets. */\n customCallingContext?: CustomCallingContext;\n /** The source caller Id, a phone number, that's will be used as the transferor's(Contoso) caller id when transfering a call a pstn target. */\n sourceCallIdNumber?: PhoneNumberIdentifier;\n}\n\n/** Options to add participants. */\nexport interface AddParticipantOptions extends OperationOptions {\n /**\n * Gets or sets the timeout to wait for the invited participant to pickup.\n * The maximum value of this is 180 seconds\n */\n invitationTimeoutInSeconds?: number;\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to remove participants.\n */\nexport interface RemoveParticipantsOption extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to mute participant.\n */\nexport interface MuteParticipantOption extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n}\n\n/**\n * Options to play audio.\n */\nexport interface PlayOptions extends OperationOptions {\n /** Determine if it is looping */\n loop?: boolean;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to playToAll audio.\n */\nexport interface PlayToAllOptions extends PlayOptions {\n /** If set play can barge into other existing queued-up/currently-processing requests. */\n interruptCallMediaOperation?: boolean;\n}\n\n/**\n * Options to get call connection properties.\n */\nexport type GetCallConnectionPropertiesOptions = OperationOptions;\n\n/**\n * Options to hang up the call\n */\nexport type HangUpOptions = OperationOptions;\n\n/**\n * Options to get a participant.\n */\nexport type GetParticipantOptions = OperationOptions;\n\n/**\n * Options to get a start a recording.\n */\nexport interface StartRecordingOptions extends OperationOptions {\n /** The call locator. */\n callLocator: CallLocator;\n /** The url to send notifications to. */\n recordingStateCallbackEndpointUrl?: string;\n /** The content type of call recording. */\n recordingContent?: RecordingContent;\n /** The channel type of call recording. */\n recordingChannel?: RecordingChannel;\n /** The format type of call recording. */\n recordingFormat?: RecordingFormat;\n /** Recording storage option. */\n recordingStorage?: RecordingStorage;\n /** Pause on start call recording option. */\n pauseOnStart?: boolean;\n /**\n * The sequential order in which audio channels are assigned to participants in the unmixed recording.\n * When 'recordingChannelType' is set to 'unmixed' and `audioChannelParticipantOrdering` is not specified,\n * the audio channel to participant mapping will be automatically assigned based on the order in which participant\n * first audio was detected. Channel to participant mapping details can be found in the metadata of the recording.\n */\n audioChannelParticipantOrdering?: CommunicationIdentifier[];\n /**\n * The channel affinity of call recording\n * When 'recordingChannelType' is set to 'unmixed', if channelAffinity is not specified, 'channel' will be automatically assigned.\n * Channel-Participant mapping details can be found in the metadata of the recording.\n */\n channelAffinity?: ChannelAffinity[];\n}\n\n/**\n * Options to get a stop a recording.\n */\nexport type StopRecordingOptions = OperationOptions;\n\n/**\n * Options to get a pause a recording.\n */\nexport type PauseRecordingOptions = OperationOptions;\n\n/**\n * Options to get recording properties.\n */\nexport type GetRecordingPropertiesOptions = OperationOptions;\n\n/**\n * Options to resume recording.\n */\nexport type ResumeRecordingOptions = OperationOptions;\n\n/**\n * Options to delete recording.\n */\nexport type DeleteRecordingOptions = OperationOptions;\n\n/**\n * Options to download recording.\n */\nexport interface DownloadRecordingOptions extends OperationOptions {\n /** Offset byte to start download from. */\n offset?: number;\n /** Max content length in bytes. */\n length?: number;\n}\n\n/**\n * Options to continuous Dtmf recognition.\n */\nexport interface ContinuousDtmfRecognitionOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to send Dtmf tones.\n */\nexport interface SendDtmfTonesOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/** Options for cancelling add participant request. */\nexport interface CancelAddParticipantOperationOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to Connect request.\n */\nexport interface ConnectCallOptions extends OperationOptions {\n /** Used by customers to correlate the request to the response event. */\n operationContext?: string;\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n}\n\n/**\n * Options to start transcription\n */\nexport interface StartTranscriptionOptions extends OperationOptions {\n /** Defines Locale for the transcription e,g en-US */\n locale?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n}\n\n/**\n * Options to update transcription\n */\nexport interface UpdateTranscriptionOptions extends OperationOptions {\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n\n/**\n * Options to stop transcription\n */\nexport interface StopTranscriptionOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n\n/**\n * Options to hold participant.\n */\nexport interface HoldOptions extends OperationOptions {\n /** A PlaySource representing the source to play. */\n playSource?: FileSource | TextSource | SsmlSource;\n /** Operation Context. */\n operationContext?: string;\n /** Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation. */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to Unhold participant.\n */\nexport interface UnholdOptions extends OperationOptions {\n /** Operation Context. */\n operationContext?: string;\n}\n\n/** Options for start media streaming request. */\nexport interface StartMediaStreamingOptions extends OperationOptions {\n /**\n * Set a callback URL that overrides the default callback URI set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n\n/** Options for stop media streaming request. */\nexport interface StopMediaStreamingOptions extends OperationOptions {\n /**\n * Set a callback URL that overrides the default callback URI set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** The value to identify context of the operation. */\n operationContext?: string;\n}\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../../src/models/options.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { PhoneNumberIdentifier, CommunicationIdentifier } from \"@azure/communication-common\";\nimport { OperationOptions } from \"@azure/core-client\";\nimport {\n CallRejectReason,\n FileSource,\n TextSource,\n SsmlSource,\n DtmfTone,\n RecognitionChoice,\n RecordingContent,\n RecordingChannel,\n RecordingFormat,\n RecordingStorage,\n CallLocator,\n ChannelAffinity,\n CallIntelligenceOptions,\n CustomCallingContext,\n} from \"./models\";\n\n/** Options to configure the recognize operation. */\nexport interface CallMediaRecognizeOptions extends OperationOptions {\n /** The source of the audio to be played for recognition. */\n playPrompt?: FileSource | TextSource | SsmlSource;\n /** The list source of the audio to be played for recognition. */\n playPrompts?: (FileSource | TextSource | SsmlSource)[];\n /** If set recognize can barge into other existing queued-up/currently-processing requests. */\n interruptCallMediaOperation?: boolean;\n /** @deprecated Not in use, instead use interruptCallMediaOperation for similar functionality*/\n stopCurrentOperations?: boolean;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /** Determines if we interrupt the prompt and start recognizing. */\n interruptPrompt?: boolean;\n /** Time to wait for first input after prompt. */\n initialSilenceTimeoutInSeconds?: number;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/** The recognize configuration specific to Dtmf. */\nexport interface CallMediaRecognizeDtmfOptions extends CallMediaRecognizeOptions {\n /** Time to wait between DTMF inputs to stop recognizing. */\n interToneTimeoutInSeconds?: number;\n /** List of tones that will stop recognizing. */\n stopDtmfTones?: DtmfTone[];\n /** Maximum number of DTMF tones to be collected. */\n maxTonesToCollect?: number;\n readonly kind: \"callMediaRecognizeDtmfOptions\";\n}\n\n/** The recognize configuration specific to Choices. */\nexport interface CallMediaRecognizeChoiceOptions extends CallMediaRecognizeOptions {\n /** The IvR choices for recognize. */\n choices: RecognitionChoice[];\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeChoiceOptions\";\n}\n\n/** The recognize configuration specific to Speech. */\nexport interface CallMediaRecognizeSpeechOptions extends CallMediaRecognizeOptions {\n /** The length of end silence when user stops speaking and cogservice send response. */\n endSilenceTimeoutInSeconds?: number;\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeSpeechOptions\";\n}\n\n/** The recognize configuration for Speech or Dtmf */\nexport interface CallMediaRecognizeSpeechOrDtmfOptions extends CallMediaRecognizeOptions {\n /** The length of end silence when user stops speaking and cogservice send response. */\n endSilenceTimeoutInSeconds?: number;\n /** Time to wait between DTMF inputs to stop recognizing. */\n interToneTimeoutInSeconds?: number;\n /** List of tones that will stop recognizing. */\n stopDtmfTones?: DtmfTone[];\n /** Maximum number of DTMF tones to be collected. */\n maxTonesToCollect?: number;\n /** Speech language to be recognized, If not set default is en-US */\n speechLanguage?: string;\n /** Endpoint where the custom model was deployed. */\n speechRecognitionModelEndpointId?: string;\n readonly kind: \"callMediaRecognizeSpeechOrDtmfOptions\";\n}\n\n/**\n * Options to create a call.\n */\nexport interface CreateCallOptions extends OperationOptions {\n /**\n * The source caller Id, a phone number, that's shown to the PSTN participant being invited.\n * Required only when calling a PSTN callee.\n */\n sourceCallIdNumber?: PhoneNumberIdentifier;\n /** Display name of the call if dialing out to a pstn number */\n sourceDisplayName?: string;\n /** The operation context. */\n operationContext?: string;\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n}\n\n/**\n * Options to answer a call.\n */\nexport interface AnswerCallOptions extends OperationOptions {\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n /** The operation context. */\n operationContext?: string;\n}\n\n/**\n * Options to redirect call.\n */\nexport type RedirectCallOptions = OperationOptions;\n/**\n * Options to reject call.\n */\nexport interface RejectCallOptions extends OperationOptions {\n /** The rejection reason. */\n callRejectReason?: CallRejectReason;\n}\n\n/**\n * Options to transfer participants.\n */\nexport interface TransferCallToParticipantOptions extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n /** Transferee is the participant who is transferred away. */\n transferee?: CommunicationIdentifier;\n /** Used by customer to send custom context to targets. */\n customCallingContext?: CustomCallingContext;\n /** The source caller Id, a phone number, that's will be used as the transferor's(Contoso) caller id when transfering a call a pstn target. */\n sourceCallIdNumber?: PhoneNumberIdentifier;\n}\n\n/** Options to add participants. */\nexport interface AddParticipantOptions extends OperationOptions {\n /**\n * Gets or sets the timeout to wait for the invited participant to pickup.\n * The maximum value of this is 180 seconds\n */\n invitationTimeoutInSeconds?: number;\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to remove participants.\n */\nexport interface RemoveParticipantsOption extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to mute participant.\n */\nexport interface MuteParticipantOption extends OperationOptions {\n /** Used by customers when calling mid-call actions to correlate the request to the response event. */\n operationContext?: string;\n}\n\n/**\n * Options to play audio.\n */\nexport interface PlayOptions extends OperationOptions {\n /** Determine if it is looping */\n loop?: boolean;\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to playToAll audio.\n */\nexport interface PlayToAllOptions extends PlayOptions {\n /** If set play can barge into other existing queued-up/currently-processing requests. */\n interruptCallMediaOperation?: boolean;\n}\n\n/**\n * Options to get call connection properties.\n */\nexport type GetCallConnectionPropertiesOptions = OperationOptions;\n\n/**\n * Options to hang up the call\n */\nexport type HangUpOptions = OperationOptions;\n\n/**\n * Options to get a participant.\n */\nexport type GetParticipantOptions = OperationOptions;\n\n/**\n * Options to get a start a recording.\n */\nexport interface StartRecordingOptions extends OperationOptions {\n /** The call locator. */\n callLocator: CallLocator;\n /** The url to send notifications to. */\n recordingStateCallbackEndpointUrl?: string;\n /** The content type of call recording. */\n recordingContent?: RecordingContent;\n /** The channel type of call recording. */\n recordingChannel?: RecordingChannel;\n /** The format type of call recording. */\n recordingFormat?: RecordingFormat;\n /** Recording storage option. */\n recordingStorage?: RecordingStorage;\n /** Pause on start call recording option. */\n pauseOnStart?: boolean;\n /**\n * The sequential order in which audio channels are assigned to participants in the unmixed recording.\n * When 'recordingChannelType' is set to 'unmixed' and `audioChannelParticipantOrdering` is not specified,\n * the audio channel to participant mapping will be automatically assigned based on the order in which participant\n * first audio was detected. Channel to participant mapping details can be found in the metadata of the recording.\n */\n audioChannelParticipantOrdering?: CommunicationIdentifier[];\n /**\n * The channel affinity of call recording\n * When 'recordingChannelType' is set to 'unmixed', if channelAffinity is not specified, 'channel' will be automatically assigned.\n * Channel-Participant mapping details can be found in the metadata of the recording.\n */\n channelAffinity?: ChannelAffinity[];\n}\n\n/**\n * Options to get a stop a recording.\n */\nexport type StopRecordingOptions = OperationOptions;\n\n/**\n * Options to get a pause a recording.\n */\nexport type PauseRecordingOptions = OperationOptions;\n\n/**\n * Options to get recording properties.\n */\nexport type GetRecordingPropertiesOptions = OperationOptions;\n\n/**\n * Options to resume recording.\n */\nexport type ResumeRecordingOptions = OperationOptions;\n\n/**\n * Options to delete recording.\n */\nexport type DeleteRecordingOptions = OperationOptions;\n\n/**\n * Options to download recording.\n */\nexport interface DownloadRecordingOptions extends OperationOptions {\n /** Offset byte to start download from. */\n offset?: number;\n /** Max content length in bytes. */\n length?: number;\n}\n\n/**\n * Options to continuous Dtmf recognition.\n */\nexport interface ContinuousDtmfRecognitionOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to send Dtmf tones.\n */\nexport interface SendDtmfTonesOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/** Options for cancelling add participant request. */\nexport interface CancelAddParticipantOperationOptions extends OperationOptions {\n /** The value to identify context of the operation. */\n operationContext?: string;\n /**\n * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation.\n * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used.\n */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to Connect request.\n */\nexport interface ConnectCallOptions extends OperationOptions {\n /** Used by customers to correlate the request to the response event. */\n operationContext?: string;\n /** AI options for the call. */\n callIntelligenceOptions?: CallIntelligenceOptions;\n}\n\n/**\n * Options to hold participant.\n */\nexport interface HoldOptions extends OperationOptions {\n /** A PlaySource representing the source to play. */\n playSource?: FileSource | TextSource | SsmlSource;\n /** Operation Context. */\n operationContext?: string;\n /** Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation. */\n operationCallbackUrl?: string;\n}\n\n/**\n * Options to Unhold participant.\n */\nexport interface UnholdOptions extends OperationOptions {\n /** Operation Context. */\n operationContext?: string;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  export {};
4
4
  //# sourceMappingURL=responses.js.map
@@ -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 { CallConnection } from \"../callConnection\";\nimport { CallConnectionProperties, CallParticipant } from \"./models\";\nimport { RecordingState, RecordingKind } from \"../generated/src\";\n\n/**\n * The interface used as parent of [action]CallResult\n */\ninterface 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/** 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\n/**\n * Connect call result\n */\nexport type ConnectCallResult = CallResult;\n"]}
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 { CallConnection } from \"../callConnection\";\nimport { CallConnectionProperties, CallParticipant } from \"./models\";\nimport { RecordingState, RecordingKind } from \"../generated/src\";\n\n/**\n * The interface used as parent of [action]CallResult\n */\ninterface 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/** 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\n/**\n * Connect call result\n */\nexport type ConnectCallResult = CallResult;\n"]}
@@ -1,7 +1,7 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
2
+ // Licensed under the MIT License.
3
3
  import { serializeCommunicationIdentifier, isCommunicationUserIdentifier, isPhoneNumberIdentifier, isUnknownIdentifier, isMicrosoftTeamsUserIdentifier, isMicrosoftTeamsAppIdentifier, } from "@azure/communication-common";
4
- import { KnownCommunicationIdentifierModelKind, } from "../generated/src";
4
+ import { KnownCommunicationIdentifierModelKind } from "../generated/src";
5
5
  function extractKind(identifierModel) {
6
6
  if (identifierModel.communicationUser !== undefined) {
7
7
  return KnownCommunicationIdentifierModelKind.CommunicationUser;
@@ -1 +1 @@
1
- {"version":3,"file":"converters.js","sourceRoot":"","sources":["../../../src/utli/converters.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAIL,gCAAgC,EAGhC,6BAA6B,EAC7B,uBAAuB,EACvB,mBAAmB,EAEnB,8BAA8B,EAE9B,6BAA6B,GAE9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAKL,qCAAqC,GAGtC,MAAM,kBAAkB,CAAC;AAG1B,SAAS,WAAW,CAClB,eAA6C;IAE7C,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,qCAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,qCAAqC,CAAC,WAAW,CAAC;IAC3D,CAAC;IACD,IAAI,eAAe,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;QACrD,OAAO,qCAAqC,CAAC,kBAAkB,CAAC;IAClE,CAAC;IACD,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,qCAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,OAAO,qCAAqC,CAAC,OAAO,CAAC;AACvD,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,mCAAmC,CACjD,qBAAwD;IAExD,IAAI,qBAAqB,KAAK,SAAS,IAAI,qBAAqB,CAAC,WAAW,KAAK,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;IACnB,CAAC;IAED,OAAO,EAAE,mBAAmB,EAAE,UAAU,CAAC,EAAE,EAAE,CAAC;AAChD,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n PhoneNumberIdentifier,\n CommunicationUserIdentifier,\n UnknownIdentifier,\n serializeCommunicationIdentifier,\n SerializedPhoneNumberIdentifier,\n CommunicationIdentifier,\n isCommunicationUserIdentifier,\n isPhoneNumberIdentifier,\n isUnknownIdentifier,\n SerializedCommunicationIdentifier,\n isMicrosoftTeamsUserIdentifier,\n MicrosoftTeamsUserIdentifier,\n isMicrosoftTeamsAppIdentifier,\n MicrosoftTeamsAppIdentifier,\n} from \"@azure/communication-common\";\nimport {\n CallParticipantInternal,\n CommunicationIdentifierModel,\n CommunicationIdentifierModelKind,\n KnownCommunicationCloudEnvironmentModel,\n KnownCommunicationIdentifierModelKind,\n PhoneNumberIdentifierModel,\n CommunicationUserIdentifierModel,\n} from \"../generated/src\";\nimport { CallParticipant } from \"../models/models\";\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"]}
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;AASrC,OAAO,EAAE,qCAAqC,EAAE,MAAM,kBAAkB,CAAC;AAGzE,SAAS,WAAW,CAClB,eAA6C;IAE7C,IAAI,eAAe,CAAC,iBAAiB,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,qCAAqC,CAAC,iBAAiB,CAAC;IACjE,CAAC;IACD,IAAI,eAAe,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QAC9C,OAAO,qCAAqC,CAAC,WAAW,CAAC;IAC3D,CAAC;IACD,IAAI,eAAe,CAAC,kBAAkB,KAAK,SAAS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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","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} from \"../generated/src\";\nimport { KnownCommunicationIdentifierModelKind } from \"../generated/src\";\nimport type { CallParticipant } from \"../models/models\";\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-call-automation",
3
- "version": "1.3.0-beta.2",
3
+ "version": "1.3.0",
4
4
  "description": "Azure client library for Azure Communication Call Automation services",
5
5
  "sdk-type": "client",
6
6
  "main": "dist/index.js",
@@ -10,31 +10,31 @@
10
10
  "./dist-esm/src/credential/cryptoUtils.js": "./dist-esm/src/credential/cryptoUtils.browser.js"
11
11
  },
12
12
  "scripts": {
13
- "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
13
+ "build": "npm run clean && tsc -p . && dev-tool run bundle && dev-tool run extract-api",
14
14
  "build:autorest": "autorest ./swagger/README.md && rushx format",
15
15
  "build:browser": "tsc -p . && dev-tool run bundle",
16
16
  "build:node": "tsc -p . && dev-tool run bundle",
17
17
  "build:samples": "dev-tool samples publish --force",
18
18
  "build:test": "tsc -p . && dev-tool run bundle",
19
- "build": "npm run clean && tsc -p . && dev-tool run bundle && dev-tool run extract-api",
20
19
  "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
21
- "clean": "rimraf --glob dist dist-* temp types *.tgz *.log",
20
+ "clean": "dev-tool run vendored rimraf --glob dist dist-* temp types *.tgz *.log",
22
21
  "execute:samples": "dev-tool samples run samples-dev",
23
22
  "extract-api": "tsc -p . && dev-tool run extract-api",
24
23
  "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
25
24
  "generate:client": "autorest --typescript ./swagger/README.md && rushx format",
25
+ "integration-test": "npm run integration-test:node && npm run integration-test:browser",
26
26
  "integration-test:browser": "echo skipped",
27
27
  "integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
28
- "integration-test": "npm run integration-test:node && npm run integration-test:browser",
29
- "lint:fix": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js --fix --fix-type [problem,suggestion]",
30
- "lint": "eslint package.json api-extractor.json README.md src test --ext .ts,.javascript,.js",
28
+ "lint": "eslint package.json api-extractor.json README.md src test",
29
+ "lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]",
31
30
  "pack": "npm pack 2>&1",
31
+ "test": "npm run build:test && npm run unit-test && npm run integration-test",
32
32
  "test:browser": "npm run build:test && npm run unit-test:browser",
33
33
  "test:node": "npm run build:test && npm run unit-test:node",
34
- "test": "npm run build:test && npm run unit-test && npm run integration-test",
34
+ "unit-test": "npm run unit-test:node && npm run unit-test:browser",
35
35
  "unit-test:browser": "echo skipped",
36
36
  "unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 --exclude 'test/**/browser/*.spec.ts' 'test/**/*.spec.ts'",
37
- "unit-test": "npm run unit-test:node && npm run unit-test:browser"
37
+ "update-snippets": "echo skipped"
38
38
  },
39
39
  "files": [
40
40
  "dist/",
@@ -74,7 +74,7 @@
74
74
  }
75
75
  },
76
76
  "dependencies": {
77
- "@azure/abort-controller": "^1.0.0",
77
+ "@azure/abort-controller": "^2.0.0",
78
78
  "@azure/communication-common": "^2.3.1",
79
79
  "@azure/core-auth": "^1.3.0",
80
80
  "@azure/core-client": "^1.3.0",
@@ -94,15 +94,13 @@
94
94
  "@azure/dev-tool": "^1.0.0",
95
95
  "@azure/eslint-plugin-azure-sdk": "^3.0.0",
96
96
  "@azure/service-bus": "^7.8.1",
97
- "@microsoft/api-extractor": "^7.31.1",
98
97
  "@types/chai": "^4.1.6",
99
98
  "@types/mocha": "^10.0.0",
100
99
  "@types/node": "^18.0.0",
101
100
  "@types/sinon": "^17.0.0",
102
101
  "chai": "^4.2.0",
103
- "cross-env": "^7.0.2",
104
102
  "dotenv": "^16.0.0",
105
- "eslint": "^8.0.0",
103
+ "eslint": "^9.9.0",
106
104
  "inherits": "^2.0.3",
107
105
  "karma": "^6.2.0",
108
106
  "karma-chrome-launcher": "^3.0.0",
@@ -116,10 +114,9 @@
116
114
  "karma-sourcemap-loader": "^0.3.8",
117
115
  "mocha": "^10.0.0",
118
116
  "nyc": "^17.0.0",
119
- "rimraf": "^5.0.5",
120
117
  "sinon": "^17.0.0",
121
118
  "ts-node": "^10.0.0",
122
- "typescript": "~5.5.3",
119
+ "typescript": "~5.6.2",
123
120
  "util": "^0.12.1"
124
121
  }
125
122
  }