doc(unvired-cordova-sdk): update doc (#3130)

* 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
This commit is contained in:
Srinidhi 2019-08-09 14:37:11 +05:30 committed by Daniel Sogl
parent 016023a7bb
commit e37a7221b1

View File

@ -117,6 +117,11 @@ export enum LoginType {
* ``` * ```
*/ */
sap = 'SAP', sap = 'SAP',
/**
* EMAIL
* Set the type to email to login based on email id.
*/
email = 'EMAIL',
/** /**
* TODO: * TODO:
*/ */
@ -555,7 +560,7 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
* Get User settings. * Get User settings.
*/ */
@Cordova() @Cordova()
userSettings(): Promise<any> { userSettings(): Promise<SettingsResult> {
return; return;
} }
@ -603,8 +608,8 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
/** /**
* Get a random id to use as guid. * Get a random id to use as guid.
*/ */
@Cordova() @Cordova({ sync: true })
guid() { guid(): string {
return; return;
} }
@ -683,10 +688,11 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
* Mobile: Or a Sqlite whereClause ( without the 'where' keyword ) * Mobile: Or a Sqlite whereClause ( without the 'where' keyword )
* Example: * Example:
* ``` * ```
* # Mobile: Select values from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56 * Select values from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56
* this.unviredSDK.dbSelect('FORM_HEADER', "FORM_ID = '5caed815892215034dacad56'") * # Mobile
* # Browser & Mobile: Select values from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56 * this.unviredSDK.dbDelete('FORM_HEADER', "FORM_ID = '5caed815892215034dacad56'")
* this.unviredSDK.dbSelect('FORM_HEADER', {"FORM_ID": "5caed815892215034dacad56"}) * # Browser & Mobile
* this.unviredSDK.dbDelete('FORM_HEADER', {"FORM_ID": "5caed815892215034dacad56"})
* ``` * ```
*/ */
@Cordova() @Cordova()
@ -697,15 +703,16 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
/** /**
* Update records in database. * Update records in database.
* @param tableName Name of the table * @param tableName Name of the table
* @param updatedObject JSON object containing name-value pairs. * @param updatedObject JSON object containing updateds name-value pairs.
* @param whereClause {Object} Browser: JSON object containing name-value pairs. * @param whereClause {Object} Browser: JSON object containing name-value pairs.
* Mobile: Or a Sqlite where Clause ( without the 'where' keyword ) * Mobile: Or a Sqlite where Clause ( without the 'where' keyword )
* Example: * Example:
* ``` * ```
* # Mobile: Select values from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56 * Update NAME & NO from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56
* this.unviredSDK.dbSelect('FORM_HEADER', "FORM_ID = '5caed815892215034dacad56'") * # Mobile
* # Mobile & Browser: Select values from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56 * this.unviredSDK.dbUpdate('FORM_HEADER', {"NAME":"TARAK","NO":"0039"}, "FORM_ID = '5caed815892215034dacad56'")
* this.unviredSDK.dbSelect('FORM_HEADER', {"FORM_ID": "5caed815892215034dacad56"}) * # Mobile & Browser
* this.unviredSDK.dbUpdate('FORM_HEADER', {"NAME":"TARAK","NO":"0039"}, {"FORM_ID": "5caed815892215034dacad56"})
* ``` * ```
*/ */
@Cordova() @Cordova()
@ -876,14 +883,14 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
* For PA functions which do not accept any input, set an empty string for this parameter. * For PA functions which do not accept any input, set an empty string for this parameter.
* Example: If Header datastructure needs to be sent, make sure the header datastructure is in the following format: * Example: If Header datastructure needs to be sent, make sure the header datastructure is in the following format:
* ``` * ```
* {"CUSTOMER_HEADER": {field_name : field_value,...}} * {"CUSTOMER_HEADER": {"field1" : "value1", "field2" : "value2"}}
* ``` * ```
* @param customData {Object} This depends on the PA function. This is useful if you want to send custom data to a PA function. * @param customData {Object} This depends on the PA function. This is useful if you want to send custom data to a PA function.
* Example: You can also use this parameter to send header datastrucrture provided the data structure is formatted like this. * Example: You can also use this parameter to send header datastrucrture provided the data structure is formatted like this.
* ``` * ```
* { * {
* "CATEGORY_BE": [{ * "CATEGORY_BE": [{
* "CATEGORY_HEADER": {field_name : field_value,...} * "CATEGORY_HEADER": {"field1" : "value1", "field2" : "value2"}
* }] * }]
* } * }
* ``` * ```
@ -903,14 +910,14 @@ export class UnviredCordovaSDK extends IonicNativePlugin {
* For PA functions which do not accept any input, set an empty string for this parameter. * For PA functions which do not accept any input, set an empty string for this parameter.
* Example: If Header datastructure needs to be sent, make sure the header datastructure is in the following format: * Example: If Header datastructure needs to be sent, make sure the header datastructure is in the following format:
* ``` * ```
* {"CUSTOMER_HEADER": {field_name : field_value,...}} * {"CUSTOMER_HEADER": {"field1" : "value1", "field2" : "value2"}}
* ``` * ```
* @param customData {Object} This depends on the PA function. This is useful if you want to send custom data to a PA function. * @param customData {Object} This depends on the PA function. This is useful if you want to send custom data to a PA function.
* Example: You can also use this parameter to send header datastrucrture provided the data structure is formatted like this. * Example: You can also use this parameter to send header datastrucrture provided the data structure is formatted like this.
* ``` * ```
* { * {
* "CATEGORY_BE": [{ * "CATEGORY_BE": [{
* "CATEGORY_HEADER": {field_name : field_value,...} * "CATEGORY_HEADER": {"field1" : "value1", "field2" : "value2"}
* }] * }]
* } * }
* ``` * ```