Compare commits

...

2 Commits

Author SHA1 Message Date
Bas Kloosterman 3a080d84a0 Prepare for v0.0.2 2 years ago
Bas Kloosterman 63ab85bdc3 Split ListServices method up into ListServices and ListServiceConfigurations 2 years ago
  1. 33
      okapi-events.proto
  2. 2
      okapi-patient-registration.proto
  3. 10
      okapi-service-config.proto
  4. 3
      okapi.proto

@ -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;
// }
}

@ -12,7 +12,7 @@ message PatientRegistrationData {
PatientMeta subject = 1;
bool registered = 2;
string id = 3;
google.protobuf.Struct callbackProtocolMeta = 4;
google.protobuf.Struct callbackProtocolData = 4;
}
message PatientMeta {

@ -65,10 +65,14 @@ message ServiceConfiguration {
CallbackConfiguration push = 4;
}
message ListServicesRequest {
}
message ListServicesRequest {}
message ListServicesResponse {
repeated ServiceDefinition availableServices = 1;
}
message ListServiceConfigurationsRequest {}
message ListServiceConfigurationsResponse {
repeated ServiceConfiguration configurations = 2;
}
}

@ -14,6 +14,7 @@ service OkAPI {
// Configuration
rpc ConfigureCallback (ConfigureCallbackRequest) returns (ConfigureCallbackResponse) {}
rpc ListServices (ListServicesRequest) returns (ListServicesResponse) {}
rpc ListServiceConfigurations (ListServiceConfigurationsRequest) returns (ListServiceConfigurationsResponse) {}
rpc UpdatePatientRegistration (UpdatePatientRegistrationRequest) returns (UpdatePatientRegistrationResponse) {}
rpc ListPatientRegistration (ListPatientRegistrationRequest) returns (ListPatientRegistrationResponse) {}
@ -21,7 +22,5 @@ service OkAPI {
// Events
rpc GetEvents (GetEventsRequest) returns (GetEventsResponse) {}
rpc GetEventsStream (GetEventsStreamRequest) returns (stream Event) {}
// rpc RegisterEventCallback (RegisterEventCallbackRequest) returns (RegisterEventCallbackResponse) {}
// rpc ListEventCallbacks (ListEventCallbacksRequest) returns (ListEventCallbacksResponse) {}
}

Loading…
Cancel
Save