@metamask-previews/notification-services-controller 0.5.0-preview-9edcf0e0 → 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,205 @@
|
|
|
1
|
+
import { TRIGGER_TYPES } from "../constants/notification-schema.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Mocking Utility - create a mock normalized feature announcement
|
|
4
|
+
*
|
|
5
|
+
* @returns Mock Normalized Feature Announcement
|
|
6
|
+
*/
|
|
7
|
+
export function createMockFeatureAnnouncementAPIResult() {
|
|
8
|
+
return {
|
|
9
|
+
sys: {
|
|
10
|
+
type: 'Array',
|
|
11
|
+
},
|
|
12
|
+
total: 17,
|
|
13
|
+
skip: 0,
|
|
14
|
+
limit: 1,
|
|
15
|
+
items: [
|
|
16
|
+
{
|
|
17
|
+
metadata: {
|
|
18
|
+
tags: [],
|
|
19
|
+
},
|
|
20
|
+
sys: {
|
|
21
|
+
space: {
|
|
22
|
+
sys: {
|
|
23
|
+
type: 'Link',
|
|
24
|
+
linkType: 'Space',
|
|
25
|
+
id: 'jdkgyfmyd9sw',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
id: '1ABRmHaNCgmxROKXXLXsMu',
|
|
29
|
+
type: 'Entry',
|
|
30
|
+
createdAt: '2024-04-09T13:24:01.872Z',
|
|
31
|
+
updatedAt: '2024-04-09T13:24:01.872Z',
|
|
32
|
+
environment: {
|
|
33
|
+
sys: {
|
|
34
|
+
id: 'master',
|
|
35
|
+
type: 'Link',
|
|
36
|
+
linkType: 'Environment',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
revision: 1,
|
|
40
|
+
contentType: {
|
|
41
|
+
sys: {
|
|
42
|
+
type: 'Link',
|
|
43
|
+
linkType: 'ContentType',
|
|
44
|
+
id: 'productAnnouncement',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
locale: 'en-US',
|
|
48
|
+
},
|
|
49
|
+
fields: {
|
|
50
|
+
title: 'Don’t miss out on airdrops and new NFT mints!',
|
|
51
|
+
id: 'dont-miss-out-on-airdrops-and-new-nft-mints',
|
|
52
|
+
category: 'ANNOUNCEMENT',
|
|
53
|
+
shortDescription: 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started. ',
|
|
54
|
+
image: {
|
|
55
|
+
sys: {
|
|
56
|
+
type: 'Link',
|
|
57
|
+
linkType: 'Asset',
|
|
58
|
+
id: '5jqq8sFeLc6XEoeWlpI3aB',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
longDescription: {
|
|
62
|
+
data: {},
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
data: {},
|
|
66
|
+
content: [
|
|
67
|
+
{
|
|
68
|
+
data: {},
|
|
69
|
+
marks: [],
|
|
70
|
+
value: 'You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started. \n',
|
|
71
|
+
nodeType: 'text',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
nodeType: 'paragraph',
|
|
75
|
+
},
|
|
76
|
+
],
|
|
77
|
+
nodeType: 'document',
|
|
78
|
+
},
|
|
79
|
+
link: {
|
|
80
|
+
sys: {
|
|
81
|
+
type: 'Link',
|
|
82
|
+
linkType: 'Entry',
|
|
83
|
+
id: '62xKYM2ydo4F1mS5q97K5q',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
includes: {
|
|
90
|
+
Entry: [
|
|
91
|
+
{
|
|
92
|
+
metadata: {
|
|
93
|
+
tags: [],
|
|
94
|
+
},
|
|
95
|
+
sys: {
|
|
96
|
+
space: {
|
|
97
|
+
sys: {
|
|
98
|
+
type: 'Link',
|
|
99
|
+
linkType: 'Space',
|
|
100
|
+
id: 'jdkgyfmyd9sw',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
id: '62xKYM2ydo4F1mS5q97K5q',
|
|
104
|
+
type: 'Entry',
|
|
105
|
+
createdAt: '2024-04-09T13:23:03.636Z',
|
|
106
|
+
updatedAt: '2024-04-09T13:23:03.636Z',
|
|
107
|
+
environment: {
|
|
108
|
+
sys: {
|
|
109
|
+
id: 'master',
|
|
110
|
+
type: 'Link',
|
|
111
|
+
linkType: 'Environment',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
revision: 1,
|
|
115
|
+
contentType: {
|
|
116
|
+
sys: {
|
|
117
|
+
type: 'Link',
|
|
118
|
+
linkType: 'ContentType',
|
|
119
|
+
id: 'link',
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
locale: 'en-US',
|
|
123
|
+
},
|
|
124
|
+
fields: {
|
|
125
|
+
extensionLinkText: 'Try now',
|
|
126
|
+
extensionLinkRoute: 'home.html',
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
Asset: [
|
|
131
|
+
{
|
|
132
|
+
metadata: {
|
|
133
|
+
tags: [],
|
|
134
|
+
},
|
|
135
|
+
sys: {
|
|
136
|
+
space: {
|
|
137
|
+
sys: {
|
|
138
|
+
type: 'Link',
|
|
139
|
+
linkType: 'Space',
|
|
140
|
+
id: 'jdkgyfmyd9sw',
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
id: '5jqq8sFeLc6XEoeWlpI3aB',
|
|
144
|
+
type: 'Asset',
|
|
145
|
+
createdAt: '2024-04-09T13:23:13.327Z',
|
|
146
|
+
updatedAt: '2024-04-09T13:23:13.327Z',
|
|
147
|
+
environment: {
|
|
148
|
+
sys: {
|
|
149
|
+
id: 'master',
|
|
150
|
+
type: 'Link',
|
|
151
|
+
linkType: 'Environment',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
revision: 1,
|
|
155
|
+
locale: 'en-US',
|
|
156
|
+
},
|
|
157
|
+
fields: {
|
|
158
|
+
title: 'PDAPP notification image Airdrops & NFT mints',
|
|
159
|
+
description: '',
|
|
160
|
+
file: {
|
|
161
|
+
url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',
|
|
162
|
+
details: {
|
|
163
|
+
size: 797731,
|
|
164
|
+
image: {
|
|
165
|
+
width: 2880,
|
|
166
|
+
height: 1921,
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
fileName: 'PDAPP notification image_Airdrops & NFT mints.png',
|
|
170
|
+
contentType: 'image/png',
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Mocking Utility - create a mock raw feature announcement
|
|
180
|
+
*
|
|
181
|
+
* @returns Mock Raw Feature Announcement
|
|
182
|
+
*/
|
|
183
|
+
export function createMockFeatureAnnouncementRaw() {
|
|
184
|
+
return {
|
|
185
|
+
type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,
|
|
186
|
+
createdAt: '2999-04-09T13:24:01.872Z',
|
|
187
|
+
data: {
|
|
188
|
+
id: 'dont-miss-out-on-airdrops-and-new-nft-mints',
|
|
189
|
+
category: 'ANNOUNCEMENT',
|
|
190
|
+
title: 'Don’t miss out on airdrops and new NFT mints!',
|
|
191
|
+
longDescription: `<p>You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started.</p>`,
|
|
192
|
+
shortDescription: 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started.',
|
|
193
|
+
image: {
|
|
194
|
+
title: 'PDAPP notification image Airdrops & NFT mints',
|
|
195
|
+
description: '',
|
|
196
|
+
url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',
|
|
197
|
+
},
|
|
198
|
+
extensionLink: {
|
|
199
|
+
extensionLinkText: 'Try now',
|
|
200
|
+
extensionLinkRoute: 'home.html',
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=mock-feature-announcements.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-feature-announcements.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/__fixtures__/mock-feature-announcements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,6CAAyC;AAIjE;;;;GAIG;AACH,MAAM,UAAU,sCAAsC;IACpD,OAAO;QACL,GAAG,EAAE;YACH,IAAI,EAAE,OAAO;SACd;QACD,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,KAAK,EAAE;YACL;gBACE,QAAQ,EAAE;oBACR,IAAI,EAAE,EAAE;iBACT;gBACD,GAAG,EAAE;oBACH,KAAK,EAAE;wBACL,GAAG,EAAE;4BACH,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,OAAO;4BACjB,EAAE,EAAE,cAAc;yBACnB;qBACF;oBACD,EAAE,EAAE,wBAAwB;oBAC5B,IAAI,EAAE,OAAO;oBACb,SAAS,EAAE,0BAA0B;oBACrC,SAAS,EAAE,0BAA0B;oBACrC,WAAW,EAAE;wBACX,GAAG,EAAE;4BACH,EAAE,EAAE,QAAQ;4BACZ,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,aAAa;yBACxB;qBACF;oBACD,QAAQ,EAAE,CAAC;oBACX,WAAW,EAAE;wBACX,GAAG,EAAE;4BACH,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,aAAa;4BACvB,EAAE,EAAE,qBAAqB;yBAC1B;qBACF;oBACD,MAAM,EAAE,OAAO;iBAChB;gBACD,MAAM,EAAE;oBACN,KAAK,EAAE,+CAA+C;oBACtD,EAAE,EAAE,6CAA6C;oBACjD,QAAQ,EAAE,cAAc;oBACxB,gBAAgB,EACd,0GAA0G;oBAC5G,KAAK,EAAE;wBACL,GAAG,EAAE;4BACH,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,OAAO;4BACjB,EAAE,EAAE,wBAAwB;yBAC7B;qBACF;oBACD,eAAe,EAAE;wBACf,IAAI,EAAE,EAAE;wBACR,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,EAAE;gCACR,OAAO,EAAE;oCACP;wCACE,IAAI,EAAE,EAAE;wCACR,KAAK,EAAE,EAAE;wCACT,KAAK,EACH,mSAAmS;wCACrS,QAAQ,EAAE,MAAM;qCACjB;iCACF;gCACD,QAAQ,EAAE,WAAW;6BACtB;yBACF;wBACD,QAAQ,EAAE,UAAU;qBACrB;oBACD,IAAI,EAAE;wBACJ,GAAG,EAAE;4BACH,IAAI,EAAE,MAAM;4BACZ,QAAQ,EAAE,OAAO;4BACjB,EAAE,EAAE,wBAAwB;yBAC7B;qBACF;iBACF;aACF;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL;oBACE,QAAQ,EAAE;wBACR,IAAI,EAAE,EAAE;qBACT;oBACD,GAAG,EAAE;wBACH,KAAK,EAAE;4BACL,GAAG,EAAE;gCACH,IAAI,EAAE,MAAM;gCACZ,QAAQ,EAAE,OAAO;gCACjB,EAAE,EAAE,cAAc;6BACnB;yBACF;wBACD,EAAE,EAAE,wBAAwB;wBAC5B,IAAI,EAAE,OAAO;wBACb,SAAS,EAAE,0BAA0B;wBACrC,SAAS,EAAE,0BAA0B;wBACrC,WAAW,EAAE;4BACX,GAAG,EAAE;gCACH,EAAE,EAAE,QAAQ;gCACZ,IAAI,EAAE,MAAM;gCACZ,QAAQ,EAAE,aAAa;6BACxB;yBACF;wBACD,QAAQ,EAAE,CAAC;wBACX,WAAW,EAAE;4BACX,GAAG,EAAE;gCACH,IAAI,EAAE,MAAM;gCACZ,QAAQ,EAAE,aAAa;gCACvB,EAAE,EAAE,MAAM;6BACX;yBACF;wBACD,MAAM,EAAE,OAAO;qBAChB;oBACD,MAAM,EAAE;wBACN,iBAAiB,EAAE,SAAS;wBAC5B,kBAAkB,EAAE,WAAW;qBAChC;iBACF;aACF;YACD,KAAK,EAAE;gBACL;oBACE,QAAQ,EAAE;wBACR,IAAI,EAAE,EAAE;qBACT;oBACD,GAAG,EAAE;wBACH,KAAK,EAAE;4BACL,GAAG,EAAE;gCACH,IAAI,EAAE,MAAM;gCACZ,QAAQ,EAAE,OAAO;gCACjB,EAAE,EAAE,cAAc;6BACnB;yBACF;wBACD,EAAE,EAAE,wBAAwB;wBAC5B,IAAI,EAAE,OAAO;wBACb,SAAS,EAAE,0BAA0B;wBACrC,SAAS,EAAE,0BAA0B;wBACrC,WAAW,EAAE;4BACX,GAAG,EAAE;gCACH,EAAE,EAAE,QAAQ;gCACZ,IAAI,EAAE,MAAM;gCACZ,QAAQ,EAAE,aAAa;6BACxB;yBACF;wBACD,QAAQ,EAAE,CAAC;wBACX,MAAM,EAAE,OAAO;qBAChB;oBACD,MAAM,EAAE;wBACN,KAAK,EAAE,+CAA+C;wBACtD,WAAW,EAAE,EAAE;wBACf,IAAI,EAAE;4BACJ,GAAG,EAAE,+IAA+I;4BACpJ,OAAO,EAAE;gCACP,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE;oCACL,KAAK,EAAE,IAAI;oCACX,MAAM,EAAE,IAAI;iCACb;6BACF;4BACD,QAAQ,EAAE,mDAAmD;4BAC7D,WAAW,EAAE,WAAW;yBACzB;qBACF;iBACF;aACF;SACF;KAC6B,CAAC;AACnC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gCAAgC;IAC9C,OAAO;QACL,IAAI,EAAE,aAAa,CAAC,qBAAqB;QACzC,SAAS,EAAE,0BAA0B;QACrC,IAAI,EAAE;YACJ,EAAE,EAAE,6CAA6C;YACjD,QAAQ,EAAE,cAAc;YACxB,KAAK,EAAE,+CAA+C;YACtD,eAAe,EAAE,uSAAuS;YACxT,gBAAgB,EACd,yGAAyG;YAC3G,KAAK,EAAE;gBACL,KAAK,EAAE,+CAA+C;gBACtD,WAAW,EAAE,EAAE;gBACf,GAAG,EAAE,+IAA+I;aACrJ;YACD,aAAa,EAAE;gBACb,iBAAiB,EAAE,SAAS;gBAC5B,kBAAkB,EAAE,WAAW;aAChC;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { TRIGGER_TYPES } from '../constants/notification-schema';\nimport type { ContentfulResult } from '../services/feature-announcements';\nimport type { FeatureAnnouncementRawNotification } from '../types/feature-announcement/feature-announcement';\n\n/**\n * Mocking Utility - create a mock normalized feature announcement\n *\n * @returns Mock Normalized Feature Announcement\n */\nexport function createMockFeatureAnnouncementAPIResult(): ContentfulResult {\n return {\n sys: {\n type: 'Array',\n },\n total: 17,\n skip: 0,\n limit: 1,\n items: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '1ABRmHaNCgmxROKXXLXsMu',\n type: 'Entry',\n createdAt: '2024-04-09T13:24:01.872Z',\n updatedAt: '2024-04-09T13:24:01.872Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'productAnnouncement',\n },\n },\n locale: 'en-US',\n },\n fields: {\n title: 'Don’t miss out on airdrops and new NFT mints!',\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started. ',\n image: {\n sys: {\n type: 'Link',\n linkType: 'Asset',\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n },\n },\n longDescription: {\n data: {},\n content: [\n {\n data: {},\n content: [\n {\n data: {},\n marks: [],\n value:\n 'You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started. \\n',\n nodeType: 'text',\n },\n ],\n nodeType: 'paragraph',\n },\n ],\n nodeType: 'document',\n },\n link: {\n sys: {\n type: 'Link',\n linkType: 'Entry',\n id: '62xKYM2ydo4F1mS5q97K5q',\n },\n },\n },\n },\n ],\n includes: {\n Entry: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '62xKYM2ydo4F1mS5q97K5q',\n type: 'Entry',\n createdAt: '2024-04-09T13:23:03.636Z',\n updatedAt: '2024-04-09T13:23:03.636Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n contentType: {\n sys: {\n type: 'Link',\n linkType: 'ContentType',\n id: 'link',\n },\n },\n locale: 'en-US',\n },\n fields: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n ],\n Asset: [\n {\n metadata: {\n tags: [],\n },\n sys: {\n space: {\n sys: {\n type: 'Link',\n linkType: 'Space',\n id: 'jdkgyfmyd9sw',\n },\n },\n id: '5jqq8sFeLc6XEoeWlpI3aB',\n type: 'Asset',\n createdAt: '2024-04-09T13:23:13.327Z',\n updatedAt: '2024-04-09T13:23:13.327Z',\n environment: {\n sys: {\n id: 'master',\n type: 'Link',\n linkType: 'Environment',\n },\n },\n revision: 1,\n locale: 'en-US',\n },\n fields: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n file: {\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n details: {\n size: 797731,\n image: {\n width: 2880,\n height: 1921,\n },\n },\n fileName: 'PDAPP notification image_Airdrops & NFT mints.png',\n contentType: 'image/png',\n },\n },\n },\n ],\n },\n } as unknown as ContentfulResult;\n}\n\n/**\n * Mocking Utility - create a mock raw feature announcement\n *\n * @returns Mock Raw Feature Announcement\n */\nexport function createMockFeatureAnnouncementRaw(): FeatureAnnouncementRawNotification {\n return {\n type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,\n createdAt: '2999-04-09T13:24:01.872Z',\n data: {\n id: 'dont-miss-out-on-airdrops-and-new-nft-mints',\n category: 'ANNOUNCEMENT',\n title: 'Don’t miss out on airdrops and new NFT mints!',\n longDescription: `<p>You can now verify if any of your connected addresses are eligible for airdrops and other ERC-20 claims in a secure and convenient way. We’ve also added trending NFT mints based on creators you’ve minted from before or other tokens you hold. Head over to the Explore tab to get started.</p>`,\n shortDescription:\n 'Check your airdrop eligibility and see trending NFT drops. Head over to the Explore tab to get started.',\n image: {\n title: 'PDAPP notification image Airdrops & NFT mints',\n description: '',\n url: '//images.ctfassets.net/jdkgyfmyd9sw/5jqq8sFeLc6XEoeWlpI3aB/73ee0f1afa9916c3a7538b0bbee09c26/PDAPP_notification_image_Airdrops___NFT_mints.png',\n },\n extensionLink: {\n extensionLinkText: 'Try now',\n extensionLinkRoute: 'home.html',\n },\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createMockNotificationTrigger = void 0;
|
|
4
|
+
const uuid_1 = require("uuid");
|
|
5
|
+
/**
|
|
6
|
+
* Mocking Utility - create a mock Notification Trigger
|
|
7
|
+
*
|
|
8
|
+
* @param override - provide any override configuration for the mock
|
|
9
|
+
* @returns a mock Notification Trigger
|
|
10
|
+
*/
|
|
11
|
+
function createMockNotificationTrigger(override) {
|
|
12
|
+
return {
|
|
13
|
+
id: (0, uuid_1.v4)(),
|
|
14
|
+
address: '0xFAKE_ADDRESS',
|
|
15
|
+
chainId: '1',
|
|
16
|
+
kind: 'eth_sent',
|
|
17
|
+
enabled: true,
|
|
18
|
+
...override,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
exports.createMockNotificationTrigger = createMockNotificationTrigger;
|
|
22
|
+
//# sourceMappingURL=mock-notification-trigger.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-notification-trigger.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/__fixtures__/mock-notification-trigger.ts"],"names":[],"mappings":";;;AAAA,+BAAoC;AAIpC;;;;;GAKG;AACH,SAAgB,6BAA6B,CAC3C,QAAuC;IAEvC,OAAO;QACL,EAAE,EAAE,IAAA,SAAM,GAAE;QACZ,OAAO,EAAE,gBAAgB;QACzB,OAAO,EAAE,GAAG;QACZ,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,IAAI;QACb,GAAG,QAAQ;KACZ,CAAC;AACJ,CAAC;AAXD,sEAWC","sourcesContent":["import { v4 as uuidv4 } from 'uuid';\n\nimport type { NotificationTrigger } from '../utils/utils';\n\n/**\n * Mocking Utility - create a mock Notification Trigger\n *\n * @param override - provide any override configuration for the mock\n * @returns a mock Notification Trigger\n */\nexport function createMockNotificationTrigger(\n override?: Partial<NotificationTrigger>,\n): NotificationTrigger {\n return {\n id: uuidv4(),\n address: '0xFAKE_ADDRESS',\n chainId: '1',\n kind: 'eth_sent',\n enabled: true,\n ...override,\n };\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NotificationTrigger } from
|
|
1
|
+
import type { NotificationTrigger } from "../utils/utils.cjs";
|
|
2
2
|
/**
|
|
3
3
|
* Mocking Utility - create a mock Notification Trigger
|
|
4
4
|
*
|
|
@@ -6,4 +6,4 @@ import type { NotificationTrigger } from '../utils/utils';
|
|
|
6
6
|
* @returns a mock Notification Trigger
|
|
7
7
|
*/
|
|
8
8
|
export declare function createMockNotificationTrigger(override?: Partial<NotificationTrigger>): NotificationTrigger;
|
|
9
|
-
//# sourceMappingURL=mock-notification-trigger.d.
|
|
9
|
+
//# sourceMappingURL=mock-notification-trigger.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-notification-trigger.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/__fixtures__/mock-notification-trigger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAAuB;AAE1D;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACtC,mBAAmB,CASrB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { NotificationTrigger } from "../utils/utils.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Mocking Utility - create a mock Notification Trigger
|
|
4
|
+
*
|
|
5
|
+
* @param override - provide any override configuration for the mock
|
|
6
|
+
* @returns a mock Notification Trigger
|
|
7
|
+
*/
|
|
8
|
+
export declare function createMockNotificationTrigger(override?: Partial<NotificationTrigger>): NotificationTrigger;
|
|
9
|
+
//# sourceMappingURL=mock-notification-trigger.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-notification-trigger.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/__fixtures__/mock-notification-trigger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,2BAAuB;AAE1D;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACtC,mBAAmB,CASrB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from "uuid";
|
|
2
|
+
/**
|
|
3
|
+
* Mocking Utility - create a mock Notification Trigger
|
|
4
|
+
*
|
|
5
|
+
* @param override - provide any override configuration for the mock
|
|
6
|
+
* @returns a mock Notification Trigger
|
|
7
|
+
*/
|
|
8
|
+
export function createMockNotificationTrigger(override) {
|
|
9
|
+
return {
|
|
10
|
+
id: uuidv4(),
|
|
11
|
+
address: '0xFAKE_ADDRESS',
|
|
12
|
+
chainId: '1',
|
|
13
|
+
kind: 'eth_sent',
|
|
14
|
+
enabled: true,
|
|
15
|
+
...override,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=mock-notification-trigger.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-notification-trigger.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/__fixtures__/mock-notification-trigger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,aAAa;AAIpC;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAC3C,QAAuC;IAEvC,OAAO;QACL,EAAE,EAAE,MAAM,EAAE;QACZ,OAAO,EAAE,gBAAgB;QACzB,OAAO,EAAE,GAAG;QACZ,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE,IAAI;QACb,GAAG,QAAQ;KACZ,CAAC;AACJ,CAAC","sourcesContent":["import { v4 as uuidv4 } from 'uuid';\n\nimport type { NotificationTrigger } from '../utils/utils';\n\n/**\n * Mocking Utility - create a mock Notification Trigger\n *\n * @param override - provide any override configuration for the mock\n * @returns a mock Notification Trigger\n */\nexport function createMockNotificationTrigger(\n override?: Partial<NotificationTrigger>,\n): NotificationTrigger {\n return {\n id: uuidv4(),\n address: '0xFAKE_ADDRESS',\n chainId: '1',\n kind: 'eth_sent',\n enabled: true,\n ...override,\n };\n}\n"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createMockFullUserStorage = exports.createMockUserStorageWithTriggers = exports.createMockUserStorage = exports.MOCK_USER_STORAGE_CHAIN = exports.MOCK_USER_STORAGE_ACCOUNT = void 0;
|
|
4
|
+
const constants_1 = require("../constants/constants.cjs");
|
|
5
|
+
const notification_schema_1 = require("../constants/notification-schema.cjs");
|
|
6
|
+
const utils_1 = require("../utils/utils.cjs");
|
|
7
|
+
exports.MOCK_USER_STORAGE_ACCOUNT = '0x0000000000000000000000000000000000000000';
|
|
8
|
+
exports.MOCK_USER_STORAGE_CHAIN = '1';
|
|
9
|
+
/**
|
|
10
|
+
* Mocking Utility - create a mock notification user storage object
|
|
11
|
+
*
|
|
12
|
+
* @param override - provide any override configuration for the mock
|
|
13
|
+
* @returns a mock notification user storage object
|
|
14
|
+
*/
|
|
15
|
+
function createMockUserStorage(override) {
|
|
16
|
+
return {
|
|
17
|
+
[constants_1.USER_STORAGE_VERSION_KEY]: '1',
|
|
18
|
+
[exports.MOCK_USER_STORAGE_ACCOUNT]: {
|
|
19
|
+
[exports.MOCK_USER_STORAGE_CHAIN]: {
|
|
20
|
+
'111-111-111-111': {
|
|
21
|
+
k: notification_schema_1.TRIGGER_TYPES.ERC20_RECEIVED,
|
|
22
|
+
e: true,
|
|
23
|
+
},
|
|
24
|
+
'222-222-222-222': {
|
|
25
|
+
k: notification_schema_1.TRIGGER_TYPES.ERC20_SENT,
|
|
26
|
+
e: true,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
...override,
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
exports.createMockUserStorage = createMockUserStorage;
|
|
34
|
+
/**
|
|
35
|
+
* Mocking Utility - create a mock notification user storage object with triggers
|
|
36
|
+
*
|
|
37
|
+
* @param triggers - provide any override configuration for the mock
|
|
38
|
+
* @returns a mock notification user storage object with triggers
|
|
39
|
+
*/
|
|
40
|
+
function createMockUserStorageWithTriggers(triggers) {
|
|
41
|
+
const userStorage = {
|
|
42
|
+
[constants_1.USER_STORAGE_VERSION_KEY]: '1',
|
|
43
|
+
[exports.MOCK_USER_STORAGE_ACCOUNT]: {
|
|
44
|
+
[exports.MOCK_USER_STORAGE_CHAIN]: {},
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
// insert triggerIds
|
|
48
|
+
triggers.forEach((t) => {
|
|
49
|
+
let tId;
|
|
50
|
+
let e;
|
|
51
|
+
let k;
|
|
52
|
+
if (typeof t === 'string') {
|
|
53
|
+
tId = t;
|
|
54
|
+
e = true;
|
|
55
|
+
k = notification_schema_1.TRIGGER_TYPES.ERC20_RECEIVED;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
tId = t.id;
|
|
59
|
+
e = t.e;
|
|
60
|
+
k = t.k ?? notification_schema_1.TRIGGER_TYPES.ERC20_RECEIVED;
|
|
61
|
+
}
|
|
62
|
+
userStorage[exports.MOCK_USER_STORAGE_ACCOUNT][exports.MOCK_USER_STORAGE_CHAIN][tId] = {
|
|
63
|
+
k,
|
|
64
|
+
e,
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
return userStorage;
|
|
68
|
+
}
|
|
69
|
+
exports.createMockUserStorageWithTriggers = createMockUserStorageWithTriggers;
|
|
70
|
+
/**
|
|
71
|
+
* Mocking Utility - create a mock notification user storage object (full/realistic object)
|
|
72
|
+
*
|
|
73
|
+
* @param props - provide any override configuration for the mock
|
|
74
|
+
* @param props.triggersEnabled - choose if all triggers created are enabled/disabled
|
|
75
|
+
* @param props.address - choose a specific address for triggers to be assigned to
|
|
76
|
+
* @returns a mock full notification user storage object
|
|
77
|
+
*/
|
|
78
|
+
function createMockFullUserStorage(props = {}) {
|
|
79
|
+
return (0, utils_1.initializeUserStorage)([{ address: props.address ?? exports.MOCK_USER_STORAGE_ACCOUNT }], props.triggersEnabled ?? true);
|
|
80
|
+
}
|
|
81
|
+
exports.createMockFullUserStorage = createMockFullUserStorage;
|
|
82
|
+
//# sourceMappingURL=mock-notification-user-storage.cjs.map
|
package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-notification-user-storage.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/__fixtures__/mock-notification-user-storage.ts"],"names":[],"mappings":";;;AAAA,0DAAkE;AAClE,8EAAiE;AAEjE,8CAAuD;AAE1C,QAAA,yBAAyB,GACpC,4CAA4C,CAAC;AAClC,QAAA,uBAAuB,GAAG,GAAG,CAAC;AAE3C;;;;;GAKG;AACH,SAAgB,qBAAqB,CACnC,QAA+B;IAE/B,OAAO;QACL,CAAC,oCAAwB,CAAC,EAAE,GAAG;QAC/B,CAAC,iCAAyB,CAAC,EAAE;YAC3B,CAAC,+BAAuB,CAAC,EAAE;gBACzB,iBAAiB,EAAE;oBACjB,CAAC,EAAE,mCAAa,CAAC,cAAc;oBAC/B,CAAC,EAAE,IAAI;iBACR;gBACD,iBAAiB,EAAE;oBACjB,CAAC,EAAE,mCAAa,CAAC,UAAU;oBAC3B,CAAC,EAAE,IAAI;iBACR;aACF;SACF;QACD,GAAG,QAAQ;KACZ,CAAC;AACJ,CAAC;AAnBD,sDAmBC;AAED;;;;;GAKG;AACH,SAAgB,iCAAiC,CAC/C,QAAoE;IAEpE,MAAM,WAAW,GAAgB;QAC/B,CAAC,oCAAwB,CAAC,EAAE,GAAG;QAC/B,CAAC,iCAAyB,CAAC,EAAE;YAC3B,CAAC,+BAAuB,CAAC,EAAE,EAAE;SAC9B;KACF,CAAC;IAEF,oBAAoB;IACpB,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACrB,IAAI,GAAW,CAAC;QAChB,IAAI,CAAU,CAAC;QACf,IAAI,CAAgB,CAAC;QACrB,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;YACzB,GAAG,GAAG,CAAC,CAAC;YACR,CAAC,GAAG,IAAI,CAAC;YACT,CAAC,GAAG,mCAAa,CAAC,cAAc,CAAC;SAClC;aAAM;YACL,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC;YACX,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACR,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,mCAAa,CAAC,cAAc,CAAC;SACzC;QAED,WAAW,CAAC,iCAAyB,CAAC,CAAC,+BAAuB,CAAC,CAAC,GAAG,CAAC,GAAG;YACrE,CAAC;YACD,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC;AAhCD,8EAgCC;AAED;;;;;;;GAOG;AACH,SAAgB,yBAAyB,CACvC,QAAyD,EAAE;IAE3D,OAAO,IAAA,6BAAqB,EAC1B,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,iCAAyB,EAAE,CAAC,EACzD,KAAK,CAAC,eAAe,IAAI,IAAI,CAC9B,CAAC;AACJ,CAAC;AAPD,8DAOC","sourcesContent":["import { USER_STORAGE_VERSION_KEY } from '../constants/constants';\nimport { TRIGGER_TYPES } from '../constants/notification-schema';\nimport type { UserStorage } from '../types/user-storage/user-storage';\nimport { initializeUserStorage } from '../utils/utils';\n\nexport const MOCK_USER_STORAGE_ACCOUNT =\n '0x0000000000000000000000000000000000000000';\nexport const MOCK_USER_STORAGE_CHAIN = '1';\n\n/**\n * Mocking Utility - create a mock notification user storage object\n *\n * @param override - provide any override configuration for the mock\n * @returns a mock notification user storage object\n */\nexport function createMockUserStorage(\n override?: Partial<UserStorage>,\n): UserStorage {\n return {\n [USER_STORAGE_VERSION_KEY]: '1',\n [MOCK_USER_STORAGE_ACCOUNT]: {\n [MOCK_USER_STORAGE_CHAIN]: {\n '111-111-111-111': {\n k: TRIGGER_TYPES.ERC20_RECEIVED,\n e: true,\n },\n '222-222-222-222': {\n k: TRIGGER_TYPES.ERC20_SENT,\n e: true,\n },\n },\n },\n ...override,\n };\n}\n\n/**\n * Mocking Utility - create a mock notification user storage object with triggers\n *\n * @param triggers - provide any override configuration for the mock\n * @returns a mock notification user storage object with triggers\n */\nexport function createMockUserStorageWithTriggers(\n triggers: string[] | { id: string; e: boolean; k?: TRIGGER_TYPES }[],\n): UserStorage {\n const userStorage: UserStorage = {\n [USER_STORAGE_VERSION_KEY]: '1',\n [MOCK_USER_STORAGE_ACCOUNT]: {\n [MOCK_USER_STORAGE_CHAIN]: {},\n },\n };\n\n // insert triggerIds\n triggers.forEach((t) => {\n let tId: string;\n let e: boolean;\n let k: TRIGGER_TYPES;\n if (typeof t === 'string') {\n tId = t;\n e = true;\n k = TRIGGER_TYPES.ERC20_RECEIVED;\n } else {\n tId = t.id;\n e = t.e;\n k = t.k ?? TRIGGER_TYPES.ERC20_RECEIVED;\n }\n\n userStorage[MOCK_USER_STORAGE_ACCOUNT][MOCK_USER_STORAGE_CHAIN][tId] = {\n k,\n e,\n };\n });\n\n return userStorage;\n}\n\n/**\n * Mocking Utility - create a mock notification user storage object (full/realistic object)\n *\n * @param props - provide any override configuration for the mock\n * @param props.triggersEnabled - choose if all triggers created are enabled/disabled\n * @param props.address - choose a specific address for triggers to be assigned to\n * @returns a mock full notification user storage object\n */\nexport function createMockFullUserStorage(\n props: { triggersEnabled?: boolean; address?: string } = {},\n): UserStorage {\n return initializeUserStorage(\n [{ address: props.address ?? MOCK_USER_STORAGE_ACCOUNT }],\n props.triggersEnabled ?? true,\n );\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TRIGGER_TYPES } from
|
|
2
|
-
import type { UserStorage } from
|
|
1
|
+
import { TRIGGER_TYPES } from "../constants/notification-schema.cjs";
|
|
2
|
+
import type { UserStorage } from "../types/user-storage/user-storage.cjs";
|
|
3
3
|
export declare const MOCK_USER_STORAGE_ACCOUNT = "0x0000000000000000000000000000000000000000";
|
|
4
4
|
export declare const MOCK_USER_STORAGE_CHAIN = "1";
|
|
5
5
|
/**
|
|
@@ -32,4 +32,4 @@ export declare function createMockFullUserStorage(props?: {
|
|
|
32
32
|
triggersEnabled?: boolean;
|
|
33
33
|
address?: string;
|
|
34
34
|
}): UserStorage;
|
|
35
|
-
//# sourceMappingURL=mock-notification-user-storage.d.
|
|
35
|
+
//# sourceMappingURL=mock-notification-user-storage.d.cts.map
|
package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.cts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-notification-user-storage.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/__fixtures__/mock-notification-user-storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,6CAAyC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,+CAA2C;AAGtE,eAAO,MAAM,yBAAyB,+CACQ,CAAC;AAC/C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAC9B,WAAW,CAiBb;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,MAAM,EAAE,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,OAAO,CAAC;IAAC,CAAC,CAAC,EAAE,aAAa,CAAA;CAAE,EAAE,GACnE,WAAW,CA8Bb;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,GAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1D,WAAW,CAKb"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TRIGGER_TYPES } from "../constants/notification-schema.mjs";
|
|
2
|
+
import type { UserStorage } from "../types/user-storage/user-storage.mjs";
|
|
3
|
+
export declare const MOCK_USER_STORAGE_ACCOUNT = "0x0000000000000000000000000000000000000000";
|
|
4
|
+
export declare const MOCK_USER_STORAGE_CHAIN = "1";
|
|
5
|
+
/**
|
|
6
|
+
* Mocking Utility - create a mock notification user storage object
|
|
7
|
+
*
|
|
8
|
+
* @param override - provide any override configuration for the mock
|
|
9
|
+
* @returns a mock notification user storage object
|
|
10
|
+
*/
|
|
11
|
+
export declare function createMockUserStorage(override?: Partial<UserStorage>): UserStorage;
|
|
12
|
+
/**
|
|
13
|
+
* Mocking Utility - create a mock notification user storage object with triggers
|
|
14
|
+
*
|
|
15
|
+
* @param triggers - provide any override configuration for the mock
|
|
16
|
+
* @returns a mock notification user storage object with triggers
|
|
17
|
+
*/
|
|
18
|
+
export declare function createMockUserStorageWithTriggers(triggers: string[] | {
|
|
19
|
+
id: string;
|
|
20
|
+
e: boolean;
|
|
21
|
+
k?: TRIGGER_TYPES;
|
|
22
|
+
}[]): UserStorage;
|
|
23
|
+
/**
|
|
24
|
+
* Mocking Utility - create a mock notification user storage object (full/realistic object)
|
|
25
|
+
*
|
|
26
|
+
* @param props - provide any override configuration for the mock
|
|
27
|
+
* @param props.triggersEnabled - choose if all triggers created are enabled/disabled
|
|
28
|
+
* @param props.address - choose a specific address for triggers to be assigned to
|
|
29
|
+
* @returns a mock full notification user storage object
|
|
30
|
+
*/
|
|
31
|
+
export declare function createMockFullUserStorage(props?: {
|
|
32
|
+
triggersEnabled?: boolean;
|
|
33
|
+
address?: string;
|
|
34
|
+
}): UserStorage;
|
|
35
|
+
//# sourceMappingURL=mock-notification-user-storage.d.mts.map
|
package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-notification-user-storage.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/__fixtures__/mock-notification-user-storage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,6CAAyC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,+CAA2C;AAGtE,eAAO,MAAM,yBAAyB,+CACQ,CAAC;AAC/C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,GAC9B,WAAW,CAiBb;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,MAAM,EAAE,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,OAAO,CAAC;IAAC,CAAC,CAAC,EAAE,aAAa,CAAA;CAAE,EAAE,GACnE,WAAW,CA8Bb;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,GAAE;IAAE,eAAe,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1D,WAAW,CAKb"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { USER_STORAGE_VERSION_KEY } from "../constants/constants.mjs";
|
|
2
|
+
import { TRIGGER_TYPES } from "../constants/notification-schema.mjs";
|
|
3
|
+
import { initializeUserStorage } from "../utils/utils.mjs";
|
|
4
|
+
export const MOCK_USER_STORAGE_ACCOUNT = '0x0000000000000000000000000000000000000000';
|
|
5
|
+
export const MOCK_USER_STORAGE_CHAIN = '1';
|
|
6
|
+
/**
|
|
7
|
+
* Mocking Utility - create a mock notification user storage object
|
|
8
|
+
*
|
|
9
|
+
* @param override - provide any override configuration for the mock
|
|
10
|
+
* @returns a mock notification user storage object
|
|
11
|
+
*/
|
|
12
|
+
export function createMockUserStorage(override) {
|
|
13
|
+
return {
|
|
14
|
+
[USER_STORAGE_VERSION_KEY]: '1',
|
|
15
|
+
[MOCK_USER_STORAGE_ACCOUNT]: {
|
|
16
|
+
[MOCK_USER_STORAGE_CHAIN]: {
|
|
17
|
+
'111-111-111-111': {
|
|
18
|
+
k: TRIGGER_TYPES.ERC20_RECEIVED,
|
|
19
|
+
e: true,
|
|
20
|
+
},
|
|
21
|
+
'222-222-222-222': {
|
|
22
|
+
k: TRIGGER_TYPES.ERC20_SENT,
|
|
23
|
+
e: true,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
...override,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Mocking Utility - create a mock notification user storage object with triggers
|
|
32
|
+
*
|
|
33
|
+
* @param triggers - provide any override configuration for the mock
|
|
34
|
+
* @returns a mock notification user storage object with triggers
|
|
35
|
+
*/
|
|
36
|
+
export function createMockUserStorageWithTriggers(triggers) {
|
|
37
|
+
const userStorage = {
|
|
38
|
+
[USER_STORAGE_VERSION_KEY]: '1',
|
|
39
|
+
[MOCK_USER_STORAGE_ACCOUNT]: {
|
|
40
|
+
[MOCK_USER_STORAGE_CHAIN]: {},
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
// insert triggerIds
|
|
44
|
+
triggers.forEach((t) => {
|
|
45
|
+
let tId;
|
|
46
|
+
let e;
|
|
47
|
+
let k;
|
|
48
|
+
if (typeof t === 'string') {
|
|
49
|
+
tId = t;
|
|
50
|
+
e = true;
|
|
51
|
+
k = TRIGGER_TYPES.ERC20_RECEIVED;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
tId = t.id;
|
|
55
|
+
e = t.e;
|
|
56
|
+
k = t.k ?? TRIGGER_TYPES.ERC20_RECEIVED;
|
|
57
|
+
}
|
|
58
|
+
userStorage[MOCK_USER_STORAGE_ACCOUNT][MOCK_USER_STORAGE_CHAIN][tId] = {
|
|
59
|
+
k,
|
|
60
|
+
e,
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
return userStorage;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Mocking Utility - create a mock notification user storage object (full/realistic object)
|
|
67
|
+
*
|
|
68
|
+
* @param props - provide any override configuration for the mock
|
|
69
|
+
* @param props.triggersEnabled - choose if all triggers created are enabled/disabled
|
|
70
|
+
* @param props.address - choose a specific address for triggers to be assigned to
|
|
71
|
+
* @returns a mock full notification user storage object
|
|
72
|
+
*/
|
|
73
|
+
export function createMockFullUserStorage(props = {}) {
|
|
74
|
+
return initializeUserStorage([{ address: props.address ?? MOCK_USER_STORAGE_ACCOUNT }], props.triggersEnabled ?? true);
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=mock-notification-user-storage.mjs.map
|
package/dist/NotificationServicesController/__fixtures__/mock-notification-user-storage.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mock-notification-user-storage.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/__fixtures__/mock-notification-user-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,mCAA+B;AAClE,OAAO,EAAE,aAAa,EAAE,6CAAyC;AAEjE,OAAO,EAAE,qBAAqB,EAAE,2BAAuB;AAEvD,MAAM,CAAC,MAAM,yBAAyB,GACpC,4CAA4C,CAAC;AAC/C,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,QAA+B;IAE/B,OAAO;QACL,CAAC,wBAAwB,CAAC,EAAE,GAAG;QAC/B,CAAC,yBAAyB,CAAC,EAAE;YAC3B,CAAC,uBAAuB,CAAC,EAAE;gBACzB,iBAAiB,EAAE;oBACjB,CAAC,EAAE,aAAa,CAAC,cAAc;oBAC/B,CAAC,EAAE,IAAI;iBACR;gBACD,iBAAiB,EAAE;oBACjB,CAAC,EAAE,aAAa,CAAC,UAAU;oBAC3B,CAAC,EAAE,IAAI;iBACR;aACF;SACF;QACD,GAAG,QAAQ;KACZ,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iCAAiC,CAC/C,QAAoE;IAEpE,MAAM,WAAW,GAAgB;QAC/B,CAAC,wBAAwB,CAAC,EAAE,GAAG;QAC/B,CAAC,yBAAyB,CAAC,EAAE;YAC3B,CAAC,uBAAuB,CAAC,EAAE,EAAE;SAC9B;KACF,CAAC;IAEF,oBAAoB;IACpB,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACrB,IAAI,GAAW,CAAC;QAChB,IAAI,CAAU,CAAC;QACf,IAAI,CAAgB,CAAC;QACrB,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE;YACzB,GAAG,GAAG,CAAC,CAAC;YACR,CAAC,GAAG,IAAI,CAAC;YACT,CAAC,GAAG,aAAa,CAAC,cAAc,CAAC;SAClC;aAAM;YACL,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC;YACX,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACR,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,cAAc,CAAC;SACzC;QAED,WAAW,CAAC,yBAAyB,CAAC,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,GAAG;YACrE,CAAC;YACD,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CACvC,QAAyD,EAAE;IAE3D,OAAO,qBAAqB,CAC1B,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,yBAAyB,EAAE,CAAC,EACzD,KAAK,CAAC,eAAe,IAAI,IAAI,CAC9B,CAAC;AACJ,CAAC","sourcesContent":["import { USER_STORAGE_VERSION_KEY } from '../constants/constants';\nimport { TRIGGER_TYPES } from '../constants/notification-schema';\nimport type { UserStorage } from '../types/user-storage/user-storage';\nimport { initializeUserStorage } from '../utils/utils';\n\nexport const MOCK_USER_STORAGE_ACCOUNT =\n '0x0000000000000000000000000000000000000000';\nexport const MOCK_USER_STORAGE_CHAIN = '1';\n\n/**\n * Mocking Utility - create a mock notification user storage object\n *\n * @param override - provide any override configuration for the mock\n * @returns a mock notification user storage object\n */\nexport function createMockUserStorage(\n override?: Partial<UserStorage>,\n): UserStorage {\n return {\n [USER_STORAGE_VERSION_KEY]: '1',\n [MOCK_USER_STORAGE_ACCOUNT]: {\n [MOCK_USER_STORAGE_CHAIN]: {\n '111-111-111-111': {\n k: TRIGGER_TYPES.ERC20_RECEIVED,\n e: true,\n },\n '222-222-222-222': {\n k: TRIGGER_TYPES.ERC20_SENT,\n e: true,\n },\n },\n },\n ...override,\n };\n}\n\n/**\n * Mocking Utility - create a mock notification user storage object with triggers\n *\n * @param triggers - provide any override configuration for the mock\n * @returns a mock notification user storage object with triggers\n */\nexport function createMockUserStorageWithTriggers(\n triggers: string[] | { id: string; e: boolean; k?: TRIGGER_TYPES }[],\n): UserStorage {\n const userStorage: UserStorage = {\n [USER_STORAGE_VERSION_KEY]: '1',\n [MOCK_USER_STORAGE_ACCOUNT]: {\n [MOCK_USER_STORAGE_CHAIN]: {},\n },\n };\n\n // insert triggerIds\n triggers.forEach((t) => {\n let tId: string;\n let e: boolean;\n let k: TRIGGER_TYPES;\n if (typeof t === 'string') {\n tId = t;\n e = true;\n k = TRIGGER_TYPES.ERC20_RECEIVED;\n } else {\n tId = t.id;\n e = t.e;\n k = t.k ?? TRIGGER_TYPES.ERC20_RECEIVED;\n }\n\n userStorage[MOCK_USER_STORAGE_ACCOUNT][MOCK_USER_STORAGE_CHAIN][tId] = {\n k,\n e,\n };\n });\n\n return userStorage;\n}\n\n/**\n * Mocking Utility - create a mock notification user storage object (full/realistic object)\n *\n * @param props - provide any override configuration for the mock\n * @param props.triggersEnabled - choose if all triggers created are enabled/disabled\n * @param props.address - choose a specific address for triggers to be assigned to\n * @returns a mock full notification user storage object\n */\nexport function createMockFullUserStorage(\n props: { triggersEnabled?: boolean; address?: string } = {},\n): UserStorage {\n return initializeUserStorage(\n [{ address: props.address ?? MOCK_USER_STORAGE_ACCOUNT }],\n props.triggersEnabled ?? true,\n );\n}\n"]}
|