diff options
author | rtkay123 <dev@kanjala.com> | 2025-08-16 09:30:27 +0200 |
---|---|---|
committer | rtkay123 <dev@kanjala.com> | 2025-08-16 09:30:27 +0200 |
commit | 698633baa2505ffb60cb5bba588f8b360c767edd (patch) | |
tree | 8c0a93c3ca69f83189c0a57503581d4cdd31b097 /proto | |
parent | 000885c1d5a23eb353c3f490e32363010ca804d3 (diff) | |
download | warden-698633baa2505ffb60cb5bba588f8b360c767edd.tar.bz2 warden-698633baa2505ffb60cb5bba588f8b360c767edd.zip |
build(config): typologies
Diffstat (limited to 'proto')
-rw-r--r-- | proto/configuration/typology.proto | 73 | ||||
-rw-r--r-- | proto/warden_message.proto | 24 |
2 files changed, 97 insertions, 0 deletions
diff --git a/proto/configuration/typology.proto b/proto/configuration/typology.proto new file mode 100644 index 0000000..bae4630 --- /dev/null +++ b/proto/configuration/typology.proto @@ -0,0 +1,73 @@ +syntax = "proto3"; + +package configuration.typology; + +message Workflow { + double alert_threshold = 1; + optional double interdiction_threshold = 2; +} + +message TypologyRuleWeight { + string ref = 1; + double wght = 2; +} + +message TypologyRule { + string id = 1; + string version = 2; + repeated TypologyRuleWeight wghts = 3; +} + +message TypologyConfiguration { + string id = 1; + string description = 2; + string version = 3; + Workflow workflow = 4; + repeated TypologyRule rules = 5; + Expression expression = 6; +} + +enum Operator { + ADD = 0; + MULTIPLY = 1; + SUBTRACT = 2; + DIVIDE = 3; +} + +message Term { + string id = 1; + string version = 2; +} + +message Expression { + Operator operator = 1; + repeated Term terms = 2; +} + +message TypologyConfigurationRequest { + string id = 1; + string version = 2; +} + +message DeleteTypologyConfigurationRequest { + string id = 1; + string version = 2; +} + +message GetTypologyConfigResponse { + optional TypologyConfiguration configuration = 1; +} + +message UpdateTypologyConfigRequest { + TypologyConfiguration configuration = 1; +} + +service QueryTypologies { + rpc GetTypologyConfiguration (TypologyConfigurationRequest) returns (GetTypologyConfigResponse); +} + +service MutateTypologies { + rpc CreateTypologyConfiguration (TypologyConfiguration) returns (TypologyConfiguration); + rpc UpdateTypologyConfiguration (UpdateTypologyConfigRequest) returns (TypologyConfiguration); + rpc DeleteTypologyConfiguration (DeleteTypologyConfigurationRequest) returns (TypologyConfiguration); +} diff --git a/proto/warden_message.proto b/proto/warden_message.proto index 706139c..937d5ae 100644 --- a/proto/warden_message.proto +++ b/proto/warden_message.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package message; import "configuration/routing.proto"; +import "configuration/typology.proto"; import "google/protobuf/timestamp.proto"; import "proto/iso20022/pacs_002_001_12.proto"; import "proto/iso20022/pacs_008_001_12.proto"; @@ -15,8 +16,31 @@ message Payload { DataCache data_cache = 3; string tx_tp = 4; configuration.routing.RoutingConfiguration routing = 5; + RuleResult rule_result = 6; + TypologyResult typology_result = 7; } +message RuleResult { + string id = 1; + string version = 2; + string sub_rule_ref = 3; + string reason = 4; + string desc = 5; + double wght = 6; +} + +message TypologyResult { + string id = 1; + string version = 2; + string desc = 3; + double result = 4; + double threshold = 5; + repeated RuleResult rule_results = 6; + bool review = 7; + configuration.typology.Workflow workflow = 8; +} + + message DataCache { string cdtr_id = 1; string dbtr_id = 2; |