interface contacts { enum capability { read-name-only, read, add, remove, } variant request { /// lazy-load-blob: none. get-names, // requires read-names-only /// lazy-load-blob: none. get-all-contacts, // requires read /// lazy-load-blob: none. get-contact(string), // requires read /// lazy-load-blob: none. add-contact(string), // requires add /// tuple /// /// lazy-load-blob: none. add-field(tuple), // requires add /// lazy-load-blob: none. remove-contact(string), // requires remove /// tuple /// /// lazy-load-blob: none. remove-field(tuple), // requires remove } variant response { /// lazy-load-blob: none. get-names(list), /// lazy-load-blob: required; JSON all-contacts dict in blob. get-all-contacts, /// lazy-load-blob: required; JSON contact dict in blob. get-contact, /// lazy-load-blob: none. add-contact, /// lazy-load-blob: none. add-field, /// lazy-load-blob: none. remove-contact, /// lazy-load-blob: none. remove-field, /// any failed request will receive this response /// /// lazy-load-blob: none. err(string), } } world contacts-sys-v0 { import contacts; include process-v1; }