# @types/promised-ldap

> TypeScript definitions for promised-ldap

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

## Install

```sh
npm install @types/promised-ldap
pnpm add @types/promised-ldap
yarn add @types/promised-ldap
bun add @types/promised-ldap
```

## 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.3.3 |
| Published | 2023-11-07 |
| First published | 2018-12-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51447 |
| Maintainers | types |

## Links

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

## Dependencies (1)

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

## Recent versions

- 0.3.3 (latest) — 2023-11-07
- 0.3.0 (ts2.2) — 2018-12-04
- 0.3.2 — 2023-10-18
- 0.3.1 — 2023-09-24

## README

# Installation
> `npm install --save @types/promised-ldap`

# Summary
This package contains type definitions for promised-ldap (https://github.com/stewartml/promised-ldap).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/promised-ldap.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/promised-ldap/index.d.ts)
````ts
import { EventEmitter } from "events";
import * as ldap from "ldapjs";

declare class Client extends EventEmitter {
    constructor({ url }: { url: string });

    search(
        base: string,
        options: ldap.SearchOptions,
        controls?: ldap.Control | ldap.Control[],
    ): Promise<{
        entries: any[];
        references: any[];
    }>;

    authenticate(base: string, dn: string, password: string): Promise<any>;
    authenticateUser(
        base: string,
        dn: string,
        password: string,
    ): Promise<{ name: string; email: string; groups: string[] } | null>;

    bind(
        dn: string,
        password: string,
        controls?: ldap.Control | ldap.Control[],
    ): Promise<any>;

    add(
        name: string,
        entry: object,
        controls?: ldap.Control | ldap.Control[],
    ): Promise<any>;

    compare(
        name: string,
        attr: string,
        value: string,
        controls?: ldap.Control | ldap.Control[],
    ): Promise<boolean>;

    del(name: string, controls?: ldap.Control | ldap.Control[]): Promise<any>;

    exop(
        name: string,
        value: string,
        controls?: ldap.Control | ldap.Control[],
    ): Promise<any>;

    modify(
        name: string,
        change: ldap.Change | ldap.Change[],
        controls?: ldap.Control | ldap.Control[],
    ): Promise<any>;

    modifyDN(
        name: string,
        newName: string,
        controls?: ldap.Control | ldap.Control[],
    ): Promise<any>;

    _search(
        base: string,
        options: ldap.SearchOptions,
        controls?: ldap.Control | ldap.Control[],
        _bypass?: boolean,
    ): Promise<EventEmitter>;
    _search(
        base: string,
        options: ldap.SearchOptions,
        _bypass: boolean,
    ): Promise<EventEmitter>;

    starttls(
        options: object,
        controls: ldap.Control | ldap.Control[],
        _bypass?: boolean,
    ): Promise<any>;

    unbind(): Promise<void>;

    destroy(err?: any): void;
}

declare namespace Client {
    type SearchOptions = ldap.SearchOptions;
}

export = Client;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/ldapjs](https://npmjs.com/package/@types/ldapjs)

# Credits
These definitions were written by [Alan Plum](https://github.com/pluma).

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