Skip to content

Commit d978140

Browse files
Auto gererated code with latest swagger changes (Azure#25858)
### Packages impacted by this PR @azure/communication-call-automation ### Issues associated with this PR ### Describe the problem that is addressed by this PR API review fixes for send and continuous DTMF. Added operation_context in ContinuousDtmfRecognitionToneFailed, ContinuousDtmfRecognitionToneReceived - Removed participant_id from ToneInfo - Changed args order for send_dtmf - Auto generated code as per latest swagger ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? ### Are there test cases added in this PR? _(If not, why?)_ Yes ### Provide a list of related PRs _(if any)_ Azure/azure-rest-api-specs@25ea7bc Azure/azure-rest-api-specs@885b18f ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [X] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [ ] Added a changelog (if necessary)
1 parent 1ad7a9f commit d978140

File tree

7 files changed

+70
-53
lines changed

7 files changed

+70
-53
lines changed

sdk/communication/communication-call-automation/review/communication-call-automation.api.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class CallMedia {
161161
play(playSource: FileSource, playTo: CommunicationIdentifier[], playOptions?: PlayOptions): Promise<void>;
162162
playToAll(playSource: FileSource, playOptions?: PlayOptions): Promise<void>;
163163
// Warning: (ae-forgotten-export) The symbol "Tone" needs to be exported by the entry point index.d.ts
164-
sendDtmf(targetParticipant: CommunicationIdentifier, tones: Tone[], sendDtmfOptions?: SendDtmfOptions): Promise<void>;
164+
sendDtmf(tones: Tone[], targetParticipant: CommunicationIdentifier, sendDtmfOptions?: SendDtmfOptions): Promise<void>;
165165
startContinuousDtmfRecognition(targetParticipant: CommunicationIdentifier, continuousDtmfRecognitionOptions?: ContinuousDtmfRecognitionOptions): Promise<void>;
166166
startRecognizing(targetParticipant: CommunicationIdentifier, maxTonesToCollect: number, recognizeOptions: CallMediaRecognizeDtmfOptions): Promise<void>;
167167
stopContinuousDtmfRecognition(targetParticipant: CommunicationIdentifier, continuousDtmfRecognitionOptions?: ContinuousDtmfRecognitionOptions): Promise<void>;
@@ -246,7 +246,7 @@ export interface ContinuousDtmfRecognitionOptions extends OperationOptions {
246246
}
247247

248248
// @public
249-
export interface ContinuousDtmfRecognitionStopped extends Omit<RestContinuousDtmfRecognitionStopped, "callConnectionId" | "serverCallId" | "correlationId | operationContext | resultInformation"> {
249+
export interface ContinuousDtmfRecognitionStopped extends Omit<RestContinuousDtmfRecognitionStopped, "callConnectionId" | "serverCallId" | "correlationId" | "operationContext" | "resultInformation"> {
250250
callConnectionId: string;
251251
correlationId: string;
252252
kind: "ContinuousDtmfRecognitionStopped";
@@ -256,19 +256,21 @@ export interface ContinuousDtmfRecognitionStopped extends Omit<RestContinuousDtm
256256
}
257257

258258
// @public
259-
export interface ContinuousDtmfRecognitionToneFailed extends Omit<RestContinuousDtmfRecognitionToneFailed, "callConnectionId" | "serverCallId" | "correlationId | resultInformation"> {
259+
export interface ContinuousDtmfRecognitionToneFailed extends Omit<RestContinuousDtmfRecognitionToneFailed, "callConnectionId" | "serverCallId" | "correlationId" | "operationContext" | "resultInformation"> {
260260
callConnectionId: string;
261261
correlationId: string;
262262
kind: "ContinuousDtmfRecognitionToneFailed";
263+
operationContext?: string;
263264
resultInformation?: ResultInformation;
264265
serverCallId: string;
265266
}
266267

267268
// @public
268-
export interface ContinuousDtmfRecognitionToneReceived extends Omit<RestContinuousDtmfRecognitionToneReceived, "toneInfo | callConnectionId" | "serverCallId" | "correlationId | resultInformation"> {
269+
export interface ContinuousDtmfRecognitionToneReceived extends Omit<RestContinuousDtmfRecognitionToneReceived, "toneInfo" | "callConnectionId" | "serverCallId" | "correlationId" | "operationContext" | "resultInformation"> {
269270
callConnectionId: string;
270271
correlationId: string;
271272
kind: "ContinuousDtmfRecognitionToneReceived";
273+
operationContext?: string;
272274
resultInformation?: ResultInformation;
273275
serverCallId: string;
274276
toneInfo: ToneInfo;
@@ -621,6 +623,7 @@ export interface RestContinuousDtmfRecognitionStopped {
621623
export interface RestContinuousDtmfRecognitionToneFailed {
622624
callConnectionId?: string;
623625
correlationId?: string;
626+
operationContext?: string;
624627
resultInformation?: RestResultInformation;
625628
serverCallId?: string;
626629
}
@@ -629,6 +632,7 @@ export interface RestContinuousDtmfRecognitionToneFailed {
629632
export interface RestContinuousDtmfRecognitionToneReceived {
630633
callConnectionId?: string;
631634
correlationId?: string;
635+
operationContext?: string;
632636
resultInformation?: RestResultInformation;
633637
serverCallId?: string;
634638
toneInfo?: RestToneInfo;
@@ -767,7 +771,6 @@ export interface RestSendDtmfFailed {
767771

768772
// @public
769773
export interface RestToneInfo {
770-
participantId?: string;
771774
sequenceId: number;
772775
// (undocumented)
773776
tone: Tone;
@@ -784,7 +787,7 @@ export interface ResultInformation extends Omit<RestResultInformation, "code" |
784787
export type ResumeRecordingOptions = OperationOptions;
785788

786789
// @public
787-
export interface SendDtmfCompleted extends Omit<RestSendDtmfCompleted, "callConnectionId" | "serverCallId" | "correlationId | operationContext | resultInformation"> {
790+
export interface SendDtmfCompleted extends Omit<RestSendDtmfCompleted, "callConnectionId" | "serverCallId" | "correlationId" | "operationContext" | "resultInformation"> {
788791
callConnectionId: string;
789792
correlationId: string;
790793
kind: "SendDtmfCompleted";
@@ -794,7 +797,7 @@ export interface SendDtmfCompleted extends Omit<RestSendDtmfCompleted, "callConn
794797
}
795798

796799
// @public
797-
export interface SendDtmfFailed extends Omit<RestSendDtmfFailed, "callConnectionId" | "serverCallId" | "correlationId | operationContext | resultInformation"> {
800+
export interface SendDtmfFailed extends Omit<RestSendDtmfFailed, "callConnectionId" | "serverCallId" | "correlationId" | "operationContext" | "resultInformation"> {
798801
callConnectionId: string;
799802
correlationId: string;
800803
kind: "SendDtmfFailed";
@@ -823,8 +826,7 @@ export interface StartRecordingOptions extends OperationOptions {
823826
export type StopRecordingOptions = OperationOptions;
824827

825828
// @public
826-
export interface ToneInfo extends Omit<RestToneInfo, "sequenceId" | "tone" | "participantId"> {
827-
participantId?: string;
829+
export interface ToneInfo extends Omit<RestToneInfo, "sequenceId" | "tone"> {
828830
sequenceId: number;
829831
tone: Tone;
830832
}

sdk/communication/communication-call-automation/src/callMedia.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export class CallMedia {
185185
/**
186186
* Start continuous Dtmf recognition by subscribing to tones.
187187
* @param targetParticipant - Target participant.
188-
* @param continuousDtmfRecognitionOptions - Additional attributes for continuous Dtmf recognition
188+
* @param continuousDtmfRecognitionOptions - Additional attributes for continuous Dtmf recognition.
189189
* */
190190
public async startContinuousDtmfRecognition(
191191
targetParticipant: CommunicationIdentifier,
@@ -205,7 +205,7 @@ export class CallMedia {
205205
/**
206206
* Stop continuous Dtmf recognition by unsubscribing to tones.
207207
* @param targetParticipant - Target participant.
208-
* @param continuousDtmfRecognitionOptions - Additional attributes for continuous Dtmf recognition
208+
* @param continuousDtmfRecognitionOptions - Additional attributes for continuous Dtmf recognition.
209209
* */
210210
public async stopContinuousDtmfRecognition(
211211
targetParticipant: CommunicationIdentifier,
@@ -224,18 +224,18 @@ export class CallMedia {
224224

225225
/**
226226
* Send Dtmf tones.
227-
* @param targetParticipant - Target participant.
228227
* @param tones - List of tones to be sent to target participant.
229-
* @param continuousDtmfRecognitionOptions - Additional attributes for send Dtmf tones
228+
* @param targetParticipant - Target participant.
229+
* @param sendDtmfOptions - Additional attributes for send Dtmf tones.
230230
* */
231231
public async sendDtmf(
232-
targetParticipant: CommunicationIdentifier,
233232
tones: Tone[],
233+
targetParticipant: CommunicationIdentifier,
234234
sendDtmfOptions: SendDtmfOptions = {}
235235
): Promise<void> {
236236
const sendDtmfRequest: SendDtmfRequest = {
237-
targetParticipant: serializeCommunicationIdentifier(targetParticipant),
238237
tones: tones,
238+
targetParticipant: serializeCommunicationIdentifier(targetParticipant),
239239
operationContext: sendDtmfOptions.operationContext,
240240
};
241241
return this.callMedia.sendDtmf(this.callConnectionId, sendDtmfRequest, {});

sdk/communication/communication-call-automation/src/generated/src/models/index.ts

Lines changed: 24 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/communication/communication-call-automation/src/generated/src/models/mappers.ts

Lines changed: 12 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)