shrub/pkg/arvo/sur/hark-store.hoon

109 lines
2.2 KiB
Plaintext
Raw Normal View History

/- chat-store, graph-store, post, *resource, group-store, metadata-store
2020-10-21 08:54:59 +03:00
^?
|%
++ state-zero
|%
+$ state
$: %0
notifications=notifications
archive=notifications
current-timebox=@da
dnd=_|
==
++ orm
((ordered-map @da timebox) gth)
::
+$ 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=?]
==
::
+$ contents
$% [%graph =(list post:post)]
[%group =(list group-contents)]
[%chat =(list envelope:chat-store)]
==
::
+$ notification
[date=@da read=? =contents]
--
::
2020-10-21 08:54:59 +03:00
+$ index
$% $: %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
$% [%add-note =index =notification]
2020-10-21 08:54:59 +03:00
[%archive time=@da index]
::
2020-12-01 08:46:28 +03:00
[%unread-count =index =time]
[%read-count =index]
::
[%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]
::
[%seen-index time=@da =index]
::
[%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
::
+$ indexed-notification
2020-10-27 08:04:39 +03:00
[index notification]
::
+$ index-stats
[notifications=@ud =unreads last-seen=@da]
::
+$ unreads
2020-12-01 08:46:28 +03:00
$% [%count num=@ud]
[%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]
[%unreads unreads=(list [index index-stats])]
2020-10-21 08:54:59 +03:00
==
--