NTP-26125 | added type for event data
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {MessagingType} from "./assets/js/ajaxClient.ts";
|
||||
import {CallStatus, PushType, CallState} from "./types.ts";
|
||||
import {CallStatus, PushType, CallState, EventData} from "./types.ts";
|
||||
import {parseQuerystring} from "@universal-call-sdk/common/lib/utils/parsingUtils.ts";
|
||||
|
||||
class CallStateManager {
|
||||
@@ -208,7 +208,7 @@ export function extractAndProcessEvents(rawResponse: any) {
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
||||
parts.forEach(event => {
|
||||
parts.forEach((event : EventData) => {
|
||||
try {
|
||||
callStateManager.handleEvent(event);
|
||||
} catch (error) {
|
||||
|
||||
@@ -103,3 +103,8 @@ export interface CallState {
|
||||
callId?: string;
|
||||
} | null;
|
||||
}
|
||||
|
||||
export interface EventData {
|
||||
pushType: PushType;
|
||||
data: any;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user