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
|
|
|
::
|
2021-02-04 04:39:59 +03:00
|
|
|
+$ group-contents
|
|
|
|
$~ [%add-members *resource ~]
|
|
|
|
$% [%add *]
|
|
|
|
[%remove *] :: old metadata actions
|
|
|
|
$>(?(%add-members %remove-members) update:group-store)
|
|
|
|
==
|
|
|
|
::
|
2020-12-10 08:19:46 +03:00
|
|
|
+$ contents
|
2021-03-18 10:02:39 +03:00
|
|
|
$% [%graph =(list post:post-zero:post)]
|
2020-12-10 08:19:46 +03:00
|
|
|
[%group =(list group-contents)]
|
|
|
|
[%chat =(list envelope:chat-store)]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ notification
|
|
|
|
[date=@da read=? =contents]
|
2020-11-24 05:20:44 +03:00
|
|
|
--
|
|
|
|
::
|
2020-12-16 07:22:23 +03:00
|
|
|
++ state-one
|
|
|
|
|%
|
2020-12-16 10:37:10 +03:00
|
|
|
+$ state
|
|
|
|
$: %1
|
|
|
|
unreads-each=(jug index index:graph-store)
|
2020-12-16 07:22:23 +03:00
|
|
|
unreads-count=(map index @ud)
|
|
|
|
last-seen=(map index @da)
|
2021-02-04 04:39:59 +03:00
|
|
|
=notifications:state-two
|
|
|
|
archive=notifications:state-two
|
|
|
|
current-timebox=@da
|
|
|
|
dnd=_|
|
|
|
|
==
|
|
|
|
--
|
|
|
|
++ state-two
|
|
|
|
=< state
|
|
|
|
|%
|
|
|
|
+$ state
|
|
|
|
$: unreads-each=(jug stats-index index:graph-store)
|
|
|
|
unreads-count=(map stats-index @ud)
|
|
|
|
last-seen=(map stats-index @da)
|
2020-12-16 07:22:23 +03:00
|
|
|
=notifications
|
|
|
|
archive=notifications
|
|
|
|
current-timebox=@da
|
|
|
|
dnd=_|
|
|
|
|
==
|
2021-02-04 04:39:59 +03:00
|
|
|
::
|
|
|
|
++ orm
|
|
|
|
((ordered-map @da timebox) gth)
|
|
|
|
::
|
|
|
|
+$ notification
|
|
|
|
[date=@da read=? =contents]
|
|
|
|
::
|
|
|
|
+$ contents
|
2021-03-18 10:02:39 +03:00
|
|
|
$% [%graph =(list post:post-zero:post)]
|
2021-02-04 04:39:59 +03:00
|
|
|
[%group =(list group-contents)]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ group-contents
|
|
|
|
group-contents:state-zero
|
|
|
|
::
|
|
|
|
+$ timebox
|
|
|
|
(map index notification)
|
|
|
|
::
|
|
|
|
+$ notifications
|
|
|
|
((mop @da timebox) gth)
|
|
|
|
::
|
2020-12-16 07:22:23 +03:00
|
|
|
--
|
|
|
|
::
|
2021-03-18 10:02:39 +03:00
|
|
|
++ state-three
|
|
|
|
=< state
|
|
|
|
|%
|
|
|
|
+$ state
|
|
|
|
$: unreads-each=(jug stats-index index:graph-store)
|
|
|
|
unreads-count=(map stats-index @ud)
|
|
|
|
last-seen=(map stats-index @da)
|
|
|
|
=notifications
|
|
|
|
archive=notifications
|
|
|
|
current-timebox=@da
|
|
|
|
dnd=_|
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ orm
|
|
|
|
((ordered-map @da timebox) gth)
|
|
|
|
::
|
|
|
|
+$ notification
|
|
|
|
[date=@da read=? =contents]
|
|
|
|
::
|
|
|
|
+$ contents
|
|
|
|
$% [%graph =(list post:post-zero:post)]
|
|
|
|
[%group =(list group-contents)]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
+$ timebox
|
|
|
|
(map index notification)
|
|
|
|
::
|
|
|
|
+$ notifications
|
|
|
|
((mop @da timebox) gth)
|
|
|
|
::
|
|
|
|
--
|
|
|
|
::
|
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 ~]
|
2021-01-12 07:26:19 +03:00
|
|
|
$>(?(%add-members %remove-members) update:group-store)
|
2020-10-21 08:54:59 +03:00
|
|
|
::
|
|
|
|
+$ 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-16 07:22:23 +03:00
|
|
|
[%unread-count =stats-index =time]
|
|
|
|
[%read-count =stats-index]
|
|
|
|
::
|
2020-11-24 05:20:44 +03:00
|
|
|
::
|
2020-12-16 07:22:23 +03:00
|
|
|
[%unread-each =stats-index ref=index:graph-store time=@da]
|
|
|
|
[%read-each =stats-index ref=index:graph-store]
|
2020-11-24 05:20:44 +03:00
|
|
|
::
|
|
|
|
[%read-note time=@da index]
|
|
|
|
[%unread-note time=@da index]
|
2020-12-14 06:33:31 +03:00
|
|
|
::
|
2020-12-16 07:22:23 +03:00
|
|
|
[%seen-index time=@da =stats-index]
|
2020-12-17 09:10:26 +03:00
|
|
|
[%remove-graph =resource]
|
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-12-16 07:22:23 +03:00
|
|
|
++ stats-index
|
|
|
|
$% [%graph graph=resource =index:graph-store]
|
|
|
|
[%group group=resource]
|
|
|
|
==
|
|
|
|
::
|
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
|
|
|
::
|
2020-12-16 07:22:23 +03:00
|
|
|
+$ stats
|
2021-03-19 04:28:30 +03:00
|
|
|
[notifications=(set [time index]) =unreads last-seen=@da]
|
2020-11-24 05:20:44 +03:00
|
|
|
::
|
|
|
|
+$ 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-12-17 09:10:26 +03:00
|
|
|
[%clear =stats-index]
|
2020-12-16 07:22:23 +03:00
|
|
|
[%unreads unreads=(list [stats-index stats])]
|
2020-10-21 08:54:59 +03:00
|
|
|
==
|
|
|
|
--
|