2020-11-24 05:20:44 +03:00
|
|
|
/- chat-store, graph-store, post, *resource, group-store, metadata-store
|
2020-10-21 08:54:59 +03:00
|
|
|
^?
|
|
|
|
|%
|
2020-11-24 05:20:44 +03:00
|
|
|
++ state-zero
|
|
|
|
|%
|
|
|
|
+$ state
|
|
|
|
$: %0
|
|
|
|
notifications=notifications
|
|
|
|
archive=notifications
|
2020-12-10 08:19:46 +03:00
|
|
|
current-timebox=@da
|
2020-11-24 05:20:44 +03:00
|
|
|
dnd=_|
|
|
|
|
==
|
2020-12-10 08:19:46 +03:00
|
|
|
++ orm
|
|
|
|
((ordered-map @da timebox) gth)
|
2020-11-24 05:20:44 +03:00
|
|
|
::
|
|
|
|
+$ notifications
|
|
|
|
((mop @da timebox) gth)
|
|
|
|
::
|
|
|
|
+$ timebox
|
|
|
|
(map index notification)
|
|
|
|
::
|
|
|
|
+$ index
|
|
|
|
$% [%graph group=resource graph=resource module=@t description=@t]
|
|
|
|
[%group group=resource description=@t]
|
|
|
|
[%chat chat=path mention=?]
|
|
|
|
==
|
2020-12-10 08:19:46 +03:00
|
|
|
::
|
|
|
|
+$ contents
|
|
|
|
$% [%graph =(list post:post)]
|
|
|
|
[%group =(list group-contents)]
|
|
|
|
[%chat =(list envelope:chat-store)]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ notification
|
|
|
|
[date=@da read=? =contents]
|
2020-11-24 05:20:44 +03:00
|
|
|
--
|
|
|
|
::
|
2020-10-21 08:54:59 +03:00
|
|
|
+$ index
|
2020-11-24 05:20:44 +03:00
|
|
|
$% $: %graph
|
|
|
|
group=resource
|
|
|
|
graph=resource
|
|
|
|
module=@t
|
|
|
|
description=@t
|
|
|
|
=index:graph-store
|
|
|
|
==
|
2020-10-21 08:54:59 +03:00
|
|
|
[%group group=resource description=@t]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ group-contents
|
|
|
|
$~ [%add-members *resource ~]
|
|
|
|
$% $>(?(%add-members %remove-members) update:group-store)
|
|
|
|
metadata-action:metadata-store
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ notification
|
|
|
|
[date=@da read=? =contents]
|
|
|
|
::
|
|
|
|
+$ contents
|
2020-10-27 08:04:39 +03:00
|
|
|
$% [%graph =(list post:post)]
|
2020-10-21 08:54:59 +03:00
|
|
|
[%group =(list group-contents)]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ timebox
|
|
|
|
(map index notification)
|
|
|
|
::
|
|
|
|
+$ notifications
|
2020-11-16 06:52:45 +03:00
|
|
|
((mop @da timebox) gth)
|
2020-10-21 08:54:59 +03:00
|
|
|
::
|
|
|
|
+$ action
|
2020-11-24 05:20:44 +03:00
|
|
|
$% [%add-note =index =notification]
|
2020-10-21 08:54:59 +03:00
|
|
|
[%archive time=@da index]
|
2020-11-24 05:20:44 +03:00
|
|
|
::
|
2020-12-01 08:46:28 +03:00
|
|
|
[%unread-count =index =time]
|
|
|
|
[%read-count =index]
|
2020-11-24 05:20:44 +03:00
|
|
|
::
|
|
|
|
[%unread-each =index ref=index:graph-store time=@da]
|
|
|
|
[%read-each index ref=index:graph-store]
|
|
|
|
::
|
|
|
|
[%read-note time=@da index]
|
|
|
|
[%unread-note time=@da index]
|
2020-12-14 06:33:31 +03:00
|
|
|
::
|
|
|
|
[%seen-index time=@da =index]
|
2020-11-24 05:20:44 +03:00
|
|
|
::
|
|
|
|
[%read-all ~]
|
2020-10-27 08:04:39 +03:00
|
|
|
[%set-dnd dnd=?]
|
2020-10-21 08:54:59 +03:00
|
|
|
[%seen ~]
|
|
|
|
==
|
2020-10-27 08:04:39 +03:00
|
|
|
::
|
2020-11-24 05:20:44 +03:00
|
|
|
+$ indexed-notification
|
2020-10-27 08:04:39 +03:00
|
|
|
[index notification]
|
2020-11-24 05:20:44 +03:00
|
|
|
::
|
|
|
|
+$ index-stats
|
|
|
|
[notifications=@ud =unreads last-seen=@da]
|
|
|
|
::
|
|
|
|
+$ unreads
|
2020-12-01 08:46:28 +03:00
|
|
|
$% [%count num=@ud]
|
2020-11-24 05:20:44 +03:00
|
|
|
[%each indices=(set index:graph-store)]
|
|
|
|
==
|
2020-10-21 08:54:59 +03:00
|
|
|
::
|
|
|
|
+$ update
|
|
|
|
$% action
|
2020-11-16 05:22:42 +03:00
|
|
|
[%more more=(list update)]
|
2020-10-28 08:52:59 +03:00
|
|
|
[%added time=@da =index =notification]
|
2020-10-27 08:04:39 +03:00
|
|
|
[%timebox time=@da archived=? =(list [index notification])]
|
|
|
|
[%count count=@ud]
|
2020-11-24 05:20:44 +03:00
|
|
|
[%unreads unreads=(list [index index-stats])]
|
2020-10-21 08:54:59 +03:00
|
|
|
==
|
|
|
|
--
|