mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-02-04 00:06:19 +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
|
||||
*/
|
||||
applicationCode: string;
|
||||
userDataJwt?: string;
|
||||
geofencingEnabled?: boolean;
|
||||
inAppChatEnabled?: boolean;
|
||||
fullFeaturedInAppsEnabled?: boolean | undefined;
|
||||
@@ -295,6 +296,7 @@ export interface ChatSettingsIOS {
|
||||
*
|
||||
* this.mobileMessaging.init({
|
||||
* applicationCode: '<your_application_code>',
|
||||
* userDataJwt: '<user_data_jwt>',
|
||||
* geofencingEnabled: '<true/false>',
|
||||
* defaultMessageStorage: '<true/false>',
|
||||
* ios: {
|
||||
@@ -329,11 +331,12 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
* @name init
|
||||
* @param config. Configuration for Mobile Messaging
|
||||
* @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 {Function} onInitError. Error callback
|
||||
*/
|
||||
@Cordova({ sync: true })
|
||||
init(config: Configuration, onInitError?: (error: MobileMessagingError) => void) {
|
||||
init(config: Configuration, callback?: () => void, onInitError?: (error: MobileMessagingError) => void) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -659,4 +662,16 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
||||
setInboxMessagesSeen(externalUserId: string, messageIds: string[]): Promise<string[]> {
|
||||
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