/*! * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the Microsoft Live Share SDK License. */ import { UserMeetingRole } from "@microsoft/live-share"; import { IUseLiveEventResults, OnReceivedLiveEventAction } from "../types"; /** * React hook for using a Live Share `LiveEvent`. * * @remarks * Use this hook if you want to send transient JSON objects to everyone connected to the Fluid container, * such as when sending push notifications or reactions. * This hook can only be used in a child component of `` or ``. * * @template TEvent Optional typing for events sent & received. Default is `object` type. * @param uniqueKey the unique key for the `LiveEvent`. If one does not yet exist, a new one * will be created, otherwise it will use the existing one. * @param allowedRoles Optional. The meeting roles eligible to send events through this object. * @param onReceivedEvent Optional. Callback method to be called when a new notification is received. * @returns stateful `latestEvent` & `allEvents` list, `sendEvent` callback, and the `liveEvent` object. */ export declare function useLiveEvent(uniqueKey: string, allowedRoles?: UserMeetingRole[], onReceivedEvent?: OnReceivedLiveEventAction): IUseLiveEventResults; //# sourceMappingURL=useLiveEvent.d.ts.map