@unvired/react-native-unvired-sdk 0.0.31 → 0.0.32

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/BuildNo.txt CHANGED
@@ -1 +1 @@
1
- R-0.000.0031
1
+ R-0.000.0032
@@ -178,6 +178,11 @@ export class DatabaseNative {
178
178
  errorCallback(error instanceof Error ? error.message : String(error));
179
179
  }
180
180
  },
181
+ getEncryptionKey: (options, successCallback, errorCallback) => {
182
+ // Native encryption key logic can be implemented here if needed.
183
+ // For now, return empty or trigger errorCallback depending on support.
184
+ errorCallback();
185
+ },
181
186
  };
182
187
  }
183
188
  }
@@ -71,6 +71,10 @@ export interface IDatabaseAdapter {
71
71
  * Delete user data from database
72
72
  */
73
73
  deleteUserData(options: DeleteUserDataOptions, callback: ResultCallback<void>, errorCallback: ErrorCallback): void;
74
+ /**
75
+ * Get encryption key
76
+ */
77
+ getEncryptionKey(options: any, successCallback: (key: string) => void, errorCallback: () => void): void;
74
78
  }
75
79
  /**
76
80
  * SQL result set interface
@@ -14,6 +14,6 @@ export declare class BaseLogger {
14
14
  logError(c: string, m: string, msg: string): void;
15
15
  getLogFileURL(): Promise<string>;
16
16
  getLogFileContent(): Promise<string>;
17
- getBackupLogFileContent(): Promise<string | null>;
17
+ getBackupLogFileContent(): Promise<string>;
18
18
  clearLogFile(): Promise<void>;
19
19
  }
@@ -15,7 +15,7 @@ export interface ILoggerImplementation {
15
15
  writeLine(line: string, maxSize: number): Promise<void>;
16
16
  getLogFileURL(): Promise<string>;
17
17
  getLogFileContent(): Promise<string>;
18
- getBackupLogFileContent(): Promise<string | null>;
18
+ getBackupLogFileContent(): Promise<string>;
19
19
  clear(): Promise<void>;
20
20
  }
21
21
  /**
@@ -29,6 +29,6 @@ export interface ILogger {
29
29
  logError(className: string, methodName: string, message: string): void;
30
30
  getLogFileURL(): Promise<string>;
31
31
  getLogFileContent(): Promise<string>;
32
- getBackupLogFileContent(): Promise<string | null>;
32
+ getBackupLogFileContent(): Promise<string>;
33
33
  clearLogFile(): Promise<void>;
34
34
  }
@@ -186,7 +186,7 @@ export class LoggerNative {
186
186
  }
187
187
  async getBackupLogFileContent() {
188
188
  if (!this.isAvailable || !RNFS)
189
- return null;
189
+ return "";
190
190
  try {
191
191
  // Do NOT force rotation. Only return existing backup if present.
192
192
  // await this.rotateLog();
@@ -194,11 +194,11 @@ export class LoggerNative {
194
194
  // Return base64 content for download/upload
195
195
  return await RNFS.readFile(this.backupZip, 'base64');
196
196
  }
197
- return null;
197
+ return "";
198
198
  }
199
199
  catch (e) {
200
200
  console.error('❌ LoggerNative getBackupLogFileContent error:', e);
201
- return null;
201
+ return "";
202
202
  }
203
203
  }
204
204
  async clear() {
@@ -5,6 +5,6 @@ export declare class LoggerWeb implements ILoggerImplementation {
5
5
  writeLine(line: string, maxSize: number): Promise<void>;
6
6
  getLogFileURL(): Promise<string>;
7
7
  getLogFileContent(): Promise<string>;
8
- getBackupLogFileContent(): Promise<null>;
8
+ getBackupLogFileContent(): Promise<string>;
9
9
  clear(): Promise<void>;
10
10
  }
@@ -8,6 +8,6 @@ export class LoggerWeb {
8
8
  }
9
9
  async getLogFileURL() { return ''; }
10
10
  async getLogFileContent() { return ''; }
11
- async getBackupLogFileContent() { return null; }
11
+ async getBackupLogFileContent() { return ""; }
12
12
  async clear() { }
13
13
  }
@@ -191,7 +191,7 @@ export class LoggerWindows {
191
191
  }
192
192
  async getBackupLogFileContent() {
193
193
  if (!this.isAvailable || !RNFS)
194
- return null;
194
+ return "";
195
195
  try {
196
196
  // Do NOT force rotation. Only return existing backup if present.
197
197
  // await this.rotateLog();
@@ -203,11 +203,11 @@ export class LoggerWindows {
203
203
  // Yes, so we can just read it back.
204
204
  return await RNFS.readFile(this.backupZip, 'base64');
205
205
  }
206
- return null;
206
+ return "";
207
207
  }
208
208
  catch (e) {
209
209
  console.error('❌ LoggerWindows getBackupLogFileContent error:', e);
210
- return null;
210
+ return "";
211
211
  }
212
212
  }
213
213
  async clear() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unvired/react-native-unvired-sdk",
3
- "version": "0.0.31",
3
+ "version": "0.0.32",
4
4
  "description": "Unvired SDK for React Native with logging, database, notifications, and file system support",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",