mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-07-16 00:00:04 +08:00
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c760020d5 | ||
|
|
1888e6ca17 | ||
|
|
6bb7bd6397 | ||
|
|
355d5b3028 | ||
|
|
7c699567dd | ||
|
|
345d5ed2e7 |
@@ -19,11 +19,6 @@ declare let mixpanel: any;
|
||||
* .then(onSuccess)
|
||||
* .catch(onError);
|
||||
*
|
||||
* // For EU data residency, pass a custom server URL:
|
||||
* this.mixpanel.init(token, true, 'https://api-eu.mixpanel.com')
|
||||
* .then(onSuccess)
|
||||
* .catch(onError);
|
||||
*
|
||||
* ```
|
||||
* @classes
|
||||
* MixpanelPeople
|
||||
@@ -81,15 +76,10 @@ export class Mixpanel extends AwesomeCordovaNativePlugin {
|
||||
/**
|
||||
*
|
||||
* @param token {string}
|
||||
* @param trackAutomaticEvents {boolean} optional, defaults to true (Android only)
|
||||
* @param serverUrl {string} optional, custom server URL for EU data residency (e.g. 'https://api-eu.mixpanel.com')
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova({
|
||||
successIndex: 1,
|
||||
errorIndex: 2,
|
||||
})
|
||||
init(token: string, trackAutomaticEvents?: boolean, serverUrl?: string): Promise<any> {
|
||||
@Cordova()
|
||||
init(token: string): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -213,6 +213,10 @@ export enum NotificationListenerType {
|
||||
* Notify that the JWT token is received
|
||||
*/
|
||||
JWTTokenReceived = 12,
|
||||
/**
|
||||
* Notify that the JWT token is expired
|
||||
*/
|
||||
jwtTokenExpired = 13
|
||||
}
|
||||
|
||||
export enum AttachmentItemStatus {
|
||||
@@ -430,9 +434,16 @@ export class LoginParameters {
|
||||
appVersion: string;
|
||||
|
||||
/**
|
||||
*
|
||||
* Specify the redirect URL.
|
||||
*/
|
||||
redirectURL: string;
|
||||
|
||||
/**
|
||||
* Specify the database update statements as a JSON string. This will update the database schema.
|
||||
*/
|
||||
dbUpdateStatements: string;
|
||||
|
||||
|
||||
}
|
||||
export class LoginResult extends UnviredResult {
|
||||
type: LoginListenerType;
|
||||
@@ -1021,6 +1032,7 @@ export class UnviredCordovaSDK extends AwesomeCordovaNativePlugin {
|
||||
* # Select values from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56
|
||||
* this.unviredSDK.dbDelete('FORM_HEADER', "FORM_ID = '5caed815892215034dacad56'")
|
||||
* ```
|
||||
* @deprecated Use `dbDeleteWithArgs` instead.
|
||||
*/
|
||||
@Cordova()
|
||||
dbDelete(tableName: string, whereClause: any): Promise<DbResult> {
|
||||
@@ -1039,6 +1051,7 @@ export class UnviredCordovaSDK extends AwesomeCordovaNativePlugin {
|
||||
* # Update NAME & NO from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56
|
||||
* this.unviredSDK.dbUpdate('FORM_HEADER', {"NAME":"UPDATED_USER","UPDATED_NO":"0039"}, "FORM_ID = '5caed815892215034dacad56'")
|
||||
* ```
|
||||
* @deprecated Use `dbUpdateWithArgs` instead.
|
||||
*/
|
||||
@Cordova()
|
||||
dbUpdate(tableName: string, updatedObject: any, whereClause: any): Promise<DbResult> {
|
||||
@@ -1053,12 +1066,65 @@ export class UnviredCordovaSDK extends AwesomeCordovaNativePlugin {
|
||||
* ```
|
||||
* this.unviredSDK.dbExecuteStatement("SELECT * FROM CUSTOMER_HEADER WHERE CUSTOMER_ID = '39'")
|
||||
* ```
|
||||
* @deprecated Use `dbExecuteStatementWithArgs` instead.
|
||||
*/
|
||||
@Cordova()
|
||||
dbExecuteStatement(query: string): Promise<DbResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete records from the database.
|
||||
*
|
||||
* @param tableName Name of the table
|
||||
* @param whereClause {Object} Browser: JSON object containing name-value pairs.
|
||||
* Mobile: Or a Sqlite whereClause ( without the 'where' keyword )
|
||||
* @param args Arguments to replace the '?' placeholders in the query if any
|
||||
* Example:
|
||||
* ```
|
||||
* # Delete values from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56
|
||||
* this.unviredSDK.dbDeleteWithArgs('FORM_HEADER', "FORM_ID = ?", ['5caed815892215034dacad56'])
|
||||
* ```
|
||||
*/
|
||||
@Cordova()
|
||||
dbDeleteWithArgs(tableName: string, whereClause: any, args: any[]): Promise<DbResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update records in database.
|
||||
*
|
||||
* @param tableName Name of the table
|
||||
* @param updatedObject JSON object containing updated name-value pairs.
|
||||
* @param whereClause {Object} Browser: JSON object containing name-value pairs.
|
||||
* Mobile: Or a Sqlite where Clause ( without the 'where' keyword )
|
||||
* @param args Arguments to replace the '?' placeholders in the query if any
|
||||
* Example:
|
||||
* ```
|
||||
* # Update NAME & NO from FORM_HEADER table where FORM_ID is 5caed815892215034dacad56
|
||||
* this.unviredSDK.dbUpdateWithArgs('FORM_HEADER', {"NAME":"UPDATED_USER","UPDATED_NO":"0039"}, "FORM_ID = ?", ['5caed815892215034dacad56'])
|
||||
* ```
|
||||
*/
|
||||
@Cordova()
|
||||
dbUpdateWithArgs(tableName: string, updatedObject: any, whereClause: any, args: any[]): Promise<DbResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute a SQL statement
|
||||
*
|
||||
* @param query {string} SQL Statement.
|
||||
* @param args Arguments to replace the '?' placeholders in the query if any
|
||||
* Example:
|
||||
* ```
|
||||
* this.unviredSDK.dbExecuteStatementWithArgs("SELECT * FROM CUSTOMER_HEADER WHERE CUSTOMER_ID = ?", ['39'])
|
||||
* ```
|
||||
*/
|
||||
@Cordova()
|
||||
dbExecuteStatementWithArgs(query: string, args: any[]): Promise<DbResult> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Savepoint. For more info consult SQLite Documentation ( https://www.sqlite.org/lang_savepoint.html )
|
||||
*
|
||||
@@ -1422,6 +1488,19 @@ export class UnviredCordovaSDK extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/** For Mobile platform only
|
||||
* getPushNotificationListener - Register for callback on Push Notification received from server
|
||||
*
|
||||
* Mobile Only api
|
||||
*/
|
||||
@Cordova({
|
||||
observable: true,
|
||||
})
|
||||
getPushNotificationListener(): Observable<string> {
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* For Browser platform only.
|
||||
* Reinitialize web db. Use this api to initialize db from persisted local storage db
|
||||
@@ -1734,13 +1813,38 @@ export class UnviredCordovaSDK extends AwesomeCordovaNativePlugin {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the authentication token (JWT) to be used for communicating with UMP server.
|
||||
* This api is useful in scenarios where the app has its own authentication mechanism and receives a JWT token from UMP server.
|
||||
* The app can set this token using this api and all subsequent communication with UMP server would be authenticated using this token.
|
||||
*
|
||||
* @param token JWT token received from UMP server.
|
||||
* @returns A promise containing true if the operation was successful.
|
||||
*/
|
||||
@Cordova()
|
||||
setAuthToken(token: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validity of the authentication token in seconds.
|
||||
* If the return value is less than or equal to 0, then the token is either not set or expired.
|
||||
* If the return value is greater than 0, then it contains the number of seconds for which the token is valid from now.
|
||||
*
|
||||
* @returns A promise containing number of seconds for which the token is valid.
|
||||
*/
|
||||
@Cordova()
|
||||
getAuthTokenValidity(): Promise<number> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get UMP request configuration with authentication headers
|
||||
* @param {string} endpoint - The API endpoint
|
||||
* @param {Object} [options] - Optional configuration object
|
||||
* @param {string} [options.customUrl] - Optional custom base URL to override server URL
|
||||
* @returns UMPRequestConfig which contails url and auth header
|
||||
* Example -
|
||||
* Example: -
|
||||
*
|
||||
* // with auth api
|
||||
* await this.unviredSDK.getUMPRequestConfig("/auth/getmodel/tenex/tenex_model.json");
|
||||
@@ -1753,7 +1857,7 @@ export class UnviredCordovaSDK extends AwesomeCordovaNativePlugin {
|
||||
* await this.unviredSDK.getUMPRequestConfig("/UMP/api/v1/users");
|
||||
*/
|
||||
@Cordova()
|
||||
getUMPRequestConfig(): Promise<UMPRequestConfig> {
|
||||
getUMPRequestConfig(endpoint: string, options?: { customUrl?: string }): Promise<UMPRequestConfig> {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user