/** * @see {@link https://github.com/OneSignal/OneSignal-Website-SDK/blob/master/src/utils/OneSignalStub.ts} */ export declare type OneSignalStubFuncionList = 'init' | '_initHttp' | 'isPushNotificationsEnabled' | 'showHttpPrompt' | 'registerForPushNotifications' | 'setDefaultNotificationUrl' | 'setDefaultTitle' | 'syncHashedEmail' | 'getTags' | 'sendTag' | 'sendTags' | 'deleteTag' | 'deleteTags' | 'addListenerForNotificationOpened' | 'getIdsAvailable' | 'setSubscription' | 'showHttpPermissionRequest' | 'showNativePrompt' | 'showSlidedownPrompt' | 'getNotificationPermission' | 'getUserId' | 'getRegistrationId' | 'getSubscription' | 'sendSelfNotification' | 'setEmail' | 'logoutEmail' | 'setExternalUserId' | 'removeExternalUserId' | 'getExternalUserId' | 'provideUserConsent' | 'isOptedOut' | 'getEmailId'; export interface OneSignalStub { init: (options: OneSignalOptions) => Promise; registerForPushNotifications: () => Promise; getUserId: () => Promise; getRegistrationId: () => Promise; getNotificationPermission: () => Promise; setSubscription: (unmute: boolean) => Promise; isPushNotificationsEnabled: (cb?: (isEnabled: boolean) => void) => Promise; isOptedOut: () => Promise; isPushNotificationsSupported: () => Promise; subscriptionChange: (fnc: (isSubscribed: boolean) => void) => Promise; push: (fnc: Array) => Promise; on: (func: string, callback: (result: any) => void) => void; context: { serviceWorkerManager: { getActiveState: () => Promise; }; }; sdkEnvironment: { getWindowEnv: () => Promise; }; } /** * initialize OneSignal. * @see {@link https://documentation.onesignal.com/docs/web-push-sdk#section--init-} */ export declare abstract class OneSignalOptions { appId: string; autoRegister?: boolean; allowLocalhostAsSecureOrigin?: boolean; [prop: string]: any; }