/** * @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; setSubscription: (unmute: boolean) => Promise; isPushNotificationsEnabled: () => Promise; isOptedOut: () => Promise; isPushNotificationsSupported: () => Promise; subscriptionChange: (fnc: (isSubscribed: boolean) => void) => Promise; push: (fnc: any | Array) => void; getTags: (callback: (tags: any) => void) => Promise>; sendTag: (key: string, value: string) => Promise>; sendTags: (keyValues: object) => Promise>; deleteTag: (key: string) => Promise>; deleteTags: (keys: Array) => Promise>; on: (func: string, callback?: (result: any) => void) => Promise; once: (func: string, callback: (result: any) => void) => void; setExternalUserId: (id: string) => void; removeExternalUserId: () => void; getExternalUserId: () => string; } /** * 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; }