forked from zetlen/clortho
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
33 lines (23 loc) · 795 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
declare namespace clortho {
interface MainOptions {
service: string;
username?: string;
message?: string;
cli?: boolean;
refresh?: boolean;
}
interface Credentials {
username: string;
password: string;
}
interface ClorthoForService {
getFromKeychain(username: string): Promise<Credentials>;
prompt(username: string, message?: string, cli?: boolean): Promise<Credentials>;
saveToKeychain (username: string, password: string): Promise<boolean>;
trySaveToKeychain (credential: Credentials): Promise<Credentials>;
removeFromKeychain (username: string): Promise<boolean>;
}
function forService(service: string): ClorthoForService;
}
declare function clortho(options: clortho.MainOptions): Promise<clortho.Credentials>;
export = clortho;