mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 23:03:19 +08:00
feat(unvired-cordova-sdk): add ability to receive the JWT token (#3671)
* 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 * fix(unvired-cordova-sdk): fix the data type for ResultType and OutboxLockStatus * doc(unvired-cordova-sdk): Update doc * doc(unvired-cordova-sdk): Update doc * feat(unvired-cordova-sdk): Added new notification type * feat(unvired-cordova-sdk): delete outbox item based on lid * fix(unvired-cordova-sdk): Update doc * doc(unvired-cordova-sdk): Update doc for userSettings() * feat(unvired-cordova-sdk): add new discovery api * fix(unvired-cordova-sdk): rename the property * doc(unvired-cordova-sdk): Doc update * fix(unvired-cordova-sdk): Update the return type for startDiscoveryService api * doc(unvired-cordova-sdk): Rename the loginParameter languageCode to loginLanguage. * changes after doing npm install * feat(unvired-cordova-sdk): Add a new login parameter to send jwt options. * feat(unvired-cordova-sdk): add new function to cache website data * feat(unvired-cordova-sdk): new function to export the database for browser platform * fix(unvired-cordova-sdk): fix method names * feat(unvired-cordova-sdk): add new function 'setClientCredentials' * doc(unvired-cordova-sdk): Update doc * fix(unvired-cordova-sdk): Create a new Credential object and pass that as an input to the setClientCredentials() function. * fix(unvired-cordova-sdk): Fix the typo in the function parameter. * fix(unvired-cordova-sdk): Changed the type of port to string. * feat(unvired-cordova-sdk): add methods to encrypt and decrypt the string. * Delete package-lock.json removed the package-locj.json from the PR Co-authored-by: Srinidhi Anand Rao <srinidhi.rao@unvired.io>
This commit is contained in:
parent
b206b42f85
commit
50d91103cc
@ -114,6 +114,10 @@ export enum LoginType {
|
|||||||
* Set the type to email to login based on email id.
|
* Set the type to email to login based on email id.
|
||||||
*/
|
*/
|
||||||
email = 'EMAIL',
|
email = 'EMAIL',
|
||||||
|
/**
|
||||||
|
* SAML 2.0 Login Type
|
||||||
|
*/
|
||||||
|
saml2 = 'SAML2',
|
||||||
/**
|
/**
|
||||||
* TODO:
|
* TODO:
|
||||||
*/
|
*/
|
||||||
@ -207,6 +211,10 @@ export enum NotificationListenerType {
|
|||||||
* Notify when the sent item count changes.
|
* Notify when the sent item count changes.
|
||||||
*/
|
*/
|
||||||
SentItemChanged = 11,
|
SentItemChanged = 11,
|
||||||
|
/**
|
||||||
|
* Notify that the JWT token is received
|
||||||
|
*/
|
||||||
|
JWTTokenReceived = 12
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum AttachmentItemStatus {
|
export enum AttachmentItemStatus {
|
||||||
@ -390,8 +398,7 @@ export class LoginParameters {
|
|||||||
persistWebDb: boolean;
|
persistWebDb: boolean;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Optional jwt token parameter. Please check with your Unvired Admin for this value.
|
* JWT options.
|
||||||
* For Example:
|
|
||||||
* loginParameters.jwtOptions = {"app": "myapp"};
|
* loginParameters.jwtOptions = {"app": "myapp"};
|
||||||
*/
|
*/
|
||||||
jwtOptions: object;
|
jwtOptions: object;
|
||||||
@ -401,6 +408,18 @@ export class LoginParameters {
|
|||||||
* The default value of this is 'en'.
|
* The default value of this is 'en'.
|
||||||
*/
|
*/
|
||||||
loginLanguage: string;
|
loginLanguage: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applicable for browser only. Set this flag to indicate that saved data should be reloaded upon launch.
|
||||||
|
*/
|
||||||
|
cacheWebData: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set this value if you the login process requires client credentials to be set.
|
||||||
|
* You can pass the client credentials with the method: |unviredSDK.setClientCredentials(credentials)|
|
||||||
|
* The passed credentials will be used based on this flag.
|
||||||
|
*/
|
||||||
|
requireClientCredentials: boolean;
|
||||||
}
|
}
|
||||||
export class LoginResult extends UnviredResult {
|
export class LoginResult extends UnviredResult {
|
||||||
type: LoginListenerType;
|
type: LoginListenerType;
|
||||||
@ -414,6 +433,12 @@ export class AuthenticateLocalResult extends UnviredResult {
|
|||||||
type: AuthenticateLocalResultType;
|
type: AuthenticateLocalResultType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class UnviredCredential {
|
||||||
|
user: string;
|
||||||
|
password: string;
|
||||||
|
port: string;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Unvired Cordova SDK
|
* @name Unvired Cordova SDK
|
||||||
* @description
|
* @description
|
||||||
@ -1055,6 +1080,24 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Browser platform only. Call this function to save the WebData. This function can be used to preserve a large data that is downloaded.
|
||||||
|
* If you set the loginParameter flag, |cacheWebData|, then the plugin loads this data.
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
dbSaveWebData(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Browser platform only. Call this function to export the Webdata.
|
||||||
|
* Call this function to export the Web
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
dbExportWebData(): Promise<any> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Supported in Android & Windows only.
|
* Supported in Android & Windows only.
|
||||||
* Launch a file from a file path
|
* Launch a file from a file path
|
||||||
@ -1513,4 +1556,40 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
|
|||||||
startDiscoveryService(): Promise<UnviredResult> {
|
startDiscoveryService(): Promise<UnviredResult> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this function to set the SAP credentials to be sent to UMP.
|
||||||
|
* @param credentials Array of |Credential| objects.
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
setClientCredentials(credentials: UnviredCredential[]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check for client credentials.
|
||||||
|
* @returns Returns true if client credentials are set
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
isClientCredentialsSet(): Promise<UnviredResult> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Encrypt a string with the key stored by the Unvired SDK.
|
||||||
|
* @returns UnviredResult.data which should contains the encrypted string.
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
encrypt(stringToBeEncrypted: string): Promise<UnviredResult> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Decrypt a string with the string encrypted with the key (key stored by the Unvired SDK)
|
||||||
|
* @returns UnviredResult.data which should contains the decrypted string.
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
decrypt(stringToBeDecrypted: string): Promise<UnviredResult> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user