@magicbell/core
Version:
Official MagicBell API wrapper
18 lines (17 loc) • 702 B
TypeScript
import * as Ably from 'ably';
import Config from '../models/Config/index.js';
declare const pushEventAggregator: import("mittly").Emitter<Record<import("mittly").EventType, unknown>>;
export { pushEventAggregator };
/**
* Open an authenticated connection to ably.
*
* @param config The configuration used to open the connection.
*/
export declare function connectToAbly(config: Config, authServerUrl?: string): Ably.Realtime;
/**
* Publish an ably event to the push event emitter. If the push event contains
* the ID of a notification, this is fetched before emitting the event.
*
* @param event Ably event
*/
export declare function handleAblyEvent(event: Ably.Types.Message): Promise<void>;