Skip to content

Commit 53213bb

Browse files
authored
feat(unvired-cordova-sdk): add new functions to lock and unlock sending of data (#3329)
* feat(unvired-cordova-sdk): support login via email * fix(unvired-cordova-sdk): return typed promise object for user settings * fix(unvired-cordova-sdk): change return type to string for guid() * doc(unvired-cordova-sdk): doc update * doc(unvired-cordova-sdk): update doc * feat(unvired-cordova-sdk): add support for metadata JSON * doc(unvired-cordova-sdk): update doc * doc(unvired-cordova-sdk): update doc * feat(unvired-cordova-sdk): add methods to get and set log level * fix(unvired-cordova-sdk): update the return type for getLog() * feat(unvired-cordova-sdk): return platform name * feat(unvired-cordova-sdk): add method to get log file path * feat(unvired-cordova-sdk): test push notifications * fix(unvired-cordova-sdk): define return for logRead * doc(unvired-cordova-sdk): remove mobile only restriction for some apis * feat(unvired-cordova-sdk): add new property containing HTTP status code. * feat(unvired-cordova-sdk): add new functions to lock & unlock sending of data * fix(unvired-cordova-sdk): update the return type for lock and unlock functions. * fix(unvired-cordova-sdk): change the return type for lockDataSender api
1 parent 18bee4e commit 53213bb

File tree

1 file changed

+32
-0
lines changed
  • src/@ionic-native/plugins/unvired-cordova-sdk

1 file changed

+32
-0
lines changed

src/@ionic-native/plugins/unvired-cordova-sdk/index.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@ import { Injectable } from '@angular/core';
22
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
33
import { Observable } from 'rxjs';
44

5+
/**
6+
* Outbox Lock Result States
7+
*/
8+
export enum OutboxLockStatus {
9+
LockApplied = 0,
10+
DataBeingSent = 1,
11+
DataNotInQueue = 2
12+
}
13+
514
/**
615
* Log levels supported in the sdk.
716
*/
@@ -243,6 +252,10 @@ export class UnviredResult {
243252
errorDetail: string;
244253
}
245254

255+
export class OutboxLockResult extends UnviredResult {
256+
type: OutboxLockStatus;
257+
}
258+
246259
export class LogResult extends UnviredResult {
247260
type: ResultType;
248261
data: LogLevel;
@@ -1328,4 +1341,23 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
13281341
testPushNotification(): Promise<any> {
13291342
return;
13301343
}
1344+
1345+
/**
1346+
* Mobile Platform only.
1347+
* Lock sending of data for this BE.
1348+
* @param beLid LID of the Business Entity
1349+
*/
1350+
@Cordova()
1351+
lockDataSender(beLid: string): Promise<OutboxLockResult> {
1352+
return;
1353+
}
1354+
1355+
/**
1356+
* Mobile Platform only.
1357+
* Release any locks applied for sending data (DataSender Thread) to the server.
1358+
*/
1359+
@Cordova()
1360+
unlockDataSender(): Promise<UnviredResult> {
1361+
return;
1362+
}
13311363
}

0 commit comments

Comments
 (0)