2021-01-08 01:49:24 +03:00
|
|
|
/- sur=contact-store
|
2021-01-12 00:09:41 +03:00
|
|
|
/+ res=resource
|
2021-01-08 01:49:24 +03:00
|
|
|
=< [sur .]
|
|
|
|
=, sur
|
|
|
|
|%
|
|
|
|
++ nu :: parse number as hex
|
|
|
|
|= jon=json
|
|
|
|
?> ?=([%s *] jon)
|
|
|
|
(rash p.jon hex)
|
|
|
|
::
|
|
|
|
++ enjs
|
|
|
|
=, enjs:format
|
|
|
|
|%
|
|
|
|
++ update
|
|
|
|
|= upd=^update
|
|
|
|
^- json
|
2021-01-11 22:39:36 +03:00
|
|
|
%+ frond %contact-update
|
|
|
|
%- pairs
|
|
|
|
:_ ~
|
|
|
|
^- [cord json]
|
|
|
|
?- -.upd
|
|
|
|
%initial
|
2021-01-28 23:45:28 +03:00
|
|
|
:- %initial
|
|
|
|
%- pairs
|
|
|
|
:~ [%rolodex (rolo rolodex.upd)]
|
|
|
|
[%is-public b+is-public.upd]
|
|
|
|
==
|
2021-01-08 01:49:24 +03:00
|
|
|
::
|
2021-01-11 22:39:36 +03:00
|
|
|
%add
|
|
|
|
:- %add
|
|
|
|
%- pairs
|
|
|
|
:~ [%ship (ship ship.upd)]
|
|
|
|
[%contact (cont contact.upd)]
|
2021-01-08 01:49:24 +03:00
|
|
|
==
|
2021-01-11 22:39:36 +03:00
|
|
|
::
|
|
|
|
%remove
|
|
|
|
:- %remove
|
|
|
|
(pairs [%ship (ship ship.upd)]~)
|
|
|
|
::
|
|
|
|
%edit
|
|
|
|
:- %edit
|
|
|
|
%- pairs
|
|
|
|
:~ [%ship (ship ship.upd)]
|
|
|
|
[%edit-field (edit edit-field.upd)]
|
|
|
|
==
|
2021-01-12 00:09:41 +03:00
|
|
|
::
|
|
|
|
%allow
|
|
|
|
:- %allow
|
|
|
|
(pairs [%beings (beng beings.upd)]~)
|
|
|
|
::
|
|
|
|
%disallow
|
|
|
|
:- %disallow
|
|
|
|
(pairs [%beings (beng beings.upd)]~)
|
2021-01-28 02:20:42 +03:00
|
|
|
::
|
|
|
|
%set-public
|
|
|
|
[%set-public b+public.upd]
|
2021-01-11 22:39:36 +03:00
|
|
|
==
|
2021-01-08 01:49:24 +03:00
|
|
|
::
|
2021-01-11 22:39:36 +03:00
|
|
|
++ rolo
|
|
|
|
|= =rolodex
|
2021-01-08 01:49:24 +03:00
|
|
|
^- json
|
2021-01-11 22:39:36 +03:00
|
|
|
%- pairs
|
|
|
|
%+ turn ~(tap by rolodex)
|
|
|
|
|= [=^ship =contact]
|
2021-01-08 01:49:24 +03:00
|
|
|
^- [cord json]
|
2021-01-11 22:39:36 +03:00
|
|
|
[(scot %p ship) (cont contact)]
|
2021-01-08 01:49:24 +03:00
|
|
|
::
|
2021-01-11 22:39:36 +03:00
|
|
|
++ cont
|
|
|
|
|= =contact
|
2021-01-08 01:49:24 +03:00
|
|
|
^- json
|
2021-01-11 22:39:36 +03:00
|
|
|
%- pairs
|
|
|
|
:~ [%nickname s+nickname.contact]
|
2021-01-21 20:36:48 +03:00
|
|
|
[%bio s+bio.contact]
|
|
|
|
[%status s+status.contact]
|
2021-01-11 22:39:36 +03:00
|
|
|
[%color s+(scot %ux color.contact)]
|
|
|
|
[%avatar ?~(avatar.contact ~ s+u.avatar.contact)]
|
2021-01-21 20:36:48 +03:00
|
|
|
[%cover ?~(cover.contact ~ s+u.cover.contact)]
|
2021-01-27 00:22:33 +03:00
|
|
|
[%groups a+(turn ~(tap in groups.contact) |=(r=resource (enjs:res r)))]
|
2021-01-21 20:36:48 +03:00
|
|
|
[%last-updated (time last-updated.contact)]
|
2021-01-08 01:49:24 +03:00
|
|
|
==
|
|
|
|
::
|
2021-01-11 22:39:36 +03:00
|
|
|
++ edit
|
|
|
|
|= field=edit-field
|
2021-01-08 01:49:24 +03:00
|
|
|
^- json
|
2021-01-11 22:39:36 +03:00
|
|
|
%+ frond -.field
|
|
|
|
?- -.field
|
2021-01-27 00:22:33 +03:00
|
|
|
%nickname s+nickname.field
|
|
|
|
%bio s+bio.field
|
|
|
|
%status s+status.field
|
|
|
|
%color s+(scot %ux color.field)
|
|
|
|
%avatar ?~(avatar.field ~ s+u.avatar.field)
|
|
|
|
%cover ?~(cover.field ~ s+u.cover.field)
|
|
|
|
%add-group (enjs:res resource.field)
|
|
|
|
%remove-group (enjs:res resource.field)
|
2021-01-08 01:49:24 +03:00
|
|
|
==
|
2021-01-12 00:09:41 +03:00
|
|
|
::
|
|
|
|
++ beng
|
|
|
|
|= =beings
|
|
|
|
^- json
|
|
|
|
?- -.beings
|
|
|
|
%ships [%a (turn ~(tap in ships.beings) |=(s=^ship s+(scot %p s)))]
|
|
|
|
%group (enjs:res resource.beings)
|
|
|
|
==
|
2021-01-08 01:49:24 +03:00
|
|
|
--
|
|
|
|
::
|
2021-01-12 00:09:41 +03:00
|
|
|
++ dejs
|
2021-01-11 22:39:36 +03:00
|
|
|
=, dejs:format
|
2021-01-08 01:49:24 +03:00
|
|
|
|%
|
|
|
|
++ update
|
|
|
|
|= jon=json
|
|
|
|
^- ^update
|
|
|
|
=< (decode jon)
|
|
|
|
|%
|
|
|
|
++ decode
|
|
|
|
%- of
|
|
|
|
:~ [%initial initial]
|
|
|
|
[%add add-contact]
|
|
|
|
[%remove remove-contact]
|
|
|
|
[%edit edit-contact]
|
2021-01-12 00:09:41 +03:00
|
|
|
[%allow beings]
|
|
|
|
[%disallow beings]
|
2021-01-28 02:20:42 +03:00
|
|
|
[%set-public bo]
|
2021-01-08 01:49:24 +03:00
|
|
|
==
|
|
|
|
::
|
2021-01-28 23:45:28 +03:00
|
|
|
++ initial
|
|
|
|
%- ot
|
|
|
|
:~ [%rolodex (op ;~(pfix sig fed:ag) cont)]
|
|
|
|
[%is-public bo]
|
|
|
|
==
|
2021-01-11 22:39:36 +03:00
|
|
|
::
|
|
|
|
++ add-contact
|
|
|
|
%- ot
|
|
|
|
:~ [%ship (su ;~(pfix sig fed:ag))]
|
|
|
|
[%contact cont]
|
|
|
|
==
|
|
|
|
::
|
|
|
|
++ remove-contact (ot [%ship (su ;~(pfix sig fed:ag))]~)
|
|
|
|
::
|
|
|
|
++ edit-contact
|
|
|
|
%- ot
|
|
|
|
:~ [%ship (su ;~(pfix sig fed:ag))]
|
|
|
|
[%edit-field edit]
|
|
|
|
==
|
|
|
|
::
|
2021-01-12 00:09:41 +03:00
|
|
|
++ beings
|
|
|
|
%- of
|
|
|
|
:~ [%ships (as (su ;~(pfix sig fed:ag)))]
|
|
|
|
[%group dejs:res]
|
|
|
|
==
|
|
|
|
::
|
2021-01-08 01:49:24 +03:00
|
|
|
++ cont
|
|
|
|
%- ot
|
|
|
|
:~ [%nickname so]
|
2021-01-21 20:36:48 +03:00
|
|
|
[%bio so]
|
|
|
|
[%status so]
|
2021-01-08 01:49:24 +03:00
|
|
|
[%color nu]
|
|
|
|
[%avatar (mu so)]
|
2021-01-21 20:36:48 +03:00
|
|
|
[%cover (mu so)]
|
2021-01-27 00:22:33 +03:00
|
|
|
[%groups (as dejs:res)]
|
2021-01-21 20:36:48 +03:00
|
|
|
[%last-updated di]
|
2021-01-08 01:49:24 +03:00
|
|
|
==
|
|
|
|
::
|
2021-01-11 22:39:36 +03:00
|
|
|
++ edit
|
2021-01-08 01:49:24 +03:00
|
|
|
%- of
|
|
|
|
:~ [%nickname so]
|
2021-01-21 20:36:48 +03:00
|
|
|
[%bio so]
|
|
|
|
[%status so]
|
2021-01-08 01:49:24 +03:00
|
|
|
[%color nu]
|
|
|
|
[%avatar (mu so)]
|
2021-01-21 20:36:48 +03:00
|
|
|
[%cover (mu so)]
|
2021-01-27 00:22:33 +03:00
|
|
|
[%add-group dejs:res]
|
|
|
|
[%remove-group dejs:res]
|
2021-01-08 01:49:24 +03:00
|
|
|
==
|
|
|
|
--
|
|
|
|
--
|
|
|
|
--
|