diff --git a/src/@ionic-native/plugins/unvired-cordova-sdk/index.ts b/src/@ionic-native/plugins/unvired-cordova-sdk/index.ts index d95f21978..079b6a424 100644 --- a/src/@ionic-native/plugins/unvired-cordova-sdk/index.ts +++ b/src/@ionic-native/plugins/unvired-cordova-sdk/index.ts @@ -114,6 +114,10 @@ export enum LoginType { * Set the type to email to login based on email id. */ email = 'EMAIL', + /** + * SAML 2.0 Login Type + */ + saml2 = 'SAML2', /** * TODO: */ @@ -207,6 +211,10 @@ export enum NotificationListenerType { * Notify when the sent item count changes. */ SentItemChanged = 11, + /** + * Notify that the JWT token is received + */ + JWTTokenReceived = 12 } export enum AttachmentItemStatus { @@ -390,8 +398,7 @@ export class LoginParameters { persistWebDb: boolean; /* - * Optional jwt token parameter. Please check with your Unvired Admin for this value. - * For Example: + * JWT options. * loginParameters.jwtOptions = {"app": "myapp"}; */ jwtOptions: object; @@ -401,6 +408,18 @@ export class LoginParameters { * The default value of this is 'en'. */ 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 { type: LoginListenerType; @@ -414,6 +433,12 @@ export class AuthenticateLocalResult extends UnviredResult { type: AuthenticateLocalResultType; } +export class UnviredCredential { + user: string; + password: string; + port: string; +} + /** * @name Unvired Cordova SDK * @description @@ -1055,6 +1080,24 @@ export class UnviredCordovaSDK extends IonicNativePlugin { 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 { + return; + } + + /** + * Browser platform only. Call this function to export the Webdata. + * Call this function to export the Web + */ + @Cordova() + dbExportWebData(): Promise { + return; + } + /** * Supported in Android & Windows only. * Launch a file from a file path @@ -1513,4 +1556,40 @@ export class UnviredCordovaSDK extends IonicNativePlugin { startDiscoveryService(): Promise { 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 { + 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 { + 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 { + return; + } }