2021-10-01 20:06:06 +02:00
|
|
|
@0x8c2f829df1930cd5;
|
|
|
|
|
|
|
|
using CSharp = import "programming_language/csharp.capnp";
|
|
|
|
$CSharp.namespace("FabAccessAPI.Schema");
|
|
|
|
|
2022-11-01 11:03:26 +01:00
|
|
|
using import "persistent.capnp".Persistent;
|
2022-10-31 15:19:56 +01:00
|
|
|
using import "notify.capnp".Notifyable;
|
|
|
|
using import "interest.capnp".Interestable;
|
|
|
|
using import "claim.capnp".Claimable;
|
2021-10-01 20:06:06 +02:00
|
|
|
|
2022-10-31 15:19:56 +01:00
|
|
|
using import "utils.capnp".OID;
|
2021-10-02 12:02:38 +02:00
|
|
|
|
2022-10-31 15:19:56 +01:00
|
|
|
interface Resource extends (Persistent) {
|
|
|
|
# BFFH's smallest unit of a physical or abstract "thing". A resource can be
|
|
|
|
# as simple and physical as a table, as complex as a PCB production line or
|
|
|
|
# as abstract as "people with specific know-how are present".
|
2021-10-02 12:02:38 +02:00
|
|
|
|
2022-10-31 15:19:56 +01:00
|
|
|
type @0 () -> ( types :List(OID) );
|
|
|
|
# The 'type' of Resource. Each OID in the list specifies certain behaviours
|
|
|
|
# that this Resource follows.
|
2021-10-02 12:02:38 +02:00
|
|
|
|
2022-10-31 15:19:56 +01:00
|
|
|
notify @1 () -> ( notify :Notifyable );
|
|
|
|
# NULL if the user does not have permission to read this resource, or if
|
|
|
|
# this resource is not notifiable
|
2021-10-02 12:02:38 +02:00
|
|
|
|
2022-10-31 15:19:56 +01:00
|
|
|
interest @2 () -> ( interest :Interestable );
|
|
|
|
# NULL if this resource is not interestable or the user does not have
|
|
|
|
# permission to set interests for this resource.
|
2021-10-02 12:02:38 +02:00
|
|
|
|
2022-10-31 15:19:56 +01:00
|
|
|
claim @3 () -> ( claim :Claimable );
|
|
|
|
# NULL if the user does not have permission to write to this resource, or if
|
|
|
|
# this resource is not (ever!) claimable
|
2021-10-01 20:06:06 +02:00
|
|
|
}
|