@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
@@ -1,681 +0,0 @@
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
- /**
7
- * This file was auto-generated by openapi-typescript.
8
- * Do not make direct changes to the file.
9
- */
10
- export type paths = {
11
- '/api/v1/notifications': {
12
- parameters: {
13
- query?: never;
14
- header?: never;
15
- path?: never;
16
- cookie?: never;
17
- };
18
- get?: never;
19
- put?: never;
20
- /** List all notifications ordered by most recent */
21
- post: {
22
- parameters: {
23
- query?: {
24
- /** @description Page number for pagination */
25
- page?: number;
26
- /** @description Number of notifications per page for pagination */
27
- per_page?: number;
28
- };
29
- header?: never;
30
- path?: never;
31
- cookie?: never;
32
- };
33
- requestBody?: {
34
- content: {
35
- 'application/json': {
36
- trigger_ids: string[];
37
- chain_ids?: number[];
38
- kinds?: string[];
39
- unread?: boolean;
40
- };
41
- };
42
- };
43
- responses: {
44
- /** @description Successfully fetched a list of notifications */
45
- 200: {
46
- headers: {
47
- [name: string]: unknown;
48
- };
49
- content: {
50
- 'application/json': (components['schemas']['WalletNotification'] | components['schemas']['Web3Notification'])[];
51
- };
52
- };
53
- };
54
- };
55
- delete?: never;
56
- options?: never;
57
- head?: never;
58
- patch?: never;
59
- trace?: never;
60
- };
61
- '/api/v1/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
- '/api/internal/v1/topics': {
102
- parameters: {
103
- query?: never;
104
- header?: never;
105
- path?: never;
106
- cookie?: never;
107
- };
108
- /** Get all topics created (internal) */
109
- get: {
110
- parameters: {
111
- query?: never;
112
- header?: never;
113
- path?: never;
114
- cookie?: never;
115
- };
116
- requestBody?: never;
117
- responses: {
118
- /** @description Successfully fetched all topics */
119
- 200: {
120
- headers: {
121
- [name: string]: unknown;
122
- };
123
- content: {
124
- 'application/json': components['schemas']['Topic'][];
125
- };
126
- };
127
- };
128
- };
129
- put?: never;
130
- /** Create a new topic (internal) */
131
- post: {
132
- parameters: {
133
- query?: never;
134
- header?: never;
135
- path?: never;
136
- cookie?: never;
137
- };
138
- requestBody: {
139
- content: {
140
- 'application/json': {
141
- name: string;
142
- desc?: string;
143
- };
144
- };
145
- };
146
- responses: {
147
- /** @description Successfully created a new topic */
148
- 200: {
149
- headers: {
150
- [name: string]: unknown;
151
- };
152
- content?: never;
153
- };
154
- };
155
- };
156
- delete?: never;
157
- options?: never;
158
- head?: never;
159
- patch?: never;
160
- trace?: never;
161
- };
162
- '/api/internal/v1/subtopics': {
163
- parameters: {
164
- query?: never;
165
- header?: never;
166
- path?: never;
167
- cookie?: never;
168
- };
169
- /** Get all sub-topics created (internal) */
170
- get: {
171
- parameters: {
172
- query?: never;
173
- header?: never;
174
- path?: never;
175
- cookie?: never;
176
- };
177
- requestBody?: never;
178
- responses: {
179
- /** @description Successfully fetched all subtopics */
180
- 200: {
181
- headers: {
182
- [name: string]: unknown;
183
- };
184
- content: {
185
- 'application/json': components['schemas']['SubTopic'][];
186
- };
187
- };
188
- };
189
- };
190
- put?: never;
191
- post?: never;
192
- delete?: never;
193
- options?: never;
194
- head?: never;
195
- patch?: never;
196
- trace?: never;
197
- };
198
- '/api/internal/v1/global-notifications': {
199
- parameters: {
200
- query?: never;
201
- header?: never;
202
- path?: never;
203
- cookie?: never;
204
- };
205
- get?: never;
206
- put?: never;
207
- /** Insert a new Global Notification (internal) */
208
- post: {
209
- parameters: {
210
- query?: never;
211
- header?: never;
212
- path?: never;
213
- cookie?: never;
214
- };
215
- requestBody: {
216
- content: {
217
- 'application/json': components['schemas']['GlobalNotificationWrite'];
218
- };
219
- };
220
- responses: {
221
- /** @description Successfully created a new global notification */
222
- 200: {
223
- headers: {
224
- [name: string]: unknown;
225
- };
226
- content?: never;
227
- };
228
- };
229
- };
230
- delete?: never;
231
- options?: never;
232
- head?: never;
233
- patch?: never;
234
- trace?: never;
235
- };
236
- '/api/v1/global-notifications': {
237
- parameters: {
238
- query?: never;
239
- header?: never;
240
- path?: never;
241
- cookie?: never;
242
- };
243
- /** Get all Global Notifications for a UserID */
244
- get: {
245
- parameters: {
246
- query: {
247
- /** @description Platform(s) to filter notifications by */
248
- platform: ('portfolio' | 'extension' | 'mobile')[];
249
- /** @description Delivery channel(s) to filter notifications by */
250
- deliveryChannel: ('inbox' | 'push')[];
251
- };
252
- header?: never;
253
- path?: never;
254
- cookie?: never;
255
- };
256
- requestBody?: never;
257
- responses: {
258
- /** @description Successfully fetched global notifications */
259
- 200: {
260
- headers: {
261
- [name: string]: unknown;
262
- };
263
- content: {
264
- 'application/json': components['schemas']['GlobalNotification'][];
265
- };
266
- };
267
- };
268
- };
269
- put?: never;
270
- post?: never;
271
- delete?: never;
272
- options?: never;
273
- head?: never;
274
- patch?: never;
275
- trace?: never;
276
- };
277
- '/api/v1/user-preferences': {
278
- parameters: {
279
- query?: never;
280
- header?: never;
281
- path?: never;
282
- cookie?: never;
283
- };
284
- /** Get all preferences for a UserID */
285
- get: {
286
- parameters: {
287
- query?: never;
288
- header?: never;
289
- path?: never;
290
- cookie?: never;
291
- };
292
- requestBody?: never;
293
- responses: {
294
- /** @description Successfully fetched preferences */
295
- 200: {
296
- headers: {
297
- [name: string]: unknown;
298
- };
299
- content: {
300
- 'application/json': components['schemas']['Topic'][];
301
- };
302
- };
303
- /** @description User not found */
304
- 404: {
305
- headers: {
306
- [name: string]: unknown;
307
- };
308
- content?: never;
309
- };
310
- };
311
- };
312
- put?: never;
313
- /** Update Preferences for a UserID */
314
- post: {
315
- parameters: {
316
- query?: never;
317
- header?: never;
318
- path?: never;
319
- cookie?: never;
320
- };
321
- requestBody: {
322
- content: {
323
- 'application/json': {
324
- topics: string[];
325
- };
326
- };
327
- };
328
- responses: {
329
- /** @description Successfully updated topics preferences */
330
- 200: {
331
- headers: {
332
- [name: string]: unknown;
333
- };
334
- content?: never;
335
- };
336
- };
337
- };
338
- delete?: never;
339
- options?: never;
340
- head?: never;
341
- patch?: never;
342
- trace?: never;
343
- };
344
- };
345
- export type webhooks = Record<string, never>;
346
- export type components = {
347
- schemas: {
348
- GlobalNotification: {
349
- title: string;
350
- body: string;
351
- /** Format: date-time */
352
- created_at: string;
353
- };
354
- GlobalNotificationWrite: {
355
- title: string;
356
- body: string;
357
- 'sub-topic': string;
358
- platforms: ('portfolio' | 'extension' | 'mobile')[];
359
- delivery_channels: ('inbox' | 'push')[];
360
- };
361
- Topic: {
362
- name: string;
363
- description?: string;
364
- /** Format: date-time */
365
- created_at?: string;
366
- };
367
- SubTopic: {
368
- name: string;
369
- /** Format: date-time */
370
- created_at?: string;
371
- };
372
- WalletNotification: {
373
- /** Format: uuid */
374
- id: string;
375
- /** Format: uuid */
376
- trigger_id: string;
377
- /** @example 1 */
378
- chain_id: number;
379
- /** @example 17485840 */
380
- block_number: number;
381
- block_timestamp: string;
382
- /**
383
- * Format: address
384
- * @example 0x881D40237659C251811CEC9c364ef91dC08D300C
385
- */
386
- tx_hash: string;
387
- /** @example false */
388
- unread: boolean;
389
- /** Format: date-time */
390
- created_at: string;
391
- /** Format: address */
392
- address: string;
393
- 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'];
394
- };
395
- Web3Notification: {
396
- /** Format: uuid */
397
- id: string;
398
- /** Format: uuid */
399
- trigger_id: string;
400
- /** @example 1 */
401
- chain_id: number;
402
- /** @example false */
403
- unread: boolean;
404
- /** Format: date-time */
405
- created_at: string;
406
- /** Format: address */
407
- address: string;
408
- data?: components['schemas']['Data_AaveV3HealthFactor'] | components['schemas']['Data_EnsExpiration'] | components['schemas']['Data_LidoStakingRewards'] | components['schemas']['Data_RocketpoolStakingRewards'] | components['schemas']['Data_NotionalLoanExpiration'] | components['schemas']['Data_SparkFiHealthFactor'];
409
- };
410
- Data_MetamaskSwapCompleted: {
411
- /** @enum {string} */
412
- kind: 'metamask_swap_completed';
413
- network_fee: components['schemas']['NetworkFee'];
414
- /** Format: decimal */
415
- rate: string;
416
- token_in: components['schemas']['Token'];
417
- token_out: components['schemas']['Token'];
418
- };
419
- Data_LidoStakeCompleted: {
420
- /** @enum {string} */
421
- kind: 'lido_stake_completed';
422
- network_fee: components['schemas']['NetworkFee'];
423
- stake_in: components['schemas']['Stake'];
424
- stake_out: components['schemas']['Stake'];
425
- };
426
- Data_LidoWithdrawalRequested: {
427
- /** @enum {string} */
428
- kind: 'lido_withdrawal_requested';
429
- network_fee: components['schemas']['NetworkFee'];
430
- stake_in: components['schemas']['Stake'];
431
- stake_out: components['schemas']['Stake'];
432
- };
433
- Data_LidoStakeReadyToBeWithdrawn: {
434
- /** @enum {string} */
435
- kind: 'lido_stake_ready_to_be_withdrawn';
436
- /** Format: decimal */
437
- request_id: string;
438
- staked_eth: components['schemas']['Stake'];
439
- };
440
- Data_LidoWithdrawalCompleted: {
441
- /** @enum {string} */
442
- kind: 'lido_withdrawal_completed';
443
- network_fee: components['schemas']['NetworkFee'];
444
- stake_in: components['schemas']['Stake'];
445
- stake_out: components['schemas']['Stake'];
446
- };
447
- Data_RocketPoolStakeCompleted: {
448
- /** @enum {string} */
449
- kind: 'rocketpool_stake_completed';
450
- network_fee: components['schemas']['NetworkFee'];
451
- stake_in: components['schemas']['Stake'];
452
- stake_out: components['schemas']['Stake'];
453
- };
454
- Data_RocketPoolUnstakeCompleted: {
455
- /** @enum {string} */
456
- kind: 'rocketpool_unstake_completed';
457
- network_fee: components['schemas']['NetworkFee'];
458
- stake_in: components['schemas']['Stake'];
459
- stake_out: components['schemas']['Stake'];
460
- };
461
- Data_ETHSent: {
462
- /** @enum {string} */
463
- kind: 'eth_sent';
464
- network_fee: components['schemas']['NetworkFee'];
465
- /** Format: address */
466
- from: string;
467
- /** Format: address */
468
- to: string;
469
- amount: {
470
- /** Format: decimal */
471
- usd: string;
472
- /** Format: decimal */
473
- eth: string;
474
- };
475
- };
476
- Data_ETHReceived: {
477
- /** @enum {string} */
478
- kind: 'eth_received';
479
- network_fee: components['schemas']['NetworkFee'];
480
- /** Format: address */
481
- from: string;
482
- /** Format: address */
483
- to: string;
484
- amount: {
485
- /** Format: decimal */
486
- usd: string;
487
- /** Format: decimal */
488
- eth: string;
489
- };
490
- };
491
- Data_ERC20Sent: {
492
- /** @enum {string} */
493
- kind: 'erc20_sent';
494
- network_fee: components['schemas']['NetworkFee'];
495
- /** Format: address */
496
- from: string;
497
- /** Format: address */
498
- to: string;
499
- token: components['schemas']['Token'];
500
- };
501
- Data_ERC20Received: {
502
- /** @enum {string} */
503
- kind: 'erc20_received';
504
- network_fee: components['schemas']['NetworkFee'];
505
- /** Format: address */
506
- from: string;
507
- /** Format: address */
508
- to: string;
509
- token: components['schemas']['Token'];
510
- };
511
- Data_ERC721Sent: {
512
- /** @enum {string} */
513
- kind: 'erc721_sent';
514
- network_fee: components['schemas']['NetworkFee'];
515
- /** Format: address */
516
- from: string;
517
- /** Format: address */
518
- to: string;
519
- nft: components['schemas']['NFT'];
520
- };
521
- Data_ERC721Received: {
522
- /** @enum {string} */
523
- kind: 'erc721_received';
524
- network_fee: components['schemas']['NetworkFee'];
525
- /** Format: address */
526
- from: string;
527
- /** Format: address */
528
- to: string;
529
- nft: components['schemas']['NFT'];
530
- };
531
- Data_ERC1155Sent: {
532
- /** @enum {string} */
533
- kind: 'erc1155_sent';
534
- network_fee: components['schemas']['NetworkFee'];
535
- /** Format: address */
536
- from: string;
537
- /** Format: address */
538
- to: string;
539
- nft?: components['schemas']['NFT'];
540
- };
541
- Data_ERC1155Received: {
542
- /** @enum {string} */
543
- kind: 'erc1155_received';
544
- network_fee: components['schemas']['NetworkFee'];
545
- /** Format: address */
546
- from: string;
547
- /** Format: address */
548
- to: string;
549
- nft?: components['schemas']['NFT'];
550
- };
551
- Data_AaveV3HealthFactor: {
552
- /** @enum {string} */
553
- kind: 'aave_v3_health_factor';
554
- /** @example 1 */
555
- chainId: number;
556
- /** Format: decimal */
557
- healthFactor: string;
558
- /** Format: decimal */
559
- threshold: string;
560
- };
561
- Data_EnsExpiration: {
562
- /** @enum {string} */
563
- kind: 'ens_expiration';
564
- chainId: number;
565
- reverseEnsName: string;
566
- /** Format: date-time */
567
- expirationDateIso: string;
568
- /** @example 86400 */
569
- reminderDelayInSeconds: number;
570
- };
571
- Data_LidoStakingRewards: {
572
- /** @enum {string} */
573
- kind: 'lido_staking_rewards';
574
- chainId: number;
575
- /** Format: decimal */
576
- currentStethBalance: string;
577
- /** Format: decimal */
578
- currentEthValue: string;
579
- /** Format: decimal */
580
- estimatedTotalRewardInPeriod: string;
581
- /** @example 1 */
582
- daysSinceLastNotification: number;
583
- /** @example 1 */
584
- notificationIntervalDays: number;
585
- };
586
- Data_NotionalLoanExpiration: {
587
- /** @enum {string} */
588
- kind: 'notional_loan_expiration';
589
- chainId: number;
590
- loans: {
591
- /** Format: decimal */
592
- amount: string;
593
- symbol: string;
594
- /** Format: date-time */
595
- maturityDateIso: string;
596
- }[];
597
- /** @example 86400 */
598
- reminderDelayInSeconds: number;
599
- };
600
- Data_RocketpoolStakingRewards: {
601
- /** @enum {string} */
602
- kind: 'rocketpool_staking_rewards';
603
- chainId: number;
604
- /** Format: decimal */
605
- currentRethBalance: string;
606
- /** Format: decimal */
607
- currentEthValue: string;
608
- /** Format: decimal */
609
- estimatedTotalRewardInPeriod: string;
610
- /** @example 1 */
611
- daysSinceLastNotification: number;
612
- /** @example 1 */
613
- notificationIntervalDays: number;
614
- };
615
- Data_SparkFiHealthFactor: {
616
- /** @enum {string} */
617
- kind: 'spark_fi_health_factor';
618
- chainId: number;
619
- /** Format: decimal */
620
- healthFactor: string;
621
- /** Format: decimal */
622
- threshold: string;
623
- };
624
- NetworkFee: {
625
- /** Format: decimal */
626
- gas_price: string;
627
- /** Format: decimal */
628
- native_token_price_in_usd: string;
629
- };
630
- Token: {
631
- /** Format: address */
632
- address: string;
633
- symbol: string;
634
- name: string;
635
- /** Format: decimal */
636
- amount: string;
637
- /** Format: int32 */
638
- decimals: string;
639
- /** Format: uri */
640
- image: string;
641
- /** Format: decimal */
642
- usd: string;
643
- };
644
- NFT: {
645
- name: string;
646
- token_id: string;
647
- /** Format: uri */
648
- image: string;
649
- collection: {
650
- /** Format: address */
651
- address: string;
652
- name: string;
653
- symbol: string;
654
- /** Format: uri */
655
- image: string;
656
- };
657
- };
658
- Stake: {
659
- /** Format: address */
660
- address: string;
661
- symbol: string;
662
- name: string;
663
- /** Format: decimal */
664
- amount: string;
665
- /** Format: int32 */
666
- decimals: string;
667
- /** Format: uri */
668
- image: string;
669
- /** Format: decimal */
670
- usd: string;
671
- };
672
- };
673
- responses: never;
674
- parameters: never;
675
- requestBodies: never;
676
- headers: never;
677
- pathItems: never;
678
- };
679
- export type $defs = Record<string, never>;
680
- export type operations = Record<string, never>;
681
- //# sourceMappingURL=schema.d.mts.map