@metamask/notification-services-controller 21.0.0 → 22.1.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.
- package/CHANGELOG.md +41 -1
- package/dist/NotificationServicesController/NotificationServicesController.cjs +56 -42
- package/dist/NotificationServicesController/NotificationServicesController.cjs.map +1 -1
- package/dist/NotificationServicesController/NotificationServicesController.d.cts +3 -2
- package/dist/NotificationServicesController/NotificationServicesController.d.cts.map +1 -1
- package/dist/NotificationServicesController/NotificationServicesController.d.mts +3 -2
- package/dist/NotificationServicesController/NotificationServicesController.d.mts.map +1 -1
- package/dist/NotificationServicesController/NotificationServicesController.mjs +56 -41
- package/dist/NotificationServicesController/NotificationServicesController.mjs.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.cjs +4 -12
- package/dist/NotificationServicesController/constants/notification-schema.cjs.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.d.cts +0 -12
- package/dist/NotificationServicesController/constants/notification-schema.d.cts.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.d.mts +0 -12
- package/dist/NotificationServicesController/constants/notification-schema.d.mts.map +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.mjs +3 -11
- package/dist/NotificationServicesController/constants/notification-schema.mjs.map +1 -1
- package/dist/NotificationServicesController/index.cjs +1 -2
- package/dist/NotificationServicesController/index.cjs.map +1 -1
- package/dist/NotificationServicesController/index.d.cts +0 -1
- package/dist/NotificationServicesController/index.d.cts.map +1 -1
- package/dist/NotificationServicesController/index.d.mts +0 -1
- package/dist/NotificationServicesController/index.d.mts.map +1 -1
- package/dist/NotificationServicesController/index.mjs +0 -1
- package/dist/NotificationServicesController/index.mjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.cjs +2 -2
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.cjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.d.cts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.d.mts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.mjs +2 -2
- package/dist/NotificationServicesController/mocks/mock-feature-announcements.mjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs +120 -0
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs +120 -0
- package/dist/NotificationServicesController/mocks/mock-raw-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.cjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.d.cts +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.d.cts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.d.mts +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.d.mts.map +1 -1
- package/dist/NotificationServicesController/mocks/mock-snap-notification.mjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mockResponses.cjs +6 -0
- package/dist/NotificationServicesController/mocks/mockResponses.cjs.map +1 -1
- package/dist/NotificationServicesController/mocks/mockResponses.d.cts.map +1 -1
- package/dist/NotificationServicesController/mocks/mockResponses.d.mts.map +1 -1
- package/dist/NotificationServicesController/mocks/mockResponses.mjs +6 -0
- package/dist/NotificationServicesController/mocks/mockResponses.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.cjs +11 -9
- package/dist/NotificationServicesController/processors/process-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.d.cts +1 -563
- package/dist/NotificationServicesController/processors/process-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.d.mts +1 -563
- package/dist/NotificationServicesController/processors/process-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.mjs +11 -9
- package/dist/NotificationServicesController/processors/process-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.d.cts +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.d.mts +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/processors/process-snap-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/services/api-notifications.cjs +21 -21
- package/dist/NotificationServicesController/services/api-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/services/api-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/services/api-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/services/api-notifications.mjs +21 -21
- package/dist/NotificationServicesController/services/api-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.cjs +19 -10
- package/dist/NotificationServicesController/services/feature-announcements.cjs.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.d.cts.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.d.mts.map +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.mjs +19 -10
- package/dist/NotificationServicesController/services/feature-announcements.mjs.map +1 -1
- package/dist/NotificationServicesController/services/notification-config-cache.cjs +4 -4
- package/dist/NotificationServicesController/services/notification-config-cache.cjs.map +1 -1
- package/dist/NotificationServicesController/services/notification-config-cache.mjs +4 -4
- package/dist/NotificationServicesController/services/notification-config-cache.mjs.map +1 -1
- package/dist/NotificationServicesController/services/perp-notifications.cjs +2 -2
- package/dist/NotificationServicesController/services/perp-notifications.cjs.map +1 -1
- package/dist/NotificationServicesController/services/perp-notifications.d.cts.map +1 -1
- package/dist/NotificationServicesController/services/perp-notifications.d.mts.map +1 -1
- package/dist/NotificationServicesController/services/perp-notifications.mjs +2 -2
- package/dist/NotificationServicesController/services/perp-notifications.mjs.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/notification-api.cjs.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts +2 -0
- package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts +2 -0
- package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/notification-api.mjs.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/schema.cjs +2 -0
- package/dist/NotificationServicesController/types/notification-api/schema.cjs.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/schema.d.cts +23 -0
- package/dist/NotificationServicesController/types/notification-api/schema.d.cts.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/schema.d.mts +23 -0
- package/dist/NotificationServicesController/types/notification-api/schema.d.mts.map +1 -1
- package/dist/NotificationServicesController/types/notification-api/schema.mjs +2 -0
- package/dist/NotificationServicesController/types/notification-api/schema.mjs.map +1 -1
- package/dist/NotificationServicesController/types/perps/schema.cjs +2 -0
- package/dist/NotificationServicesController/types/perps/schema.cjs.map +1 -1
- package/dist/NotificationServicesController/types/perps/schema.d.cts.map +1 -1
- package/dist/NotificationServicesController/types/perps/schema.d.mts.map +1 -1
- package/dist/NotificationServicesController/types/perps/schema.mjs +2 -0
- package/dist/NotificationServicesController/types/perps/schema.mjs.map +1 -1
- package/dist/NotificationServicesController/utils/isVersionInBounds.cjs.map +1 -1
- package/dist/NotificationServicesController/utils/isVersionInBounds.d.cts.map +1 -1
- package/dist/NotificationServicesController/utils/isVersionInBounds.d.mts.map +1 -1
- package/dist/NotificationServicesController/utils/isVersionInBounds.mjs.map +1 -1
- package/dist/NotificationServicesController/utils/should-auto-expire.cjs.map +1 -1
- package/dist/NotificationServicesController/utils/should-auto-expire.d.cts.map +1 -1
- package/dist/NotificationServicesController/utils/should-auto-expire.d.mts.map +1 -1
- package/dist/NotificationServicesController/utils/should-auto-expire.mjs.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs +0 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.cjs.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +0 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs.map +1 -1
- package/dist/NotificationServicesPushController/mocks/mockResponse.cjs.map +1 -1
- package/dist/NotificationServicesPushController/mocks/mockResponse.d.cts +9 -24
- package/dist/NotificationServicesPushController/mocks/mockResponse.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/mocks/mockResponse.d.mts +9 -24
- package/dist/NotificationServicesPushController/mocks/mockResponse.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/mocks/mockResponse.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.cjs.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.mjs.map +1 -1
- package/dist/NotificationServicesPushController/services/services.cjs.map +1 -1
- package/dist/NotificationServicesPushController/services/services.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/services/services.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/services/services.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.cjs +4 -4
- package/dist/NotificationServicesPushController/utils/get-notification-data.cjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.cts +2 -2
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts +2 -2
- package/dist/NotificationServicesPushController/utils/get-notification-data.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs +4 -4
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.cjs +62 -71
- package/dist/NotificationServicesPushController/utils/get-notification-message.cjs.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts +9 -9
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts +9 -9
- package/dist/NotificationServicesPushController/utils/get-notification-message.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +62 -71
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs.map +1 -1
- package/dist/NotificationServicesPushController/web/push-utils.cjs +15 -7
- package/dist/NotificationServicesPushController/web/push-utils.cjs.map +1 -1
- package/dist/NotificationServicesPushController/web/push-utils.d.cts.map +1 -1
- package/dist/NotificationServicesPushController/web/push-utils.d.mts.map +1 -1
- package/dist/NotificationServicesPushController/web/push-utils.mjs +16 -8
- package/dist/NotificationServicesPushController/web/push-utils.mjs.map +1 -1
- package/dist/shared/is-onchain-notification.cjs +3 -3
- package/dist/shared/is-onchain-notification.cjs.map +1 -1
- package/dist/shared/is-onchain-notification.d.cts +2 -2
- package/dist/shared/is-onchain-notification.d.cts.map +1 -1
- package/dist/shared/is-onchain-notification.d.mts +2 -2
- package/dist/shared/is-onchain-notification.d.mts.map +1 -1
- package/dist/shared/is-onchain-notification.mjs +3 -3
- package/dist/shared/is-onchain-notification.mjs.map +1 -1
- package/dist/shared/to-raw-notification.cjs.map +1 -1
- package/dist/shared/to-raw-notification.mjs.map +1 -1
- package/package.json +12 -25
- package/dist/NotificationServicesController/ui/constants.cjs +0 -75
- package/dist/NotificationServicesController/ui/constants.cjs.map +0 -1
- package/dist/NotificationServicesController/ui/constants.d.cts +0 -66
- package/dist/NotificationServicesController/ui/constants.d.cts.map +0 -1
- package/dist/NotificationServicesController/ui/constants.d.mts +0 -66
- package/dist/NotificationServicesController/ui/constants.d.mts.map +0 -1
- package/dist/NotificationServicesController/ui/constants.mjs +0 -71
- package/dist/NotificationServicesController/ui/constants.mjs.map +0 -1
- package/dist/NotificationServicesController/ui/index.cjs +0 -18
- package/dist/NotificationServicesController/ui/index.cjs.map +0 -1
- package/dist/NotificationServicesController/ui/index.d.cts +0 -2
- package/dist/NotificationServicesController/ui/index.d.cts.map +0 -1
- package/dist/NotificationServicesController/ui/index.d.mts +0 -2
- package/dist/NotificationServicesController/ui/index.d.mts.map +0 -1
- package/dist/NotificationServicesController/ui/index.mjs +0 -2
- package/dist/NotificationServicesController/ui/index.mjs.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.cjs +0 -145
- package/dist/NotificationServicesPushController/services/push/push-web.cjs.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.d.cts +0 -34
- package/dist/NotificationServicesPushController/services/push/push-web.d.cts.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.d.mts +0 -34
- package/dist/NotificationServicesPushController/services/push/push-web.d.mts.map +0 -1
- package/dist/NotificationServicesPushController/services/push/push-web.mjs +0 -142
- package/dist/NotificationServicesPushController/services/push/push-web.mjs.map +0 -1
- package/notification-services/ui/package.json +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-announcements.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/feature-announcements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,4CAA4C;AAG3E,OAAO,EAAE,aAAa,EAAE,6CAAyC;AACjE,OAAO,EAAE,0BAA0B,EAAE,uDAAmD;AAaxF,OAAO,EAAE,iBAAiB,EAAE,uCAAmC;AAE/D,MAAM,gBAAgB,GAAG,WAAW,CAAC;AACrC,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAC7C,MAAM,iBAAiB,GAAG,YAAY,CAAC;AACvC,MAAM,cAAc,GAAG,oBAAoB,CAAC;AA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AC","sourcesContent":["import { documentToHtmlString } from '@contentful/rich-text-html-renderer';\nimport type { Entry, Asset, EntryCollection } from 'contentful';\n\nimport { TRIGGER_TYPES } from '../constants/notification-schema';\nimport { processFeatureAnnouncement } from '../processors/process-feature-announcement';\nimport type { FeatureAnnouncementRawNotification } from '../types/feature-announcement/feature-announcement';\nimport type {\n ImageFields,\n TypeFeatureAnnouncement,\n} from '../types/feature-announcement/type-feature-announcement';\nimport type {\n TypeExternalLinkFields,\n TypePortfolioLinkFields,\n TypeExtensionLinkFields,\n TypeMobileLinkFields,\n} from '../types/feature-announcement/type-links';\nimport type { INotification } from '../types/notification/notification';\nimport { isVersionInBounds } from '../utils/isVersionInBounds';\n\nconst DEFAULT_SPACE_ID = ':space_id';\nconst DEFAULT_ACCESS_TOKEN = ':access_token';\nconst DEFAULT_CLIENT_ID = ':client_id';\nconst DEFAULT_DOMAIN = 'cdn.contentful.com';\nconst PREVIEW_DOMAIN = 'preview.contentful.com';\nexport const FEATURE_ANNOUNCEMENT_API = `https://${DEFAULT_DOMAIN}/spaces/${DEFAULT_SPACE_ID}/environments/master/entries`;\nexport const FEATURE_ANNOUNCEMENT_URL = `${FEATURE_ANNOUNCEMENT_API}?access_token=${DEFAULT_ACCESS_TOKEN}&content_type=productAnnouncement&include=10&fields.clients[in]=${DEFAULT_CLIENT_ID}`;\n\ntype Env = {\n spaceId: string;\n accessToken: string;\n platform: 'extension' | 'mobile';\n platformVersion?: string;\n};\n\n/**\n * Contentful API Response Shape\n */\nexport type ContentfulResult = {\n includes?: {\n Entry?: Entry[];\n Asset?: Asset[];\n };\n items?: TypeFeatureAnnouncement[];\n};\n\nexport const getFeatureAnnouncementUrl = (env: Env, previewToken?: string) => {\n const domain = previewToken ? PREVIEW_DOMAIN : DEFAULT_DOMAIN;\n const replacedUrl = FEATURE_ANNOUNCEMENT_URL.replace(\n DEFAULT_SPACE_ID,\n env.spaceId,\n )\n .replace(DEFAULT_ACCESS_TOKEN, previewToken || env.accessToken)\n .replace(DEFAULT_CLIENT_ID, env.platform)\n .replace(DEFAULT_DOMAIN, domain);\n return encodeURI(replacedUrl);\n};\n\nconst fetchFeatureAnnouncementNotifications = async (\n env: Env,\n previewToken?: string,\n): Promise<FeatureAnnouncementRawNotification[]> => {\n const url = getFeatureAnnouncementUrl(env, previewToken);\n\n const data = await fetch(url)\n .then((r) => r.json())\n .catch(() => null);\n\n if (!data) {\n return [];\n }\n\n const findIncludedItem = (sysId: string) => {\n const typedData: EntryCollection<\n | ImageFields\n | TypeExtensionLinkFields\n | TypePortfolioLinkFields\n | TypeMobileLinkFields\n | TypeExternalLinkFields\n > = data;\n const item =\n typedData?.includes?.Entry?.find((i: Entry) => i?.sys?.id === sysId) ||\n typedData?.includes?.Asset?.find((i: Asset) => i?.sys?.id === sysId);\n return item ? item?.fields : null;\n };\n\n const contentfulNotifications = data?.items ?? [];\n const rawNotifications: FeatureAnnouncementRawNotification[] =\n contentfulNotifications.map((n: TypeFeatureAnnouncement) => {\n const { fields } = n;\n const imageFields = fields.image\n ? (findIncludedItem(fields.image.sys.id) as ImageFields['fields'])\n : undefined;\n\n const externalLinkFields = fields.externalLink\n ? (findIncludedItem(\n fields.externalLink.sys.id,\n ) as TypeExternalLinkFields['fields'])\n : undefined;\n const portfolioLinkFields = fields.portfolioLink\n ? (findIncludedItem(\n fields.portfolioLink.sys.id,\n ) as TypePortfolioLinkFields['fields'])\n : undefined;\n const extensionLinkFields = fields.extensionLink\n ? (findIncludedItem(\n fields.extensionLink.sys.id,\n ) as TypeExtensionLinkFields['fields'])\n : undefined;\n const mobileLinkFields = fields.mobileLink\n ? (findIncludedItem(\n fields.mobileLink.sys.id,\n ) as TypeMobileLinkFields['fields'])\n : undefined;\n\n const notification: FeatureAnnouncementRawNotification = {\n type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,\n createdAt: new Date(n.sys.createdAt).toString(),\n data: {\n id: fields.id,\n category: fields.category,\n title: fields.title,\n longDescription: documentToHtmlString(fields.longDescription),\n shortDescription: fields.shortDescription,\n image: {\n title: imageFields?.title,\n description: imageFields?.description,\n url: imageFields?.file?.url ?? '',\n },\n externalLink: externalLinkFields && {\n externalLinkText: externalLinkFields?.externalLinkText,\n externalLinkUrl: externalLinkFields?.externalLinkUrl,\n },\n portfolioLink: portfolioLinkFields && {\n portfolioLinkText: portfolioLinkFields?.portfolioLinkText,\n portfolioLinkUrl: portfolioLinkFields?.portfolioLinkUrl,\n },\n extensionLink: extensionLinkFields && {\n extensionLinkText: extensionLinkFields?.extensionLinkText,\n extensionLinkRoute: extensionLinkFields?.extensionLinkRoute,\n },\n mobileLink: mobileLinkFields && {\n mobileLinkText: mobileLinkFields?.mobileLinkText,\n mobileLinkUrl: mobileLinkFields?.mobileLinkUrl,\n },\n extensionMinimumVersionNumber: fields.extensionMinimumVersionNumber,\n mobileMinimumVersionNumber: fields.mobileMinimumVersionNumber,\n extensionMaximumVersionNumber: fields.extensionMaximumVersionNumber,\n mobileMaximumVersionNumber: fields.mobileMaximumVersionNumber,\n },\n };\n\n return notification;\n });\n\n const versionKeys = {\n extension: {\n min: 'extensionMinimumVersionNumber',\n max: 'extensionMaximumVersionNumber',\n },\n mobile: {\n min: 'mobileMinimumVersionNumber',\n max: 'mobileMaximumVersionNumber',\n },\n } as const;\n\n const filteredRawNotifications = rawNotifications.filter((n) => {\n const minVersion = n.data?.[versionKeys[env.platform].min];\n const maxVersion = n.data?.[versionKeys[env.platform].max];\n return isVersionInBounds({\n currentVersion: env.platformVersion,\n minVersion,\n maxVersion,\n });\n });\n\n return filteredRawNotifications;\n};\n\n/**\n * Gets Feature Announcement from our services\n *\n * @param env - environment for feature announcements\n * @param previewToken - the preview token to use if needed\n * @returns Raw Feature Announcements\n */\nexport async function getFeatureAnnouncementNotifications(\n env: Env,\n previewToken?: string,\n): Promise<INotification[]> {\n if (env?.accessToken && env?.spaceId && env?.platform) {\n const rawNotifications = await fetchFeatureAnnouncementNotifications(\n env,\n previewToken,\n );\n const notifications = rawNotifications.map((notification) =>\n processFeatureAnnouncement(notification),\n );\n\n return notifications;\n }\n\n return [];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"feature-announcements.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/feature-announcements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,4CAA4C;AAG3E,OAAO,EAAE,aAAa,EAAE,6CAAyC;AACjE,OAAO,EAAE,0BAA0B,EAAE,uDAAmD;AAaxF,OAAO,EAAE,iBAAiB,EAAE,uCAAmC;AAE/D,uFAAuF;AACvF,MAAM,mCAAmC,GAAG,CAAC,CAAC;AAE9C,MAAM,gBAAgB,GAAG,WAAW,CAAC;AACrC,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAC7C,MAAM,iBAAiB,GAAG,YAAY,CAAC;AACvC,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAC5C,MAAM,cAAc,GAAG,wBAAwB,CAAC;AAChD,MAAM,CAAC,MAAM,wBAAwB,GAAG,WAAW,cAAc,WAAW,gBAAgB,8BAA8B,CAAC;AAC3H,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,wBAAwB,iBAAiB,oBAAoB,mEAAmE,iBAAiB,EAAE,CAAC;AAuB/L,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,GAAQ,EACR,YAAqB,EACb,EAAE;IACV,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC;IAC9D,MAAM,WAAW,GAAG,wBAAwB,CAAC,OAAO,CAClD,gBAAgB,EAChB,GAAG,CAAC,OAAO,CACZ;SACE,OAAO,CAAC,oBAAoB,EAAE,YAAY,IAAI,GAAG,CAAC,WAAW,CAAC;SAC9D,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,QAAQ,CAAC;SACxC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IACnC,OAAO,SAAS,CAAC,WAAW,CAAC,CAAC;AAChC,CA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,EAAE,EAAE;QAClB,MAAM,UAAU,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC;QACzE,MAAM,UAAU,GAAG,eAAe,CAAC,IAAI,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC;QACzE,OAAO,iBAAiB,CAAC;YACvB,cAAc,EAAE,GAAG,CAAC,eAAe;YACnC,UAAU;YACV,UAAU;SACX,CAAC,CAAC;IACL,CAAC,CACF,CAAC;IAEF,OAAO,wBAAwB,CAAC;AAClC,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,mCAAmC,CACvD,GAAQ,EACR,YAAqB;IAErB,IAAI,GAAG,EAAE,WAAW,IAAI,GAAG,EAAE,OAAO,IAAI,GAAG,EAAE,QAAQ,EAAE,CAAC;QACtD,MAAM,gBAAgB,GAAG,MAAM,qCAAqC,CAClE,GAAG,EACH,YAAY,CACb,CAAC;QACF,MAAM,aAAa,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAC1D,0BAA0B,CAAC,YAAY,CAAC,CACzC,CAAC;QAEF,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import { documentToHtmlString } from '@contentful/rich-text-html-renderer';\nimport type { Entry, Asset, EntryCollection } from 'contentful';\n\nimport { TRIGGER_TYPES } from '../constants/notification-schema';\nimport { processFeatureAnnouncement } from '../processors/process-feature-announcement';\nimport type { FeatureAnnouncementRawNotification } from '../types/feature-announcement/feature-announcement';\nimport type {\n ImageFields,\n TypeFeatureAnnouncement,\n} from '../types/feature-announcement/type-feature-announcement';\nimport type {\n TypeExternalLinkFields,\n TypePortfolioLinkFields,\n TypeExtensionLinkFields,\n TypeMobileLinkFields,\n} from '../types/feature-announcement/type-links';\nimport type { INotification } from '../types/notification/notification';\nimport { isVersionInBounds } from '../utils/isVersionInBounds';\n\n// Feature announcements older than this (by sys.updatedAt) are excluded from the feed.\nconst FEATURE_ANNOUNCEMENT_MAX_AGE_MONTHS = 3;\n\nconst DEFAULT_SPACE_ID = ':space_id';\nconst DEFAULT_ACCESS_TOKEN = ':access_token';\nconst DEFAULT_CLIENT_ID = ':client_id';\nconst DEFAULT_DOMAIN = 'cdn.contentful.com';\nconst PREVIEW_DOMAIN = 'preview.contentful.com';\nexport const FEATURE_ANNOUNCEMENT_API = `https://${DEFAULT_DOMAIN}/spaces/${DEFAULT_SPACE_ID}/environments/master/entries`;\nexport const FEATURE_ANNOUNCEMENT_URL = `${FEATURE_ANNOUNCEMENT_API}?access_token=${DEFAULT_ACCESS_TOKEN}&content_type=productAnnouncement&include=10&fields.clients[in]=${DEFAULT_CLIENT_ID}`;\n\ntype Env = {\n spaceId: string;\n accessToken: string;\n platform: 'extension' | 'mobile';\n platformVersion?: string;\n};\n\n/**\n * Contentful API Response Shape\n */\nexport type ContentfulResult = {\n includes?: {\n // Property names match Contentful API response structure\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Entry?: Entry[];\n // eslint-disable-next-line @typescript-eslint/naming-convention\n Asset?: Asset[];\n };\n items?: TypeFeatureAnnouncement[];\n};\n\nexport const getFeatureAnnouncementUrl = (\n env: Env,\n previewToken?: string,\n): string => {\n const domain = previewToken ? PREVIEW_DOMAIN : DEFAULT_DOMAIN;\n const replacedUrl = FEATURE_ANNOUNCEMENT_URL.replace(\n DEFAULT_SPACE_ID,\n env.spaceId,\n )\n .replace(DEFAULT_ACCESS_TOKEN, previewToken ?? env.accessToken)\n .replace(DEFAULT_CLIENT_ID, env.platform)\n .replace(DEFAULT_DOMAIN, domain);\n return encodeURI(replacedUrl);\n};\n\nconst fetchFeatureAnnouncementNotifications = async (\n env: Env,\n previewToken?: string,\n): Promise<FeatureAnnouncementRawNotification[]> => {\n const url = getFeatureAnnouncementUrl(env, previewToken);\n\n const data = await fetch(url)\n .then((response) => response.json())\n .catch(() => null);\n\n if (!data) {\n return [];\n }\n\n const findIncludedItem = (\n sysId: string,\n ):\n | ImageFields['fields']\n | TypeExtensionLinkFields['fields']\n | TypePortfolioLinkFields['fields']\n | TypeMobileLinkFields['fields']\n | TypeExternalLinkFields['fields']\n | null => {\n const typedData: EntryCollection<\n | ImageFields\n | TypeExtensionLinkFields\n | TypePortfolioLinkFields\n | TypeMobileLinkFields\n | TypeExternalLinkFields\n > = data;\n const item =\n typedData?.includes?.Entry?.find(\n (entry: Entry) => entry?.sys?.id === sysId,\n ) ??\n typedData?.includes?.Asset?.find(\n (asset: Asset) => asset?.sys?.id === sysId,\n );\n return item ? item?.fields : null;\n };\n\n const contentfulNotifications = data?.items ?? [];\n const rawNotifications: FeatureAnnouncementRawNotification[] =\n contentfulNotifications\n .filter((item: TypeFeatureAnnouncement) => {\n const updatedAt = new Date(item.sys.updatedAt);\n const limitDate = new Date();\n limitDate.setMonth(\n limitDate.getMonth() - FEATURE_ANNOUNCEMENT_MAX_AGE_MONTHS,\n );\n return updatedAt > limitDate;\n })\n .map((item: TypeFeatureAnnouncement) => {\n const { fields } = item;\n const imageFields = fields.image\n ? (findIncludedItem(fields.image.sys.id) as ImageFields['fields'])\n : undefined;\n\n const externalLinkFields = fields.externalLink\n ? (findIncludedItem(\n fields.externalLink.sys.id,\n ) as TypeExternalLinkFields['fields'])\n : undefined;\n const portfolioLinkFields = fields.portfolioLink\n ? (findIncludedItem(\n fields.portfolioLink.sys.id,\n ) as TypePortfolioLinkFields['fields'])\n : undefined;\n const extensionLinkFields = fields.extensionLink\n ? (findIncludedItem(\n fields.extensionLink.sys.id,\n ) as TypeExtensionLinkFields['fields'])\n : undefined;\n const mobileLinkFields = fields.mobileLink\n ? (findIncludedItem(\n fields.mobileLink.sys.id,\n ) as TypeMobileLinkFields['fields'])\n : undefined;\n\n const notification: FeatureAnnouncementRawNotification = {\n type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT,\n createdAt: new Date(item.sys.createdAt).toString(),\n data: {\n id: fields.id,\n category: fields.category,\n title: fields.title,\n longDescription: documentToHtmlString(fields.longDescription),\n shortDescription: fields.shortDescription,\n image: {\n title: imageFields?.title,\n description: imageFields?.description,\n url: imageFields?.file?.url ?? '',\n },\n externalLink: externalLinkFields && {\n externalLinkText: externalLinkFields?.externalLinkText,\n externalLinkUrl: externalLinkFields?.externalLinkUrl,\n },\n portfolioLink: portfolioLinkFields && {\n portfolioLinkText: portfolioLinkFields?.portfolioLinkText,\n portfolioLinkUrl: portfolioLinkFields?.portfolioLinkUrl,\n },\n extensionLink: extensionLinkFields && {\n extensionLinkText: extensionLinkFields?.extensionLinkText,\n extensionLinkRoute: extensionLinkFields?.extensionLinkRoute,\n },\n mobileLink: mobileLinkFields && {\n mobileLinkText: mobileLinkFields?.mobileLinkText,\n mobileLinkUrl: mobileLinkFields?.mobileLinkUrl,\n },\n extensionMinimumVersionNumber: fields.extensionMinimumVersionNumber,\n mobileMinimumVersionNumber: fields.mobileMinimumVersionNumber,\n extensionMaximumVersionNumber: fields.extensionMaximumVersionNumber,\n mobileMaximumVersionNumber: fields.mobileMaximumVersionNumber,\n },\n };\n\n return notification;\n });\n\n const versionKeys = {\n extension: {\n min: 'extensionMinimumVersionNumber',\n max: 'extensionMaximumVersionNumber',\n },\n mobile: {\n min: 'mobileMinimumVersionNumber',\n max: 'mobileMaximumVersionNumber',\n },\n } as const;\n\n const filteredRawNotifications = rawNotifications.filter(\n (rawNotification) => {\n const minVersion = rawNotification.data?.[versionKeys[env.platform].min];\n const maxVersion = rawNotification.data?.[versionKeys[env.platform].max];\n return isVersionInBounds({\n currentVersion: env.platformVersion,\n minVersion,\n maxVersion,\n });\n },\n );\n\n return filteredRawNotifications;\n};\n\n/**\n * Gets Feature Announcement from our services\n *\n * @param env - environment for feature announcements\n * @param previewToken - the preview token to use if needed\n * @returns Raw Feature Announcements\n */\nexport async function getFeatureAnnouncementNotifications(\n env: Env,\n previewToken?: string,\n): Promise<INotification[]> {\n if (env?.accessToken && env?.spaceId && env?.platform) {\n const rawNotifications = await fetchFeatureAnnouncementNotifications(\n env,\n previewToken,\n );\n const notifications = rawNotifications.map((notification) =>\n processFeatureAnnouncement(notification),\n );\n\n return notifications;\n }\n\n return [];\n}\n"]}
|
|
@@ -10,7 +10,7 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
11
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
12
|
};
|
|
13
|
-
var _OnChainNotificationsCache_instances, _OnChainNotificationsCache_cache,
|
|
13
|
+
var _OnChainNotificationsCache_instances, _OnChainNotificationsCache_cache, _OnChainNotificationsCache_ttl, _OnChainNotificationsCache_isExpired, _OnChainNotificationsCache_hasAllAddresses;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.notificationsConfigCache = exports.OnChainNotificationsCache = exports.NotificationConfigCacheTTL = void 0;
|
|
16
16
|
exports.NotificationConfigCacheTTL = 1000 * 60; // 60 seconds
|
|
@@ -18,7 +18,7 @@ class OnChainNotificationsCache {
|
|
|
18
18
|
constructor() {
|
|
19
19
|
_OnChainNotificationsCache_instances.add(this);
|
|
20
20
|
_OnChainNotificationsCache_cache.set(this, null);
|
|
21
|
-
|
|
21
|
+
_OnChainNotificationsCache_ttl.set(this, exports.NotificationConfigCacheTTL);
|
|
22
22
|
}
|
|
23
23
|
get(addresses) {
|
|
24
24
|
if (__classPrivateFieldGet(this, _OnChainNotificationsCache_instances, "m", _OnChainNotificationsCache_isExpired).call(this) || !__classPrivateFieldGet(this, _OnChainNotificationsCache_instances, "m", _OnChainNotificationsCache_hasAllAddresses).call(this, addresses)) {
|
|
@@ -49,8 +49,8 @@ class OnChainNotificationsCache {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
exports.OnChainNotificationsCache = OnChainNotificationsCache;
|
|
52
|
-
_OnChainNotificationsCache_cache = new WeakMap(),
|
|
53
|
-
return !__classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f") || Date.now() - __classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f").timestamp > __classPrivateFieldGet(this,
|
|
52
|
+
_OnChainNotificationsCache_cache = new WeakMap(), _OnChainNotificationsCache_ttl = new WeakMap(), _OnChainNotificationsCache_instances = new WeakSet(), _OnChainNotificationsCache_isExpired = function _OnChainNotificationsCache_isExpired() {
|
|
53
|
+
return !__classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f") || Date.now() - __classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f").timestamp > __classPrivateFieldGet(this, _OnChainNotificationsCache_ttl, "f");
|
|
54
54
|
}, _OnChainNotificationsCache_hasAllAddresses = function _OnChainNotificationsCache_hasAllAddresses(addresses) {
|
|
55
55
|
if (!__classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f")) {
|
|
56
56
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-config-cache.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/notification-config-cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKa,QAAA,0BAA0B,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,aAAa;AAElE,MAAa,yBAAyB;IAAtC;;QACE,2CAAyC,IAAI,EAAC;QAErC,yCAAO,kCAA0B,EAAC;IA8C7C,CAAC;IAjCC,GAAG,CAAC,SAAmB;QACrB,IAAI,uBAAA,IAAI,kFAAW,MAAf,IAAI,CAAa,IAAI,CAAC,uBAAA,IAAI,wFAAiB,MAArB,IAAI,EAAkB,SAAS,CAAC,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACj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,IAAI,yBAAyB,EAAE,CAAC","sourcesContent":["type NotificationConfigCache = {\n data: Map<string, boolean>;\n timestamp: number;\n};\n\nexport const NotificationConfigCacheTTL = 1000 * 60; // 60 seconds\n\nexport class OnChainNotificationsCache {\n #cache: NotificationConfigCache | null = null;\n\n readonly #
|
|
1
|
+
{"version":3,"file":"notification-config-cache.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/notification-config-cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKa,QAAA,0BAA0B,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,aAAa;AAElE,MAAa,yBAAyB;IAAtC;;QACE,2CAAyC,IAAI,EAAC;QAErC,yCAAO,kCAA0B,EAAC;IA8C7C,CAAC;IAjCC,GAAG,CAAC,SAAmB;QACrB,IAAI,uBAAA,IAAI,kFAAW,MAAf,IAAI,CAAa,IAAI,CAAC,uBAAA,IAAI,wFAAiB,MAArB,IAAI,EAAkB,SAAS,CAAC,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACjC,OAAO;YACP,OAAO,EAAE,uBAAA,IAAI,wCAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK;SACjD,CAAC,CAAC,CAAC;IACN,CAAC;IAED,GAAG,CAAC,IAA6C;QAC/C,IAAI,GAAG,GAAyB,IAAI,GAAG,EAAmB,CAAC;QAE3D,kEAAkE;QAClE,IAAI,uBAAA,IAAI,wCAAO,IAAI,CAAC,uBAAA,IAAI,kFAAW,MAAf,IAAI,CAAa,EAAE,CAAC;YACtC,GAAG,GAAG,IAAI,GAAG,CAAC,uBAAA,IAAI,wCAAO,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC;QAED,uBAAuB;QACvB,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;YACpC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,uBAAA,IAAI,oCAAU;YACZ,IAAI,EAAE,GAAG;YACT,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,MAAA,CAAC;IACJ,CAAC;IAED,KAAK;QACH,uBAAA,IAAI,oCAAU,IAAI,MAAA,CAAC;IACrB,CAAC;CACF;AAjDD,8DAiDC;;IA3CG,OAAO,CAAC,uBAAA,IAAI,wCAAO,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,uBAAA,IAAI,wCAAO,CAAC,SAAS,GAAG,uBAAA,IAAI,sCAAK,CAAC;AACxE,CAAC,mGAEgB,SAAmB;IAClC,IAAI,CAAC,uBAAA,IAAI,wCAAO,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,uBAAA,IAAI,wCAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC;AAqCU,QAAA,wBAAwB,GAAG,IAAI,yBAAyB,EAAE,CAAC","sourcesContent":["type NotificationConfigCache = {\n data: Map<string, boolean>;\n timestamp: number;\n};\n\nexport const NotificationConfigCacheTTL = 1000 * 60; // 60 seconds\n\nexport class OnChainNotificationsCache {\n #cache: NotificationConfigCache | null = null;\n\n readonly #ttl = NotificationConfigCacheTTL;\n\n #isExpired(): boolean {\n return !this.#cache || Date.now() - this.#cache.timestamp > this.#ttl;\n }\n\n #hasAllAddresses(addresses: string[]): boolean {\n if (!this.#cache) {\n return false;\n }\n return addresses.every((address) => this.#cache?.data.has(address));\n }\n\n get(addresses: string[]): { address: string; enabled: boolean }[] | null {\n if (this.#isExpired() || !this.#hasAllAddresses(addresses)) {\n return null;\n }\n\n return addresses.map((address) => ({\n address,\n enabled: this.#cache?.data.get(address) ?? false,\n }));\n }\n\n set(data: { address: string; enabled: boolean }[]): void {\n let map: Map<string, boolean> = new Map<string, boolean>();\n\n // If we have existing cache, preserve it and update with new data\n if (this.#cache && !this.#isExpired()) {\n map = new Map(this.#cache.data);\n }\n\n // Update with new data\n data.forEach(({ address, enabled }) => {\n map.set(address, enabled);\n });\n\n this.#cache = {\n data: map,\n timestamp: Date.now(),\n };\n }\n\n clear(): void {\n this.#cache = null;\n }\n}\n\nexport const notificationsConfigCache = new OnChainNotificationsCache();\n"]}
|
|
@@ -9,13 +9,13 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
10
10
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
11
11
|
};
|
|
12
|
-
var _OnChainNotificationsCache_instances, _OnChainNotificationsCache_cache,
|
|
12
|
+
var _OnChainNotificationsCache_instances, _OnChainNotificationsCache_cache, _OnChainNotificationsCache_ttl, _OnChainNotificationsCache_isExpired, _OnChainNotificationsCache_hasAllAddresses;
|
|
13
13
|
export const NotificationConfigCacheTTL = 1000 * 60; // 60 seconds
|
|
14
14
|
export class OnChainNotificationsCache {
|
|
15
15
|
constructor() {
|
|
16
16
|
_OnChainNotificationsCache_instances.add(this);
|
|
17
17
|
_OnChainNotificationsCache_cache.set(this, null);
|
|
18
|
-
|
|
18
|
+
_OnChainNotificationsCache_ttl.set(this, NotificationConfigCacheTTL);
|
|
19
19
|
}
|
|
20
20
|
get(addresses) {
|
|
21
21
|
if (__classPrivateFieldGet(this, _OnChainNotificationsCache_instances, "m", _OnChainNotificationsCache_isExpired).call(this) || !__classPrivateFieldGet(this, _OnChainNotificationsCache_instances, "m", _OnChainNotificationsCache_hasAllAddresses).call(this, addresses)) {
|
|
@@ -45,8 +45,8 @@ export class OnChainNotificationsCache {
|
|
|
45
45
|
__classPrivateFieldSet(this, _OnChainNotificationsCache_cache, null, "f");
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
_OnChainNotificationsCache_cache = new WeakMap(),
|
|
49
|
-
return !__classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f") || Date.now() - __classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f").timestamp > __classPrivateFieldGet(this,
|
|
48
|
+
_OnChainNotificationsCache_cache = new WeakMap(), _OnChainNotificationsCache_ttl = new WeakMap(), _OnChainNotificationsCache_instances = new WeakSet(), _OnChainNotificationsCache_isExpired = function _OnChainNotificationsCache_isExpired() {
|
|
49
|
+
return !__classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f") || Date.now() - __classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f").timestamp > __classPrivateFieldGet(this, _OnChainNotificationsCache_ttl, "f");
|
|
50
50
|
}, _OnChainNotificationsCache_hasAllAddresses = function _OnChainNotificationsCache_hasAllAddresses(addresses) {
|
|
51
51
|
if (!__classPrivateFieldGet(this, _OnChainNotificationsCache_cache, "f")) {
|
|
52
52
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-config-cache.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/notification-config-cache.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,aAAa;AAElE,MAAM,OAAO,yBAAyB;IAAtC;;QACE,2CAAyC,IAAI,EAAC;QAErC,yCAAO,0BAA0B,EAAC;IA8C7C,CAAC;IAjCC,GAAG,CAAC,SAAmB;QACrB,IAAI,uBAAA,IAAI,kFAAW,MAAf,IAAI,CAAa,IAAI,CAAC,uBAAA,IAAI,wFAAiB,MAArB,IAAI,EAAkB,SAAS,CAAC,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CA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AwB,GAAG,IAAI,yBAAyB,EAAE,CAAC","sourcesContent":["type NotificationConfigCache = {\n data: Map<string, boolean>;\n timestamp: number;\n};\n\nexport const NotificationConfigCacheTTL = 1000 * 60; // 60 seconds\n\nexport class OnChainNotificationsCache {\n #cache: NotificationConfigCache | null = null;\n\n readonly #
|
|
1
|
+
{"version":3,"file":"notification-config-cache.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/notification-config-cache.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,aAAa;AAElE,MAAM,OAAO,yBAAyB;IAAtC;;QACE,2CAAyC,IAAI,EAAC;QAErC,yCAAO,0BAA0B,EAAC;IA8C7C,CAAC;IAjCC,GAAG,CAAC,SAAmB;QACrB,IAAI,uBAAA,IAAI,kFAAW,MAAf,IAAI,CAAa,IAAI,CAAC,uBAAA,IAAI,wFAAiB,MAArB,IAAI,EAAkB,SAAS,CAAC,EAAE,CAAC;YAC3D,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACjC,OAAO;YACP,OAAO,EAAE,uBAAA,IAAI,wCAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK;SACjD,CAAC,CAAC,CAAC;IACN,CAAC;IAED,GAAG,CAAC,IAA6C;QAC/C,IAAI,GAAG,GAAyB,IAAI,GAAG,EAAmB,CAAC;QAE3D,kEAAkE;QAClE,IAAI,uBAAA,IAAI,wCAAO,IAAI,CAAC,uBAAA,IAAI,kFAAW,MAAf,IAAI,CAAa,EAAE,CAAC;YACtC,GAAG,GAAG,IAAI,GAAG,CAAC,uBAAA,IAAI,wCAAO,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC;QAED,uBAAuB;QACvB,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE;YACpC,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,uBAAA,IAAI,oCAAU;YACZ,IAAI,EAAE,GAAG;YACT,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;SACtB,MAAA,CAAC;IACJ,CAAC;IAED,KAAK;QACH,uBAAA,IAAI,oCAAU,IAAI,MAAA,CAAC;IACrB,CAAC;CACF;;IA3CG,OAAO,CAAC,uBAAA,IAAI,wCAAO,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,uBAAA,IAAI,wCAAO,CAAC,SAAS,GAAG,uBAAA,IAAI,sCAAK,CAAC;AACxE,CAAC,mGAEgB,SAAmB;IAClC,IAAI,CAAC,uBAAA,IAAI,wCAAO,EAAE,CAAC;QACjB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,uBAAA,IAAI,wCAAO,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC;AACtE,CAAC;AAqCH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,yBAAyB,EAAE,CAAC","sourcesContent":["type NotificationConfigCache = {\n data: Map<string, boolean>;\n timestamp: number;\n};\n\nexport const NotificationConfigCacheTTL = 1000 * 60; // 60 seconds\n\nexport class OnChainNotificationsCache {\n #cache: NotificationConfigCache | null = null;\n\n readonly #ttl = NotificationConfigCacheTTL;\n\n #isExpired(): boolean {\n return !this.#cache || Date.now() - this.#cache.timestamp > this.#ttl;\n }\n\n #hasAllAddresses(addresses: string[]): boolean {\n if (!this.#cache) {\n return false;\n }\n return addresses.every((address) => this.#cache?.data.has(address));\n }\n\n get(addresses: string[]): { address: string; enabled: boolean }[] | null {\n if (this.#isExpired() || !this.#hasAllAddresses(addresses)) {\n return null;\n }\n\n return addresses.map((address) => ({\n address,\n enabled: this.#cache?.data.get(address) ?? false,\n }));\n }\n\n set(data: { address: string; enabled: boolean }[]): void {\n let map: Map<string, boolean> = new Map<string, boolean>();\n\n // If we have existing cache, preserve it and update with new data\n if (this.#cache && !this.#isExpired()) {\n map = new Map(this.#cache.data);\n }\n\n // Update with new data\n data.forEach(({ address, enabled }) => {\n map.set(address, enabled);\n });\n\n this.#cache = {\n data: map,\n timestamp: Date.now(),\n };\n }\n\n clear(): void {\n this.#cache = null;\n }\n}\n\nexport const notificationsConfigCache = new OnChainNotificationsCache();\n"]}
|
|
@@ -23,8 +23,8 @@ async function createPerpOrderNotification(bearerToken, orderInput) {
|
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
catch (
|
|
27
|
-
console.error('Failed to create perp order notification',
|
|
26
|
+
catch (error) {
|
|
27
|
+
console.error('Failed to create perp order notification', error);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.createPerpOrderNotification = createPerpOrderNotification;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perp-notifications.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/perp-notifications.ts"],"names":[],"mappings":";;;AAAA,iEAGoC;AAIvB,QAAA,SAAS,GAAG,kCAAkC,CAAC;AAC/C,QAAA,uBAAuB,GAAG,GAAG,iBAAS,gBAAgB,CAAC;AAEpE;;;;;GAKG;AACI,KAAK,UAAU,2BAA2B,CAC/C,WAAmB,EACnB,UAAsB;IAEtB,IAAI,CAAC;QACH,MAAM,IAAA,sCAAmB,GAAE,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE;YAC7C,OAAO,IAAA,kCAAe,EAAC,+BAAuB,EAAE;gBAC9C,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,UAAU,WAAW,EAAE;iBACvC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;aACjC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"perp-notifications.cjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/perp-notifications.ts"],"names":[],"mappings":";;;AAAA,iEAGoC;AAIvB,QAAA,SAAS,GAAG,kCAAkC,CAAC;AAC/C,QAAA,uBAAuB,GAAG,GAAG,iBAAS,gBAAgB,CAAC;AAEpE;;;;;GAKG;AACI,KAAK,UAAU,2BAA2B,CAC/C,WAAmB,EACnB,UAAsB;IAEtB,IAAI,CAAC;QACH,MAAM,IAAA,sCAAmB,GAAE,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE;YAC7C,OAAO,IAAA,kCAAe,EAAC,+BAAuB,EAAE;gBAC9C,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,UAAU,WAAW,EAAE;iBACvC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;aACjC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,0CAA0C,EAAE,KAAK,CAAC,CAAC;IACnE,CAAC;AACH,CAAC;AAlBD,kEAkBC","sourcesContent":["import {\n createServicePolicy,\n successfulFetch,\n} from '@metamask/controller-utils';\n\nimport type { OrderInput } from '../types';\n\nexport const PERPS_API = 'https://perps.api.cx.metamask.io';\nexport const PERPS_API_CREATE_ORDERS = `${PERPS_API}/api/v1/orders`;\n\n/**\n * Sends a perp order to our API to create a perp order subscription\n *\n * @param bearerToken - JWT for authentication\n * @param orderInput - order input shape\n */\nexport async function createPerpOrderNotification(\n bearerToken: string,\n orderInput: OrderInput,\n): Promise<void> {\n try {\n await createServicePolicy().execute(async () => {\n return successfulFetch(PERPS_API_CREATE_ORDERS, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${bearerToken}`,\n },\n body: JSON.stringify(orderInput),\n });\n });\n } catch (error) {\n console.error('Failed to create perp order notification', error);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perp-notifications.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/perp-notifications.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,2BAAiB;AAE3C,eAAO,MAAM,SAAS,qCAAqC,CAAC;AAC5D,eAAO,MAAM,uBAAuB,mDAA+B,CAAC;AAEpE;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"perp-notifications.d.cts","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/perp-notifications.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,2BAAiB;AAE3C,eAAO,MAAM,SAAS,qCAAqC,CAAC;AAC5D,eAAO,MAAM,uBAAuB,mDAA+B,CAAC;AAEpE;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,IAAI,CAAC,CAef"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perp-notifications.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/perp-notifications.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,2BAAiB;AAE3C,eAAO,MAAM,SAAS,qCAAqC,CAAC;AAC5D,eAAO,MAAM,uBAAuB,mDAA+B,CAAC;AAEpE;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"perp-notifications.d.mts","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/perp-notifications.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,2BAAiB;AAE3C,eAAO,MAAM,SAAS,qCAAqC,CAAC;AAC5D,eAAO,MAAM,uBAAuB,mDAA+B,CAAC;AAEpE;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,UAAU,GACrB,OAAO,CAAC,IAAI,CAAC,CAef"}
|
|
@@ -20,8 +20,8 @@ export async function createPerpOrderNotification(bearerToken, orderInput) {
|
|
|
20
20
|
});
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
catch (
|
|
24
|
-
console.error('Failed to create perp order notification',
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error('Failed to create perp order notification', error);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=perp-notifications.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perp-notifications.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/perp-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,eAAe,EAChB,mCAAmC;AAIpC,MAAM,CAAC,MAAM,SAAS,GAAG,kCAAkC,CAAC;AAC5D,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,SAAS,gBAAgB,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,WAAmB,EACnB,UAAsB;IAEtB,IAAI,CAAC;QACH,MAAM,mBAAmB,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE;YAC7C,OAAO,eAAe,CAAC,uBAAuB,EAAE;gBAC9C,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,UAAU,WAAW,EAAE;iBACvC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;aACjC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"perp-notifications.mjs","sourceRoot":"","sources":["../../../src/NotificationServicesController/services/perp-notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,eAAe,EAChB,mCAAmC;AAIpC,MAAM,CAAC,MAAM,SAAS,GAAG,kCAAkC,CAAC;AAC5D,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,SAAS,gBAAgB,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,WAAmB,EACnB,UAAsB;IAEtB,IAAI,CAAC;QACH,MAAM,mBAAmB,EAAE,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE;YAC7C,OAAO,eAAe,CAAC,uBAAuB,EAAE;gBAC9C,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,UAAU,WAAW,EAAE;iBACvC;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;aACjC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,0CAA0C,EAAE,KAAK,CAAC,CAAC;IACnE,CAAC;AACH,CAAC","sourcesContent":["import {\n createServicePolicy,\n successfulFetch,\n} from '@metamask/controller-utils';\n\nimport type { OrderInput } from '../types';\n\nexport const PERPS_API = 'https://perps.api.cx.metamask.io';\nexport const PERPS_API_CREATE_ORDERS = `${PERPS_API}/api/v1/orders`;\n\n/**\n * Sends a perp order to our API to create a perp order subscription\n *\n * @param bearerToken - JWT for authentication\n * @param orderInput - order input shape\n */\nexport async function createPerpOrderNotification(\n bearerToken: string,\n orderInput: OrderInput,\n): Promise<void> {\n try {\n await createServicePolicy().execute(async () => {\n return successfulFetch(PERPS_API_CREATE_ORDERS, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${bearerToken}`,\n },\n body: JSON.stringify(orderInput),\n });\n });\n } catch (error) {\n console.error('Failed to create perp order notification', error);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-api.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"notification-api.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"","sourcesContent":["// Types derived from external Notification API schema - naming follows API conventions\n/* eslint-disable @typescript-eslint/naming-convention */\nimport type { components } from './schema';\nimport type { TRIGGER_TYPES } from '../../constants/notification-schema';\nimport type { Compute } from '../type-utils';\n\nexport type Data_MetamaskSwapCompleted =\n components['schemas']['Data_MetamaskSwapCompleted'];\nexport type Data_LidoStakeReadyToBeWithdrawn =\n components['schemas']['Data_LidoStakeReadyToBeWithdrawn'];\nexport type Data_LidoStakeCompleted =\n components['schemas']['Data_LidoStakeCompleted'];\nexport type Data_LidoWithdrawalRequested =\n components['schemas']['Data_LidoWithdrawalRequested'];\nexport type Data_LidoWithdrawalCompleted =\n components['schemas']['Data_LidoWithdrawalCompleted'];\nexport type Data_RocketPoolStakeCompleted =\n components['schemas']['Data_RocketPoolStakeCompleted'];\nexport type Data_RocketPoolUnstakeCompleted =\n components['schemas']['Data_RocketPoolUnstakeCompleted'];\nexport type Data_ETHSent = components['schemas']['Data_ETHSent'];\nexport type Data_ETHReceived = components['schemas']['Data_ETHReceived'];\nexport type Data_ERC20Sent = components['schemas']['Data_ERC20Sent'];\nexport type Data_ERC20Received = components['schemas']['Data_ERC20Received'];\nexport type Data_ERC721Sent = components['schemas']['Data_ERC721Sent'];\nexport type Data_ERC721Received = components['schemas']['Data_ERC721Received'];\nexport type NetworkMetadata = components['schemas']['NetworkMetadata'];\nexport type BlockExplorer = components['schemas']['BlockExplorer'];\n\ntype Notification = components['schemas']['NotificationOutputV3'][number];\ntype PlatformNotification = Extract<\n Notification,\n { notification_type: 'platform' }\n>;\ntype OnChainNotification = Extract<\n Notification,\n { notification_type: 'on-chain' }\n>;\n\ntype ConvertToEnum<Kind> = {\n [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;\n}[TRIGGER_TYPES];\n\n/**\n * Type-Computation.\n * Adds a `type` field to on-chain notifications for easier enum checking.\n * Preserves the original nested payload structure.\n */\ntype NormalizeOnChainNotification<\n N extends OnChainNotification = OnChainNotification,\n NotificationDataKinds extends string = NonNullable<\n N['payload']['data']\n >['kind'],\n> = {\n [K in NotificationDataKinds]: Compute<\n Omit<N, 'payload'> & {\n type: ConvertToEnum<K>;\n payload: Compute<\n Omit<N['payload'], 'data'> & {\n data: Extract<NonNullable<N['payload']['data']>, { kind: K }>;\n }\n >;\n }\n >;\n}[NotificationDataKinds];\n\n/**\n * Type-Computation.\n * Adds a `type` field to platform notifications for easier enum checking.\n * Preserves the original nested payload structure.\n */\ntype NormalizePlatformNotification<\n N extends PlatformNotification = PlatformNotification,\n NotificationKind extends string = N['notification_type'],\n> = {\n [K in NotificationKind]: Compute<\n N & {\n type: ConvertToEnum<K>;\n }\n >;\n}[NotificationKind];\n\nexport type OnChainRawNotification = Compute<\n NormalizeOnChainNotification<OnChainNotification>\n>;\n\nexport type PlatformRawNotification = Compute<\n NormalizePlatformNotification<PlatformNotification>\n>;\n\nexport type UnprocessedRawNotification = Notification;\n\nexport type NormalisedAPINotification =\n | OnChainRawNotification\n | PlatformRawNotification;\n\nexport type OnChainRawNotificationsWithNetworkFields = Extract<\n OnChainRawNotification,\n { payload: { data: { network_fee: unknown } } }\n>;\n"]}
|
|
@@ -14,6 +14,8 @@ 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 NetworkMetadata = components['schemas']['NetworkMetadata'];
|
|
18
|
+
export type BlockExplorer = components['schemas']['BlockExplorer'];
|
|
17
19
|
type Notification = components['schemas']['NotificationOutputV3'][number];
|
|
18
20
|
type PlatformNotification = Extract<Notification, {
|
|
19
21
|
notification_type: 'platform';
|
package/dist/NotificationServicesController/types/notification-api/notification-api.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-api.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notification-api.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAiB;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,gDAA4C;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,0BAAsB;AAE7C,MAAM,MAAM,0BAA0B,GACpC,UAAU,CAAC,SAAS,CAAC,CAAC,4BAA4B,CAAC,CAAC;AACtD,MAAM,MAAM,gCAAgC,GAC1C,UAAU,CAAC,SAAS,CAAC,CAAC,kCAAkC,CAAC,CAAC;AAC5D,MAAM,MAAM,uBAAuB,GACjC,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAC;AACnD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,6BAA6B,GACvC,UAAU,CAAC,SAAS,CAAC,CAAC,+BAA+B,CAAC,CAAC;AACzD,MAAM,MAAM,+BAA+B,GACzC,UAAU,CAAC,SAAS,CAAC,CAAC,iCAAiC,CAAC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,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Sent = 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 NetworkMetadata = components['schemas']['NetworkMetadata'];
|
|
18
|
+
export type BlockExplorer = components['schemas']['BlockExplorer'];
|
|
17
19
|
type Notification = components['schemas']['NotificationOutputV3'][number];
|
|
18
20
|
type PlatformNotification = Extract<Notification, {
|
|
19
21
|
notification_type: 'platform';
|
package/dist/NotificationServicesController/types/notification-api/notification-api.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-api.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"notification-api.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,qBAAiB;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,gDAA4C;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,0BAAsB;AAE7C,MAAM,MAAM,0BAA0B,GACpC,UAAU,CAAC,SAAS,CAAC,CAAC,4BAA4B,CAAC,CAAC;AACtD,MAAM,MAAM,gCAAgC,GAC1C,UAAU,CAAC,SAAS,CAAC,CAAC,kCAAkC,CAAC,CAAC;AAC5D,MAAM,MAAM,uBAAuB,GACjC,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAC;AACnD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,6BAA6B,G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O,CAC5D,sBAAsB,EACtB;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE;YAAE,WAAW,EAAE,OAAO,CAAA;SAAE,CAAA;KAAE,CAAA;CAAE,CAChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-api.mjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"notification-api.mjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/notification-api.ts"],"names":[],"mappings":"","sourcesContent":["// Types derived from external Notification API schema - naming follows API conventions\n/* eslint-disable @typescript-eslint/naming-convention */\nimport type { components } from './schema';\nimport type { TRIGGER_TYPES } from '../../constants/notification-schema';\nimport type { Compute } from '../type-utils';\n\nexport type Data_MetamaskSwapCompleted =\n components['schemas']['Data_MetamaskSwapCompleted'];\nexport type Data_LidoStakeReadyToBeWithdrawn =\n components['schemas']['Data_LidoStakeReadyToBeWithdrawn'];\nexport type Data_LidoStakeCompleted =\n components['schemas']['Data_LidoStakeCompleted'];\nexport type Data_LidoWithdrawalRequested =\n components['schemas']['Data_LidoWithdrawalRequested'];\nexport type Data_LidoWithdrawalCompleted =\n components['schemas']['Data_LidoWithdrawalCompleted'];\nexport type Data_RocketPoolStakeCompleted =\n components['schemas']['Data_RocketPoolStakeCompleted'];\nexport type Data_RocketPoolUnstakeCompleted =\n components['schemas']['Data_RocketPoolUnstakeCompleted'];\nexport type Data_ETHSent = components['schemas']['Data_ETHSent'];\nexport type Data_ETHReceived = components['schemas']['Data_ETHReceived'];\nexport type Data_ERC20Sent = components['schemas']['Data_ERC20Sent'];\nexport type Data_ERC20Received = components['schemas']['Data_ERC20Received'];\nexport type Data_ERC721Sent = components['schemas']['Data_ERC721Sent'];\nexport type Data_ERC721Received = components['schemas']['Data_ERC721Received'];\nexport type NetworkMetadata = components['schemas']['NetworkMetadata'];\nexport type BlockExplorer = components['schemas']['BlockExplorer'];\n\ntype Notification = components['schemas']['NotificationOutputV3'][number];\ntype PlatformNotification = Extract<\n Notification,\n { notification_type: 'platform' }\n>;\ntype OnChainNotification = Extract<\n Notification,\n { notification_type: 'on-chain' }\n>;\n\ntype ConvertToEnum<Kind> = {\n [K in TRIGGER_TYPES]: Kind extends `${K}` ? K : never;\n}[TRIGGER_TYPES];\n\n/**\n * Type-Computation.\n * Adds a `type` field to on-chain notifications for easier enum checking.\n * Preserves the original nested payload structure.\n */\ntype NormalizeOnChainNotification<\n N extends OnChainNotification = OnChainNotification,\n NotificationDataKinds extends string = NonNullable<\n N['payload']['data']\n >['kind'],\n> = {\n [K in NotificationDataKinds]: Compute<\n Omit<N, 'payload'> & {\n type: ConvertToEnum<K>;\n payload: Compute<\n Omit<N['payload'], 'data'> & {\n data: Extract<NonNullable<N['payload']['data']>, { kind: K }>;\n }\n >;\n }\n >;\n}[NotificationDataKinds];\n\n/**\n * Type-Computation.\n * Adds a `type` field to platform notifications for easier enum checking.\n * Preserves the original nested payload structure.\n */\ntype NormalizePlatformNotification<\n N extends PlatformNotification = PlatformNotification,\n NotificationKind extends string = N['notification_type'],\n> = {\n [K in NotificationKind]: Compute<\n N & {\n type: ConvertToEnum<K>;\n }\n >;\n}[NotificationKind];\n\nexport type OnChainRawNotification = Compute<\n NormalizeOnChainNotification<OnChainNotification>\n>;\n\nexport type PlatformRawNotification = Compute<\n NormalizePlatformNotification<PlatformNotification>\n>;\n\nexport type UnprocessedRawNotification = Notification;\n\nexport type NormalisedAPINotification =\n | OnChainRawNotification\n | PlatformRawNotification;\n\nexport type OnChainRawNotificationsWithNetworkFields = Extract<\n OnChainRawNotification,\n { payload: { data: { network_fee: unknown } } }\n>;\n"]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* eslint-disable jsdoc/tag-lines */
|
|
3
|
+
// Auto-generated from OpenAPI spec - naming follows API schema conventions
|
|
4
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
3
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
6
|
//# sourceMappingURL=schema.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/schema.ts"],"names":[],"mappings":";AAAA,oCAAoC","sourcesContent":["/* eslint-disable jsdoc/tag-lines */\n\n/**\n * This file was auto-generated by openapi-typescript.\n * Do not make direct changes to the file.\n * Script: `npx openapi-typescript <PATH TO NOTIFICATION API SPEC> -o ./schema.d.ts`\n */\n\nexport type paths = {\n '/api/v3/notifications': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n get?: never;\n put?: never;\n /** List both platform and on-chain notifications for a certain user/address(es) */\n post: {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody: {\n content: {\n 'application/json': components['schemas']['NotificationInputV3'];\n };\n };\n responses: {\n /** @description Notifications listed successfully */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content: {\n 'application/json': components['schemas']['NotificationOutputV3'];\n };\n };\n /** @description Bad request */\n 400: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n /** @description Internal server error */\n 500: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n };\n };\n delete?: never;\n options?: never;\n head?: never;\n patch?: never;\n trace?: never;\n };\n '/api/v3/notifications/mark-as-read': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n get?: never;\n put?: never;\n /** Mark notifications as read */\n post: {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody: {\n content: {\n 'application/json': {\n ids?: string[];\n };\n };\n };\n responses: {\n /** @description Successfully marked notifications as read */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n };\n };\n delete?: never;\n options?: never;\n head?: never;\n patch?: never;\n trace?: never;\n };\n};\nexport type webhooks = Record<string, never>;\nexport type components = {\n schemas: {\n NotificationInputV3: {\n /** @example en-US */\n locale: string;\n addresses: string[];\n platform: 'extension' | 'mobile';\n };\n NotificationOutputV3: (\n | components['schemas']['PlatformNotification']\n | components['schemas']['OnChainNotification']\n )[];\n PlatformNotification: {\n /**\n * Format: uuid\n * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6\n */\n id: string;\n /** @enum {string} */\n notification_type: 'platform';\n /** @example false */\n unread: boolean;\n template: components['schemas']['LocalizedNotification'];\n /**\n * Format: date-time\n * @example 2025-10-09T09:45:34.202Z\n */\n created_at: string;\n };\n LocalizedNotification: {\n image_url: string;\n cta?: components['schemas']['LocalizedNotificationCTA'];\n title: string;\n body: string;\n };\n LocalizedNotificationCTA: {\n content: string;\n link: string;\n };\n OnChainNotification: {\n /**\n * Format: uuid\n * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6\n */\n id: string;\n /** @enum {string} */\n notification_type: 'on-chain';\n /** @example false */\n unread: boolean;\n /**\n * Format: date-time\n * @example 2025-10-09T09:45:34.202Z\n */\n created_at: string;\n payload: components['schemas']['OnChainPayload'];\n };\n OnChainPayload: {\n /** @example 1 */\n chain_id: number;\n /** @example 17485840 */\n block_number: number;\n block_timestamp: string;\n /** @example 0x881D40237659C251811CEC9c364ef91dC08D300C */\n tx_hash: string;\n address: string;\n data?:\n | components['schemas']['Data_MetamaskSwapCompleted']\n | components['schemas']['Data_LidoStakeReadyToBeWithdrawn']\n | components['schemas']['Data_LidoStakeCompleted']\n | components['schemas']['Data_LidoWithdrawalRequested']\n | components['schemas']['Data_LidoWithdrawalCompleted']\n | components['schemas']['Data_RocketPoolStakeCompleted']\n | components['schemas']['Data_RocketPoolUnstakeCompleted']\n | components['schemas']['Data_ETHSent']\n | components['schemas']['Data_ETHReceived']\n | components['schemas']['Data_ERC20Sent']\n | components['schemas']['Data_ERC20Received']\n | components['schemas']['Data_ERC721Sent']\n | components['schemas']['Data_ERC721Received']\n | components['schemas']['Data_ERC1155Sent']\n | components['schemas']['Data_ERC1155Received'];\n };\n Data_MetamaskSwapCompleted: {\n /** @enum {string} */\n kind: 'metamask_swap_completed';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: decimal */\n rate: string;\n token_in: components['schemas']['Token'];\n token_out: components['schemas']['Token'];\n };\n Data_LidoStakeCompleted: {\n /** @enum {string} */\n kind: 'lido_stake_completed';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_LidoWithdrawalRequested: {\n /** @enum {string} */\n kind: 'lido_withdrawal_requested';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_LidoStakeReadyToBeWithdrawn: {\n /** @enum {string} */\n kind: 'lido_stake_ready_to_be_withdrawn';\n /** Format: decimal */\n request_id: string;\n staked_eth: components['schemas']['Stake'];\n };\n Data_LidoWithdrawalCompleted: {\n /** @enum {string} */\n kind: 'lido_withdrawal_completed';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_RocketPoolStakeCompleted: {\n /** @enum {string} */\n kind: 'rocketpool_stake_completed';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_RocketPoolUnstakeCompleted: {\n /** @enum {string} */\n kind: 'rocketpool_unstake_completed';\n network_fee: components['schemas']['NetworkFee'];\n stake_in: components['schemas']['Stake'];\n stake_out: components['schemas']['Stake'];\n };\n Data_ETHSent: {\n /** @enum {string} */\n kind: 'eth_sent';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n amount: {\n /** Format: decimal */\n usd: string;\n /** Format: decimal */\n eth: string;\n };\n };\n Data_ETHReceived: {\n /** @enum {string} */\n kind: 'eth_received';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n amount: {\n /** Format: decimal */\n usd: string;\n /** Format: decimal */\n eth: string;\n };\n };\n Data_ERC20Sent: {\n /** @enum {string} */\n kind: 'erc20_sent';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n token: components['schemas']['Token'];\n };\n Data_ERC20Received: {\n /** @enum {string} */\n kind: 'erc20_received';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n token: components['schemas']['Token'];\n };\n Data_ERC721Sent: {\n /** @enum {string} */\n kind: 'erc721_sent';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n nft: components['schemas']['NFT'];\n };\n Data_ERC721Received: {\n /** @enum {string} */\n kind: 'erc721_received';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n nft: components['schemas']['NFT'];\n };\n Data_ERC1155Sent: {\n /** @enum {string} */\n kind: 'erc1155_sent';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n nft?: components['schemas']['NFT'];\n };\n Data_ERC1155Received: {\n /** @enum {string} */\n kind: 'erc1155_received';\n network_fee: components['schemas']['NetworkFee'];\n /** Format: address */\n from: string;\n /** Format: address */\n to: string;\n nft?: components['schemas']['NFT'];\n };\n NetworkFee: {\n /** Format: decimal */\n gas_price: string;\n /** Format: decimal */\n native_token_price_in_usd: string;\n };\n Token: {\n /** Format: address */\n address: string;\n symbol: string;\n name: string;\n /** Format: decimal */\n amount: string;\n /** Format: int32 */\n decimals: string;\n /** Format: uri */\n image: string;\n /** Format: decimal */\n usd: string;\n };\n NFT: {\n name: string;\n token_id: string;\n /** Format: uri */\n image: string;\n collection: {\n /** Format: address */\n address: string;\n name: string;\n symbol: string;\n /** Format: uri */\n image: string;\n };\n };\n Stake: {\n /** Format: address */\n address: string;\n symbol: string;\n name: string;\n /** Format: decimal */\n amount: string;\n /** Format: int32 */\n decimals: string;\n /** Format: uri */\n image: string;\n /** Format: decimal */\n usd: string;\n };\n };\n responses: never;\n parameters: never;\n requestBodies: never;\n headers: never;\n pathItems: never;\n};\nexport type $defs = Record<string, never>;\nexport type operations = Record<string, never>;\n"]}
|
|
1
|
+
{"version":3,"file":"schema.cjs","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/schema.ts"],"names":[],"mappings":";AAAA,oCAAoC;AACpC,2EAA2E;AAC3E,yDAAyD","sourcesContent":["/* eslint-disable jsdoc/tag-lines */\n// Auto-generated from OpenAPI spec - naming follows API schema conventions\n/* eslint-disable @typescript-eslint/naming-convention */\n\n/**\n * This file was auto-generated by openapi-typescript.\n * Do not make direct changes to the file.\n * Script: `npx openapi-typescript <PATH TO NOTIFICATION API SPEC> -o ./schema.d.ts`\n */\n\nexport type paths = {\n '/api/v3/notifications': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n get?: never;\n put?: never;\n /** List both platform and on-chain notifications for a certain user/address(es) */\n post: {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody: {\n content: {\n 'application/json': components['schemas']['NotificationInputV3'];\n };\n };\n responses: {\n /** @description Notifications listed successfully */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content: {\n 'application/json': components['schemas']['NotificationOutputV3'];\n };\n };\n /** @description Bad request */\n 400: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n /** @description Internal server error */\n 500: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n };\n };\n delete?: never;\n options?: never;\n head?: never;\n patch?: never;\n trace?: never;\n };\n '/api/v3/notifications/mark-as-read': {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n get?: never;\n put?: never;\n /** Mark notifications as read */\n post: {\n parameters: {\n query?: never;\n header?: never;\n path?: never;\n cookie?: never;\n };\n requestBody: {\n content: {\n 'application/json': {\n ids?: string[];\n };\n };\n };\n responses: {\n /** @description Successfully marked notifications as read */\n 200: {\n headers: {\n [name: string]: unknown;\n };\n content?: never;\n };\n };\n };\n delete?: never;\n options?: never;\n head?: never;\n patch?: never;\n trace?: never;\n };\n};\nexport type webhooks = Record<string, never>;\nexport type components = {\n schemas: {\n NotificationInputV3: {\n /** @example en-US */\n locale: string;\n addresses: string[];\n platform: 'extension' | 'mobile';\n };\n NotificationOutputV3: (\n | components['schemas']['PlatformNotification']\n | components['schemas']['OnChainNotification']\n )[];\n PlatformNotification: {\n /**\n * Format: uuid\n * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6\n */\n id: string;\n /** @enum {string} */\n notification_type: 'platform';\n /** @example false */\n unread: boolean;\n template: components['schemas']['LocalizedNotification'];\n /**\n * Format: date-time\n * @example 2025-10-09T09:45:34.202Z\n */\n created_at: string;\n };\n LocalizedNotification: {\n image_url: string;\n cta?: components['schemas']['LocalizedNotificationCTA'];\n title: string;\n body: string;\n };\n LocalizedNotificationCTA: {\n content: string;\n link: string;\n };\n OnChainNotification: {\n /**\n * Format: uuid\n * @example 3fa85f64-5717-4562-b3fc-2c963f66afa6\n */\n id: string;\n /** @enum {string} */\n notification_type: 'on-chain';\n /** @example false */\n unread: boolean;\n /**\n * Format: date-time\n * @example 2025-10-09T09:45:34.202Z\n */\n created_at: string;\n payload: components['schemas']['OnChainPayload'];\n };\n OnChainPayload: {\n /** @example 1 */\n chain_id: number;\n /** @example 17485840 */\n block_number: number;\n block_timestamp: string;\n /** @example 0x881D40237659C251811CEC9c364ef91dC08D300C */\n tx_hash: string;\n address: string;\n network: components['schemas']['NetworkMetadata'];\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 BlockExplorer: {\n /**\n * Format: uri\n * @example https://etherscan.io\n */\n url: string;\n /** @example Etherscan */\n name: string;\n };\n NetworkMetadata: {\n /**\n * @description Human-readable network name\n * @example Ethereum\n */\n name: string;\n /**\n * @description Native token symbol\n * @example ETH\n */\n native_symbol: string;\n block_explorer: components['schemas']['BlockExplorer'];\n };\n };\n responses: never;\n parameters: never;\n requestBodies: never;\n headers: never;\n pathItems: never;\n};\nexport type $defs = Record<string, never>;\nexport type operations = Record<string, never>;\n"]}
|
|
@@ -162,6 +162,7 @@ export type components = {
|
|
|
162
162
|
/** @example 0x881D40237659C251811CEC9c364ef91dC08D300C */
|
|
163
163
|
tx_hash: string;
|
|
164
164
|
address: string;
|
|
165
|
+
network: components['schemas']['NetworkMetadata'];
|
|
165
166
|
data?: components['schemas']['Data_MetamaskSwapCompleted'] | components['schemas']['Data_LidoStakeReadyToBeWithdrawn'] | components['schemas']['Data_LidoStakeCompleted'] | components['schemas']['Data_LidoWithdrawalRequested'] | components['schemas']['Data_LidoWithdrawalCompleted'] | components['schemas']['Data_RocketPoolStakeCompleted'] | components['schemas']['Data_RocketPoolUnstakeCompleted'] | components['schemas']['Data_ETHSent'] | components['schemas']['Data_ETHReceived'] | components['schemas']['Data_ERC20Sent'] | components['schemas']['Data_ERC20Received'] | components['schemas']['Data_ERC721Sent'] | components['schemas']['Data_ERC721Received'] | components['schemas']['Data_ERC1155Sent'] | components['schemas']['Data_ERC1155Received'];
|
|
166
167
|
};
|
|
167
168
|
Data_MetamaskSwapCompleted: {
|
|
@@ -353,6 +354,28 @@ export type components = {
|
|
|
353
354
|
/** Format: decimal */
|
|
354
355
|
usd: string;
|
|
355
356
|
};
|
|
357
|
+
BlockExplorer: {
|
|
358
|
+
/**
|
|
359
|
+
* Format: uri
|
|
360
|
+
* @example https://etherscan.io
|
|
361
|
+
*/
|
|
362
|
+
url: string;
|
|
363
|
+
/** @example Etherscan */
|
|
364
|
+
name: string;
|
|
365
|
+
};
|
|
366
|
+
NetworkMetadata: {
|
|
367
|
+
/**
|
|
368
|
+
* @description Human-readable network name
|
|
369
|
+
* @example Ethereum
|
|
370
|
+
*/
|
|
371
|
+
name: string;
|
|
372
|
+
/**
|
|
373
|
+
* @description Native token symbol
|
|
374
|
+
* @example ETH
|
|
375
|
+
*/
|
|
376
|
+
native_symbol: string;
|
|
377
|
+
block_explorer: components['schemas']['BlockExplorer'];
|
|
378
|
+
};
|
|
356
379
|
};
|
|
357
380
|
responses: never;
|
|
358
381
|
parameters: never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.cts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/schema.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,MAAM,MAAM,KAAK,GAAG;IAClB,uBAAuB,EAAE;QACvB,UAAU,EAAE;YACV,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,MAAM,CAAC,EAAE,KAAK,CAAC;YACf,IAAI,CAAC,EAAE,KAAK,CAAC;YACb,MAAM,CAAC,EAAE,KAAK,CAAC;SAChB,CAAC;QACF,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,mFAAmF;QACnF,IAAI,EAAE;YACJ,UAAU,EAAE;gBACV,KAAK,CAAC,EAAE,KAAK,CAAC;gBACd,MAAM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B;YACzB,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,eAAe,EAAE;YACf;;;eAGG;YACH,IAAI,EAAE,MAAM,CAAC;YACb;;;eAGG;YACH,aAAa,EAAE,MAAM,CAAC;YACtB,cAAc,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC;SACxD,CAAC;KACH,CAAC;IACF,SAAS,EAAE,KAAK,CAAC;IACjB,UAAU,EAAE,KAAK,CAAC;IAClB,aAAa,EAAE,KAAK,CAAC;IACrB,OAAO,EAAE,KAAK,CAAC;IACf,SAAS,EAAE,KAAK,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC1C,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -162,6 +162,7 @@ export type components = {
|
|
|
162
162
|
/** @example 0x881D40237659C251811CEC9c364ef91dC08D300C */
|
|
163
163
|
tx_hash: string;
|
|
164
164
|
address: string;
|
|
165
|
+
network: components['schemas']['NetworkMetadata'];
|
|
165
166
|
data?: components['schemas']['Data_MetamaskSwapCompleted'] | components['schemas']['Data_LidoStakeReadyToBeWithdrawn'] | components['schemas']['Data_LidoStakeCompleted'] | components['schemas']['Data_LidoWithdrawalRequested'] | components['schemas']['Data_LidoWithdrawalCompleted'] | components['schemas']['Data_RocketPoolStakeCompleted'] | components['schemas']['Data_RocketPoolUnstakeCompleted'] | components['schemas']['Data_ETHSent'] | components['schemas']['Data_ETHReceived'] | components['schemas']['Data_ERC20Sent'] | components['schemas']['Data_ERC20Received'] | components['schemas']['Data_ERC721Sent'] | components['schemas']['Data_ERC721Received'] | components['schemas']['Data_ERC1155Sent'] | components['schemas']['Data_ERC1155Received'];
|
|
166
167
|
};
|
|
167
168
|
Data_MetamaskSwapCompleted: {
|
|
@@ -353,6 +354,28 @@ export type components = {
|
|
|
353
354
|
/** Format: decimal */
|
|
354
355
|
usd: string;
|
|
355
356
|
};
|
|
357
|
+
BlockExplorer: {
|
|
358
|
+
/**
|
|
359
|
+
* Format: uri
|
|
360
|
+
* @example https://etherscan.io
|
|
361
|
+
*/
|
|
362
|
+
url: string;
|
|
363
|
+
/** @example Etherscan */
|
|
364
|
+
name: string;
|
|
365
|
+
};
|
|
366
|
+
NetworkMetadata: {
|
|
367
|
+
/**
|
|
368
|
+
* @description Human-readable network name
|
|
369
|
+
* @example Ethereum
|
|
370
|
+
*/
|
|
371
|
+
name: string;
|
|
372
|
+
/**
|
|
373
|
+
* @description Native token symbol
|
|
374
|
+
* @example ETH
|
|
375
|
+
*/
|
|
376
|
+
native_symbol: string;
|
|
377
|
+
block_explorer: components['schemas']['BlockExplorer'];
|
|
378
|
+
};
|
|
356
379
|
};
|
|
357
380
|
responses: never;
|
|
358
381
|
parameters: never;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema.d.mts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/types/notification-api/schema.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,MAAM,MAAM,KAAK,GAAG;IAClB,uBAAuB,EAAE;QACvB,UAAU,EAAE;YACV,KAAK,CAAC,EAAE,KAAK,CAAC;YACd,MAAM,CAAC,EAAE,KAAK,CAAC;YACf,IAAI,CAAC,EAAE,KAAK,CAAC;YACb,MAAM,CAAC,EAAE,KAAK,CAAC;SAChB,CAAC;QACF,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,mFAAmF;QACnF,IAAI,EAAE;YACJ,UAAU,EAAE;gBACV,KAAK,CAAC,EAAE,KAAK,CAAC;gBACd,MAAM,CAAC,EAAE,KAAK,CAAC;gBACf,IAAI,CAAC,EAAE,KAAK,CAAC;gBACb,M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