import { EitherAnd } from "matrix-events-sdk/lib/types"; import { MatrixEvent } from "../matrix"; import { Focus } from "./focus"; type CallScope = "m.room" | "m.user"; export type SessionMembershipData = { application: string; call_id: string; device_id: string; focus_active: Focus; foci_preferred: Focus[]; created_ts?: number; scope?: CallScope; }; export declare const isSessionMembershipData: (data: CallMembershipData) => data is SessionMembershipData; export type CallMembershipDataLegacy = { application: string; call_id: string; scope: CallScope; device_id: string; membershipID: string; created_ts?: number; foci_active?: Focus[]; } & EitherAnd<{ expires: number; }, { expires_ts: number; }>; export declare const isLegacyCallMembershipData: (data: CallMembershipData) => data is CallMembershipDataLegacy; export type CallMembershipData = CallMembershipDataLegacy | SessionMembershipData; export declare class CallMembership { private parentEvent; static equal(a: CallMembership, b: CallMembership): boolean; private membershipData; constructor(parentEvent: MatrixEvent, data: any); get sender(): string | undefined; get callId(): string; get deviceId(): string; get application(): string | undefined; get scope(): CallScope | undefined; get membershipID(): string; createdTs(): number; /** * Gets the absolute expiry time of the membership if applicable to this membership type. * @returns The absolute expiry time of the membership as a unix timestamp in milliseconds or undefined if not applicable */ getAbsoluteExpiry(): number | undefined; /** * Gets the expiry time of the event, converted into the device's local time. * @deprecated This function has been observed returning bad data and is no longer used by MatrixRTC. * @returns The local expiry time of the membership as a unix timestamp in milliseconds or undefined if not applicable */ getLocalExpiry(): number | undefined; /** * @returns The number of milliseconds until the membership expires or undefined if applicable */ getMsUntilExpiry(): number | undefined; /** * @returns true if the membership has expired, otherwise false */ isExpired(): boolean; getPreferredFoci(): Focus[]; getFocusSelection(): string | undefined; } export {}; //# sourceMappingURL=CallMembership.d.ts.map