mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
feat(mobile-messaging): add callback parameter for Mobile Messaging S… (#4930)
* feat(mobile-messaging): add callback parameter for Mobile Messaging SDK init function * fix(mobile-messaging): order of init parameters in JSDoc * feat(mobile-messaging): support for JWT authorization for user operations --------- Co-authored-by: Ivan Bilobrk <Ivan.Bilobrk@infobip.com>
This commit is contained in:
@@ -30,6 +30,7 @@ export interface Configuration {
|
|||||||
* The application code of your Application from Push Portal website
|
* The application code of your Application from Push Portal website
|
||||||
*/
|
*/
|
||||||
applicationCode: string;
|
applicationCode: string;
|
||||||
|
userDataJwt?: string;
|
||||||
geofencingEnabled?: boolean;
|
geofencingEnabled?: boolean;
|
||||||
inAppChatEnabled?: boolean;
|
inAppChatEnabled?: boolean;
|
||||||
fullFeaturedInAppsEnabled?: boolean | undefined;
|
fullFeaturedInAppsEnabled?: boolean | undefined;
|
||||||
@@ -295,6 +296,7 @@ export interface ChatSettingsIOS {
|
|||||||
*
|
*
|
||||||
* this.mobileMessaging.init({
|
* this.mobileMessaging.init({
|
||||||
* applicationCode: '<your_application_code>',
|
* applicationCode: '<your_application_code>',
|
||||||
|
* userDataJwt: '<user_data_jwt>',
|
||||||
* geofencingEnabled: '<true/false>',
|
* geofencingEnabled: '<true/false>',
|
||||||
* defaultMessageStorage: '<true/false>',
|
* defaultMessageStorage: '<true/false>',
|
||||||
* ios: {
|
* ios: {
|
||||||
@@ -329,11 +331,12 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
|||||||
* @name init
|
* @name init
|
||||||
* @param config. Configuration for Mobile Messaging
|
* @param config. Configuration for Mobile Messaging
|
||||||
* @param config
|
* @param config
|
||||||
|
* @param {Function} callback. Called after successful start of Mobile Messaging SDK initialization. Register for registrationUpdated event to know when it's ready to be used.
|
||||||
* @param onInitError
|
* @param onInitError
|
||||||
* @param {Function} onInitError. Error callback
|
* @param {Function} onInitError. Error callback
|
||||||
*/
|
*/
|
||||||
@Cordova({ sync: true })
|
@Cordova({ sync: true })
|
||||||
init(config: Configuration, onInitError?: (error: MobileMessagingError) => void) {
|
init(config: Configuration, callback?: () => void, onInitError?: (error: MobileMessagingError) => void) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -659,4 +662,16 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
|||||||
setInboxMessagesSeen(externalUserId: string, messageIds: string[]): Promise<string[]> {
|
setInboxMessagesSeen(externalUserId: string, messageIds: string[]): Promise<string[]> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates JWT used for user data fetching and personalization.
|
||||||
|
*
|
||||||
|
* @name setUserDataJwt
|
||||||
|
* @param jwt - JWT in a predefined format
|
||||||
|
* @param {Function} errorCallback will be called on error
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
setUserDataJwt(jwt: string, errorCallback?: (error: MobileMessagingError) => void) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user