type Replacement = record { expected: list; targets: list>; }; external atom Node id "collection:node"; interface NodeData id "collection:data" revision "collection:data@1" { queryable portable value version id "collection:version" : list { get id "collection:version:get" execution snapshot; } operation replace id "collection:replace" : Replacement -> unit { call id "collection:replace:call" execution transaction; } operation ensure id "collection:ensure" : unit -> atom-ref { call id "collection:ensure:call" execution transaction; } queryable value label id "collection:label" : string { get id "collection:label:get" execution snapshot; set id "collection:label:set" execution transaction; } queryable relation items id "collection:items" : many atom Node { resolve id "collection:items:resolve" execution snapshot; } queryable relation containers id "collection:containers" : many atom Node { resolve id "collection:containers:resolve" execution snapshot; } queryable relation detail id "collection:detail" : optional-one atom Node { resolve id "collection:detail:resolve" execution snapshot; } }