# @types/node-turn

> TypeScript definitions for node-turn

Latest version **0.0.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/node-turn
pnpm add @types/node-turn
yarn add @types/node-turn
bun add @types/node-turn
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2023-11-07 |
| First published | 2021-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51420 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/node-turn
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-turn
- npm.io page: https://npm.io/package/@types/node-turn

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 0.0.5 (latest) — 2023-11-07
- 0.0.2 (ts3.9) — 2022-03-21
- 0.0.1 (ts3.7) — 2021-11-09
- 0.0.4 — 2023-10-18
- 0.0.3 — 2023-09-23
- 0.0.0 — 2021-10-05

## README

# 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](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-turn/index.d.ts)
````ts
/// <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 { TurnAuthMech, TurnCredentials, TurnDebugLevel, TurnOptions, TurnProps };
}

export = TurnServer;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Johannes Garz](https://github.com/garzj).

---
_Source: https://npm.io/package/@types/node-turn · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
