mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-17 05:45:25 +08:00
feat(unvired-cordova-sdk): add methods to get and set log level and other functions. (#3207)
* 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
This commit is contained in:
parent
ec933011e6
commit
042e36de08
@ -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';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log levels supported in the sdk.
|
||||||
|
*/
|
||||||
|
export enum LogLevel {
|
||||||
|
important = 7,
|
||||||
|
error = 8,
|
||||||
|
debug = 9
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AuthenticateAndActivateResultType Some Documentation
|
* AuthenticateAndActivateResultType Some Documentation
|
||||||
*/
|
*/
|
||||||
@ -229,6 +238,11 @@ export class UnviredResult {
|
|||||||
errorDetail: string;
|
errorDetail: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class LogResult extends UnviredResult {
|
||||||
|
type: ResultType;
|
||||||
|
data: LogLevel;
|
||||||
|
}
|
||||||
|
|
||||||
export class NotifResult extends UnviredResult {
|
export class NotifResult extends UnviredResult {
|
||||||
type: NotificationListenerType;
|
type: NotificationListenerType;
|
||||||
}
|
}
|
||||||
@ -578,6 +592,23 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the current log level.
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
getLogLevel(): Promise<LogResult> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the log level of the app.
|
||||||
|
* @param logLevel The log level to set
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
setLogLevel(logLevel: LogLevel): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This api initializes the Unvired Application.
|
* This api initializes the Unvired Application.
|
||||||
* @param loginParameters Set of parameters to be passed the login()
|
* @param loginParameters Set of parameters to be passed the login()
|
||||||
@ -1071,6 +1102,21 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an observable containing the state of the synchronisation along with count (if applicable). Possible values are as follows:
|
||||||
|
* 1. Sending (count) // Ex: sending(3), there are 3 items in outbox and device is online. i.e datasender thread running
|
||||||
|
* 2. Receiving // There are items to be received from server & device is online
|
||||||
|
* 3. Processing (count) // Ex: processing (5), there are 5 items in inbox and they are being processed.
|
||||||
|
* 4. Waiting to connect // The device is offline & there are items in outbox
|
||||||
|
* 5. Idle // there is no synchronisation activity going on.
|
||||||
|
*/
|
||||||
|
@Cordova({
|
||||||
|
observable: true
|
||||||
|
})
|
||||||
|
getSynchronizationState(): Observable<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For Browser platform only.
|
* For Browser platform only.
|
||||||
* Reinitialize web db. Use this api to initialize db from persisted local storage db
|
* Reinitialize web db. Use this api to initialize db from persisted local storage db
|
||||||
@ -1205,7 +1251,35 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
|||||||
* For Browser platform only
|
* For Browser platform only
|
||||||
* Helps in updating application database without reauthenticating with server which requires to drop both app and framework database.
|
* Helps in updating application database without reauthenticating with server which requires to drop both app and framework database.
|
||||||
*/
|
*/
|
||||||
|
@Cordova()
|
||||||
reCreateAppDB(): Promise<any> {
|
reCreateAppDB(): Promise<any> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For Mobile platform only
|
||||||
|
* Starts Inbox handler if there are items in inbox.
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
startInboxHandler(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For Mobile platform only
|
||||||
|
* Starts DataSender if there are items in outbox.
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
startDataSender(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns platform name
|
||||||
|
* Ex: ios, android, windows, browser
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
platform(): Promise<string> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user