Initial commit
This commit is contained in:
commit
8d815e6785
1 changed files with 189 additions and 0 deletions
189
okap.proto
Normal file
189
okap.proto
Normal file
|
@ -0,0 +1,189 @@
|
|||
syntax = "proto3";
|
||||
option go_package = "whiteboxsystems.nl/okap";
|
||||
|
||||
service OKAP {
|
||||
// Onboarding
|
||||
rpc GetMetadata (GetMetadataRequest) returns (GetMetadataResponse) {}
|
||||
rpc Register (RegisterRequest) returns (RegisterResponse) {}
|
||||
rpc CompleteRegistration (CompleteRegistrationRequest) returns (CompleteRegistrationResponse) {}
|
||||
|
||||
// Configuration
|
||||
rpc ConfigureCallback (ConfigureCallbackRequest) returns (ConfigureCallbackResponse) {}
|
||||
rpc ListServices (ListServicesRequest) returns (ListServicesResponse) {}
|
||||
|
||||
rpc UpdatePatientRegistration (UpdatePatientRegistrationRequest) returns (UpdatePatientRegistrationResponse) {}
|
||||
rpc ListPatientRegistration (ListPatientRegistrationRequest) returns (ListPatientRegistrationResponse) {}
|
||||
}
|
||||
|
||||
enum XISAuthMethod {
|
||||
mTLS = 0;
|
||||
BearerToken = 1;
|
||||
}
|
||||
|
||||
message MTLSConfigurationParams {
|
||||
string publicKey = 1;
|
||||
}
|
||||
|
||||
message BearerTokenConfigurationParams {
|
||||
string token = 1;
|
||||
}
|
||||
|
||||
message XISAuthConfiguration {
|
||||
XISAuthMethod method = 1;
|
||||
oneof config {
|
||||
MTLSConfigurationParams mtlsConfig = 2;
|
||||
BearerTokenConfigurationParams apiTokenConfig = 3;
|
||||
}
|
||||
}
|
||||
|
||||
message ProtocolAuthConfiguration {
|
||||
string method = 1;
|
||||
map<string, string> configuration = 2;
|
||||
}
|
||||
|
||||
// Errors is meta met bovenliggende GRPC error INVALID_ARGUMENT err
|
||||
// Enum met door ons gedefinieerde codes
|
||||
|
||||
// enum ErrorCode {
|
||||
//
|
||||
//}
|
||||
|
||||
// message Error {
|
||||
// ErrorCode code = 1;
|
||||
// string message = 2;
|
||||
// }
|
||||
|
||||
enum SubscriptionPolicy {
|
||||
subnone = 0;
|
||||
optin = 1;
|
||||
optout = 2;
|
||||
}
|
||||
|
||||
enum ConsentPolicy {
|
||||
consentnone = 0;
|
||||
explicit = 1;
|
||||
presumed = 2;
|
||||
}
|
||||
|
||||
message ProtocolDefinition {
|
||||
string protocol = 1;
|
||||
repeated string authMethods = 2;
|
||||
}
|
||||
|
||||
message ServiceDefinition {
|
||||
string id = 1;
|
||||
string name = 2;
|
||||
string description = 3;
|
||||
SubscriptionPolicy subscriptionPolicy = 4;
|
||||
ConsentPolicy consentPolicy = 5;
|
||||
repeated ProtocolDefinition fetchProtocols = 6;
|
||||
repeated ProtocolDefinition pushProtocols = 7;
|
||||
}
|
||||
|
||||
message GetMetadataRequest {}
|
||||
|
||||
message GetMetadataResponse {
|
||||
string supplierFormalName = 1;
|
||||
string supplierDisplayName = 2;
|
||||
string productName = 3;
|
||||
string version = 4;
|
||||
}
|
||||
|
||||
message RegisterRequest {
|
||||
string organisationFormalName = 1;
|
||||
string organisationDisplayName = 2;
|
||||
string organisationIdentifier = 3;
|
||||
string organisationIdentifierType = 4; // Type bijv. AGB, BIG registratie of KvK
|
||||
XISAuthConfiguration auth = 5;
|
||||
}
|
||||
|
||||
message RegisterResponse {
|
||||
string reference = 1;
|
||||
}
|
||||
|
||||
message CompleteRegistrationRequest {
|
||||
string reference = 1;
|
||||
string registrationToken = 2;
|
||||
}
|
||||
|
||||
message CompleteRegistrationResponse {}
|
||||
|
||||
message CallbackConfig {
|
||||
string protocol = 1;
|
||||
map<string,string> config = 2;
|
||||
ProtocolAuthConfiguration auth = 3;
|
||||
}
|
||||
|
||||
message ConfigureCallbackRequest {
|
||||
string service = 1;
|
||||
bool enabled = 2;
|
||||
CallbackConfig fetch = 3;
|
||||
CallbackConfig push = 4;
|
||||
}
|
||||
|
||||
message ConfigureCallbackResponse {
|
||||
string service = 1;
|
||||
bool enabled = 2;
|
||||
CallbackConfig fetch = 3;
|
||||
CallbackConfig push = 4;
|
||||
}
|
||||
|
||||
message ListServicesRequest {
|
||||
}
|
||||
|
||||
message ServiceConfiguration {
|
||||
string service = 1;
|
||||
bool enabled = 2;
|
||||
CallbackConfig fetch = 3;
|
||||
CallbackConfig push = 4;
|
||||
}
|
||||
|
||||
message ListServicesResponse {
|
||||
repeated ServiceDefinition availableServices = 1;
|
||||
repeated ServiceConfiguration configurations = 2;
|
||||
}
|
||||
|
||||
message PatientMeta {
|
||||
string identifier = 1;
|
||||
string identifierType = 2;
|
||||
string firstname = 3;
|
||||
string surname = 4;
|
||||
string birthdate = 5;
|
||||
string street = 6;
|
||||
string streetNumber = 7;
|
||||
string streetNumberExtension = 8;
|
||||
string postalCode = 9;
|
||||
string city = 10;
|
||||
string country = 11;
|
||||
map<string, string> extra = 12;
|
||||
}
|
||||
|
||||
message PatientRegistrationData {
|
||||
PatientMeta subject = 1;
|
||||
bool registered = 2;
|
||||
map<string, string> callbackProtocolMeta = 3;
|
||||
}
|
||||
|
||||
message PatientRegistrationError {
|
||||
int32 index = 1;
|
||||
int32 code = 2;
|
||||
string message = 3;
|
||||
}
|
||||
|
||||
message UpdatePatientRegistrationRequest {
|
||||
string serviceId = 1;
|
||||
repeated PatientRegistrationData PatientRegistrationData = 2;
|
||||
bool atomicUpdate = 3;
|
||||
}
|
||||
|
||||
message UpdatePatientRegistrationResponse {
|
||||
repeated PatientRegistrationError errors = 2;
|
||||
}
|
||||
|
||||
message ListPatientRegistrationRequest {
|
||||
string serviceId = 1;
|
||||
}
|
||||
|
||||
message ListPatientRegistrationResponse {
|
||||
repeated PatientRegistrationData PatientRegistrationData = 2;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue