@metamask-previews/notification-services-controller 0.2.1-preview-04657153 → 0.2.1-preview-473880a1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/NotificationServicesController/NotificationServicesController.js +3 -3
  2. package/dist/NotificationServicesController/NotificationServicesController.mjs +2 -2
  3. package/dist/NotificationServicesController/index.js +44 -9
  4. package/dist/NotificationServicesController/index.mjs +44 -9
  5. package/dist/NotificationServicesController/services/feature-announcements.js +2 -2
  6. package/dist/NotificationServicesController/services/feature-announcements.mjs +1 -1
  7. package/dist/NotificationServicesPushController/NotificationServicesPushController.js +3 -3
  8. package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +3 -3
  9. package/dist/NotificationServicesPushController/index.js +23 -7
  10. package/dist/NotificationServicesPushController/index.mjs +23 -7
  11. package/dist/NotificationServicesPushController/services/push/push-web.js +3 -3
  12. package/dist/NotificationServicesPushController/services/push/push-web.mjs +3 -3
  13. package/dist/NotificationServicesPushController/services/services.js +3 -3
  14. package/dist/NotificationServicesPushController/services/services.mjs +3 -3
  15. package/dist/NotificationServicesPushController/utils/get-notification-message.js +3 -3
  16. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +3 -3
  17. package/dist/NotificationServicesPushController/utils/index.js +3 -3
  18. package/dist/NotificationServicesPushController/utils/index.mjs +3 -3
  19. package/dist/{chunk-RVDEVD2D.js → chunk-2O32EME6.js} +3 -3
  20. package/dist/{chunk-SLSTQQJR.js → chunk-ABWWUGTE.js} +44 -7
  21. package/dist/chunk-ABWWUGTE.js.map +1 -0
  22. package/dist/{chunk-QFJZBLYQ.mjs → chunk-C62SK2KY.mjs} +22 -1
  23. package/dist/chunk-C62SK2KY.mjs.map +1 -0
  24. package/dist/{chunk-AYAVYLQD.mjs → chunk-DFDFJ4DX.mjs} +2 -2
  25. package/dist/{chunk-56OOTY2L.mjs → chunk-GNN2XQW4.mjs} +41 -4
  26. package/dist/chunk-GNN2XQW4.mjs.map +1 -0
  27. package/dist/{chunk-HZEB53A6.js → chunk-LGXHJ24K.js} +22 -1
  28. package/dist/chunk-LGXHJ24K.js.map +1 -0
  29. package/dist/{chunk-UMB6F2XF.mjs → chunk-RZXUP2M6.mjs} +20 -2
  30. package/dist/chunk-RZXUP2M6.mjs.map +1 -0
  31. package/dist/{chunk-WBI6LXZV.js → chunk-XGHB2EF3.js} +20 -2
  32. package/dist/chunk-XGHB2EF3.js.map +1 -0
  33. package/dist/index.js +5 -5
  34. package/dist/index.mjs +4 -4
  35. package/dist/tsconfig.build.tsbuildinfo +1 -1
  36. package/dist/types/NotificationServicesController/__fixtures__/mockResponses.d.ts +2 -2
  37. package/dist/types/NotificationServicesController/__fixtures__/mockResponses.d.ts.map +1 -1
  38. package/dist/types/NotificationServicesController/index.d.ts +4 -1
  39. package/dist/types/NotificationServicesController/index.d.ts.map +1 -1
  40. package/dist/types/NotificationServicesController/services/feature-announcements.d.ts.map +1 -1
  41. package/dist/types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts +11 -9
  42. package/dist/types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts.map +1 -1
  43. package/dist/types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts +4 -3
  44. package/dist/types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts.map +1 -1
  45. package/dist/types/NotificationServicesController/types/feature-announcement/type-links.d.ts +15 -10
  46. package/dist/types/NotificationServicesController/types/feature-announcement/type-links.d.ts.map +1 -1
  47. package/dist/types/NotificationServicesPushController/index.d.ts +2 -0
  48. package/dist/types/NotificationServicesPushController/index.d.ts.map +1 -1
  49. package/notification-services/mocks/package.json +1 -1
  50. package/notification-services/package.json +1 -1
  51. package/notification-services/ui/package.json +1 -1
  52. package/package.json +4 -29
  53. package/push-services/mocks/package.json +1 -1
  54. package/push-services/package.json +1 -1
  55. package/dist/chunk-56OOTY2L.mjs.map +0 -1
  56. package/dist/chunk-HZEB53A6.js.map +0 -1
  57. package/dist/chunk-QFJZBLYQ.mjs.map +0 -1
  58. package/dist/chunk-SLSTQQJR.js.map +0 -1
  59. package/dist/chunk-UMB6F2XF.mjs.map +0 -1
  60. package/dist/chunk-WBI6LXZV.js.map +0 -1
  61. package/notification-services/constants/package.json +0 -9
  62. package/notification-services/processors/package.json +0 -9
  63. package/notification-services/types/package.json +0 -9
  64. package/push-services/types/package.json +0 -9
  65. package/push-services/utils/package.json +0 -9
  66. /package/dist/{chunk-RVDEVD2D.js.map → chunk-2O32EME6.js.map} +0 -0
  67. /package/dist/{chunk-AYAVYLQD.mjs.map → chunk-DFDFJ4DX.mjs.map} +0 -0
@@ -7,6 +7,17 @@ var _chunkENRKCWJ6js = require('./chunk-ENRKCWJ6.js');
7
7
 
8
8
 
9
9
 
10
+
11
+ var _chunkBUT7X5F2js = require('./chunk-BUT7X5F2.js');
12
+
13
+
14
+
15
+
16
+
17
+ var _chunkEJ52BDLBjs = require('./chunk-EJ52BDLB.js');
18
+
19
+
20
+
10
21
  var _chunk5CFEVEAVjs = require('./chunk-5CFEVEAV.js');
11
22
 
12
23
 
@@ -22,8 +33,15 @@ _chunkIGY2S5BCjs.__export.call(void 0, NotificationServicesPushController_export
22
33
  Mocks: () => fixtures_exports,
23
34
  Types: () => _chunk7LWR54U7js.types_exports,
24
35
  Utils: () => _chunkENRKCWJ6js.utils_exports,
36
+ calcTokenAmount: () => _chunkEJ52BDLBjs.calcTokenAmount,
37
+ createOnChainPushNotificationMessage: () => _chunkBUT7X5F2js.createOnChainPushNotificationMessage,
38
+ createOnChainPushNotificationMessages: () => _chunkBUT7X5F2js.createOnChainPushNotificationMessages,
25
39
  default: () => NotificationServicesPushController_default,
26
- defaultState: () => _chunk5CFEVEAVjs.defaultState
40
+ defaultState: () => _chunk5CFEVEAVjs.defaultState,
41
+ formatAmount: () => _chunkEJ52BDLBjs.formatAmount,
42
+ getAmount: () => _chunkEJ52BDLBjs.getAmount,
43
+ getLeadingZeroCount: () => _chunkEJ52BDLBjs.getLeadingZeroCount,
44
+ isOnChainNotification: () => _chunkBUT7X5F2js.isOnChainNotification
27
45
  });
28
46
 
29
47
  // src/NotificationServicesPushController/__fixtures__/index.ts
@@ -97,4 +115,4 @@ var NotificationServicesPushController_default = NotificationServicesPushControl
97
115
 
98
116
 
99
117
  exports.fixtures_exports = fixtures_exports; exports.NotificationServicesPushController_default = NotificationServicesPushController_default; exports.NotificationServicesPushController_exports = NotificationServicesPushController_exports;
100
- //# sourceMappingURL=chunk-WBI6LXZV.js.map
118
+ //# sourceMappingURL=chunk-XGHB2EF3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/NotificationServicesPushController/index.ts","../src/NotificationServicesPushController/__fixtures__/index.ts","../src/NotificationServicesPushController/__fixtures__/mockResponse.ts"],"names":["NotificationServicesPushController"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;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;;;AF3DA,IAAMA,sCAAqC;AAE3C,IAAO,6CAAQA","sourcesContent":["import Controller from './NotificationServicesPushController';\n\nconst NotificationServicesPushController = Controller;\nexport { Controller };\nexport default NotificationServicesPushController;\nexport * from './NotificationServicesPushController';\nexport * as Types from './types';\nexport * from './types';\nexport * as Utils from './utils';\nexport * from './utils';\nexport * as Mocks from './__fixtures__';\n","export * from './mockResponse';\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"]}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkWBI6LXZVjs = require('./chunk-WBI6LXZV.js');
3
+ var _chunkXGHB2EF3js = require('./chunk-XGHB2EF3.js');
4
4
  require('./chunk-7LWR54U7.js');
5
5
  require('./chunk-ENRKCWJ6.js');
6
6
  require('./chunk-BUT7X5F2.js');
@@ -12,7 +12,7 @@ require('./chunk-GDKHOBJT.js');
12
12
  require('./chunk-B25TJ7KS.js');
13
13
 
14
14
 
15
- var _chunkSLSTQQJRjs = require('./chunk-SLSTQQJR.js');
15
+ var _chunkABWWUGTEjs = require('./chunk-ABWWUGTE.js');
16
16
  require('./chunk-232HZSEV.js');
17
17
  require('./chunk-XZEVRYUE.js');
18
18
  require('./chunk-3ZS2HAEG.js');
@@ -28,10 +28,10 @@ require('./chunk-IG3KWCQU.js');
28
28
  require('./chunk-QOG3RCXM.js');
29
29
  require('./chunk-QY4UST5V.js');
30
30
  require('./chunk-KWTSMLND.js');
31
- require('./chunk-RVDEVD2D.js');
31
+ require('./chunk-2O32EME6.js');
32
32
  require('./chunk-5FUMSWDD.js');
33
33
  require('./chunk-LYEXYTOI.js');
34
- require('./chunk-HZEB53A6.js');
34
+ require('./chunk-LGXHJ24K.js');
35
35
  require('./chunk-52CALMRA.js');
36
36
  require('./chunk-H73GATCU.js');
37
37
  require('./chunk-NOYP2T77.js');
@@ -42,5 +42,5 @@ require('./chunk-IGY2S5BC.js');
42
42
 
43
43
 
44
44
 
45
- exports.NotificationServicesController = _chunkSLSTQQJRjs.NotificationServicesController_exports; exports.NotificationServicesPushController = _chunkWBI6LXZVjs.NotificationServicesPushController_exports;
45
+ exports.NotificationServicesController = _chunkABWWUGTEjs.NotificationServicesController_exports; exports.NotificationServicesPushController = _chunkXGHB2EF3js.NotificationServicesPushController_exports;
46
46
  //# sourceMappingURL=index.js.map
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NotificationServicesPushController_exports
3
- } from "./chunk-UMB6F2XF.mjs";
3
+ } from "./chunk-RZXUP2M6.mjs";
4
4
  import "./chunk-IOMDG67D.mjs";
5
5
  import "./chunk-DCADU5QI.mjs";
6
6
  import "./chunk-6GUOLD7O.mjs";
@@ -12,7 +12,7 @@ import "./chunk-YHVXD5WW.mjs";
12
12
  import "./chunk-IKWNHNJQ.mjs";
13
13
  import {
14
14
  NotificationServicesController_exports
15
- } from "./chunk-56OOTY2L.mjs";
15
+ } from "./chunk-GNN2XQW4.mjs";
16
16
  import "./chunk-B4ECJJ5C.mjs";
17
17
  import "./chunk-U74Q3BRP.mjs";
18
18
  import "./chunk-G52DNXFH.mjs";
@@ -28,10 +28,10 @@ import "./chunk-5JDAO4ZC.mjs";
28
28
  import "./chunk-YZYQYIKS.mjs";
29
29
  import "./chunk-ZHAD55AN.mjs";
30
30
  import "./chunk-X42WN3FE.mjs";
31
- import "./chunk-AYAVYLQD.mjs";
31
+ import "./chunk-DFDFJ4DX.mjs";
32
32
  import "./chunk-KCWTVLMK.mjs";
33
33
  import "./chunk-BONB66A2.mjs";
34
- import "./chunk-QFJZBLYQ.mjs";
34
+ import "./chunk-C62SK2KY.mjs";
35
35
  import "./chunk-D42BBXBM.mjs";
36
36
  import "./chunk-FN6GVBCU.mjs";
37
37
  import "./chunk-ILPTPB4U.mjs";