{"version":3,"file":"NotificationServicesPushController-method-action-types.mjs","sourceRoot":"","sources":["../../src/NotificationServicesPushController/NotificationServicesPushController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { NotificationServicesPushController } from './NotificationServicesPushController';\n\nexport type NotificationServicesPushControllerSubscribeToPushNotificationsAction =\n  {\n    type: `NotificationServicesPushController:subscribeToPushNotifications`;\n    handler: NotificationServicesPushController['subscribeToPushNotifications'];\n  };\n\n/**\n * Enables push notifications for the application.\n *\n * This method sets up the necessary infrastructure for handling push notifications by:\n * 1. Registering the service worker to listen for messages.\n * 2. Fetching the Firebase Cloud Messaging (FCM) token from Firebase.\n * 3. Sending the FCM token to the server responsible for sending notifications, to register the device.\n *\n * @param addresses - An array of addresses to enable push notifications for.\n */\nexport type NotificationServicesPushControllerEnablePushNotificationsAction = {\n  type: `NotificationServicesPushController:enablePushNotifications`;\n  handler: NotificationServicesPushController['enablePushNotifications'];\n};\n\n/**\n * Disables push notifications for the application.\n * This removes the registration token on this device, and ensures we unsubscribe from any listeners\n */\nexport type NotificationServicesPushControllerDisablePushNotificationsAction = {\n  type: `NotificationServicesPushController:disablePushNotifications`;\n  handler: NotificationServicesPushController['disablePushNotifications'];\n};\n\n/**\n * Adds backend push notification links for the given addresses using the current FCM token.\n * This is used when accounts are added after push notifications have already been enabled,\n * so backend can link the existing device token to the newly added addresses.\n *\n * @param addresses - Addresses that should be linked to push notifications.\n * @returns Whether the add request succeeded.\n */\nexport type NotificationServicesPushControllerAddPushNotificationLinksAction = {\n  type: `NotificationServicesPushController:addPushNotificationLinks`;\n  handler: NotificationServicesPushController['addPushNotificationLinks'];\n};\n\n/**\n * Deletes backend push notification links for the given addresses on the current platform.\n * This is used when accounts are removed (for example SRP removal), so backend can remove\n * all associated FCM tokens for those address/platform pairs.\n *\n * @param addresses - Addresses that should be unlinked from push notifications.\n * @returns Whether the delete request succeeded.\n */\nexport type NotificationServicesPushControllerDeletePushNotificationLinksAction =\n  {\n    type: `NotificationServicesPushController:deletePushNotificationLinks`;\n    handler: NotificationServicesPushController['deletePushNotificationLinks'];\n  };\n\n/**\n * Updates the triggers for push notifications.\n * This method is responsible for updating the server with the new set of addresses that should trigger push notifications.\n * It uses the current FCM token and a BearerToken for authentication.\n *\n * @param addresses - An array of addresses that should trigger push notifications.\n * @deprecated - this is not used anymore and will most likely be removed\n */\nexport type NotificationServicesPushControllerUpdateTriggerPushNotificationsAction =\n  {\n    type: `NotificationServicesPushController:updateTriggerPushNotifications`;\n    handler: NotificationServicesPushController['updateTriggerPushNotifications'];\n  };\n\n/**\n * Union of all NotificationServicesPushController action types.\n */\nexport type NotificationServicesPushControllerMethodActions =\n  | NotificationServicesPushControllerSubscribeToPushNotificationsAction\n  | NotificationServicesPushControllerEnablePushNotificationsAction\n  | NotificationServicesPushControllerDisablePushNotificationsAction\n  | NotificationServicesPushControllerAddPushNotificationLinksAction\n  | NotificationServicesPushControllerDeletePushNotificationLinksAction\n  | NotificationServicesPushControllerUpdateTriggerPushNotificationsAction;\n"]}