@metamask-previews/notification-services-controller 0.8.2-preview-2ccc4900 → 0.9.0-preview-85a723e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.cjs +183 -14
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.cts +30 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.mts +30 -0
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.mjs +175 -12
- package/dist/NotificationServicesController/__fixtures__/mock-raw-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.cjs +6 -0
- package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.d.cts +7 -1
- package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.d.mts +7 -1
- package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.mjs +6 -0
- package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.cjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts +6 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts +6 -0
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.mjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.cjs.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts +390 -7
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.cts.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts +390 -7
- package/dist/NotificationServicesController/types/on-chain-notification/schema.d.mts.map +1 -1
- package/dist/NotificationServicesController/types/on-chain-notification/schema.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-chain-notification.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { TRIGGER_TYPES } from '../../constants/notification-schema';\nimport type { Compute } from '../type-utils';\nimport type { components } from './schema';\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']['Notification'];\ntype NotificationDataKinds = NonNullable<Notification['data']>['kind'];\ntype ConvertToEnum<Kind> = {\n [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;\n}[TRIGGER_TYPES];\n\n/**\n * Type-Computation.\n * 1. Adds a `type` field to the notification, it converts the schema type into the ENUM we use.\n * 2. It ensures that the `data` field is the correct Notification data for this `type`\n * - The `Compute` utility merges the intersections (`&`) for a prettier type.\n */\nexport type OnChainRawNotification = {\n [K in NotificationDataKinds]: Compute<\n Omit<Notification, 'data'> & {\n type: ConvertToEnum<K>;\n data: Extract<Notification['data'], { kind: K }>;\n }\n >;\n}[NotificationDataKinds];\n\nexport type UnprocessedOnChainRawNotification = Notification;\n\nexport type OnChainRawNotificationsWithNetworkFields = Extract<\n OnChainRawNotification,\n { data: { network_fee: unknown } }\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"on-chain-notification.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { TRIGGER_TYPES } from '../../constants/notification-schema';\nimport type { Compute } from '../type-utils';\nimport type { components } from './schema';\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\n// Web3Notifications\nexport type Data_AaveV3HealthFactor =\n components['schemas']['Data_AaveV3HealthFactor'];\nexport type Data_EnsExpiration = components['schemas']['Data_EnsExpiration'];\nexport type Data_LidoStakingRewards =\n components['schemas']['Data_LidoStakingRewards'];\nexport type Data_RocketpoolStakingRewards =\n components['schemas']['Data_RocketpoolStakingRewards'];\nexport type Data_NotionalLoanExpiration =\n components['schemas']['Data_NotionalLoanExpiration'];\nexport type Data_SparkFiHealthFactor =\n components['schemas']['Data_SparkFiHealthFactor'];\n\ntype Notification = components['schemas']['Notification'];\ntype NotificationDataKinds = NonNullable<Notification['data']>['kind'];\ntype ConvertToEnum<Kind> = {\n [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;\n}[TRIGGER_TYPES];\n\n/**\n * Type-Computation.\n * 1. Adds a `type` field to the notification, it converts the schema type into the ENUM we use.\n * 2. It ensures that the `data` field is the correct Notification data for this `type`\n * - The `Compute` utility merges the intersections (`&`) for a prettier type.\n */\nexport type OnChainRawNotification = {\n [K in NotificationDataKinds]: Compute<\n Omit<Notification, 'data'> & {\n type: ConvertToEnum<K>;\n data: Extract<Notification['data'], { kind: K }>;\n }\n >;\n}[NotificationDataKinds];\n\nexport type UnprocessedOnChainRawNotification = Notification;\n\nexport type OnChainRawNotificationsWithNetworkFields = Extract<\n OnChainRawNotification,\n { data: { network_fee: unknown } }\n>;\n"]}
|
package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.cts
CHANGED
|
@@ -14,6 +14,12 @@ export type Data_ERC20Sent = components['schemas']['Data_ERC20Sent'];
|
|
|
14
14
|
export type Data_ERC20Received = components['schemas']['Data_ERC20Received'];
|
|
15
15
|
export type Data_ERC721Sent = components['schemas']['Data_ERC721Sent'];
|
|
16
16
|
export type Data_ERC721Received = components['schemas']['Data_ERC721Received'];
|
|
17
|
+
export type Data_AaveV3HealthFactor = components['schemas']['Data_AaveV3HealthFactor'];
|
|
18
|
+
export type Data_EnsExpiration = components['schemas']['Data_EnsExpiration'];
|
|
19
|
+
export type Data_LidoStakingRewards = components['schemas']['Data_LidoStakingRewards'];
|
|
20
|
+
export type Data_RocketpoolStakingRewards = components['schemas']['Data_RocketpoolStakingRewards'];
|
|
21
|
+
export type Data_NotionalLoanExpiration = components['schemas']['Data_NotionalLoanExpiration'];
|
|
22
|
+
export type Data_SparkFiHealthFactor = components['schemas']['Data_SparkFiHealthFactor'];
|
|
17
23
|
type Notification = components['schemas']['Notification'];
|
|
18
24
|
type NotificationDataKinds = NonNullable<Notification['data']>['kind'];
|
|
19
25
|
type ConvertToEnum<Kind> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-chain-notification.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,gDAA4C;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,0BAAsB;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAiB;AAE3C,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,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAC;AACvE,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"on-chain-notification.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"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"}
|
package/dist/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.mts
CHANGED
|
@@ -14,6 +14,12 @@ export type Data_ERC20Sent = components['schemas']['Data_ERC20Sent'];
|
|
|
14
14
|
export type Data_ERC20Received = components['schemas']['Data_ERC20Received'];
|
|
15
15
|
export type Data_ERC721Sent = components['schemas']['Data_ERC721Sent'];
|
|
16
16
|
export type Data_ERC721Received = components['schemas']['Data_ERC721Received'];
|
|
17
|
+
export type Data_AaveV3HealthFactor = components['schemas']['Data_AaveV3HealthFactor'];
|
|
18
|
+
export type Data_EnsExpiration = components['schemas']['Data_EnsExpiration'];
|
|
19
|
+
export type Data_LidoStakingRewards = components['schemas']['Data_LidoStakingRewards'];
|
|
20
|
+
export type Data_RocketpoolStakingRewards = components['schemas']['Data_RocketpoolStakingRewards'];
|
|
21
|
+
export type Data_NotionalLoanExpiration = components['schemas']['Data_NotionalLoanExpiration'];
|
|
22
|
+
export type Data_SparkFiHealthFactor = components['schemas']['Data_SparkFiHealthFactor'];
|
|
17
23
|
type Notification = components['schemas']['Notification'];
|
|
18
24
|
type NotificationDataKinds = NonNullable<Notification['data']>['kind'];
|
|
19
25
|
type ConvertToEnum<Kind> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-chain-notification.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,gDAA4C;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,0BAAsB;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAiB;AAE3C,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,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAC;AACvE,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"on-chain-notification.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"on-chain-notification.mjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { TRIGGER_TYPES } from '../../constants/notification-schema';\nimport type { Compute } from '../type-utils';\nimport type { components } from './schema';\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']['Notification'];\ntype NotificationDataKinds = NonNullable<Notification['data']>['kind'];\ntype ConvertToEnum<Kind> = {\n [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;\n}[TRIGGER_TYPES];\n\n/**\n * Type-Computation.\n * 1. Adds a `type` field to the notification, it converts the schema type into the ENUM we use.\n * 2. It ensures that the `data` field is the correct Notification data for this `type`\n * - The `Compute` utility merges the intersections (`&`) for a prettier type.\n */\nexport type OnChainRawNotification = {\n [K in NotificationDataKinds]: Compute<\n Omit<Notification, 'data'> & {\n type: ConvertToEnum<K>;\n data: Extract<Notification['data'], { kind: K }>;\n }\n >;\n}[NotificationDataKinds];\n\nexport type UnprocessedOnChainRawNotification = Notification;\n\nexport type OnChainRawNotificationsWithNetworkFields = Extract<\n OnChainRawNotification,\n { data: { network_fee: unknown } }\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"on-chain-notification.mjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { TRIGGER_TYPES } from '../../constants/notification-schema';\nimport type { Compute } from '../type-utils';\nimport type { components } from './schema';\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\n// Web3Notifications\nexport type Data_AaveV3HealthFactor =\n components['schemas']['Data_AaveV3HealthFactor'];\nexport type Data_EnsExpiration = components['schemas']['Data_EnsExpiration'];\nexport type Data_LidoStakingRewards =\n components['schemas']['Data_LidoStakingRewards'];\nexport type Data_RocketpoolStakingRewards =\n components['schemas']['Data_RocketpoolStakingRewards'];\nexport type Data_NotionalLoanExpiration =\n components['schemas']['Data_NotionalLoanExpiration'];\nexport type Data_SparkFiHealthFactor =\n components['schemas']['Data_SparkFiHealthFactor'];\n\ntype Notification = components['schemas']['Notification'];\ntype NotificationDataKinds = NonNullable<Notification['data']>['kind'];\ntype ConvertToEnum<Kind> = {\n [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;\n}[TRIGGER_TYPES];\n\n/**\n * Type-Computation.\n * 1. Adds a `type` field to the notification, it converts the schema type into the ENUM we use.\n * 2. It ensures that the `data` field is the correct Notification data for this `type`\n * - The `Compute` utility merges the intersections (`&`) for a prettier type.\n */\nexport type OnChainRawNotification = {\n [K in NotificationDataKinds]: Compute<\n Omit<Notification, 'data'> & {\n type: ConvertToEnum<K>;\n data: Extract<Notification['data'], { kind: K }>;\n }\n >;\n}[NotificationDataKinds];\n\nexport type UnprocessedOnChainRawNotification = Notification;\n\nexport type OnChainRawNotificationsWithNetworkFields = Extract<\n OnChainRawNotification,\n { data: { network_fee: unknown } }\n>;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/schema.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD;;;;GAIG","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\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/v1/notifications': {\n /** List all notifications ordered by most recent */\n post: {\n parameters: {\n query?: {\n /** @description Page number for pagination */\n page?: number;\n /** @description Number of notifications per page for pagination */\n per_page?: number;\n };\n };\n requestBody?: {\n content: {\n 'application/json': {\n trigger_ids: string[];\n chain_ids?: number[];\n kinds?: string[];\n unread?: boolean;\n };\n };\n };\n responses: {\n /** @description Successfully fetched a list of notifications */\n 200: {\n content: {\n 'application/json': components['schemas']['Notification'][];\n };\n };\n };\n };\n };\n '/api/v1/notifications/mark-as-read': {\n /** Mark notifications as read */\n post: {\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 content: never;\n };\n };\n };\n };\n};\n\nexport type webhooks = Record<string, never>;\n\nexport type components = {\n schemas: {\n Notification: {\n /** Format: uuid */\n id: string;\n /** Format: uuid */\n trigger_id: string;\n /** @example 1 */\n chain_id: number;\n /** @example 17485840 */\n block_number: number;\n block_timestamp: string;\n /**\n * Format: address\n *\n * @example 0x881D40237659C251811CEC9c364ef91dC08D300C\n */\n tx_hash: string;\n /** @example false */\n unread: boolean;\n /** Format: date-time */\n created_at: string;\n /** Format: address */\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};\n\nexport type $defs = Record<string, never>;\n\nexport type external = Record<string, never>;\n\nexport type operations = Record<string, never>;\n"]}
|
|
1
|
+
{"version":3,"file":"schema.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/on-chain-notification/schema.ts"],"names":[],"mappings":";AAAA,yDAAyD;AACzD;;;;GAIG","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\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\n/**\n * This file was auto-generated by openapi-typescript.\n * Do not make direct changes to the file.\n */\n\nexport type paths = {\n '/api/v1/notifications': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n get?: never;\n put?: never;\n /** List all notifications ordered by most recent */\n post: {\n parameters: {\n query?: {\n /** @description Page number for pagination */\n page?: number;\n /** @description Number of notifications per page for pagination */\n per_page?: number;\n };\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody?: {\n content: {\n 'application/json': {\n trigger_ids: string[];\n chain_ids?: number[];\n kinds?: string[];\n unread?: boolean;\n };\n };\n };\n responses: {\n /** @description Successfully fetched a list of notifications */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content: {\n 'application/json': components['schemas']['Notification'][];\n };\n };\n };\n };\n delete?: never;\n options?: never;\n head?: never;\n patch?: never;\n trace?: never;\n };\n '/api/v1/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 '/api/internal/v1/topics': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n /** Get all topics created (internal) */\n get: {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody?: never;\n responses: {\n /** @description Successfully fetched all topics */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content: {\n 'application/json': components['schemas']['Topic'][];\n };\n };\n };\n };\n put?: never;\n /** Create a new topic (internal) */\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 name: string;\n desc?: string;\n };\n };\n };\n responses: {\n /** @description Successfully created a new topic */\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 '/api/internal/v1/subtopics': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n /** Get all sub-topics created (internal) */\n get: {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody?: never;\n responses: {\n /** @description Successfully fetched all subtopics */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content: {\n 'application/json': components['schemas']['SubTopic'][];\n };\n };\n };\n };\n put?: never;\n post?: never;\n delete?: never;\n options?: never;\n head?: never;\n patch?: never;\n trace?: never;\n };\n '/api/internal/v1/global-notifications': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n get?: never;\n put?: never;\n /** Insert a new Global Notification (internal) */\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']['GlobalNotificationWrite'];\n };\n };\n responses: {\n /** @description Successfully created a new global notification */\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 '/api/v1/global-notifications': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n /** Get all Global Notifications for a UserID */\n get: {\n parameters: {\n query: {\n /** @description Platform(s) to filter notifications by */\n platform: ('portfolio' | 'extension' | 'mobile')[];\n /** @description Delivery channel(s) to filter notifications by */\n deliveryChannel: ('inbox' | 'push')[];\n };\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody?: never;\n responses: {\n /** @description Successfully fetched global notifications */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content: {\n 'application/json': components['schemas']['GlobalNotification'][];\n };\n };\n };\n };\n put?: never;\n post?: never;\n delete?: never;\n options?: never;\n head?: never;\n patch?: never;\n trace?: never;\n };\n '/api/v1/user-preferences': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n /** Get all preferences for a UserID */\n get: {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody?: never;\n responses: {\n /** @description Successfully fetched preferences */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content: {\n 'application/json': components['schemas']['Topic'][];\n };\n };\n /** @description User not found */\n 404: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n };\n };\n put?: never;\n /** Update Preferences for a UserID */\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 topics: string[];\n };\n };\n };\n responses: {\n /** @description Successfully updated topics preferences */\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 GlobalNotification: {\n title: string;\n body: string;\n /** Format: date-time */\n created_at: string;\n };\n GlobalNotificationWrite: {\n title: string;\n body: string;\n 'sub-topic': string;\n platforms: ('portfolio' | 'extension' | 'mobile')[];\n delivery_channels: ('inbox' | 'push')[];\n };\n Topic: {\n name: string;\n description?: string;\n /** Format: date-time */\n created_at?: string;\n };\n SubTopic: {\n name: string;\n /** Format: date-time */\n created_at?: string;\n };\n Notification: {\n /** Format: uuid */\n id: string;\n /** Format: uuid */\n trigger_id: string;\n /** @example 1 */\n chain_id: number;\n /** @example 17485840 */\n block_number?: number;\n block_timestamp?: string;\n /**\n * Format: address\n * @example 0x881D40237659C251811CEC9c364ef91dC08D300C\n */\n tx_hash?: string;\n /** @example false */\n unread: boolean;\n /** Format: date-time */\n created_at: string;\n /** Format: address */\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 | components['schemas']['Data_AaveV3HealthFactor']\n | components['schemas']['Data_EnsExpiration']\n | components['schemas']['Data_LidoStakingRewards']\n | components['schemas']['Data_RocketpoolStakingRewards']\n | components['schemas']['Data_NotionalLoanExpiration']\n | components['schemas']['Data_SparkFiHealthFactor'];\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 Data_AaveV3HealthFactor: {\n /** @enum {string} */\n kind: 'aave_v3_health_factor';\n /** @example 1 */\n chainId: number;\n /** Format: decimal */\n healthFactor: string;\n /** Format: decimal */\n threshold: string;\n };\n Data_EnsExpiration: {\n /** @enum {string} */\n kind: 'ens_expiration';\n chainId: number;\n reverseEnsName: string;\n /** Format: date-time */\n expirationDateIso: string;\n /** @example 86400 */\n reminderDelayInSeconds: number;\n };\n Data_LidoStakingRewards: {\n /** @enum {string} */\n kind: 'lido_staking_rewards';\n chainId: number;\n /** Format: decimal */\n currentStethBalance: string;\n /** Format: decimal */\n currentEthValue: string;\n /** Format: decimal */\n estimatedTotalRewardInPeriod: string;\n /** @example 1 */\n daysSinceLastNotification: number;\n /** @example 1 */\n notificationIntervalDays: number;\n };\n Data_NotionalLoanExpiration: {\n /** @enum {string} */\n kind: 'notional_loan_expiration';\n chainId: number;\n loans: {\n /** Format: decimal */\n amount: string;\n symbol: string;\n /** Format: date-time */\n maturityDateIso: string;\n }[];\n /** @example 86400 */\n reminderDelayInSeconds: number;\n };\n Data_RocketpoolStakingRewards: {\n /** @enum {string} */\n kind: 'rocketpool_staking_rewards';\n chainId: number;\n /** Format: decimal */\n currentRethBalance: string;\n /** Format: decimal */\n currentEthValue: string;\n /** Format: decimal */\n estimatedTotalRewardInPeriod: string;\n /** @example 1 */\n daysSinceLastNotification: number;\n /** @example 1 */\n notificationIntervalDays: number;\n };\n Data_SparkFiHealthFactor: {\n /** @enum {string} */\n kind: 'spark_fi_health_factor';\n chainId: number;\n /** Format: decimal */\n healthFactor: string;\n /** Format: decimal */\n threshold: string;\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};\n\nexport type $defs = Record<string, never>;\n\nexport type operations = Record<string, never>;\n"]}
|
|
@@ -3,8 +3,20 @@
|
|
|
3
3
|
* Do not make direct changes to the file.
|
|
4
4
|
* Script: `npx openapi-typescript <PATH TO NOTIFICATION API SPEC> -o ./schema.d.ts`
|
|
5
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* This file was auto-generated by openapi-typescript.
|
|
8
|
+
* Do not make direct changes to the file.
|
|
9
|
+
*/
|
|
6
10
|
export type paths = {
|
|
7
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;
|
|
8
20
|
/** List all notifications ordered by most recent */
|
|
9
21
|
post: {
|
|
10
22
|
parameters: {
|
|
@@ -14,6 +26,9 @@ export type paths = {
|
|
|
14
26
|
/** @description Number of notifications per page for pagination */
|
|
15
27
|
per_page?: number;
|
|
16
28
|
};
|
|
29
|
+
header?: never;
|
|
30
|
+
path?: never;
|
|
31
|
+
cookie?: never;
|
|
17
32
|
};
|
|
18
33
|
requestBody?: {
|
|
19
34
|
content: {
|
|
@@ -28,16 +43,38 @@ export type paths = {
|
|
|
28
43
|
responses: {
|
|
29
44
|
/** @description Successfully fetched a list of notifications */
|
|
30
45
|
200: {
|
|
46
|
+
headers: {
|
|
47
|
+
[name: string]: unknown;
|
|
48
|
+
};
|
|
31
49
|
content: {
|
|
32
50
|
'application/json': components['schemas']['Notification'][];
|
|
33
51
|
};
|
|
34
52
|
};
|
|
35
53
|
};
|
|
36
54
|
};
|
|
55
|
+
delete?: never;
|
|
56
|
+
options?: never;
|
|
57
|
+
head?: never;
|
|
58
|
+
patch?: never;
|
|
59
|
+
trace?: never;
|
|
37
60
|
};
|
|
38
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;
|
|
39
70
|
/** Mark notifications as read */
|
|
40
71
|
post: {
|
|
72
|
+
parameters: {
|
|
73
|
+
query?: never;
|
|
74
|
+
header?: never;
|
|
75
|
+
path?: never;
|
|
76
|
+
cookie?: never;
|
|
77
|
+
};
|
|
41
78
|
requestBody: {
|
|
42
79
|
content: {
|
|
43
80
|
'application/json': {
|
|
@@ -48,15 +85,290 @@ export type paths = {
|
|
|
48
85
|
responses: {
|
|
49
86
|
/** @description Successfully marked notifications as read */
|
|
50
87
|
200: {
|
|
51
|
-
|
|
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
|
+
};
|
|
52
266
|
};
|
|
53
267
|
};
|
|
54
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;
|
|
55
343
|
};
|
|
56
344
|
};
|
|
57
345
|
export type webhooks = Record<string, never>;
|
|
58
346
|
export type components = {
|
|
59
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
|
+
};
|
|
60
372
|
Notification: {
|
|
61
373
|
/** Format: uuid */
|
|
62
374
|
id: string;
|
|
@@ -65,21 +377,20 @@ export type components = {
|
|
|
65
377
|
/** @example 1 */
|
|
66
378
|
chain_id: number;
|
|
67
379
|
/** @example 17485840 */
|
|
68
|
-
block_number
|
|
69
|
-
block_timestamp
|
|
380
|
+
block_number?: number;
|
|
381
|
+
block_timestamp?: string;
|
|
70
382
|
/**
|
|
71
383
|
* Format: address
|
|
72
|
-
*
|
|
73
384
|
* @example 0x881D40237659C251811CEC9c364ef91dC08D300C
|
|
74
385
|
*/
|
|
75
|
-
tx_hash
|
|
386
|
+
tx_hash?: string;
|
|
76
387
|
/** @example false */
|
|
77
388
|
unread: boolean;
|
|
78
389
|
/** Format: date-time */
|
|
79
390
|
created_at: string;
|
|
80
391
|
/** Format: address */
|
|
81
392
|
address: string;
|
|
82
|
-
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'];
|
|
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'] | components['schemas']['Data_AaveV3HealthFactor'] | components['schemas']['Data_EnsExpiration'] | components['schemas']['Data_LidoStakingRewards'] | components['schemas']['Data_RocketpoolStakingRewards'] | components['schemas']['Data_NotionalLoanExpiration'] | components['schemas']['Data_SparkFiHealthFactor'];
|
|
83
394
|
};
|
|
84
395
|
Data_MetamaskSwapCompleted: {
|
|
85
396
|
/** @enum {string} */
|
|
@@ -222,6 +533,79 @@ export type components = {
|
|
|
222
533
|
to: string;
|
|
223
534
|
nft?: components['schemas']['NFT'];
|
|
224
535
|
};
|
|
536
|
+
Data_AaveV3HealthFactor: {
|
|
537
|
+
/** @enum {string} */
|
|
538
|
+
kind: 'aave_v3_health_factor';
|
|
539
|
+
/** @example 1 */
|
|
540
|
+
chainId: number;
|
|
541
|
+
/** Format: decimal */
|
|
542
|
+
healthFactor: string;
|
|
543
|
+
/** Format: decimal */
|
|
544
|
+
threshold: string;
|
|
545
|
+
};
|
|
546
|
+
Data_EnsExpiration: {
|
|
547
|
+
/** @enum {string} */
|
|
548
|
+
kind: 'ens_expiration';
|
|
549
|
+
chainId: number;
|
|
550
|
+
reverseEnsName: string;
|
|
551
|
+
/** Format: date-time */
|
|
552
|
+
expirationDateIso: string;
|
|
553
|
+
/** @example 86400 */
|
|
554
|
+
reminderDelayInSeconds: number;
|
|
555
|
+
};
|
|
556
|
+
Data_LidoStakingRewards: {
|
|
557
|
+
/** @enum {string} */
|
|
558
|
+
kind: 'lido_staking_rewards';
|
|
559
|
+
chainId: number;
|
|
560
|
+
/** Format: decimal */
|
|
561
|
+
currentStethBalance: string;
|
|
562
|
+
/** Format: decimal */
|
|
563
|
+
currentEthValue: string;
|
|
564
|
+
/** Format: decimal */
|
|
565
|
+
estimatedTotalRewardInPeriod: string;
|
|
566
|
+
/** @example 1 */
|
|
567
|
+
daysSinceLastNotification: number;
|
|
568
|
+
/** @example 1 */
|
|
569
|
+
notificationIntervalDays: number;
|
|
570
|
+
};
|
|
571
|
+
Data_NotionalLoanExpiration: {
|
|
572
|
+
/** @enum {string} */
|
|
573
|
+
kind: 'notional_loan_expiration';
|
|
574
|
+
chainId: number;
|
|
575
|
+
loans: {
|
|
576
|
+
/** Format: decimal */
|
|
577
|
+
amount: string;
|
|
578
|
+
symbol: string;
|
|
579
|
+
/** Format: date-time */
|
|
580
|
+
maturityDateIso: string;
|
|
581
|
+
}[];
|
|
582
|
+
/** @example 86400 */
|
|
583
|
+
reminderDelayInSeconds: number;
|
|
584
|
+
};
|
|
585
|
+
Data_RocketpoolStakingRewards: {
|
|
586
|
+
/** @enum {string} */
|
|
587
|
+
kind: 'rocketpool_staking_rewards';
|
|
588
|
+
chainId: number;
|
|
589
|
+
/** Format: decimal */
|
|
590
|
+
currentRethBalance: string;
|
|
591
|
+
/** Format: decimal */
|
|
592
|
+
currentEthValue: string;
|
|
593
|
+
/** Format: decimal */
|
|
594
|
+
estimatedTotalRewardInPeriod: string;
|
|
595
|
+
/** @example 1 */
|
|
596
|
+
daysSinceLastNotification: number;
|
|
597
|
+
/** @example 1 */
|
|
598
|
+
notificationIntervalDays: number;
|
|
599
|
+
};
|
|
600
|
+
Data_SparkFiHealthFactor: {
|
|
601
|
+
/** @enum {string} */
|
|
602
|
+
kind: 'spark_fi_health_factor';
|
|
603
|
+
chainId: number;
|
|
604
|
+
/** Format: decimal */
|
|
605
|
+
healthFactor: string;
|
|
606
|
+
/** Format: decimal */
|
|
607
|
+
threshold: string;
|
|
608
|
+
};
|
|
225
609
|
NetworkFee: {
|
|
226
610
|
/** Format: decimal */
|
|
227
611
|
gas_price: string;
|
|
@@ -278,6 +662,5 @@ export type components = {
|
|
|
278
662
|
pathItems: never;
|
|
279
663
|
};
|
|
280
664
|
export type $defs = Record<string, never>;
|
|
281
|
-
export type external = Record<string, never>;
|
|
282
665
|
export type operations = Record<string, never>;
|
|
283
666
|
//# sourceMappingURL=schema.d.cts.map
|