diff --git a/sdk/communication/communication-call-automation/review/communication-call-automation.api.md b/sdk/communication/communication-call-automation/review/communication-call-automation.api.md index 16d3e16116e5..b6d9ad5d45d8 100644 --- a/sdk/communication/communication-call-automation/review/communication-call-automation.api.md +++ b/sdk/communication/communication-call-automation/review/communication-call-automation.api.md @@ -98,13 +98,12 @@ export interface AnswerFailed extends Omit { + return this.client.sendOperationRequest( + { recordingId, options }, + getRecordingResultOperationSpec, + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -119,9 +136,6 @@ const startRecordingOperationSpec: coreClient.OperationSpec = { 200: { bodyMapper: Mappers.RecordingStateResponse, }, - 202: { - bodyMapper: Mappers.RecordingStateResponse, - }, default: { bodyMapper: Mappers.CommunicationErrorResponse, }, @@ -196,3 +210,19 @@ const resumeRecordingOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer, }; +const getRecordingResultOperationSpec: coreClient.OperationSpec = { + path: "/calling/recordings/{recordingId}/result", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.RecordingResultResponse, + }, + default: { + bodyMapper: Mappers.CommunicationErrorResponse, + }, + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.endpoint, Parameters.recordingId], + headerParameters: [Parameters.accept], + serializer, +}; diff --git a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts index b4dd60293ae8..9e3e04e40640 100644 --- a/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts +++ b/sdk/communication/communication-call-automation/src/generated/src/operationsInterfaces/callRecording.ts @@ -15,6 +15,8 @@ import { CallRecordingStopRecordingOptionalParams, CallRecordingPauseRecordingOptionalParams, CallRecordingResumeRecordingOptionalParams, + CallRecordingGetRecordingResultOptionalParams, + CallRecordingGetRecordingResultResponse, } from "../models/index.js"; /** Interface representing a CallRecording. */ @@ -64,4 +66,13 @@ export interface CallRecording { recordingId: string, options?: CallRecordingResumeRecordingOptionalParams, ): Promise; + /** + * Get recording result. This includes the download URLs for the recording chunks. + * @param recordingId The recording id. + * @param options The options parameters. + */ + getRecordingResult( + recordingId: string, + options?: CallRecordingGetRecordingResultOptionalParams, + ): Promise; } diff --git a/sdk/communication/communication-call-automation/src/models/models.ts b/sdk/communication/communication-call-automation/src/models/models.ts index eb3ecaafaaf2..414b9a852b8e 100644 --- a/sdk/communication/communication-call-automation/src/models/models.ts +++ b/sdk/communication/communication-call-automation/src/models/models.ts @@ -182,10 +182,10 @@ export enum RecognizeInputType { export interface CallInvite { /** The Target's PhoneNumberIdentifier, CommunicationUserIdentifier, MicrosoftTeamsUserIdentifier or MicrosoftTeamsAppIdentifier. */ readonly targetParticipant: - | PhoneNumberIdentifier - | CommunicationUserIdentifier - | MicrosoftTeamsUserIdentifier - | MicrosoftTeamsAppIdentifier; + | PhoneNumberIdentifier + | CommunicationUserIdentifier + | MicrosoftTeamsUserIdentifier + | MicrosoftTeamsAppIdentifier; /** Caller's phone number identifier. */ readonly sourceCallIdNumber?: PhoneNumberIdentifier; sourceDisplayName?: string; @@ -257,4 +257,6 @@ export type CustomCallingContext = (VoipHeader | SipUserToUserHeader | SipCustom export interface CallIntelligenceOptions { /** The identifier of the Cognitive Service resource assigned to this call. */ cognitiveServicesEndpoint?: string; + /** A backup identifier of the Cognitive Service resource assigned to this call. */ + backupCognitiveServicesEndpoint?: string; } diff --git a/sdk/communication/communication-call-automation/swagger/README.md b/sdk/communication/communication-call-automation/swagger/README.md index c481be4f17e2..679ed8277aaf 100644 --- a/sdk/communication/communication-call-automation/swagger/README.md +++ b/sdk/communication/communication-call-automation/swagger/README.md @@ -13,7 +13,7 @@ license-header: MICROSOFT_MIT_NO_VERSION output-folder: ../src/generated tag: package-2024-09-01-preview require: - - https://github.com/Azure/azure-rest-api-specs/blob/691fea3efb9ff22b20904e92d5116223f452a3b1/specification/communication/data-plane/CallAutomation/readme.md + - https://github.com/Azure/azure-rest-api-specs/blob/d1bedfa9c084a2e3f9cbeb075c532d691c3c0095/specification/communication/data-plane/CallAutomation/readme.md package-version: 1.4.0-beta.2 model-date-time-as-string: false optional-response-headers: true