@metamask/notification-services-controller 19.0.0 → 20.0.0

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.
Files changed (201) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/dist/NotificationServicesController/NotificationServicesController.cjs +17 -38
  3. package/dist/NotificationServicesController/NotificationServicesController.cjs.map +1 -1
  4. package/dist/NotificationServicesController/NotificationServicesController.d.cts +2 -2
  5. package/dist/NotificationServicesController/NotificationServicesController.d.cts.map +1 -1
  6. package/dist/NotificationServicesController/NotificationServicesController.d.mts +2 -2
  7. package/dist/NotificationServicesController/NotificationServicesController.d.mts.map +1 -1
  8. package/dist/NotificationServicesController/NotificationServicesController.mjs +17 -15
  9. package/dist/NotificationServicesController/NotificationServicesController.mjs.map +1 -1
  10. package/dist/NotificationServicesController/constants/notification-schema.cjs +4 -14
  11. package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -1
  12. package/dist/NotificationServicesController/constants/notification-schema.d.cts +3 -13
  13. package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -1
  14. package/dist/NotificationServicesController/constants/notification-schema.d.mts +3 -13
  15. package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -1
  16. package/dist/NotificationServicesController/constants/notification-schema.mjs +3 -13
  17. package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
  18. package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs +427 -529
  19. package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs.map +1 -1
  20. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.cts +20 -50
  21. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.cts.map +1 -1
  22. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.mts +20 -50
  23. package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.mts.map +1 -1
  24. package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs +424 -521
  25. package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs.map +1 -1
  26. package/dist/NotificationServicesController/mocks/mockResponses.cjs +5 -5
  27. package/dist/NotificationServicesController/mocks/mockResponses.cjs.map +1 -1
  28. package/dist/NotificationServicesController/mocks/mockResponses.d.cts +2 -2
  29. package/dist/NotificationServicesController/mocks/mockResponses.d.cts.map +1 -1
  30. package/dist/NotificationServicesController/mocks/mockResponses.d.mts +2 -2
  31. package/dist/NotificationServicesController/mocks/mockResponses.d.mts.map +1 -1
  32. package/dist/NotificationServicesController/mocks/mockResponses.mjs +1 -1
  33. package/dist/NotificationServicesController/mocks/mockResponses.mjs.map +1 -1
  34. package/dist/NotificationServicesController/processors/index.cjs +1 -1
  35. package/dist/NotificationServicesController/processors/index.cjs.map +1 -1
  36. package/dist/NotificationServicesController/processors/index.d.cts +1 -1
  37. package/dist/NotificationServicesController/processors/index.d.cts.map +1 -1
  38. package/dist/NotificationServicesController/processors/index.d.mts +1 -1
  39. package/dist/NotificationServicesController/processors/index.d.mts.map +1 -1
  40. package/dist/NotificationServicesController/processors/index.mjs +1 -1
  41. package/dist/NotificationServicesController/processors/index.mjs.map +1 -1
  42. package/dist/NotificationServicesController/processors/process-api-notifications.cjs +22 -0
  43. package/dist/NotificationServicesController/processors/process-api-notifications.cjs.map +1 -0
  44. package/dist/NotificationServicesController/processors/process-api-notifications.d.cts +10 -0
  45. package/dist/NotificationServicesController/processors/process-api-notifications.d.cts.map +1 -0
  46. package/dist/NotificationServicesController/processors/process-api-notifications.d.mts +10 -0
  47. package/dist/NotificationServicesController/processors/process-api-notifications.d.mts.map +1 -0
  48. package/dist/NotificationServicesController/processors/process-api-notifications.mjs +18 -0
  49. package/dist/NotificationServicesController/processors/process-api-notifications.mjs.map +1 -0
  50. package/dist/NotificationServicesController/processors/process-feature-announcement.cjs +2 -7
  51. package/dist/NotificationServicesController/processors/process-feature-announcement.cjs.map +1 -1
  52. package/dist/NotificationServicesController/processors/process-feature-announcement.d.cts.map +1 -1
  53. package/dist/NotificationServicesController/processors/process-feature-announcement.d.mts.map +1 -1
  54. package/dist/NotificationServicesController/processors/process-feature-announcement.mjs +1 -6
  55. package/dist/NotificationServicesController/processors/process-feature-announcement.mjs.map +1 -1
  56. package/dist/NotificationServicesController/processors/process-notifications.cjs +3 -3
  57. package/dist/NotificationServicesController/processors/process-notifications.cjs.map +1 -1
  58. package/dist/NotificationServicesController/processors/process-notifications.d.cts +398 -458
  59. package/dist/NotificationServicesController/processors/process-notifications.d.cts.map +1 -1
  60. package/dist/NotificationServicesController/processors/process-notifications.d.mts +398 -458
  61. package/dist/NotificationServicesController/processors/process-notifications.d.mts.map +1 -1
  62. package/dist/NotificationServicesController/processors/process-notifications.mjs +4 -4
  63. package/dist/NotificationServicesController/processors/process-notifications.mjs.map +1 -1
  64. package/dist/NotificationServicesController/services/{onchain-notifications.cjs → api-notifications.cjs} +28 -15
  65. package/dist/NotificationServicesController/services/api-notifications.cjs.map +1 -0
  66. package/dist/NotificationServicesController/services/{onchain-notifications.d.cts → api-notifications.d.cts} +9 -7
  67. package/dist/NotificationServicesController/services/api-notifications.d.cts.map +1 -0
  68. package/dist/NotificationServicesController/services/{onchain-notifications.d.mts → api-notifications.d.mts} +9 -7
  69. package/dist/NotificationServicesController/services/api-notifications.d.mts.map +1 -0
  70. package/dist/NotificationServicesController/services/{onchain-notifications.mjs → api-notifications.mjs} +26 -13
  71. package/dist/NotificationServicesController/services/api-notifications.mjs.map +1 -0
  72. package/dist/NotificationServicesController/services/feature-announcements.cjs.map +1 -1
  73. package/dist/NotificationServicesController/services/feature-announcements.mjs.map +1 -1
  74. package/dist/NotificationServicesController/services/notification-config-cache.cjs.map +1 -1
  75. package/dist/NotificationServicesController/services/notification-config-cache.mjs.map +1 -1
  76. package/dist/NotificationServicesController/services/perp-notifications.cjs +0 -1
  77. package/dist/NotificationServicesController/services/perp-notifications.cjs.map +1 -1
  78. package/dist/NotificationServicesController/services/perp-notifications.d.cts.map +1 -1
  79. package/dist/NotificationServicesController/services/perp-notifications.d.mts.map +1 -1
  80. package/dist/NotificationServicesController/services/perp-notifications.mjs +0 -1
  81. package/dist/NotificationServicesController/services/perp-notifications.mjs.map +1 -1
  82. package/dist/NotificationServicesController/types/index.cjs.map +1 -1
  83. package/dist/NotificationServicesController/types/index.d.cts +1 -1
  84. package/dist/NotificationServicesController/types/index.d.cts.map +1 -1
  85. package/dist/NotificationServicesController/types/index.d.mts +1 -1
  86. package/dist/NotificationServicesController/types/index.d.mts.map +1 -1
  87. package/dist/NotificationServicesController/types/index.mjs.map +1 -1
  88. package/dist/NotificationServicesController/types/notification/notification.cjs.map +1 -1
  89. package/dist/NotificationServicesController/types/notification/notification.d.cts +3 -11
  90. package/dist/NotificationServicesController/types/notification/notification.d.cts.map +1 -1
  91. package/dist/NotificationServicesController/types/notification/notification.d.mts +3 -11
  92. package/dist/NotificationServicesController/types/notification/notification.d.mts.map +1 -1
  93. package/dist/NotificationServicesController/types/notification/notification.mjs.map +1 -1
  94. package/dist/NotificationServicesController/types/notification-api/index.cjs.map +1 -0
  95. package/dist/NotificationServicesController/types/notification-api/index.d.cts +3 -0
  96. package/dist/NotificationServicesController/types/notification-api/index.d.cts.map +1 -0
  97. package/dist/NotificationServicesController/types/notification-api/index.d.mts +3 -0
  98. package/dist/NotificationServicesController/types/notification-api/index.d.mts.map +1 -0
  99. package/dist/NotificationServicesController/types/notification-api/index.mjs.map +1 -0
  100. package/dist/NotificationServicesController/types/{on-chain-notification/on-chain-notification.cjs → notification-api/notification-api.cjs} +1 -1
  101. package/dist/NotificationServicesController/types/notification-api/notification-api.cjs.map +1 -0
  102. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts +64 -0
  103. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts.map +1 -0
  104. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts +64 -0
  105. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts.map +1 -0
  106. package/dist/NotificationServicesController/types/notification-api/notification-api.mjs +2 -0
  107. package/dist/NotificationServicesController/types/notification-api/notification-api.mjs.map +1 -0
  108. package/dist/NotificationServicesController/types/notification-api/schema.cjs.map +1 -0
  109. package/dist/NotificationServicesController/types/notification-api/schema.d.cts +365 -0
  110. package/dist/NotificationServicesController/types/notification-api/schema.d.cts.map +1 -0
  111. package/dist/NotificationServicesController/types/notification-api/schema.d.mts +365 -0
  112. package/dist/NotificationServicesController/types/notification-api/schema.d.mts.map +1 -0
  113. package/dist/NotificationServicesController/types/notification-api/schema.mjs.map +1 -0
  114. package/dist/NotificationServicesController/ui/constants.d.cts +27 -27
  115. package/dist/NotificationServicesController/ui/constants.d.mts +27 -27
  116. package/dist/NotificationServicesController/utils/isVersionInBounds.cjs.map +1 -1
  117. package/dist/NotificationServicesController/utils/isVersionInBounds.mjs.map +1 -1
  118. package/dist/NotificationServicesController/utils/should-auto-expire.cjs +12 -0
  119. package/dist/NotificationServicesController/utils/should-auto-expire.cjs.map +1 -0
  120. package/dist/NotificationServicesController/utils/should-auto-expire.d.cts +2 -0
  121. package/dist/NotificationServicesController/utils/should-auto-expire.d.cts.map +1 -0
  122. package/dist/NotificationServicesController/utils/should-auto-expire.d.mts +2 -0
  123. package/dist/NotificationServicesController/utils/should-auto-expire.d.mts.map +1 -0
  124. package/dist/NotificationServicesController/utils/should-auto-expire.mjs +8 -0
  125. package/dist/NotificationServicesController/utils/should-auto-expire.mjs.map +1 -0
  126. package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs.map +1 -1
  127. package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs.map +1 -1
  128. package/dist/NotificationServicesPushController/services/push/push-web.cjs +5 -2
  129. package/dist/NotificationServicesPushController/services/push/push-web.cjs.map +1 -1
  130. package/dist/NotificationServicesPushController/services/push/push-web.d.cts.map +1 -1
  131. package/dist/NotificationServicesPushController/services/push/push-web.d.mts.map +1 -1
  132. package/dist/NotificationServicesPushController/services/push/push-web.mjs +6 -3
  133. package/dist/NotificationServicesPushController/services/push/push-web.mjs.map +1 -1
  134. package/dist/NotificationServicesPushController/services/services.cjs.map +1 -1
  135. package/dist/NotificationServicesPushController/services/services.mjs.map +1 -1
  136. package/dist/NotificationServicesPushController/utils/get-notification-data.cjs.map +1 -1
  137. package/dist/NotificationServicesPushController/utils/get-notification-data.mjs.map +1 -1
  138. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs +51 -43
  139. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs.map +1 -1
  140. package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts +4 -2
  141. package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts.map +1 -1
  142. package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts +4 -2
  143. package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts.map +1 -1
  144. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +51 -43
  145. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -1
  146. package/dist/NotificationServicesPushController/web/push-utils.cjs +5 -2
  147. package/dist/NotificationServicesPushController/web/push-utils.cjs.map +1 -1
  148. package/dist/NotificationServicesPushController/web/push-utils.d.cts.map +1 -1
  149. package/dist/NotificationServicesPushController/web/push-utils.d.mts.map +1 -1
  150. package/dist/NotificationServicesPushController/web/push-utils.mjs +6 -3
  151. package/dist/NotificationServicesPushController/web/push-utils.mjs.map +1 -1
  152. package/dist/shared/is-onchain-notification.cjs +1 -2
  153. package/dist/shared/is-onchain-notification.cjs.map +1 -1
  154. package/dist/shared/is-onchain-notification.d.cts.map +1 -1
  155. package/dist/shared/is-onchain-notification.d.mts.map +1 -1
  156. package/dist/shared/is-onchain-notification.mjs +1 -2
  157. package/dist/shared/is-onchain-notification.mjs.map +1 -1
  158. package/dist/shared/to-raw-notification.cjs +22 -6
  159. package/dist/shared/to-raw-notification.cjs.map +1 -1
  160. package/dist/shared/to-raw-notification.d.cts +2 -2
  161. package/dist/shared/to-raw-notification.d.cts.map +1 -1
  162. package/dist/shared/to-raw-notification.d.mts +2 -2
  163. package/dist/shared/to-raw-notification.d.mts.map +1 -1
  164. package/dist/shared/to-raw-notification.mjs +20 -4
  165. package/dist/shared/to-raw-notification.mjs.map +1 -1
  166. package/package.json +5 -3
  167. package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs +0 -19
  168. package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs.map +0 -1
  169. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.cts +0 -10
  170. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.cts.map +0 -1
  171. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts +0 -10
  172. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts.map +0 -1
  173. package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs +0 -15
  174. package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs.map +0 -1
  175. package/dist/NotificationServicesController/services/onchain-notifications.cjs.map +0 -1
  176. package/dist/NotificationServicesController/services/onchain-notifications.d.cts.map +0 -1
  177. package/dist/NotificationServicesController/services/onchain-notifications.d.mts.map +0 -1
  178. package/dist/NotificationServicesController/services/onchain-notifications.mjs.map +0 -1
  179. package/dist/NotificationServicesController/types/on-chain-notification/index.cjs.map +0 -1
  180. package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts +0 -2
  181. package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts.map +0 -1
  182. package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts +0 -2
  183. package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts.map +0 -1
  184. package/dist/NotificationServicesController/types/on-chain-notification/index.mjs.map +0 -1
  185. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.cjs.map +0 -1
  186. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts +0 -49
  187. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts.map +0 -1
  188. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts +0 -49
  189. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts.map +0 -1
  190. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs +0 -2
  191. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs.map +0 -1
  192. package/dist/NotificationServicesController/types/on-chain-notification/schema.cjs.map +0 -1
  193. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts +0 -681
  194. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts.map +0 -1
  195. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts +0 -681
  196. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts.map +0 -1
  197. package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs.map +0 -1
  198. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/index.cjs +0 -0
  199. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/index.mjs +0 -0
  200. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/schema.cjs +0 -0
  201. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/schema.mjs +0 -0
@@ -16,15 +16,10 @@ export var TRIGGER_TYPES;
16
16
  TRIGGER_TYPES["ERC721_RECEIVED"] = "erc721_received";
17
17
  TRIGGER_TYPES["ERC1155_SENT"] = "erc1155_sent";
18
18
  TRIGGER_TYPES["ERC1155_RECEIVED"] = "erc1155_received";
19
- TRIGGER_TYPES["AAVE_V3_HEALTH_FACTOR"] = "aave_v3_health_factor";
20
- TRIGGER_TYPES["ENS_EXPIRATION"] = "ens_expiration";
21
- TRIGGER_TYPES["LIDO_STAKING_REWARDS"] = "lido_staking_rewards";
22
- TRIGGER_TYPES["ROCKETPOOL_STAKING_REWARDS"] = "rocketpool_staking_rewards";
23
- TRIGGER_TYPES["NOTIONAL_LOAN_EXPIRATION"] = "notional_loan_expiration";
24
- TRIGGER_TYPES["SPARK_FI_HEALTH_FACTOR"] = "spark_fi_health_factor";
25
19
  TRIGGER_TYPES["SNAP"] = "snap";
20
+ TRIGGER_TYPES["PLATFORM"] = "platform";
26
21
  })(TRIGGER_TYPES || (TRIGGER_TYPES = {}));
27
- export const TRIGGER_TYPES_WALLET_SET = new Set([
22
+ export const NOTIFICATION_API_TRIGGER_TYPES_SET = new Set([
28
23
  TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,
29
24
  TRIGGER_TYPES.ERC20_SENT,
30
25
  TRIGGER_TYPES.ERC20_RECEIVED,
@@ -40,13 +35,8 @@ export const TRIGGER_TYPES_WALLET_SET = new Set([
40
35
  TRIGGER_TYPES.ERC721_RECEIVED,
41
36
  TRIGGER_TYPES.ERC1155_SENT,
42
37
  TRIGGER_TYPES.ERC1155_RECEIVED,
38
+ TRIGGER_TYPES.PLATFORM,
43
39
  ]);
44
- export var TRIGGER_TYPES_GROUPS;
45
- (function (TRIGGER_TYPES_GROUPS) {
46
- TRIGGER_TYPES_GROUPS["RECEIVED"] = "received";
47
- TRIGGER_TYPES_GROUPS["SENT"] = "sent";
48
- TRIGGER_TYPES_GROUPS["DEFI"] = "defi";
49
- })(TRIGGER_TYPES_GROUPS || (TRIGGER_TYPES_GROUPS = {}));
50
40
  export const NOTIFICATION_CHAINS_ID = {
51
41
  ETHEREUM: '1',
52
42
  OPTIMISM: '10',
@@ -1 +1 @@
1
- {"version":3,"file":"notification-schema.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAwBX;AAxBD,WAAY,aAAa;IACvB,gEAA+C,CAAA;IAC/C,oEAAmD,CAAA;IACnD,0CAAyB,CAAA;IACzB,kDAAiC,CAAA;IACjC,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;IAC7B,0EAAyD,CAAA;IACzD,8EAA6D,CAAA;IAC7D,8DAA6C,CAAA;IAC7C,wEAAuD,CAAA;IACvD,wEAAuD,CAAA;IACvD,sFAAqE,CAAA;IACrE,4CAA2B,CAAA;IAC3B,oDAAmC,CAAA;IACnC,8CAA6B,CAAA;IAC7B,sDAAqC,CAAA;IACrC,gEAA+C,CAAA;IAC/C,kDAAiC,CAAA;IACjC,8DAA6C,CAAA;IAC7C,0EAAyD,CAAA;IACzD,sEAAqD,CAAA;IACrD,kEAAiD,CAAA;IACjD,8BAAa,CAAA;AACf,CAAC,EAxBW,aAAa,KAAb,aAAa,QAwBxB;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAgB,IAAI,GAAG,CAAC;IAC3D,aAAa,CAAC,uBAAuB;IACrC,aAAa,CAAC,UAAU;IACxB,aAAa,CAAC,cAAc;IAC5B,aAAa,CAAC,QAAQ;IACtB,aAAa,CAAC,YAAY;IAC1B,aAAa,CAAC,0BAA0B;IACxC,aAAa,CAAC,4BAA4B;IAC1C,aAAa,CAAC,oBAAoB;IAClC,aAAa,CAAC,yBAAyB;IACvC,aAAa,CAAC,yBAAyB;IACvC,aAAa,CAAC,gCAAgC;IAC9C,aAAa,CAAC,WAAW;IACzB,aAAa,CAAC,eAAe;IAC7B,aAAa,CAAC,YAAY;IAC1B,aAAa,CAAC,gBAAgB;CAC/B,CAA4E,CAAC;AAE9E,MAAM,CAAN,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;IACrB,qCAAa,CAAA;IACb,qCAAa,CAAA;AACf,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,IAAI;IACd,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,MAAM;CACH,CAAC","sourcesContent":["export enum TRIGGER_TYPES {\n FEATURES_ANNOUNCEMENT = 'features_announcement',\n METAMASK_SWAP_COMPLETED = 'metamask_swap_completed',\n ERC20_SENT = 'erc20_sent',\n ERC20_RECEIVED = 'erc20_received',\n ETH_SENT = 'eth_sent',\n ETH_RECEIVED = 'eth_received',\n ROCKETPOOL_STAKE_COMPLETED = 'rocketpool_stake_completed',\n ROCKETPOOL_UNSTAKE_COMPLETED = 'rocketpool_unstake_completed',\n LIDO_STAKE_COMPLETED = 'lido_stake_completed',\n LIDO_WITHDRAWAL_REQUESTED = 'lido_withdrawal_requested',\n LIDO_WITHDRAWAL_COMPLETED = 'lido_withdrawal_completed',\n LIDO_STAKE_READY_TO_BE_WITHDRAWN = 'lido_stake_ready_to_be_withdrawn',\n ERC721_SENT = 'erc721_sent',\n ERC721_RECEIVED = 'erc721_received',\n ERC1155_SENT = 'erc1155_sent',\n ERC1155_RECEIVED = 'erc1155_received',\n AAVE_V3_HEALTH_FACTOR = 'aave_v3_health_factor',\n ENS_EXPIRATION = 'ens_expiration',\n LIDO_STAKING_REWARDS = 'lido_staking_rewards',\n ROCKETPOOL_STAKING_REWARDS = 'rocketpool_staking_rewards',\n NOTIONAL_LOAN_EXPIRATION = 'notional_loan_expiration',\n SPARK_FI_HEALTH_FACTOR = 'spark_fi_health_factor',\n SNAP = 'snap',\n}\n\nexport const TRIGGER_TYPES_WALLET_SET: Set<string> = new Set([\n TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,\n TRIGGER_TYPES.ERC20_SENT,\n TRIGGER_TYPES.ERC20_RECEIVED,\n TRIGGER_TYPES.ETH_SENT,\n TRIGGER_TYPES.ETH_RECEIVED,\n TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,\n TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,\n TRIGGER_TYPES.ERC721_SENT,\n TRIGGER_TYPES.ERC721_RECEIVED,\n TRIGGER_TYPES.ERC1155_SENT,\n TRIGGER_TYPES.ERC1155_RECEIVED,\n]) satisfies Set<Exclude<TRIGGER_TYPES, TRIGGER_TYPES.FEATURES_ANNOUNCEMENT>>;\n\nexport enum TRIGGER_TYPES_GROUPS {\n RECEIVED = 'received',\n SENT = 'sent',\n DEFI = 'defi',\n}\n\nexport const NOTIFICATION_CHAINS_ID = {\n ETHEREUM: '1',\n OPTIMISM: '10',\n BSC: '56',\n BASE: '8453',\n POLYGON: '137',\n ARBITRUM: '42161',\n AVALANCHE: '43114',\n LINEA: '59144',\n SEI: '1329',\n} as const;\n\nexport type NOTIFICATION_CHAINS_IDS =\n (typeof NOTIFICATION_CHAINS_ID)[keyof typeof NOTIFICATION_CHAINS_ID];\n"]}
1
+ {"version":3,"file":"notification-schema.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/constants/notification-schema.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAmBX;AAnBD,WAAY,aAAa;IACvB,gEAA+C,CAAA;IAC/C,oEAAmD,CAAA;IACnD,0CAAyB,CAAA;IACzB,kDAAiC,CAAA;IACjC,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;IAC7B,0EAAyD,CAAA;IACzD,8EAA6D,CAAA;IAC7D,8DAA6C,CAAA;IAC7C,wEAAuD,CAAA;IACvD,wEAAuD,CAAA;IACvD,sFAAqE,CAAA;IACrE,4CAA2B,CAAA;IAC3B,oDAAmC,CAAA;IACnC,8CAA6B,CAAA;IAC7B,sDAAqC,CAAA;IACrC,8BAAa,CAAA;IACb,sCAAqB,CAAA;AACvB,CAAC,EAnBW,aAAa,KAAb,aAAa,QAmBxB;AAED,MAAM,CAAC,MAAM,kCAAkC,GAAgB,IAAI,GAAG,CAAC;IACrE,aAAa,CAAC,uBAAuB;IACrC,aAAa,CAAC,UAAU;IACxB,aAAa,CAAC,cAAc;IAC5B,aAAa,CAAC,QAAQ;IACtB,aAAa,CAAC,YAAY;IAC1B,aAAa,CAAC,0BAA0B;IACxC,aAAa,CAAC,4BAA4B;IAC1C,aAAa,CAAC,oBAAoB;IAClC,aAAa,CAAC,yBAAyB;IACvC,aAAa,CAAC,yBAAyB;IACvC,aAAa,CAAC,gCAAgC;IAC9C,aAAa,CAAC,WAAW;IACzB,aAAa,CAAC,eAAe;IAC7B,aAAa,CAAC,YAAY;IAC1B,aAAa,CAAC,gBAAgB;IAC9B,aAAa,CAAC,QAAQ;CACvB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,QAAQ,EAAE,GAAG;IACb,QAAQ,EAAE,IAAI;IACd,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,OAAO;IACjB,SAAS,EAAE,OAAO;IAClB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,MAAM;CACH,CAAC","sourcesContent":["export enum TRIGGER_TYPES {\n FEATURES_ANNOUNCEMENT = 'features_announcement',\n METAMASK_SWAP_COMPLETED = 'metamask_swap_completed',\n ERC20_SENT = 'erc20_sent',\n ERC20_RECEIVED = 'erc20_received',\n ETH_SENT = 'eth_sent',\n ETH_RECEIVED = 'eth_received',\n ROCKETPOOL_STAKE_COMPLETED = 'rocketpool_stake_completed',\n ROCKETPOOL_UNSTAKE_COMPLETED = 'rocketpool_unstake_completed',\n LIDO_STAKE_COMPLETED = 'lido_stake_completed',\n LIDO_WITHDRAWAL_REQUESTED = 'lido_withdrawal_requested',\n LIDO_WITHDRAWAL_COMPLETED = 'lido_withdrawal_completed',\n LIDO_STAKE_READY_TO_BE_WITHDRAWN = 'lido_stake_ready_to_be_withdrawn',\n ERC721_SENT = 'erc721_sent',\n ERC721_RECEIVED = 'erc721_received',\n ERC1155_SENT = 'erc1155_sent',\n ERC1155_RECEIVED = 'erc1155_received',\n SNAP = 'snap',\n PLATFORM = 'platform',\n}\n\nexport const NOTIFICATION_API_TRIGGER_TYPES_SET: Set<string> = new Set([\n TRIGGER_TYPES.METAMASK_SWAP_COMPLETED,\n TRIGGER_TYPES.ERC20_SENT,\n TRIGGER_TYPES.ERC20_RECEIVED,\n TRIGGER_TYPES.ETH_SENT,\n TRIGGER_TYPES.ETH_RECEIVED,\n TRIGGER_TYPES.ROCKETPOOL_STAKE_COMPLETED,\n TRIGGER_TYPES.ROCKETPOOL_UNSTAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_COMPLETED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_REQUESTED,\n TRIGGER_TYPES.LIDO_WITHDRAWAL_COMPLETED,\n TRIGGER_TYPES.LIDO_STAKE_READY_TO_BE_WITHDRAWN,\n TRIGGER_TYPES.ERC721_SENT,\n TRIGGER_TYPES.ERC721_RECEIVED,\n TRIGGER_TYPES.ERC1155_SENT,\n TRIGGER_TYPES.ERC1155_RECEIVED,\n TRIGGER_TYPES.PLATFORM,\n]);\n\nexport const NOTIFICATION_CHAINS_ID = {\n ETHEREUM: '1',\n OPTIMISM: '10',\n BSC: '56',\n BASE: '8453',\n POLYGON: '137',\n ARBITRUM: '42161',\n AVALANCHE: '43114',\n LINEA: '59144',\n SEI: '1329',\n} as const;\n\nexport type NOTIFICATION_CHAINS_IDS =\n (typeof NOTIFICATION_CHAINS_ID)[keyof typeof NOTIFICATION_CHAINS_ID];\n"]}