Skip to content

Commit

Permalink
SWI-5769 Update SDK Based on Recent Spec Changes (#37)
Browse files Browse the repository at this point in the history
* Generate SDK with OpenAPI Generator Version 7.6.0

* update tests

* update prism version

* fix list messages test

* skip call recording test for prism error

* revert yml

---------

Co-authored-by: DX-Bandwidth <[email protected]>
Co-authored-by: ckoegel <[email protected]>
  • Loading branch information
3 people authored Aug 5, 2024
1 parent 4b530aa commit d0c7c76
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 2 deletions.
7 changes: 7 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3254,6 +3254,7 @@ components:
$ref: '#/components/schemas/callTranscriptionMetadata'
example:
- transcriptionId: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
transcriptionName: live_transcription
transcriptionUrl: >-
https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-fef240ff-5cfc9091-8069-4863-a8c0-a4dcbbf1f1a4/transcriptions/t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
callTranscriptionMetadata:
Expand All @@ -3263,6 +3264,12 @@ components:
type: string
description: The programmable voice API transcription ID.
example: t-3f758f24-c7a2fc78-7c91-401a-8b2e-e542f9c40d6b
transcriptionName:
type: string
description: >-
The programmable voice API transcription name. This name could be
provided by the user when creating the transcription.
example: live_transcription
transcriptionUrl:
type: string
description: >-
Expand Down
6 changes: 6 additions & 0 deletions models/call-transcription-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ export interface CallTranscriptionMetadata {
* @memberof CallTranscriptionMetadata
*/
'transcriptionId'?: string;
/**
* The programmable voice API transcription name. This name could be provided by the user when creating the transcription.
* @type {string}
* @memberof CallTranscriptionMetadata
*/
'transcriptionName'?: string;
/**
* A URL that may be used to retrieve the transcription itself. This points to the [Get Call Transcription](/apis/voice/#operation/getCallTranscription) endpoint.
* @type {string}
Expand Down
1 change: 1 addition & 0 deletions tests/smoke/transcriptions-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ describe('TranscriptionsApi', () => {
expect(data).toBeInstanceOf(Array);
expect(data[0].transcriptionId).toBeString();
expect(data[0].transcriptionUrl).toBeString();
expect(data[0].transcriptionName).toBeString();
transcriptionId = data[0].transcriptionId!;
});
});
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/api/messages-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ describe('MessagesApi', () => {
MessageStatusEnum.Accepted,
MessageStatusEnum.Undelivered,
]);
expect(data.messages![0].messageDirection).toBeOneOf([ListMessageDirectionEnum.Inbound, MessageDirectionEnum.Outbound]);
expect(data.messages![0].messageDirection).toBeOneOf([ListMessageDirectionEnum.Inbound, ListMessageDirectionEnum.Outbound]);
expect(data.messages![0].messageType).toBeOneOf([MessageTypeEnum.Sms, MessageTypeEnum.Mms]);
expect(data.messages![0].segmentCount).toBeInteger();
expect(data.messages![0].errorCode).toBePositive();
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/api/recordings-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('RecordingsApi', () => {
});

describe('getCallRecording', () => {
test('should get call recording', async () => {
test.skip('should get call recording', async () => {
const { status, data } = await recordingsApi.getCallRecording(BW_ACCOUNT_ID, callId, recordingId);

expect(status).toEqual(200);
Expand Down Expand Up @@ -172,4 +172,5 @@ describe('RecordingsApi', () => {
expect(status).toEqual(204);
});
});

});
1 change: 1 addition & 0 deletions tests/unit/api/transcriptions-api.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('TranscriptionsApi', () => {
expect(data).toBeInstanceOf(Array);
expect(data[0].transcriptionId).toBeString();
expect(data[0].transcriptionUrl).toBeString();
expect(data[0].transcriptionName).toBeString();
});
});

Expand Down

0 comments on commit d0c7c76

Please sign in to comment.