UNPKG

dop-sdk

Version:

Mini App SDK for JavaScript by VTB

43 lines 1.84 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Notification = void 0; var event_types_1 = require("../event-types"); var sdkbridge_1 = require("../sdkbridge"); /** @internal */ var Notification = /** @class */ (function () { function Notification() { } /** * This method is used to clear any notifications in the Host application * @param {notificationType} NotificationInfoType * @see {shouldClearNotifications} */ Notification.prototype.shouldClearNotifications = function (notificationType) { return (0, sdkbridge_1.getBridge)().sendToNative(event_types_1.NotificationEvent.SHOULD_CLEAR_NOTIFICATIONS, { notificationType: notificationType, }); }; /** * This method is used to to update badge number for a specific notification info * @param {notificationInfo} NotificationInfo * @see {shouldUpdateBadgeNumber} */ Notification.prototype.shouldUpdateBadgeNumber = function (notificationInfo) { return (0, sdkbridge_1.getBridge)().sendToNative(event_types_1.NotificationEvent.SHOULD_UPDATE_BADGE_NUMBER, { notificationInfo: notificationInfo, }); }; /** * This method is used to share the notification detailed information to Host app * @param {notificationDetailedInfo} NotificationDetailedInfo * @see {shouldUpdateNotificationInfo} */ Notification.prototype.shouldUpdateNotificationInfo = function (notificationDetailedInfo) { return (0, sdkbridge_1.getBridge)().sendToNative(event_types_1.NotificationEvent.SHOULD_UPDATE_NOTIFICATION_INFO, { notificationDetailedInfo: notificationDetailedInfo, }); }; return Notification; }()); exports.Notification = Notification; //# sourceMappingURL=notification.js.map