import { Agent } from '../'; import { DataForm, IQ, Paging, Pubsub, PubsubAffiliation, PubsubAffiliations, PubsubCreate, PubsubEvent, PubsubEventConfiguration, PubsubEventDelete, PubsubEventItems, PubsubEventPurge, PubsubEventSubscription, PubsubFetchResult, PubsubItem, PubsubItemContent, PubsubSubscribeWithOptions, PubsubSubscription, PubsubSubscriptions, PubsubSubscriptionWithOptions, PubsubUnsubscribe, ReceivedMessage } from '../protocol'; declare module '../' { interface Agent { subscribeToNode(jid: string, opts: string | PubsubSubscribeWithOptions): Promise; unsubscribeFromNode(jid: string, opts: string | PubsubUnsubscribeOptions): Promise; publish(jid: string, node: string, item: T, id?: string): Promise; getItem(jid: string, node: string, id: string): Promise>; getItems(jid: string, node: string, opts?: Paging): Promise>; retract(jid: string, node: string, id: string, notify: boolean): Promise; purgeNode(jid: string, node: string): Promise; deleteNode(jid: string, node: string): Promise; createNode(jid: string, node?: string, config?: DataForm): Promise; configureNode(jid: string, node: string, config: DataForm): Promise; getNodeConfig(jid: string, node: string): Promise; getDefaultNodeConfig(jid: string): Promise; getDefaultSubscriptionOptions(jid: string): Promise; getSubscriptions(jid: string, opts?: PubsubSubscriptions): Promise; getAffiliations(jid: string, node?: string): Promise; getNodeSubscribers(jid: string, node: string | PubsubSubscriptions, opts?: PubsubSubscriptions): Promise; updateNodeSubscriptions(jid: string, node: string, delta: PubsubSubscription[]): Promise; getNodeAffiliations(jid: string, node: string): Promise; updateNodeAffiliations(jid: string, node: string, items: PubsubAffiliation[]): Promise; } interface AgentEvents { 'pubsub:event': PubsubEventMessage; 'pubsub:published': PubsubPublish; 'pubsub:retracted': PubsubRetract; 'pubsub:purged': PubsubEventMessage & { pubsub: PubsubEventPurge; }; 'pubsub:deleted': PubsubEventMessage & { pubsub: PubsubEventDelete; }; 'pubsub:subscription': PubsubEventMessage & { pubsub: PubsubEventSubscription; }; 'pubsub:config': PubsubEventMessage & { pubsub: PubsubEventConfiguration; }; 'pubsub:affiliations': PubsubMessage & { pubsub: PubsubAffiliationChange; }; } } export interface PubsubSubscribeOptions extends PubsubSubscribeWithOptions { useBareJID?: boolean; } export interface PubsubUnsubscribeOptions extends PubsubUnsubscribe { useBareJID?: boolean; } type PubsubMessage = ReceivedMessage & { pubsub: Pubsub; }; type PubsubEventMessage = ReceivedMessage & { pubsub: PubsubEvent; }; type PubsubPublish = PubsubEventMessage & { pubsub: PubsubEventItems & { items: { published: PubsubItem[]; }; }; }; type PubsubRetract = PubsubEventMessage & { pubsub: PubsubEventItems & { items: { retracted: PubsubItem[]; }; }; }; type PubsubAffiliationChange = PubsubMessage & { pubsub: Pubsub & { affiliations: PubsubAffiliations; }; }; export default function (client: Agent): void; export {};