UNPKG

@tef-novum/webview-bridge

Version:

JavaScript library to access to native functionality. Requires a webview with a postMessage bridge.

19 lines (18 loc) 749 B
/** * Tells the native app to start the push notification subscription flow. * The native app verifies the notifications permission first; if granted, it * starts the corresponding SDK and executes the push subscription. * * Error cases: * - 401: Push notifications permission is not granted * - 500: Any other error that prevented the operation from completing */ export declare const subscribeToPushNotifications: () => Promise<void>; /** * Tells the native app to unsubscribe from pushes through the corresponding SDK. * No permission is required. * * Error cases: * - 500: Any other error that prevented the operation from completing */ export declare const unsubscribeFromPushNotifications: () => Promise<void>;