@unvired/unvired-ts-core-sdk 0.0.3
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 +1 -0
- package/README.md +93 -0
- package/index.d.ts +1603 -0
- package/index.js +35004 -0
- package/package.json +39 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,1603 @@
|
|
|
1
|
+
declare module '@unvired/unvired-ts-core-sdk/applicationMeta/applicationMetadataParser' {
|
|
2
|
+
export interface ApplicationMeta {
|
|
3
|
+
lid: string;
|
|
4
|
+
timestamp: number;
|
|
5
|
+
objectStatus: number;
|
|
6
|
+
syncStatus: number;
|
|
7
|
+
appClassName: string;
|
|
8
|
+
appId: string;
|
|
9
|
+
appName: string;
|
|
10
|
+
description: string;
|
|
11
|
+
version: string;
|
|
12
|
+
installationDate: string;
|
|
13
|
+
}
|
|
14
|
+
export interface BusinessEntityMeta {
|
|
15
|
+
lid: string;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
objectStatus: number;
|
|
18
|
+
syncStatus: number;
|
|
19
|
+
appName: string;
|
|
20
|
+
beName: string;
|
|
21
|
+
description: string;
|
|
22
|
+
addFunction: string;
|
|
23
|
+
modifyFunction: string;
|
|
24
|
+
deleteFunction: string;
|
|
25
|
+
notification: string;
|
|
26
|
+
attachments: string;
|
|
27
|
+
conflictRules: string;
|
|
28
|
+
save: string;
|
|
29
|
+
}
|
|
30
|
+
export interface StructureMeta {
|
|
31
|
+
lid: string;
|
|
32
|
+
timestamp: number;
|
|
33
|
+
objectStatus: number;
|
|
34
|
+
syncStatus: number;
|
|
35
|
+
structureName: string;
|
|
36
|
+
description: string;
|
|
37
|
+
className: string;
|
|
38
|
+
isHeader: string;
|
|
39
|
+
appName: string;
|
|
40
|
+
beName: string;
|
|
41
|
+
}
|
|
42
|
+
export interface FieldMeta {
|
|
43
|
+
lid: string;
|
|
44
|
+
timestamp: number;
|
|
45
|
+
objectStatus: number;
|
|
46
|
+
syncStatus: number;
|
|
47
|
+
appName: string;
|
|
48
|
+
beName: string;
|
|
49
|
+
structureName: string;
|
|
50
|
+
fieldName: string;
|
|
51
|
+
description: string;
|
|
52
|
+
length: string;
|
|
53
|
+
mandatory: string;
|
|
54
|
+
sqlType: string;
|
|
55
|
+
isGid: string;
|
|
56
|
+
}
|
|
57
|
+
export interface IndexMeta {
|
|
58
|
+
indexName: string;
|
|
59
|
+
structureName: string;
|
|
60
|
+
fieldName: string[];
|
|
61
|
+
}
|
|
62
|
+
export default class ApplicationMetaParser {
|
|
63
|
+
private applicationMeta;
|
|
64
|
+
private businessEntityMetas;
|
|
65
|
+
private structureMetas;
|
|
66
|
+
private fieldMetas;
|
|
67
|
+
private indexMetas;
|
|
68
|
+
private metadataJSON;
|
|
69
|
+
applicationName: string;
|
|
70
|
+
applicationVersion: string;
|
|
71
|
+
applicationNamespace: string;
|
|
72
|
+
private static readonly _instance;
|
|
73
|
+
private constructor();
|
|
74
|
+
static get instance(): ApplicationMetaParser;
|
|
75
|
+
init(jsonString: string): Promise<void>;
|
|
76
|
+
getApplicationMeta(): ApplicationMeta;
|
|
77
|
+
getBusinessEntityMetas(): BusinessEntityMeta[];
|
|
78
|
+
getStructureMetas(): StructureMeta[];
|
|
79
|
+
getFieldMetas(): FieldMeta[];
|
|
80
|
+
getIndexMetas(): IndexMeta[];
|
|
81
|
+
parseAppInfo(jsonString: string): void;
|
|
82
|
+
private parse;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
declare module '@unvired/unvired-ts-core-sdk/applicationMeta/fieldConstants' {
|
|
87
|
+
export const FieldLid: string;
|
|
88
|
+
export const FieldFid: string;
|
|
89
|
+
export const FieldConflict: string;
|
|
90
|
+
export const FieldTimestamp: string;
|
|
91
|
+
export const FieldSyncStatus: string;
|
|
92
|
+
export const FieldObjectStatus: string;
|
|
93
|
+
export const FieldTableName: string;
|
|
94
|
+
export const FieldInfoMsgCat: string;
|
|
95
|
+
export const FieldTypeLid: string;
|
|
96
|
+
export const FieldTypeFid: string;
|
|
97
|
+
export const FieldTypeConflict: string;
|
|
98
|
+
export const FieldTypeTimestamp: string;
|
|
99
|
+
export const FieldTypeSyncStatus: string;
|
|
100
|
+
export const FieldTypeObjectStatus: string;
|
|
101
|
+
export const FieldTypeInfoMsgCat: string;
|
|
102
|
+
export const FieldInfoMessageCategory: string;
|
|
103
|
+
export const FieldInfoMessageMessage: string;
|
|
104
|
+
export const InfoMessageFailure: string;
|
|
105
|
+
export const InfoMessageFailureAndProcess: string;
|
|
106
|
+
export const InfoMessageMsgWithheld: string;
|
|
107
|
+
export const InfoMessageWarning: string;
|
|
108
|
+
export const InfoMessageInfo: string;
|
|
109
|
+
export const InfoMessageSuccess: string;
|
|
110
|
+
export const driftNoElement: string;
|
|
111
|
+
export const InfoMessageError: string;
|
|
112
|
+
export const messageServiceType: string;
|
|
113
|
+
export const ApplicationNameAttribute = "name";
|
|
114
|
+
export const ApplicationDescriptionAttribute = "description";
|
|
115
|
+
export const ApplicationVersionAttribute = "version";
|
|
116
|
+
export const ApplicationNamespaceAttribute = "namespace";
|
|
117
|
+
export const ApplicationClassNameAttribute = "applicationClassName";
|
|
118
|
+
export const BeMetaData = "MetaData";
|
|
119
|
+
export const BeMetaDataDeleteAttribute = "delete";
|
|
120
|
+
export const BeNode = "BusinessEntity";
|
|
121
|
+
export const Be = "BE";
|
|
122
|
+
export const BeDescriptionAttribute = "description";
|
|
123
|
+
export const BeAttachmentsAttribute = "attachments";
|
|
124
|
+
export const BeNameAttribute = "name";
|
|
125
|
+
export const BeFieldTextAttribute = "value";
|
|
126
|
+
export const BeVersionAttribute = "version";
|
|
127
|
+
export const BeAddFunctionAttribute = "addFunction";
|
|
128
|
+
export const BeModifyFunctionAttribute = "modifyFunction";
|
|
129
|
+
export const BeDeleteFunctionAttribute = "deleteFunction";
|
|
130
|
+
export const BeNotificationAttribute = "notification";
|
|
131
|
+
export const BeOnConflictAttribute = "onConflict";
|
|
132
|
+
export const BeSaveAttribute = "save";
|
|
133
|
+
export const BeActionAttribute = "action";
|
|
134
|
+
export const ConflictModeServerWins = "SERVER_WINS";
|
|
135
|
+
export const ConflictModeDeviceWins = "DEVICE_WINS";
|
|
136
|
+
export const ConflictModeAppHandled = "APP_HANDLED";
|
|
137
|
+
export const BeItemIndex = "index";
|
|
138
|
+
export const BeItemDescriptionAttribute = "description";
|
|
139
|
+
export const BeItemNameAttribute = "name";
|
|
140
|
+
export const BeItemClassNameAttribute = "className";
|
|
141
|
+
export const BeItemActionAttribute = "action";
|
|
142
|
+
export const BeItemIsHeader = "header";
|
|
143
|
+
export const BeItemIsAttachment = "attachment";
|
|
144
|
+
export const BeJsonFieldNode = "field";
|
|
145
|
+
export const BeJsonFieldNameNode = "name";
|
|
146
|
+
export const BeJsonFieldIsGid = "isGid";
|
|
147
|
+
export const BeJsonFieldLength = "length";
|
|
148
|
+
export const BeJsonFieldMandatory = "mandatory";
|
|
149
|
+
export const BeJsonFieldSqlType = "sqlType";
|
|
150
|
+
export const BeJsonFieldDescription = "description";
|
|
151
|
+
export const IndexNode = "Index";
|
|
152
|
+
export const IndexName = "name";
|
|
153
|
+
export const IndexFields = "Fields";
|
|
154
|
+
export const IndexTableName = "tableName";
|
|
155
|
+
|
|
156
|
+
}
|
|
157
|
+
declare module '@unvired/unvired-ts-core-sdk/attachment/attachmentHelper' {
|
|
158
|
+
export default class AttachmentHelper {
|
|
159
|
+
private static readonly ATTACHMENT_DIR;
|
|
160
|
+
private static createDirectoriesRecursively;
|
|
161
|
+
static getAttachmentDirectory(): Promise<string>;
|
|
162
|
+
static addAttachment(attachmentName: string, attachmentData: ArrayBuffer): Promise<string>;
|
|
163
|
+
static getAttachment(attachmentName: string): Promise<ArrayBuffer>;
|
|
164
|
+
static deleteAttachment(attachmentName: string): Promise<void>;
|
|
165
|
+
static readFileAsArrayBuffer(filePath: string): Promise<ArrayBuffer>;
|
|
166
|
+
static fileExists(filePath: string): Promise<boolean>;
|
|
167
|
+
static readExternalFile(filePath: string): Promise<ArrayBuffer>;
|
|
168
|
+
static writeExternalFile(filePath: string, fileName: string, data: ArrayBuffer): Promise<void>;
|
|
169
|
+
static deleteExternalFile(filePath: string): Promise<void>;
|
|
170
|
+
static getAttachmentPath(attachmentName: string): Promise<string>;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
}
|
|
174
|
+
declare module '@unvired/unvired-ts-core-sdk/attachment/attachmentQHelper' {
|
|
175
|
+
export default class AttachmentQHelper {
|
|
176
|
+
static checkAttachmentAndQueueForAutoDownload(attachmentItemName: string, attachmentItem: any): Promise<void>;
|
|
177
|
+
static queueForDownload(attachmentItemName: string, attachmentItem: any, priority: number): Promise<boolean>;
|
|
178
|
+
private static addAttachmentQForDownload;
|
|
179
|
+
static downloadAttachmentAndGetPath(uid: string, fileName: string): Promise<any>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
}
|
|
183
|
+
declare module '@unvired/unvired-ts-core-sdk/attachment/attachmentService' {
|
|
184
|
+
export default class AttachmentService {
|
|
185
|
+
private static instance;
|
|
186
|
+
private isRunning;
|
|
187
|
+
private shouldStop;
|
|
188
|
+
private constructor();
|
|
189
|
+
static getInstance(): AttachmentService;
|
|
190
|
+
start(): void;
|
|
191
|
+
stop(): void;
|
|
192
|
+
private makeNetworkCallToDownloadAttachment;
|
|
193
|
+
private getAttachmentItems;
|
|
194
|
+
private checkAndUpdateAttachmentDownloadStatus;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
}
|
|
198
|
+
declare module '@unvired/unvired-ts-core-sdk/authenticationService' {
|
|
199
|
+
import { LoginParameters } from '@unvired/unvired-ts-core-sdk/helper/utils';
|
|
200
|
+
export class UnviredResult {
|
|
201
|
+
data: any;
|
|
202
|
+
message: string;
|
|
203
|
+
type: number;
|
|
204
|
+
error: string;
|
|
205
|
+
errorDetail: string;
|
|
206
|
+
}
|
|
207
|
+
export enum ResultType {
|
|
208
|
+
success = 0,
|
|
209
|
+
error = 1
|
|
210
|
+
}
|
|
211
|
+
export class SyncResult extends UnviredResult {
|
|
212
|
+
code: number;
|
|
213
|
+
}
|
|
214
|
+
export class AuthenticationService {
|
|
215
|
+
jwtToken: string;
|
|
216
|
+
loginParameters: any;
|
|
217
|
+
private messageInterval;
|
|
218
|
+
private static readonly _instance;
|
|
219
|
+
private constructor();
|
|
220
|
+
static get instance(): AuthenticationService;
|
|
221
|
+
login(loginParameters: LoginParameters): Promise<any>;
|
|
222
|
+
loginWithDemoData(loginParameters: any): Promise<any>;
|
|
223
|
+
logout(): Promise<any>;
|
|
224
|
+
clearData(): Promise<any>;
|
|
225
|
+
authenticateAndActivate(loginParameters: any): Promise<any>;
|
|
226
|
+
authenticateLocal(loginParameters: any): Promise<any>;
|
|
227
|
+
getAllAccounts(): Promise<any>;
|
|
228
|
+
switchAccount(account: any): Promise<any>;
|
|
229
|
+
deleteAccount(account: any): Promise<any>;
|
|
230
|
+
setClientCredentials(credentials: any[]): Promise<any>;
|
|
231
|
+
isClientCredentialsSet(): Promise<any>;
|
|
232
|
+
setMessageInterval(interval: number): void;
|
|
233
|
+
getMessageInterval(): number;
|
|
234
|
+
private saveSettings;
|
|
235
|
+
private checkIfDataPresentInIndexDB;
|
|
236
|
+
/**
|
|
237
|
+
* Register and listen for push notifications using FirebasePushService (for Android/iOS platforms).
|
|
238
|
+
* This function is reusable and can be called wherever push notification registration is needed.
|
|
239
|
+
*/
|
|
240
|
+
private registerAndListenForPushNotifications;
|
|
241
|
+
private startInitialProcesses;
|
|
242
|
+
}
|
|
243
|
+
const _default: AuthenticationService;
|
|
244
|
+
export default _default;
|
|
245
|
+
|
|
246
|
+
}
|
|
247
|
+
declare module '@unvired/unvired-ts-core-sdk/database/appDatabaseManager' {
|
|
248
|
+
export class AppDatabaseManager {
|
|
249
|
+
private static instance;
|
|
250
|
+
private constructor();
|
|
251
|
+
static getInstance(): AppDatabaseManager;
|
|
252
|
+
select(tableName: string, whereClause?: string): Promise<any>;
|
|
253
|
+
insert(tableName: string, structureObject: any, isHeader: boolean): Promise<any>;
|
|
254
|
+
insertOrUpdate(tableName: string, structureObject: any, isHeader: boolean): Promise<any>;
|
|
255
|
+
delete(tableName: string, whereClause?: string): Promise<any>;
|
|
256
|
+
update(tableName: string, updatedObject: any, whereClause: any): Promise<any>;
|
|
257
|
+
executeStatement(query: string): Promise<any>;
|
|
258
|
+
createSavePoint(savePoint: string): Promise<void>;
|
|
259
|
+
releaseSavePoint(savePoint: string): Promise<void>;
|
|
260
|
+
rollbackToSavePoint(savePoint: string): Promise<void>;
|
|
261
|
+
beginTransaction(): Promise<void>;
|
|
262
|
+
endTransaction(): Promise<void>;
|
|
263
|
+
rollbackTransaction(): Promise<void>;
|
|
264
|
+
}
|
|
265
|
+
export default AppDatabaseManager;
|
|
266
|
+
|
|
267
|
+
}
|
|
268
|
+
declare module '@unvired/unvired-ts-core-sdk/database/databaseManager' {
|
|
269
|
+
export enum DatabaseType {
|
|
270
|
+
AppDb = "AppDb",
|
|
271
|
+
FrameworkDb = "FrameworkDb"
|
|
272
|
+
}
|
|
273
|
+
export class DatabaseManager {
|
|
274
|
+
private fileName;
|
|
275
|
+
private static instance;
|
|
276
|
+
private fieldMetas;
|
|
277
|
+
private isDbCreated;
|
|
278
|
+
private constructor();
|
|
279
|
+
private initializeDatabase;
|
|
280
|
+
static getInstance(): DatabaseManager;
|
|
281
|
+
clearInstance(): void;
|
|
282
|
+
createTables(): Promise<boolean>;
|
|
283
|
+
select(dbType: DatabaseType, tableName: string, whereClause?: string): Promise<any>;
|
|
284
|
+
insert(dbType: DatabaseType, tableName: string, structureObject: any, isHeader: boolean, isFromApp?: boolean): Promise<any>;
|
|
285
|
+
insertOrUpdate(dbType: DatabaseType, tableName: string, structureObject: any, isHeader: boolean, isFromApp?: boolean): Promise<any>;
|
|
286
|
+
delete(dbType: DatabaseType, tableName: string, whereClause?: string): Promise<any>;
|
|
287
|
+
update(dbType: DatabaseType, tableName: string, updatedObject: any, whereClause: any, isFromApp?: boolean): Promise<any>;
|
|
288
|
+
executeStatement(dbType: DatabaseType, sqlQuery: string): Promise<any>;
|
|
289
|
+
private execute;
|
|
290
|
+
createSavePoint(dbType: DatabaseType, savePoint: string): Promise<void>;
|
|
291
|
+
releaseSavePoint(dbType: DatabaseType, savePoint: string): Promise<void>;
|
|
292
|
+
rollbackToSavePoint(dbType: DatabaseType, savePoint: string): Promise<void>;
|
|
293
|
+
beginTransaction(dbType: DatabaseType): Promise<void>;
|
|
294
|
+
endTransaction(dbType: DatabaseType): Promise<void>;
|
|
295
|
+
rollbackTransaction(dbType: DatabaseType): Promise<void>;
|
|
296
|
+
count(dbType: DatabaseType, tableName: string, whereClause?: string): Promise<number>;
|
|
297
|
+
getFirstEntity(dbType: DatabaseType, tableName: string): Promise<any>;
|
|
298
|
+
saveWebData(): Promise<void>;
|
|
299
|
+
private getFieldMetaDataList;
|
|
300
|
+
private constructInsertOrReplaceQuery;
|
|
301
|
+
private constructUpdateQuery;
|
|
302
|
+
private copyAttachmentToApplicationFolder;
|
|
303
|
+
escapeSqlString(value: string): string;
|
|
304
|
+
private checkIfObjectExists;
|
|
305
|
+
}
|
|
306
|
+
export default DatabaseManager;
|
|
307
|
+
|
|
308
|
+
}
|
|
309
|
+
declare module '@unvired/unvired-ts-core-sdk/firebasePushService' {
|
|
310
|
+
export class FirebasePushService {
|
|
311
|
+
static registerForPushNotifications(onRegister: (token: string) => void, onError?: (error: any) => void): void;
|
|
312
|
+
private static registerTokenHandlers;
|
|
313
|
+
static onNotificationReceived(onMessage: (data: any) => void, onError?: (error: any) => void): void;
|
|
314
|
+
static parseNotification(data: any): any;
|
|
315
|
+
}
|
|
316
|
+
export default FirebasePushService;
|
|
317
|
+
|
|
318
|
+
}
|
|
319
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/dbCreateTablesManager' {
|
|
320
|
+
import DatabaseManager from "@unvired/unvired-ts-core-sdk/database/databaseManager";
|
|
321
|
+
import ApplicationMetaParser from '@unvired/unvired-ts-core-sdk/applicationMeta/applicationMetadataParser';
|
|
322
|
+
export default class DbCreateTablesManager {
|
|
323
|
+
fileName: string;
|
|
324
|
+
parser: ApplicationMetaParser;
|
|
325
|
+
databaseManager: DatabaseManager | null;
|
|
326
|
+
constructor();
|
|
327
|
+
createTables(): Promise<boolean>;
|
|
328
|
+
createFrameworkTables(): Promise<boolean>;
|
|
329
|
+
insertParsedDataIntoFrameworkTables(): Promise<boolean>;
|
|
330
|
+
createAppTables(): Promise<boolean>;
|
|
331
|
+
prepareCreateTableQuery(tableName: string, tableColumnNames: string[], tableColumnTypes: any[], primaryKeys: string[], uniqueKeys: string[], mandatoryFields: boolean[], { foreignKeys, foreignKeyTableName, foreignKeyTableKeys }?: {
|
|
332
|
+
foreignKeys?: string[];
|
|
333
|
+
foreignKeyTableName?: string;
|
|
334
|
+
foreignKeyTableKeys?: string[];
|
|
335
|
+
}): string;
|
|
336
|
+
prepareCreateIndexQuery(indexName: string, structureName: string, fieldNames: string[]): string;
|
|
337
|
+
appTableGenerator(message: {
|
|
338
|
+
[key: string]: any;
|
|
339
|
+
}): string[];
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
}
|
|
343
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/frameworkHelper' {
|
|
344
|
+
global {
|
|
345
|
+
interface Window {
|
|
346
|
+
cordova: any;
|
|
347
|
+
device: any;
|
|
348
|
+
resolveLocalFileSystemURL: any;
|
|
349
|
+
UnviredDB: any;
|
|
350
|
+
FirebasePlugin: any;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
export default class FrameworkHelper {
|
|
354
|
+
static getPlatform(): string;
|
|
355
|
+
static getUUID(): string;
|
|
356
|
+
static getFrontendType(): string;
|
|
357
|
+
static getMD5String(str: any): any;
|
|
358
|
+
static getDocumentDirectory(): string;
|
|
359
|
+
static getFolderBasedOnUserId(userId: string): Promise<string>;
|
|
360
|
+
static deleteUserFolder(userId: string): Promise<void>;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
}
|
|
364
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/frameworkSettingsManager' {
|
|
365
|
+
export enum FrameworkSettingsFields {
|
|
366
|
+
appLockTimeout = 0,
|
|
367
|
+
email = 1,
|
|
368
|
+
firstName = 2,
|
|
369
|
+
lastName = 3,
|
|
370
|
+
dataFormat = 4,
|
|
371
|
+
serverType = 5,
|
|
372
|
+
unviredUser = 6,
|
|
373
|
+
namespace = 7,
|
|
374
|
+
serverVersion = 8,
|
|
375
|
+
activationId = 9,
|
|
376
|
+
frontendIdentifier = 10,
|
|
377
|
+
feUser = 11,
|
|
378
|
+
frontendType = 12,
|
|
379
|
+
secKey = 13,
|
|
380
|
+
secLevel = 14,
|
|
381
|
+
logLevel = 15,
|
|
382
|
+
url = 16,
|
|
383
|
+
overrideUMPUrl = 17,
|
|
384
|
+
localPassword = 18,
|
|
385
|
+
frontendId = 19,
|
|
386
|
+
locationTracking = 20,
|
|
387
|
+
locationTrackingInterval = 21,
|
|
388
|
+
locationUploadInterval = 22,
|
|
389
|
+
locationTrackingDays = 23,
|
|
390
|
+
locationTrackingStart = 24,
|
|
391
|
+
locationTrackingEnd = 25,
|
|
392
|
+
loginLanguage = 26,
|
|
393
|
+
compressPostData = 27,
|
|
394
|
+
phone = 28,
|
|
395
|
+
profilePic = 29,
|
|
396
|
+
oneTimeToken = 30,
|
|
397
|
+
applicationId = 31,
|
|
398
|
+
md5Pwd = 32,
|
|
399
|
+
isDemo = 33,
|
|
400
|
+
serverId = 34,
|
|
401
|
+
companyAlias = 35,
|
|
402
|
+
config = 36
|
|
403
|
+
}
|
|
404
|
+
export const stringToFrameworkSettingsFields: (fieldName: string) => FrameworkSettingsFields;
|
|
405
|
+
export class FrameworkSetting {
|
|
406
|
+
lid: string;
|
|
407
|
+
timestamp: number;
|
|
408
|
+
objectStatus: number;
|
|
409
|
+
syncStatus: number;
|
|
410
|
+
fieldName: string;
|
|
411
|
+
fieldValue: string;
|
|
412
|
+
constructor(lid: string, timestamp: number, objectStatus: number, syncStatus: number, fieldName: string, fieldValue: string);
|
|
413
|
+
}
|
|
414
|
+
export class FrameworkSettingsManager {
|
|
415
|
+
private fileName;
|
|
416
|
+
private frameworkSettingsHashtable;
|
|
417
|
+
private databaseManager;
|
|
418
|
+
private static frameworkSettingsManager;
|
|
419
|
+
private constructor();
|
|
420
|
+
static getInstance(): FrameworkSettingsManager;
|
|
421
|
+
setFieldValue(field: FrameworkSettingsFields, fieldValue: any): Promise<void>;
|
|
422
|
+
getFieldValue(field: FrameworkSettingsFields): Promise<string>;
|
|
423
|
+
addSystemCredential(systemCredential: any): Promise<void>;
|
|
424
|
+
getAllSystemCredentials(): Promise<any[]>;
|
|
425
|
+
static getDemoModeFwSettings(loginParameters: any): any;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
}
|
|
429
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/getMessageTimerManager' {
|
|
430
|
+
export default class GetMessageTimerManager {
|
|
431
|
+
private static instance;
|
|
432
|
+
private timer;
|
|
433
|
+
private constructor();
|
|
434
|
+
static getInstance(): GetMessageTimerManager;
|
|
435
|
+
setup(): void;
|
|
436
|
+
startTimer(): Promise<void>;
|
|
437
|
+
stopTimer(): Promise<void>;
|
|
438
|
+
private _isAnyRequestPending;
|
|
439
|
+
private _callGetMessage;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
}
|
|
443
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/httpConnection' {
|
|
444
|
+
import { LoginParameters } from '@unvired/unvired-ts-core-sdk/helper/utils';
|
|
445
|
+
import { Observable } from 'rxjs';
|
|
446
|
+
import { UnviredAccount } from '@unvired/unvired-ts-core-sdk/helper/unviredAccount';
|
|
447
|
+
export class FetchAPIResponse {
|
|
448
|
+
header: string | null;
|
|
449
|
+
data: string | null;
|
|
450
|
+
percentage: number | null;
|
|
451
|
+
httpStatusCode: number;
|
|
452
|
+
constructor(httpStatusCode: number, percentage?: number | null, header?: string | null, data?: string | null);
|
|
453
|
+
}
|
|
454
|
+
export let jwtAuthToken: string;
|
|
455
|
+
export const bearerAuth: () => string;
|
|
456
|
+
export class HttpConnection {
|
|
457
|
+
sessionId: string;
|
|
458
|
+
authenticateUser(loginParameters: LoginParameters): Promise<Response>;
|
|
459
|
+
activateUser(loginParameters: any): Promise<any>;
|
|
460
|
+
getJwtToken(loginParameters: any): Promise<any>;
|
|
461
|
+
getJSONFromFile(filePath: string): Promise<string>;
|
|
462
|
+
makeSyncCallWithObservable(bodyData: string, paName: string): Observable<FetchAPIResponse>;
|
|
463
|
+
makeSyncCall(bodyData: string, paName: string, account: UnviredAccount, loginParameters: any): Promise<FetchAPIResponse>;
|
|
464
|
+
uploadAttachment(attachmentItem: any): Promise<Response>;
|
|
465
|
+
static makeAdminServicesCall(inputData: string, paName: string, account: UnviredAccount, loginParameters: any): Promise<Response>;
|
|
466
|
+
downloadMessage(account: UnviredAccount, loginParameters: any): Promise<FetchAPIResponse>;
|
|
467
|
+
acknowledgeMessageService(convId: string): Promise<Response>;
|
|
468
|
+
registerNotification(pushToken: string): Promise<Response>;
|
|
469
|
+
downloadAttachment(attachmentUid: string): Promise<Response>;
|
|
470
|
+
downloadAttachmentStream(attachmentUid: string, fileName?: string, onProgress?: (bytesDownloaded: number, totalBytes?: number) => void): Promise<string>;
|
|
471
|
+
private initializeFileWriter;
|
|
472
|
+
private writeChunkToFile;
|
|
473
|
+
private closeFileWriter;
|
|
474
|
+
private getFileSize;
|
|
475
|
+
uploadLogOrData(filePath: string, action: string): Promise<Response>;
|
|
476
|
+
static getCommonPostParameters(): Promise<any>;
|
|
477
|
+
static getActivatePostParameters(loginParameters: any): Promise<any>;
|
|
478
|
+
getOnetimeTokenFromFWSettingsManager(): Promise<string>;
|
|
479
|
+
downloadWithStream(url: string, body: string, headers: HeadersInit): Observable<FetchAPIResponse>;
|
|
480
|
+
private getDataFromChunks;
|
|
481
|
+
private getHeaderFromChunks;
|
|
482
|
+
private getObjectFromChunks;
|
|
483
|
+
private updateJwtToken;
|
|
484
|
+
}
|
|
485
|
+
const _default: HttpConnection;
|
|
486
|
+
export default _default;
|
|
487
|
+
|
|
488
|
+
}
|
|
489
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/notificationConstants' {
|
|
490
|
+
export class NotificationConstants {
|
|
491
|
+
static SYSTEM: string;
|
|
492
|
+
static USER: string;
|
|
493
|
+
static ATTACHMENT: string;
|
|
494
|
+
static DATA: string;
|
|
495
|
+
static UNDERSCORE_TYPE: string;
|
|
496
|
+
static TYPE: string;
|
|
497
|
+
static UNVIRED_PUSH_NOTIFICATION: string;
|
|
498
|
+
static INDIENCE_PUSH_NOTIFICATION: string;
|
|
499
|
+
static INDIENCE_PUSH_NOTIFICATION_TEMP: string;
|
|
500
|
+
static PUSH_NOTIFICATION_ATTACHMENT_ID: string;
|
|
501
|
+
static UNVIRED_QR_AUTHENTICATION: string;
|
|
502
|
+
static PUSH_NOTIFICATION_COUNT: string;
|
|
503
|
+
static PUSH_NOTIFICATION_MESSAGE: string;
|
|
504
|
+
static PUSH_NOTIFICATION_TITLE: string;
|
|
505
|
+
static PUSH_NOTIFICATION_SILENT: string;
|
|
506
|
+
static PUSH_NOTIFICATION_CATEGORY: string;
|
|
507
|
+
static PUSH_NOTIFICATION_ACTION_BUTTON: string;
|
|
508
|
+
static PUSH_NOTIFICATION_SOUND: string;
|
|
509
|
+
static PUSH_NOTIFICATION_ACTIVATION_ID: string;
|
|
510
|
+
static PUSH_NOTIFICATION_CONTEXT: string;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
}
|
|
514
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/notificationListnerHelper' {
|
|
515
|
+
export const TYPE = "type";
|
|
516
|
+
export const DATA = "data";
|
|
517
|
+
export const MESSAGE = "message";
|
|
518
|
+
export const ERROR = "error";
|
|
519
|
+
export const ERROR_DETAIL = "errorDetail";
|
|
520
|
+
export const kAttachmentItem = "kAttachmentItem";
|
|
521
|
+
export const kError = "kError";
|
|
522
|
+
export enum NotificationListnerType {
|
|
523
|
+
data_send = 0,
|
|
524
|
+
data_changed = 1,
|
|
525
|
+
data_received = 2,
|
|
526
|
+
app_reset = 3,
|
|
527
|
+
attachmentDownloadSuccess = 4,
|
|
528
|
+
attachmentDownloadError = 5,// Notify application with error message and attchment item on attachment download success
|
|
529
|
+
incomingDataProcessingFinished = 6,
|
|
530
|
+
attachmentDownloadWaiting = 7,// Notify application when attachment download is waiting on the server
|
|
531
|
+
infoMessage = 8,// Notify application with any InfoMessages
|
|
532
|
+
serverError = 9,
|
|
533
|
+
attachmentDownloadCompleted = 10,
|
|
534
|
+
sentItemChanged = 11,
|
|
535
|
+
jwtTokenUpdated = 12,
|
|
536
|
+
jwtTokenExpired = 13
|
|
537
|
+
}
|
|
538
|
+
export class NotificationListenerHelper {
|
|
539
|
+
static initialCount: number;
|
|
540
|
+
static dataSenderListener: any;
|
|
541
|
+
static synchronizationStateListener: any;
|
|
542
|
+
static pushNotificationListener: any;
|
|
543
|
+
static syncItemsCountListener: any;
|
|
544
|
+
static postDataSenderNotification(data: any, notificationType: NotificationListnerType): void;
|
|
545
|
+
static postSynchronizationStateNotification(postMessage: string): void;
|
|
546
|
+
static postPushNotification(data: any): void;
|
|
547
|
+
private static postSyncItemsCountNotification;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
}
|
|
551
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/passcodeGenerator' {
|
|
552
|
+
class PassCodeGenerator {
|
|
553
|
+
private static readonly PASS_CODE_LENGTH;
|
|
554
|
+
private static readonly INTERVAL;
|
|
555
|
+
private static readonly ADJACENT_INTERVALS;
|
|
556
|
+
private static readonly PIN_MODULO;
|
|
557
|
+
computePin(secret: any, feUserId: any): any[];
|
|
558
|
+
getTimeStamp(): string;
|
|
559
|
+
padOutput(value: any): any;
|
|
560
|
+
base32Decode(str: any): any[];
|
|
561
|
+
}
|
|
562
|
+
const _default: PassCodeGenerator;
|
|
563
|
+
export default _default;
|
|
564
|
+
|
|
565
|
+
}
|
|
566
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/reconciler' {
|
|
567
|
+
import { FieldMeta, StructureMeta } from "@unvired/unvired-ts-core-sdk/applicationMeta/applicationMetadataParser";
|
|
568
|
+
import * as ServiceConstants from '@unvired/unvired-ts-core-sdk/helper/serviceConstants';
|
|
569
|
+
export enum ReconcilerType {
|
|
570
|
+
RequestResponse = 0,
|
|
571
|
+
PullPushQuery = 1
|
|
572
|
+
}
|
|
573
|
+
class Reconciler {
|
|
574
|
+
private entityName;
|
|
575
|
+
private entityInDB;
|
|
576
|
+
private incomingEntity;
|
|
577
|
+
private incomingItems;
|
|
578
|
+
private conflictRule;
|
|
579
|
+
private isForeground;
|
|
580
|
+
private incomingItemLids;
|
|
581
|
+
private incomingAttachmentItemLids;
|
|
582
|
+
private conflictBe;
|
|
583
|
+
private databaseManager;
|
|
584
|
+
private reconcilerType;
|
|
585
|
+
constructor(entityName: string, entityInDB: any, incomingEntity: any, incomingItems: any, conflictRule: string, isForeground: boolean, reconcilerType: ReconcilerType);
|
|
586
|
+
getConflictBe(): any;
|
|
587
|
+
reconcile(structureMetas: StructureMeta[], fieldMetas: FieldMeta[], requestType: ServiceConstants.RequestType, lid: string): Promise<boolean>;
|
|
588
|
+
private setHeaderFieldsAndStatuses;
|
|
589
|
+
private insertDataIntoDB;
|
|
590
|
+
private updateDataIntoDB;
|
|
591
|
+
private actionHeaderForGlobal;
|
|
592
|
+
private actionHeaderForAdd;
|
|
593
|
+
private actionHeaderForModify;
|
|
594
|
+
private actionHeaderForDelete;
|
|
595
|
+
private handleHeaderConflict;
|
|
596
|
+
private handleItems;
|
|
597
|
+
private actionOnIncomingItemForGlobal;
|
|
598
|
+
private actionOnIncomingItemForAdd;
|
|
599
|
+
private actionOnIncomingItemForModify;
|
|
600
|
+
private actionOnIncomingItemForDelete;
|
|
601
|
+
private handleItemConflictWithItemDataStructure;
|
|
602
|
+
private handleAttachmentItems;
|
|
603
|
+
private actionOnIncomingAttachmentItemForGlobal;
|
|
604
|
+
private actionOnIncomingAttachmentItemForAdd;
|
|
605
|
+
private actionOnIncomingAttachmentItemForModify;
|
|
606
|
+
private actionOnIncomingAttachmentItemForDelete;
|
|
607
|
+
private addItemToCollection;
|
|
608
|
+
private addAttachmentItemToCollection;
|
|
609
|
+
private setItemFieldsAndStatusesFor;
|
|
610
|
+
private setAttachmentItemFieldsAndStatuses;
|
|
611
|
+
private handleDeletionOfItemsInDBWithoutIncomingItems;
|
|
612
|
+
private actionOnItemsInDBWithoutIncomingItems;
|
|
613
|
+
private actionOnDBItemWithoutIncomingItemForGlobal;
|
|
614
|
+
private actionOnDBItemWithoutIncomingItemForAdd;
|
|
615
|
+
private actionOnDBItemWithoutIncomingItemForModifyOrDelete;
|
|
616
|
+
private handleDeletionOfAttachmentItemsInDBWithoutIncomingItems;
|
|
617
|
+
actionOnAttachmentItemsInDBWithoutIncomingItems(attachmentItemName: string, attachmentItemsInDBWithoutIncomingItems: any[]): Promise<void>;
|
|
618
|
+
actionOnDBAttachmentItemWithoutIncomingItemForGlobal(attachmentItemName: string, attachmentItemInDB: any): Promise<boolean>;
|
|
619
|
+
actionOnDBAttachmentItemWithoutIncomingItemForAdd(attachmentItemName: string, attachmentItemInDB: any): Promise<boolean>;
|
|
620
|
+
actionOnDBAttachmentItemWithoutIncomingItemForModify(attachmentItemName: string, attachmentItemInDB: any): Promise<boolean>;
|
|
621
|
+
actionOnDBAttachmentItemWithoutIncomingItemForDelete(attachmentItemName: string, attachmentItemInDB: any): Promise<boolean>;
|
|
622
|
+
private deleteAttachmentDataFromDB;
|
|
623
|
+
manageConflict(headerMeta: StructureMeta, currentDBHeader: {
|
|
624
|
+
[key: string]: any;
|
|
625
|
+
}, currentIncomingHeader: {
|
|
626
|
+
[key: string]: any;
|
|
627
|
+
}, currentIncomingItems: {
|
|
628
|
+
[key: string]: any;
|
|
629
|
+
}): Promise<boolean>;
|
|
630
|
+
}
|
|
631
|
+
export default Reconciler;
|
|
632
|
+
|
|
633
|
+
}
|
|
634
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/serverResponseHandler' {
|
|
635
|
+
import { FieldMeta } from "@unvired/unvired-ts-core-sdk/applicationMeta/applicationMetadataParser";
|
|
636
|
+
import { RequestType } from "@unvired/unvired-ts-core-sdk/helper/serviceConstants";
|
|
637
|
+
import { ResultType } from "@unvired/unvired-ts-core-sdk/authenticationService";
|
|
638
|
+
class ServerResponseHandler {
|
|
639
|
+
static sourceClass: string;
|
|
640
|
+
static handleResponseData(responseData: any, autoSave: boolean, isForeground: boolean, lid: string, entityName: string, requestType: RequestType): Promise<{
|
|
641
|
+
type: ResultType;
|
|
642
|
+
message: string;
|
|
643
|
+
}>;
|
|
644
|
+
private static getRank;
|
|
645
|
+
private static checkAtleastOneBeAvailable;
|
|
646
|
+
static checkDuplicateBe(tableName: string, fieldMetas: FieldMeta[], dataObj: any, requestType: RequestType, lid: string): Promise<any | null>;
|
|
647
|
+
private static checkIfEntityPresentInDB;
|
|
648
|
+
private static getWhereClauseBasedOnGidFields;
|
|
649
|
+
private static insertIncomingBeData;
|
|
650
|
+
static updateErrorStatusInHeaderAndCreateInfoMessage(isForeground: boolean, errorString: string, entityName: string, headerLid: string, infoMsgCategory: string): Promise<any>;
|
|
651
|
+
private static updateInfoMessageCategoryInHeader;
|
|
652
|
+
}
|
|
653
|
+
export default ServerResponseHandler;
|
|
654
|
+
|
|
655
|
+
}
|
|
656
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/serviceConstants' {
|
|
657
|
+
export const FrameworkVersionNumber = "0.0.3";
|
|
658
|
+
export const FrameworkBuildNumber = "${BUILD_NUMBER}";
|
|
659
|
+
export const FrameworkRevisionNumber = "f4444dd36a88188c063db5fe24a4eaa8b7d22106";
|
|
660
|
+
export const FrameworkRevisionUrl = "";
|
|
661
|
+
export const ApplicationRevisionNumber = "99.99";
|
|
662
|
+
export const HeaderConstantConversationId = "X-UNVIRED-CONVERSATION-ID";
|
|
663
|
+
export const HeaderConstantRequestType = "REQUEST_TYPE";
|
|
664
|
+
export const HeaderConstantNumberOfPendingMessages = "X-UNVIRED-NUMBER-OF-PENDING-MESSAGES";
|
|
665
|
+
export const HeaderConstantPullMode = "x-pull-mode";
|
|
666
|
+
export const HeaderConstantMessageType = "x-unvired-message-type";
|
|
667
|
+
export const HeaderConstantChunkSize = "X-Chunk-Size";
|
|
668
|
+
export const HeaderConstantDataLength = "X-Data-Length";
|
|
669
|
+
export const ParamCompanyNamespace = "COMPANY_NAMESPACE";
|
|
670
|
+
export const ParamCompanyAlias = "COMPANY_ALIAS";
|
|
671
|
+
export const ParamAction = "ACTION";
|
|
672
|
+
export const ParamJwtToken = "JWT_TOKEN";
|
|
673
|
+
export const ParamOneTimeLoginToken = "X-ONE-TIME-LOGIN-TOKEN";
|
|
674
|
+
export const ParamApplication = "APPLICATION";
|
|
675
|
+
export const ParamAttachmentGuid = "X_ATTACHMENT_GUID";
|
|
676
|
+
export const ParamMimeType = "MIME_TYPE";
|
|
677
|
+
export const ParamServerId = "SERVER_ID";
|
|
678
|
+
export const ParamServerUserId = "MUSID";
|
|
679
|
+
export const ParamFeUserId = "FEUSERID";
|
|
680
|
+
export const ParamPassword = "PWD";
|
|
681
|
+
export const ParamOneTimeToken = "onetimetoken";
|
|
682
|
+
export const ParamMessageTime = "messagetime";
|
|
683
|
+
export const ParamLoginType = "LOGIN_TYPE";
|
|
684
|
+
export const ParamDeviceType = "DEVICE_TYPE";
|
|
685
|
+
export const ParamAppVersion = "cltAppVer";
|
|
686
|
+
export const ParamFrameworkVersion = "cltFwkVer";
|
|
687
|
+
export const ParamDeviceOsVersion = "devOS";
|
|
688
|
+
export const ParamDeviceModel = "devModel";
|
|
689
|
+
export const ParamDeviceState = "X-DEVICE-STATE";
|
|
690
|
+
export const ParamDeviceTime = "X-UNVIRED-MESSAGE-TIME";
|
|
691
|
+
export const ActionUploadLogs = "UPLOAD_LOG";
|
|
692
|
+
export const ActionUploadData = "UPLOAD_DATA";
|
|
693
|
+
export const ServiceApiVersion = "API/v3/";
|
|
694
|
+
export const ServiceSession = "session";
|
|
695
|
+
export const ServiceApplications = "applications";
|
|
696
|
+
export const ServiceActivate = "activate";
|
|
697
|
+
export const ServiceLocal = "?local";
|
|
698
|
+
export const ServiceExecute = "execute";
|
|
699
|
+
export const ServiceMessage = "message";
|
|
700
|
+
export const ServiceAttachments = "attachments";
|
|
701
|
+
export const ServiceAttachment = "attachment";
|
|
702
|
+
export const ServiceAdminServices = "adminservices";
|
|
703
|
+
export const ServicePasswordLess = "passwordless";
|
|
704
|
+
export const ServiceStatus = "status";
|
|
705
|
+
export const AdminServicePing = "ping";
|
|
706
|
+
export const AdminServiceTestNotif = "testnotify";
|
|
707
|
+
export const AdminServiceInitialDownload = "initialdownload";
|
|
708
|
+
export const AdminServiceAuthBackend = "authbackend";
|
|
709
|
+
export const ServiceFrontendUsers = "frontendusers";
|
|
710
|
+
export const ServiceConversation = "conversation";
|
|
711
|
+
export const ServiceMessages = "messages";
|
|
712
|
+
export const QueryParamFrontendUser = "frontendUser";
|
|
713
|
+
export const QueryParamInputMessage = "inputMessage";
|
|
714
|
+
export const QueryParamMessageFormat = "messageFormat";
|
|
715
|
+
export const QueryParamQueuedExecute = "queuedExecute";
|
|
716
|
+
export const QueryParamExternalReference = "externalReference";
|
|
717
|
+
export const QueryParamRequestType = "requestType";
|
|
718
|
+
export const QueryParamFile = "file";
|
|
719
|
+
export const QueryParamSensitive = "sensitive";
|
|
720
|
+
export const QueryParamCredentials = "credentials";
|
|
721
|
+
export const MessageTypeStandard = "standard";
|
|
722
|
+
export const MessageTypeCustom = "custom";
|
|
723
|
+
export const LoginTypeUnviredId = "UNVIRED-USER";
|
|
724
|
+
export const LoginTypeSAP = "SAP";
|
|
725
|
+
export const LoginTypeEmail = "EMAIL";
|
|
726
|
+
export const LoginTypeADS = "ACTIVE-DIRECTORY";
|
|
727
|
+
export const LoginTypeCustom = "CUSTOM";
|
|
728
|
+
export const KeyUnviredId = "unviredId";
|
|
729
|
+
export const KeyUnviredMd5Pwd = "md5Pwd";
|
|
730
|
+
export const KeySessionId = "sessionId";
|
|
731
|
+
export const KeyUsers = "users";
|
|
732
|
+
export const KeyFrontendType = "frontendType";
|
|
733
|
+
export const KeyApplications = "applications";
|
|
734
|
+
export const KeyName = "name";
|
|
735
|
+
export const KeyError = "error";
|
|
736
|
+
export const KeyToken = "token";
|
|
737
|
+
export const KeySettings = "settings";
|
|
738
|
+
export const KeyLocation = "location";
|
|
739
|
+
export const KeyAppSettings = "appsettings";
|
|
740
|
+
export const KeyLocationTracking = "tracking";
|
|
741
|
+
export const KeyLocationInterval = "interval";
|
|
742
|
+
export const KeyLocationUploadInterval = "uploadInterval";
|
|
743
|
+
export const KeyLocationDays = "days";
|
|
744
|
+
export const KeyLocationStart = "start";
|
|
745
|
+
export const KeyLocationEnd = "end";
|
|
746
|
+
export const KeySystems = "systems";
|
|
747
|
+
export const KeySystemsName = "name";
|
|
748
|
+
export const KeySystemsPortName = "portName";
|
|
749
|
+
export const KeySystemsPortType = "portType";
|
|
750
|
+
export const KeySystemsPortDesc = "portDescr";
|
|
751
|
+
export const KeySystemsDesc = "systemDescr";
|
|
752
|
+
export const KeyMeta = "Meta";
|
|
753
|
+
export const KeyActionAttribute = "a";
|
|
754
|
+
export const KeyMetadataDelete = "d";
|
|
755
|
+
export const KeyBeName = "BEName";
|
|
756
|
+
export const KeyInfoMessage = "InfoMessage";
|
|
757
|
+
export const KeyInfoMessageType = "type";
|
|
758
|
+
export const KeyInfoMessageSubtype = "subtype";
|
|
759
|
+
export const KeyInfoMessageCategory = "category";
|
|
760
|
+
export const KeyInfoMessageMessage = "message";
|
|
761
|
+
export const KeyInfoMessageBeName = "bename";
|
|
762
|
+
export const KeyInfoMessageBeLid = "belid";
|
|
763
|
+
export const KeyInfoMessageMessageDetails = "messagedetails";
|
|
764
|
+
export const KeyJwtToken = "jwttoken";
|
|
765
|
+
export const PullModeDelete = "DELETE";
|
|
766
|
+
export const KeyAttachmentResponse = "AttachmentResponse";
|
|
767
|
+
export const KeyMessage_ = "message";
|
|
768
|
+
export const ActionTypeA = "A";
|
|
769
|
+
export const ActionTypeM = "M";
|
|
770
|
+
export const ActionTypeD = "D";
|
|
771
|
+
export const AttachmentBE = "_ATTACHMENT";
|
|
772
|
+
export const AttachmentStatusDefault = "DEFAULT";
|
|
773
|
+
export const AttachmentStatusQueuedForDownload = "QUEUED_FOR_DOWNLOAD";
|
|
774
|
+
export const AttachmentStatusDownloaded = "DOWNLOADED";
|
|
775
|
+
export const AttachmentStatusErrorInDownload = "ERROR_IN_DOWNLOAD";
|
|
776
|
+
export const AttachmentStatusSavedForUpload = "SAVED_FOR_UPLOAD";
|
|
777
|
+
export const AttachmentStatusUploaded = "UPLOADED";
|
|
778
|
+
export const AttachmentStatusErrorInUpload = "ERROR_IN_UPLOAD";
|
|
779
|
+
export const AttachmentStatusMarkedForDelete = "MARKED_FOR_DELETE";
|
|
780
|
+
export const FwAttachmentForceDownloadPriority = 1;
|
|
781
|
+
export const FwAttachmentAutoDownloadPriority = 2;
|
|
782
|
+
export const AttachmentItemFieldUid = "UID";
|
|
783
|
+
export const AttachmentItemFieldMimeType = "MIME_TYPE";
|
|
784
|
+
export const AttachmentItemFieldFileName = "FILE_NAME";
|
|
785
|
+
export const AttachmentItemFieldDescription = "DESCRIPTION";
|
|
786
|
+
export const AttachmentItemFieldUrl = "URL";
|
|
787
|
+
export const AttachmentItemFieldExternalUrl = "EXTERNAL_URL";
|
|
788
|
+
export const AttachmentItemFieldLocalPath = "LOCAL_PATH";
|
|
789
|
+
export const AttachmentItemFieldAutoDownload = "AUTO_DOWNLOAD";
|
|
790
|
+
export const AttachmentItemFieldAttachmentStatus = "ATTACHMENT_STATUS";
|
|
791
|
+
export const AttachmentItemFieldErrorMessage = "ERROR_MESSAGE";
|
|
792
|
+
export const AttachmentItemFieldMessage = "MESSAGE";
|
|
793
|
+
export const Type = "type";
|
|
794
|
+
export const Subtype = "subtype";
|
|
795
|
+
export const ServerId = "serverId";
|
|
796
|
+
export const ApplicationId = "applicationId";
|
|
797
|
+
export const AppName = "appName";
|
|
798
|
+
/**
|
|
799
|
+
* Messages for the application.
|
|
800
|
+
*/
|
|
801
|
+
export const MESSAGE_TYPE_APPLICATION = 8000;
|
|
802
|
+
/**
|
|
803
|
+
* Messages for the system / framework.
|
|
804
|
+
*/
|
|
805
|
+
export const MESSAGE_TYPE_SYSTEM = 9000;
|
|
806
|
+
/**
|
|
807
|
+
* Message to clear all the data in the application.
|
|
808
|
+
*/
|
|
809
|
+
export const MESSAGE_TYPE_WIPE = 5000;
|
|
810
|
+
/**
|
|
811
|
+
* Messages for authentication.
|
|
812
|
+
*/
|
|
813
|
+
export const MESSAGE_TYPE_AUTHENTICATION = 4000;
|
|
814
|
+
export const MESSAGE_SUBTYPE_SYSTEM_PING = 100;
|
|
815
|
+
export const MESSAGE_SUBTYPE_SYSTEM_LOG = 200;
|
|
816
|
+
export const MESSAGE_SUBTYPE_SYSTEM_LOG_RESET = 210;
|
|
817
|
+
export const MESSAGE_SUBTYPE_SYSTEM_LOG_SET_ERROR = 220;
|
|
818
|
+
export const MESSAGE_SUBTYPE_SYSTEM_LOG_SET_DEBUG = 230;
|
|
819
|
+
export const MESSAGE_SUBTYPE_SYSTEM_DATA_DUMP = 300;
|
|
820
|
+
export const MESSAGE_SUBTYPE_SYSTEM_INITIAL_DATA = 400;
|
|
821
|
+
export const MESSAGE_SUBTYPE_SYSTEM_APPLICATION_ASSIGN = 410;
|
|
822
|
+
export const MESSAGE_SUBTYPE_SYSTEM_APPLICATION_UNASSIGN = 430;
|
|
823
|
+
export const MESSAGE_SUBTYPE_SYSTEM_FRAMEWORK_SETTINGS = 500;
|
|
824
|
+
export const MESSAGE_SUBTYPE_SYSTEM_RESET_DATA = 700;
|
|
825
|
+
export const MESSAGE_SUBTYPE_SYSTEM_ACTIVATION = 800;
|
|
826
|
+
export const MESSAGE_SUBTYPE_SYSTEM_MULTIPLE_FRONTEND_USERS = 810;
|
|
827
|
+
export const MESSAGE_SUBTYPE_SYSTEM_ERROR = 900;
|
|
828
|
+
export const MESSAGE_SUBTYPE_SYSTEM_INFO = 1000;
|
|
829
|
+
export const MESSAGE_SUBTYPE_SYSTEM_INITIATE_PULL = 440;
|
|
830
|
+
export const MESSAGE_SUBTYPE_SYSTEM_PULL_COMPLETE = 450;
|
|
831
|
+
export const MESSAGE_SUBTYPE_SYSTEM_SEND_PUSH_NOTIFICATION_ID = 610;
|
|
832
|
+
export const MESSAGE_SUBTYPE_AUTHENTICATION = 100;
|
|
833
|
+
export const MESSAGE_SUBTYPE_AUTHENTICATION_AND_ACTIVATE = 200;
|
|
834
|
+
export const MESSAGE_SUBTYPE_SAP_AUTHENTICATE = 300;
|
|
835
|
+
export const MESSAGE_SUBTYPE_CHANGE_PASSWORD = 400;
|
|
836
|
+
export const MESSAGE_SUBTYPE_FORGOT_PASSWORD = 500;
|
|
837
|
+
export const MESSAGE_SUBTYPE_REGISTER_USER = 600;
|
|
838
|
+
export const MESSAGE_SUBTYPE_GET_LOGIN_TOKEN = 700;
|
|
839
|
+
export const MESSAGE_SUBTYPE_APPLICATION_USER_SETTNGS_UPDATE = 625;
|
|
840
|
+
export const MESSAGE_SUBTYPE_LOCATION_INFORMATION = 1100;
|
|
841
|
+
export const MESSAGE_SUBTYPE_CHECK_FOR_APP_UPGRADE = 1300;
|
|
842
|
+
export const MESSAGE_SUBTYPE_TEST_PUSH = 110;
|
|
843
|
+
export const logError = "ERROR";
|
|
844
|
+
export const logDebug = "DEBUG";
|
|
845
|
+
export const logImportant = "IMPORTANT";
|
|
846
|
+
export const online = "Online";
|
|
847
|
+
export const offline = "Offline";
|
|
848
|
+
export const DefaultHttpTimeout = 300;
|
|
849
|
+
export enum RequestType {
|
|
850
|
+
RQST = "RQST",
|
|
851
|
+
PULL = "PULL",
|
|
852
|
+
PUSH = "PUSH",
|
|
853
|
+
QUERY = "QUERY",
|
|
854
|
+
REQ = "REQ",
|
|
855
|
+
PULLD = "PULLD"
|
|
856
|
+
}
|
|
857
|
+
export enum SyncType {
|
|
858
|
+
ASYNC = "ASYNC",
|
|
859
|
+
SYNC = "SYNC"
|
|
860
|
+
}
|
|
861
|
+
export enum OutObjectStatus {
|
|
862
|
+
none = 0,
|
|
863
|
+
lockedForModify = 1,
|
|
864
|
+
lockedForSending = 2,
|
|
865
|
+
errorOnProcessing = 3
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
}
|
|
869
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/settingsHelper' {
|
|
870
|
+
export enum LogLevel {
|
|
871
|
+
debug = "DEBUG",
|
|
872
|
+
error = "ERROR",
|
|
873
|
+
important = "IMPORTANT"
|
|
874
|
+
}
|
|
875
|
+
class SettingsHelper {
|
|
876
|
+
static getFrameworkVersionNumber(): Promise<string>;
|
|
877
|
+
static getFrameworkBuildNumber(): Promise<string>;
|
|
878
|
+
static getApplicationName(): Promise<string>;
|
|
879
|
+
static getApplicationVersionNumber(): Promise<string>;
|
|
880
|
+
static getFrameworkRevisionNumber(): Promise<string>;
|
|
881
|
+
static getApplicationRevisionNumber(): Promise<string>;
|
|
882
|
+
static getApplicationDBVersion(): Promise<string>;
|
|
883
|
+
static getApplicationBuildNumber(): Promise<string>;
|
|
884
|
+
static getInboxCount(): Promise<number>;
|
|
885
|
+
static getOutboxCount(): Promise<number>;
|
|
886
|
+
static getSentItemsCount(): Promise<number>;
|
|
887
|
+
static getAttachmentCount(): Promise<number>;
|
|
888
|
+
static isInOutBoxQueue(beHeaderLid: string): Promise<boolean>;
|
|
889
|
+
static isInSentItems(beHeaderLid: string): Promise<boolean>;
|
|
890
|
+
static isInInboxItems(beHeaderLid: string): Promise<boolean>;
|
|
891
|
+
static sendLogsToServer(): Promise<void>;
|
|
892
|
+
static createAndGetLogZipPath(): Promise<string>;
|
|
893
|
+
static sendDbToServer(): Promise<void>;
|
|
894
|
+
static deleteLogs(): Promise<void>;
|
|
895
|
+
static requestInitialDataDownload(functions?: Array<{
|
|
896
|
+
[key: string]: any;
|
|
897
|
+
}>): Promise<void>;
|
|
898
|
+
static testPushNotification(): Promise<void>;
|
|
899
|
+
static getCompleteLogs(): Promise<string>;
|
|
900
|
+
static getInfoMessages(): Promise<any[]>;
|
|
901
|
+
static setRequestTimeout(timeout: number): Promise<void>;
|
|
902
|
+
static getRequestTimeout(): Promise<number>;
|
|
903
|
+
static setLogLevel(logLevel: string): Promise<void>;
|
|
904
|
+
static getLogLevel(): Promise<string>;
|
|
905
|
+
static getFetchInterval(): Promise<number>;
|
|
906
|
+
static clearData(): Promise<void>;
|
|
907
|
+
static queuePingToOutbox(): Promise<void>;
|
|
908
|
+
static prepareDatabaseForExport(): Promise<void>;
|
|
909
|
+
private getAdditionalInfo;
|
|
910
|
+
private static getLogFileContent;
|
|
911
|
+
private static getBackupLogFileContent;
|
|
912
|
+
private static getAppDbPath;
|
|
913
|
+
private static getFrameworkDbPath;
|
|
914
|
+
convertMapToBase64(map: {
|
|
915
|
+
[key: string]: any;
|
|
916
|
+
}): string;
|
|
917
|
+
convertBase64ToMap(base64String: string): {
|
|
918
|
+
[key: string]: any;
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
export default SettingsHelper;
|
|
922
|
+
|
|
923
|
+
}
|
|
924
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/ssePushService' {
|
|
925
|
+
class SsePushService {
|
|
926
|
+
private static eventSource;
|
|
927
|
+
private static getEventSource;
|
|
928
|
+
static startPushService(): Promise<void>;
|
|
929
|
+
}
|
|
930
|
+
export default SsePushService;
|
|
931
|
+
|
|
932
|
+
}
|
|
933
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/status' {
|
|
934
|
+
export abstract class Status {
|
|
935
|
+
static readonly continue: number;
|
|
936
|
+
static readonly switchingProtocols: number;
|
|
937
|
+
static readonly processing: number;
|
|
938
|
+
static readonly ok: number;
|
|
939
|
+
static readonly created: number;
|
|
940
|
+
static readonly accepted: number;
|
|
941
|
+
static readonly nonAuthoritativeInformation: number;
|
|
942
|
+
static readonly noContent: number;
|
|
943
|
+
static readonly resetContent: number;
|
|
944
|
+
static readonly partialContent: number;
|
|
945
|
+
static readonly multiStatus: number;
|
|
946
|
+
static readonly alreadyReported: number;
|
|
947
|
+
static readonly imUsed: number;
|
|
948
|
+
static readonly multipleChoices: number;
|
|
949
|
+
static readonly movedPermanently: number;
|
|
950
|
+
static readonly found: number;
|
|
951
|
+
static readonly movedTemporarily: number;
|
|
952
|
+
static readonly seeOther: number;
|
|
953
|
+
static readonly notModified: number;
|
|
954
|
+
static readonly useProxy: number;
|
|
955
|
+
static readonly temporaryRedirect: number;
|
|
956
|
+
static readonly permanentRedirect: number;
|
|
957
|
+
static readonly badRequest: number;
|
|
958
|
+
static readonly unauthorized: number;
|
|
959
|
+
static readonly paymentRequired: number;
|
|
960
|
+
static readonly forbidden: number;
|
|
961
|
+
static readonly notFound: number;
|
|
962
|
+
static readonly methodNotAllowed: number;
|
|
963
|
+
static readonly notAcceptable: number;
|
|
964
|
+
static readonly proxyAuthenticationRequired: number;
|
|
965
|
+
static readonly requestTimeout: number;
|
|
966
|
+
static readonly conflict: number;
|
|
967
|
+
static readonly gone: number;
|
|
968
|
+
static readonly lengthRequired: number;
|
|
969
|
+
static readonly preconditionFailed: number;
|
|
970
|
+
static readonly requestEntityTooLarge: number;
|
|
971
|
+
static readonly requestUriTooLong: number;
|
|
972
|
+
static readonly unsupportedMediaType: number;
|
|
973
|
+
static readonly requestedRangeNotSatisfiable: number;
|
|
974
|
+
static readonly expectationFailed: number;
|
|
975
|
+
static readonly misdirectedRequest: number;
|
|
976
|
+
static readonly unprocessableEntity: number;
|
|
977
|
+
static readonly locked: number;
|
|
978
|
+
static readonly failedDependency: number;
|
|
979
|
+
static readonly upgradeRequired: number;
|
|
980
|
+
static readonly preconditionRequired: number;
|
|
981
|
+
static readonly tooManyRequests: number;
|
|
982
|
+
static readonly requestHeaderFieldsTooLarge: number;
|
|
983
|
+
static readonly connectionClosedWithoutResponse: number;
|
|
984
|
+
static readonly unavailableForLegalReasons: number;
|
|
985
|
+
static readonly clientClosedRequest: number;
|
|
986
|
+
static readonly internalServerError: number;
|
|
987
|
+
static readonly notImplemented: number;
|
|
988
|
+
static readonly badGateway: number;
|
|
989
|
+
static readonly serviceUnavailable: number;
|
|
990
|
+
static readonly gatewayTimeout: number;
|
|
991
|
+
static readonly versionNotSupported: number;
|
|
992
|
+
static readonly variantAlsoNegotiates: number;
|
|
993
|
+
static readonly insufficientStorage: number;
|
|
994
|
+
static readonly loopDetected: number;
|
|
995
|
+
static readonly notExtended: number;
|
|
996
|
+
static readonly networkAuthenticationRequired: number;
|
|
997
|
+
static readonly networkConnectTimeoutError: number;
|
|
998
|
+
static readonly submittedToOutbox: number;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
}
|
|
1002
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/syncInputDataManager' {
|
|
1003
|
+
export enum DataType {
|
|
1004
|
+
all = 0,
|
|
1005
|
+
changed = 1,
|
|
1006
|
+
changedQueued = 2,
|
|
1007
|
+
queued = 3
|
|
1008
|
+
}
|
|
1009
|
+
class SyncInputDataManager {
|
|
1010
|
+
static constructInputBeJson(entityName: string, dataObject: any, reconstruct?: boolean): Promise<any>;
|
|
1011
|
+
static getChildData(lid: string, beName: string, dataType: DataType): Promise<any>;
|
|
1012
|
+
static checkAndUploadAttachments(entityName: string, inputData: any, isAsynchronous?: boolean): Promise<void>;
|
|
1013
|
+
private static updateAttachmentStatus;
|
|
1014
|
+
static isAttachmentSupportedForBEName(beName: string): Promise<boolean>;
|
|
1015
|
+
static getAttachmentsMarkedForUpload(attachmentItemName: string, inputData: any): Promise<any[]>;
|
|
1016
|
+
}
|
|
1017
|
+
export default SyncInputDataManager;
|
|
1018
|
+
|
|
1019
|
+
}
|
|
1020
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/unviredAccount' {
|
|
1021
|
+
export class UnviredAccount {
|
|
1022
|
+
private accountId;
|
|
1023
|
+
private username;
|
|
1024
|
+
private company;
|
|
1025
|
+
private serverURL;
|
|
1026
|
+
private feUserId;
|
|
1027
|
+
private loginType;
|
|
1028
|
+
private port;
|
|
1029
|
+
private domain;
|
|
1030
|
+
private jwtToken;
|
|
1031
|
+
private firstName;
|
|
1032
|
+
private lastName;
|
|
1033
|
+
constructor(username: string, company: string, serverURL: string, feUserId: string, loginType: string, jwtToken: string);
|
|
1034
|
+
getAccountId(): string;
|
|
1035
|
+
getUsername(): string;
|
|
1036
|
+
getCompany(): string;
|
|
1037
|
+
getServerURL(): string;
|
|
1038
|
+
getFeUserId(): string;
|
|
1039
|
+
getLoginType(): string;
|
|
1040
|
+
getPort(): string;
|
|
1041
|
+
getDomain(): string;
|
|
1042
|
+
getJwtToken(): string;
|
|
1043
|
+
getFirstName(): string;
|
|
1044
|
+
getLastName(): string;
|
|
1045
|
+
setUsername(username: string): void;
|
|
1046
|
+
setCompany(company: string): void;
|
|
1047
|
+
setServerURL(serverURL: string): void;
|
|
1048
|
+
setFeUserId(feUserId: string): void;
|
|
1049
|
+
setLoginType(loginType: string): void;
|
|
1050
|
+
setPort(port: string): void;
|
|
1051
|
+
setDomain(domain: string): void;
|
|
1052
|
+
setJwtToken(jwtToken: string): void;
|
|
1053
|
+
setFirstName(firstName: string): void;
|
|
1054
|
+
setLastName(lastName: string): void;
|
|
1055
|
+
static fromJSON(json: any): UnviredAccount;
|
|
1056
|
+
toJSON(): any;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
}
|
|
1060
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/unviredAccountManager' {
|
|
1061
|
+
import { UnviredAccount } from "@unvired/unvired-ts-core-sdk/helper/unviredAccount";
|
|
1062
|
+
export class UnviredAccountManager {
|
|
1063
|
+
private fileName;
|
|
1064
|
+
private storageKey;
|
|
1065
|
+
private lastLoggedInKey;
|
|
1066
|
+
private lastLoggedOutKey;
|
|
1067
|
+
private static instance;
|
|
1068
|
+
private constructor();
|
|
1069
|
+
static getInstance(): UnviredAccountManager;
|
|
1070
|
+
saveAccount(account: UnviredAccount, appName: string): void;
|
|
1071
|
+
getAccount(userName: string, company: string): UnviredAccount;
|
|
1072
|
+
getAllAccounts(): UnviredAccount[];
|
|
1073
|
+
setLastLoggedInAccount(accountId: string): void;
|
|
1074
|
+
getLastLoggedInAccount(): UnviredAccount;
|
|
1075
|
+
setLastLoggedOutAccount(accountId: string): void;
|
|
1076
|
+
getlastLoggedOutAccount(): UnviredAccount;
|
|
1077
|
+
deleteAccount(accountId: string): void;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
}
|
|
1081
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/upgradeManager' {
|
|
1082
|
+
interface UpdateValues {
|
|
1083
|
+
app?: string[];
|
|
1084
|
+
framework?: string[];
|
|
1085
|
+
}
|
|
1086
|
+
interface UpdateObject {
|
|
1087
|
+
[version: string]: UpdateValues;
|
|
1088
|
+
}
|
|
1089
|
+
class UpgradeManager {
|
|
1090
|
+
private fileName;
|
|
1091
|
+
constructor();
|
|
1092
|
+
checkAndUpdateDatabase(updates: UpdateObject[]): Promise<boolean>;
|
|
1093
|
+
private compareVersions;
|
|
1094
|
+
}
|
|
1095
|
+
const _default: UpgradeManager;
|
|
1096
|
+
export default _default;
|
|
1097
|
+
|
|
1098
|
+
}
|
|
1099
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/urlService' {
|
|
1100
|
+
export class URLService {
|
|
1101
|
+
static sanitizeLoginURL(loginURL: string): string;
|
|
1102
|
+
static getBaseUrl(baseUrl: string): string;
|
|
1103
|
+
static getSessionUrl(baseUrl: string): string;
|
|
1104
|
+
static getApplicationUrl(baseUrl: string): string;
|
|
1105
|
+
static getPingUrl(baseUrl: string): string;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
}
|
|
1109
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/userSettingsManager' {
|
|
1110
|
+
export enum UserSettingsFields {
|
|
1111
|
+
serverUserId = 0,
|
|
1112
|
+
serverPassword = 1,
|
|
1113
|
+
unviredUserId = 2,
|
|
1114
|
+
unviredPassword = 3,
|
|
1115
|
+
serverUrl = 4,
|
|
1116
|
+
companyAlias = 5,
|
|
1117
|
+
deviceType = 6,
|
|
1118
|
+
customDeviceId = 7,
|
|
1119
|
+
companyNamespace = 8,
|
|
1120
|
+
requestTimeout = 9,
|
|
1121
|
+
demoMode = 10,
|
|
1122
|
+
domainName = 11,
|
|
1123
|
+
loginType = 12,
|
|
1124
|
+
notificationTimeout = 13,
|
|
1125
|
+
fetchInterval = 14,
|
|
1126
|
+
serverCertificateHash = 15,
|
|
1127
|
+
currentFrameworkVersion = 16,
|
|
1128
|
+
unviredPin = 17,
|
|
1129
|
+
unviredId = 18,
|
|
1130
|
+
jwtToken = 19
|
|
1131
|
+
}
|
|
1132
|
+
export const stringToUserSettingsFields: (fieldName: string) => UserSettingsFields;
|
|
1133
|
+
export class UserSettingsManager {
|
|
1134
|
+
private userSettingsHashtable;
|
|
1135
|
+
private static instance;
|
|
1136
|
+
private constructor();
|
|
1137
|
+
static getInstance(): UserSettingsManager;
|
|
1138
|
+
setFieldValue(field: UserSettingsFields, fieldValue: any): Promise<void>;
|
|
1139
|
+
getFieldValue(field: UserSettingsFields): Promise<string>;
|
|
1140
|
+
private setFieldValueForKey;
|
|
1141
|
+
private getFieldValueForKey;
|
|
1142
|
+
static getDemoModeUserSettings(loginParameters: any): {
|
|
1143
|
+
[key: string]: any;
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
}
|
|
1148
|
+
declare module '@unvired/unvired-ts-core-sdk/helper/utils' {
|
|
1149
|
+
export enum LoginType {
|
|
1150
|
+
unvired = "UNVIRED_ID",
|
|
1151
|
+
ads = "ADS",
|
|
1152
|
+
sap = "SAP",
|
|
1153
|
+
email = "EMAIL",
|
|
1154
|
+
saml2 = "SAML2",
|
|
1155
|
+
custom = "CUSTOM",
|
|
1156
|
+
passwordless = "PASSWORDLESS"
|
|
1157
|
+
}
|
|
1158
|
+
export enum ObjectStatus {
|
|
1159
|
+
global = 0,
|
|
1160
|
+
add = 1,
|
|
1161
|
+
modify = 2,
|
|
1162
|
+
delete = 3
|
|
1163
|
+
}
|
|
1164
|
+
export enum SyncStatus {
|
|
1165
|
+
none = 0,
|
|
1166
|
+
queued = 1,
|
|
1167
|
+
sent = 2,
|
|
1168
|
+
error = 3
|
|
1169
|
+
}
|
|
1170
|
+
export enum LoginListenerType {
|
|
1171
|
+
auth_activation_required = 0,// Mobile app not yet activated and requires authentication and activation
|
|
1172
|
+
app_requires_login = 1,// Mobile app requires offline / local login
|
|
1173
|
+
auth_activation_success = 2,// Account authenticated and activated on the server
|
|
1174
|
+
auth_activation_error = 3,// Acoount authentication or aactivation failed on the server
|
|
1175
|
+
login_success = 4,// Mobile app login successful
|
|
1176
|
+
login_error = 5,// Mobile app login failure
|
|
1177
|
+
app_requires_current_account = 6,// Multiple account found hence app has to set current active account
|
|
1178
|
+
login_demo = 7
|
|
1179
|
+
}
|
|
1180
|
+
export enum LogType {
|
|
1181
|
+
debug = 0,
|
|
1182
|
+
info = 1,
|
|
1183
|
+
error = 2
|
|
1184
|
+
}
|
|
1185
|
+
export class LoginParameters {
|
|
1186
|
+
appName: string;
|
|
1187
|
+
company: string;
|
|
1188
|
+
username: string;
|
|
1189
|
+
password: string;
|
|
1190
|
+
url: string;
|
|
1191
|
+
domain: string;
|
|
1192
|
+
loginType: LoginType;
|
|
1193
|
+
feUserId: string;
|
|
1194
|
+
port: string;
|
|
1195
|
+
isRequiredAttachmentBase64: boolean;
|
|
1196
|
+
autoSendTime: string;
|
|
1197
|
+
autoSyncTime: string;
|
|
1198
|
+
metadataJSON: string;
|
|
1199
|
+
demoData: string;
|
|
1200
|
+
demoModeRequired: boolean;
|
|
1201
|
+
persistWebDb: boolean;
|
|
1202
|
+
jwtOptions: object;
|
|
1203
|
+
loginLanguage: string;
|
|
1204
|
+
cacheWebData: boolean;
|
|
1205
|
+
requireClientCredentials: boolean;
|
|
1206
|
+
}
|
|
1207
|
+
export function isInternetConnected(): Promise<boolean>;
|
|
1208
|
+
export function isServerReachable(baseUrl: string): Promise<boolean>;
|
|
1209
|
+
export function getErrorMessage(error: any): string;
|
|
1210
|
+
/**
|
|
1211
|
+
* Safely parses JSON from a Response object, handling empty responses and parsing errors gracefully
|
|
1212
|
+
* @param response - The Response object to parse
|
|
1213
|
+
* @param context - Optional context string for logging purposes
|
|
1214
|
+
* @returns Promise<object> - Parsed JSON object or empty object if parsing fails
|
|
1215
|
+
*/
|
|
1216
|
+
export function safeParseJson(response: Response, context?: string): Promise<any>;
|
|
1217
|
+
|
|
1218
|
+
}
|
|
1219
|
+
declare module '@unvired/unvired-ts-core-sdk/inbox/downloadMessageService' {
|
|
1220
|
+
export default class DownloadMessageService {
|
|
1221
|
+
private static instance;
|
|
1222
|
+
private isRunning;
|
|
1223
|
+
private shouldStop;
|
|
1224
|
+
private constructor();
|
|
1225
|
+
static getInstance(): DownloadMessageService;
|
|
1226
|
+
start(): void;
|
|
1227
|
+
stop(): void;
|
|
1228
|
+
private checkAndDownloadMessages;
|
|
1229
|
+
private downloadMessage;
|
|
1230
|
+
static handleMessageTypes(inObject: any): Promise<void>;
|
|
1231
|
+
static systemMessageHandler(subType: number): Promise<void>;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
}
|
|
1235
|
+
declare module '@unvired/unvired-ts-core-sdk/inbox/inboxHelper' {
|
|
1236
|
+
export default class InboxHelper {
|
|
1237
|
+
private static readonly INBOX_DIR;
|
|
1238
|
+
private static getInboxDirectory;
|
|
1239
|
+
static addInBoxData(conversationId: string, jsonString: string): Promise<void>;
|
|
1240
|
+
static getInBoxData(conversationId: string): Promise<string>;
|
|
1241
|
+
static deleteInBoxData(conversationId: string): Promise<void>;
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
}
|
|
1245
|
+
declare module '@unvired/unvired-ts-core-sdk/inbox/inboxService' {
|
|
1246
|
+
import { SyncStatus } from "@unvired/unvired-ts-core-sdk/helper/utils";
|
|
1247
|
+
export default class InboxService {
|
|
1248
|
+
private static instance;
|
|
1249
|
+
private isProcessing;
|
|
1250
|
+
private shouldStop;
|
|
1251
|
+
private constructor();
|
|
1252
|
+
static getInstance(): InboxService;
|
|
1253
|
+
start(): void;
|
|
1254
|
+
stop(): void;
|
|
1255
|
+
startInboxProcessing(): Promise<void>;
|
|
1256
|
+
private checkAndUpdateHeaderSyncStatus;
|
|
1257
|
+
updateSyncStatusToEntityObjects(inObject: any, syncStatus: SyncStatus): Promise<void>;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
}
|
|
1261
|
+
declare module '@unvired/unvired-ts-core-sdk/index' {
|
|
1262
|
+
import AuthenticationService from '@unvired/unvired-ts-core-sdk/authenticationService';
|
|
1263
|
+
import SyncEngine from '@unvired/unvired-ts-core-sdk/syncEngine';
|
|
1264
|
+
import DatabaseManager, { DatabaseType } from '@unvired/unvired-ts-core-sdk/database/databaseManager';
|
|
1265
|
+
import FrameworkHelper from '@unvired/unvired-ts-core-sdk/helper/frameworkHelper';
|
|
1266
|
+
import { FrameworkSettingsFields, FrameworkSettingsManager } from '@unvired/unvired-ts-core-sdk/helper/frameworkSettingsManager';
|
|
1267
|
+
import { UserSettingsManager, UserSettingsFields } from '@unvired/unvired-ts-core-sdk/helper/userSettingsManager';
|
|
1268
|
+
import OutboxService from '@unvired/unvired-ts-core-sdk/outbox/outboxService';
|
|
1269
|
+
import { NotificationListenerHelper } from '@unvired/unvired-ts-core-sdk/helper/notificationListnerHelper';
|
|
1270
|
+
import AttachmentHelper from '@unvired/unvired-ts-core-sdk/attachment/attachmentHelper';
|
|
1271
|
+
import AttachmentQHelper from '@unvired/unvired-ts-core-sdk/attachment/attachmentQHelper';
|
|
1272
|
+
import * as ServiceConstants from "@unvired/unvired-ts-core-sdk/helper/serviceConstants";
|
|
1273
|
+
import * as FieldConstants from '@unvired/unvired-ts-core-sdk/applicationMeta/fieldConstants';
|
|
1274
|
+
import InboxHelper from '@unvired/unvired-ts-core-sdk/inbox/inboxHelper';
|
|
1275
|
+
import OutBoxHelper from '@unvired/unvired-ts-core-sdk/outbox/outboxHelper';
|
|
1276
|
+
import HttpConnection from '@unvired/unvired-ts-core-sdk/helper/httpConnection';
|
|
1277
|
+
import SettingsHelper from '@unvired/unvired-ts-core-sdk/helper/settingsHelper';
|
|
1278
|
+
import AppDatabaseManager from '@unvired/unvired-ts-core-sdk/database/appDatabaseManager';
|
|
1279
|
+
import { UnviredAccountManager } from '@unvired/unvired-ts-core-sdk/helper/unviredAccountManager';
|
|
1280
|
+
import { UnviredAccount } from '@unvired/unvired-ts-core-sdk/helper/unviredAccount';
|
|
1281
|
+
import { isServerReachable, getErrorMessage } from "@unvired/unvired-ts-core-sdk/helper/utils";
|
|
1282
|
+
import { PlatformManager, PlatformType } from '@unvired/unvired-ts-core-sdk/platform/PlatformManager';
|
|
1283
|
+
import { PlatformInterface } from '@unvired/unvired-ts-core-sdk/platform/PlatformInterface';
|
|
1284
|
+
export { AuthenticationService, SyncEngine, DatabaseManager, DatabaseType, FrameworkHelper, FrameworkSettingsFields, FrameworkSettingsManager, UserSettingsManager, UserSettingsFields, OutboxService, NotificationListenerHelper, AttachmentHelper, AttachmentQHelper, ServiceConstants, FieldConstants, InboxHelper, OutBoxHelper, HttpConnection, SettingsHelper, AppDatabaseManager, UnviredAccountManager, UnviredAccount, isServerReachable, getErrorMessage, PlatformManager, PlatformType, PlatformInterface };
|
|
1285
|
+
|
|
1286
|
+
}
|
|
1287
|
+
declare module '@unvired/unvired-ts-core-sdk/outbox/outboxAttachmentManager' {
|
|
1288
|
+
export default class OutboxAttachmentManager {
|
|
1289
|
+
checkAndUploadAttachmentsInOutBox(entityName: string, headerLid: string): Promise<boolean>;
|
|
1290
|
+
updateAttachmentStatusOutBox(attachmentItemName: string, attachmentItem: any, attachmentStatus: string): Promise<boolean>;
|
|
1291
|
+
isAttachmentSupportedForBEName(beName: string): Promise<boolean>;
|
|
1292
|
+
getAttachmentsMarkedForUploadOutbox(attachmentEntityName: string, headerLid: string): Promise<any[]>;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
}
|
|
1296
|
+
declare module '@unvired/unvired-ts-core-sdk/outbox/outboxHelper' {
|
|
1297
|
+
import { SyncStatus } from "@unvired/unvired-ts-core-sdk/helper/utils";
|
|
1298
|
+
export default class OutBoxHelper {
|
|
1299
|
+
static checkIsInOutBox(beLid: string): Promise<any>;
|
|
1300
|
+
static checkIsInSentItems(beLid: string): Promise<any>;
|
|
1301
|
+
static updateSyncStatusToEntityObjects(outObject: any, syncStatus: SyncStatus): Promise<void>;
|
|
1302
|
+
static getOutBoxItemBasedOnBeLid(beLid: string): Promise<any>;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
}
|
|
1306
|
+
declare module '@unvired/unvired-ts-core-sdk/outbox/outboxService' {
|
|
1307
|
+
export default class OutboxService {
|
|
1308
|
+
private static instance;
|
|
1309
|
+
private isRunning;
|
|
1310
|
+
private shouldStop;
|
|
1311
|
+
private constructor();
|
|
1312
|
+
static getInstance(): OutboxService;
|
|
1313
|
+
start(): void;
|
|
1314
|
+
stop(): void;
|
|
1315
|
+
private makeNetworkCallWithOutObject;
|
|
1316
|
+
private handleServerError;
|
|
1317
|
+
private checkAndWaitUntilServerIsReachable;
|
|
1318
|
+
private handleZeroResponse;
|
|
1319
|
+
private handleSuccess;
|
|
1320
|
+
private updateOutObjectBEWithGlobalStatus;
|
|
1321
|
+
private deleteOutObjectAndCreateInfoMessage;
|
|
1322
|
+
private updateOutObjectProcessingError;
|
|
1323
|
+
private createInfoMessage;
|
|
1324
|
+
private deleteOutObject;
|
|
1325
|
+
private getResponseText;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
}
|
|
1329
|
+
declare module '@unvired/unvired-ts-core-sdk/platform/CordovaPlatformAdapter' {
|
|
1330
|
+
import { PlatformInterface, IDeviceInfo, IFileEntry, IDatabaseAdapter, IPushNotificationAdapter, ILoggerAdapter } from '@unvired/unvired-ts-core-sdk/platform/PlatformInterface';
|
|
1331
|
+
global {
|
|
1332
|
+
interface Window {
|
|
1333
|
+
cordova: any;
|
|
1334
|
+
device: any;
|
|
1335
|
+
resolveLocalFileSystemURL: any;
|
|
1336
|
+
UnviredDB: any;
|
|
1337
|
+
FirebasePlugin: any;
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
export class CordovaPlatformAdapter implements PlatformInterface {
|
|
1341
|
+
getDeviceInfo(): IDeviceInfo;
|
|
1342
|
+
getPlatform(): string;
|
|
1343
|
+
getFrontendType(): string;
|
|
1344
|
+
getDocumentDirectory(): string;
|
|
1345
|
+
resolveLocalFileSystemURL(url: string): Promise<IFileEntry>;
|
|
1346
|
+
getFolderBasedOnUserId(userId: string): Promise<string>;
|
|
1347
|
+
deleteUserFolder(userId: string): Promise<void>;
|
|
1348
|
+
private deleteDirectoryContents;
|
|
1349
|
+
getDatabaseAdapter(): IDatabaseAdapter;
|
|
1350
|
+
getPushNotificationAdapter(): IPushNotificationAdapter | null;
|
|
1351
|
+
getLoggerAdapter(): ILoggerAdapter;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
}
|
|
1355
|
+
declare module '@unvired/unvired-ts-core-sdk/platform/PlatformDetectionExamples' {
|
|
1356
|
+
/**
|
|
1357
|
+
* Platform Auto-Detection Example
|
|
1358
|
+
*
|
|
1359
|
+
* This file demonstrates how to use the auto-detection feature
|
|
1360
|
+
* in the Unvired Universal SDK.
|
|
1361
|
+
*/
|
|
1362
|
+
/**
|
|
1363
|
+
* Example 1: Basic Usage - Auto-Detection
|
|
1364
|
+
*/
|
|
1365
|
+
export function example1_BasicUsage(): void;
|
|
1366
|
+
/**
|
|
1367
|
+
* Example 2: Check Platform Type
|
|
1368
|
+
*/
|
|
1369
|
+
export function example2_CheckPlatformType(): void;
|
|
1370
|
+
/**
|
|
1371
|
+
* Example 3: Conditional Features Based on Platform
|
|
1372
|
+
*/
|
|
1373
|
+
export function example3_ConditionalFeatures(): void;
|
|
1374
|
+
/**
|
|
1375
|
+
* Example 4: Feature Detection
|
|
1376
|
+
*/
|
|
1377
|
+
export function example4_FeatureDetection(): void;
|
|
1378
|
+
/**
|
|
1379
|
+
* Example 5: Complete App Initialization
|
|
1380
|
+
*/
|
|
1381
|
+
export function example5_AppInitialization(): Promise<void>;
|
|
1382
|
+
/**
|
|
1383
|
+
* Example 6: Platform-Specific UI
|
|
1384
|
+
*/
|
|
1385
|
+
export function example6_PlatformSpecificUI(): void;
|
|
1386
|
+
/**
|
|
1387
|
+
* Example 7: Debug Platform Detection
|
|
1388
|
+
*/
|
|
1389
|
+
export function example7_DebugDetection(): void;
|
|
1390
|
+
/**
|
|
1391
|
+
* Run all examples
|
|
1392
|
+
*/
|
|
1393
|
+
export function runAllExamples(): void;
|
|
1394
|
+
const _default: {
|
|
1395
|
+
example1_BasicUsage: typeof example1_BasicUsage;
|
|
1396
|
+
example2_CheckPlatformType: typeof example2_CheckPlatformType;
|
|
1397
|
+
example3_ConditionalFeatures: typeof example3_ConditionalFeatures;
|
|
1398
|
+
example4_FeatureDetection: typeof example4_FeatureDetection;
|
|
1399
|
+
example5_AppInitialization: typeof example5_AppInitialization;
|
|
1400
|
+
example6_PlatformSpecificUI: typeof example6_PlatformSpecificUI;
|
|
1401
|
+
example7_DebugDetection: typeof example7_DebugDetection;
|
|
1402
|
+
runAllExamples: typeof runAllExamples;
|
|
1403
|
+
};
|
|
1404
|
+
export default _default;
|
|
1405
|
+
|
|
1406
|
+
}
|
|
1407
|
+
declare module '@unvired/unvired-ts-core-sdk/platform/PlatformInterface' {
|
|
1408
|
+
/**
|
|
1409
|
+
* Platform Adapter Interface
|
|
1410
|
+
*
|
|
1411
|
+
* This interface abstracts platform-specific functionality so that the core SDK
|
|
1412
|
+
* can work with both Cordova and React Native platforms.
|
|
1413
|
+
*/
|
|
1414
|
+
export enum DatabaseType {
|
|
1415
|
+
FrameworkDb = "FrameworkDb",
|
|
1416
|
+
AppDb = "AppDb"
|
|
1417
|
+
}
|
|
1418
|
+
export interface IDeviceInfo {
|
|
1419
|
+
platform: string;
|
|
1420
|
+
model: string;
|
|
1421
|
+
version: string;
|
|
1422
|
+
isMobile: boolean;
|
|
1423
|
+
}
|
|
1424
|
+
export interface IFileEntry {
|
|
1425
|
+
fullPath: string;
|
|
1426
|
+
nativeURL: string;
|
|
1427
|
+
isDirectory?: boolean;
|
|
1428
|
+
remove(callback: () => void, errorCallback: (error: any) => void): void;
|
|
1429
|
+
removeRecursively(callback: () => void, errorCallback: (error: any) => void): void;
|
|
1430
|
+
createReader(): IDirectoryReader;
|
|
1431
|
+
getDirectory?(path: string, options: {
|
|
1432
|
+
create: boolean;
|
|
1433
|
+
}, callback: (entry: IFileEntry) => void, errorCallback: (error: any) => void): void;
|
|
1434
|
+
getFile?(path: string, options: {
|
|
1435
|
+
create: boolean;
|
|
1436
|
+
}, callback: (entry: IFileEntry) => void, errorCallback: (error: any) => void): void;
|
|
1437
|
+
file?(callback: (file: File) => void, errorCallback: (error: any) => void): void;
|
|
1438
|
+
createWriter?(callback: (writer: any) => void, errorCallback: (error: any) => void): void;
|
|
1439
|
+
}
|
|
1440
|
+
export interface IDirectoryReader {
|
|
1441
|
+
readEntries(callback: (entries: IFileEntry[]) => void, errorCallback: (error: any) => void): void;
|
|
1442
|
+
}
|
|
1443
|
+
export interface IDatabaseAdapter {
|
|
1444
|
+
create(options: {
|
|
1445
|
+
userId: string;
|
|
1446
|
+
}, successCallback: (result: any) => void, errorCallback: (error: any) => void): void;
|
|
1447
|
+
execute(options: any, successCallback: (result: any) => void, errorCallback: (error: any) => void): void;
|
|
1448
|
+
executeStatementOnPath(dbPath: string, sqlQuery: string, callback: (result: any) => void): void;
|
|
1449
|
+
selectFromPath(dbPath: string, sqlQuery: string, callback: (result: any) => void): void;
|
|
1450
|
+
createDatabase(dbPath: string, callback: () => void): void;
|
|
1451
|
+
getDBFilePath(options: {
|
|
1452
|
+
dbType: string;
|
|
1453
|
+
}, callback: (path: string) => void): void;
|
|
1454
|
+
saveWebDB(options: {
|
|
1455
|
+
userId: string;
|
|
1456
|
+
}, callback: (result: any) => void, errorCallback: (error: any) => void): void;
|
|
1457
|
+
deleteUserData(options: {
|
|
1458
|
+
userId: string;
|
|
1459
|
+
}, callback: () => void, errorCallback: (error: any) => void): void;
|
|
1460
|
+
}
|
|
1461
|
+
export interface IPushNotificationAdapter {
|
|
1462
|
+
requestPermission(options?: {
|
|
1463
|
+
forceShow: boolean;
|
|
1464
|
+
}): Promise<void>;
|
|
1465
|
+
getToken(): Promise<string>;
|
|
1466
|
+
onTokenRefresh(callback: (token: string) => void): void;
|
|
1467
|
+
onMessage(callback: (payload: any) => void): void;
|
|
1468
|
+
onBackgroundMessage(callback: (payload: any) => void): void;
|
|
1469
|
+
}
|
|
1470
|
+
export interface ILoggerAdapter {
|
|
1471
|
+
logDebug(sourceClass: string, method: string, message: string): void;
|
|
1472
|
+
logError(sourceClass: string, method: string, message: string): void;
|
|
1473
|
+
logInfo(sourceClass: string, method: string, message: string): void;
|
|
1474
|
+
setLogLevel(logLevel: string): void;
|
|
1475
|
+
getLogFileURL(): Promise<string>;
|
|
1476
|
+
getLogFileContent(): Promise<string>;
|
|
1477
|
+
getBackupLogFileContent(): Promise<string>;
|
|
1478
|
+
clearLogFile(): void;
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* Main Platform Adapter Interface
|
|
1482
|
+
*/
|
|
1483
|
+
export interface PlatformInterface {
|
|
1484
|
+
getDeviceInfo(): IDeviceInfo;
|
|
1485
|
+
getPlatform(): string;
|
|
1486
|
+
getFrontendType(): string;
|
|
1487
|
+
getDocumentDirectory(): string;
|
|
1488
|
+
resolveLocalFileSystemURL(url: string): Promise<IFileEntry>;
|
|
1489
|
+
getFolderBasedOnUserId(userId: string): Promise<string>;
|
|
1490
|
+
deleteUserFolder(userId: string): Promise<void>;
|
|
1491
|
+
getDatabaseAdapter(): IDatabaseAdapter;
|
|
1492
|
+
getPushNotificationAdapter(): IPushNotificationAdapter | null;
|
|
1493
|
+
getLoggerAdapter(): ILoggerAdapter;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
}
|
|
1497
|
+
declare module '@unvired/unvired-ts-core-sdk/platform/PlatformManager' {
|
|
1498
|
+
import { PlatformInterface } from '@unvired/unvired-ts-core-sdk/platform/PlatformInterface';
|
|
1499
|
+
/**
|
|
1500
|
+
* Platform types supported by the SDK
|
|
1501
|
+
*/
|
|
1502
|
+
export enum PlatformType {
|
|
1503
|
+
CORDOVA = "cordova",
|
|
1504
|
+
REACT_NATIVE = "react-native",
|
|
1505
|
+
BROWSER = "browser",
|
|
1506
|
+
UNKNOWN = "unknown"
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* PlatformManager - Singleton class that manages platform-specific adapters
|
|
1510
|
+
* Automatically detects the runtime environment and sets the appropriate adapter
|
|
1511
|
+
*/
|
|
1512
|
+
export class PlatformManager {
|
|
1513
|
+
private static instance;
|
|
1514
|
+
private platformAdapter;
|
|
1515
|
+
private detectedPlatform;
|
|
1516
|
+
private constructor();
|
|
1517
|
+
/**
|
|
1518
|
+
* Get the singleton instance of PlatformManager
|
|
1519
|
+
*/
|
|
1520
|
+
static getInstance(): PlatformManager;
|
|
1521
|
+
/**
|
|
1522
|
+
* Get the current platform adapter
|
|
1523
|
+
*/
|
|
1524
|
+
getPlatformAdapter(): PlatformInterface;
|
|
1525
|
+
/**
|
|
1526
|
+
* Manually set a platform adapter (useful for testing or override)
|
|
1527
|
+
*/
|
|
1528
|
+
setPlatformAdapter(adapter: PlatformInterface): void;
|
|
1529
|
+
/**
|
|
1530
|
+
* Get the detected platform type
|
|
1531
|
+
*/
|
|
1532
|
+
getDetectedPlatform(): PlatformType;
|
|
1533
|
+
/**
|
|
1534
|
+
* Detect the current platform based on available global objects and properties
|
|
1535
|
+
*/
|
|
1536
|
+
private detectPlatform;
|
|
1537
|
+
/**
|
|
1538
|
+
* Check if running in React Native environment
|
|
1539
|
+
*/
|
|
1540
|
+
private isReactNative;
|
|
1541
|
+
/**
|
|
1542
|
+
* Check if running in Cordova environment
|
|
1543
|
+
*/
|
|
1544
|
+
private isCordova;
|
|
1545
|
+
/**
|
|
1546
|
+
* Check if running in browser environment
|
|
1547
|
+
*/
|
|
1548
|
+
private isBrowser;
|
|
1549
|
+
/**
|
|
1550
|
+
* Create the appropriate adapter for the detected platform
|
|
1551
|
+
*/
|
|
1552
|
+
private createAdapterForPlatform;
|
|
1553
|
+
/**
|
|
1554
|
+
* Reset the singleton instance (useful for testing)
|
|
1555
|
+
*/
|
|
1556
|
+
static resetInstance(): void;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
}
|
|
1560
|
+
declare module '@unvired/unvired-ts-core-sdk/platform/ReactNativePlatformAdapter' {
|
|
1561
|
+
import { PlatformInterface, IDeviceInfo, IFileEntry, IDatabaseAdapter, IPushNotificationAdapter, ILoggerAdapter } from '@unvired/unvired-ts-core-sdk/platform/PlatformInterface';
|
|
1562
|
+
export class ReactNativePlatformAdapter implements PlatformInterface {
|
|
1563
|
+
getDeviceInfo(): IDeviceInfo;
|
|
1564
|
+
getPlatform(): string;
|
|
1565
|
+
getFrontendType(): string;
|
|
1566
|
+
getDocumentDirectory(): string;
|
|
1567
|
+
resolveLocalFileSystemURL(url: string): Promise<IFileEntry>;
|
|
1568
|
+
getFolderBasedOnUserId(userId: string): Promise<string>;
|
|
1569
|
+
deleteUserFolder(userId: string): Promise<void>;
|
|
1570
|
+
getDatabaseAdapter(): IDatabaseAdapter;
|
|
1571
|
+
getPushNotificationAdapter(): IPushNotificationAdapter | null;
|
|
1572
|
+
getLoggerAdapter(): ILoggerAdapter;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
}
|
|
1576
|
+
declare module '@unvired/unvired-ts-core-sdk/syncEngine' {
|
|
1577
|
+
import { RequestType } from "@unvired/unvired-ts-core-sdk/helper/serviceConstants";
|
|
1578
|
+
export class SyncEngine {
|
|
1579
|
+
static lockBeLid: string;
|
|
1580
|
+
syncForeground(reqType: RequestType, header: any, customData: string, paFunction: string, autoSave: boolean): Promise<any>;
|
|
1581
|
+
syncBackground(reqType: RequestType, header: any, customData: string, paFunction: string, beName: string): Promise<any>;
|
|
1582
|
+
getSynchronizationState(): Promise<any>;
|
|
1583
|
+
startInboxHandler(): Promise<any>;
|
|
1584
|
+
startDataSender(): Promise<any>;
|
|
1585
|
+
getMessages(): Promise<any>;
|
|
1586
|
+
lockDataSender(beLid: string): Promise<any>;
|
|
1587
|
+
unlockDataSender(): Promise<any>;
|
|
1588
|
+
removeOutObjectBasedOnLid(lid: string): Promise<any>;
|
|
1589
|
+
refreshJWTToken(): Promise<any>;
|
|
1590
|
+
private handleSend;
|
|
1591
|
+
private constructRequestString;
|
|
1592
|
+
private sendAsync;
|
|
1593
|
+
private handleInfoMessage;
|
|
1594
|
+
checkInOutBoxAndQueue(entry: any): Promise<void>;
|
|
1595
|
+
}
|
|
1596
|
+
const _default: SyncEngine;
|
|
1597
|
+
export default _default;
|
|
1598
|
+
|
|
1599
|
+
}
|
|
1600
|
+
declare module '@unvired/unvired-ts-core-sdk' {
|
|
1601
|
+
import main = require('@unvired/unvired-ts-core-sdk/index');
|
|
1602
|
+
export = main;
|
|
1603
|
+
}
|