Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
9 contributors

Users who have contributed to this file

@legastero @thesabbir @marc0s @kai670 @wpasternak @wiktor-k @SzymonLisowiec @denkomanceski @andrei-cacio
900 lines (563 sloc) 10.7 KB

StanzaJS API Reference

acceptSubscription

(jid: string) => void

addBookmark

(bookmark: MUCBookmark) => Promise

ban

(jid: string, occupant: string, reason: string) => Promise

block

(jid: string) => Promise

changeNick

(room: string, nick: string) => void

configureNode

(jid: string, node: string, config: DataForm) => Promise

configureRoom

(room: string, form: Partial) => Promise

connect

(opts: AgentConfig) => void

createNode

(jid: string, node: string, config: DataForm) => Promise

declineInvite

(room: string, sender: string, reason: string) => void

deleteAccount

(jid: string) => Promise

deleteNode

(jid: string, node: string) => Promise

denySubscription

(jid: string) => void

destroyRoom

(room: string, opts: MUCDestroy) => Promise

directInvite

(room: string, to: string, opts: Partial) => void

disableCarbons

() => Promise

disableKeepAlive

() => void

disableNotifications

(jid: string, node: string) => Promise

disconnect

() => void

discoverBindings

(server: string) => Promise

discoverICEServers

() => Promise

enableCarbons

() => Promise

enableKeepAlive

(opts: KeepAliveOptions) => void

enableNotifications

(jid: string, node: string, fieldList: DataFormField[]) => Promise

getAccountInfo

(jid: string) => Promise

getAffiliations

(jid: string, node: string) => Promise

getAttention

(jid: string, opts: Partial) => void

getAvatar

(jid: string, id: string) => Promise

getBits

(jid: string, cid: string) => Promise

getBlocked

() => Promise

getBookmarks

() => Promise

getCommands

(jid: string) => Promise

getCredentials

() => Promise

getCurrentCaps

() => { info: DiscoNodeInfo; legacyCapabilities: LegacyEntityCaps[] }

getDefaultNodeConfig

(jid: string) => Promise

getDefaultSubscriptionOptions

(jid: string) => Promise

getDiscoInfo

(jid: string, node: string) => Promise

getDiscoItems

(jid: string, node: string) => Promise

getHistoryPreferences

() => Promise

getHistorySearchForm

(jid: string) => Promise

getItem

(jid: string, node: string, id: string) => Promise

getItems

(jid: string, node: string, opts: Paging) => Promise

getNodeAffiliations

(jid: string, node: string) => Promise

getNodeConfig

(jid: string, node: string) => Promise

getNodeSubscribers

(jid: string, node: string | PubsubSubscriptions, opts: PubsubSubscriptions) => Promise

getPrivateData

(key: <T>) => Promise

getReservedNick

(room: string) => Promise

getRoomConfig

(room: string) => Promise

getRoomMembers

(room: string, opts: MUCUserItem) => Promise

getRoster

() => Promise

getServiceCredentials

(jid: string, host: string, type: string, port: number) => Promise

getServices

(jid: string, type: string) => Promise

getSoftwareVersion

(jid: string) => Promise

getSubscriptions

(jid: string, opts: PubsubSubscriptions) => Promise

getTime

(jid: string) => Promise

getUniqueRoomName

(mucHost: string) => Promise

getUploadService

(domain: string) => Promise

getUploadSlot

(jid: string, request: HTTPUploadRequest) => Promise

getVCard

(jid: string) => Promise

goInvisible

(probe: false | true) => Promise

goVisible

() => Promise

invite

(room: string, invites: MUCInvite | MUCInvite[]) => void

joinRoom

(jid: string, nick: string, opts: Presence) => void

kick

(jid: string, nick: string, reason: string) => Promise

leaveRoom

(jid: string, nick: string, opts: Presence) => void

markAcknowledged

(msg: Message) => void

markActive

() => void

markDisplayed

(msg: Message) => void

markInactive

() => void

markReceived

(msg: Message) => void

nextId

() => string

ping

(jid: string) => Promise

publish

(jid: string, node: string, item: <T>, id: string) => Promise

publishActivity

(data: UserActivity) => Promise

publishAvatar

(id: string, data: Buffer) => Promise

publishGeoLoc

(data: Geolocation) => Promise

publishMood

(mood: UserMood) => Promise

publishNick

(nick: string) => Promise

publishTune

(tune: UserTune) => Promise

publishVCard

(vcard: VCardTemp) => Promise

purgeNode

(jid: string, node: string) => Promise

registerFeature

(name: string, priority: number, handler: FeatureHandler) => void

removeBookmark

(jid: string) => Promise

removeRosterItem

(jid: string) => Promise

requestRoomVoice

(room: string) => void

retract

(jid: string, node: string, id: string, notify: boolean) => Promise

searchHistory

(opts: Partial) => Promise
(jid: string, opts: MAMQuery) => Promise

send

(path: <T>, data: TopLevelElements[T]) => void

sendIQ

(iq: <T> & IQ) => Promise

sendIQError

(orig: IQ, err: Partial) => void

sendIQResult

(orig: IQ, result: Partial) => void

sendMessage

(msg: Message) => void

sendPresence

(pres: Presence) => void

sendStreamError

(err: StreamError) => void

setBookmarks

(bookmarks: MUCBookmark[]) => Promise

setHistoryPreferences

(opts: Partial) => Promise

setPrivateData

(key: <T>, data: PrivateStorage[T]) => Promise

setRoomAffiliation

(room: string, jid: string, affiliation: MUCAffiliation, reason: string) => Promise

setRoomRole

(room: string, nick: string, role: MUCRole, reason: string) => Promise

setSubject

(room: string, subject: string) => void

subscribe

(jid: string) => void

subscribeToNode

(jid: string, opts: string | PubsubSubscribeWithOptions) => Promise

unblock

(jid: string) => Promise

unsubscribe

(jid: string) => void

unsubscribeFromNode

(jid: string, opts: string | PubsubUnsubscribeOptions) => Promise

updateAccount

(jid: string, data: AccountManagement) => Promise

updateCaps

() => LegacyEntityCaps[]

updateNodeAffiliations

(jid: string, node: string, items: PubsubAffiliation[]) => Promise

updateNodeSubscriptions

(jid: string, node: string, delta: PubsubSubscription[]) => Promise

updateRosterItem

(item: RosterItem) => Promise

use

(plugin: (agent: Agent, registry: Registry, config: AgentConfig) => void) => void

useAvatars

(versions: AvatarVersion[], pointers: AvatarPointer[]) => Promise

You can’t perform that action at this time.