1 | import { CacheLocation } from "../Configuration";
|
2 |
|
3 |
|
4 |
|
5 | export declare class BrowserStorage {
|
6 | protected cacheLocation: CacheLocation;
|
7 | constructor(cacheLocation: CacheLocation);
|
8 | /**
|
9 | * add value to storage
|
10 | * @param key
|
11 | * @param value
|
12 | * @param enableCookieStorage
|
13 | */
|
14 | setItem(key: string, value: string, enableCookieStorage?: boolean): void;
|
15 | /**
|
16 | * get one item by key from storage
|
17 | * @param key
|
18 | * @param enableCookieStorage
|
19 | */
|
20 | getItem(key: string, enableCookieStorage?: boolean): string;
|
21 | /**
|
22 | * remove value from storage
|
23 | * @param key
|
24 | */
|
25 | removeItem(key: string): void;
|
26 | /**
|
27 | * clear storage (remove all items from it)
|
28 | */
|
29 | clear(): void;
|
30 | /**
|
31 | * add value to cookies
|
32 | * @param cName
|
33 | * @param cValue
|
34 | * @param expires
|
35 | */
|
36 | setItemCookie(cName: string, cValue: string, expires?: number): void;
|
37 | /**
|
38 | * get one item by key from cookies
|
39 | * @param cName
|
40 | */
|
41 | getItemCookie(cName: string): string;
|
42 | /**
|
43 | * Clear an item in the cookies by key
|
44 | * @param cName
|
45 | */
|
46 | clearItemCookie(cName: string): void;
|
47 | /**
|
48 | * Get cookie expiration time
|
49 | * @param cookieLifeDays
|
50 | */
|
51 | getCookieExpirationTime(cookieLifeDays: number): string;
|
52 | }
|