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
This commit is contained in:
Srinidhi 2020-02-28 23:26:54 +05:30 committed by GitHub
parent 18bee4e298
commit 53213bb57a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,15 @@ import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
/**
* Outbox Lock Result States
*/
export enum OutboxLockStatus {
LockApplied = 0,
DataBeingSent = 1,
DataNotInQueue = 2
}
/** /**
* Log levels supported in the sdk. * Log levels supported in the sdk.
*/ */
@ -243,6 +252,10 @@ export class UnviredResult {
errorDetail: string; errorDetail: string;
} }
export class OutboxLockResult extends UnviredResult {
type: OutboxLockStatus;
}
export class LogResult extends UnviredResult { export class LogResult extends UnviredResult {
type: ResultType; type: ResultType;
data: LogLevel; data: LogLevel;
@ -1328,4 +1341,23 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
testPushNotification(): Promise<any> { testPushNotification(): Promise<any> {
return; return;
} }
/**
* Mobile Platform only.
* Lock sending of data for this BE.
* @param beLid LID of the Business Entity
*/
@Cordova()
lockDataSender(beLid: string): Promise<OutboxLockResult> {
return;
}
/**
* Mobile Platform only.
* Release any locks applied for sending data (DataSender Thread) to the server.
*/
@Cordova()
unlockDataSender(): Promise<UnviredResult> {
return;
}
} }