0.0.5 • Published 6 months ago

@types/node-turn v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/node-turn

Summary

This package contains type definitions for node-turn (https://github.com/Atlantis-Software/node-turn#readme).

Details

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

index.d.ts

// Type definitions for node-turn 0.0
// Project: https://github.com/Atlantis-Software/node-turn#readme
// Definitions by: Johannes Garz <https://github.com/garzj>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/// <reference types="node" />

import { EventEmitter } from 'events';

type TurnDebugLevel = 'OFF' | 'FATAL' | 'ERROR' | 'WARN' | 'INFO' | 'DEBUG' | 'TRACE' | 'ALL';

type TurnAuthMech = 'none' | 'short-term' | 'long-term';

interface TurnCredentials {
    [user: string]: string;
}

interface TurnProps {
    listeningPort: number;
    listeningIps: string[];
    relayIps: string[];
    externalIps: string | { [localIp: string]: string } | null;
    minPort: number;
    maxPort: number;
    authMech: TurnAuthMech;
    realm: string;
    maxAllocateLifetime: number;
    defaultAllocatetLifetime: number;
    debugLevel: TurnDebugLevel;

    log: (...args: any[]) => void;
    debug: (debugLevel: TurnDebugLevel, message: string) => void;
}

interface TurnOptions extends Partial<TurnProps> {
    credentials?: TurnCredentials;
}

interface TurnServer extends Readonly<TurnProps> {}

declare class TurnServer extends EventEmitter {
    constructor(options?: TurnOptions);

    start(): void;
    stop(): void;
    addUser(username: string, password: string): void;
    removeUser(username: string): void;

    readonly software: string;

    readonly staticCredentials: TurnCredentials;
}

declare namespace TurnServer {
    export { TurnOptions, TurnProps, TurnCredentials, TurnAuthMech, TurnDebugLevel };
}

export = TurnServer;

Additional Details

  • Last updated: Mon, 21 Mar 2022 19:01:51 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

These definitions were written by Johannes Garz.

0.0.3

8 months ago

0.0.5

6 months ago

0.0.4

7 months ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

3 years ago