@unvired/unvired-ts-core-sdk 0.0.14 → 0.0.16

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.
Files changed (4) hide show
  1. package/BuildNo.txt +1 -1
  2. package/index.d.ts +31 -5
  3. package/index.js +496 -318
  4. package/package.json +1 -1
package/BuildNo.txt CHANGED
@@ -1 +1 @@
1
- R-0.000.0014
1
+ R-0.000.0016
package/index.d.ts CHANGED
@@ -296,6 +296,7 @@ declare module '@unvired/unvired-ts-core-sdk/database/databaseManager' {
296
296
  count(dbType: DatabaseType, tableName: string, whereClause?: string): Promise<number>;
297
297
  getFirstEntity(dbType: DatabaseType, tableName: string): Promise<any>;
298
298
  saveWebData(): Promise<void>;
299
+ exportWebData(): Promise<void>;
299
300
  private getFieldMetaDataList;
300
301
  private constructInsertOrReplaceQuery;
301
302
  private constructUpdateQuery;
@@ -445,7 +446,7 @@ declare module '@unvired/unvired-ts-core-sdk/helper/httpConnection' {
445
446
  import { Observable } from 'rxjs';
446
447
  import { UnviredAccount } from '@unvired/unvired-ts-core-sdk/helper/unviredAccount';
447
448
  export class FetchAPIResponse {
448
- header: string | null;
449
+ header: any | null;
449
450
  data: string | null;
450
451
  percentage: number | null;
451
452
  httpStatusCode: number;
@@ -582,6 +583,7 @@ declare module '@unvired/unvired-ts-core-sdk/helper/reconciler' {
582
583
  private conflictBe;
583
584
  private databaseManager;
584
585
  private reconcilerType;
586
+ errorMessage: string;
585
587
  constructor(entityName: string, entityInDB: any, incomingEntity: any, incomingItems: any, conflictRule: string, isForeground: boolean, reconcilerType: ReconcilerType);
586
588
  getConflictBe(): any;
587
589
  reconcile(structureMetas: StructureMeta[], fieldMetas: FieldMeta[], requestType: ServiceConstants.RequestType, lid: string): Promise<boolean>;
@@ -654,16 +656,18 @@ declare module '@unvired/unvired-ts-core-sdk/helper/serverResponseHandler' {
654
656
 
655
657
  }
656
658
  declare module '@unvired/unvired-ts-core-sdk/helper/serviceConstants' {
657
- export const FrameworkVersionNumber = "0.0.14";
659
+ export const FrameworkVersionNumber = "0.0.16";
658
660
  export const FrameworkBuildNumber = "${BUILD_NUMBER}";
659
661
  export const FrameworkRevisionNumber = "f4444dd36a88188c063db5fe24a4eaa8b7d22106";
660
662
  export const FrameworkRevisionUrl = "";
661
663
  export const ApplicationRevisionNumber = "99.99";
662
664
  export const HeaderConstantConversationId = "X-UNVIRED-CONVERSATION-ID";
663
665
  export const HeaderConstantRequestType = "REQUEST_TYPE";
664
- export const HeaderConstantNumberOfPendingMessages = "X-UNVIRED-NUMBER-OF-PENDING-MESSAGES";
666
+ export const HeaderConstantNumberOfPendingMessages = "x-unvired-number-of-pending-messages";
667
+ export const HeaderConstantNumberOfProcessingMessages = "x-unvired-number-of-processing-messages";
665
668
  export const HeaderConstantPullMode = "x-pull-mode";
666
669
  export const HeaderConstantMessageType = "x-unvired-message-type";
670
+ export const HeaderConstantMessageSubType = "x-unvired-message-sub-type";
667
671
  export const HeaderConstantChunkSize = "X-Chunk-Size";
668
672
  export const HeaderConstantDataLength = "X-Data-Length";
669
673
  export const ParamCompanyNamespace = "COMPANY_NAMESPACE";
@@ -897,7 +901,7 @@ declare module '@unvired/unvired-ts-core-sdk/helper/settingsHelper' {
897
901
  }>): Promise<void>;
898
902
  static testPushNotification(): Promise<void>;
899
903
  static getCompleteLogs(): Promise<string>;
900
- static getInfoMessages(): Promise<any[]>;
904
+ static getInfoMessages(headerName: string, lid: string): Promise<any[]>;
901
905
  static setRequestTimeout(timeout: number): Promise<void>;
902
906
  static getRequestTimeout(): Promise<number>;
903
907
  static setLogLevel(logLevel: string): Promise<void>;
@@ -1213,7 +1217,7 @@ declare module '@unvired/unvired-ts-core-sdk/helper/utils' {
1213
1217
  * @param context - Optional context string for logging purposes
1214
1218
  * @returns Promise<object> - Parsed JSON object or empty object if parsing fails
1215
1219
  */
1216
- export function safeParseJson(response: Response, context?: string): Promise<any>;
1220
+ export function safeParseJson(response: Response, context?: string, returnObject?: boolean): Promise<any>;
1217
1221
 
1218
1222
  }
1219
1223
  declare module '@unvired/unvired-ts-core-sdk/inbox/downloadMessageService' {
@@ -1349,6 +1353,12 @@ declare module '@unvired/unvired-ts-core-sdk/platform/CordovaPlatformAdapter' {
1349
1353
  getDatabaseAdapter(): IDatabaseAdapter;
1350
1354
  getPushNotificationAdapter(): IPushNotificationAdapter | null;
1351
1355
  getLoggerAdapter(): ILoggerAdapter;
1356
+ getStorageAdapter(): {
1357
+ getItem: (key: string) => string;
1358
+ setItem: (key: string, value: string) => void;
1359
+ removeItem: (key: string) => void;
1360
+ clear: () => void;
1361
+ };
1352
1362
  }
1353
1363
 
1354
1364
  }
@@ -1454,6 +1464,9 @@ declare module '@unvired/unvired-ts-core-sdk/platform/PlatformInterface' {
1454
1464
  saveWebDB(options: {
1455
1465
  userId: string;
1456
1466
  }, callback: (result: any) => void, errorCallback: (error: any) => void): void;
1467
+ exportWebDB(options: {
1468
+ userId: string;
1469
+ }, callback: (result: any) => void, errorCallback: (error: any) => void): void;
1457
1470
  deleteUserData(options: {
1458
1471
  userId: string;
1459
1472
  }, callback: () => void, errorCallback: (error: any) => void): void;
@@ -1477,6 +1490,12 @@ declare module '@unvired/unvired-ts-core-sdk/platform/PlatformInterface' {
1477
1490
  getBackupLogFileContent(): Promise<string>;
1478
1491
  clearLogFile(): void;
1479
1492
  }
1493
+ export interface IStorageAdapter {
1494
+ getItem(key: string): string | null;
1495
+ setItem(key: string, value: string): void;
1496
+ removeItem(key: string): void;
1497
+ clear(): void;
1498
+ }
1480
1499
  /**
1481
1500
  * Main Platform Adapter Interface
1482
1501
  */
@@ -1491,6 +1510,7 @@ declare module '@unvired/unvired-ts-core-sdk/platform/PlatformInterface' {
1491
1510
  getDatabaseAdapter(): IDatabaseAdapter;
1492
1511
  getPushNotificationAdapter(): IPushNotificationAdapter | null;
1493
1512
  getLoggerAdapter(): ILoggerAdapter;
1513
+ getStorageAdapter(): IStorageAdapter;
1494
1514
  }
1495
1515
 
1496
1516
  }
@@ -1570,6 +1590,12 @@ declare module '@unvired/unvired-ts-core-sdk/platform/ReactNativePlatformAdapter
1570
1590
  getDatabaseAdapter(): IDatabaseAdapter;
1571
1591
  getPushNotificationAdapter(): IPushNotificationAdapter | null;
1572
1592
  getLoggerAdapter(): ILoggerAdapter;
1593
+ getStorageAdapter(): {
1594
+ getItem: (key: string) => any;
1595
+ setItem: (key: string, value: string) => void;
1596
+ removeItem: (key: string) => void;
1597
+ clear: () => void;
1598
+ };
1573
1599
  }
1574
1600
 
1575
1601
  }