Skip to content

Commit

Permalink
feat(unvired-cordova-sdk): add new functions to lock and unlock sendi…
Browse files Browse the repository at this point in the history
…ng 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
  • Loading branch information
srinidhirao committed Feb 28, 2020
1 parent 18bee4e commit 53213bb
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/@ionic-native/plugins/unvired-cordova-sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
import { Observable } from 'rxjs';

/**
* Outbox Lock Result States
*/
export enum OutboxLockStatus {
LockApplied = 0,
DataBeingSent = 1,
DataNotInQueue = 2
}

/**
* Log levels supported in the sdk.
*/
Expand Down Expand Up @@ -243,6 +252,10 @@ export class UnviredResult {
errorDetail: string;
}

export class OutboxLockResult extends UnviredResult {
type: OutboxLockStatus;
}

export class LogResult extends UnviredResult {
type: ResultType;
data: LogLevel;
Expand Down Expand Up @@ -1328,4 +1341,23 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
testPushNotification(): Promise<any> {
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;
}
}

0 comments on commit 53213bb

Please sign in to comment.