Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWI-5769 Update SDK Based on Recent Spec Changes #37

Merged
merged 6 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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