syntax = "proto3";

package worldmonitor.conflict.v1;

import "sebuf/http/annotations.proto";
import "worldmonitor/conflict/v1/list_acled_events.proto";
import "worldmonitor/conflict/v1/list_ucdp_events.proto";
import "worldmonitor/conflict/v1/get_humanitarian_summary.proto";
import "worldmonitor/conflict/v1/list_iran_events.proto";
import "worldmonitor/conflict/v1/get_humanitarian_summary_batch.proto";

// ConflictService provides APIs for armed conflict data from ACLED, UCDP, and HAPI/HDX.
service ConflictService {
  option (sebuf.http.service_config) = {base_path: "/api/conflict/v1"};

  // ListAcledEvents retrieves armed conflict events from the ACLED dataset.
  rpc ListAcledEvents(ListAcledEventsRequest) returns (ListAcledEventsResponse) {
    option (sebuf.http.config) = {path: "/list-acled-events", method: HTTP_METHOD_GET};
  }

  // ListUcdpEvents retrieves georeferenced violence events from the UCDP dataset.
  rpc ListUcdpEvents(ListUcdpEventsRequest) returns (ListUcdpEventsResponse) {
    option (sebuf.http.config) = {path: "/list-ucdp-events", method: HTTP_METHOD_GET};
  }

  // GetHumanitarianSummary retrieves a humanitarian overview for a country from HAPI/HDX.
  rpc GetHumanitarianSummary(GetHumanitarianSummaryRequest) returns (GetHumanitarianSummaryResponse) {
    option (sebuf.http.config) = {path: "/get-humanitarian-summary", method: HTTP_METHOD_GET};
  }

  // ListIranEvents retrieves scraped conflict events from LiveUAMap Iran.
  rpc ListIranEvents(ListIranEventsRequest) returns (ListIranEventsResponse) {
    option (sebuf.http.config) = {path: "/list-iran-events", method: HTTP_METHOD_GET};
  }

  // GetHumanitarianSummaryBatch retrieves humanitarian summaries for multiple countries in one call.
  rpc GetHumanitarianSummaryBatch(GetHumanitarianSummaryBatchRequest) returns (GetHumanitarianSummaryBatchResponse) {
    option (sebuf.http.config) = {path: "/get-humanitarian-summary-batch", method: HTTP_METHOD_POST};
  }
}
