Skip to content

Commit de1443e

Browse files
committed
Merge branch 'main' of https://github.com/Bandwidth/node-sdk into SWI-7769
2 parents fc21bb2 + c797813 commit de1443e

12 files changed

+165
-5
lines changed

tests/smoke/conferences-api.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ describe('ConferencesApi', () => {
9090
});
9191

9292
describe('updateConferenceBxml', () => {
93-
test('should update conference bxml', async () => {
93+
test.skip('should update conference bxml', async () => { // PV Issue
9494
const updateBxml = '<?xml version="1.0" encoding="UTF-8"?><Bxml><StartRecording/><SpeakSentence locale="en_US" gender="female" voice="susan">This should be a conference recording.</SpeakSentence><StopRecording/></Bxml>';
9595

9696
const { status } =
@@ -116,7 +116,7 @@ describe('ConferencesApi', () => {
116116
});
117117

118118
describe('listConferenceRecordings', () => {
119-
test('should list conference recordings', async () => {
119+
test.skip('should list conference recordings', async () => { // PV Issue
120120
const { status, data } = await conferencesApi.listConferenceRecordings(BW_ACCOUNT_ID, conferenceId);
121121

122122
expect(status).toEqual(200);
@@ -133,7 +133,7 @@ describe('ConferencesApi', () => {
133133
});
134134

135135
describe('getConferenceRecording', () => {
136-
test('should get conference recording', async () => {
136+
test.skip('should get conference recording', async () => { // PV Issue
137137
const { status, data } = await conferencesApi.getConferenceRecording(BW_ACCOUNT_ID, conferenceId, recordingId);
138138

139139
expect(status).toEqual(200);
@@ -147,7 +147,7 @@ describe('ConferencesApi', () => {
147147
});
148148

149149
describe('downloadConferenceRecording', () => {
150-
test('should download conference recording', async () => {
150+
test.skip('should download conference recording', async () => { // PV Issue
151151
const { status, data } = await conferencesApi.downloadConferenceRecording(BW_ACCOUNT_ID, conferenceId, recordingId);
152152

153153
expect(status).toEqual(200);
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//@ts-nocheck
2+
import { MultiChannelApi } from '../../api';
3+
import { Configuration } from '../../configuration';
4+
import {
5+
MultiChannelChannelListObject,
6+
MultiChannelMessageChannelEnum,
7+
PriorityEnum,
8+
RbmMessageContentText
9+
} from '../../models';
10+
11+
describe('MultiChannelApi', () => {
12+
const config = new Configuration({
13+
username: BW_USERNAME,
14+
password: BW_PASSWORD
15+
});
16+
const multiChannelApi = new MultiChannelApi(config);
17+
18+
const expirationTime = Date.now() + 1000 * 60 * 60 * 24 + 60;
19+
const expiration = new Date(expirationTime).toISOString();
20+
21+
describe('createMultiChannelMessage', () => {
22+
test('should create a multi-channel message', async () => {
23+
const channelListObject: MultiChannelChannelListObject = {
24+
from: BW_NUMBER,
25+
applicationId: BW_MESSAGING_APPLICATION_ID,
26+
channel: MultiChannelMessageChannelEnum.Rbm,
27+
content: {
28+
text: "Hello World!"
29+
}
30+
};
31+
32+
const multiChannelMessageRequest: MultiChannelMessageRequest = {
33+
to: USER_NUMBER,
34+
tag: "tag",
35+
priority: PriorityEnum.HIGH,
36+
channelList: [channelListObject],
37+
expiration,
38+
};
39+
40+
const { status, data } = await multiChannelApi.createMultiChannelMessage(BW_ACCOUNT_ID, multiChannelMessageRequest);
41+
expect(status).toEqual(202);
42+
});
43+
});
44+
});

tests/smoke/transcriptions-api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ describe('TranscriptionsApi', () => {
7777
});
7878

7979
describe('deleteRealTimeTranscription', () => {
80-
test('should delete call transcription', async () => {
80+
test.skip('should delete call transcription', async () => { // PV Issue
8181
const { status } =
8282
await transcriptionsApi.deleteRealTimeTranscription(BW_ACCOUNT_ID, mantecaCallId, transcriptionId);
8383
expect(status).toEqual(200); // This is a bug in the API, it should return 204. VAPI-1863 should fix this.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//@ts-nocheck
2+
import { MultiChannelApi } from '../../../api';
3+
import { Configuration } from '../../../configuration';
4+
import {
5+
MultiChannelChannelListObject,
6+
MultiChannelMessageChannelEnum,
7+
PriorityEnum,
8+
RbmMessageContentText
9+
} from '../../../models';
10+
11+
describe('MultiChannelApi', () => {
12+
const config = new Configuration({
13+
username: BW_USERNAME,
14+
password: BW_PASSWORD,
15+
basePath: 'http://127.0.0.1:4010'
16+
});
17+
const multiChannelApi = new MultiChannelApi(config);
18+
19+
const expirationTime = Date.now() + 1000 * 60 * 60 * 24 + 60;
20+
const expiration = new Date(expirationTime).toISOString();
21+
22+
describe('createMultiChannelMessage', () => {
23+
test.skip('should create a multi-channel message', async () => { // skip because prism can't handle a oneOf with differing required fields
24+
const channelListObject: MultiChannelChannelListObject = {
25+
from: BW_NUMBER,
26+
applicationId: BW_MESSAGING_APPLICATION_ID,
27+
channel: MultiChannelMessageChannelEnum.Rbm,
28+
content: {
29+
text: "Hello World!"
30+
}
31+
};
32+
33+
const multiChannelMessageRequest: MultiChannelMessageRequest = {
34+
to: USER_NUMBER,
35+
tag: "tag",
36+
priority: PriorityEnum.HIGH,
37+
expiration,
38+
};
39+
40+
const { status, data } = await multiChannelApi.createMultiChannelMessage(BW_ACCOUNT_ID, multiChannelMessageRequest);
41+
42+
expect(status).toEqual(202);
43+
});
44+
});
45+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { CardWidthEnum } from '../../../models/card-width-enum';
2+
3+
describe('CardWidthEnum', () => {
4+
test('should define the expected values', () => {
5+
expect(CardWidthEnum.Small).toBe('SMALL');
6+
expect(CardWidthEnum.Medium).toBe('MEDIUM');
7+
});
8+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { MultiChannelMessageChannelEnum } from '../../../models/multi-channel-message-channel-enum';
2+
3+
describe('MultiChannelMessageChannelEnum', () => {
4+
test('should define the expected values', () => {
5+
expect(MultiChannelMessageChannelEnum.Rbm).toBe('RBM');
6+
expect(MultiChannelMessageChannelEnum.Sms).toBe('SMS');
7+
expect(MultiChannelMessageChannelEnum.Mms).toBe('MMS');
8+
});
9+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { MultiChannelMessageDirectionEnum } from '../../../models/multi-channel-message-direction-enum';
2+
3+
describe('MultiChannelMessageDirectionEnum', () => {
4+
test('should define the expected values', () => {
5+
expect(MultiChannelMessageDirectionEnum.Inbound).toBe('INBOUND');
6+
expect(MultiChannelMessageDirectionEnum.Outbound).toBe('OUTBOUND');
7+
});
8+
});
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { MultiChannelStatusEnum } from '../../../models/multi-channel-status-enum';
2+
3+
describe('MultiChannelStatusEnum', () => {
4+
test('should define the expected values', () => {
5+
expect(MultiChannelStatusEnum.Queued).toBe('QUEUED');
6+
expect(MultiChannelStatusEnum.Sending).toBe('SENDING');
7+
expect(MultiChannelStatusEnum.Delivered).toBe('DELIVERED');
8+
expect(MultiChannelStatusEnum.Failed).toBe('FAILED');
9+
});
10+
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { RbmActionTypeEnum } from '../../../models/rbm-action-type-enum';
2+
3+
describe('RbmActionTypeEnum', () => {
4+
test('should define the expected values', () => {
5+
expect(RbmActionTypeEnum.Reply).toBe('REPLY');
6+
expect(RbmActionTypeEnum.DialPhone).toBe('DIAL_PHONE');
7+
expect(RbmActionTypeEnum.ShowLocation).toBe('SHOW_LOCATION');
8+
expect(RbmActionTypeEnum.CreateCalendarEvent).toBe('CREATE_CALENDAR_EVENT');
9+
expect(RbmActionTypeEnum.OpenUrl).toBe('OPEN_URL');
10+
expect(RbmActionTypeEnum.RequestLocation).toBe('REQUEST_LOCATION');
11+
});
12+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { RbmMediaHeightEnum } from '../../../models/rbm-media-height-enum';
2+
3+
describe('RbmMediaHeightEnum', () => {
4+
test('should define the expected values', () => {
5+
expect(RbmMediaHeightEnum.Short).toBe('SHORT');
6+
expect(RbmMediaHeightEnum.Medium).toBe('MEDIUM');
7+
expect(RbmMediaHeightEnum.Tall).toBe('TALL');
8+
});
9+
});

0 commit comments

Comments
 (0)