@metamask/notification-services-controller 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.md +48 -1
  2. package/dist/NotificationServicesController/NotificationServicesController.js +5 -4
  3. package/dist/NotificationServicesController/NotificationServicesController.mjs +4 -3
  4. package/dist/NotificationServicesController/index.js +57 -19
  5. package/dist/NotificationServicesController/index.mjs +59 -21
  6. package/dist/NotificationServicesController/services/feature-announcements.js +2 -2
  7. package/dist/NotificationServicesController/services/feature-announcements.mjs +1 -1
  8. package/dist/NotificationServicesController/services/onchain-notifications.js +3 -2
  9. package/dist/NotificationServicesController/services/onchain-notifications.mjs +2 -1
  10. package/dist/NotificationServicesController/types/index.js +2 -2
  11. package/dist/NotificationServicesController/types/index.mjs +2 -2
  12. package/dist/NotificationServicesPushController/NotificationServicesPushController.js +15 -14
  13. package/dist/NotificationServicesPushController/NotificationServicesPushController.mjs +14 -13
  14. package/dist/NotificationServicesPushController/index.js +37 -18
  15. package/dist/NotificationServicesPushController/index.mjs +38 -19
  16. package/dist/NotificationServicesPushController/services/push/push-web.js +13 -12
  17. package/dist/NotificationServicesPushController/services/push/push-web.mjs +12 -11
  18. package/dist/NotificationServicesPushController/services/services.js +14 -13
  19. package/dist/NotificationServicesPushController/services/services.mjs +13 -12
  20. package/dist/NotificationServicesPushController/utils/get-notification-message.js +11 -10
  21. package/dist/NotificationServicesPushController/utils/get-notification-message.mjs +11 -10
  22. package/dist/NotificationServicesPushController/utils/index.js +11 -10
  23. package/dist/NotificationServicesPushController/utils/index.mjs +11 -10
  24. package/dist/{chunk-CGQRVA4Q.js → chunk-2O32EME6.js} +55 -10
  25. package/dist/chunk-2O32EME6.js.map +1 -0
  26. package/dist/{chunk-GJHW5Z65.js → chunk-4HOEZMSV.js} +4 -4
  27. package/dist/{chunk-5TUHE2FM.js → chunk-5CFEVEAV.js} +12 -12
  28. package/dist/chunk-5CFEVEAV.js.map +1 -0
  29. package/dist/{chunk-F2X3OS5R.js → chunk-ABWWUGTE.js} +57 -14
  30. package/dist/chunk-ABWWUGTE.js.map +1 -0
  31. package/dist/{chunk-QFJZBLYQ.mjs → chunk-C62SK2KY.mjs} +22 -1
  32. package/dist/chunk-C62SK2KY.mjs.map +1 -0
  33. package/dist/{chunk-XVIUHFC3.mjs → chunk-CXWZLA5O.mjs} +5 -5
  34. package/dist/chunk-CXWZLA5O.mjs.map +1 -0
  35. package/dist/{chunk-DSLFFOGF.mjs → chunk-DFDFJ4DX.mjs} +49 -4
  36. package/dist/chunk-DFDFJ4DX.mjs.map +1 -0
  37. package/dist/chunk-DINCLRZT.mjs +12 -0
  38. package/dist/chunk-DINCLRZT.mjs.map +1 -0
  39. package/dist/chunk-DT6SLUWJ.js +12 -0
  40. package/dist/chunk-DT6SLUWJ.js.map +1 -0
  41. package/dist/{chunk-EZHMYHBX.mjs → chunk-FN6GVBCU.mjs} +9 -11
  42. package/dist/chunk-FN6GVBCU.mjs.map +1 -0
  43. package/dist/{chunk-72H2V4J5.js → chunk-GDKHOBJT.js} +7 -3
  44. package/dist/chunk-GDKHOBJT.js.map +1 -0
  45. package/dist/{chunk-W7PLAK7T.mjs → chunk-GNN2XQW4.mjs} +53 -10
  46. package/dist/chunk-GNN2XQW4.mjs.map +1 -0
  47. package/dist/{chunk-DNVD3CHQ.js → chunk-H73GATCU.js} +9 -11
  48. package/dist/chunk-H73GATCU.js.map +1 -0
  49. package/dist/{chunk-HZEB53A6.js → chunk-LGXHJ24K.js} +22 -1
  50. package/dist/chunk-LGXHJ24K.js.map +1 -0
  51. package/dist/{chunk-R373BQEU.mjs → chunk-RZXUP2M6.mjs} +29 -5
  52. package/dist/chunk-RZXUP2M6.mjs.map +1 -0
  53. package/dist/{chunk-ADYRLXWY.mjs → chunk-WGGW6VCR.mjs} +2 -2
  54. package/dist/{chunk-MT4VCZEE.js → chunk-XGHB2EF3.js} +30 -6
  55. package/dist/chunk-XGHB2EF3.js.map +1 -0
  56. package/dist/{chunk-A5QFYBTR.mjs → chunk-YHVXD5WW.mjs} +7 -3
  57. package/dist/chunk-YHVXD5WW.mjs.map +1 -0
  58. package/dist/index.js +17 -16
  59. package/dist/index.mjs +17 -16
  60. package/dist/shared/to-raw-notification.js +8 -0
  61. package/dist/shared/to-raw-notification.js.map +1 -0
  62. package/dist/shared/to-raw-notification.mjs +8 -0
  63. package/dist/shared/to-raw-notification.mjs.map +1 -0
  64. package/dist/tsconfig.build.tsbuildinfo +1 -1
  65. package/dist/types/NotificationServicesController/NotificationServicesController.d.ts +16 -6
  66. package/dist/types/NotificationServicesController/NotificationServicesController.d.ts.map +1 -1
  67. package/dist/types/NotificationServicesController/__fixtures__/mockResponses.d.ts +2 -2
  68. package/dist/types/NotificationServicesController/__fixtures__/mockResponses.d.ts.map +1 -1
  69. package/dist/types/NotificationServicesController/index.d.ts +6 -1
  70. package/dist/types/NotificationServicesController/index.d.ts.map +1 -1
  71. package/dist/types/NotificationServicesController/services/feature-announcements.d.ts +2 -2
  72. package/dist/types/NotificationServicesController/services/feature-announcements.d.ts.map +1 -1
  73. package/dist/types/NotificationServicesController/services/onchain-notifications.d.ts +3 -3
  74. package/dist/types/NotificationServicesController/services/onchain-notifications.d.ts.map +1 -1
  75. package/dist/types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts +11 -9
  76. package/dist/types/NotificationServicesController/types/feature-announcement/feature-announcement.d.ts.map +1 -1
  77. package/dist/types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts +4 -3
  78. package/dist/types/NotificationServicesController/types/feature-announcement/type-feature-announcement.d.ts.map +1 -1
  79. package/dist/types/NotificationServicesController/types/feature-announcement/type-links.d.ts +15 -10
  80. package/dist/types/NotificationServicesController/types/feature-announcement/type-links.d.ts.map +1 -1
  81. package/dist/types/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.ts +1 -0
  82. package/dist/types/NotificationServicesController/types/on-chain-notification/on-chain-notification.d.ts.map +1 -1
  83. package/dist/types/NotificationServicesPushController/NotificationServicesPushController.d.ts +8 -5
  84. package/dist/types/NotificationServicesPushController/NotificationServicesPushController.d.ts.map +1 -1
  85. package/dist/types/NotificationServicesPushController/index.d.ts +4 -0
  86. package/dist/types/NotificationServicesPushController/index.d.ts.map +1 -1
  87. package/dist/types/NotificationServicesPushController/services/endpoints.d.ts +1 -1
  88. package/dist/types/NotificationServicesPushController/services/endpoints.d.ts.map +1 -1
  89. package/dist/types/NotificationServicesPushController/services/push/push-web.d.ts.map +1 -1
  90. package/dist/types/index.d.ts +1 -1
  91. package/dist/types/index.d.ts.map +1 -1
  92. package/dist/types/shared/to-raw-notification.d.ts +11 -0
  93. package/dist/types/shared/to-raw-notification.d.ts.map +1 -0
  94. package/notification-services/mocks/package.json +9 -0
  95. package/notification-services/package.json +9 -0
  96. package/notification-services/ui/package.json +9 -0
  97. package/package.json +37 -9
  98. package/push-services/mocks/package.json +9 -0
  99. package/push-services/package.json +9 -0
  100. package/dist/chunk-5TUHE2FM.js.map +0 -1
  101. package/dist/chunk-72H2V4J5.js.map +0 -1
  102. package/dist/chunk-A5QFYBTR.mjs.map +0 -1
  103. package/dist/chunk-CGQRVA4Q.js.map +0 -1
  104. package/dist/chunk-DNVD3CHQ.js.map +0 -1
  105. package/dist/chunk-DSLFFOGF.mjs.map +0 -1
  106. package/dist/chunk-EZHMYHBX.mjs.map +0 -1
  107. package/dist/chunk-F2X3OS5R.js.map +0 -1
  108. package/dist/chunk-HZEB53A6.js.map +0 -1
  109. package/dist/chunk-MT4VCZEE.js.map +0 -1
  110. package/dist/chunk-QFJZBLYQ.mjs.map +0 -1
  111. package/dist/chunk-R373BQEU.mjs.map +0 -1
  112. package/dist/chunk-W7PLAK7T.mjs.map +0 -1
  113. package/dist/chunk-XVIUHFC3.mjs.map +0 -1
  114. /package/dist/{chunk-GJHW5Z65.js.map → chunk-4HOEZMSV.js.map} +0 -0
  115. /package/dist/{chunk-ADYRLXWY.mjs.map → chunk-WGGW6VCR.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import type { RestrictedControllerMessenger, ControllerGetStateAction, ControllerStateChangeEvent } from '@metamask/base-controller';
2
2
  import { BaseController } from '@metamask/base-controller';
3
- import type { KeyringControllerGetAccountsAction, KeyringControllerStateChangeEvent } from '@metamask/keyring-controller';
3
+ import type { KeyringControllerGetAccountsAction, KeyringControllerStateChangeEvent, KeyringControllerGetStateAction, KeyringControllerLockEvent, KeyringControllerUnlockEvent } from '@metamask/keyring-controller';
4
4
  import type { AuthenticationController, UserStorageController } from '@metamask/profile-sync-controller';
5
5
  import type { INotification, MarkAsReadNotificationsParam } from './types/notification/notification';
6
6
  import type { UserStorage } from './types/user-storage/user-storage';
@@ -70,6 +70,7 @@ export type NotificationServicesControllerState = {
70
70
  isCheckingAccountsPresence: boolean;
71
71
  };
72
72
  export declare const defaultState: NotificationServicesControllerState;
73
+ export type NotificationServicesControllerGetStateAction = ControllerGetStateAction<typeof controllerName, NotificationServicesControllerState>;
73
74
  export type NotificationServicesControllerUpdateMetamaskNotificationsList = {
74
75
  type: `${typeof controllerName}:updateMetamaskNotificationsList`;
75
76
  handler: NotificationServicesController['updateMetamaskNotificationsList'];
@@ -82,11 +83,20 @@ export type NotificationServicesControllerSelectIsNotificationServicesEnabled =
82
83
  type: `${typeof controllerName}:selectIsNotificationServicesEnabled`;
83
84
  handler: NotificationServicesController['selectIsNotificationServicesEnabled'];
84
85
  };
85
- export type Actions = NotificationServicesControllerUpdateMetamaskNotificationsList | NotificationServicesControllerDisableNotificationServices | NotificationServicesControllerSelectIsNotificationServicesEnabled | ControllerGetStateAction<'state', NotificationServicesControllerState>;
86
- export type AllowedActions = KeyringControllerGetAccountsAction | AuthenticationController.AuthenticationControllerGetBearerToken | AuthenticationController.AuthenticationControllerIsSignedIn | UserStorageController.UserStorageControllerEnableProfileSyncing | UserStorageController.UserStorageControllerGetStorageKey | UserStorageController.UserStorageControllerPerformGetStorage | UserStorageController.UserStorageControllerPerformSetStorage | NotificationServicesPushControllerEnablePushNotifications | NotificationServicesPushControllerDisablePushNotifications | NotificationServicesPushControllerUpdateTriggerPushNotifications;
87
- export type NotificationServicesControllerMessengerEvents = ControllerStateChangeEvent<typeof controllerName, NotificationServicesControllerState>;
88
- export type AllowedEvents = KeyringControllerStateChangeEvent | NotificationServicesPushControllerOnNewNotification;
89
- export type NotificationServicesControllerMessenger = RestrictedControllerMessenger<typeof controllerName, Actions | AllowedActions, AllowedEvents, AllowedActions['type'], AllowedEvents['type']>;
86
+ export type Actions = NotificationServicesControllerGetStateAction | NotificationServicesControllerUpdateMetamaskNotificationsList | NotificationServicesControllerDisableNotificationServices | NotificationServicesControllerSelectIsNotificationServicesEnabled;
87
+ export type AllowedActions = KeyringControllerGetAccountsAction | KeyringControllerGetStateAction | AuthenticationController.AuthenticationControllerGetBearerToken | AuthenticationController.AuthenticationControllerIsSignedIn | UserStorageController.UserStorageControllerEnableProfileSyncing | UserStorageController.UserStorageControllerGetStorageKey | UserStorageController.UserStorageControllerPerformGetStorage | UserStorageController.UserStorageControllerPerformSetStorage | NotificationServicesPushControllerEnablePushNotifications | NotificationServicesPushControllerDisablePushNotifications | NotificationServicesPushControllerUpdateTriggerPushNotifications;
88
+ export type NotificationServicesControllerStateChangeEvent = ControllerStateChangeEvent<typeof controllerName, NotificationServicesControllerState>;
89
+ export type NotificationListUpdatedEvent = {
90
+ type: `${typeof controllerName}:notificationsListUpdated`;
91
+ payload: [INotification[]];
92
+ };
93
+ export type MarkNotificationsAsReadEvent = {
94
+ type: `${typeof controllerName}:markNotificationsAsRead`;
95
+ payload: [INotification[]];
96
+ };
97
+ export type Events = NotificationServicesControllerStateChangeEvent | NotificationListUpdatedEvent | MarkNotificationsAsReadEvent;
98
+ export type AllowedEvents = KeyringControllerStateChangeEvent | KeyringControllerLockEvent | KeyringControllerUnlockEvent | NotificationServicesPushControllerOnNewNotification;
99
+ export type NotificationServicesControllerMessenger = RestrictedControllerMessenger<typeof controllerName, Actions | AllowedActions, Events | AllowedEvents, AllowedActions['type'], AllowedEvents['type']>;
90
100
  type FeatureAnnouncementEnv = {
91
101
  spaceId: string;
92
102
  accessToken: string;
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationServicesController.d.ts","sourceRoot":"","sources":["../../../src/NotificationServicesController/NotificationServicesController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EACV,kCAAkC,EAClC,iCAAiC,EAClC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAQ3C,OAAO,KAAK,EACV,aAAa,EACb,4BAA4B,EAE7B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAKrE,MAAM,MAAM,yDAAyD,GAAG;IACtE,IAAI,EAAE,4DAA4D,CAAC;IACnE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,0DAA0D,GAAG;IACvE,IAAI,EAAE,6DAA6D,CAAC;IACpE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,gEAAgE,GAAG;IAC7E,IAAI,EAAE,mEAAmE,CAAC;IAC1E,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,mDAAmD,GAAG;IAChE,IAAI,EAAE,uDAAuD,CAAC;IAC9D,OAAO,EAAE,CAAC,aAAa,CAAC,CAAC;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AAC,CAAC;IAkBnC;;;;;;;;OAQG;IACU,8BAA8B,CACzC,2BAA2B,EAAE,OAAO;IAYtC;;;;;;;OAOG;IACU,qBAAqB,IAAI,OAAO,CAAC,WAAW,CAAC;IAyD1D;;;;;;;;;OASG;IACU,2BAA2B;IAYxC;;;;;;;OAOG;IACU,2BAA2B;IAwBxC;;;;;;;;;;;;;OAaG;IACU,8BAA8B,CACzC,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,WAAW,CAAC;IA0CvB;;;;;;;;;;;;;;OAcG;IACU,8BAA8B,CACzC,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,WAAW,CAAC;IA8DvB;;;;;;;OAOG;IACU,mCAAmC,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAkE5E;;;;;OAKG;IACU,+BAA+B,CAC1C,aAAa,EAAE,4BAA4B,GAC1C,OAAO,CAAC,IAAI,CAAC;IAqEhB;;;;;;OAMG;IACU,+BAA+B,CAC1C,YAAY,EAAE,aAAa,GAC1B,OAAO,CAAC,IAAI,CAAC;CAwBjB"}
1
+ {"version":3,"file":"NotificationServicesController.d.ts","sourceRoot":"","sources":["../../../src/NotificationServicesController/NotificationServicesController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAE3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EACV,kCAAkC,EAClC,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,wBAAwB,EACxB,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAQ3C,OAAO,KAAK,EACV,aAAa,EACb,4BAA4B,EAE7B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mCAAmC,CA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;;;;;;OASG;IACU,2BAA2B;IAYxC;;;;;;;OAOG;IACU,2BAA2B;IAwBxC;;;;;;;;;;;;;OAaG;IACU,8BAA8B,CACzC,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,WAAW,CAAC;IA0CvB;;;;;;;;;;;;;;OAcG;IACU,8BAA8B,CACzC,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,WAAW,CAAC;IA8DvB;;;;;;;OAOG;IACU,mCAAmC,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;IAuE5E;;;;;OAKG;IACU,+BAA+B,CAC1C,aAAa,EAAE,4BAA4B,GAC1C,OAAO,CAAC,IAAI,CAAC;IA0EhB;;;;;;OAMG;IACU,+BAA+B,CAC1C,YAAY,EAAE,aAAa,GAC1B,OAAO,CAAC,IAAI,CAAC;CA4BjB"}
@@ -14,11 +14,11 @@ export declare const getMockBatchDeleteTriggersResponse: () => {
14
14
  requestMethod: "DELETE";
15
15
  response: null;
16
16
  };
17
- export declare const MOCK_RAW_ON_CHAIN_NOTIFICATIONS: import("../types").OnChainRawNotification[];
17
+ export declare const MOCK_RAW_ON_CHAIN_NOTIFICATIONS: import("..").OnChainRawNotification[];
18
18
  export declare const getMockListNotificationsResponse: () => {
19
19
  url: string;
20
20
  requestMethod: "POST";
21
- response: import("../types").OnChainRawNotification[];
21
+ response: import("..").OnChainRawNotification[];
22
22
  };
23
23
  export declare const getMockMarkNotificationsAsReadResponse: () => {
24
24
  url: string;
@@ -1 +1 @@
1
- {"version":3,"file":"mockResponses.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/__fixtures__/mockResponses.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,mBAAmB,8DAA2C,CAAC;AAE5E,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,6CACP,CAAC;AAEtC,eAAO,MAAM,gCAAgC;;;;CAM5C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;;;CAMlD,CAAC"}
1
+ {"version":3,"file":"mockResponses.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/__fixtures__/mockResponses.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,mBAAmB,8DAA2C,CAAC;AAE5E,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;CAM9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,uCACP,CAAC;AAEtC,eAAO,MAAM,gCAAgC;;;;CAM5C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;;;CAMlD,CAAC"}
@@ -1,9 +1,14 @@
1
1
  import Controller from './NotificationServicesController';
2
+ declare const NotificationServicesController: typeof Controller;
2
3
  export { Controller };
4
+ export default NotificationServicesController;
3
5
  export * from './NotificationServicesController';
4
6
  export * as Types from './types';
5
- export * as Mocks from './__fixtures__';
7
+ export * from './types';
6
8
  export * as Processors from './processors';
9
+ export * from './processors';
7
10
  export * as Constants from './constants';
11
+ export * from './constants';
12
+ export * as Mocks from './__fixtures__';
8
13
  export * as UI from './ui';
9
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NotificationServicesController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,cAAc,kCAAkC,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NotificationServicesController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAE1D,QAAA,MAAM,8BAA8B,mBAAa,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,8BAA8B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC"}
@@ -1,8 +1,8 @@
1
1
  import type { Entry, Asset } from 'contentful';
2
2
  import type { TypeFeatureAnnouncement } from '../types/feature-announcement/type-feature-announcement';
3
3
  import type { INotification } from '../types/notification/notification';
4
- export declare const FEATURE_ANNOUNCEMENT_API: string;
5
- export declare const FEATURE_ANNOUNCEMENT_URL: string;
4
+ export declare const FEATURE_ANNOUNCEMENT_API = "https://cdn.contentful.com/spaces/:space_id/environments/master/entries";
5
+ export declare const FEATURE_ANNOUNCEMENT_URL = "https://cdn.contentful.com/spaces/:space_id/environments/master/entries?access_token=:access_token&content_type=productAnnouncement&include=10&fields.clients=:client_id";
6
6
  type Env = {
7
7
  spaceId: string;
8
8
  accessToken: string;
@@ -1 +1 @@
1
- {"version":3,"file":"feature-announcements.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/services/feature-announcements.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAmB,MAAM,YAAY,CAAC;AAKhE,OAAO,KAAK,EAEV,uBAAuB,EACxB,MAAM,yDAAyD,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAKxE,eAAO,MAAM,wBAAwB,QAAsF,CAAC;AAC5H,eAAO,MAAM,wBAAwB,QAAqJ,CAAC;AAE3L,KAAK,GAAG,GAAG;IACT,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE;QAET,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;QAEhB,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;KACjB,CAAC;IACF,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACnC,CAAC;AAsEF;;;;GAIG;AACH,wBAAsB,mCAAmC,CACvD,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,aAAa,EAAE,CAAC,CAW1B"}
1
+ {"version":3,"file":"feature-announcements.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/services/feature-announcements.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAmB,MAAM,YAAY,CAAC;AAKhE,OAAO,KAAK,EAEV,uBAAuB,EACxB,MAAM,yDAAyD,CAAC;AAOjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAKxE,eAAO,MAAM,wBAAwB,4EAAsF,CAAC;AAC5H,eAAO,MAAM,wBAAwB,6KAAqJ,CAAC;AAE3L,KAAK,GAAG,GAAG;IACT,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,EAAE;QAET,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;QAEhB,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC;KACjB,CAAC;IACF,KAAK,CAAC,EAAE,uBAAuB,EAAE,CAAC;CACnC,CAAC;AAsGF;;;;GAIG;AACH,wBAAsB,mCAAmC,CACvD,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,aAAa,EAAE,CAAC,CAW1B"}
@@ -8,10 +8,10 @@ export type NotificationTrigger = {
8
8
  };
9
9
  export declare const TRIGGER_API = "https://trigger.api.cx.metamask.io";
10
10
  export declare const NOTIFICATION_API = "https://notification.api.cx.metamask.io";
11
- export declare const TRIGGER_API_BATCH_ENDPOINT: string;
12
- export declare const NOTIFICATION_API_LIST_ENDPOINT: string;
11
+ export declare const TRIGGER_API_BATCH_ENDPOINT = "https://trigger.api.cx.metamask.io/api/v1/triggers/batch";
12
+ export declare const NOTIFICATION_API_LIST_ENDPOINT = "https://notification.api.cx.metamask.io/api/v1/notifications";
13
13
  export declare const NOTIFICATION_API_LIST_ENDPOINT_PAGE_QUERY: (page: number) => string;
14
- export declare const NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT: string;
14
+ export declare const NOTIFICATION_API_MARK_ALL_AS_READ_ENDPOINT = "https://notification.api.cx.metamask.io/api/v1/notifications/mark-as-read";
15
15
  /**
16
16
  * Creates on-chain triggers based on the provided notification triggers.
17
17
  * This method generates a unique token for each trigger using the trigger ID and storage key,
@@ -1 +1 @@
1
- {"version":3,"file":"onchain-notifications.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/services/onchain-notifications.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAEnG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAOtE,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,WAAW,uCAAuC,CAAC;AAChE,eAAO,MAAM,gBAAgB,4CAA4C,CAAC;AAC1E,eAAO,MAAM,0BAA0B,QAAyC,CAAC;AACjF,eAAO,MAAM,8BAA8B,QAA6C,CAAC;AACzF,eAAO,MAAM,yCAAyC,SAAU,MAAM,WACP,CAAC;AAChE,eAAO,MAAM,0CAA0C,QAA0D,CAAC;AAElH;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,mBAAmB,EAAE,GAC9B,OAAO,CAAC,IAAI,CAAC,CAmDf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,WAAW,CAAC,CA2DtB;AAED;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAiEnC;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
1
+ {"version":3,"file":"onchain-notifications.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesController/services/onchain-notifications.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAOtE,MAAM,MAAM,mBAAmB,GAAG;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,WAAW,uCAAuC,CAAC;AAChE,eAAO,MAAM,gBAAgB,4CAA4C,CAAC;AAC1E,eAAO,MAAM,0BAA0B,6DAAyC,CAAC;AACjF,eAAO,MAAM,8BAA8B,iEAA6C,CAAC;AACzF,eAAO,MAAM,yCAAyC,SAAU,MAAM,WACP,CAAC;AAChE,eAAO,MAAM,0CAA0C,8EAA0D,CAAC;AAElH;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,mBAAmB,EAAE,GAC9B,OAAO,CAAC,IAAI,CAAC,CAmDf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EAAE,GACd,OAAO,CAAC,WAAW,CAAC,CA2DtB;AAED;;;;;;;;;GASG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,WAAW,EACxB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,sBAAsB,EAAE,CAAC,CA2DnC;AAED;;;;;;;;GAQG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
@@ -1,26 +1,28 @@
1
1
  import type { TRIGGER_TYPES } from '../../constants/notification-schema';
2
2
  import type { TypeFeatureAnnouncement } from './type-feature-announcement';
3
- export type FeatureAnnouncementRawNotificationData = Omit<TypeFeatureAnnouncement['fields'], 'image' | 'longDescription' | 'extensionLink' | 'link' | 'action'> & {
3
+ export type FeatureAnnouncementRawNotificationData = Omit<TypeFeatureAnnouncement['fields'], 'image' | 'longDescription' | 'extensionLink' | 'portfolioLink' | 'externalLink' | 'mobileLink'> & {
4
4
  longDescription: string;
5
5
  image: {
6
6
  title?: string;
7
7
  description?: string;
8
8
  url: string;
9
9
  };
10
- link?: {
11
- linkText: string;
12
- linkUrl: string;
13
- isExternal: boolean;
10
+ externalLink?: {
11
+ externalLinkText: string;
12
+ externalLinkUrl: string;
14
13
  };
15
- action?: {
16
- actionText: string;
17
- actionUrl: string;
18
- isExternal: boolean;
14
+ portfolioLink?: {
15
+ portfolioLinkText: string;
16
+ portfolioLinkUrl: string;
19
17
  };
20
18
  extensionLink?: {
21
19
  extensionLinkText: string;
22
20
  extensionLinkRoute: string;
23
21
  };
22
+ mobileLink?: {
23
+ mobileLinkText: string;
24
+ mobileLinkUrl: string;
25
+ };
24
26
  };
25
27
  export type FeatureAnnouncementRawNotification = {
26
28
  type: TRIGGER_TYPES.FEATURES_ANNOUNCEMENT;
@@ -1 +1 @@
1
- {"version":3,"file":"feature-announcement.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationServicesController/types/feature-announcement/feature-announcement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,MAAM,MAAM,sCAAsC,GAAG,IAAI,CACvD,uBAAuB,CAAC,QAAQ,CAAC,EACjC,OAAO,GAAG,iBAAiB,GAAG,eAAe,GAAG,MAAM,GAAG,QAAQ,CAClE,GAAG;IACF,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IAGF,IAAI,CAAC,EAAE;QACL,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IAGF,aAAa,CAAC,EAAE;QACd,iBAAiB,EAAE,MAAM,CAAC;QAC1B,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,aAAa,CAAC,qBAAqB,CAAC;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,sCAAsC,CAAC;CAC9C,CAAC"}
1
+ {"version":3,"file":"feature-announcement.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationServicesController/types/feature-announcement/feature-announcement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,MAAM,MAAM,sCAAsC,GAAG,IAAI,CACvD,uBAAuB,CAAC,QAAQ,CAAC,EAC/B,OAAO,GACP,iBAAiB,GACjB,eAAe,GACf,eAAe,GACf,cAAc,GACd,YAAY,CACf,GAAG;IACF,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IAGF,YAAY,CAAC,EAAE;QACb,gBAAgB,EAAE,MAAM,CAAC;QACzB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IAGF,aAAa,CAAC,EAAE;QACd,iBAAiB,EAAE,MAAM,CAAC;QAC1B,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IAGF,aAAa,CAAC,EAAE;QACd,iBAAiB,EAAE,MAAM,CAAC;QAC1B,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;IAGF,UAAU,CAAC,EAAE;QACX,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,aAAa,CAAC,qBAAqB,CAAC;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,sCAAsC,CAAC;CAC9C,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Entry, EntryFieldTypes } from 'contentful';
2
- import type { TypeExtensionLinkFields, TypeLinkFields, TypeActionFields } from './type-links';
2
+ import type { TypeExternalLinkFields, TypeExtensionLinkFields, TypePortfolioLinkFields, TypeMobileLinkFields } from './type-links';
3
3
  export type ImageFields = {
4
4
  fields: {
5
5
  title?: string;
@@ -27,9 +27,10 @@ export type TypeFeatureAnnouncementFields = {
27
27
  shortDescription: EntryFieldTypes.Text;
28
28
  image: EntryFieldTypes.EntryLink<ImageFields>;
29
29
  longDescription: EntryFieldTypes.RichText;
30
- link?: EntryFieldTypes.EntryLink<TypeLinkFields>;
31
- action?: EntryFieldTypes.EntryLink<TypeActionFields>;
30
+ externalLink?: EntryFieldTypes.EntryLink<TypeExternalLinkFields>;
31
+ portfolioLink?: EntryFieldTypes.EntryLink<TypePortfolioLinkFields>;
32
32
  extensionLink?: EntryFieldTypes.EntryLink<TypeExtensionLinkFields>;
33
+ mobileLink?: EntryFieldTypes.EntryLink<TypeMobileLinkFields>;
33
34
  clients?: EntryFieldTypes.Text<'extension' | 'mobile' | 'portfolio'>;
34
35
  };
35
36
  contentTypeId: 'productAnnouncement';
@@ -1 +1 @@
1
- {"version":3,"file":"type-feature-announcement.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationServicesController/types/feature-announcement/type-feature-announcement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,KAAK,EACV,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,WAAW,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Root":"","sources":["../../../../../src/NotificationServicesController/types/feature-announcement/type-feature-announcement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACrB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE;QACN,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE;YACL,GAAG,EAAE,MAAM,CAAC;YACZ,QAAQ,EAAE,MAAM,CAAC;YACjB,WAAW,EAAE,MAAM,CAAC;YACpB,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM,CAAC;gBACb,KAAK,CAAC,EAAE;oBACN,KAAK,EAAE,MAAM,CAAC;oBACd,MAAM,EAAE,MAAM,CAAC;iBAChB,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;IACF,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,MAAM,EAAE;QACN,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC;QAC5B,EAAE,EAAE,eAAe,CAAC,MAAM,CAAC;QAC3B,QAAQ,EAAE,eAAe,CAAC,IAAI,CAAC;QAC/B,gBAAgB,EAAE,eAAe,CAAC,IAAI,CAAC;QACvC,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAC9C,eAAe,EAAE,eAAe,CAAC,QAAQ,CAAC;QAG1C,YAAY,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC;QAEjE,aAAa,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAEnE,aAAa,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC;QAEnE,UAAU,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC;QAE7D,OAAO,CAAC,EAAE,eAAe,CAAC,IAAI,CAAC,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC,CAAC;KACtE,CAAC;IACF,aAAa,EAAE,qBAAqB,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,KAAK,CACzC,6BAA6B,EAC7B,4BAA4B,CAC7B,CAAC"}
@@ -1,3 +1,10 @@
1
+ export type TypeExternalLinkFields = {
2
+ fields: {
3
+ externalLinkText: string;
4
+ externalLinkUrl: string;
5
+ };
6
+ contentTypeId: 'externalLink';
7
+ };
1
8
  export type TypeExtensionLinkFields = {
2
9
  fields: {
3
10
  extensionLinkText: string;
@@ -5,20 +12,18 @@ export type TypeExtensionLinkFields = {
5
12
  };
6
13
  contentTypeId: 'extensionLink';
7
14
  };
8
- export type TypeLinkFields = {
15
+ export type TypePortfolioLinkFields = {
9
16
  fields: {
10
- linkText: string;
11
- linkUrl: string;
12
- isExternal: boolean;
17
+ portfolioLinkText: string;
18
+ portfolioLinkUrl: string;
13
19
  };
14
- contentTypeId: 'link';
20
+ contentTypeId: 'portfolioLink';
15
21
  };
16
- export type TypeActionFields = {
22
+ export type TypeMobileLinkFields = {
17
23
  fields: {
18
- actionText: string;
19
- actionUrl: string;
20
- isExternal: boolean;
24
+ mobileLinkText: string;
25
+ mobileLinkUrl: string;
21
26
  };
22
- contentTypeId: 'action';
27
+ contentTypeId: 'mobileLink';
23
28
  };
24
29
  //# sourceMappingURL=type-links.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"type-links.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationServicesController/types/feature-announcement/type-links.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE;QACN,iBAAiB,EAAE,MAAM,CAAC;QAC1B,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,aAAa,EAAE,eAAe,CAAC;CAChC,CAAC;AAGF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE;QACN,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,aAAa,EAAE,QAAQ,CAAC;CACzB,CAAC"}
1
+ {"version":3,"file":"type-links.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationServicesController/types/feature-announcement/type-links.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE;QACN,gBAAgB,EAAE,MAAM,CAAC;QACzB,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,aAAa,EAAE,cAAc,CAAC;CAC/B,CAAC;AAIF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE;QACN,iBAAiB,EAAE,MAAM,CAAC;QAC1B,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,aAAa,EAAE,eAAe,CAAC;CAChC,CAAC;AAIF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE;QACN,iBAAiB,EAAE,MAAM,CAAC;QAC1B,gBAAgB,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,aAAa,EAAE,eAAe,CAAC;CAChC,CAAC;AAIF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE;QACN,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,aAAa,EAAE,YAAY,CAAC;CAC7B,CAAC"}
@@ -33,6 +33,7 @@ export type OnChainRawNotification = {
33
33
  }>;
34
34
  }>;
35
35
  }[NotificationDataKinds];
36
+ export type UnprocessedOnChainRawNotification = Notification;
36
37
  export type OnChainRawNotificationsWithNetworkFields = Extract<OnChainRawNotification, {
37
38
  data: {
38
39
  network_fee: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"on-chain-notification.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,MAAM,0BAA0B,GACpC,UAAU,CAAC,SAAS,CAAC,CAAC,4BAA4B,CAAC,CAAC;AACtD,MAAM,MAAM,gCAAgC,GAC1C,UAAU,CAAC,SAAS,CAAC,CAAC,kCAAkC,CAAC,CAAC;AAC5D,MAAM,MAAM,uBAAuB,GACjC,UAAU,CAAC,SAAS,CAAC,CAAC,yBAAyB,CAAC,CAAC;AACnD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,4BAA4B,GACtC,UAAU,CAAC,SAAS,CAAC,CAAC,8BAA8B,CAAC,CAAC;AACxD,MAAM,MAAM,6BAA6B,GACvC,UAAU,CAAC,SAAS,CAAC,CAAC,+BAA+B,CAAC,CAAC;AACzD,MAAM,MAAM,+BAA+B,GACzC,UAAU,CAAC,SAAS,CAAC,CAAC,iCAAiC,CAAC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC;AACjE,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAAC;AACrE,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,oBAAoB,CAAC,CAAC;AAC7E,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAAC;AACvE,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,CAAC;AAE/E,KAAK,YAAY,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC;AAC1D,KAAK,qBAAqB,GAAG,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,KAAK,aAAa,CAAC,IAAI,IAAI;KACxB,CAAC,IAAI,aAAa,GAAG,IAAI,SAAS,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK;CACtD,CAAC,aAAa,CAAC,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;KAClC,CAAC,IAAI,qBAAqB,GAAG,OAAO,CACnC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG;QAC3B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YAAE,IAAI,EAAE,CAAC,CAAA;SAAE,CAAC,CAAC;KAClD,CACF;CACF,CAAC,qBAAqB,CAAC,CAAC;AAEzB,MAAM,MAAM,wCAAwC,GAAG,OAAO,CAC5D,sBAAsB,EACtB;IAAE,IAAI,EAAE;QAAE,WAAW,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,CACnC,CAAC"}
1
+ {"version":3,"file":"on-chain-notification.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationServicesController/types/on-chain-notification/on-chain-notification.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qCA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,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC;AAC1D,KAAK,qBAAqB,GAAG,WAAW,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,KAAK,aAAa,CAAC,IAAI,IAAI;KACxB,CAAC,IAAI,aAAa,GAAG,IAAI,SAAS,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG,KAAK;CACtD,CAAC,aAAa,CAAC,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG;KAClC,CAAC,IAAI,qBAAqB,GAAG,OAAO,CACnC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,GAAG;QAC3B,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YAAE,IAAI,EAAE,CAAC,CAAA;SAAE,CAAC,CAAC;KAClD,CACF;CACF,CAAC,qBAAqB,CAAC,CAAC;AAEzB,MAAM,MAAM,iCAAiC,GAAG,YAAY,CAAC;AAE7D,MAAM,MAAM,wCAAwC,GAAG,OAAO,CAC5D,sBAAsB,EACtB;IAAE,IAAI,EAAE;QAAE,WAAW,EAAE,OAAO,CAAA;KAAE,CAAA;CAAE,CACnC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { RestrictedControllerMessenger, ControllerGetStateAction } from '@metamask/base-controller';
1
+ import type { RestrictedControllerMessenger, ControllerGetStateAction, ControllerStateChangeEvent } from '@metamask/base-controller';
2
2
  import { BaseController } from '@metamask/base-controller';
3
3
  import type { AuthenticationController } from '@metamask/profile-sync-controller';
4
4
  import type { Types } from '../NotificationServicesController';
@@ -7,6 +7,7 @@ declare const controllerName = "NotificationServicesPushController";
7
7
  export type NotificationServicesPushControllerState = {
8
8
  fcmToken: string;
9
9
  };
10
+ export type NotificationServicesPushControllerGetStateAction = ControllerGetStateAction<typeof controllerName, NotificationServicesPushControllerState>;
10
11
  export type NotificationServicesPushControllerEnablePushNotificationsAction = {
11
12
  type: `${typeof controllerName}:enablePushNotifications`;
12
13
  handler: NotificationServicesPushController['enablePushNotifications'];
@@ -19,18 +20,20 @@ export type NotificationServicesPushControllerUpdateTriggerPushNotificationsActi
19
20
  type: `${typeof controllerName}:updateTriggerPushNotifications`;
20
21
  handler: NotificationServicesPushController['updateTriggerPushNotifications'];
21
22
  };
22
- export type Actions = NotificationServicesPushControllerEnablePushNotificationsAction | NotificationServicesPushControllerDisablePushNotificationsAction | NotificationServicesPushControllerUpdateTriggerPushNotificationsAction | ControllerGetStateAction<'state', NotificationServicesPushControllerState>;
23
+ export type Actions = NotificationServicesPushControllerGetStateAction | NotificationServicesPushControllerEnablePushNotificationsAction | NotificationServicesPushControllerDisablePushNotificationsAction | NotificationServicesPushControllerUpdateTriggerPushNotificationsAction;
23
24
  export type AllowedActions = AuthenticationController.AuthenticationControllerGetBearerToken;
25
+ export type NotificationServicesPushControllerStateChangeEvent = ControllerStateChangeEvent<typeof controllerName, NotificationServicesPushControllerState>;
24
26
  export type NotificationServicesPushControllerOnNewNotificationEvent = {
25
27
  type: `${typeof controllerName}:onNewNotifications`;
26
28
  payload: [Types.INotification];
27
29
  };
28
- export type NotificationServicesPushControllerPushNotificationClicked = {
30
+ export type NotificationServicesPushControllerPushNotificationClickedEvent = {
29
31
  type: `${typeof controllerName}:pushNotificationClicked`;
30
32
  payload: [Types.INotification];
31
33
  };
32
- export type AllowedEvents = NotificationServicesPushControllerOnNewNotificationEvent | NotificationServicesPushControllerPushNotificationClicked;
33
- export type NotificationServicesPushControllerMessenger = RestrictedControllerMessenger<typeof controllerName, Actions | AllowedActions, AllowedEvents, AllowedActions['type'], AllowedEvents['type']>;
34
+ export type Events = NotificationServicesPushControllerStateChangeEvent | NotificationServicesPushControllerOnNewNotificationEvent | NotificationServicesPushControllerPushNotificationClickedEvent;
35
+ export type AllowedEvents = never;
36
+ export type NotificationServicesPushControllerMessenger = RestrictedControllerMessenger<typeof controllerName, Actions | AllowedActions, Events | AllowedEvents, AllowedActions['type'], AllowedEvents['type']>;
34
37
  export declare const defaultState: NotificationServicesPushControllerState;
35
38
  type ControllerConfig = {
36
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationServicesPushController.d.ts","sourceRoot":"","sources":["../../../src/NotificationServicesPushController/NotificationServicesPushController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAGlF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAQ/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,cAAc,uCAAuC,CAAC;AAE5D,MAAM,MAAM,uCAAuC,GAAG;IACpD,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+DAA+D,GAAG;IAC5E,IAAI,EAAE,GAAG,OAAO,cAAc,0BAA0B,CAAC;IACzD,OAAO,EAAE,kCAAkC,CAAC,yBAAyB,CAAC,CAAC;CACxE,CAAC;AAEF,MAAM,MAAM,gEAAgE,GAAG;IAC7E,IAAI,EAAE,GAAG,OAAO,cAAc,2BAA2B,CAAC;IAC1D,OAAO,EAAE,kCAAkC,CAAC,0BAA0B,CAAC,CAAC;CACzE,CAAC;AACF,MAAM,MAAM,sEAAsE,GAChF;IACE,IAAI,EAAE,GAAG,OAAO,cAAc,iCAAiC,CAAC;IAChE,OAAO,EAAE,kCAAkC,CAAC,gCAAgC,CAAC,CAAC;CAC/E,CAAC;AAEJ,MAAM,MAAM,OAAO,GACf,+DAA+D,GAC/D,gEAAgE,GAChE,sEAAsE,GACtE,wBAAwB,CAAC,OAAO,EAAE,uCAAuC,CAAC,CAAC;AAE/E,MAAM,MAAM,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,uCAAuC,CAAC;QAC/C,GAAG,EAAE,mBAAmB,CAAC;QACzB,MAAM,EAAE,gBAAgB,CAAC;KAC1B;IA2CD;;;;;;;;;OASG;IACG,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE;IAoD7C;;;;;;;;OAQG;IACG,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE;IAyC9C;;;;;;OAMG;IACG,8BAA8B,CAAC,KAAK,EAAE,MAAM,EAAE;CAgCrD"}
1
+ {"version":3,"file":"NotificationServicesPushController.d.ts","sourceRoot":"","sources":["../../../src/NotificationServicesPushController/NotificationServicesPushController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAGlF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAQ/D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,QAAA,MAAM,cAAc,uCAAuC,CAAC;AAE5D,MAAM,MAAM,uCAAuC,GAAG;IACpD,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,gDAAgD,GAC1D,wBAAwB,CACtB,OAAO,cAAc,EACrB,uCAAuC,CACxC,CAAC;AAEJ,MAAM,MAAM,+DAA+D,GAAG;IAC5E,IAAI,EAAE,GAAG,OAAO,cAAc,0BAA0B,CAAC;IACzD,OAAO,EAAE,kCAAkC,CAAC,yBAAyB,CAAC,CAAC;CACxE,CAAC;AAEF,MAAM,MAAM,gEAAgE,GAAG;IAC7E,IAAI,EAAE,GAAG,OAAO,cAAc,2BAA2B,CAAC;IAC1D,OAAO,EAAE,kCAAkC,CAAC,0BAA0B,CAAC,CAAC;CACzE,CAAC;AACF,MAAM,MAA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AAE,CACzB,KAAK,EAAE,iBAAiB,EACxB,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,KAC/B,IAAI,CAAC;IAEV;;OAEG;IACH,QAAQ,EAAE,WAAW,GAAG,QAAQ,CAAC;CAClC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,CAAC,OAAO,OAAO,kCAAmC,SAAQ,cAAc,CAC5E,OAAO,cAAc,EACrB,uCAAuC,EACvC,2CAA2C,CAC5C;;gBAOa,EACV,SAAS,EACT,KAAK,EACL,GAAG,EACH,MAAM,GACP,EAAE;QACD,SAAS,EAAE,2CAA2C,CAAC;QACvD,KAAK,EAAE,uCAAuC,CAAC;QAC/C,GAAG,EAAE,mBAAmB,CAAC;QACzB,MAAM,EAAE,gBAAgB,CAAC;KAC1B;IA2CD;;;;;;;;;OASG;IACG,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE;IAoD7C;;;;;;;;OAQG;IACG,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE;IAyC9C;;;;;;OAMG;IACG,8BAA8B,CAAC,KAAK,EAAE,MAAM,EAAE;CAgCrD"}
@@ -1,7 +1,11 @@
1
1
  import Controller from './NotificationServicesPushController';
2
+ declare const NotificationServicesPushController: typeof Controller;
2
3
  export { Controller };
4
+ export default NotificationServicesPushController;
3
5
  export * from './NotificationServicesPushController';
4
6
  export * as Types from './types';
7
+ export * from './types';
5
8
  export * as Utils from './utils';
9
+ export * from './utils';
6
10
  export * as Mocks from './__fixtures__';
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NotificationServicesPushController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sCAAsC,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,cAAc,sCAAsC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/NotificationServicesPushController/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sCAAsC,CAAC;AAE9D,QAAA,MAAM,kCAAkC,mBAAa,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,eAAe,kCAAkC,CAAC;AAClD,cAAc,sCAAsC,CAAC;AACrD,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC"}
@@ -1,2 +1,2 @@
1
- export declare const REGISTRATION_TOKENS_ENDPOINT: string;
1
+ export declare const REGISTRATION_TOKENS_ENDPOINT = "https://push.api.cx.metamask.io/v1/link";
2
2
  //# sourceMappingURL=endpoints.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/services/endpoints.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,4BAA4B,QAAmB,CAAC"}
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/NotificationServicesPushController/services/endpoints.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,4BAA4B,4CAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"push-web.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationServicesPushController/services/push/push-web.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AAErE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AA8BhE;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,mBAAmB,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,mBAAmB,GACvB,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED;;;;;GAKG;AACH,wBAAsB,iCAAiC,CACrD,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,uBA+BrE;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,CAAC,CAAC,EAAE,iBAAiB,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,cAY5E"}
1
+ {"version":3,"file":"push-web.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationServicesPushController/services/push/push-web.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yCAAyC,CAAC;AAGrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AA8BhE;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,mBAAmB,GACvB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxB;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,GAAG,EAAE,mBAAmB,GACvB,OAAO,CAAC,OAAO,CAAC,CAQlB;AAED;;;;;GAKG;AACH,wBAAsB,iCAAiC,CACrD,GAAG,EAAE,mBAAmB,EACxB,OAAO,EAAE,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,uBA+BrE;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,CAAC,CAAC,EAAE,iBAAiB,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,cAY5E"}
@@ -1,3 +1,3 @@
1
1
  export * as NotificationServicesController from './NotificationServicesController';
2
- export * as NotificationsServicesPushController from './NotificationServicesPushController';
2
+ export * as NotificationServicesPushController from './NotificationServicesPushController';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,8BAA8B,MAAM,kCAAkC,CAAC;AACnF,OAAO,KAAK,mCAAmC,MAAM,sCAAsC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,8BAA8B,MAAM,kCAAkC,CAAC;AACnF,OAAO,KAAK,kCAAkC,MAAM,sCAAsC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { OnChainRawNotification, UnprocessedOnChainRawNotification } from 'src/NotificationServicesController/types';
2
+ /**
3
+ * A true "raw notification" does not have some fields that exist on this type. E.g. the `type` field.
4
+ * This is retro-actively added when we fetch notifications to be able to easily type-discriminate notifications.
5
+ * We use this to ensure that the correct missing fields are added to the raw shapes
6
+ *
7
+ * @param data - raw onchain notification
8
+ * @returns a complete raw onchain notification
9
+ */
10
+ export declare function toRawOnChainNotification(data: UnprocessedOnChainRawNotification): OnChainRawNotification;
11
+ //# sourceMappingURL=to-raw-notification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"to-raw-notification.d.ts","sourceRoot":"","sources":["../../../src/shared/to-raw-notification.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,iCAAiC,EAClC,MAAM,0CAA0C,CAAC;AAElD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,iCAAiC,GACtC,sBAAsB,CAKxB"}
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "private": true,
4
+ "description": "",
5
+ "license": "MIT",
6
+ "sideEffects": false,
7
+ "main": "../../dist/NotificationServicesController/__fixtures__/index.js",
8
+ "types": "../../dist/types/NotificationServicesController/__fixtures__/index.d.ts"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "private": true,
4
+ "description": "",
5
+ "license": "MIT",
6
+ "sideEffects": false,
7
+ "main": "../dist/NotificationServicesController/index.js",
8
+ "types": "../dist/types/NotificationServicesController/index.d.ts"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "private": true,
4
+ "description": "",
5
+ "license": "MIT",
6
+ "sideEffects": false,
7
+ "main": "../../dist/NotificationServicesController/ui/index.js",
8
+ "types": "../../dist/types/NotificationServicesController/ui/index.d.ts"
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/notification-services-controller",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Manages New MetaMask decentralized Notification system",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -22,12 +22,39 @@
22
22
  "require": "./dist/index.js",
23
23
  "types": "./dist/types/index.d.ts"
24
24
  },
25
+ "./notification-services": {
26
+ "import": "./dist/NotificationServicesController/index.mjs",
27
+ "require": "./dist/NotificationServicesController/index.js",
28
+ "types": "./dist/types/NotificationServicesController/index.d.ts"
29
+ },
30
+ "./notification-services/ui": {
31
+ "import": "./dist/NotificationServicesController/ui/index.mjs",
32
+ "require": "./dist/NotificationServicesController/ui/index.js",
33
+ "types": "./dist/types/NotificationServicesController/ui/index.d.ts"
34
+ },
35
+ "./notification-services/mocks": {
36
+ "import": "./dist/NotificationServicesController/__fixtures__/index.mjs",
37
+ "require": "./dist/NotificationServicesController/__fixtures__/index.js",
38
+ "types": "./dist/types/NotificationServicesController/__fixtures__/index.d.ts"
39
+ },
40
+ "./push-services": {
41
+ "import": "./dist/NotificationServicesPushController/index.mjs",
42
+ "require": "./dist/NotificationServicesPushController/index.js",
43
+ "types": "./dist/types/NotificationServicesPushController/index.d.ts"
44
+ },
45
+ "./push-services/mocks": {
46
+ "import": "./dist/NotificationServicesPushController/__fixtures__/index.mjs",
47
+ "require": "./dist/NotificationServicesPushController/__fixtures__/index.js",
48
+ "types": "./dist/types/NotificationServicesPushController/__fixtures__/index.d.ts"
49
+ },
25
50
  "./package.json": "./package.json"
26
51
  },
27
52
  "main": "./dist/index.js",
28
53
  "types": "./dist/types/index.d.ts",
29
54
  "files": [
30
- "dist/"
55
+ "dist/",
56
+ "notification-services/",
57
+ "push-services/"
31
58
  ],
32
59
  "scripts": {
33
60
  "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean",
@@ -35,6 +62,7 @@
35
62
  "changelog:update": "../../scripts/update-changelog.sh @metamask/notification-services-controller",
36
63
  "changelog:validate": "../../scripts/validate-changelog.sh @metamask/notification-services-controller",
37
64
  "publish:preview": "yarn npm publish --tag preview",
65
+ "since-latest-release": "../../scripts/since-latest-release.sh",
38
66
  "test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
39
67
  "test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache",
40
68
  "test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
@@ -42,10 +70,10 @@
42
70
  },
43
71
  "dependencies": {
44
72
  "@contentful/rich-text-html-renderer": "^16.5.2",
45
- "@metamask/base-controller": "^6.0.2",
46
- "@metamask/controller-utils": "^11.0.2",
73
+ "@metamask/base-controller": "^7.0.0",
74
+ "@metamask/controller-utils": "^11.2.0",
47
75
  "bignumber.js": "^4.1.0",
48
- "contentful": "^10.3.6",
76
+ "contentful": "^10.15.0",
49
77
  "firebase": "^10.11.0",
50
78
  "loglevel": "^1.8.1",
51
79
  "uuid": "^8.3.2"
@@ -53,8 +81,8 @@
53
81
  "devDependencies": {
54
82
  "@lavamoat/allow-scripts": "^3.0.4",
55
83
  "@metamask/auto-changelog": "^3.4.4",
56
- "@metamask/keyring-controller": "^17.1.2",
57
- "@metamask/profile-sync-controller": "^0.2.0",
84
+ "@metamask/keyring-controller": "^17.2.0",
85
+ "@metamask/profile-sync-controller": "^0.3.0",
58
86
  "@types/jest": "^27.4.1",
59
87
  "@types/readable-stream": "^2.3.0",
60
88
  "deepmerge": "^4.2.2",
@@ -64,11 +92,11 @@
64
92
  "ts-jest": "^27.1.4",
65
93
  "typedoc": "^0.24.8",
66
94
  "typedoc-plugin-missing-exports": "^2.0.0",
67
- "typescript": "~5.0.4"
95
+ "typescript": "~5.2.2"
68
96
  },
69
97
  "peerDependencies": {
70
98
  "@metamask/keyring-controller": "^17.0.0",
71
- "@metamask/profile-sync-controller": "^0.2.0"
99
+ "@metamask/profile-sync-controller": "^0.3.0"
72
100
  },
73
101
  "engines": {
74
102
  "node": "^18.18 || >=20"
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "private": true,
4
+ "description": "",
5
+ "license": "MIT",
6
+ "sideEffects": false,
7
+ "main": "../../dist/NotificationServicesPushController/__fixtures__/index.js",
8
+ "types": "../../dist/types/NotificationServicesPushController/__fixtures__/index.d.ts"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "private": true,
4
+ "description": "",
5
+ "license": "MIT",
6
+ "sideEffects": false,
7
+ "main": "../dist/NotificationServicesPushController/index.js",
8
+ "types": "../dist/types/NotificationServicesPushController/index.d.ts"
9
+ }