-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.d.ts
58 lines (39 loc) · 1.71 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/// <reference types="node" />
import {
Change,
Control,
createClient as _createClient,
SearchCallbackResponse,
SearchEntry,
SearchOptions,
SearchReference
} from 'ldapjs'
import {EventEmitter} from 'events'
export * from 'ldapjs'
export interface Client extends EventEmitter {
// connected: boolean
bind(dn: string, password: string, controls?: Control | Array<Control>): Promise<void>
add(name: string, entry: Object, controls?: Control | Array<Control>): Promise<void>
compare(name: string, attr: string, value: string, controls?: Control | Array<Control>): Promise<boolean | undefined>
del(name: string, controls?: Control | Array<Control>): Promise<void>
exop(name: string, value: string, controls?: Control | Array<Control>): Promise<{
value: string,
response: any
}>
modify(name: string, change: Change | Array<Change>, controls?: Control | Array<Control>): Promise<void>
modifyDN(name: string, newName: string, controls?: Control | Array<Control>): Promise<void>
search(base: string, options?: SearchOptions, controls?: Control | Array<Control>): Promise<SearchCallbackResponse>
starttls(options: Object, controls?: Control | Array<Control>): Promise<void>
unbind(): Promise<void>
destroy(err?: any): Promise<void>
// Additional methods
searchReturnAll(base: string, options?: SearchOptions, controls?: Control | Array<Control>): Promise<{
entries: Array<SearchEntry>,
referrals: Array<SearchReference>
}>
findUser(base: string, username: string, options?: SearchOptions): Promise<any>
userInGroup(base: string, username: string, groupName: string): Promise<boolean>
}
export declare const createClient: {
(...args: Parameters<typeof _createClient>): Client
}