Skip to content
Open
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
3 changes: 2 additions & 1 deletion dist/scv-connector-base.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/scv-connector-base.js.map

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions docs/baseConnector.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -796,11 +796,6 @@ <h1 class="page-title">Source: baseConnector.js</h1>
dispatchEvent(constants.EVENT_TYPE.QUEUED_CALL_STARTED, payload.call, registerLog);
}
break;
case constants.EVENT_TYPE.PREVIEW_CALL_STARTED:
if (validatePayload(payload, CallResult, constants.ERROR_TYPE.CAN_NOT_START_THE_CALL, constants.EVENT_TYPE.PREVIEW_CALL_STARTED)) {
dispatchEvent(constants.EVENT_TYPE.CALL_STARTED, payload.call, registerLog);
}
break;
case constants.EVENT_TYPE.CALL_CONNECTED:
if (validatePayload(payload, CallResult, constants.ERROR_TYPE.CAN_NOT_START_THE_CALL, constants.EVENT_TYPE.CALL_CONNECTED)) {
initAudioStats();
Expand Down
1 change: 0 additions & 1 deletion docs/constants.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ <h1 class="page-title">Source: constants.js</h1>
SUPERVISOR_DISCONNECT: 'SUPERVISOR_DISCONNECT'
},
EVENT_TYPE: {
PREVIEW_CALL_STARTED: 'PREVIEW_CALL_STARTED',
QUEUED_CALL_STARTED: 'QUEUED_CALL_STARTED',
CALL_STARTED: 'CALL_STARTED',
CALL_CONNECTED: 'CALL_CONNECTED',
Expand Down
1 change: 0 additions & 1 deletion docs/types.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ <h1 class="page-title">Source: types.js</h1>
LOGOUT_RESULT: constants.EVENT_TYPE.LOGOUT_RESULT,
CALL_STARTED: constants.EVENT_TYPE.CALL_STARTED,
QUEUED_CALL_STARTED: constants.EVENT_TYPE.QUEUED_CALL_STARTED,
PREVIEW_CALL_STARTED: constants.EVENT_TYPE.PREVIEW_CALL_STARTED,
CALL_CONNECTED: constants.EVENT_TYPE.CALL_CONNECTED,
HANGUP: constants.EVENT_TYPE.HANGUP,
MUTE_TOGGLE: constants.EVENT_TYPE.MUTE_TOGGLE,
Expand Down
5 changes: 0 additions & 5 deletions src/main/baseConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -768,11 +768,6 @@ export async function publishEvent({ eventType, payload, registerLog = true }) {
dispatchEvent(constants.EVENT_TYPE.QUEUED_CALL_STARTED, payload.call, registerLog);
}
break;
case constants.EVENT_TYPE.PREVIEW_CALL_STARTED:
if (validatePayload(payload, CallResult, constants.ERROR_TYPE.CAN_NOT_START_THE_CALL, constants.EVENT_TYPE.PREVIEW_CALL_STARTED)) {
dispatchEvent(constants.EVENT_TYPE.CALL_STARTED, payload.call, registerLog);
}
break;
case constants.EVENT_TYPE.CALL_CONNECTED:
if (validatePayload(payload, CallResult, constants.ERROR_TYPE.CAN_NOT_START_THE_CALL, constants.EVENT_TYPE.CALL_CONNECTED)) {
initAudioStats();
Expand Down
1 change: 0 additions & 1 deletion src/main/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default {
SUPERVISOR_DISCONNECT: 'SUPERVISOR_DISCONNECT'
},
EVENT_TYPE: {
PREVIEW_CALL_STARTED: 'PREVIEW_CALL_STARTED',
QUEUED_CALL_STARTED: 'QUEUED_CALL_STARTED',
CALL_STARTED: 'CALL_STARTED',
CALL_CONNECTED: 'CALL_CONNECTED',
Expand Down
1 change: 0 additions & 1 deletion src/main/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const Constants = {
LOGOUT_RESULT: constants.EVENT_TYPE.LOGOUT_RESULT,
CALL_STARTED: constants.EVENT_TYPE.CALL_STARTED,
QUEUED_CALL_STARTED: constants.EVENT_TYPE.QUEUED_CALL_STARTED,
PREVIEW_CALL_STARTED: constants.EVENT_TYPE.PREVIEW_CALL_STARTED,
CALL_CONNECTED: constants.EVENT_TYPE.CALL_CONNECTED,
HANGUP: constants.EVENT_TYPE.HANGUP,
MUTE_TOGGLE: constants.EVENT_TYPE.MUTE_TOGGLE,
Expand Down
27 changes: 0 additions & 27 deletions src/test/baseConnector.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1873,33 +1873,6 @@ describe('SCVConnectorBase tests', () => {
});
});

describe('PREVIEW_CALL_STARTED event', () => {
it('Should dispatch CAN_NOT_START_THE_CALL on an invalid payload', async () => {
publishEvent({ eventType: Constants.EVENT_TYPE.PREVIEW_CALL_STARTED, payload: invalidResult });
assertChannelPortPayload({ eventType: constants.EVENT_TYPE.ERROR, payload: {
message: constants.ERROR_TYPE.CAN_NOT_START_THE_CALL
}});
assertChannelPortPayloadEventLog({
eventType: constants.EVENT_TYPE.PREVIEW_CALL_STARTED,
payload: {
errorType: constants.ERROR_TYPE.CAN_NOT_START_THE_CALL,
error: expect.anything()
},
isError: true
});
});

it('Should dispatch CALL_STARTED on a valid payload', async () => {
publishEvent({ eventType: Constants.EVENT_TYPE.PREVIEW_CALL_STARTED, payload: callResult });
assertChannelPortPayload({ eventType: Constants.EVENT_TYPE.CALL_STARTED, payload: callResult.call });
assertChannelPortPayloadEventLog({
eventType: constants.EVENT_TYPE.CALL_STARTED,
payload: callResult.call,
isError: false
});
});
});

describe('CALL_CONNECTED event', () => {
it('Should dispatch CAN_NOT_START_THE_CALL on an invalid payload', async () => {
publishEvent({ eventType: Constants.EVENT_TYPE.CALL_CONNECTED, payload: invalidResult });
Expand Down
1 change: 0 additions & 1 deletion ts-declaration/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ declare namespace _default {
const SUPERVISOR_DISCONNECT: string;
}
namespace EVENT_TYPE {
export const PREVIEW_CALL_STARTED: string;
export const QUEUED_CALL_STARTED: string;
export const CALL_STARTED: string;
export const CALL_CONNECTED: string;
Expand Down
1 change: 0 additions & 1 deletion ts-declaration/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export namespace Constants {
const LOGOUT_RESULT: string;
const CALL_STARTED: string;
const QUEUED_CALL_STARTED: string;
const PREVIEW_CALL_STARTED: string;
const CALL_CONNECTED: string;
const HANGUP: string;
const MUTE_TOGGLE: string;
Expand Down