UNPKG

onesignal-web-sdk

Version:

Web push notifications from OneSignal.

40 lines (38 loc) 2.05 kB
export class Messaging { static POSTMAM_COMMANDS = { CONNECTED: 'connect', REMOTE_NOTIFICATION_PERMISSION: 'postmam.remoteNotificationPermission', REMOTE_DATABASE_GET: 'postmam.remoteDatabaseGet', REMOTE_DATABASE_PUT: 'postmam.remoteDatabasePut', REMOTE_DATABASE_REMOVE: 'postmam.remoteDatabaseRemove', REMOTE_OPERATION_COMPLETE: 'postman.operationComplete', REMOTE_RETRIGGER_EVENT: 'postmam.remoteRetriggerEvent', MODAL_LOADED: 'postmam.modalPrompt.loaded', MODAL_PROMPT_ACCEPTED: 'postmam.modalPrompt.accepted', MODAL_PROMPT_REJECTED: 'postmam.modalPrompt.canceled', POPUP_LOADED: 'postmam.popup.loaded', POPUP_ACCEPTED: 'postmam.popup.accepted', POPUP_REJECTED: 'postmam.popup.canceled', POPUP_CLOSING: 'postman.popup.closing', REMOTE_NOTIFICATION_PERMISSION_CHANGED: 'postmam.remoteNotificationPermissionChanged', IFRAME_POPUP_INITIALIZE: 'postmam.iframePopupInitialize', UNSUBSCRIBE_FROM_PUSH: 'postmam.unsubscribeFromPush', SET_SESSION_COUNT: 'postmam.setSessionCount', REQUEST_HOST_URL: 'postmam.requestHostUrl', WINDOW_TIMEOUT: 'postmam.windowTimeout', FINISH_REMOTE_REGISTRATION: 'postmam.finishRemoteRegistration', FINISH_REMOTE_REGISTRATION_IN_PROGRESS: 'postmam.finishRemoteRegistrationInProgress', POPUP_BEGIN_MESSAGEPORT_COMMS: 'postmam.beginMessagePortComms', SERVICEWORKER_COMMAND_REDIRECT: 'postmam.command.redirect', MARK_PROMPT_DISMISSED: 'postmam.markPromptDismissed', IS_SUBSCRIBED: 'postmam.isSubscribed', UNSUBSCRIBE_PROXY_FRAME: 'postman.unsubscribeProxyFrame', GET_EVENT_LISTENER_COUNT: 'postmam.getEventListenerCount', SERVICE_WORKER_STATE: 'postmam.serviceWorkerState', GET_WORKER_VERSION: 'postmam.getWorkerVersion', SUBSCRIPTION_EXPIRATION_STATE: 'postmam.subscriptionExpirationState', PROCESS_EXPIRING_SUBSCRIPTIONS: 'postmam.processExpiringSubscriptions', GET_SUBSCRIPTION_STATE: 'postmam.getSubscriptionState', }; } export default Messaging;