@umituz/react-native-storage 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-storage",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Domain-Driven Design storage system for React Native apps with type-safe AsyncStorage operations",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -53,4 +53,16 @@ export interface IStorageRepository {
53
53
  * Get multiple items at once
54
54
  */
55
55
  getMultiple(keys: string[]): Promise<StorageResult<Record<string, string | null>>>;
56
+
57
+ /**
58
+ * Get object from storage (alias for getItem for backward compatibility)
59
+ * @deprecated Use getItem instead
60
+ */
61
+ getObject<T>(key: string, defaultValue: T): Promise<StorageResult<T>>;
62
+
63
+ /**
64
+ * Set object in storage (alias for setItem for backward compatibility)
65
+ * @deprecated Use setItem instead
66
+ */
67
+ setObject<T>(key: string, value: T): Promise<StorageResult<T>>;
56
68
  }
@@ -15,6 +15,9 @@ export enum StorageKey {
15
15
  // Onboarding
16
16
  ONBOARDING_COMPLETED = '@onboarding_completed',
17
17
 
18
+ // Auth
19
+ AUTH_SHOW_REGISTER = '@auth_show_register',
20
+
18
21
  // Localization
19
22
  LANGUAGE = '@app_language',
20
23
 
@@ -143,6 +143,22 @@ export class AsyncStorageRepository implements IStorageRepository {
143
143
  return failure(new StorageReadError('MULTIPLE_KEYS', error));
144
144
  }
145
145
  }
146
+
147
+ /**
148
+ * Get object from storage (alias for getItem for backward compatibility)
149
+ * @deprecated Use getItem instead
150
+ */
151
+ async getObject<T>(key: string, defaultValue: T): Promise<StorageResult<T>> {
152
+ return this.getItem(key, defaultValue);
153
+ }
154
+
155
+ /**
156
+ * Set object in storage (alias for setItem for backward compatibility)
157
+ * @deprecated Use setItem instead
158
+ */
159
+ async setObject<T>(key: string, value: T): Promise<StorageResult<T>> {
160
+ return this.setItem(key, value);
161
+ }
146
162
  }
147
163
 
148
164
  /**