mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 08:32:52 +08:00
feat(mobile-messaging): Added fullFeaturedInApps method to config, fetching of the Inbox methods and registerForRemoteAndroidNotifications method (#4810)
* feat(mobile-messaging): fullfeaturedInApps option to configuration, support of the Inbox methods and registerForAndroidRemoteNotifications method * fix(mobile-messaging): cleanup
This commit is contained in:
parent
5aa432d0a2
commit
63f2fcbe99
@ -17,7 +17,8 @@ export type Event =
|
|||||||
| 'depersonalized'
|
| 'depersonalized'
|
||||||
| 'inAppChat.availabilityUpdated'
|
| 'inAppChat.availabilityUpdated'
|
||||||
| 'inAppChat.unreadMessageCounterUpdated'
|
| 'inAppChat.unreadMessageCounterUpdated'
|
||||||
| 'deeplink';
|
| 'deeplink'
|
||||||
|
| 'inAppChat.viewStateChanged';
|
||||||
|
|
||||||
export interface CustomEvent {
|
export interface CustomEvent {
|
||||||
definitionId: string;
|
definitionId: string;
|
||||||
@ -31,6 +32,7 @@ export interface Configuration {
|
|||||||
applicationCode: string;
|
applicationCode: string;
|
||||||
geofencingEnabled?: boolean;
|
geofencingEnabled?: boolean;
|
||||||
inAppChatEnabled?: boolean;
|
inAppChatEnabled?: boolean;
|
||||||
|
fullFeaturedInAppsEnabled?: boolean | undefined;
|
||||||
/**
|
/**
|
||||||
* Message storage save callback
|
* Message storage save callback
|
||||||
*/
|
*/
|
||||||
@ -167,6 +169,20 @@ export interface Message {
|
|||||||
webViewUrl?: string;
|
webViewUrl?: string;
|
||||||
inAppOpenTitle?: string | undefined;
|
inAppOpenTitle?: string | undefined;
|
||||||
inAppDismissTitle?: string;
|
inAppDismissTitle?: string;
|
||||||
|
topic?: string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MMInbox {
|
||||||
|
countTotal: number;
|
||||||
|
countUnread: number;
|
||||||
|
messages?: Message[] | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MMInboxFilterOptions {
|
||||||
|
fromDateTime?: string | undefined;
|
||||||
|
toDateTime?: string | undefined;
|
||||||
|
topic?: string | undefined;
|
||||||
|
limit?: number | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MobileMessagingError {
|
export interface MobileMessagingError {
|
||||||
@ -592,4 +608,55 @@ export class MobileMessaging extends AwesomeCordovaNativePlugin {
|
|||||||
resetMessageCounter() {
|
resetMessageCounter() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers for Android POST_NOTIFICATIONS permission
|
||||||
|
* @name registerForAndroidRemoteNotifications
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
registerForAndroidRemoteNotifications() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch mobile inbox data from the server.
|
||||||
|
*
|
||||||
|
* @name fetchInboxMessages
|
||||||
|
* @param token access token (JWT in a strictly predefined format) required for current user to have access to the Inbox messages
|
||||||
|
* @param externalUserId External User ID is meant to be an ID of a user in an external (non-Infobip) service
|
||||||
|
* @param filterOptions filtering options applied to messages list in response. Nullable, will return default number of messages
|
||||||
|
* @param callback will be called on success
|
||||||
|
* @param {Function} errorCallback will be called on error
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
fetchInboxMessages(token: string, externalUserId: string, filterOptions: MMInboxFilterOptions): Promise<MMInbox> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch mobile inbox without token from the server.
|
||||||
|
*
|
||||||
|
* @name fetchInboxMessagesWithoutToken
|
||||||
|
* @param externalUserId External User ID is meant to be an ID of a user in an external (non-Infobip) service
|
||||||
|
* @param filterOptions filtering options applied to messages list in response. Nullable, will return default number of messages
|
||||||
|
* @param callback will be called on success
|
||||||
|
* @param {Function} errorCallback will be called on error
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
fetchInboxMessagesWithoutToken(externalUserId: string, filterOptions: MMInboxFilterOptions): Promise<MMInbox> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Asynchronously marks inbox messages as seen
|
||||||
|
*
|
||||||
|
* @param externalUserId External User ID is meant to be an ID of a user in an external (non-Infobip) service
|
||||||
|
* @param messageIds array of inbox messages identifiers that need to be marked as seen
|
||||||
|
* @param callback will be called on success
|
||||||
|
* @param {Function} errorCallback will be called on error
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
setInboxMessagesSeen(externalUserId: string, messageIds: string[]): Promise<string[]> {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user