NTP-19782 | fix call state type:
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import GenericObject from "../types/GenericObject.ts";
|
||||
import MetricsProcessor from "../utils/metricsProcessor.ts";
|
||||
import ClickStreamProcessor from "../utils/clickStreamProcessor.ts";
|
||||
import {CALL_STATES} from "@universal-call-sdk/adapter-ameyo/lib/types.ts";
|
||||
|
||||
class IAdapter {
|
||||
registerOnCallIncoming(callback: (callState: GenericObject)=>void) {callback({})}
|
||||
@@ -27,7 +28,7 @@ class IAdapter {
|
||||
|
||||
getAgentAvailability(): boolean {return false}
|
||||
|
||||
getLatestCallState() {return {}}
|
||||
getLatestCallState() {return CALL_STATES.IDLE}
|
||||
getAvailableAgentsForCallTransfer() {}
|
||||
transferCallToAgent(data: GenericObject) {console.log("transfer call", data)}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import IAdapter from "@universal-call-sdk/common/lib/Interfaces/IAdapter.ts";
|
||||
import MetricsProcessor from "@universal-call-sdk/common/lib/utils/metricsProcessor.ts";
|
||||
import ClickStreamProcessor from "@universal-call-sdk/common/lib/utils/clickStreamProcessor.ts";
|
||||
import noop from "@universal-call-sdk/common/lib/utils/noop.ts";
|
||||
import {CALL_STATES} from "@universal-call-sdk/adapter-ameyo/lib/types.ts";
|
||||
|
||||
|
||||
enum actionTypes {
|
||||
@@ -178,7 +179,7 @@ function UseCallSdk({AdapterClass, adapterOptions, metricsConfig, clickStreamCon
|
||||
return adapter.getAgentAvailability();
|
||||
}
|
||||
|
||||
function getLatestCallState(): GenericObject {
|
||||
function getLatestCallState(): CALL_STATES {
|
||||
return adapter.getLatestCallState();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user