@metamask-previews/notification-services-controller 19.0.0-preview-7b698bb → 19.0.0-preview-ba016213

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 (187) hide show
  1. package/CHANGELOG.md +21 -0
  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 +428 -530
  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 +425 -522
  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/perp-notifications.cjs +0 -1
  73. package/dist/NotificationServicesController/services/perp-notifications.cjs.map +1 -1
  74. package/dist/NotificationServicesController/services/perp-notifications.d.cts.map +1 -1
  75. package/dist/NotificationServicesController/services/perp-notifications.d.mts.map +1 -1
  76. package/dist/NotificationServicesController/services/perp-notifications.mjs +0 -1
  77. package/dist/NotificationServicesController/services/perp-notifications.mjs.map +1 -1
  78. package/dist/NotificationServicesController/types/index.cjs.map +1 -1
  79. package/dist/NotificationServicesController/types/index.d.cts +1 -1
  80. package/dist/NotificationServicesController/types/index.d.cts.map +1 -1
  81. package/dist/NotificationServicesController/types/index.d.mts +1 -1
  82. package/dist/NotificationServicesController/types/index.d.mts.map +1 -1
  83. package/dist/NotificationServicesController/types/index.mjs.map +1 -1
  84. package/dist/NotificationServicesController/types/notification/notification.cjs.map +1 -1
  85. package/dist/NotificationServicesController/types/notification/notification.d.cts +3 -11
  86. package/dist/NotificationServicesController/types/notification/notification.d.cts.map +1 -1
  87. package/dist/NotificationServicesController/types/notification/notification.d.mts +3 -11
  88. package/dist/NotificationServicesController/types/notification/notification.d.mts.map +1 -1
  89. package/dist/NotificationServicesController/types/notification/notification.mjs.map +1 -1
  90. package/dist/NotificationServicesController/types/notification-api/index.cjs.map +1 -0
  91. package/dist/NotificationServicesController/types/notification-api/index.d.cts +3 -0
  92. package/dist/NotificationServicesController/types/notification-api/index.d.cts.map +1 -0
  93. package/dist/NotificationServicesController/types/notification-api/index.d.mts +3 -0
  94. package/dist/NotificationServicesController/types/notification-api/index.d.mts.map +1 -0
  95. package/dist/NotificationServicesController/types/notification-api/index.mjs.map +1 -0
  96. package/dist/NotificationServicesController/types/{on-chain-notification/on-chain-notification.cjs → notification-api/notification-api.cjs} +1 -1
  97. package/dist/NotificationServicesController/types/notification-api/notification-api.cjs.map +1 -0
  98. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts +64 -0
  99. package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts.map +1 -0
  100. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts +64 -0
  101. package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts.map +1 -0
  102. package/dist/NotificationServicesController/types/notification-api/notification-api.mjs +2 -0
  103. package/dist/NotificationServicesController/types/notification-api/notification-api.mjs.map +1 -0
  104. package/dist/NotificationServicesController/types/notification-api/schema.cjs.map +1 -0
  105. package/dist/NotificationServicesController/types/notification-api/schema.d.cts +365 -0
  106. package/dist/NotificationServicesController/types/notification-api/schema.d.cts.map +1 -0
  107. package/dist/NotificationServicesController/types/notification-api/schema.d.mts +365 -0
  108. package/dist/NotificationServicesController/types/notification-api/schema.d.mts.map +1 -0
  109. package/dist/NotificationServicesController/types/notification-api/schema.mjs.map +1 -0
  110. package/dist/NotificationServicesController/utils/should-auto-expire.cjs +12 -0
  111. package/dist/NotificationServicesController/utils/should-auto-expire.cjs.map +1 -0
  112. package/dist/NotificationServicesController/utils/should-auto-expire.d.cts +2 -0
  113. package/dist/NotificationServicesController/utils/should-auto-expire.d.cts.map +1 -0
  114. package/dist/NotificationServicesController/utils/should-auto-expire.d.mts +2 -0
  115. package/dist/NotificationServicesController/utils/should-auto-expire.d.mts.map +1 -0
  116. package/dist/NotificationServicesController/utils/should-auto-expire.mjs +8 -0
  117. package/dist/NotificationServicesController/utils/should-auto-expire.mjs.map +1 -0
  118. package/dist/NotificationServicesPushController/services/push/push-web.cjs +5 -2
  119. package/dist/NotificationServicesPushController/services/push/push-web.cjs.map +1 -1
  120. package/dist/NotificationServicesPushController/services/push/push-web.d.cts.map +1 -1
  121. package/dist/NotificationServicesPushController/services/push/push-web.d.mts.map +1 -1
  122. package/dist/NotificationServicesPushController/services/push/push-web.mjs +6 -3
  123. package/dist/NotificationServicesPushController/services/push/push-web.mjs.map +1 -1
  124. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs +51 -43
  125. package/dist/NotificationServicesPushController/utils/get-notification-message.cjs.map +1 -1
  126. package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts +4 -2
  127. package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts.map +1 -1
  128. package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts +4 -2
  129. package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts.map +1 -1
  130. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +51 -43
  131. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -1
  132. package/dist/NotificationServicesPushController/web/push-utils.cjs +5 -2
  133. package/dist/NotificationServicesPushController/web/push-utils.cjs.map +1 -1
  134. package/dist/NotificationServicesPushController/web/push-utils.d.cts.map +1 -1
  135. package/dist/NotificationServicesPushController/web/push-utils.d.mts.map +1 -1
  136. package/dist/NotificationServicesPushController/web/push-utils.mjs +6 -3
  137. package/dist/NotificationServicesPushController/web/push-utils.mjs.map +1 -1
  138. package/dist/shared/is-onchain-notification.cjs +1 -2
  139. package/dist/shared/is-onchain-notification.cjs.map +1 -1
  140. package/dist/shared/is-onchain-notification.d.cts.map +1 -1
  141. package/dist/shared/is-onchain-notification.d.mts.map +1 -1
  142. package/dist/shared/is-onchain-notification.mjs +1 -2
  143. package/dist/shared/is-onchain-notification.mjs.map +1 -1
  144. package/dist/shared/to-raw-notification.cjs +19 -6
  145. package/dist/shared/to-raw-notification.cjs.map +1 -1
  146. package/dist/shared/to-raw-notification.d.cts +2 -2
  147. package/dist/shared/to-raw-notification.d.cts.map +1 -1
  148. package/dist/shared/to-raw-notification.d.mts +2 -2
  149. package/dist/shared/to-raw-notification.d.mts.map +1 -1
  150. package/dist/shared/to-raw-notification.mjs +17 -4
  151. package/dist/shared/to-raw-notification.mjs.map +1 -1
  152. package/package.json +1 -1
  153. package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs +0 -19
  154. package/dist/NotificationServicesController/processors/process-onchain-notifications.cjs.map +0 -1
  155. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.cts +0 -10
  156. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.cts.map +0 -1
  157. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts +0 -10
  158. package/dist/NotificationServicesController/processors/process-onchain-notifications.d.mts.map +0 -1
  159. package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs +0 -15
  160. package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs.map +0 -1
  161. package/dist/NotificationServicesController/services/onchain-notifications.cjs.map +0 -1
  162. package/dist/NotificationServicesController/services/onchain-notifications.d.cts.map +0 -1
  163. package/dist/NotificationServicesController/services/onchain-notifications.d.mts.map +0 -1
  164. package/dist/NotificationServicesController/services/onchain-notifications.mjs.map +0 -1
  165. package/dist/NotificationServicesController/types/on-chain-notification/index.cjs.map +0 -1
  166. package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts +0 -2
  167. package/dist/NotificationServicesController/types/on-chain-notification/index.d.cts.map +0 -1
  168. package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts +0 -2
  169. package/dist/NotificationServicesController/types/on-chain-notification/index.d.mts.map +0 -1
  170. package/dist/NotificationServicesController/types/on-chain-notification/index.mjs.map +0 -1
  171. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.cjs.map +0 -1
  172. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts +0 -49
  173. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts.map +0 -1
  174. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts +0 -49
  175. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts.map +0 -1
  176. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs +0 -2
  177. package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs.map +0 -1
  178. package/dist/NotificationServicesController/types/on-chain-notification/schema.cjs.map +0 -1
  179. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts +0 -681
  180. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts.map +0 -1
  181. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts +0 -681
  182. package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts.map +0 -1
  183. package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs.map +0 -1
  184. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/index.cjs +0 -0
  185. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/index.mjs +0 -0
  186. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/schema.cjs +0 -0
  187. /package/dist/NotificationServicesController/types/{on-chain-notification → notification-api}/schema.mjs +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"notification.mjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification/notification.ts"],"names":[],"mappings":"","sourcesContent":["import type { FeatureAnnouncementRawNotification } from '../feature-announcement/feature-announcement';\nimport type { OnChainRawNotification } from '../on-chain-notification/on-chain-notification';\nimport type { RawSnapNotification } from '../snaps';\nimport type { Compute } from '../type-utils';\n\nexport type BaseNotification = {\n id: string;\n createdAt: string;\n isRead: boolean;\n};\n\nexport type RawNotificationUnion =\n | OnChainRawNotification\n | FeatureAnnouncementRawNotification\n | RawSnapNotification;\n\n/**\n * The shape of a \"generic\" notification.\n * Other than the fields listed below, tt will also contain:\n * - `type` field (declared in the Raw shapes)\n * - `data` field (declared in the Raw shapes)\n */\nexport type INotification = Compute<\n | (FeatureAnnouncementRawNotification & BaseNotification)\n | (OnChainRawNotification & BaseNotification)\n | (RawSnapNotification & BaseNotification & { readDate?: string | null })\n>;\n\n// NFT\nexport type NFT = {\n token_id: string;\n image: string;\n collection?: {\n name: string;\n image: string;\n };\n};\n\nexport type MarkAsReadNotificationsParam = Pick<\n INotification,\n 'id' | 'type' | 'isRead'\n>[];\n"]}
1
+ {"version":3,"file":"notification.mjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification/notification.ts"],"names":[],"mappings":"","sourcesContent":["import type { FeatureAnnouncementRawNotification } from '../feature-announcement/feature-announcement';\nimport type { NormalisedAPINotification } from '../notification-api/notification-api';\nimport type { RawSnapNotification } from '../snaps';\nimport type { Compute } from '../type-utils';\n\nexport type BaseNotification = {\n id: string;\n createdAt: string;\n isRead: boolean;\n};\n\nexport type RawNotificationUnion =\n | NormalisedAPINotification\n | FeatureAnnouncementRawNotification\n | RawSnapNotification;\n\n/**\n * The shape of a \"generic\" notification.\n * Other than the fields listed below, tt will also contain:\n * - `type` field (declared in the Raw shapes)\n * - `data` field (declared in the Raw shapes)\n */\nexport type INotification = Compute<\n | (FeatureAnnouncementRawNotification & BaseNotification)\n | (NormalisedAPINotification & BaseNotification)\n | (RawSnapNotification & BaseNotification & { readDate?: string | null })\n>;\n\nexport type MarkAsReadNotificationsParam = Pick<\n INotification,\n 'id' | 'type' | 'isRead'\n>[];\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/index.ts"],"names":[],"mappings":"","sourcesContent":["export type * from './notification-api';\nexport type * as Schema from './schema';\n"]}
@@ -0,0 +1,3 @@
1
+ export type * from "./notification-api.cjs";
2
+ export type * as Schema from "./schema.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/index.ts"],"names":[],"mappings":"AAAA,4CAAwC;AACxC,YAAY,KAAK,MAAM,qBAAiB"}
@@ -0,0 +1,3 @@
1
+ export type * from "./notification-api.mjs";
2
+ export type * as Schema from "./schema.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/index.ts"],"names":[],"mappings":"AAAA,4CAAwC;AACxC,YAAY,KAAK,MAAM,qBAAiB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/index.ts"],"names":[],"mappings":"","sourcesContent":["export type * from './notification-api';\nexport type * as Schema from './schema';\n"]}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=on-chain-notification.cjs.map
3
+ //# sourceMappingURL=notification-api.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-api.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"","sourcesContent":["import type { components } from './schema';\nimport type { TRIGGER_TYPES } from '../../constants/notification-schema';\nimport type { Compute } from '../type-utils';\n\nexport type Data_MetamaskSwapCompleted =\n components['schemas']['Data_MetamaskSwapCompleted'];\nexport type Data_LidoStakeReadyToBeWithdrawn =\n components['schemas']['Data_LidoStakeReadyToBeWithdrawn'];\nexport type Data_LidoStakeCompleted =\n components['schemas']['Data_LidoStakeCompleted'];\nexport type Data_LidoWithdrawalRequested =\n components['schemas']['Data_LidoWithdrawalRequested'];\nexport type Data_LidoWithdrawalCompleted =\n components['schemas']['Data_LidoWithdrawalCompleted'];\nexport type Data_RocketPoolStakeCompleted =\n components['schemas']['Data_RocketPoolStakeCompleted'];\nexport type Data_RocketPoolUnstakeCompleted =\n components['schemas']['Data_RocketPoolUnstakeCompleted'];\nexport type Data_ETHSent = components['schemas']['Data_ETHSent'];\nexport type Data_ETHReceived = components['schemas']['Data_ETHReceived'];\nexport type Data_ERC20Sent = components['schemas']['Data_ERC20Sent'];\nexport type Data_ERC20Received = components['schemas']['Data_ERC20Received'];\nexport type Data_ERC721Sent = components['schemas']['Data_ERC721Sent'];\nexport type Data_ERC721Received = components['schemas']['Data_ERC721Received'];\n\ntype Notification = components['schemas']['NotificationOutputV3'][number];\ntype PlatformNotification = Extract<\n Notification,\n { notification_type: 'platform' }\n>;\ntype OnChainNotification = Extract<\n Notification,\n { notification_type: 'on-chain' }\n>;\n\ntype ConvertToEnum<Kind> = {\n [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;\n}[TRIGGER_TYPES];\n\n/**\n * Type-Computation.\n * Adds a `type` field to on-chain notifications for easier enum checking.\n * Preserves the original nested payload structure.\n */\ntype NormalizeOnChainNotification<\n N extends OnChainNotification = OnChainNotification,\n NotificationDataKinds extends string = NonNullable<\n N['payload']['data']\n >['kind'],\n> = {\n [K in NotificationDataKinds]: Compute<\n Omit<N, 'payload'> & {\n type: ConvertToEnum<K>;\n payload: Compute<\n Omit<N['payload'], 'data'> & {\n data: Extract<NonNullable<N['payload']['data']>, { kind: K }>;\n }\n >;\n }\n >;\n}[NotificationDataKinds];\n\n/**\n * Type-Computation.\n * Adds a `type` field to platform notifications for easier enum checking.\n * Preserves the original nested payload structure.\n */\ntype NormalizePlatformNotification<\n N extends PlatformNotification = PlatformNotification,\n NotificationKind extends string = N['notification_type'],\n> = {\n [K in NotificationKind]: Compute<\n N & {\n type: ConvertToEnum<K>;\n }\n >;\n}[NotificationKind];\n\nexport type OnChainRawNotification = Compute<\n NormalizeOnChainNotification<OnChainNotification>\n>;\n\nexport type PlatformRawNotification = Compute<\n NormalizePlatformNotification<PlatformNotification>\n>;\n\nexport type UnprocessedRawNotification = Notification;\n\nexport type NormalisedAPINotification =\n | OnChainRawNotification\n | PlatformRawNotification;\n\nexport type OnChainRawNotificationsWithNetworkFields = Extract<\n OnChainRawNotification,\n { payload: { data: { network_fee: unknown } } }\n>;\n"]}
@@ -0,0 +1,64 @@
1
+ import type { components } from "./schema.cjs";
2
+ import type { TRIGGER_TYPES } from "../../constants/notification-schema.cjs";
3
+ import type { Compute } from "../type-utils.cjs";
4
+ export type Data_MetamaskSwapCompleted = components['schemas']['Data_MetamaskSwapCompleted'];
5
+ export type Data_LidoStakeReadyToBeWithdrawn = components['schemas']['Data_LidoStakeReadyToBeWithdrawn'];
6
+ export type Data_LidoStakeCompleted = components['schemas']['Data_LidoStakeCompleted'];
7
+ export type Data_LidoWithdrawalRequested = components['schemas']['Data_LidoWithdrawalRequested'];
8
+ export type Data_LidoWithdrawalCompleted = components['schemas']['Data_LidoWithdrawalCompleted'];
9
+ export type Data_RocketPoolStakeCompleted = components['schemas']['Data_RocketPoolStakeCompleted'];
10
+ export type Data_RocketPoolUnstakeCompleted = components['schemas']['Data_RocketPoolUnstakeCompleted'];
11
+ export type Data_ETHSent = components['schemas']['Data_ETHSent'];
12
+ export type Data_ETHReceived = components['schemas']['Data_ETHReceived'];
13
+ export type Data_ERC20Sent = components['schemas']['Data_ERC20Sent'];
14
+ export type Data_ERC20Received = components['schemas']['Data_ERC20Received'];
15
+ export type Data_ERC721Sent = components['schemas']['Data_ERC721Sent'];
16
+ export type Data_ERC721Received = components['schemas']['Data_ERC721Received'];
17
+ type Notification = components['schemas']['NotificationOutputV3'][number];
18
+ type PlatformNotification = Extract<Notification, {
19
+ notification_type: 'platform';
20
+ }>;
21
+ type OnChainNotification = Extract<Notification, {
22
+ notification_type: 'on-chain';
23
+ }>;
24
+ type ConvertToEnum<Kind> = {
25
+ [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;
26
+ }[TRIGGER_TYPES];
27
+ /**
28
+ * Type-Computation.
29
+ * Adds a `type` field to on-chain notifications for easier enum checking.
30
+ * Preserves the original nested payload structure.
31
+ */
32
+ type NormalizeOnChainNotification<N extends OnChainNotification = OnChainNotification, NotificationDataKinds extends string = NonNullable<N['payload']['data']>['kind']> = {
33
+ [K in NotificationDataKinds]: Compute<Omit<N, 'payload'> & {
34
+ type: ConvertToEnum<K>;
35
+ payload: Compute<Omit<N['payload'], 'data'> & {
36
+ data: Extract<NonNullable<N['payload']['data']>, {
37
+ kind: K;
38
+ }>;
39
+ }>;
40
+ }>;
41
+ }[NotificationDataKinds];
42
+ /**
43
+ * Type-Computation.
44
+ * Adds a `type` field to platform notifications for easier enum checking.
45
+ * Preserves the original nested payload structure.
46
+ */
47
+ type NormalizePlatformNotification<N extends PlatformNotification = PlatformNotification, NotificationKind extends string = N['notification_type']> = {
48
+ [K in NotificationKind]: Compute<N & {
49
+ type: ConvertToEnum<K>;
50
+ }>;
51
+ }[NotificationKind];
52
+ export type OnChainRawNotification = Compute<NormalizeOnChainNotification<OnChainNotification>>;
53
+ export type PlatformRawNotification = Compute<NormalizePlatformNotification<PlatformNotification>>;
54
+ export type UnprocessedRawNotification = Notification;
55
+ export type NormalisedAPINotification = OnChainRawNotification | PlatformRawNotification;
56
+ export type OnChainRawNotificationsWithNetworkFields = Extract<OnChainRawNotification, {
57
+ payload: {
58
+ data: {
59
+ network_fee: unknown;
60
+ };
61
+ };
62
+ }>;
63
+ export {};
64
+ //# sourceMappingURL=notification-api.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-api.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAiB;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,gDAA4C;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,0BAAsB;AAE7C,MAAM,MAAM,0BAA0B,GACpC,UAAU,CAAC,SAAS,CAAC,CAAC,4BAA4B,CAAC,CAAC;AACtD,MAAM,MAAM,gCAAgC,GAC1C,UAAU,CAAC,SAAS,CAAC,CAAC,kCAAkC,CAAC,CAAC;AAC5D,MAAM,MAAM,uBAAuB,GACjC,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAC;AACnD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,6BAA6B,GACvC,UAAU,CAAC,SAAS,CAAC,CAAC,+BAA+B,CAAC,CAAC;AACzD,MAAM,MAAM,+BAA+B,GACzC,UAAU,CAAC,SAAS,CAAC,CAAC,iCAAiC,CAAC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC;AACjE,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAC;AAC7E,MAAM,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AIG;AACH,KAAK,6BAA6B,CAChC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EACrD,gBAAgB,SAAS,MAAM,GAAG,CAAC,CAAC,mBAAmB,CAAC,IACtD;KACD,CAAC,IAAI,gBAAgB,GAAG,OAAO,CAC9B,CAAC,GAAG;QACF,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KACxB,CACF;CACF,CAAC,gBAAgB,CAAC,CAAC;AAEpB,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAC1C,4BAA4B,CAAC,mBAAmB,CAAC,CAClD,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAC3C,6BAA6B,CAAC,oBAAoB,CAAC,CACpD,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,YAAY,CAAC;AAEtD,MAAM,MAAM,yBAAyB,GACjC,sBAAsB,GACtB,uBAAuB,CAAC;AAE5B,MAAM,MAAM,wCAAwC,GAAG,OAAO,CAC5D,sBAAsB,EACtB;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE;YAAE,WAAW,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,CAChD,CAAC"}
@@ -0,0 +1,64 @@
1
+ import type { components } from "./schema.mjs";
2
+ import type { TRIGGER_TYPES } from "../../constants/notification-schema.mjs";
3
+ import type { Compute } from "../type-utils.mjs";
4
+ export type Data_MetamaskSwapCompleted = components['schemas']['Data_MetamaskSwapCompleted'];
5
+ export type Data_LidoStakeReadyToBeWithdrawn = components['schemas']['Data_LidoStakeReadyToBeWithdrawn'];
6
+ export type Data_LidoStakeCompleted = components['schemas']['Data_LidoStakeCompleted'];
7
+ export type Data_LidoWithdrawalRequested = components['schemas']['Data_LidoWithdrawalRequested'];
8
+ export type Data_LidoWithdrawalCompleted = components['schemas']['Data_LidoWithdrawalCompleted'];
9
+ export type Data_RocketPoolStakeCompleted = components['schemas']['Data_RocketPoolStakeCompleted'];
10
+ export type Data_RocketPoolUnstakeCompleted = components['schemas']['Data_RocketPoolUnstakeCompleted'];
11
+ export type Data_ETHSent = components['schemas']['Data_ETHSent'];
12
+ export type Data_ETHReceived = components['schemas']['Data_ETHReceived'];
13
+ export type Data_ERC20Sent = components['schemas']['Data_ERC20Sent'];
14
+ export type Data_ERC20Received = components['schemas']['Data_ERC20Received'];
15
+ export type Data_ERC721Sent = components['schemas']['Data_ERC721Sent'];
16
+ export type Data_ERC721Received = components['schemas']['Data_ERC721Received'];
17
+ type Notification = components['schemas']['NotificationOutputV3'][number];
18
+ type PlatformNotification = Extract<Notification, {
19
+ notification_type: 'platform';
20
+ }>;
21
+ type OnChainNotification = Extract<Notification, {
22
+ notification_type: 'on-chain';
23
+ }>;
24
+ type ConvertToEnum<Kind> = {
25
+ [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;
26
+ }[TRIGGER_TYPES];
27
+ /**
28
+ * Type-Computation.
29
+ * Adds a `type` field to on-chain notifications for easier enum checking.
30
+ * Preserves the original nested payload structure.
31
+ */
32
+ type NormalizeOnChainNotification<N extends OnChainNotification = OnChainNotification, NotificationDataKinds extends string = NonNullable<N['payload']['data']>['kind']> = {
33
+ [K in NotificationDataKinds]: Compute<Omit<N, 'payload'> & {
34
+ type: ConvertToEnum<K>;
35
+ payload: Compute<Omit<N['payload'], 'data'> & {
36
+ data: Extract<NonNullable<N['payload']['data']>, {
37
+ kind: K;
38
+ }>;
39
+ }>;
40
+ }>;
41
+ }[NotificationDataKinds];
42
+ /**
43
+ * Type-Computation.
44
+ * Adds a `type` field to platform notifications for easier enum checking.
45
+ * Preserves the original nested payload structure.
46
+ */
47
+ type NormalizePlatformNotification<N extends PlatformNotification = PlatformNotification, NotificationKind extends string = N['notification_type']> = {
48
+ [K in NotificationKind]: Compute<N & {
49
+ type: ConvertToEnum<K>;
50
+ }>;
51
+ }[NotificationKind];
52
+ export type OnChainRawNotification = Compute<NormalizeOnChainNotification<OnChainNotification>>;
53
+ export type PlatformRawNotification = Compute<NormalizePlatformNotification<PlatformNotification>>;
54
+ export type UnprocessedRawNotification = Notification;
55
+ export type NormalisedAPINotification = OnChainRawNotification | PlatformRawNotification;
56
+ export type OnChainRawNotificationsWithNetworkFields = Extract<OnChainRawNotification, {
57
+ payload: {
58
+ data: {
59
+ network_fee: unknown;
60
+ };
61
+ };
62
+ }>;
63
+ export {};
64
+ //# sourceMappingURL=notification-api.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-api.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAiB;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,gDAA4C;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,0BAAsB;AAE7C,MAAM,MAAM,0BAA0B,GACpC,UAAU,CAAC,SAAS,CAAC,CAAC,4BAA4B,CAAC,CAAC;AACtD,MAAM,MAAM,gCAAgC,GAC1C,UAAU,CAAC,SAAS,CAAC,CAAC,kCAAkC,CAAC,CAAC;AAC5D,MAAM,MAAM,uBAAuB,GACjC,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAC;AACnD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,6BAA6B,GACvC,UAAU,CAAC,SAAS,CAAC,CAAC,+BAA+B,CAAC,CAAC;AACzD,MAAM,MAAM,+BAA+B,GACzC,UAAU,CAAC,SAAS,CAAC,CAAC,iCAAiC,CAAC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC;AACjE,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;A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,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE;gBAAE,IAAI,EAAE,CAAC,CAAA;aAAE,CAAC,CAAC;SAC/D,CACF,CAAC;KACH,CACF;CACF,CAAC,qBAAqB,CAAC,CAAC;AAEzB;;;;GAIG;AACH,KAAK,6BAA6B,CAChC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EACrD,gBAAgB,SAAS,MAAM,GAAG,CAAC,CAAC,mBAAmB,CAAC,IACtD;KACD,CAAC,IAAI,gBAAgB,GAAG,OAAO,CAC9B,CAAC,GAAG;QACF,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;KACxB,CACF;CACF,CAAC,gBAAgB,CAAC,CAAC;AAEpB,MAAM,MAAM,sBAAsB,GAAG,OAAO,CAC1C,4BAA4B,CAAC,mBAAmB,CAAC,CAClD,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAC3C,6BAA6B,CAAC,oBAAoB,CAAC,CACpD,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,YAAY,CAAC;AAEtD,MAAM,MAAM,yBAAyB,GACjC,sBAAsB,GACtB,uBAAuB,CAAC;AAE5B,MAAM,MAAM,wCAAwC,GAAG,OAAO,CAC5D,sBAAsB,EACtB;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE;YAAE,WAAW,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,CAChD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=notification-api.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-api.mjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"","sourcesContent":["import type { components } from './schema';\nimport type { TRIGGER_TYPES } from '../../constants/notification-schema';\nimport type { Compute } from '../type-utils';\n\nexport type Data_MetamaskSwapCompleted =\n components['schemas']['Data_MetamaskSwapCompleted'];\nexport type Data_LidoStakeReadyToBeWithdrawn =\n components['schemas']['Data_LidoStakeReadyToBeWithdrawn'];\nexport type Data_LidoStakeCompleted =\n components['schemas']['Data_LidoStakeCompleted'];\nexport type Data_LidoWithdrawalRequested =\n components['schemas']['Data_LidoWithdrawalRequested'];\nexport type Data_LidoWithdrawalCompleted =\n components['schemas']['Data_LidoWithdrawalCompleted'];\nexport type Data_RocketPoolStakeCompleted =\n components['schemas']['Data_RocketPoolStakeCompleted'];\nexport type Data_RocketPoolUnstakeCompleted =\n components['schemas']['Data_RocketPoolUnstakeCompleted'];\nexport type Data_ETHSent = components['schemas']['Data_ETHSent'];\nexport type Data_ETHReceived = components['schemas']['Data_ETHReceived'];\nexport type Data_ERC20Sent = components['schemas']['Data_ERC20Sent'];\nexport type Data_ERC20Received = components['schemas']['Data_ERC20Received'];\nexport type Data_ERC721Sent = components['schemas']['Data_ERC721Sent'];\nexport type Data_ERC721Received = components['schemas']['Data_ERC721Received'];\n\ntype Notification = components['schemas']['NotificationOutputV3'][number];\ntype PlatformNotification = Extract<\n Notification,\n { notification_type: 'platform' }\n>;\ntype OnChainNotification = Extract<\n Notification,\n { notification_type: 'on-chain' }\n>;\n\ntype ConvertToEnum<Kind> = {\n [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;\n}[TRIGGER_TYPES];\n\n/**\n * Type-Computation.\n * Adds a `type` field to on-chain notifications for easier enum checking.\n * Preserves the original nested payload structure.\n */\ntype NormalizeOnChainNotification<\n N extends OnChainNotification = OnChainNotification,\n NotificationDataKinds extends string = NonNullable<\n N['payload']['data']\n >['kind'],\n> = {\n [K in NotificationDataKinds]: Compute<\n Omit<N, 'payload'> & {\n type: ConvertToEnum<K>;\n payload: Compute<\n Omit<N['payload'], 'data'> & {\n data: Extract<NonNullable<N['payload']['data']>, { kind: K }>;\n }\n >;\n }\n >;\n}[NotificationDataKinds];\n\n/**\n * Type-Computation.\n * Adds a `type` field to platform notifications for easier enum checking.\n * Preserves the original nested payload structure.\n */\ntype NormalizePlatformNotification<\n N extends PlatformNotification = PlatformNotification,\n NotificationKind extends string = N['notification_type'],\n> = {\n [K in NotificationKind]: Compute<\n N & {\n type: ConvertToEnum<K>;\n }\n >;\n}[NotificationKind];\n\nexport type OnChainRawNotification = Compute<\n NormalizeOnChainNotification<OnChainNotification>\n>;\n\nexport type PlatformRawNotification = Compute<\n NormalizePlatformNotification<PlatformNotification>\n>;\n\nexport type UnprocessedRawNotification = Notification;\n\nexport type NormalisedAPINotification =\n | OnChainRawNotification\n | PlatformRawNotification;\n\nexport type OnChainRawNotificationsWithNetworkFields = Extract<\n OnChainRawNotification,\n { payload: { data: { network_fee: unknown } } }\n>;\n"]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/schema.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,0CAA0C;AAC1C;;;;GAIG","sourcesContent":["/* eslint-disable jsdoc/tag-lines */\n/* eslint-disable jsdoc/check-tag-names */\n/**\n * This file was auto-generated by openapi-typescript.\n * Do not make direct changes to the file.\n * Script: `npx openapi-typescript <PATH TO NOTIFICATION API SPEC> -o ./schema.d.ts`\n */\n\nexport type paths = {\n '/api/v3/notifications': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n get?: never;\n put?: never;\n /** List both platform and on-chain notifications for a certain user/address(es) */\n post: {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody: {\n content: {\n 'application/json': components['schemas']['NotificationInputV3'];\n };\n };\n responses: {\n /** @description Notifications listed successfully */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content: {\n 'application/json': components['schemas']['NotificationOutputV3'];\n };\n };\n /** @description Bad request */\n 400: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n /** @description Internal server error */\n 500: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n };\n };\n delete?: never;\n options?: never;\n head?: never;\n patch?: never;\n trace?: never;\n };\n '/api/v3/notifications/mark-as-read': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n get?: never;\n put?: never;\n /** Mark notifications as read */\n post: {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody: {\n content: {\n 'application/json': {\n ids?: string[];\n };\n };\n };\n responses: {\n /** @description Successfully marked notifications as read */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n };\n };\n delete?: never;\n options?: never;\n head?: never;\n patch?: never;\n trace?: never;\n };\n};\nexport type webhooks = Record<string, never>;\nexport type components = {\n schemas: {\n NotificationInputV3: {\n /** @example en-US */\n locale: string;\n addresses: string[];\n platform: 'extension' | 'mobile';\n };\n NotificationOutputV3: (\n | components['schemas']['PlatformNotification']\n | components['schemas']['OnChainNotification']\n )[];\n PlatformNotification: {\n /**\n * Format: uuid\n * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6\n */\n id: string;\n /** @enum {string} */\n notification_type: 'platform';\n /** @example false */\n unread: boolean;\n template: components['schemas']['LocalizedNotification'];\n /**\n * Format: date-time\n * @example 2025-10-09T09:45:34.202Z\n */\n created_at: string;\n };\n LocalizedNotification: {\n image_url: string;\n cta?: components['schemas']['LocalizedNotificationCTA'];\n title: string;\n body: string;\n };\n LocalizedNotificationCTA: {\n content: string;\n link: string;\n };\n OnChainNotification: {\n /**\n * Format: uuid\n * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6\n */\n id: string;\n /** @enum {string} */\n notification_type: 'on-chain';\n /** @example false */\n unread: boolean;\n /**\n * Format: date-time\n * @example 2025-10-09T09:45:34.202Z\n */\n created_at: string;\n payload: components['schemas']['OnChainPayload'];\n };\n OnChainPayload: {\n /** @example 1 */\n chain_id: number;\n /** @example 17485840 */\n block_number: number;\n block_timestamp: string;\n /** @example 0x881D40237659C251811CEC9c364ef91dC08D300C */\n tx_hash: string;\n address: string;\n data?:\n | components['schemas']['Data_MetamaskSwapCompleted']\n | components['schemas']['Data_LidoStakeReadyToBeWithdrawn']\n | components['schemas']['Data_LidoStakeCompleted']\n | components['schemas']['Data_LidoWithdrawalRequested']\n | components['schemas']['Data_LidoWithdrawalCompleted']\n | components['schemas']['Data_RocketPoolStakeCompleted']\n | components['schemas']['Data_RocketPoolUnstakeCompleted']\n | components['schemas']['Data_ETHSent']\n | components['schemas']['Data_ETHReceived']\n | components['schemas']['Data_ERC20Sent']\n | components['schemas']['Data_ERC20Received']\n | components['schemas']['Data_ERC721Sent']\n | components['schemas']['Data_ERC721Received']\n | components['schemas']['Data_ERC1155Sent']\n | components['schemas']['Data_ERC1155Received'];\n };\n Data_MetamaskSwapCompleted: {\n /** @enum {string} */\n kind: 'metamask_swap_completed';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: decimal */\n rate: string;\n token_in: components['schemas']['Token'];\n token_out: components['schemas']['Token'];\n };\n Data_LidoStakeCompleted: {\n /** @enum {string} */\n kind: 'lido_stake_completed';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_LidoWithdrawalRequested: {\n /** @enum {string} */\n kind: 'lido_withdrawal_requested';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_LidoStakeReadyToBeWithdrawn: {\n /** @enum {string} */\n kind: 'lido_stake_ready_to_be_withdrawn';\n /** Format: decimal */\n request_id: string;\n staked_eth: components['schemas']['Stake'];\n };\n Data_LidoWithdrawalCompleted: {\n /** @enum {string} */\n kind: 'lido_withdrawal_completed';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_RocketPoolStakeCompleted: {\n /** @enum {string} */\n kind: 'rocketpool_stake_completed';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_RocketPoolUnstakeCompleted: {\n /** @enum {string} */\n kind: 'rocketpool_unstake_completed';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_ETHSent: {\n /** @enum {string} */\n kind: 'eth_sent';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n amount: {\n /** Format: decimal */\n usd: string;\n /** Format: decimal */\n eth: string;\n };\n };\n Data_ETHReceived: {\n /** @enum {string} */\n kind: 'eth_received';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n amount: {\n /** Format: decimal */\n usd: string;\n /** Format: decimal */\n eth: string;\n };\n };\n Data_ERC20Sent: {\n /** @enum {string} */\n kind: 'erc20_sent';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n token: components['schemas']['Token'];\n };\n Data_ERC20Received: {\n /** @enum {string} */\n kind: 'erc20_received';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n token: components['schemas']['Token'];\n };\n Data_ERC721Sent: {\n /** @enum {string} */\n kind: 'erc721_sent';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n nft: components['schemas']['NFT'];\n };\n Data_ERC721Received: {\n /** @enum {string} */\n kind: 'erc721_received';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n nft: components['schemas']['NFT'];\n };\n Data_ERC1155Sent: {\n /** @enum {string} */\n kind: 'erc1155_sent';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n nft?: components['schemas']['NFT'];\n };\n Data_ERC1155Received: {\n /** @enum {string} */\n kind: 'erc1155_received';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n nft?: components['schemas']['NFT'];\n };\n NetworkFee: {\n /** Format: decimal */\n gas_price: string;\n /** Format: decimal */\n native_token_price_in_usd: string;\n };\n Token: {\n /** Format: address */\n address: string;\n symbol: string;\n name: string;\n /** Format: decimal */\n amount: string;\n /** Format: int32 */\n decimals: string;\n /** Format: uri */\n image: string;\n /** Format: decimal */\n usd: string;\n };\n NFT: {\n name: string;\n token_id: string;\n /** Format: uri */\n image: string;\n collection: {\n /** Format: address */\n address: string;\n name: string;\n symbol: string;\n /** Format: uri */\n image: string;\n };\n };\n Stake: {\n /** Format: address */\n address: string;\n symbol: string;\n name: string;\n /** Format: decimal */\n amount: string;\n /** Format: int32 */\n decimals: string;\n /** Format: uri */\n image: string;\n /** Format: decimal */\n usd: string;\n };\n };\n responses: never;\n parameters: never;\n requestBodies: never;\n headers: never;\n pathItems: never;\n};\nexport type $defs = Record<string, never>;\nexport type operations = Record<string, never>;\n"]}
@@ -0,0 +1,365 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ * Script: `npx openapi-typescript <PATH TO NOTIFICATION API SPEC> -o ./schema.d.ts`
5
+ */
6
+ export type paths = {
7
+ '/api/v3/notifications': {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ get?: never;
15
+ put?: never;
16
+ /** List both platform and on-chain notifications for a certain user/address(es) */
17
+ post: {
18
+ parameters: {
19
+ query?: never;
20
+ header?: never;
21
+ path?: never;
22
+ cookie?: never;
23
+ };
24
+ requestBody: {
25
+ content: {
26
+ 'application/json': components['schemas']['NotificationInputV3'];
27
+ };
28
+ };
29
+ responses: {
30
+ /** @description Notifications listed successfully */
31
+ 200: {
32
+ headers: {
33
+ [name: string]: unknown;
34
+ };
35
+ content: {
36
+ 'application/json': components['schemas']['NotificationOutputV3'];
37
+ };
38
+ };
39
+ /** @description Bad request */
40
+ 400: {
41
+ headers: {
42
+ [name: string]: unknown;
43
+ };
44
+ content?: never;
45
+ };
46
+ /** @description Internal server error */
47
+ 500: {
48
+ headers: {
49
+ [name: string]: unknown;
50
+ };
51
+ content?: never;
52
+ };
53
+ };
54
+ };
55
+ delete?: never;
56
+ options?: never;
57
+ head?: never;
58
+ patch?: never;
59
+ trace?: never;
60
+ };
61
+ '/api/v3/notifications/mark-as-read': {
62
+ parameters: {
63
+ query?: never;
64
+ header?: never;
65
+ path?: never;
66
+ cookie?: never;
67
+ };
68
+ get?: never;
69
+ put?: never;
70
+ /** Mark notifications as read */
71
+ post: {
72
+ parameters: {
73
+ query?: never;
74
+ header?: never;
75
+ path?: never;
76
+ cookie?: never;
77
+ };
78
+ requestBody: {
79
+ content: {
80
+ 'application/json': {
81
+ ids?: string[];
82
+ };
83
+ };
84
+ };
85
+ responses: {
86
+ /** @description Successfully marked notifications as read */
87
+ 200: {
88
+ headers: {
89
+ [name: string]: unknown;
90
+ };
91
+ content?: never;
92
+ };
93
+ };
94
+ };
95
+ delete?: never;
96
+ options?: never;
97
+ head?: never;
98
+ patch?: never;
99
+ trace?: never;
100
+ };
101
+ };
102
+ export type webhooks = Record<string, never>;
103
+ export type components = {
104
+ schemas: {
105
+ NotificationInputV3: {
106
+ /** @example en-US */
107
+ locale: string;
108
+ addresses: string[];
109
+ platform: 'extension' | 'mobile';
110
+ };
111
+ NotificationOutputV3: (components['schemas']['PlatformNotification'] | components['schemas']['OnChainNotification'])[];
112
+ PlatformNotification: {
113
+ /**
114
+ * Format: uuid
115
+ * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6
116
+ */
117
+ id: string;
118
+ /** @enum {string} */
119
+ notification_type: 'platform';
120
+ /** @example false */
121
+ unread: boolean;
122
+ template: components['schemas']['LocalizedNotification'];
123
+ /**
124
+ * Format: date-time
125
+ * @example 2025-10-09T09:45:34.202Z
126
+ */
127
+ created_at: string;
128
+ };
129
+ LocalizedNotification: {
130
+ image_url: string;
131
+ cta?: components['schemas']['LocalizedNotificationCTA'];
132
+ title: string;
133
+ body: string;
134
+ };
135
+ LocalizedNotificationCTA: {
136
+ content: string;
137
+ link: string;
138
+ };
139
+ OnChainNotification: {
140
+ /**
141
+ * Format: uuid
142
+ * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6
143
+ */
144
+ id: string;
145
+ /** @enum {string} */
146
+ notification_type: 'on-chain';
147
+ /** @example false */
148
+ unread: boolean;
149
+ /**
150
+ * Format: date-time
151
+ * @example 2025-10-09T09:45:34.202Z
152
+ */
153
+ created_at: string;
154
+ payload: components['schemas']['OnChainPayload'];
155
+ };
156
+ OnChainPayload: {
157
+ /** @example 1 */
158
+ chain_id: number;
159
+ /** @example 17485840 */
160
+ block_number: number;
161
+ block_timestamp: string;
162
+ /** @example 0x881D40237659C251811CEC9c364ef91dC08D300C */
163
+ tx_hash: string;
164
+ address: string;
165
+ data?: components['schemas']['Data_MetamaskSwapCompleted'] | components['schemas']['Data_LidoStakeReadyToBeWithdrawn'] | components['schemas']['Data_LidoStakeCompleted'] | components['schemas']['Data_LidoWithdrawalRequested'] | components['schemas']['Data_LidoWithdrawalCompleted'] | components['schemas']['Data_RocketPoolStakeCompleted'] | components['schemas']['Data_RocketPoolUnstakeCompleted'] | components['schemas']['Data_ETHSent'] | components['schemas']['Data_ETHReceived'] | components['schemas']['Data_ERC20Sent'] | components['schemas']['Data_ERC20Received'] | components['schemas']['Data_ERC721Sent'] | components['schemas']['Data_ERC721Received'] | components['schemas']['Data_ERC1155Sent'] | components['schemas']['Data_ERC1155Received'];
166
+ };
167
+ Data_MetamaskSwapCompleted: {
168
+ /** @enum {string} */
169
+ kind: 'metamask_swap_completed';
170
+ network_fee: components['schemas']['NetworkFee'];
171
+ /** Format: decimal */
172
+ rate: string;
173
+ token_in: components['schemas']['Token'];
174
+ token_out: components['schemas']['Token'];
175
+ };
176
+ Data_LidoStakeCompleted: {
177
+ /** @enum {string} */
178
+ kind: 'lido_stake_completed';
179
+ network_fee: components['schemas']['NetworkFee'];
180
+ stake_in: components['schemas']['Stake'];
181
+ stake_out: components['schemas']['Stake'];
182
+ };
183
+ Data_LidoWithdrawalRequested: {
184
+ /** @enum {string} */
185
+ kind: 'lido_withdrawal_requested';
186
+ network_fee: components['schemas']['NetworkFee'];
187
+ stake_in: components['schemas']['Stake'];
188
+ stake_out: components['schemas']['Stake'];
189
+ };
190
+ Data_LidoStakeReadyToBeWithdrawn: {
191
+ /** @enum {string} */
192
+ kind: 'lido_stake_ready_to_be_withdrawn';
193
+ /** Format: decimal */
194
+ request_id: string;
195
+ staked_eth: components['schemas']['Stake'];
196
+ };
197
+ Data_LidoWithdrawalCompleted: {
198
+ /** @enum {string} */
199
+ kind: 'lido_withdrawal_completed';
200
+ network_fee: components['schemas']['NetworkFee'];
201
+ stake_in: components['schemas']['Stake'];
202
+ stake_out: components['schemas']['Stake'];
203
+ };
204
+ Data_RocketPoolStakeCompleted: {
205
+ /** @enum {string} */
206
+ kind: 'rocketpool_stake_completed';
207
+ network_fee: components['schemas']['NetworkFee'];
208
+ stake_in: components['schemas']['Stake'];
209
+ stake_out: components['schemas']['Stake'];
210
+ };
211
+ Data_RocketPoolUnstakeCompleted: {
212
+ /** @enum {string} */
213
+ kind: 'rocketpool_unstake_completed';
214
+ network_fee: components['schemas']['NetworkFee'];
215
+ stake_in: components['schemas']['Stake'];
216
+ stake_out: components['schemas']['Stake'];
217
+ };
218
+ Data_ETHSent: {
219
+ /** @enum {string} */
220
+ kind: 'eth_sent';
221
+ network_fee: components['schemas']['NetworkFee'];
222
+ /** Format: address */
223
+ from: string;
224
+ /** Format: address */
225
+ to: string;
226
+ amount: {
227
+ /** Format: decimal */
228
+ usd: string;
229
+ /** Format: decimal */
230
+ eth: string;
231
+ };
232
+ };
233
+ Data_ETHReceived: {
234
+ /** @enum {string} */
235
+ kind: 'eth_received';
236
+ network_fee: components['schemas']['NetworkFee'];
237
+ /** Format: address */
238
+ from: string;
239
+ /** Format: address */
240
+ to: string;
241
+ amount: {
242
+ /** Format: decimal */
243
+ usd: string;
244
+ /** Format: decimal */
245
+ eth: string;
246
+ };
247
+ };
248
+ Data_ERC20Sent: {
249
+ /** @enum {string} */
250
+ kind: 'erc20_sent';
251
+ network_fee: components['schemas']['NetworkFee'];
252
+ /** Format: address */
253
+ from: string;
254
+ /** Format: address */
255
+ to: string;
256
+ token: components['schemas']['Token'];
257
+ };
258
+ Data_ERC20Received: {
259
+ /** @enum {string} */
260
+ kind: 'erc20_received';
261
+ network_fee: components['schemas']['NetworkFee'];
262
+ /** Format: address */
263
+ from: string;
264
+ /** Format: address */
265
+ to: string;
266
+ token: components['schemas']['Token'];
267
+ };
268
+ Data_ERC721Sent: {
269
+ /** @enum {string} */
270
+ kind: 'erc721_sent';
271
+ network_fee: components['schemas']['NetworkFee'];
272
+ /** Format: address */
273
+ from: string;
274
+ /** Format: address */
275
+ to: string;
276
+ nft: components['schemas']['NFT'];
277
+ };
278
+ Data_ERC721Received: {
279
+ /** @enum {string} */
280
+ kind: 'erc721_received';
281
+ network_fee: components['schemas']['NetworkFee'];
282
+ /** Format: address */
283
+ from: string;
284
+ /** Format: address */
285
+ to: string;
286
+ nft: components['schemas']['NFT'];
287
+ };
288
+ Data_ERC1155Sent: {
289
+ /** @enum {string} */
290
+ kind: 'erc1155_sent';
291
+ network_fee: components['schemas']['NetworkFee'];
292
+ /** Format: address */
293
+ from: string;
294
+ /** Format: address */
295
+ to: string;
296
+ nft?: components['schemas']['NFT'];
297
+ };
298
+ Data_ERC1155Received: {
299
+ /** @enum {string} */
300
+ kind: 'erc1155_received';
301
+ network_fee: components['schemas']['NetworkFee'];
302
+ /** Format: address */
303
+ from: string;
304
+ /** Format: address */
305
+ to: string;
306
+ nft?: components['schemas']['NFT'];
307
+ };
308
+ NetworkFee: {
309
+ /** Format: decimal */
310
+ gas_price: string;
311
+ /** Format: decimal */
312
+ native_token_price_in_usd: string;
313
+ };
314
+ Token: {
315
+ /** Format: address */
316
+ address: string;
317
+ symbol: string;
318
+ name: string;
319
+ /** Format: decimal */
320
+ amount: string;
321
+ /** Format: int32 */
322
+ decimals: string;
323
+ /** Format: uri */
324
+ image: string;
325
+ /** Format: decimal */
326
+ usd: string;
327
+ };
328
+ NFT: {
329
+ name: string;
330
+ token_id: string;
331
+ /** Format: uri */
332
+ image: string;
333
+ collection: {
334
+ /** Format: address */
335
+ address: string;
336
+ name: string;
337
+ symbol: string;
338
+ /** Format: uri */
339
+ image: string;
340
+ };
341
+ };
342
+ Stake: {
343
+ /** Format: address */
344
+ address: string;
345
+ symbol: string;
346
+ name: string;
347
+ /** Format: decimal */
348
+ amount: string;
349
+ /** Format: int32 */
350
+ decimals: string;
351
+ /** Format: uri */
352
+ image: string;
353
+ /** Format: decimal */
354
+ usd: string;
355
+ };
356
+ };
357
+ responses: never;
358
+ parameters: never;
359
+ requestBodies: never;
360
+ headers: never;
361
+ pathItems: never;
362
+ };
363
+ export type $defs = Record<string, never>;
364
+ export type operations = Record<string, never>;
365
+ //# sourceMappingURL=schema.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/schema.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH,MAAM,MAAM,KAAK,GAAG;IAClB,uBAAuB,EAAE;QACvB,UAAU,EAAE;YACV,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,MAAM,CAAC,EAAE,KAAK,CAAC;YACf,IAAI,CAAC,EAAE,KAAK,CAAC;YACb,MAAM,CAAC,EAAE,KAAK,CAAC;SAChB,CAAC;QACF,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,mFAAmF;QACnF,IAAI,EAAE;YACJ,UAAU,EAAE;gBACV,KAAK,CAAC,EAAE,KAAK,CAAC;gBACd,MAAM,CAAC,EAAE,KAAK,CAAC;gBACf,IAAI,CAAC,EAAE,KAAK,CAAC;gBACb,MAAM,CAAC,EAAE,KAAK,CAAC;aAChB,CAAC;YACF,WAAW,EAAE;gBACX,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