@telia-ace/widget-core-flamingo 1.1.70-rc.23 → 1.1.70-rc.25

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-core-flamingo",
3
- "version": "1.1.70-rc.23",
3
+ "version": "1.1.70-rc.25",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
6
  "@teliads/icons": "^8.4.0",
@@ -1,7 +1,16 @@
1
+ export declare enum StorageCategory {
2
+ Mandatory = "mandatory",
3
+ Preferences = "preferences",
4
+ Analytics = "analytics"
5
+ }
1
6
  export declare class StorageService {
7
+ private storage;
8
+ private policy;
2
9
  private widgetId;
3
- constructor(widgetId: string);
4
- private _prefixKey;
5
- set(key: string, value: string): void;
10
+ constructor(widgetId: string, storageType: 'localStorage' | 'sessionStorage', policy: Record<StorageCategory, boolean>);
11
+ set<T>(key: string, value: T, category: StorageCategory): void;
6
12
  get<T>(key: string): T | null;
13
+ removeItem(key: string): void;
14
+ updatePolicy(newPolicy: Record<StorageCategory, boolean>): void;
15
+ private _prefixKey;
7
16
  }