@types/xmpp__stream-management
TypeScript icon, indicating that this package has built-in type declarations

0.13.3 • Public • Published

Installation

npm install --save @types/xmpp__stream-management

Summary

This package contains type definitions for @xmpp/stream-management (https://github.com/xmppjs/xmpp.js/tree/main/packages/stream-management).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xmpp__stream-management.

index.d.ts

import { Entity, Middleware } from "@xmpp/middleware";
import { StreamFeatures } from "@xmpp/stream-features";

export = streamManagement;

/**
 * [Stream Management](https://xmpp.org/extensions/xep-0198.html) for `@xmpp/client`.
 *
 * Included and enabled in `@xmpp/client`.
 *
 * Supports Node.js and browsers.
 *
 * When the session is resumed the `online` event is not emitted as session resumption is transparent. However
 * `entity.status` is set to `online`. If the session fails to resume, entity will fallback to regular session
 * establishment in which case `online` event will be emitted.
 *
 * Automatically responds to acks but does not support requesting acks yet.
 */
declare function streamManagement<TEntity extends Entity>({
    streamFeatures,
    entity,
    middleware,
}: {
    streamFeatures: StreamFeatures<TEntity>;
    entity: TEntity;
    middleware: Middleware<TEntity>;
}): streamManagement.StreamManagement;

declare namespace streamManagement {
    interface StreamManagement {
        allowResume: boolean;
        preferredMaximum: number | null;
        enabled: boolean;
        id: string;
        outbound: number;
        inbound: number;
        max: number | null;
    }
}

Additional Details

Credits

These definitions were written by BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/xmpp__stream-management

Weekly Downloads

1,289

Version

0.13.3

License

MIT

Unpacked Size

5.37 kB

Total Files

5

Last publish

Collaborators

  • types