@metamask-previews/notification-services-controller 0.1.0-preview-509f7952 → 0.1.0-preview-caf274f8
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/dist/NotificationServicesController/NotificationServicesController.js +3 -3
- package/dist/NotificationServicesController/NotificationServicesController.mjs +2 -2
- package/dist/NotificationServicesController/constants/constants.js +1 -1
- package/dist/NotificationServicesController/constants/constants.mjs +1 -1
- package/dist/NotificationServicesController/constants/index.js +2 -2
- package/dist/NotificationServicesController/constants/index.mjs +2 -2
- package/dist/NotificationServicesController/constants/notification-schema.js +1 -1
- package/dist/NotificationServicesController/constants/notification-schema.mjs +1 -1
- package/dist/NotificationServicesController/index.js +6 -6
- package/dist/NotificationServicesController/index.mjs +5 -5
- package/dist/NotificationServicesController/processors/index.js +2 -2
- package/dist/NotificationServicesController/processors/index.mjs +2 -2
- package/dist/NotificationServicesController/processors/process-feature-announcement.js +1 -1
- package/dist/NotificationServicesController/processors/process-feature-announcement.mjs +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.js +1 -1
- package/dist/NotificationServicesController/processors/process-notifications.mjs +1 -1
- package/dist/NotificationServicesController/processors/process-onchain-notifications.js +1 -1
- package/dist/NotificationServicesController/processors/process-onchain-notifications.mjs +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.js +1 -1
- package/dist/NotificationServicesController/services/feature-announcements.mjs +1 -1
- package/dist/NotificationServicesController/services/onchain-notifications.js +1 -1
- package/dist/NotificationServicesController/services/onchain-notifications.mjs +1 -1
- package/dist/NotificationServicesController/utils/utils.js +1 -1
- package/dist/NotificationServicesController/utils/utils.mjs +1 -1
- package/dist/NotificationServicesPushController/NotificationServicesPushController.js +9 -9
- package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +8 -8
- package/dist/NotificationServicesPushController/constants.js +1 -1
- package/dist/NotificationServicesPushController/constants.mjs +1 -1
- package/dist/NotificationServicesPushController/index.js +12 -12
- package/dist/NotificationServicesPushController/index.mjs +11 -11
- package/dist/NotificationServicesPushController/services/endpoints.js +1 -1
- package/dist/NotificationServicesPushController/services/endpoints.mjs +1 -1
- package/dist/NotificationServicesPushController/services/push/push-web.js +7 -7
- package/dist/NotificationServicesPushController/services/push/push-web.mjs +6 -6
- package/dist/NotificationServicesPushController/services/services.js +8 -8
- package/dist/NotificationServicesPushController/services/services.mjs +7 -7
- package/dist/NotificationServicesPushController/utils/get-notification-data.js +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-data.mjs +1 -1
- package/dist/NotificationServicesPushController/utils/get-notification-message.js +7 -7
- package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +6 -6
- package/dist/NotificationServicesPushController/utils/index.js +8 -8
- package/dist/NotificationServicesPushController/utils/index.mjs +7 -7
- package/dist/{chunk-QTK2RMF7.mjs → chunk-57S5B7X2.mjs} +2 -2
- package/dist/{chunk-UPVIT75F.js → chunk-6265FKB5.js} +3 -3
- package/dist/{chunk-O22GVG7K.js → chunk-6GPIA5G3.js} +35 -35
- package/dist/{chunk-PGMXFZ6Y.js → chunk-ABFHAGGB.js} +3 -3
- package/dist/{chunk-SSWX2N73.mjs → chunk-AHEMTJDE.mjs} +2 -2
- package/dist/{chunk-5DA74RWP.mjs → chunk-CQI6FYPZ.mjs} +2 -2
- package/dist/{chunk-JLHFZ2UG.mjs → chunk-DBTJ34DS.mjs} +3 -3
- package/dist/{chunk-YD3VVORT.js → chunk-DOYL2MCR.js} +85 -85
- package/dist/{chunk-ABJDEX2S.js → chunk-H4RSHSWR.js} +3 -3
- package/dist/chunk-IGY2S5BC.js +36 -0
- package/dist/{chunk-CQ6CGSKZ.js → chunk-IK7KP7N3.js} +3 -3
- package/dist/{chunk-FFQNSBPU.js → chunk-KCIC5BWH.js} +7 -7
- package/dist/chunk-NBRY7XVG.mjs +925 -0
- package/dist/chunk-NBRY7XVG.mjs.map +1 -0
- package/dist/{chunk-WTE64QEK.js → chunk-O6RMA2N6.js} +9 -36
- package/dist/chunk-O6RMA2N6.js.map +1 -0
- package/dist/{chunk-YETZSCGK.js → chunk-QJTZL7TJ.js} +4 -4
- package/dist/{chunk-VE4DTN4R.mjs → chunk-QSFGJCPI.mjs} +2 -2
- package/dist/{chunk-QUNLD7F2.mjs → chunk-TI4UC3G3.mjs} +2 -2
- package/dist/{chunk-ATR6FRAX.mjs → chunk-TS2NQOUA.mjs} +6 -33
- package/dist/chunk-TS2NQOUA.mjs.map +1 -0
- package/dist/chunk-U5UIDVOO.mjs +36 -0
- package/dist/chunk-XYIGTTEP.js +925 -0
- package/dist/chunk-XYIGTTEP.js.map +1 -0
- package/dist/{chunk-R6AIAXQV.mjs → chunk-YSNDM6BH.mjs} +2 -2
- package/dist/{chunk-7ET5GUSY.mjs → chunk-ZFNFSLS6.mjs} +4 -4
- package/dist/index.js +12 -12
- package/dist/index.mjs +11 -11
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/NotificationServicesController/__fixtures__/index.d.ts +0 -1
- package/dist/types/NotificationServicesController/__fixtures__/index.d.ts.map +1 -1
- package/dist/types/NotificationServicesPushController/__fixtures__/index.d.ts +0 -1
- package/dist/types/NotificationServicesPushController/__fixtures__/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-26CCETCM.mjs +0 -70
- package/dist/chunk-5I4DIH6O.mjs +0 -4300
- package/dist/chunk-5I4DIH6O.mjs.map +0 -1
- package/dist/chunk-ATR6FRAX.mjs.map +0 -1
- package/dist/chunk-K75FPFTD.js +0 -4300
- package/dist/chunk-K75FPFTD.js.map +0 -1
- package/dist/chunk-V46WVGWN.js +0 -70
- package/dist/chunk-WTE64QEK.js.map +0 -1
- /package/dist/{chunk-QTK2RMF7.mjs.map → chunk-57S5B7X2.mjs.map} +0 -0
- /package/dist/{chunk-UPVIT75F.js.map → chunk-6265FKB5.js.map} +0 -0
- /package/dist/{chunk-O22GVG7K.js.map → chunk-6GPIA5G3.js.map} +0 -0
- /package/dist/{chunk-PGMXFZ6Y.js.map → chunk-ABFHAGGB.js.map} +0 -0
- /package/dist/{chunk-SSWX2N73.mjs.map → chunk-AHEMTJDE.mjs.map} +0 -0
- /package/dist/{chunk-5DA74RWP.mjs.map → chunk-CQI6FYPZ.mjs.map} +0 -0
- /package/dist/{chunk-JLHFZ2UG.mjs.map → chunk-DBTJ34DS.mjs.map} +0 -0
- /package/dist/{chunk-YD3VVORT.js.map → chunk-DOYL2MCR.js.map} +0 -0
- /package/dist/{chunk-ABJDEX2S.js.map → chunk-H4RSHSWR.js.map} +0 -0
- /package/dist/{chunk-V46WVGWN.js.map → chunk-IGY2S5BC.js.map} +0 -0
- /package/dist/{chunk-CQ6CGSKZ.js.map → chunk-IK7KP7N3.js.map} +0 -0
- /package/dist/{chunk-FFQNSBPU.js.map → chunk-KCIC5BWH.js.map} +0 -0
- /package/dist/{chunk-YETZSCGK.js.map → chunk-QJTZL7TJ.js.map} +0 -0
- /package/dist/{chunk-VE4DTN4R.mjs.map → chunk-QSFGJCPI.mjs.map} +0 -0
- /package/dist/{chunk-QUNLD7F2.mjs.map → chunk-TI4UC3G3.mjs.map} +0 -0
- /package/dist/{chunk-26CCETCM.mjs.map → chunk-U5UIDVOO.mjs.map} +0 -0
- /package/dist/{chunk-R6AIAXQV.mjs.map → chunk-YSNDM6BH.mjs.map} +0 -0
- /package/dist/{chunk-7ET5GUSY.mjs.map → chunk-ZFNFSLS6.mjs.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/NotificationServicesPushController/index.ts","../src/NotificationServicesPushController/__fixtures__/index.ts","../src/NotificationServicesPushController/__fixtures__/mockResponse.ts","../src/NotificationServicesPushController/__fixtures__/mockServices.ts"],"sourcesContent":["import Controller from './NotificationServicesPushController';\n\nexport { Controller };\nexport * from './NotificationServicesPushController';\nexport * as Types from './types';\nexport * as Utils from './utils';\nexport * as Mocks from './__fixtures__';\n","export * from './mockResponse';\nexport * from './mockServices';\n","import { REGISTRATION_TOKENS_ENDPOINT } from '../services/endpoints';\nimport type { LinksResult } from '../services/services';\n\ntype MockResponse = {\n url: string | RegExp;\n requestMethod: 'GET' | 'POST' | 'PUT';\n response: unknown;\n};\n\nexport const MOCK_REG_TOKEN = 'REG_TOKEN';\nexport const MOCK_LINKS_RESPONSE: LinksResult = {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n trigger_ids: ['1', '2', '3'],\n // eslint-disable-next-line @typescript-eslint/naming-convention\n registration_tokens: [\n { token: 'reg_token_1', platform: 'portfolio' },\n { token: 'reg_token_2', platform: 'extension' },\n ],\n};\n\nexport const getMockRetrievePushNotificationLinksResponse = () => {\n return {\n url: REGISTRATION_TOKENS_ENDPOINT,\n requestMethod: 'GET',\n response: MOCK_LINKS_RESPONSE,\n } satisfies MockResponse;\n};\n\nexport const getMockUpdatePushNotificationLinksResponse = () => {\n return {\n url: REGISTRATION_TOKENS_ENDPOINT,\n requestMethod: 'POST',\n response: null,\n } satisfies MockResponse;\n};\n\nexport const MOCK_FCM_RESPONSE = {\n name: '',\n token: 'fcm-token',\n web: {\n endpoint: '',\n p256dh: '',\n auth: '',\n applicationPubKey: '',\n },\n};\n\nexport const getMockCreateFCMRegistrationTokenResponse = () => {\n return {\n url: /^https:\\/\\/fcmregistrations\\.googleapis\\.com\\/v1\\/projects\\/.*$/u,\n requestMethod: 'POST',\n response: MOCK_FCM_RESPONSE,\n } satisfies MockResponse;\n};\n\nexport const getMockDeleteFCMRegistrationTokenResponse = () => {\n return {\n url: /^https:\\/\\/fcmregistrations\\.googleapis\\.com\\/v1\\/projects\\/.*$/u,\n requestMethod: 'POST',\n response: {},\n } satisfies MockResponse;\n};\n","import nock from 'nock';\n\nimport {\n getMockRetrievePushNotificationLinksResponse,\n getMockUpdatePushNotificationLinksResponse,\n} from './mockResponse';\n\ntype MockReply = {\n status: nock.StatusCode;\n body?: nock.Body;\n};\n\nexport const mockEndpointGetPushNotificationLinks = (mockReply?: MockReply) => {\n const mockResponse = getMockRetrievePushNotificationLinksResponse();\n const reply = mockReply ?? {\n status: 200,\n body: mockResponse.response,\n };\n\n const mockEndpoint = nock(mockResponse.url)\n .get('')\n .reply(reply.status, reply.body);\n\n return mockEndpoint;\n};\n\nexport const mockEndpointUpdatePushNotificationLinks = (\n mockReply?: MockReply,\n) => {\n const mockResponse = getMockUpdatePushNotificationLinksResponse();\n const reply = mockReply ?? {\n status: 200,\n body: mockResponse.response,\n };\n\n const mockEndpoint = nock(mockResponse.url).post('').reply(reply.status);\n\n return mockEndpoint;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,IAAM,iBAAiB;AACvB,IAAM,sBAAmC;AAAA;AAAA,EAE9C,aAAa,CAAC,KAAK,KAAK,GAAG;AAAA;AAAA,EAE3B,qBAAqB;AAAA,IACnB,EAAE,OAAO,eAAe,UAAU,YAAY;AAAA,IAC9C,EAAE,OAAO,eAAe,UAAU,YAAY;AAAA,EAChD;AACF;AAEO,IAAM,+CAA+C,MAAM;AAChE,SAAO;AAAA,IACL,KAAK;AAAA,IACL,eAAe;AAAA,IACf,UAAU;AAAA,EACZ;AACF;AAEO,IAAM,6CAA6C,MAAM;AAC9D,SAAO;AAAA,IACL,KAAK;AAAA,IACL,eAAe;AAAA,IACf,UAAU;AAAA,EACZ;AACF;AAEO,IAAM,oBAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,OAAO;AAAA,EACP,KAAK;AAAA,IACH,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,mBAAmB;AAAA,EACrB;AACF;AAEO,IAAM,4CAA4C,MAAM;AAC7D,SAAO;AAAA,IACL,KAAK;AAAA,IACL,eAAe;AAAA,IACf,UAAU;AAAA,EACZ;AACF;AAEO,IAAM,4CAA4C,MAAM;AAC7D,SAAO;AAAA,IACL,KAAK;AAAA,IACL,eAAe;AAAA,IACf,UAAU,CAAC;AAAA,EACb;AACF;;;AC7DA,kBAAiB;AAYV,IAAM,uCAAuC,CAAC,cAA0B;AAC7E,QAAM,eAAe,6CAA6C;AAClE,QAAM,QAAQ,aAAa;AAAA,IACzB,QAAQ;AAAA,IACR,MAAM,aAAa;AAAA,EACrB;AAEA,QAAM,mBAAe,YAAAA,SAAK,aAAa,GAAG,EACvC,IAAI,EAAE,EACN,MAAM,MAAM,QAAQ,MAAM,IAAI;AAEjC,SAAO;AACT;AAEO,IAAM,0CAA0C,CACrD,cACG;AACH,QAAM,eAAe,2CAA2C;AAChE,QAAM,QAAQ,aAAa;AAAA,IACzB,QAAQ;AAAA,IACR,MAAM,aAAa;AAAA,EACrB;AAEA,QAAM,mBAAe,YAAAA,SAAK,aAAa,GAAG,EAAE,KAAK,EAAE,EAAE,MAAM,MAAM,MAAM;AAEvE,SAAO;AACT;","names":["nock"]}
|