|
|
|
@ -2,18 +2,12 @@ syntax = "proto3"; |
|
|
|
|
import "google/protobuf/struct.proto"; |
|
|
|
|
option go_package = "whiteboxsystems.nl/okapi"; |
|
|
|
|
|
|
|
|
|
// idea: |
|
|
|
|
// query: |
|
|
|
|
// /:type[/:subtype+]/:service/:patient with wildcard |
|
|
|
|
|
|
|
|
|
// Should events payloads be documented by for example json schema? |
|
|
|
|
message Event { |
|
|
|
|
uint64 timestamp = 1; |
|
|
|
|
string type = 2; |
|
|
|
|
string serviceId = 3; |
|
|
|
|
string patientId = 4; |
|
|
|
|
google.protobuf.Struct payload = 5; |
|
|
|
|
// string schema = 6; // ? do we need a schema in the event itself |
|
|
|
|
} |
|
|
|
|
message Query { |
|
|
|
|
uint64 start = 1; |
|
|
|
@ -37,29 +31,4 @@ message GetEventsResponse { |
|
|
|
|
|
|
|
|
|
message GetEventsStreamRequest { |
|
|
|
|
repeated Query query = 2; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// enum EventCallbackMethod { |
|
|
|
|
// none = 0; |
|
|
|
|
// webhook = 1; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// message EventCallback { |
|
|
|
|
// string id = 1; // who fills this |
|
|
|
|
// bool active = 2; |
|
|
|
|
// EventCallbackMethod method = 3; |
|
|
|
|
// repeated Query query = 4; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// message RegisterEventCallbackRequest { |
|
|
|
|
// repeated EventCallback callbacks = 1; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// message RegisterEventCallbackResponse {} |
|
|
|
|
|
|
|
|
|
// message ListEventCallbacksRequest { |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// message ListEventCallbacksResponse { |
|
|
|
|
// repeated EventCallback callbacks = 1; |
|
|
|
|
// } |
|
|
|
|
} |