@metamask-previews/notification-services-controller 0.5.0-preview-367cb1da → 0.5.0-preview-cf09c0a
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/dist/NotificationServicesController/NotificationServicesController.cjs +803 -0
- package/dist/NotificationServicesController/NotificationServicesController.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/NotificationServicesController.d.ts → NotificationServicesController/NotificationServicesController.d.cts} +7 -7
- package/dist/NotificationServicesController/NotificationServicesController.d.cts.map +1 -0
- package/dist/NotificationServicesController/NotificationServicesController.d.mts +238 -0
- package/dist/NotificationServicesController/NotificationServicesController.d.mts.map +1 -0
- package/dist/NotificationServicesController/NotificationServicesController.mjs +779 -17
- package/dist/NotificationServicesController/NotificationServicesController.mjs.map +1 -1
- package/dist/NotificationServicesController/__fixtures__/index.cjs +22 -0
- package/dist/NotificationServicesController/__fixtures__/index.cjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/index.d.cts +6 -0
- package/dist/NotificationServicesController/__fixtures__/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/index.d.mts +6 -0
- package/dist/NotificationServicesController/__fixtures__/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/index.mjs +6 -0
- package/dist/NotificationServicesController/__fixtures__/index.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.cjs +210 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mock-feature-announcements.d.ts → NotificationServicesController/__fixtures__/mock-feature-announcements.d.cts} +3 -3
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.d.mts +15 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.mjs +205 -0
- package/dist/NotificationServicesController/__fixtures__/mock-feature-announcements.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.cjs +22 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mock-notification-trigger.d.ts → NotificationServicesController/__fixtures__/mock-notification-trigger.d.cts} +2 -2
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.d.mts +9 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.mjs +18 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-trigger.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.cjs +82 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.ts → NotificationServicesController/__fixtures__/mock-notification-user-storage.d.cts} +3 -3
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.mts +35 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.mjs +76 -0
- package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.cjs +624 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mock-raw-notifications.d.ts → NotificationServicesController/__fixtures__/mock-raw-notifications.d.cts} +2 -2
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.mts +82 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.mjs +605 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.cjs +50 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mockResponses.d.ts → NotificationServicesController/__fixtures__/mockResponses.d.cts} +5 -5
- package/dist/NotificationServicesController/__fixtures__/mockResponses.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.d.mts +28 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.mjs +42 -0
- package/dist/NotificationServicesController/__fixtures__/mockResponses.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.cjs +56 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/mockServices.d.ts → NotificationServicesController/__fixtures__/mockServices.d.cts} +2 -2
- package/dist/NotificationServicesController/__fixtures__/mockServices.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.d.mts +12 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.mjs +52 -0
- package/dist/NotificationServicesController/__fixtures__/mockServices.mjs.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.cjs +31 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/__fixtures__/test-utils.d.ts → NotificationServicesController/__fixtures__/test-utils.d.cts} +1 -1
- package/dist/NotificationServicesController/__fixtures__/test-utils.d.cts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.d.mts +14 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.d.mts.map +1 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.mjs +27 -0
- package/dist/NotificationServicesController/__fixtures__/test-utils.mjs.map +1 -0
- package/dist/NotificationServicesController/constants/constants.cjs +7 -0
- package/dist/NotificationServicesController/constants/constants.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/constants/constants.d.ts → NotificationServicesController/constants/constants.d.cts} +1 -1
- package/dist/NotificationServicesController/constants/constants.d.cts.map +1 -0
- package/dist/NotificationServicesController/constants/constants.d.mts +3 -0
- package/dist/NotificationServicesController/constants/constants.d.mts.map +1 -0
- package/dist/NotificationServicesController/constants/constants.mjs +3 -9
- package/dist/NotificationServicesController/constants/constants.mjs.map +1 -1
- package/dist/NotificationServicesController/constants/index.cjs +19 -0
- package/dist/NotificationServicesController/constants/index.cjs.map +1 -0
- package/dist/NotificationServicesController/constants/index.d.cts +3 -0
- package/dist/NotificationServicesController/constants/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/constants/index.d.mts +3 -0
- package/dist/NotificationServicesController/constants/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/constants/index.mjs +2 -28
- package/dist/NotificationServicesController/constants/index.mjs.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.cjs +170 -0
- package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/constants/notification-schema.d.ts → NotificationServicesController/constants/notification-schema.d.cts} +2 -2
- package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -0
- package/dist/NotificationServicesController/constants/notification-schema.d.mts +48 -0
- package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -0
- package/dist/NotificationServicesController/constants/notification-schema.mjs +165 -20
- package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
- package/dist/NotificationServicesController/index.cjs +46 -0
- package/dist/NotificationServicesController/index.cjs.map +1 -0
- package/dist/NotificationServicesController/index.d.cts +14 -0
- package/dist/NotificationServicesController/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/index.d.mts +14 -0
- package/dist/NotificationServicesController/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/index.mjs +13 -86
- package/dist/NotificationServicesController/index.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/index.cjs +20 -0
- package/dist/NotificationServicesController/processors/index.cjs.map +1 -0
- package/dist/NotificationServicesController/processors/index.d.cts +4 -0
- package/dist/NotificationServicesController/processors/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/processors/index.d.mts +4 -0
- package/dist/NotificationServicesController/processors/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/processors/index.mjs +3 -21
- package/dist/NotificationServicesController/processors/index.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-feature-announcement.cjs +41 -0
- package/dist/{chunk-52CALMRA.js.map → NotificationServicesController/processors/process-feature-announcement.cjs.map} +1 -1
- package/dist/{types/NotificationServicesController/processors/process-feature-announcement.d.ts → NotificationServicesController/processors/process-feature-announcement.d.cts} +3 -3
- package/dist/NotificationServicesController/processors/process-feature-announcement.d.cts.map +1 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.d.mts +19 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.d.mts.map +1 -0
- package/dist/NotificationServicesController/processors/process-feature-announcement.mjs +34 -8
- package/dist/NotificationServicesController/processors/process-feature-announcement.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.cjs +50 -0
- package/dist/NotificationServicesController/processors/process-notifications.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/processors/process-notifications.d.ts → NotificationServicesController/processors/process-notifications.d.cts} +2 -2
- package/dist/NotificationServicesController/processors/process-notifications.d.cts.map +1 -0
- package/dist/NotificationServicesController/processors/process-notifications.d.mts +19 -0
- package/dist/NotificationServicesController/processors/process-notifications.d.mts.map +1 -0
- package/dist/NotificationServicesController/processors/process-notifications.mjs +44 -12
- package/dist/NotificationServicesController/processors/process-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs +19 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/processors/process-onchain-notifications.d.ts → NotificationServicesController/processors/process-onchain-notifications.d.cts} +3 -3
- package/dist/NotificationServicesController/processors/process-onchain-notifications.d.cts.map +1 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts +10 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts.map +1 -0
- package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs +14 -7
- package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.cjs +97 -0
- package/dist/NotificationServicesController/services/feature-announcements.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/services/feature-announcements.d.ts → NotificationServicesController/services/feature-announcements.d.cts} +4 -4
- package/dist/NotificationServicesController/services/feature-announcements.d.cts.map +1 -0
- package/dist/NotificationServicesController/services/feature-announcements.d.mts +28 -0
- package/dist/NotificationServicesController/services/feature-announcements.d.mts.map +1 -0
- package/dist/NotificationServicesController/services/feature-announcements.mjs +91 -12
- package/dist/NotificationServicesController/services/feature-announcements.mjs.map +1 -1
- package/dist/NotificationServicesController/services/onchain-notifications.cjs +195 -0
- package/dist/NotificationServicesController/services/onchain-notifications.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/services/onchain-notifications.d.ts → NotificationServicesController/services/onchain-notifications.d.cts} +3 -3
- package/dist/NotificationServicesController/services/onchain-notifications.d.cts.map +1 -0
- package/dist/NotificationServicesController/services/onchain-notifications.d.mts +62 -0
- package/dist/NotificationServicesController/services/onchain-notifications.d.mts.map +1 -0
- package/dist/NotificationServicesController/services/onchain-notifications.mjs +190 -29
- package/dist/NotificationServicesController/services/onchain-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.cjs +3 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts → NotificationServicesController/types/feature-announcement/feature-announcement.d.cts} +3 -3
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.d.mts +32 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.mjs +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.mjs.map +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/index.cjs +20 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.d.cts +4 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.d.mts +4 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/index.mjs +3 -4
- package/dist/NotificationServicesController/types/feature-announcement/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.cjs +3 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts → NotificationServicesController/types/feature-announcement/type-feature-announcement.d.cts} +3 -3
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.mts +39 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.mjs +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.mjs.map +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-links.cjs +3 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/feature-announcement/type-links.d.ts → NotificationServicesController/types/feature-announcement/type-links.d.cts} +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-links.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.d.mts +29 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/feature-announcement/type-links.mjs +1 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-links.mjs.map +1 -1
- package/dist/NotificationServicesController/types/index.cjs +21 -0
- package/dist/NotificationServicesController/types/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/index.d.cts +5 -0
- package/dist/NotificationServicesController/types/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/index.d.mts +5 -0
- package/dist/NotificationServicesController/types/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/index.mjs +4 -11
- package/dist/NotificationServicesController/types/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/notification/index.cjs +18 -0
- package/dist/NotificationServicesController/types/notification/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/notification/index.d.cts +2 -0
- package/dist/NotificationServicesController/types/notification/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/notification/index.d.mts +2 -0
- package/dist/NotificationServicesController/types/notification/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/notification/index.mjs +1 -2
- package/dist/NotificationServicesController/types/notification/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/notification/notification.cjs +3 -0
- package/dist/NotificationServicesController/types/notification/notification.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/notification/notification.d.ts → NotificationServicesController/types/notification/notification.d.cts} +4 -4
- package/dist/NotificationServicesController/types/notification/notification.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/notification/notification.d.mts +25 -0
- package/dist/NotificationServicesController/types/notification/notification.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/notification/notification.mjs +1 -1
- package/dist/NotificationServicesController/types/notification/notification.mjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/index.cjs +18 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts +2 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts +2 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/index.mjs +1 -2
- package/dist/NotificationServicesController/types/on-chain-notification/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.cjs +3 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.ts → NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts} +4 -4
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts +43 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.cjs +9 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/on-chain-notification/schema.d.ts → NotificationServicesController/types/on-chain-notification/schema.d.cts} +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts +283 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs +7 -0
- package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs.map +1 -1
- package/dist/NotificationServicesController/types/type-utils.cjs +3 -0
- package/dist/NotificationServicesController/types/type-utils.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/type-utils.d.ts → NotificationServicesController/types/type-utils.d.cts} +1 -1
- package/dist/NotificationServicesController/types/type-utils.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/type-utils.d.mts +7 -0
- package/dist/NotificationServicesController/types/type-utils.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/type-utils.mjs +1 -0
- package/dist/NotificationServicesController/types/type-utils.mjs.map +1 -1
- package/dist/NotificationServicesController/types/user-storage/index.cjs +18 -0
- package/dist/NotificationServicesController/types/user-storage/index.cjs.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/index.d.cts +2 -0
- package/dist/NotificationServicesController/types/user-storage/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/index.d.mts +2 -0
- package/dist/NotificationServicesController/types/user-storage/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/index.mjs +1 -2
- package/dist/NotificationServicesController/types/user-storage/index.mjs.map +1 -1
- package/dist/NotificationServicesController/types/user-storage/user-storage.cjs +3 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/types/user-storage/user-storage.d.ts → NotificationServicesController/types/user-storage/user-storage.d.cts} +3 -3
- package/dist/NotificationServicesController/types/user-storage/user-storage.d.cts.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.d.mts +26 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.d.mts.map +1 -0
- package/dist/NotificationServicesController/types/user-storage/user-storage.mjs +1 -1
- package/dist/NotificationServicesController/types/user-storage/user-storage.mjs.map +1 -1
- package/dist/NotificationServicesController/ui/constants.cjs +62 -0
- package/dist/NotificationServicesController/ui/constants.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/ui/constants.d.ts → NotificationServicesController/ui/constants.d.cts} +2 -2
- package/dist/NotificationServicesController/ui/constants.d.cts.map +1 -0
- package/dist/NotificationServicesController/ui/constants.d.mts +54 -0
- package/dist/NotificationServicesController/ui/constants.d.mts.map +1 -0
- package/dist/NotificationServicesController/ui/constants.mjs +56 -14
- package/dist/NotificationServicesController/ui/constants.mjs.map +1 -1
- package/dist/NotificationServicesController/ui/index.cjs +18 -0
- package/dist/NotificationServicesController/ui/index.cjs.map +1 -0
- package/dist/NotificationServicesController/ui/index.d.cts +2 -0
- package/dist/NotificationServicesController/ui/index.d.cts.map +1 -0
- package/dist/NotificationServicesController/ui/index.d.mts +2 -0
- package/dist/NotificationServicesController/ui/index.d.mts.map +1 -0
- package/dist/NotificationServicesController/ui/index.mjs +1 -16
- package/dist/NotificationServicesController/ui/index.mjs.map +1 -1
- package/dist/NotificationServicesController/utils/utils.cjs +348 -0
- package/dist/NotificationServicesController/utils/utils.cjs.map +1 -0
- package/dist/{types/NotificationServicesController/utils/utils.d.ts → NotificationServicesController/utils/utils.d.cts} +3 -3
- package/dist/NotificationServicesController/utils/utils.d.cts.map +1 -0
- package/dist/NotificationServicesController/utils/utils.d.mts +142 -0
- package/dist/NotificationServicesController/utils/utils.d.mts.map +1 -0
- package/dist/NotificationServicesController/utils/utils.mjs +332 -31
- package/dist/NotificationServicesController/utils/utils.mjs.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs +215 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/NotificationServicesPushController.d.ts → NotificationServicesPushController/NotificationServicesPushController.d.cts} +6 -6
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts +112 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +214 -37
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs.map +1 -1
- package/dist/NotificationServicesPushController/__fixtures__/index.cjs +18 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.cjs.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.d.cts +2 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.d.mts +2 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.mjs +2 -0
- package/dist/NotificationServicesPushController/__fixtures__/index.mjs.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.cjs +57 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/__fixtures__/mockResponse.d.ts → NotificationServicesPushController/__fixtures__/mockResponse.d.cts} +2 -2
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.d.mts +43 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.mjs +50 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockResponse.mjs.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.cjs +31 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/__fixtures__/mockServices.d.ts → NotificationServicesPushController/__fixtures__/mockServices.d.cts} +2 -2
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.d.mts +9 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.mjs +30 -0
- package/dist/NotificationServicesPushController/__fixtures__/mockServices.mjs.map +1 -0
- package/dist/NotificationServicesPushController/constants.cjs +14 -0
- package/dist/NotificationServicesPushController/constants.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/constants.d.ts → NotificationServicesPushController/constants.d.cts} +1 -1
- package/dist/NotificationServicesPushController/constants.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/constants.d.mts +11 -0
- package/dist/NotificationServicesPushController/constants.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/constants.mjs +10 -25
- package/dist/NotificationServicesPushController/constants.mjs.map +1 -1
- package/dist/NotificationServicesPushController/index.cjs +43 -0
- package/dist/NotificationServicesPushController/index.cjs.map +1 -0
- package/dist/NotificationServicesPushController/index.d.cts +11 -0
- package/dist/NotificationServicesPushController/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/index.d.mts +11 -0
- package/dist/NotificationServicesPushController/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/index.mjs +10 -71
- package/dist/NotificationServicesPushController/index.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.cjs +6 -0
- package/dist/NotificationServicesPushController/services/endpoints.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/services/endpoints.d.ts → NotificationServicesPushController/services/endpoints.d.cts} +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/services/endpoints.d.mts +2 -0
- package/dist/NotificationServicesPushController/services/endpoints.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/services/endpoints.mjs +2 -7
- package/dist/NotificationServicesPushController/services/endpoints.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/push/index.cjs +3 -0
- package/dist/NotificationServicesPushController/services/push/index.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/services/push/index.d.ts → NotificationServicesPushController/services/push/index.d.cts} +2 -2
- package/dist/NotificationServicesPushController/services/push/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/services/push/index.d.mts +6 -0
- package/dist/NotificationServicesPushController/services/push/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/services/push/index.mjs +1 -0
- package/dist/NotificationServicesPushController/services/push/index.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/push/push-web.cjs +121 -0
- package/dist/NotificationServicesPushController/services/push/push-web.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/services/push/push-web.d.ts → NotificationServicesPushController/services/push/push-web.d.cts} +3 -3
- package/dist/NotificationServicesPushController/services/push/push-web.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/services/push/push-web.d.mts +32 -0
- package/dist/NotificationServicesPushController/services/push/push-web.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/services/push/push-web.mjs +116 -38
- package/dist/NotificationServicesPushController/services/push/push-web.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/services.cjs +197 -0
- package/dist/NotificationServicesPushController/services/services.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/services/services.d.ts → NotificationServicesPushController/services/services.d.cts} +4 -4
- package/dist/NotificationServicesPushController/services/services.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/services/services.d.mts +95 -0
- package/dist/NotificationServicesPushController/services/services.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/services/services.mjs +168 -45
- package/dist/NotificationServicesPushController/services/services.mjs.map +1 -1
- package/dist/NotificationServicesPushController/types/firebase.cjs +3 -0
- package/dist/NotificationServicesPushController/types/firebase.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/types/firebase.d.ts → NotificationServicesPushController/types/firebase.d.cts} +1 -1
- package/dist/NotificationServicesPushController/types/firebase.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/types/firebase.d.mts +53 -0
- package/dist/NotificationServicesPushController/types/firebase.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/types/firebase.mjs +1 -1
- package/dist/NotificationServicesPushController/types/firebase.mjs.map +1 -1
- package/dist/NotificationServicesPushController/types/index.cjs +18 -0
- package/dist/NotificationServicesPushController/types/index.cjs.map +1 -0
- package/dist/NotificationServicesPushController/types/index.d.cts +2 -0
- package/dist/NotificationServicesPushController/types/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/types/index.d.mts +2 -0
- package/dist/NotificationServicesPushController/types/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/types/index.mjs +1 -2
- package/dist/NotificationServicesPushController/types/index.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.cjs +84 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/utils/get-notification-data.d.ts → NotificationServicesPushController/utils/get-notification-data.d.cts} +2 -2
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts +42 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs +76 -12
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.cjs +190 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.cjs.map +1 -0
- package/dist/{types/NotificationServicesPushController/utils/get-notification-message.d.ts → NotificationServicesPushController/utils/get-notification-message.d.cts} +3 -3
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts +67 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +182 -37
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/index.cjs +19 -0
- package/dist/NotificationServicesPushController/utils/index.cjs.map +1 -0
- package/dist/NotificationServicesPushController/utils/index.d.cts +3 -0
- package/dist/NotificationServicesPushController/utils/index.d.cts.map +1 -0
- package/dist/NotificationServicesPushController/utils/index.d.mts +3 -0
- package/dist/NotificationServicesPushController/utils/index.d.mts.map +1 -0
- package/dist/NotificationServicesPushController/utils/index.mjs +2 -48
- package/dist/NotificationServicesPushController/utils/index.mjs.map +1 -1
- package/dist/index.cjs +29 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -45
- package/dist/index.mjs.map +1 -1
- package/dist/shared/to-raw-notification.cjs +19 -0
- package/dist/shared/to-raw-notification.cjs.map +1 -0
- package/dist/{types/shared/to-raw-notification.d.ts → shared/to-raw-notification.d.cts} +2 -2
- package/dist/shared/to-raw-notification.d.cts.map +1 -0
- package/dist/shared/to-raw-notification.d.mts +11 -0
- package/dist/shared/to-raw-notification.d.mts.map +1 -0
- package/dist/shared/to-raw-notification.mjs +14 -7
- package/dist/shared/to-raw-notification.mjs.map +1 -1
- package/package.json +12 -7
- package/dist/NotificationServicesController/NotificationServicesController.js +0 -19
- package/dist/NotificationServicesController/NotificationServicesController.js.map +0 -1
- package/dist/NotificationServicesController/constants/constants.js +0 -10
- package/dist/NotificationServicesController/constants/constants.js.map +0 -1
- package/dist/NotificationServicesController/constants/index.js +0 -29
- package/dist/NotificationServicesController/constants/index.js.map +0 -1
- package/dist/NotificationServicesController/constants/notification-schema.js +0 -22
- package/dist/NotificationServicesController/constants/notification-schema.js.map +0 -1
- package/dist/NotificationServicesController/index.js +0 -87
- package/dist/NotificationServicesController/index.js.map +0 -1
- package/dist/NotificationServicesController/processors/index.js +0 -22
- package/dist/NotificationServicesController/processors/index.js.map +0 -1
- package/dist/NotificationServicesController/processors/process-feature-announcement.js +0 -10
- package/dist/NotificationServicesController/processors/process-feature-announcement.js.map +0 -1
- package/dist/NotificationServicesController/processors/process-notifications.js +0 -13
- package/dist/NotificationServicesController/processors/process-notifications.js.map +0 -1
- package/dist/NotificationServicesController/processors/process-onchain-notifications.js +0 -8
- package/dist/NotificationServicesController/processors/process-onchain-notifications.js.map +0 -1
- package/dist/NotificationServicesController/services/feature-announcements.js +0 -14
- package/dist/NotificationServicesController/services/feature-announcements.js.map +0 -1
- package/dist/NotificationServicesController/services/onchain-notifications.js +0 -30
- package/dist/NotificationServicesController/services/onchain-notifications.js.map +0 -1
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.js +0 -2
- package/dist/NotificationServicesController/types/feature-announcement/feature-announcement.js.map +0 -1
- package/dist/NotificationServicesController/types/feature-announcement/index.js +0 -5
- package/dist/NotificationServicesController/types/feature-announcement/index.js.map +0 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.js +0 -2
- package/dist/NotificationServicesController/types/feature-announcement/type-feature-announcement.js.map +0 -1
- package/dist/NotificationServicesController/types/feature-announcement/type-links.js +0 -2
- package/dist/NotificationServicesController/types/feature-announcement/type-links.js.map +0 -1
- package/dist/NotificationServicesController/types/index.js +0 -12
- package/dist/NotificationServicesController/types/index.js.map +0 -1
- package/dist/NotificationServicesController/types/notification/index.js +0 -3
- package/dist/NotificationServicesController/types/notification/index.js.map +0 -1
- package/dist/NotificationServicesController/types/notification/notification.js +0 -2
- package/dist/NotificationServicesController/types/notification/notification.js.map +0 -1
- package/dist/NotificationServicesController/types/on-chain-notification/index.js +0 -3
- package/dist/NotificationServicesController/types/on-chain-notification/index.js.map +0 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.js +0 -2
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.js.map +0 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.js +0 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.js.map +0 -1
- package/dist/NotificationServicesController/types/type-utils.js +0 -1
- package/dist/NotificationServicesController/types/type-utils.js.map +0 -1
- package/dist/NotificationServicesController/types/user-storage/index.js +0 -3
- package/dist/NotificationServicesController/types/user-storage/index.js.map +0 -1
- package/dist/NotificationServicesController/types/user-storage/user-storage.js +0 -2
- package/dist/NotificationServicesController/types/user-storage/user-storage.js.map +0 -1
- package/dist/NotificationServicesController/ui/constants.js +0 -16
- package/dist/NotificationServicesController/ui/constants.js.map +0 -1
- package/dist/NotificationServicesController/ui/index.js +0 -17
- package/dist/NotificationServicesController/ui/index.js.map +0 -1
- package/dist/NotificationServicesController/utils/utils.js +0 -32
- package/dist/NotificationServicesController/utils/utils.js.map +0 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.js +0 -39
- package/dist/NotificationServicesPushController/NotificationServicesPushController.js.map +0 -1
- package/dist/NotificationServicesPushController/constants.js +0 -26
- package/dist/NotificationServicesPushController/constants.js.map +0 -1
- package/dist/NotificationServicesPushController/index.js +0 -72
- package/dist/NotificationServicesPushController/index.js.map +0 -1
- package/dist/NotificationServicesPushController/services/endpoints.js +0 -8
- package/dist/NotificationServicesPushController/services/endpoints.js.map +0 -1
- package/dist/NotificationServicesPushController/services/push/index.js +0 -1
- package/dist/NotificationServicesPushController/services/push/index.js.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.js +0 -40
- package/dist/NotificationServicesPushController/services/push/push-web.js.map +0 -1
- package/dist/NotificationServicesPushController/services/services.js +0 -46
- package/dist/NotificationServicesPushController/services/services.js.map +0 -1
- package/dist/NotificationServicesPushController/types/firebase.js +0 -2
- package/dist/NotificationServicesPushController/types/firebase.js.map +0 -1
- package/dist/NotificationServicesPushController/types/index.js +0 -3
- package/dist/NotificationServicesPushController/types/index.js.map +0 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.js +0 -14
- package/dist/NotificationServicesPushController/utils/get-notification-data.js.map +0 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.js +0 -39
- package/dist/NotificationServicesPushController/utils/get-notification-message.js.map +0 -1
- package/dist/NotificationServicesPushController/utils/index.js +0 -49
- package/dist/NotificationServicesPushController/utils/index.js.map +0 -1
- package/dist/chunk-232HZSEV.js +0 -7
- package/dist/chunk-232HZSEV.js.map +0 -1
- package/dist/chunk-2P5WP5NT.mjs +0 -37
- package/dist/chunk-2P5WP5NT.mjs.map +0 -1
- package/dist/chunk-3ZS2HAEG.js +0 -1
- package/dist/chunk-3ZS2HAEG.js.map +0 -1
- package/dist/chunk-4BTNTREI.mjs +0 -1
- package/dist/chunk-4BTNTREI.mjs.map +0 -1
- package/dist/chunk-4QXAPVW3.mjs +0 -1
- package/dist/chunk-4QXAPVW3.mjs.map +0 -1
- package/dist/chunk-52CALMRA.js +0 -28
- package/dist/chunk-53F3SYYM.mjs +0 -178
- package/dist/chunk-53F3SYYM.mjs.map +0 -1
- package/dist/chunk-5FAAZCBK.mjs +0 -29
- package/dist/chunk-5FAAZCBK.mjs.map +0 -1
- package/dist/chunk-6FLC6CJD.js +0 -149
- package/dist/chunk-6FLC6CJD.js.map +0 -1
- package/dist/chunk-6ZDVTRRT.mjs +0 -9
- package/dist/chunk-6ZDVTRRT.mjs.map +0 -1
- package/dist/chunk-77QIITUL.mjs +0 -67
- package/dist/chunk-77QIITUL.mjs.map +0 -1
- package/dist/chunk-7LWR54U7.js +0 -7
- package/dist/chunk-7LWR54U7.js.map +0 -1
- package/dist/chunk-7PWKQSM2.mjs +0 -972
- package/dist/chunk-7PWKQSM2.mjs.map +0 -1
- package/dist/chunk-7RM3YNTD.mjs +0 -1
- package/dist/chunk-7RM3YNTD.mjs.map +0 -1
- package/dist/chunk-A2RPVX47.mjs +0 -1
- package/dist/chunk-A2RPVX47.mjs.map +0 -1
- package/dist/chunk-B25TJ7KS.js +0 -8
- package/dist/chunk-B25TJ7KS.js.map +0 -1
- package/dist/chunk-B4ECJJ5C.mjs +0 -7
- package/dist/chunk-B4ECJJ5C.mjs.map +0 -1
- package/dist/chunk-BONB66A2.mjs +0 -14
- package/dist/chunk-BONB66A2.mjs.map +0 -1
- package/dist/chunk-C62SK2KY.mjs +0 -92
- package/dist/chunk-C62SK2KY.mjs.map +0 -1
- package/dist/chunk-CGPMMFUQ.mjs +0 -96
- package/dist/chunk-CGPMMFUQ.mjs.map +0 -1
- package/dist/chunk-CWZQMK63.mjs +0 -118
- package/dist/chunk-CWZQMK63.mjs.map +0 -1
- package/dist/chunk-D42BBXBM.mjs +0 -28
- package/dist/chunk-D42BBXBM.mjs.map +0 -1
- package/dist/chunk-DINCLRZT.mjs +0 -12
- package/dist/chunk-DINCLRZT.mjs.map +0 -1
- package/dist/chunk-DMH4NSLF.js +0 -1
- package/dist/chunk-DMH4NSLF.js.map +0 -1
- package/dist/chunk-DT6SLUWJ.js +0 -12
- package/dist/chunk-DT6SLUWJ.js.map +0 -1
- package/dist/chunk-EJ52BDLB.js +0 -55
- package/dist/chunk-EJ52BDLB.js.map +0 -1
- package/dist/chunk-ER475D6V.mjs +0 -231
- package/dist/chunk-ER475D6V.mjs.map +0 -1
- package/dist/chunk-G52DNXFH.mjs +0 -1
- package/dist/chunk-G52DNXFH.mjs.map +0 -1
- package/dist/chunk-GETQWOTI.js +0 -1
- package/dist/chunk-GETQWOTI.js.map +0 -1
- package/dist/chunk-HCDICNYK.js +0 -207
- package/dist/chunk-HCDICNYK.js.map +0 -1
- package/dist/chunk-HE3P5RM7.js +0 -178
- package/dist/chunk-HE3P5RM7.js.map +0 -1
- package/dist/chunk-HPUQYDVC.js +0 -1
- package/dist/chunk-HPUQYDVC.js.map +0 -1
- package/dist/chunk-HT6T5R4U.js +0 -96
- package/dist/chunk-HT6T5R4U.js.map +0 -1
- package/dist/chunk-IDO4JFV5.mjs +0 -1
- package/dist/chunk-IDO4JFV5.mjs.map +0 -1
- package/dist/chunk-IGY2S5BC.js +0 -36
- package/dist/chunk-IGY2S5BC.js.map +0 -1
- package/dist/chunk-IKWNHNJQ.mjs +0 -8
- package/dist/chunk-IKWNHNJQ.mjs.map +0 -1
- package/dist/chunk-IOMDG67D.mjs +0 -7
- package/dist/chunk-IOMDG67D.mjs.map +0 -1
- package/dist/chunk-IPI7BAW3.js +0 -1
- package/dist/chunk-IPI7BAW3.js.map +0 -1
- package/dist/chunk-JIJXHO5V.js +0 -885
- package/dist/chunk-JIJXHO5V.js.map +0 -1
- package/dist/chunk-JQ7WKFCI.mjs +0 -1
- package/dist/chunk-JQ7WKFCI.mjs.map +0 -1
- package/dist/chunk-JW3TK3NU.js +0 -221
- package/dist/chunk-JW3TK3NU.js.map +0 -1
- package/dist/chunk-KGLHGLER.js +0 -231
- package/dist/chunk-KGLHGLER.js.map +0 -1
- package/dist/chunk-LGXHJ24K.js +0 -92
- package/dist/chunk-LGXHJ24K.js.map +0 -1
- package/dist/chunk-LYEXYTOI.js +0 -14
- package/dist/chunk-LYEXYTOI.js.map +0 -1
- package/dist/chunk-LZMC2QML.mjs +0 -25
- package/dist/chunk-LZMC2QML.mjs.map +0 -1
- package/dist/chunk-MG5QDUDI.mjs +0 -48
- package/dist/chunk-MG5QDUDI.mjs.map +0 -1
- package/dist/chunk-MNBV5FJI.mjs +0 -31
- package/dist/chunk-MNBV5FJI.mjs.map +0 -1
- package/dist/chunk-NIPCK74T.js +0 -185
- package/dist/chunk-NIPCK74T.js.map +0 -1
- package/dist/chunk-O45HYLIV.js +0 -67
- package/dist/chunk-O45HYLIV.js.map +0 -1
- package/dist/chunk-ODI2BTKS.mjs +0 -55
- package/dist/chunk-ODI2BTKS.mjs.map +0 -1
- package/dist/chunk-OHFX4S6R.mjs +0 -185
- package/dist/chunk-OHFX4S6R.mjs.map +0 -1
- package/dist/chunk-OMBFVTP2.js +0 -37
- package/dist/chunk-OMBFVTP2.js.map +0 -1
- package/dist/chunk-PJMQ2XEG.js +0 -29
- package/dist/chunk-PJMQ2XEG.js.map +0 -1
- package/dist/chunk-PNCS6GEX.mjs +0 -1
- package/dist/chunk-PNCS6GEX.mjs.map +0 -1
- package/dist/chunk-PROWNV4M.js +0 -1
- package/dist/chunk-PROWNV4M.js.map +0 -1
- package/dist/chunk-QAOZN4AX.js +0 -25
- package/dist/chunk-QAOZN4AX.js.map +0 -1
- package/dist/chunk-QB5IFRLA.mjs +0 -1
- package/dist/chunk-QB5IFRLA.mjs.map +0 -1
- package/dist/chunk-RAUV5UV4.mjs +0 -1
- package/dist/chunk-RAUV5UV4.mjs.map +0 -1
- package/dist/chunk-SGLVWM4N.js +0 -48
- package/dist/chunk-SGLVWM4N.js.map +0 -1
- package/dist/chunk-TLX5QQK5.js +0 -9
- package/dist/chunk-TLX5QQK5.js.map +0 -1
- package/dist/chunk-U5UIDVOO.mjs +0 -36
- package/dist/chunk-U5UIDVOO.mjs.map +0 -1
- package/dist/chunk-U74Q3BRP.mjs +0 -1
- package/dist/chunk-U74Q3BRP.mjs.map +0 -1
- package/dist/chunk-UQ6MTYIR.js +0 -972
- package/dist/chunk-UQ6MTYIR.js.map +0 -1
- package/dist/chunk-UZHUVXRM.js +0 -31
- package/dist/chunk-UZHUVXRM.js.map +0 -1
- package/dist/chunk-V5HMYDWE.js +0 -1
- package/dist/chunk-V5HMYDWE.js.map +0 -1
- package/dist/chunk-VZMQIJMK.mjs +0 -149
- package/dist/chunk-VZMQIJMK.mjs.map +0 -1
- package/dist/chunk-W7IP4LDB.js +0 -118
- package/dist/chunk-W7IP4LDB.js.map +0 -1
- package/dist/chunk-WE4RFGT7.mjs +0 -885
- package/dist/chunk-WE4RFGT7.mjs.map +0 -1
- package/dist/chunk-WGBEAP2F.mjs +0 -207
- package/dist/chunk-WGBEAP2F.mjs.map +0 -1
- package/dist/chunk-WRYFIWNK.js +0 -1
- package/dist/chunk-WRYFIWNK.js.map +0 -1
- package/dist/chunk-XZEVRYUE.js +0 -1
- package/dist/chunk-XZEVRYUE.js.map +0 -1
- package/dist/chunk-YUMIJSUD.mjs +0 -221
- package/dist/chunk-YUMIJSUD.mjs.map +0 -1
- package/dist/chunk-ZBNBZN5H.js +0 -1
- package/dist/chunk-ZBNBZN5H.js.map +0 -1
- package/dist/chunk-ZV3DFBO4.js +0 -1
- package/dist/chunk-ZV3DFBO4.js.map +0 -1
- package/dist/index.js +0 -46
- package/dist/index.js.map +0 -1
- package/dist/shared/to-raw-notification.js +0 -8
- package/dist/shared/to-raw-notification.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/types/NotificationServicesController/NotificationServicesController.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/index.d.ts +0 -6
- package/dist/types/NotificationServicesController/__fixtures__/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mock-feature-announcements.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mock-notification-trigger.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mock-raw-notifications.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mockResponses.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/mockServices.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/test-utils.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/constants/constants.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/constants/index.d.ts +0 -3
- package/dist/types/NotificationServicesController/constants/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/constants/notification-schema.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/index.d.ts +0 -14
- package/dist/types/NotificationServicesController/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/processors/index.d.ts +0 -4
- package/dist/types/NotificationServicesController/processors/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/processors/process-feature-announcement.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/processors/process-notifications.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/processors/process-onchain-notifications.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/services/feature-announcements.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/services/onchain-notifications.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/feature-announcement/index.d.ts +0 -4
- package/dist/types/NotificationServicesController/types/feature-announcement/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/feature-announcement/type-links.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/index.d.ts +0 -5
- package/dist/types/NotificationServicesController/types/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/notification/index.d.ts +0 -2
- package/dist/types/NotificationServicesController/types/notification/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/notification/notification.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/on-chain-notification/index.d.ts +0 -2
- package/dist/types/NotificationServicesController/types/on-chain-notification/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/on-chain-notification/schema.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/type-utils.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/user-storage/index.d.ts +0 -2
- package/dist/types/NotificationServicesController/types/user-storage/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/types/user-storage/user-storage.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/ui/constants.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/ui/index.d.ts +0 -2
- package/dist/types/NotificationServicesController/ui/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesController/utils/utils.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/NotificationServicesPushController.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/__fixtures__/index.d.ts +0 -2
- package/dist/types/NotificationServicesPushController/__fixtures__/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/__fixtures__/mockResponse.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/__fixtures__/mockServices.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/constants.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/index.d.ts +0 -11
- package/dist/types/NotificationServicesPushController/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/services/endpoints.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/services/push/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/services/push/push-web.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/services/services.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/types/firebase.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/types/index.d.ts +0 -2
- package/dist/types/NotificationServicesPushController/types/index.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/utils/get-notification-data.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/utils/get-notification-message.d.ts.map +0 -1
- package/dist/types/NotificationServicesPushController/utils/index.d.ts +0 -3
- package/dist/types/NotificationServicesPushController/utils/index.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -3
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/shared/to-raw-notification.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockServices.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesPushController/__fixtures__/mockServices.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,KAAI,aAAa;;AAExB,OAAO,EACL,4CAA4C,EAC5C,0CAA0C,EAC3C,2BAAuB;AAOxB,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,SAAqB,EAAE,EAAE;IAC5E,MAAM,YAAY,GAAG,4CAA4C,EAAE,CAAC;IACpE,MAAM,KAAK,GAAG,SAAS,IAAI;QACzB,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,YAAY,CAAC,QAAQ;KAC5B,CAAC;IAEF,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC;SACxC,GAAG,CAAC,EAAE,CAAC;SACP,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IAEnC,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,CACrD,SAAqB,EACrB,EAAE;IACF,MAAM,YAAY,GAAG,0CAA0C,EAAE,CAAC;IAClE,MAAM,KAAK,GAAG,SAAS,IAAI;QACzB,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,YAAY,CAAC,QAAQ;KAC5B,CAAC;IAEF,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzE,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC","sourcesContent":["import nock from 'nock';\n\nimport {\n getMockRetrievePushNotificationLinksResponse,\n getMockUpdatePushNotificationLinksResponse,\n} from './mockResponse';\n\ntype MockReply = {\n status: nock.StatusCode;\n body?: nock.Body;\n};\n\nexport const mockEndpointGetPushNotificationLinks = (mockReply?: MockReply) => {\n const mockResponse = getMockRetrievePushNotificationLinksResponse();\n const reply = mockReply ?? {\n status: 200,\n body: mockResponse.response,\n };\n\n const mockEndpoint = nock(mockResponse.url)\n .get('')\n .reply(reply.status, reply.body);\n\n return mockEndpoint;\n};\n\nexport const mockEndpointUpdatePushNotificationLinks = (\n mockReply?: MockReply,\n) => {\n const mockResponse = getMockUpdatePushNotificationLinksResponse();\n const reply = mockReply ?? {\n status: 200,\n body: mockResponse.response,\n };\n\n const mockEndpoint = nock(mockResponse.url).post('').reply(reply.status);\n\n return mockEndpoint;\n};\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VAPID_KEY = exports.FIREBASE_MEASUREMENT_ID = exports.FIREBASE_APP_ID = exports.FIREBASE_MESSAGING_SENDER_ID = exports.FIREBASE_PROJECT_ID = exports.FIREBASE_STORAGE_BUCKET = exports.FIREBASE_AUTH_DOMAIN = exports.FIREBASE_API_KEY = exports.PUSH_NOTIFICATIONS_SERVICE_URL = exports.ENABLE_MV3 = void 0;
|
|
4
|
+
exports.ENABLE_MV3 = true;
|
|
5
|
+
exports.PUSH_NOTIFICATIONS_SERVICE_URL = 'https://push.api.cx.metamask.io';
|
|
6
|
+
exports.FIREBASE_API_KEY = '';
|
|
7
|
+
exports.FIREBASE_AUTH_DOMAIN = '';
|
|
8
|
+
exports.FIREBASE_STORAGE_BUCKET = '';
|
|
9
|
+
exports.FIREBASE_PROJECT_ID = '';
|
|
10
|
+
exports.FIREBASE_MESSAGING_SENDER_ID = '';
|
|
11
|
+
exports.FIREBASE_APP_ID = '';
|
|
12
|
+
exports.FIREBASE_MEASUREMENT_ID = '';
|
|
13
|
+
exports.VAPID_KEY = '';
|
|
14
|
+
//# sourceMappingURL=constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../src/NotificationServicesPushController/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,UAAU,GAAG,IAAI,CAAC;AAClB,QAAA,8BAA8B,GAAG,iCAAiC,CAAC;AAEnE,QAAA,gBAAgB,GAAG,EAAE,CAAC;AACtB,QAAA,oBAAoB,GAAG,EAAE,CAAC;AAC1B,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAC7B,QAAA,mBAAmB,GAAG,EAAE,CAAC;AACzB,QAAA,4BAA4B,GAAG,EAAE,CAAC;AAClC,QAAA,eAAe,GAAG,EAAE,CAAC;AACrB,QAAA,uBAAuB,GAAG,EAAE,CAAC;AAC7B,QAAA,SAAS,GAAG,EAAE,CAAC","sourcesContent":["export const ENABLE_MV3 = true;\nexport const PUSH_NOTIFICATIONS_SERVICE_URL = 'https://push.api.cx.metamask.io';\n\nexport const FIREBASE_API_KEY = '';\nexport const FIREBASE_AUTH_DOMAIN = '';\nexport const FIREBASE_STORAGE_BUCKET = '';\nexport const FIREBASE_PROJECT_ID = '';\nexport const FIREBASE_MESSAGING_SENDER_ID = '';\nexport const FIREBASE_APP_ID = '';\nexport const FIREBASE_MEASUREMENT_ID = '';\nexport const VAPID_KEY = '';\n"]}
|
|
@@ -8,4 +8,4 @@ export declare const FIREBASE_MESSAGING_SENDER_ID = "";
|
|
|
8
8
|
export declare const FIREBASE_APP_ID = "";
|
|
9
9
|
export declare const FIREBASE_MEASUREMENT_ID = "";
|
|
10
10
|
export declare const VAPID_KEY = "";
|
|
11
|
-
//# sourceMappingURL=constants.d.
|
|
11
|
+
//# sourceMappingURL=constants.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../src/NotificationServicesPushController/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,eAAO,MAAM,8BAA8B,oCAAoC,CAAC;AAEhF,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAC/C,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,SAAS,KAAK,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ENABLE_MV3 = true;
|
|
2
|
+
export declare const PUSH_NOTIFICATIONS_SERVICE_URL = "https://push.api.cx.metamask.io";
|
|
3
|
+
export declare const FIREBASE_API_KEY = "";
|
|
4
|
+
export declare const FIREBASE_AUTH_DOMAIN = "";
|
|
5
|
+
export declare const FIREBASE_STORAGE_BUCKET = "";
|
|
6
|
+
export declare const FIREBASE_PROJECT_ID = "";
|
|
7
|
+
export declare const FIREBASE_MESSAGING_SENDER_ID = "";
|
|
8
|
+
export declare const FIREBASE_APP_ID = "";
|
|
9
|
+
export declare const FIREBASE_MEASUREMENT_ID = "";
|
|
10
|
+
export declare const VAPID_KEY = "";
|
|
11
|
+
//# sourceMappingURL=constants.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../src/NotificationServicesPushController/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU,OAAO,CAAC;AAC/B,eAAO,MAAM,8BAA8B,oCAAoC,CAAC;AAEhF,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAC/C,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,SAAS,KAAK,CAAC"}
|
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var FIREBASE_APP_ID = "";
|
|
12
|
-
var FIREBASE_MEASUREMENT_ID = "";
|
|
13
|
-
var VAPID_KEY = "";
|
|
14
|
-
export {
|
|
15
|
-
ENABLE_MV3,
|
|
16
|
-
FIREBASE_API_KEY,
|
|
17
|
-
FIREBASE_APP_ID,
|
|
18
|
-
FIREBASE_AUTH_DOMAIN,
|
|
19
|
-
FIREBASE_MEASUREMENT_ID,
|
|
20
|
-
FIREBASE_MESSAGING_SENDER_ID,
|
|
21
|
-
FIREBASE_PROJECT_ID,
|
|
22
|
-
FIREBASE_STORAGE_BUCKET,
|
|
23
|
-
PUSH_NOTIFICATIONS_SERVICE_URL,
|
|
24
|
-
VAPID_KEY
|
|
25
|
-
};
|
|
1
|
+
export const ENABLE_MV3 = true;
|
|
2
|
+
export const PUSH_NOTIFICATIONS_SERVICE_URL = 'https://push.api.cx.metamask.io';
|
|
3
|
+
export const FIREBASE_API_KEY = '';
|
|
4
|
+
export const FIREBASE_AUTH_DOMAIN = '';
|
|
5
|
+
export const FIREBASE_STORAGE_BUCKET = '';
|
|
6
|
+
export const FIREBASE_PROJECT_ID = '';
|
|
7
|
+
export const FIREBASE_MESSAGING_SENDER_ID = '';
|
|
8
|
+
export const FIREBASE_APP_ID = '';
|
|
9
|
+
export const FIREBASE_MEASUREMENT_ID = '';
|
|
10
|
+
export const VAPID_KEY = '';
|
|
26
11
|
//# sourceMappingURL=constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/NotificationServicesPushController/constants.ts"],"sourcesContent":["export const ENABLE_MV3 = true;\nexport const PUSH_NOTIFICATIONS_SERVICE_URL = 'https://push.api.cx.metamask.io';\n\nexport const FIREBASE_API_KEY = '';\nexport const FIREBASE_AUTH_DOMAIN = '';\nexport const FIREBASE_STORAGE_BUCKET = '';\nexport const FIREBASE_PROJECT_ID = '';\nexport const FIREBASE_MESSAGING_SENDER_ID = '';\nexport const FIREBASE_APP_ID = '';\nexport const FIREBASE_MEASUREMENT_ID = '';\nexport const VAPID_KEY = '';\n"]
|
|
1
|
+
{"version":3,"file":"constants.mjs","sourceRoot":"","sources":["../../src/NotificationServicesPushController/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAC/B,MAAM,CAAC,MAAM,8BAA8B,GAAG,iCAAiC,CAAC;AAEhF,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AACtC,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAC/C,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC;AAClC,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAC1C,MAAM,CAAC,MAAM,SAAS,GAAG,EAAE,CAAC","sourcesContent":["export const ENABLE_MV3 = true;\nexport const PUSH_NOTIFICATIONS_SERVICE_URL = 'https://push.api.cx.metamask.io';\n\nexport const FIREBASE_API_KEY = '';\nexport const FIREBASE_AUTH_DOMAIN = '';\nexport const FIREBASE_STORAGE_BUCKET = '';\nexport const FIREBASE_PROJECT_ID = '';\nexport const FIREBASE_MESSAGING_SENDER_ID = '';\nexport const FIREBASE_APP_ID = '';\nexport const FIREBASE_MEASUREMENT_ID = '';\nexport const VAPID_KEY = '';\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.Mocks = exports.Utils = exports.Types = exports.Controller = void 0;
|
|
33
|
+
const NotificationServicesPushController_1 = __importDefault(require("./NotificationServicesPushController.cjs"));
|
|
34
|
+
exports.Controller = NotificationServicesPushController_1.default;
|
|
35
|
+
const NotificationServicesPushController = NotificationServicesPushController_1.default;
|
|
36
|
+
exports.default = NotificationServicesPushController;
|
|
37
|
+
__exportStar(require("./NotificationServicesPushController.cjs"), exports);
|
|
38
|
+
exports.Types = __importStar(require("./types/index.cjs"));
|
|
39
|
+
__exportStar(require("./types/index.cjs"), exports);
|
|
40
|
+
exports.Utils = __importStar(require("./utils/index.cjs"));
|
|
41
|
+
__exportStar(require("./utils/index.cjs"), exports);
|
|
42
|
+
exports.Mocks = __importStar(require("./__fixtures__/index.cjs"));
|
|
43
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/NotificationServicesPushController/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kHAA8D;AAGrD,qBAHF,4CAAU,CAGE;AADnB,MAAM,kCAAkC,GAAG,4CAAU,CAAC;AAEtD,kBAAe,kCAAkC,CAAC;AAClD,2EAAqD;AACrD,2DAAiC;AACjC,oDAAwB;AACxB,2DAAiC;AACjC,oDAAwB;AACxB,kEAAwC","sourcesContent":["import Controller from './NotificationServicesPushController';\n\nconst NotificationServicesPushController = Controller;\nexport { Controller };\nexport default NotificationServicesPushController;\nexport * from './NotificationServicesPushController';\nexport * as Types from './types';\nexport * from './types';\nexport * as Utils from './utils';\nexport * from './utils';\nexport * as Mocks from './__fixtures__';\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Controller from "./NotificationServicesPushController.cjs";
|
|
2
|
+
declare const NotificationServicesPushController: typeof Controller;
|
|
3
|
+
export { Controller };
|
|
4
|
+
export default NotificationServicesPushController;
|
|
5
|
+
export * from "./NotificationServicesPushController.cjs";
|
|
6
|
+
export * as Types from "./types/index.cjs";
|
|
7
|
+
export * from "./types/index.cjs";
|
|
8
|
+
export * as Utils from "./utils/index.cjs";
|
|
9
|
+
export * from "./utils/index.cjs";
|
|
10
|
+
export * as Mocks from "./__fixtures__/index.cjs";
|
|
11
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/NotificationServicesPushController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,iDAA6C;AAE9D,QAAA,MAAM,kCAAkC,mBAAa,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,kCAAkC,CAAC;AAClD,yDAAqD;AACrD,OAAO,KAAK,KAAK,0BAAgB;AACjC,kCAAwB;AACxB,OAAO,KAAK,KAAK,0BAAgB;AACjC,kCAAwB;AACxB,OAAO,KAAK,KAAK,iCAAuB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Controller from "./NotificationServicesPushController.mjs";
|
|
2
|
+
declare const NotificationServicesPushController: typeof Controller;
|
|
3
|
+
export { Controller };
|
|
4
|
+
export default NotificationServicesPushController;
|
|
5
|
+
export * from "./NotificationServicesPushController.mjs";
|
|
6
|
+
export * as Types from "./types/index.mjs";
|
|
7
|
+
export * from "./types/index.mjs";
|
|
8
|
+
export * as Utils from "./utils/index.mjs";
|
|
9
|
+
export * from "./utils/index.mjs";
|
|
10
|
+
export * as Mocks from "./__fixtures__/index.mjs";
|
|
11
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/NotificationServicesPushController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,iDAA6C;AAE9D,QAAA,MAAM,kCAAkC,mBAAa,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,kCAAkC,CAAC;AAClD,yDAAqD;AACrD,OAAO,KAAK,KAAK,0BAAgB;AACjC,kCAAwB;AACxB,OAAO,KAAK,KAAK,0BAAgB;AACjC,kCAAwB;AACxB,OAAO,KAAK,KAAK,iCAAuB"}
|
|
@@ -1,72 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
createOnChainPushNotificationMessage,
|
|
13
|
-
createOnChainPushNotificationMessages,
|
|
14
|
-
isOnChainNotification
|
|
15
|
-
} from "../chunk-WGBEAP2F.mjs";
|
|
16
|
-
import {
|
|
17
|
-
calcTokenAmount,
|
|
18
|
-
formatAmount,
|
|
19
|
-
getAmount,
|
|
20
|
-
getLeadingZeroCount
|
|
21
|
-
} from "../chunk-ODI2BTKS.mjs";
|
|
22
|
-
import "../chunk-RAUV5UV4.mjs";
|
|
23
|
-
import {
|
|
24
|
-
NotificationServicesPushController,
|
|
25
|
-
defaultState
|
|
26
|
-
} from "../chunk-ER475D6V.mjs";
|
|
27
|
-
import "../chunk-VZMQIJMK.mjs";
|
|
28
|
-
import "../chunk-CGPMMFUQ.mjs";
|
|
29
|
-
import "../chunk-IKWNHNJQ.mjs";
|
|
30
|
-
import "../chunk-7PWKQSM2.mjs";
|
|
31
|
-
import "../chunk-B4ECJJ5C.mjs";
|
|
32
|
-
import "../chunk-U74Q3BRP.mjs";
|
|
33
|
-
import "../chunk-G52DNXFH.mjs";
|
|
34
|
-
import "../chunk-7RM3YNTD.mjs";
|
|
35
|
-
import "../chunk-PNCS6GEX.mjs";
|
|
36
|
-
import "../chunk-4QXAPVW3.mjs";
|
|
37
|
-
import "../chunk-JQ7WKFCI.mjs";
|
|
38
|
-
import "../chunk-IDO4JFV5.mjs";
|
|
39
|
-
import "../chunk-A2RPVX47.mjs";
|
|
40
|
-
import "../chunk-4BTNTREI.mjs";
|
|
41
|
-
import "../chunk-QB5IFRLA.mjs";
|
|
42
|
-
import "../chunk-LZMC2QML.mjs";
|
|
43
|
-
import "../chunk-77QIITUL.mjs";
|
|
44
|
-
import "../chunk-2P5WP5NT.mjs";
|
|
45
|
-
import "../chunk-5FAAZCBK.mjs";
|
|
46
|
-
import "../chunk-WE4RFGT7.mjs";
|
|
47
|
-
import "../chunk-MG5QDUDI.mjs";
|
|
48
|
-
import "../chunk-BONB66A2.mjs";
|
|
49
|
-
import "../chunk-C62SK2KY.mjs";
|
|
50
|
-
import "../chunk-D42BBXBM.mjs";
|
|
51
|
-
import "../chunk-OHFX4S6R.mjs";
|
|
52
|
-
import "../chunk-YUMIJSUD.mjs";
|
|
53
|
-
import "../chunk-53F3SYYM.mjs";
|
|
54
|
-
import "../chunk-DINCLRZT.mjs";
|
|
55
|
-
import "../chunk-6ZDVTRRT.mjs";
|
|
56
|
-
import "../chunk-U5UIDVOO.mjs";
|
|
57
|
-
export {
|
|
58
|
-
NotificationServicesPushController as Controller,
|
|
59
|
-
fixtures_exports as Mocks,
|
|
60
|
-
types_exports as Types,
|
|
61
|
-
utils_exports as Utils,
|
|
62
|
-
calcTokenAmount,
|
|
63
|
-
createOnChainPushNotificationMessage,
|
|
64
|
-
createOnChainPushNotificationMessages,
|
|
65
|
-
NotificationServicesPushController_default as default,
|
|
66
|
-
defaultState,
|
|
67
|
-
formatAmount,
|
|
68
|
-
getAmount,
|
|
69
|
-
getLeadingZeroCount,
|
|
70
|
-
isOnChainNotification
|
|
71
|
-
};
|
|
1
|
+
import Controller from "./NotificationServicesPushController.mjs";
|
|
2
|
+
const NotificationServicesPushController = Controller;
|
|
3
|
+
export { Controller };
|
|
4
|
+
export default NotificationServicesPushController;
|
|
5
|
+
export * from "./NotificationServicesPushController.mjs";
|
|
6
|
+
export * as Types from "./types/index.mjs";
|
|
7
|
+
export * from "./types/index.mjs";
|
|
8
|
+
export * as Utils from "./utils/index.mjs";
|
|
9
|
+
export * from "./utils/index.mjs";
|
|
10
|
+
export * as Mocks from "./__fixtures__/index.mjs";
|
|
72
11
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/NotificationServicesPushController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,iDAA6C;AAE9D,MAAM,kCAAkC,GAAG,UAAU,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,kCAAkC,CAAC;AAClD,yDAAqD;AACrD,OAAO,KAAK,KAAK,0BAAgB;AACjC,kCAAwB;AACxB,OAAO,KAAK,KAAK,0BAAgB;AACjC,kCAAwB;AACxB,OAAO,KAAK,KAAK,iCAAuB","sourcesContent":["import Controller from './NotificationServicesPushController';\n\nconst NotificationServicesPushController = Controller;\nexport { Controller };\nexport default NotificationServicesPushController;\nexport * from './NotificationServicesPushController';\nexport * as Types from './types';\nexport * from './types';\nexport * as Utils from './utils';\nexport * from './utils';\nexport * as Mocks from './__fixtures__';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REGISTRATION_TOKENS_ENDPOINT = void 0;
|
|
4
|
+
const url = 'https://push.api.cx.metamask.io';
|
|
5
|
+
exports.REGISTRATION_TOKENS_ENDPOINT = `${url}/v1/link`;
|
|
6
|
+
//# sourceMappingURL=endpoints.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesPushController/services/endpoints.ts"],"names":[],"mappings":";;;AAAA,MAAM,GAAG,GAAG,iCAAiC,CAAC;AACjC,QAAA,4BAA4B,GAAG,GAAG,GAAG,UAAU,CAAC","sourcesContent":["const url = 'https://push.api.cx.metamask.io';\nexport const REGISTRATION_TOKENS_ENDPOINT = `${url}/v1/link`;\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const REGISTRATION_TOKENS_ENDPOINT = "https://push.api.cx.metamask.io/v1/link";
|
|
2
|
-
//# sourceMappingURL=endpoints.d.
|
|
2
|
+
//# sourceMappingURL=endpoints.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesPushController/services/endpoints.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,4BAA4B,4CAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesPushController/services/endpoints.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,4BAA4B,4CAAmB,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} from "../../chunk-IKWNHNJQ.mjs";
|
|
4
|
-
import "../../chunk-U5UIDVOO.mjs";
|
|
5
|
-
export {
|
|
6
|
-
REGISTRATION_TOKENS_ENDPOINT
|
|
7
|
-
};
|
|
1
|
+
const url = 'https://push.api.cx.metamask.io';
|
|
2
|
+
export const REGISTRATION_TOKENS_ENDPOINT = `${url}/v1/link`;
|
|
8
3
|
//# sourceMappingURL=endpoints.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"
|
|
1
|
+
{"version":3,"file":"endpoints.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesPushController/services/endpoints.ts"],"names":[],"mappings":"AAAA,MAAM,GAAG,GAAG,iCAAiC,CAAC;AAC9C,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,GAAG,UAAU,CAAC","sourcesContent":["const url = 'https://push.api.cx.metamask.io';\nexport const REGISTRATION_TOKENS_ENDPOINT = `${url}/v1/link`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/services/push/index.ts"],"names":[],"mappings":"","sourcesContent":["import type * as Web from './push-web';\n\nexport type CreateRegToken = typeof Web.createRegToken;\nexport type DeleteRegToken = typeof Web.deleteRegToken;\nexport type ListenToPushNotificationsReceived =\n typeof Web.listenToPushNotificationsReceived;\nexport type ListenToPushNotificationsClicked =\n typeof Web.listenToPushNotificationsClicked;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type * as Web from
|
|
1
|
+
import type * as Web from "./push-web.cjs";
|
|
2
2
|
export type CreateRegToken = typeof Web.createRegToken;
|
|
3
3
|
export type DeleteRegToken = typeof Web.deleteRegToken;
|
|
4
4
|
export type ListenToPushNotificationsReceived = typeof Web.listenToPushNotificationsReceived;
|
|
5
5
|
export type ListenToPushNotificationsClicked = typeof Web.listenToPushNotificationsClicked;
|
|
6
|
-
//# sourceMappingURL=index.d.
|
|
6
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/services/push/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,uBAAmB;AAEvC,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,CAAC,cAAc,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,CAAC,cAAc,CAAC;AACvD,MAAM,MAAM,iCAAiC,GAC3C,OAAO,GAAG,CAAC,iCAAiC,CAAC;AAC/C,MAAM,MAAM,gCAAgC,GAC1C,OAAO,GAAG,CAAC,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as Web from "./push-web.mjs";
|
|
2
|
+
export type CreateRegToken = typeof Web.createRegToken;
|
|
3
|
+
export type DeleteRegToken = typeof Web.deleteRegToken;
|
|
4
|
+
export type ListenToPushNotificationsReceived = typeof Web.listenToPushNotificationsReceived;
|
|
5
|
+
export type ListenToPushNotificationsClicked = typeof Web.listenToPushNotificationsClicked;
|
|
6
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/services/push/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,GAAG,uBAAmB;AAEvC,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,CAAC,cAAc,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,CAAC,cAAc,CAAC;AACvD,MAAM,MAAM,iCAAiC,GAC3C,OAAO,GAAG,CAAC,iCAAiC,CAAC;AAC/C,MAAM,MAAM,gCAAgC,GAC1C,OAAO,GAAG,CAAC,gCAAgC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/services/push/index.ts"],"names":[],"mappings":"","sourcesContent":["import type * as Web from './push-web';\n\nexport type CreateRegToken = typeof Web.createRegToken;\nexport type DeleteRegToken = typeof Web.deleteRegToken;\nexport type ListenToPushNotificationsReceived =\n typeof Web.listenToPushNotificationsReceived;\nexport type ListenToPushNotificationsClicked =\n typeof Web.listenToPushNotificationsClicked;\n"]}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.listenToPushNotificationsClicked = exports.listenToPushNotificationsReceived = exports.deleteRegToken = exports.createRegToken = void 0;
|
|
7
|
+
const app_1 = require("firebase/app");
|
|
8
|
+
const messaging_1 = require("firebase/messaging");
|
|
9
|
+
const sw_1 = require("firebase/messaging/sw");
|
|
10
|
+
const loglevel_1 = __importDefault(require("loglevel"));
|
|
11
|
+
const NotificationServicesController_1 = require("../../../NotificationServicesController/index.cjs");
|
|
12
|
+
const to_raw_notification_1 = require("../../../shared/to-raw-notification.cjs");
|
|
13
|
+
const createFirebaseApp = async (env) => {
|
|
14
|
+
try {
|
|
15
|
+
return (0, app_1.getApp)();
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
const firebaseConfig = {
|
|
19
|
+
apiKey: env.apiKey,
|
|
20
|
+
authDomain: env.authDomain,
|
|
21
|
+
storageBucket: env.storageBucket,
|
|
22
|
+
projectId: env.projectId,
|
|
23
|
+
messagingSenderId: env.messagingSenderId,
|
|
24
|
+
appId: env.appId,
|
|
25
|
+
measurementId: env.measurementId,
|
|
26
|
+
};
|
|
27
|
+
return (0, app_1.initializeApp)(firebaseConfig);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const getFirebaseMessaging = async (env) => {
|
|
31
|
+
const app = await createFirebaseApp(env);
|
|
32
|
+
return (0, sw_1.getMessaging)(app);
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Creates a registration token for Firebase Cloud Messaging.
|
|
36
|
+
*
|
|
37
|
+
* @param env - env to configure push notifications
|
|
38
|
+
* @returns A promise that resolves with the registration token or null if an error occurs.
|
|
39
|
+
*/
|
|
40
|
+
async function createRegToken(env) {
|
|
41
|
+
try {
|
|
42
|
+
const messaging = await getFirebaseMessaging(env);
|
|
43
|
+
const token = await (0, messaging_1.getToken)(messaging, {
|
|
44
|
+
serviceWorkerRegistration: self.registration,
|
|
45
|
+
vapidKey: env.vapidKey,
|
|
46
|
+
});
|
|
47
|
+
return token;
|
|
48
|
+
}
|
|
49
|
+
catch {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.createRegToken = createRegToken;
|
|
54
|
+
/**
|
|
55
|
+
* Deletes the Firebase Cloud Messaging registration token.
|
|
56
|
+
*
|
|
57
|
+
* @param env - env to configure push notifications
|
|
58
|
+
* @returns A promise that resolves with true if the token was successfully deleted, false otherwise.
|
|
59
|
+
*/
|
|
60
|
+
async function deleteRegToken(env) {
|
|
61
|
+
try {
|
|
62
|
+
const messaging = await getFirebaseMessaging(env);
|
|
63
|
+
await (0, messaging_1.deleteToken)(messaging);
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.deleteRegToken = deleteRegToken;
|
|
71
|
+
/**
|
|
72
|
+
* Service Worker Listener for when push notifications are received.
|
|
73
|
+
* @param env - push notification environment
|
|
74
|
+
* @param handler - handler to actually showing notification, MUST BE PROVEDED
|
|
75
|
+
* @returns unsubscribe handler
|
|
76
|
+
*/
|
|
77
|
+
async function listenToPushNotificationsReceived(env, handler) {
|
|
78
|
+
const messaging = await getFirebaseMessaging(env);
|
|
79
|
+
const unsubscribePushNotifications = (0, sw_1.onBackgroundMessage)(messaging,
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
81
|
+
async (payload) => {
|
|
82
|
+
try {
|
|
83
|
+
const data = payload?.data?.data ? JSON.parse(payload?.data?.data) : undefined;
|
|
84
|
+
if (!data) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const notificationData = (0, to_raw_notification_1.toRawOnChainNotification)(data);
|
|
88
|
+
const notification = NotificationServicesController_1.Processors.processNotification(notificationData);
|
|
89
|
+
await handler(notification);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
// Do Nothing, cannot parse a bad notification
|
|
93
|
+
loglevel_1.default.error('Unable to send push notification:', {
|
|
94
|
+
notification: payload?.data?.data,
|
|
95
|
+
error,
|
|
96
|
+
});
|
|
97
|
+
throw new Error('Unable to send push notification');
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
const unsubscribe = () => unsubscribePushNotifications();
|
|
101
|
+
return unsubscribe;
|
|
102
|
+
}
|
|
103
|
+
exports.listenToPushNotificationsReceived = listenToPushNotificationsReceived;
|
|
104
|
+
/**
|
|
105
|
+
* Service Worker Listener for when a notification is clicked
|
|
106
|
+
*
|
|
107
|
+
* @param handler - listen to NotificationEvent from the service worker
|
|
108
|
+
* @returns unsubscribe handler
|
|
109
|
+
*/
|
|
110
|
+
function listenToPushNotificationsClicked(handler) {
|
|
111
|
+
const clickHandler = (event) => {
|
|
112
|
+
// Get Data
|
|
113
|
+
const data = event?.notification?.data;
|
|
114
|
+
handler(event, data);
|
|
115
|
+
};
|
|
116
|
+
self.addEventListener('notificationclick', clickHandler);
|
|
117
|
+
const unsubscribe = () => self.removeEventListener('notificationclick', clickHandler);
|
|
118
|
+
return unsubscribe;
|
|
119
|
+
}
|
|
120
|
+
exports.listenToPushNotificationsClicked = listenToPushNotificationsClicked;
|
|
121
|
+
//# sourceMappingURL=push-web.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push-web.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/services/push/push-web.ts"],"names":[],"mappings":";;;;;;AAIA,sCAAqD;AACrD,kDAA2D;AAC3D,8CAA0E;AAE1E,wDAA2B;AAG3B,sGAAqE;AACrE,iFAA+E;AAK/E,MAAM,iBAAiB,GAAG,KAAK,EAC7B,GAAwB,EACF,EAAE;IACxB,IAAI;QACF,OAAO,IAAA,YAAM,GAAE,CAAC;KACjB;IAAC,MAAM;QACN,MAAM,cAAc,GAAG;YACrB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,aAAa,EAAE,GAAG,CAAC,aAAa;YAChC,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,iBAAiB,EAAE,GAAG,CAAC,iBAAiB;YACxC,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,aAAa,EAAE,GAAG,CAAC,aAAa;SACjC,CAAC;QACF,OAAO,IAAA,mBAAa,EAAC,cAAc,CAAC,CAAC;KACtC;AACH,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,KAAK,EAChC,GAAwB,EACJ,EAAE;IACtB,MAAM,GAAG,GAAG,MAAM,iBAAiB,CAAC,GAAG,CAAC,CAAC;IACzC,OAAO,IAAA,iBAAY,EAAC,GAAG,CAAC,CAAC;AAC3B,CAAC,CAAC;AAEF;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAClC,GAAwB;IAExB,IAAI;QACF,MAAM,SAAS,GAAG,MAAM,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAClD,MAAM,KAAK,GAAG,MAAM,IAAA,oBAAQ,EAAC,SAAS,EAAE;YACtC,yBAAyB,EAAE,IAAI,CAAC,YAAY;YAC5C,QAAQ,EAAE,GAAG,CAAC,QAAQ;SACvB,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;KACd;IAAC,MAAM;QACN,OAAO,IAAI,CAAC;KACb;AACH,CAAC;AAbD,wCAaC;AAED;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAClC,GAAwB;IAExB,IAAI;QACF,MAAM,SAAS,GAAG,MAAM,oBAAoB,CAAC,GAAG,CAAC,CAAC;QAClD,MAAM,IAAA,uBAAW,EAAC,SAAS,CAAC,CAAC;QAC7B,OAAO,IAAI,CAAC;KACb;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,KAAK,CAAC;KACd;AACH,CAAC;AAVD,wCAUC;AAED;;;;;GAKG;AACI,KAAK,UAAU,iCAAiC,CACrD,GAAwB,EACxB,OAAoE;IAEpE,MAAM,SAAS,GAAG,MAAM,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,4BAA4B,GAAG,IAAA,wBAAmB,EACtD,SAAS;IACT,kEAAkE;IAClE,KAAK,EAAE,OAAuB,EAAE,EAAE;QAChC,IAAI;YACF,MAAM,IAAI,GACR,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YAEpE,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO;aACR;YAED,MAAM,gBAAgB,GAAG,IAAA,8CAAwB,EAAC,IAAI,CAAC,CAAC;YACxD,MAAM,YAAY,GAAG,2CAAU,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;YACtE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;SAC7B;QAAC,OAAO,KAAK,EAAE;YACd,8CAA8C;YAC9C,kBAAG,CAAC,KAAK,CAAC,mCAAmC,EAAE;gBAC7C,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI;gBACjC,KAAK;aACN,CAAC,CAAC;YACH,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;SACrD;IACH,CAAC,CACF,CAAC;IAEF,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,4BAA4B,EAAE,CAAC;IACzD,OAAO,WAAW,CAAC;AACrB,CAAC;AAjCD,8EAiCC;AAED;;;;;GAKG;AACH,SAAgB,gCAAgC,CAC9C,OAA2E;IAE3E,MAAM,YAAY,GAAG,CAAC,KAAwB,EAAE,EAAE;QAChD,WAAW;QACX,MAAM,IAAI,GAAwB,KAAK,EAAE,YAAY,EAAE,IAAI,CAAC;QAC5D,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACvB,CAAC,CAAC;IAEF,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;IACzD,MAAM,WAAW,GAAG,GAAG,EAAE,CACvB,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,EAAE,YAAY,CAAC,CAAC;IAC9D,OAAO,WAAW,CAAC;AACrB,CAAC;AAbD,4EAaC","sourcesContent":["// We are defining that this file uses a webworker global scope.\n// eslint-disable-next-line spaced-comment\n/// <reference lib=\"webworker\" />\nimport type { FirebaseApp } from 'firebase/app';\nimport { getApp, initializeApp } from 'firebase/app';\nimport { getToken, deleteToken } from 'firebase/messaging';\nimport { getMessaging, onBackgroundMessage } from 'firebase/messaging/sw';\nimport type { Messaging, MessagePayload } from 'firebase/messaging/sw';\nimport log from 'loglevel';\n\nimport type { Types } from '../../../NotificationServicesController';\nimport { Processors } from '../../../NotificationServicesController';\nimport { toRawOnChainNotification } from '../../../shared/to-raw-notification';\nimport type { PushNotificationEnv } from '../../types/firebase';\n\ndeclare const self: ServiceWorkerGlobalScope;\n\nconst createFirebaseApp = async (\n env: PushNotificationEnv,\n): Promise<FirebaseApp> => {\n try {\n return getApp();\n } catch {\n const firebaseConfig = {\n apiKey: env.apiKey,\n authDomain: env.authDomain,\n storageBucket: env.storageBucket,\n projectId: env.projectId,\n messagingSenderId: env.messagingSenderId,\n appId: env.appId,\n measurementId: env.measurementId,\n };\n return initializeApp(firebaseConfig);\n }\n};\n\nconst getFirebaseMessaging = async (\n env: PushNotificationEnv,\n): Promise<Messaging> => {\n const app = await createFirebaseApp(env);\n return getMessaging(app);\n};\n\n/**\n * Creates a registration token for Firebase Cloud Messaging.\n *\n * @param env - env to configure push notifications\n * @returns A promise that resolves with the registration token or null if an error occurs.\n */\nexport async function createRegToken(\n env: PushNotificationEnv,\n): Promise<string | null> {\n try {\n const messaging = await getFirebaseMessaging(env);\n const token = await getToken(messaging, {\n serviceWorkerRegistration: self.registration,\n vapidKey: env.vapidKey,\n });\n return token;\n } catch {\n return null;\n }\n}\n\n/**\n * Deletes the Firebase Cloud Messaging registration token.\n *\n * @param env - env to configure push notifications\n * @returns A promise that resolves with true if the token was successfully deleted, false otherwise.\n */\nexport async function deleteRegToken(\n env: PushNotificationEnv,\n): Promise<boolean> {\n try {\n const messaging = await getFirebaseMessaging(env);\n await deleteToken(messaging);\n return true;\n } catch (error) {\n return false;\n }\n}\n\n/**\n * Service Worker Listener for when push notifications are received.\n * @param env - push notification environment\n * @param handler - handler to actually showing notification, MUST BE PROVEDED\n * @returns unsubscribe handler\n */\nexport async function listenToPushNotificationsReceived(\n env: PushNotificationEnv,\n handler: (notification: Types.INotification) => void | Promise<void>,\n) {\n const messaging = await getFirebaseMessaging(env);\n const unsubscribePushNotifications = onBackgroundMessage(\n messaging,\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n async (payload: MessagePayload) => {\n try {\n const data: Types.UnprocessedOnChainRawNotification | undefined =\n payload?.data?.data ? JSON.parse(payload?.data?.data) : undefined;\n\n if (!data) {\n return;\n }\n\n const notificationData = toRawOnChainNotification(data);\n const notification = Processors.processNotification(notificationData);\n await handler(notification);\n } catch (error) {\n // Do Nothing, cannot parse a bad notification\n log.error('Unable to send push notification:', {\n notification: payload?.data?.data,\n error,\n });\n throw new Error('Unable to send push notification');\n }\n },\n );\n\n const unsubscribe = () => unsubscribePushNotifications();\n return unsubscribe;\n}\n\n/**\n * Service Worker Listener for when a notification is clicked\n *\n * @param handler - listen to NotificationEvent from the service worker\n * @returns unsubscribe handler\n */\nexport function listenToPushNotificationsClicked(\n handler: (e: NotificationEvent, notification?: Types.INotification) => void,\n) {\n const clickHandler = (event: NotificationEvent) => {\n // Get Data\n const data: Types.INotification = event?.notification?.data;\n handler(event, data);\n };\n\n self.addEventListener('notificationclick', clickHandler);\n const unsubscribe = () =>\n self.removeEventListener('notificationclick', clickHandler);\n return unsubscribe;\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference lib="webworker" />
|
|
2
|
-
import type { Types } from
|
|
3
|
-
import type { PushNotificationEnv } from
|
|
2
|
+
import type { Types } from "../../../NotificationServicesController/index.cjs";
|
|
3
|
+
import type { PushNotificationEnv } from "../../types/firebase.cjs";
|
|
4
4
|
/**
|
|
5
5
|
* Creates a registration token for Firebase Cloud Messaging.
|
|
6
6
|
*
|
|
@@ -29,4 +29,4 @@ export declare function listenToPushNotificationsReceived(env: PushNotificationE
|
|
|
29
29
|
* @returns unsubscribe handler
|
|
30
30
|
*/
|
|
31
31
|
export declare function listenToPushNotificationsClicked(handler: (e: NotificationEvent, notification?: Types.INotification) => void): () => void;
|
|
32
|
-
//# sourceMappingURL=push-web.d.
|
|
32
|
+
//# sourceMappingURL=push-web.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push-web.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/services/push/push-web.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,0DAAgD;AAGrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,iCAA6B;AA8BhE;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,mBAAmB,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,mBAAmB,GACvB,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED;;;;;GAKG;AACH,wBAAsB,iCAAiC,CACrD,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,uBA+BrE;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,CAAC,CAAC,EAAE,iBAAiB,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,cAY5E"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/// <reference lib="webworker" />
|
|
2
|
+
import type { Types } from "../../../NotificationServicesController/index.mjs";
|
|
3
|
+
import type { PushNotificationEnv } from "../../types/firebase.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Creates a registration token for Firebase Cloud Messaging.
|
|
6
|
+
*
|
|
7
|
+
* @param env - env to configure push notifications
|
|
8
|
+
* @returns A promise that resolves with the registration token or null if an error occurs.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createRegToken(env: PushNotificationEnv): Promise<string | null>;
|
|
11
|
+
/**
|
|
12
|
+
* Deletes the Firebase Cloud Messaging registration token.
|
|
13
|
+
*
|
|
14
|
+
* @param env - env to configure push notifications
|
|
15
|
+
* @returns A promise that resolves with true if the token was successfully deleted, false otherwise.
|
|
16
|
+
*/
|
|
17
|
+
export declare function deleteRegToken(env: PushNotificationEnv): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* Service Worker Listener for when push notifications are received.
|
|
20
|
+
* @param env - push notification environment
|
|
21
|
+
* @param handler - handler to actually showing notification, MUST BE PROVEDED
|
|
22
|
+
* @returns unsubscribe handler
|
|
23
|
+
*/
|
|
24
|
+
export declare function listenToPushNotificationsReceived(env: PushNotificationEnv, handler: (notification: Types.INotification) => void | Promise<void>): Promise<() => void>;
|
|
25
|
+
/**
|
|
26
|
+
* Service Worker Listener for when a notification is clicked
|
|
27
|
+
*
|
|
28
|
+
* @param handler - listen to NotificationEvent from the service worker
|
|
29
|
+
* @returns unsubscribe handler
|
|
30
|
+
*/
|
|
31
|
+
export declare function listenToPushNotificationsClicked(handler: (e: NotificationEvent, notification?: Types.INotification) => void): () => void;
|
|
32
|
+
//# sourceMappingURL=push-web.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"push-web.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/services/push/push-web.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,0DAAgD;AAGrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,iCAA6B;AA8BhE;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,mBAAmB,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,mBAAmB,GACvB,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED;;;;;GAKG;AACH,wBAAsB,iCAAiC,CACrD,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,uBA+BrE;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,CAAC,CAAC,EAAE,iBAAiB,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,cAY5E"}
|