@@ -7,40 +7,43 @@ import { NotificationType } from '@/notifications/domain/models/Notification'
77
88const mockRepository = {
99 getAllNotificationsByUser : ( ) =>
10- Promise . resolve ( [
11- {
12- id : 1 ,
13- type : NotificationType . CREATE_COLLECTION ,
14- sentTimestamp : new Date ( ) . toISOString ( ) ,
15- displayAsRead : false ,
16- collectionDisplayName : 'Climate Data' ,
17- collectionAlias : 'climate' ,
18- ownerDisplayName : 'Jane Doe' ,
19- ownerAlias : 'jane_doe' ,
20- userGuidesBaseUrl : 'https://guides.dataverse.org' ,
21- userGuidesVersion : 'v5.12'
22- } ,
23- {
24- id : 2 ,
25- type : NotificationType . ASSIGN_ROLE ,
26- sentTimestamp : new Date ( ) . toISOString ( ) ,
27- displayAsRead : false ,
28- collectionDisplayName : 'Biodiversity Data' ,
29- collectionAlias : 'biodiversity' ,
30- roleAssignments : [
31- {
32- id : 1 ,
33- assignee : 'alice_user' ,
34- definitionPointId : 100 ,
35- roleId : 2 ,
36- roleName : 'Curator' ,
37- _roleAlias : 'curator'
38- }
39- ] ,
40- ownerDisplayName : 'Alice Smith' ,
41- ownerAlias : 'alice_smith'
42- }
43- ] ) ,
10+ Promise . resolve ( {
11+ totalItemCount : 3 ,
12+ items : [
13+ {
14+ id : 1 ,
15+ type : NotificationType . CREATE_COLLECTION ,
16+ sentTimestamp : new Date ( ) . toISOString ( ) ,
17+ displayAsRead : false ,
18+ collectionDisplayName : 'Climate Data' ,
19+ collectionAlias : 'climate' ,
20+ ownerDisplayName : 'Jane Doe' ,
21+ ownerAlias : 'jane_doe' ,
22+ userGuidesBaseUrl : 'https://guides.dataverse.org' ,
23+ userGuidesVersion : 'v5.12'
24+ } ,
25+ {
26+ id : 2 ,
27+ type : NotificationType . ASSIGN_ROLE ,
28+ sentTimestamp : new Date ( ) . toISOString ( ) ,
29+ displayAsRead : false ,
30+ collectionDisplayName : 'Biodiversity Data' ,
31+ collectionAlias : 'biodiversity' ,
32+ roleAssignments : [
33+ {
34+ id : 1 ,
35+ assignee : 'alice_user' ,
36+ definitionPointId : 100 ,
37+ roleId : 2 ,
38+ roleName : 'Curator' ,
39+ _roleAlias : 'curator'
40+ }
41+ ] ,
42+ ownerDisplayName : 'Alice Smith' ,
43+ ownerAlias : 'alice_smith'
44+ }
45+ ]
46+ } ) ,
4447 markNotificationAsRead : ( _id : number ) => Promise . resolve ( ) ,
4548 deleteNotification : ( _id : number ) => Promise . resolve ( ) ,
4649 getUnreadNotificationsCount : ( ) => Promise . resolve ( 1 )
0 commit comments