|
|
|
syntax = "proto3";
|
|
|
|
import "google/protobuf/struct.proto";
|
|
|
|
option go_package = "whiteboxsystems.nl/okapi";
|
|
|
|
|
|
|
|
// ConfigureCallback
|
|
|
|
|
|
|
|
message ProtocolAuthConfiguration {
|
|
|
|
string method = 1;
|
|
|
|
google.protobuf.Struct configuration = 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 CallbackConfiguration {
|
|
|
|
string protocol = 1;
|
|
|
|
google.protobuf.Struct configuration = 2;
|
|
|
|
ProtocolAuthConfiguration auth = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ConfigureCallbackRequest {
|
|
|
|
string serviceId = 1;
|
|
|
|
bool enabled = 2;
|
|
|
|
CallbackConfiguration fetch = 3;
|
|
|
|
CallbackConfiguration push = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ConfigureCallbackResponse {
|
|
|
|
string serviceId = 1;
|
|
|
|
bool enabled = 2;
|
|
|
|
CallbackConfiguration fetch = 3;
|
|
|
|
CallbackConfiguration push = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ListServices
|
|
|
|
|
|
|
|
message ServiceConfiguration {
|
|
|
|
string serviceId = 1;
|
|
|
|
bool enabled = 2;
|
|
|
|
CallbackConfiguration fetch = 3;
|
|
|
|
CallbackConfiguration push = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListServicesRequest {}
|
|
|
|
|
|
|
|
message ListServicesResponse {
|
|
|
|
repeated ServiceDefinition availableServices = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListServiceConfigurationsRequest {}
|
|
|
|
|
|
|
|
message ListServiceConfigurationsResponse {
|
|
|
|
repeated ServiceConfiguration configurations = 2;
|
|
|
|
}
|