@types/promised-ldap
TypeScript icon, indicating that this package has built-in type declarations

0.3.3 • Public • Published

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

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

Credits

These definitions were written by Alan Plum.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/promised-ldap

Weekly Downloads

150

Version

0.3.3

License

MIT

Unpacked Size

6.84 kB

Total Files

5

Last publish

Collaborators

  • types