# @types/node-wit

> TypeScript definitions for node-wit

Latest version **6.1.0** (published 2024-03-04) · MIT license · 0 weekly downloads

## Install

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

## 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.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 6.1.0 |
| Published | 2024-03-04 |
| First published | 2017-01-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

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

## Recent versions

- 6.1.0 (latest) — 2024-03-04
- 6.0.3 (ts4.5) — 2023-11-07
- 6.0.1 (ts3.6) — 2021-07-08
- 6.0.0 (ts3.4) — 2021-01-25
- 4.2.2 (ts2.0) — 2017-03-24
- 6.0.4 — 2024-03-01
- 6.0.2 — 2023-10-18
- 4.2.1 — 2017-02-09
- 4.2.0 — 2017-01-03

## README

# Installation
> `npm install --save @types/node-wit`

# Summary
This package contains type definitions for node-wit (https://github.com/wit-ai/node-wit#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-wit.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-wit/index.d.ts)
````ts
export namespace log {
    class Logger {
        constructor(level: string);
    }

    const DEBUG: string;
    const INFO: string;
    const WARN: string;
    const ERROR: string;
}

export interface WitEntityValue {
    value?: string | undefined;
    expressions?: string[] | undefined;
}

export interface WitEntity {
    id?: string | undefined;
    values?: WitEntityValue[] | undefined;
}

export interface WitContext {
    state?: string[] | undefined;
    reference_time?: string | undefined;
    timezone?: string | undefined;
    entities?: WitEntity[] | undefined;
    location?: string | undefined;
}

export interface WitRequest {
    sessionId?: string | undefined;
    context?: WitContext | undefined;
    text?: string | undefined;
    entities?: WitEntity[] | undefined;
}

export interface WitResponse {
    text?: string | undefined;
    quickReplies?: any;
}

export interface WitOption {
    accessToken: string;
    actions?: any;
    logger?: log.Logger | undefined;
    apiVersion?: number | undefined;
}

export interface MessageResponseEntity {
    confidence?: number | undefined;
    value?: string | undefined;
    type?: string | undefined;
}

export interface WitIntent {
    id: string;
    name: string;
    confidence: number;
}

export interface MessageResponse {
    text: string;
    intents: WitIntent[];
    entities: any;
    traits: { [key: string]: MessageResponseEntity[] };
}

export class Wit {
    constructor(option: WitOption);
    message(message: string, context: WitContext): Promise<MessageResponse>;
    converse(sessionId: string, message: string, context: WitContext, reset?: boolean): Promise<MessageResponse>;
    runActions(sessionId: string, message: string, context: WitContext, maxSteps?: number): Promise<WitContext>;
}

````

### Additional Details
 * Last updated: Mon, 04 Mar 2024 13:07:43 GMT
 * Dependencies: none

# Credits
These definitions were written by [Julien Dufresne](https://github.com/julienduf).

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