NTP-26125 | added type for event data

This commit is contained in:
Mayank Singh
2025-01-13 02:13:41 +05:30
parent 8a6a1c2770
commit af4bd92a23
2 changed files with 7 additions and 2 deletions

View File

@@ -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) {

View File

@@ -103,3 +103,8 @@ export interface CallState {
callId?: string;
} | null;
}
export interface EventData {
pushType: PushType;
data: any;
}