# @types/peer-dial

> TypeScript definitions for peer-dial

Latest version **0.0.5** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/peer-dial
pnpm add @types/peer-dial
yarn add @types/peer-dial
bun add @types/peer-dial
```

## Health

**Score 65/100 (B)** — status: stable.

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

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

## Facts

| | |
|---|---|
| Version | 0.0.5 |
| Published | 2025-10-24 |
| First published | 2017-09-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51451 |
| Maintainers | types |

## Links

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

## Dependencies (3)

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

## Recent versions

- 0.0.5 (latest) — 2025-10-24
- 0.0.4 (ts5.1) — 2023-11-07
- 0.0.1 (ts3.6) — 2021-07-08
- 0.0.0 (ts3.5) — 2017-09-20
- 0.0.3 — 2023-10-18
- 0.0.2 — 2023-09-24

## README

# Installation
> `npm install --save @types/peer-dial`

# Summary
This package contains type definitions for peer-dial (https://github.com/fraunhoferfokus/peer-dial).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/peer-dial.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/peer-dial/index.d.ts)
````ts
/// <reference types="node" />

import events = require("events");
import express = require("express");
import * as uuid from "node-uuid";

export class Server extends events.EventEmitter {
    constructor(options: ServerOptions);
    start(): void;
    stop(): void;
    corsOptionsAppsDelegate(req: string, callback: (err: any, data: CorsOptions) => void): void;
}

export interface CorsOptions {
    origin: boolean;
    methods: string[];
    exposedHeaders: string[];
}

export interface ServerOptions {
    expressApp: express.Express;
    prefix: string;
    port: number;
    host?: string | undefined;
    uuid?: uuid.UUIDOptions | undefined;
    friendlyName?: string | undefined;
    manufacturer: string;
    modelName: string;
    maxContentLength?: number | undefined;
    extraHeaders?: object | undefined;
    delegate: Delegate;
    corsAllowOrigins: string | boolean;
}

export interface Delegate {
    getApp(appName: string): App;
    launchApp(appName: string, launchData: string, callback: (data: string) => void): void;
    stopApp(appName: string, pid: string, callback: (data: boolean) => void): void;
}

export interface App {
    name: string;
    state: string;
    allowStop: boolean;
    pid: string;
    launch(launchData: string): void;
}

export interface AppInfo {
    dialVer: string;
    name: string;
    options: AppInfoOptions;
    state: string;
    xmlns: string;
}

export interface AppInfoOptions {
    allowStop: string;
}

export class Client extends events.EventEmitter {
    getDialDevice(deviceDescriptionUrl: string, callback?: (data: DialDevice, err: any) => void): void;
    start(): void;
    refresh(): void;
    stop(): void;
}

export class DialDevice {
    constructor(deviceInfo: DeviceInfo);
    getAppInfoXml(appName: string, callback?: (data: string, err: any) => void): void;
    getAppInfo(appName: string, callback?: (data: AppInfo, err: any) => void): void;
    launchApp(
        appName: string,
        launchData: string,
        contentType: string,
        callback?: (data: string, err: any) => void,
    ): void;
    stopApp(appName: string, pid: string, callback?: (data: number, err: any) => void): void;
}

export interface DeviceInfo {
    descriptionUrl: string;
    applicationUrl: string;
    deviceType: string;
    friendlyName: string;
    manufacturer: string;
    modelName: string;
    UDN: string;
    iconList: object[] | {
        icon: object;
    };
}

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/node](https://npmjs.com/package/@types/node), [@types/node-uuid](https://npmjs.com/package/@types/node-uuid)

# Credits
These definitions were written by [James Tooley](https://github.com/RealTYPICAL).

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