syntax = "proto3";

package worldmonitor.seismology.v1;

import "sebuf/http/annotations.proto";
import "worldmonitor/core/v1/pagination.proto";
import "worldmonitor/seismology/v1/earthquake.proto";

// ListEarthquakesRequest specifies filters for retrieving earthquake data from USGS.
message ListEarthquakesRequest {
  // Start of time range (inclusive), Unix epoch milliseconds.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  int64 start = 1 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER, (sebuf.http.query) = { name: "start" }, (sebuf.http.unimplemented) = true];
  // End of time range (inclusive), Unix epoch milliseconds.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  int64 end = 2 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER, (sebuf.http.query) = { name: "end" }, (sebuf.http.unimplemented) = true];
  // Maximum items per page. Defaults to 500 when omitted or 0; the handler applies no
  // clamp, so the requested value directly limits the returned list (no enforced maximum).
  int32 page_size = 3 [(sebuf.http.query) = { name: "page_size" }];
  // Cursor for next page.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  string cursor = 4 [(sebuf.http.query) = { name: "cursor" }, (sebuf.http.unimplemented) = true];
  // Minimum magnitude filter (e.g., 4.0 for significant quakes).
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  double min_magnitude = 5 [(sebuf.http.query) = { name: "min_magnitude" }, (sebuf.http.unimplemented) = true];
}

// ListEarthquakesResponse contains the list of earthquakes matching the request filters.
message ListEarthquakesResponse {
  // The list of earthquakes.
  repeated Earthquake earthquakes = 1;
  // Pagination metadata.
  worldmonitor.core.v1.PaginationResponse pagination = 2;
}
