-
Notifications
You must be signed in to change notification settings - Fork 94
/
index.d.ts
42 lines (34 loc) · 1023 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
37
38
39
40
41
42
declare module '@react-native-cookies/cookies' {
export interface Cookie {
name: string;
value: string;
path?: string;
domain?: string;
version?: string;
expires?: string;
secure?: boolean;
httpOnly?: boolean;
}
export interface Cookies {
[key: string]: Cookie;
}
export interface CookieManagerStatic {
set(url: string, cookie: Cookie, useWebKit?: boolean): Promise<boolean>;
setFromResponse(url: string, cookie: string): Promise<boolean>;
get(url: string, useWebKit?: boolean): Promise<Cookies>;
getFromResponse(url: string): Promise<Cookies>;
clearAll(useWebKit?: boolean): Promise<boolean>;
// Android only
flush(): Promise<void>;
removeSessionCookies(): Promise<boolean>;
// iOS only
getAll(useWebKit?: boolean): Promise<Cookies>;
clearByName(
url: string,
name: string,
useWebKit?: boolean,
): Promise<boolean>;
}
const CookieManager: CookieManagerStatic;
export default CookieManager;
}