@metamask/notification-services-controller 23.0.0 → 23.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [23.0.1]
11
+
12
+ ### Changed
13
+
14
+ - Bump `@metamask/base-controller` from `^9.0.0` to `^9.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
15
+ - Bump `@metamask/keyring-controller` from `^25.1.0` to `^25.1.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
16
+ - Bump `@metamask/messenger` from `^0.3.0` to `^1.0.0` ([#8317](https://github.com/MetaMask/core/pull/8317))
17
+ - Bump `@metamask/profile-sync-controller` from `^28.0.0` to `^28.0.1` ([#8317](https://github.com/MetaMask/core/pull/8317))
18
+
10
19
  ## [23.0.0]
11
20
 
12
21
  ### Added
@@ -697,7 +706,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
697
706
 
698
707
  - Initial release
699
708
 
700
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@23.0.0...HEAD
709
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@23.0.1...HEAD
710
+ [23.0.1]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@23.0.0...@metamask/notification-services-controller@23.0.1
701
711
  [23.0.0]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@22.1.0...@metamask/notification-services-controller@23.0.0
702
712
  [22.1.0]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@22.0.0...@metamask/notification-services-controller@22.1.0
703
713
  [22.0.0]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@21.0.0...@metamask/notification-services-controller@22.0.0
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
3
+ * This file is auto generated.
4
4
  * Do not edit manually.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationServicesController-method-action-types.cjs","sourceRoot":"","sources":["../../src/NotificationServicesController/NotificationServicesController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated by `scripts/generate-method-action-types.ts`.\n * Do not edit manually.\n */\n\nimport type { NotificationServicesController } from './NotificationServicesController';\n\nexport type NotificationServicesControllerInitAction = {\n type: `NotificationServicesController:init`;\n handler: NotificationServicesController['init'];\n};\n\n/**\n * Public method to expose enabling push notifications\n */\nexport type NotificationServicesControllerEnablePushNotificationsAction = {\n type: `NotificationServicesController:enablePushNotifications`;\n handler: NotificationServicesController['enablePushNotifications'];\n};\n\n/**\n * Public method to expose disabling push notifications\n */\nexport type NotificationServicesControllerDisablePushNotificationsAction = {\n type: `NotificationServicesController:disablePushNotifications`;\n handler: NotificationServicesController['disablePushNotifications'];\n};\n\nexport type NotificationServicesControllerCheckAccountsPresenceAction = {\n type: `NotificationServicesController:checkAccountsPresence`;\n handler: NotificationServicesController['checkAccountsPresence'];\n};\n\n/**\n * Sets the enabled state of feature announcements.\n *\n * **Action** - used in the notification settings to enable/disable feature announcements.\n *\n * @param featureAnnouncementsEnabled - A boolean value indicating the desired enabled state of the feature announcements.\n * @async\n * @throws {Error} If fails to update\n */\nexport type NotificationServicesControllerSetFeatureAnnouncementsEnabledAction =\n {\n type: `NotificationServicesController:setFeatureAnnouncementsEnabled`;\n handler: NotificationServicesController['setFeatureAnnouncementsEnabled'];\n };\n\n/**\n * This creates/re-creates on-chain triggers defined in User Storage.\n *\n * **Action** - Used during Sign In / Enabling of notifications.\n *\n * @param opts - optional options to mutate this functionality\n * @param opts.resetNotifications - this will not use the users stored preferences, and instead re-create notification triggers\n * It will help in case uses get into a corrupted state or wants to wipe their notifications.\n * @returns The updated or newly created user storage.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerCreateOnChainTriggersAction = {\n type: `NotificationServicesController:createOnChainTriggers`;\n handler: NotificationServicesController['createOnChainTriggers'];\n};\n\n/**\n * Enables all MetaMask notifications for the user.\n * This is identical flow when initializing notifications for the first time.\n *\n * @throws {Error} If there is an error during the process of enabling notifications.\n */\nexport type NotificationServicesControllerEnableMetamaskNotificationsAction = {\n type: `NotificationServicesController:enableMetamaskNotifications`;\n handler: NotificationServicesController['enableMetamaskNotifications'];\n};\n\n/**\n * Disables all MetaMask notifications for the user.\n * This method ensures that the user is authenticated, retrieves all linked accounts,\n * and disables on-chain triggers for each account. It also sets the global notification\n * settings for MetaMask, feature announcements to false.\n *\n * @throws {Error} If the user is not authenticated or if there is an error during the process.\n */\nexport type NotificationServicesControllerDisableNotificationServicesAction = {\n type: `NotificationServicesController:disableNotificationServices`;\n handler: NotificationServicesController['disableNotificationServices'];\n};\n\n/**\n * Deletes on-chain triggers associated with a specific account/s.\n * This method performs several key operations:\n * 1. Validates Auth\n * 2. Deletes accounts\n * (note) We do not need to look through push notifications as we've deleted triggers\n *\n * **Action** - When a user disables notifications for a given account in settings.\n *\n * @param accounts - The account for which on-chain triggers are to be deleted.\n * @returns A promise that resolves to void or an object containing a success message.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerDisableAccountsAction = {\n type: `NotificationServicesController:disableAccounts`;\n handler: NotificationServicesController['disableAccounts'];\n};\n\n/**\n * Updates/Creates on-chain triggers for a specific account.\n *\n * This method performs several key operations:\n * 1. Validates Auth & Storage\n * 2. Finds and creates any missing triggers associated with the account\n * 3. Enables any related push notifications\n * 4. Updates Storage to reflect new state.\n *\n * **Action** - When a user enables notifications for an account\n *\n * @param accounts - List of accounts you want to update.\n * @returns A promise that resolves to the updated user storage.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerEnableAccountsAction = {\n type: `NotificationServicesController:enableAccounts`;\n handler: NotificationServicesController['enableAccounts'];\n};\n\n/**\n * Fetches the list of metamask notifications.\n * This includes OnChain notifications; Feature Announcements; and Snap Notifications.\n *\n * **Action** - When a user views the notification list page/dropdown\n *\n * @param previewToken - the preview token to use if needed\n * @returns A promise that resolves to the list of notifications.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerFetchAndUpdateMetamaskNotificationsAction =\n {\n type: `NotificationServicesController:fetchAndUpdateMetamaskNotifications`;\n handler: NotificationServicesController['fetchAndUpdateMetamaskNotifications'];\n };\n\n/**\n * Gets the specified type of notifications from state.\n *\n * @param type - The trigger type.\n * @returns An array of notifications of the passed in type.\n * @throws Throws an error if an invalid trigger type is passed.\n */\nexport type NotificationServicesControllerGetNotificationsByTypeAction = {\n type: `NotificationServicesController:getNotificationsByType`;\n handler: NotificationServicesController['getNotificationsByType'];\n};\n\n/**\n * Used to delete a notification by id.\n *\n * Note: This function should only be used for notifications that are stored\n * in this controller directly, currently only snaps notifications.\n *\n * @param id - The id of the notification to delete.\n */\nexport type NotificationServicesControllerDeleteNotificationByIdAction = {\n type: `NotificationServicesController:deleteNotificationById`;\n handler: NotificationServicesController['deleteNotificationById'];\n};\n\n/**\n * Used to batch delete notifications by id.\n *\n * Note: This function should only be used for notifications that are stored\n * in this controller directly, currently only snaps notifications.\n *\n * @param ids - The ids of the notifications to delete.\n */\nexport type NotificationServicesControllerDeleteNotificationsByIdAction = {\n type: `NotificationServicesController:deleteNotificationsById`;\n handler: NotificationServicesController['deleteNotificationsById'];\n};\n\n/**\n * Marks specified metamask notifications as read.\n *\n * @param notifications - An array of notifications to be marked as read. Each notification should include its type and read status.\n * @returns A promise that resolves when the operation is complete.\n */\nexport type NotificationServicesControllerMarkMetamaskNotificationsAsReadAction =\n {\n type: `NotificationServicesController:markMetamaskNotificationsAsRead`;\n handler: NotificationServicesController['markMetamaskNotificationsAsRead'];\n };\n\n/**\n * Updates the list of MetaMask notifications by adding a new notification at the beginning of the list.\n * This method ensures that the most recent notification is displayed first in the UI.\n *\n * @param notification - The new notification object to be added to the list.\n * @returns A promise that resolves when the notification list has been successfully updated.\n */\nexport type NotificationServicesControllerUpdateMetamaskNotificationsListAction =\n {\n type: `NotificationServicesController:updateMetamaskNotificationsList`;\n handler: NotificationServicesController['updateMetamaskNotificationsList'];\n };\n\n/**\n * Creates an perp order notification subscription.\n * Requires notifications and auth to be enabled to start receiving this notifications\n *\n * @param input perp input\n */\nexport type NotificationServicesControllerSendPerpPlaceOrderNotificationAction =\n {\n type: `NotificationServicesController:sendPerpPlaceOrderNotification`;\n handler: NotificationServicesController['sendPerpPlaceOrderNotification'];\n };\n\n/**\n * Union of all NotificationServicesController action types.\n */\nexport type NotificationServicesControllerMethodActions =\n | NotificationServicesControllerInitAction\n | NotificationServicesControllerEnablePushNotificationsAction\n | NotificationServicesControllerDisablePushNotificationsAction\n | NotificationServicesControllerCheckAccountsPresenceAction\n | NotificationServicesControllerSetFeatureAnnouncementsEnabledAction\n | NotificationServicesControllerCreateOnChainTriggersAction\n | NotificationServicesControllerEnableMetamaskNotificationsAction\n | NotificationServicesControllerDisableNotificationServicesAction\n | NotificationServicesControllerDisableAccountsAction\n | NotificationServicesControllerEnableAccountsAction\n | NotificationServicesControllerFetchAndUpdateMetamaskNotificationsAction\n | NotificationServicesControllerGetNotificationsByTypeAction\n | NotificationServicesControllerDeleteNotificationByIdAction\n | NotificationServicesControllerDeleteNotificationsByIdAction\n | NotificationServicesControllerMarkMetamaskNotificationsAsReadAction\n | NotificationServicesControllerUpdateMetamaskNotificationsListAction\n | NotificationServicesControllerSendPerpPlaceOrderNotificationAction;\n"]}
1
+ {"version":3,"file":"NotificationServicesController-method-action-types.cjs","sourceRoot":"","sources":["../../src/NotificationServicesController/NotificationServicesController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { NotificationServicesController } from './NotificationServicesController';\n\nexport type NotificationServicesControllerInitAction = {\n type: `NotificationServicesController:init`;\n handler: NotificationServicesController['init'];\n};\n\n/**\n * Public method to expose enabling push notifications\n */\nexport type NotificationServicesControllerEnablePushNotificationsAction = {\n type: `NotificationServicesController:enablePushNotifications`;\n handler: NotificationServicesController['enablePushNotifications'];\n};\n\n/**\n * Public method to expose disabling push notifications\n */\nexport type NotificationServicesControllerDisablePushNotificationsAction = {\n type: `NotificationServicesController:disablePushNotifications`;\n handler: NotificationServicesController['disablePushNotifications'];\n};\n\nexport type NotificationServicesControllerCheckAccountsPresenceAction = {\n type: `NotificationServicesController:checkAccountsPresence`;\n handler: NotificationServicesController['checkAccountsPresence'];\n};\n\n/**\n * Sets the enabled state of feature announcements.\n *\n * **Action** - used in the notification settings to enable/disable feature announcements.\n *\n * @param featureAnnouncementsEnabled - A boolean value indicating the desired enabled state of the feature announcements.\n * @async\n * @throws {Error} If fails to update\n */\nexport type NotificationServicesControllerSetFeatureAnnouncementsEnabledAction =\n {\n type: `NotificationServicesController:setFeatureAnnouncementsEnabled`;\n handler: NotificationServicesController['setFeatureAnnouncementsEnabled'];\n };\n\n/**\n * This creates/re-creates on-chain triggers defined in User Storage.\n *\n * **Action** - Used during Sign In / Enabling of notifications.\n *\n * @param opts - optional options to mutate this functionality\n * @param opts.resetNotifications - this will not use the users stored preferences, and instead re-create notification triggers\n * It will help in case uses get into a corrupted state or wants to wipe their notifications.\n * @returns The updated or newly created user storage.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerCreateOnChainTriggersAction = {\n type: `NotificationServicesController:createOnChainTriggers`;\n handler: NotificationServicesController['createOnChainTriggers'];\n};\n\n/**\n * Enables all MetaMask notifications for the user.\n * This is identical flow when initializing notifications for the first time.\n *\n * @throws {Error} If there is an error during the process of enabling notifications.\n */\nexport type NotificationServicesControllerEnableMetamaskNotificationsAction = {\n type: `NotificationServicesController:enableMetamaskNotifications`;\n handler: NotificationServicesController['enableMetamaskNotifications'];\n};\n\n/**\n * Disables all MetaMask notifications for the user.\n * This method ensures that the user is authenticated, retrieves all linked accounts,\n * and disables on-chain triggers for each account. It also sets the global notification\n * settings for MetaMask, feature announcements to false.\n *\n * @throws {Error} If the user is not authenticated or if there is an error during the process.\n */\nexport type NotificationServicesControllerDisableNotificationServicesAction = {\n type: `NotificationServicesController:disableNotificationServices`;\n handler: NotificationServicesController['disableNotificationServices'];\n};\n\n/**\n * Deletes on-chain triggers associated with a specific account/s.\n * This method performs several key operations:\n * 1. Validates Auth\n * 2. Deletes accounts\n * (note) We do not need to look through push notifications as we've deleted triggers\n *\n * **Action** - When a user disables notifications for a given account in settings.\n *\n * @param accounts - The account for which on-chain triggers are to be deleted.\n * @returns A promise that resolves to void or an object containing a success message.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerDisableAccountsAction = {\n type: `NotificationServicesController:disableAccounts`;\n handler: NotificationServicesController['disableAccounts'];\n};\n\n/**\n * Updates/Creates on-chain triggers for a specific account.\n *\n * This method performs several key operations:\n * 1. Validates Auth & Storage\n * 2. Finds and creates any missing triggers associated with the account\n * 3. Enables any related push notifications\n * 4. Updates Storage to reflect new state.\n *\n * **Action** - When a user enables notifications for an account\n *\n * @param accounts - List of accounts you want to update.\n * @returns A promise that resolves to the updated user storage.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerEnableAccountsAction = {\n type: `NotificationServicesController:enableAccounts`;\n handler: NotificationServicesController['enableAccounts'];\n};\n\n/**\n * Fetches the list of metamask notifications.\n * This includes OnChain notifications; Feature Announcements; and Snap Notifications.\n *\n * **Action** - When a user views the notification list page/dropdown\n *\n * @param previewToken - the preview token to use if needed\n * @returns A promise that resolves to the list of notifications.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerFetchAndUpdateMetamaskNotificationsAction =\n {\n type: `NotificationServicesController:fetchAndUpdateMetamaskNotifications`;\n handler: NotificationServicesController['fetchAndUpdateMetamaskNotifications'];\n };\n\n/**\n * Gets the specified type of notifications from state.\n *\n * @param type - The trigger type.\n * @returns An array of notifications of the passed in type.\n * @throws Throws an error if an invalid trigger type is passed.\n */\nexport type NotificationServicesControllerGetNotificationsByTypeAction = {\n type: `NotificationServicesController:getNotificationsByType`;\n handler: NotificationServicesController['getNotificationsByType'];\n};\n\n/**\n * Used to delete a notification by id.\n *\n * Note: This function should only be used for notifications that are stored\n * in this controller directly, currently only snaps notifications.\n *\n * @param id - The id of the notification to delete.\n */\nexport type NotificationServicesControllerDeleteNotificationByIdAction = {\n type: `NotificationServicesController:deleteNotificationById`;\n handler: NotificationServicesController['deleteNotificationById'];\n};\n\n/**\n * Used to batch delete notifications by id.\n *\n * Note: This function should only be used for notifications that are stored\n * in this controller directly, currently only snaps notifications.\n *\n * @param ids - The ids of the notifications to delete.\n */\nexport type NotificationServicesControllerDeleteNotificationsByIdAction = {\n type: `NotificationServicesController:deleteNotificationsById`;\n handler: NotificationServicesController['deleteNotificationsById'];\n};\n\n/**\n * Marks specified metamask notifications as read.\n *\n * @param notifications - An array of notifications to be marked as read. Each notification should include its type and read status.\n * @returns A promise that resolves when the operation is complete.\n */\nexport type NotificationServicesControllerMarkMetamaskNotificationsAsReadAction =\n {\n type: `NotificationServicesController:markMetamaskNotificationsAsRead`;\n handler: NotificationServicesController['markMetamaskNotificationsAsRead'];\n };\n\n/**\n * Updates the list of MetaMask notifications by adding a new notification at the beginning of the list.\n * This method ensures that the most recent notification is displayed first in the UI.\n *\n * @param notification - The new notification object to be added to the list.\n * @returns A promise that resolves when the notification list has been successfully updated.\n */\nexport type NotificationServicesControllerUpdateMetamaskNotificationsListAction =\n {\n type: `NotificationServicesController:updateMetamaskNotificationsList`;\n handler: NotificationServicesController['updateMetamaskNotificationsList'];\n };\n\n/**\n * Creates an perp order notification subscription.\n * Requires notifications and auth to be enabled to start receiving this notifications\n *\n * @param input perp input\n */\nexport type NotificationServicesControllerSendPerpPlaceOrderNotificationAction =\n {\n type: `NotificationServicesController:sendPerpPlaceOrderNotification`;\n handler: NotificationServicesController['sendPerpPlaceOrderNotification'];\n };\n\n/**\n * Union of all NotificationServicesController action types.\n */\nexport type NotificationServicesControllerMethodActions =\n | NotificationServicesControllerInitAction\n | NotificationServicesControllerEnablePushNotificationsAction\n | NotificationServicesControllerDisablePushNotificationsAction\n | NotificationServicesControllerCheckAccountsPresenceAction\n | NotificationServicesControllerSetFeatureAnnouncementsEnabledAction\n | NotificationServicesControllerCreateOnChainTriggersAction\n | NotificationServicesControllerEnableMetamaskNotificationsAction\n | NotificationServicesControllerDisableNotificationServicesAction\n | NotificationServicesControllerDisableAccountsAction\n | NotificationServicesControllerEnableAccountsAction\n | NotificationServicesControllerFetchAndUpdateMetamaskNotificationsAction\n | NotificationServicesControllerGetNotificationsByTypeAction\n | NotificationServicesControllerDeleteNotificationByIdAction\n | NotificationServicesControllerDeleteNotificationsByIdAction\n | NotificationServicesControllerMarkMetamaskNotificationsAsReadAction\n | NotificationServicesControllerUpdateMetamaskNotificationsListAction\n | NotificationServicesControllerSendPerpPlaceOrderNotificationAction;\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
2
+ * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
5
  import type { NotificationServicesController } from "./NotificationServicesController.cjs";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
2
+ * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
5
  import type { NotificationServicesController } from "./NotificationServicesController.mjs";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
2
+ * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
5
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationServicesController-method-action-types.mjs","sourceRoot":"","sources":["../../src/NotificationServicesController/NotificationServicesController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated by `scripts/generate-method-action-types.ts`.\n * Do not edit manually.\n */\n\nimport type { NotificationServicesController } from './NotificationServicesController';\n\nexport type NotificationServicesControllerInitAction = {\n type: `NotificationServicesController:init`;\n handler: NotificationServicesController['init'];\n};\n\n/**\n * Public method to expose enabling push notifications\n */\nexport type NotificationServicesControllerEnablePushNotificationsAction = {\n type: `NotificationServicesController:enablePushNotifications`;\n handler: NotificationServicesController['enablePushNotifications'];\n};\n\n/**\n * Public method to expose disabling push notifications\n */\nexport type NotificationServicesControllerDisablePushNotificationsAction = {\n type: `NotificationServicesController:disablePushNotifications`;\n handler: NotificationServicesController['disablePushNotifications'];\n};\n\nexport type NotificationServicesControllerCheckAccountsPresenceAction = {\n type: `NotificationServicesController:checkAccountsPresence`;\n handler: NotificationServicesController['checkAccountsPresence'];\n};\n\n/**\n * Sets the enabled state of feature announcements.\n *\n * **Action** - used in the notification settings to enable/disable feature announcements.\n *\n * @param featureAnnouncementsEnabled - A boolean value indicating the desired enabled state of the feature announcements.\n * @async\n * @throws {Error} If fails to update\n */\nexport type NotificationServicesControllerSetFeatureAnnouncementsEnabledAction =\n {\n type: `NotificationServicesController:setFeatureAnnouncementsEnabled`;\n handler: NotificationServicesController['setFeatureAnnouncementsEnabled'];\n };\n\n/**\n * This creates/re-creates on-chain triggers defined in User Storage.\n *\n * **Action** - Used during Sign In / Enabling of notifications.\n *\n * @param opts - optional options to mutate this functionality\n * @param opts.resetNotifications - this will not use the users stored preferences, and instead re-create notification triggers\n * It will help in case uses get into a corrupted state or wants to wipe their notifications.\n * @returns The updated or newly created user storage.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerCreateOnChainTriggersAction = {\n type: `NotificationServicesController:createOnChainTriggers`;\n handler: NotificationServicesController['createOnChainTriggers'];\n};\n\n/**\n * Enables all MetaMask notifications for the user.\n * This is identical flow when initializing notifications for the first time.\n *\n * @throws {Error} If there is an error during the process of enabling notifications.\n */\nexport type NotificationServicesControllerEnableMetamaskNotificationsAction = {\n type: `NotificationServicesController:enableMetamaskNotifications`;\n handler: NotificationServicesController['enableMetamaskNotifications'];\n};\n\n/**\n * Disables all MetaMask notifications for the user.\n * This method ensures that the user is authenticated, retrieves all linked accounts,\n * and disables on-chain triggers for each account. It also sets the global notification\n * settings for MetaMask, feature announcements to false.\n *\n * @throws {Error} If the user is not authenticated or if there is an error during the process.\n */\nexport type NotificationServicesControllerDisableNotificationServicesAction = {\n type: `NotificationServicesController:disableNotificationServices`;\n handler: NotificationServicesController['disableNotificationServices'];\n};\n\n/**\n * Deletes on-chain triggers associated with a specific account/s.\n * This method performs several key operations:\n * 1. Validates Auth\n * 2. Deletes accounts\n * (note) We do not need to look through push notifications as we've deleted triggers\n *\n * **Action** - When a user disables notifications for a given account in settings.\n *\n * @param accounts - The account for which on-chain triggers are to be deleted.\n * @returns A promise that resolves to void or an object containing a success message.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerDisableAccountsAction = {\n type: `NotificationServicesController:disableAccounts`;\n handler: NotificationServicesController['disableAccounts'];\n};\n\n/**\n * Updates/Creates on-chain triggers for a specific account.\n *\n * This method performs several key operations:\n * 1. Validates Auth & Storage\n * 2. Finds and creates any missing triggers associated with the account\n * 3. Enables any related push notifications\n * 4. Updates Storage to reflect new state.\n *\n * **Action** - When a user enables notifications for an account\n *\n * @param accounts - List of accounts you want to update.\n * @returns A promise that resolves to the updated user storage.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerEnableAccountsAction = {\n type: `NotificationServicesController:enableAccounts`;\n handler: NotificationServicesController['enableAccounts'];\n};\n\n/**\n * Fetches the list of metamask notifications.\n * This includes OnChain notifications; Feature Announcements; and Snap Notifications.\n *\n * **Action** - When a user views the notification list page/dropdown\n *\n * @param previewToken - the preview token to use if needed\n * @returns A promise that resolves to the list of notifications.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerFetchAndUpdateMetamaskNotificationsAction =\n {\n type: `NotificationServicesController:fetchAndUpdateMetamaskNotifications`;\n handler: NotificationServicesController['fetchAndUpdateMetamaskNotifications'];\n };\n\n/**\n * Gets the specified type of notifications from state.\n *\n * @param type - The trigger type.\n * @returns An array of notifications of the passed in type.\n * @throws Throws an error if an invalid trigger type is passed.\n */\nexport type NotificationServicesControllerGetNotificationsByTypeAction = {\n type: `NotificationServicesController:getNotificationsByType`;\n handler: NotificationServicesController['getNotificationsByType'];\n};\n\n/**\n * Used to delete a notification by id.\n *\n * Note: This function should only be used for notifications that are stored\n * in this controller directly, currently only snaps notifications.\n *\n * @param id - The id of the notification to delete.\n */\nexport type NotificationServicesControllerDeleteNotificationByIdAction = {\n type: `NotificationServicesController:deleteNotificationById`;\n handler: NotificationServicesController['deleteNotificationById'];\n};\n\n/**\n * Used to batch delete notifications by id.\n *\n * Note: This function should only be used for notifications that are stored\n * in this controller directly, currently only snaps notifications.\n *\n * @param ids - The ids of the notifications to delete.\n */\nexport type NotificationServicesControllerDeleteNotificationsByIdAction = {\n type: `NotificationServicesController:deleteNotificationsById`;\n handler: NotificationServicesController['deleteNotificationsById'];\n};\n\n/**\n * Marks specified metamask notifications as read.\n *\n * @param notifications - An array of notifications to be marked as read. Each notification should include its type and read status.\n * @returns A promise that resolves when the operation is complete.\n */\nexport type NotificationServicesControllerMarkMetamaskNotificationsAsReadAction =\n {\n type: `NotificationServicesController:markMetamaskNotificationsAsRead`;\n handler: NotificationServicesController['markMetamaskNotificationsAsRead'];\n };\n\n/**\n * Updates the list of MetaMask notifications by adding a new notification at the beginning of the list.\n * This method ensures that the most recent notification is displayed first in the UI.\n *\n * @param notification - The new notification object to be added to the list.\n * @returns A promise that resolves when the notification list has been successfully updated.\n */\nexport type NotificationServicesControllerUpdateMetamaskNotificationsListAction =\n {\n type: `NotificationServicesController:updateMetamaskNotificationsList`;\n handler: NotificationServicesController['updateMetamaskNotificationsList'];\n };\n\n/**\n * Creates an perp order notification subscription.\n * Requires notifications and auth to be enabled to start receiving this notifications\n *\n * @param input perp input\n */\nexport type NotificationServicesControllerSendPerpPlaceOrderNotificationAction =\n {\n type: `NotificationServicesController:sendPerpPlaceOrderNotification`;\n handler: NotificationServicesController['sendPerpPlaceOrderNotification'];\n };\n\n/**\n * Union of all NotificationServicesController action types.\n */\nexport type NotificationServicesControllerMethodActions =\n | NotificationServicesControllerInitAction\n | NotificationServicesControllerEnablePushNotificationsAction\n | NotificationServicesControllerDisablePushNotificationsAction\n | NotificationServicesControllerCheckAccountsPresenceAction\n | NotificationServicesControllerSetFeatureAnnouncementsEnabledAction\n | NotificationServicesControllerCreateOnChainTriggersAction\n | NotificationServicesControllerEnableMetamaskNotificationsAction\n | NotificationServicesControllerDisableNotificationServicesAction\n | NotificationServicesControllerDisableAccountsAction\n | NotificationServicesControllerEnableAccountsAction\n | NotificationServicesControllerFetchAndUpdateMetamaskNotificationsAction\n | NotificationServicesControllerGetNotificationsByTypeAction\n | NotificationServicesControllerDeleteNotificationByIdAction\n | NotificationServicesControllerDeleteNotificationsByIdAction\n | NotificationServicesControllerMarkMetamaskNotificationsAsReadAction\n | NotificationServicesControllerUpdateMetamaskNotificationsListAction\n | NotificationServicesControllerSendPerpPlaceOrderNotificationAction;\n"]}
1
+ {"version":3,"file":"NotificationServicesController-method-action-types.mjs","sourceRoot":"","sources":["../../src/NotificationServicesController/NotificationServicesController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { NotificationServicesController } from './NotificationServicesController';\n\nexport type NotificationServicesControllerInitAction = {\n type: `NotificationServicesController:init`;\n handler: NotificationServicesController['init'];\n};\n\n/**\n * Public method to expose enabling push notifications\n */\nexport type NotificationServicesControllerEnablePushNotificationsAction = {\n type: `NotificationServicesController:enablePushNotifications`;\n handler: NotificationServicesController['enablePushNotifications'];\n};\n\n/**\n * Public method to expose disabling push notifications\n */\nexport type NotificationServicesControllerDisablePushNotificationsAction = {\n type: `NotificationServicesController:disablePushNotifications`;\n handler: NotificationServicesController['disablePushNotifications'];\n};\n\nexport type NotificationServicesControllerCheckAccountsPresenceAction = {\n type: `NotificationServicesController:checkAccountsPresence`;\n handler: NotificationServicesController['checkAccountsPresence'];\n};\n\n/**\n * Sets the enabled state of feature announcements.\n *\n * **Action** - used in the notification settings to enable/disable feature announcements.\n *\n * @param featureAnnouncementsEnabled - A boolean value indicating the desired enabled state of the feature announcements.\n * @async\n * @throws {Error} If fails to update\n */\nexport type NotificationServicesControllerSetFeatureAnnouncementsEnabledAction =\n {\n type: `NotificationServicesController:setFeatureAnnouncementsEnabled`;\n handler: NotificationServicesController['setFeatureAnnouncementsEnabled'];\n };\n\n/**\n * This creates/re-creates on-chain triggers defined in User Storage.\n *\n * **Action** - Used during Sign In / Enabling of notifications.\n *\n * @param opts - optional options to mutate this functionality\n * @param opts.resetNotifications - this will not use the users stored preferences, and instead re-create notification triggers\n * It will help in case uses get into a corrupted state or wants to wipe their notifications.\n * @returns The updated or newly created user storage.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerCreateOnChainTriggersAction = {\n type: `NotificationServicesController:createOnChainTriggers`;\n handler: NotificationServicesController['createOnChainTriggers'];\n};\n\n/**\n * Enables all MetaMask notifications for the user.\n * This is identical flow when initializing notifications for the first time.\n *\n * @throws {Error} If there is an error during the process of enabling notifications.\n */\nexport type NotificationServicesControllerEnableMetamaskNotificationsAction = {\n type: `NotificationServicesController:enableMetamaskNotifications`;\n handler: NotificationServicesController['enableMetamaskNotifications'];\n};\n\n/**\n * Disables all MetaMask notifications for the user.\n * This method ensures that the user is authenticated, retrieves all linked accounts,\n * and disables on-chain triggers for each account. It also sets the global notification\n * settings for MetaMask, feature announcements to false.\n *\n * @throws {Error} If the user is not authenticated or if there is an error during the process.\n */\nexport type NotificationServicesControllerDisableNotificationServicesAction = {\n type: `NotificationServicesController:disableNotificationServices`;\n handler: NotificationServicesController['disableNotificationServices'];\n};\n\n/**\n * Deletes on-chain triggers associated with a specific account/s.\n * This method performs several key operations:\n * 1. Validates Auth\n * 2. Deletes accounts\n * (note) We do not need to look through push notifications as we've deleted triggers\n *\n * **Action** - When a user disables notifications for a given account in settings.\n *\n * @param accounts - The account for which on-chain triggers are to be deleted.\n * @returns A promise that resolves to void or an object containing a success message.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerDisableAccountsAction = {\n type: `NotificationServicesController:disableAccounts`;\n handler: NotificationServicesController['disableAccounts'];\n};\n\n/**\n * Updates/Creates on-chain triggers for a specific account.\n *\n * This method performs several key operations:\n * 1. Validates Auth & Storage\n * 2. Finds and creates any missing triggers associated with the account\n * 3. Enables any related push notifications\n * 4. Updates Storage to reflect new state.\n *\n * **Action** - When a user enables notifications for an account\n *\n * @param accounts - List of accounts you want to update.\n * @returns A promise that resolves to the updated user storage.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerEnableAccountsAction = {\n type: `NotificationServicesController:enableAccounts`;\n handler: NotificationServicesController['enableAccounts'];\n};\n\n/**\n * Fetches the list of metamask notifications.\n * This includes OnChain notifications; Feature Announcements; and Snap Notifications.\n *\n * **Action** - When a user views the notification list page/dropdown\n *\n * @param previewToken - the preview token to use if needed\n * @returns A promise that resolves to the list of notifications.\n * @throws {Error} Throws an error if unauthenticated or from other operations.\n */\nexport type NotificationServicesControllerFetchAndUpdateMetamaskNotificationsAction =\n {\n type: `NotificationServicesController:fetchAndUpdateMetamaskNotifications`;\n handler: NotificationServicesController['fetchAndUpdateMetamaskNotifications'];\n };\n\n/**\n * Gets the specified type of notifications from state.\n *\n * @param type - The trigger type.\n * @returns An array of notifications of the passed in type.\n * @throws Throws an error if an invalid trigger type is passed.\n */\nexport type NotificationServicesControllerGetNotificationsByTypeAction = {\n type: `NotificationServicesController:getNotificationsByType`;\n handler: NotificationServicesController['getNotificationsByType'];\n};\n\n/**\n * Used to delete a notification by id.\n *\n * Note: This function should only be used for notifications that are stored\n * in this controller directly, currently only snaps notifications.\n *\n * @param id - The id of the notification to delete.\n */\nexport type NotificationServicesControllerDeleteNotificationByIdAction = {\n type: `NotificationServicesController:deleteNotificationById`;\n handler: NotificationServicesController['deleteNotificationById'];\n};\n\n/**\n * Used to batch delete notifications by id.\n *\n * Note: This function should only be used for notifications that are stored\n * in this controller directly, currently only snaps notifications.\n *\n * @param ids - The ids of the notifications to delete.\n */\nexport type NotificationServicesControllerDeleteNotificationsByIdAction = {\n type: `NotificationServicesController:deleteNotificationsById`;\n handler: NotificationServicesController['deleteNotificationsById'];\n};\n\n/**\n * Marks specified metamask notifications as read.\n *\n * @param notifications - An array of notifications to be marked as read. Each notification should include its type and read status.\n * @returns A promise that resolves when the operation is complete.\n */\nexport type NotificationServicesControllerMarkMetamaskNotificationsAsReadAction =\n {\n type: `NotificationServicesController:markMetamaskNotificationsAsRead`;\n handler: NotificationServicesController['markMetamaskNotificationsAsRead'];\n };\n\n/**\n * Updates the list of MetaMask notifications by adding a new notification at the beginning of the list.\n * This method ensures that the most recent notification is displayed first in the UI.\n *\n * @param notification - The new notification object to be added to the list.\n * @returns A promise that resolves when the notification list has been successfully updated.\n */\nexport type NotificationServicesControllerUpdateMetamaskNotificationsListAction =\n {\n type: `NotificationServicesController:updateMetamaskNotificationsList`;\n handler: NotificationServicesController['updateMetamaskNotificationsList'];\n };\n\n/**\n * Creates an perp order notification subscription.\n * Requires notifications and auth to be enabled to start receiving this notifications\n *\n * @param input perp input\n */\nexport type NotificationServicesControllerSendPerpPlaceOrderNotificationAction =\n {\n type: `NotificationServicesController:sendPerpPlaceOrderNotification`;\n handler: NotificationServicesController['sendPerpPlaceOrderNotification'];\n };\n\n/**\n * Union of all NotificationServicesController action types.\n */\nexport type NotificationServicesControllerMethodActions =\n | NotificationServicesControllerInitAction\n | NotificationServicesControllerEnablePushNotificationsAction\n | NotificationServicesControllerDisablePushNotificationsAction\n | NotificationServicesControllerCheckAccountsPresenceAction\n | NotificationServicesControllerSetFeatureAnnouncementsEnabledAction\n | NotificationServicesControllerCreateOnChainTriggersAction\n | NotificationServicesControllerEnableMetamaskNotificationsAction\n | NotificationServicesControllerDisableNotificationServicesAction\n | NotificationServicesControllerDisableAccountsAction\n | NotificationServicesControllerEnableAccountsAction\n | NotificationServicesControllerFetchAndUpdateMetamaskNotificationsAction\n | NotificationServicesControllerGetNotificationsByTypeAction\n | NotificationServicesControllerDeleteNotificationByIdAction\n | NotificationServicesControllerDeleteNotificationsByIdAction\n | NotificationServicesControllerMarkMetamaskNotificationsAsReadAction\n | NotificationServicesControllerUpdateMetamaskNotificationsListAction\n | NotificationServicesControllerSendPerpPlaceOrderNotificationAction;\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  /**
3
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
3
+ * This file is auto generated.
4
4
  * Do not edit manually.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationServicesPushController-method-action-types.cjs","sourceRoot":"","sources":["../../src/NotificationServicesPushController/NotificationServicesPushController-method-action-types.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated by `scripts/generate-method-action-types.ts`.\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 * 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 | NotificationServicesPushControllerDeletePushNotificationLinksAction\n | NotificationServicesPushControllerUpdateTriggerPushNotificationsAction;\n"]}
1
+ {"version":3,"file":"NotificationServicesPushController-method-action-types.cjs","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 * 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 | NotificationServicesPushControllerDeletePushNotificationLinksAction\n | NotificationServicesPushControllerUpdateTriggerPushNotificationsAction;\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
2
+ * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
5
  import type { NotificationServicesPushController } from "./NotificationServicesPushController.cjs";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
2
+ * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
5
  import type { NotificationServicesPushController } from "./NotificationServicesPushController.mjs";
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file is auto generated by `scripts/generate-method-action-types.ts`.
2
+ * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
5
  export {};
@@ -1 +1 @@
1
- {"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 by `scripts/generate-method-action-types.ts`.\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 * 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 | NotificationServicesPushControllerDeletePushNotificationLinksAction\n | NotificationServicesPushControllerUpdateTriggerPushNotificationsAction;\n"]}
1
+ {"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 * 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 | NotificationServicesPushControllerDeletePushNotificationLinksAction\n | NotificationServicesPushControllerUpdateTriggerPushNotificationsAction;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/notification-services-controller",
3
- "version": "23.0.0",
3
+ "version": "23.0.1",
4
4
  "description": "Manages New MetaMask decentralized Notification system",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -103,11 +103,11 @@
103
103
  },
104
104
  "dependencies": {
105
105
  "@contentful/rich-text-html-renderer": "^16.5.2",
106
- "@metamask/base-controller": "^9.0.0",
106
+ "@metamask/base-controller": "^9.0.1",
107
107
  "@metamask/controller-utils": "^11.19.0",
108
- "@metamask/keyring-controller": "^25.1.0",
109
- "@metamask/messenger": "^0.3.0",
110
- "@metamask/profile-sync-controller": "^28.0.0",
108
+ "@metamask/keyring-controller": "^25.1.1",
109
+ "@metamask/messenger": "^1.0.0",
110
+ "@metamask/profile-sync-controller": "^28.0.1",
111
111
  "@metamask/utils": "^11.9.0",
112
112
  "bignumber.js": "^9.1.2",
113
113
  "firebase": "^11.2.0",