import { Sudo } from './sudo'; /** * Sudo change type. */ export declare enum ChangeType { /** * Sudo was created. */ Create = 0, /** * Sudo was updated. */ Update = 1, /** * Sudo was deleted. */ Delete = 2 } /** * Connection state of the subscription. */ export declare enum ConnectionState { /** * Connected and receiving updates. */ Connected = 0, /** * Disconnected and won't receive any updates. When disconnected all subscribers will be * unsubscribed so the consumer must re-subscribe. */ Disconnected = 1 } /** * Subscriber for receiving notifications about new, updated or deleted Sudo. */ export interface SudoSubscriber { /** * Notifies the subscriber of a new, updated or deleted Sudo. * * @param changeType change type. Please refer to [ChangeType] enum. * @param sudo new, updated or deleted Sudo. */ sudoChanged(changeType: ChangeType, sudo: Sudo): void; /** * Notifies the subscriber that the subscription connection state has changed. The subscriber won't be * notified of Sudo changes until the connection status changes to [ConnectionState.CONNECTED]. The subscriber will * stop receiving Sudo change notifications when the connection state changes to [ConnectionState.DISCONNECTED]. * @param state connection state. */ connectionStatusChanged(state: ConnectionState): void; }