sinch-rtc
Version:
RTC JavaScript/Web SDK
22 lines (21 loc) • 909 B
TypeScript
import { DefaultCall } from "../calling";
import { PushType } from "./PushType";
export declare function getFlags(call: DefaultCall): number;
export declare function generatePushPayload(call: DefaultCall): never;
export declare class PushPayload {
version: number;
type: PushType;
sessionId: string;
timestamp: Date;
userId: string;
flags: number;
domain: string;
publicHeaders?: Record<string, string> | undefined;
private supportedVersions;
constructor(version: number, type: PushType, sessionId: string, timestamp: Date, userId: string, flags: number, domain: string, publicHeaders?: Record<string, string> | undefined);
static isValid(json: any): boolean;
static tryDecode(payload: string, onMessage: (message: PushPayload) => void): boolean;
tryEncode(onPayload: (payload: string) => void): boolean;
private getPayload;
private getPayloadV4;
}