-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
36 lines (36 loc) · 938 Bytes
/
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
export interface Data {
_id: string;
_rev?: string;
[x: string]: any;
}
export interface QueryParams {
startkey?: string;
endkey?: string;
start_key?: string;
end_key?: string;
limit?: number;
conflicts?: boolean;
descending?: boolean;
endkey_docid?: string;
end_key_doc_id?: string;
startkey_docid?: string;
start_key_doc_id?: string;
include_docs?: boolean;
inclusive_end?: boolean;
key?: string;
keys?: string[];
skip?: number;
stale?: string;
update_req?: boolean;
}
export declare class CouchDB {
private host;
private headers;
constructor(databaseHost: string, extraHeaders: object | null);
get(id: string): Promise<{}>;
put(data: Data): Promise<{}>;
remove(data: Data): Promise<{}>;
private buildRequestParams(data);
allDocs(data: QueryParams): Promise<{}>;
query(designView: any, options: any): Promise<{}>;
}