Neighbourhood Party Manager

    @types/node-xmpp-client
    TypeScript icon, indicating that this package has built-in type declarations

    3.1.8 • Public • Published

    Installation

    npm install --save @types/node-xmpp-client

    Summary

    This package contains type definitions for node-xmpp-client (https://github.com/node-xmpp/node-xmpp).

    Details

    Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-xmpp-client.

    index.d.ts

    // Type definitions for node-xmpp-client 3.1
    // Project: https://github.com/node-xmpp/node-xmpp
    // Definitions by: DefinitelyTyped <https://github.com/DefinitelyTyped>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    // TypeScript Version: 2.1
    
    export class Client {
        static Stanza: Stanza;
    
        constructor(options: XmppOptions);
    
        connect(): void;
    
        disconnect(): void;
    
        on(event: string, c: (e: any, d: any) => any): void;
    
        send(stanza: any): void;
    }
    
    export interface Stanza extends Element {
        // This has to be used for the static class initializer new Client.Stanza(..). If there is a better way feel free to
        // contribute.
        // tslint:disable-next-line:no-misused-new
        new(name: string, attr: any): Stanza;
        from: string;
        to: string;
        id: string;
        type: string;
    }
    
    export interface Element {
        is(name: string, xmlns: string): boolean;
        getName(): string;
        getNS(): string;
        findNS(prefix: string): string;
        getXmlns(): string;
        setAttrs(attrs: any): void;
        getAttrs(): any;
    
        up(): Element;
        c(name: string, attrs?: any): Element;
        cnode(child: Element): Element;
        t(text: string): Element;
        remove(el: Element, xmnls: string): Element;
        attr(attr: any, val: any): any;
    
        toString(): string;
        toJSON(): any;
    }
    
    export interface XmppOptions {
        jid: string;
        password: string;
        host?: string | undefined;
        port?: number | undefined;
        reconnect?: boolean | undefined;
        autostart?: boolean | undefined; // if we start connecting to a given port
        register?: boolean | undefined; // register account before authentication
        legacySSL?: boolean | undefined; // connect to the legacy SSL port, requires at least the host to be specified
        credentials?: any; // Dictionary (optional) - TLS or SSL key and certificate credentials
        actAs?: string | undefined; // if admin user act on behalf of another user (just user)
        disallowTLS?: boolean | undefined; // prevent upgrading the connection to a secure one via TLS
        preferred?: string | undefined; // Preferred SASL mechanism to use
        bosh?: Bosh | undefined;
    }
    
    export interface Bosh {
        url?: string | undefined;
        prebind?(error: any, data: any): void;
    }

    Additional Details

    • Last updated: Thu, 23 Dec 2021 23:35:12 GMT
    • Dependencies: none
    • Global values: none

    Credits

    These definitions were written by DefinitelyTyped.

    Keywords

    none

    Install

    npm i @types/node-xmpp-client

    DownloadsWeekly Downloads

    457

    Version

    3.1.8

    License

    MIT

    Unpacked Size

    7.14 kB

    Total Files

    4

    Last publish

    Collaborators

    • types