syntax = "proto3";
package conflict_service;

service ConflictService {
  rpc CheckConflict (ConflictCheckRequest) returns (ConflictCheckResponse);
  rpc LogResult     (LogResultRequest)     returns (LogResultResponse);
}

message ConflictCheckRequest {
  string tenant_id          = 1;
  string proposed_client_id = 2;
  repeated string party_ids = 3;  // all parties on the new matter
}
message LogResultRequest {
  string tenant_id  = 1;
  string matter_id  = 2;
  bool   conflict   = 3;
  string details    = 4;
}

message ConflictMatch       { string party_id = 1; string matter_id = 2; string relationship = 3; }
message ConflictCheckResponse { bool conflict = 1; repeated ConflictMatch matches = 2; }
message LogResultResponse   { bool success = 1; }
