You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.4 KiB
65 lines
1.4 KiB
syntax = "proto3";
|
|
import "google/protobuf/struct.proto";
|
|
option go_package = "src.whiteboxsystems.nl/decozo/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;
|
|
uint64 end = 2;
|
|
string type = 3;
|
|
string serviceId = 4;
|
|
string patientId = 5;
|
|
}
|
|
|
|
message GetEventsRequest {
|
|
int32 page = 2;
|
|
int32 perPage = 3;
|
|
repeated Query query = 4;
|
|
}
|
|
|
|
message GetEventsResponse {
|
|
int32 page = 2;
|
|
int32 perPage = 3;
|
|
repeated Event events = 4;
|
|
}
|
|
|
|
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;
|
|
// } |