syntax = "proto3";

package worldmonitor.prediction.v1;

import "sebuf/http/annotations.proto";
import "worldmonitor/core/v1/pagination.proto";
import "worldmonitor/prediction/v1/prediction_market.proto";

// ListPredictionMarketsRequest specifies filters for retrieving prediction markets.
message ListPredictionMarketsRequest {
  // Maximum items per page (1-100).
  int32 page_size = 1 [(sebuf.http.query) = { name: "page_size" }];
  // Cursor for next page.
  string cursor = 2 [(sebuf.http.query) = { name: "cursor" }];
  // Optional category filter (e.g., "Politics").
  string category = 3 [(sebuf.http.query) = { name: "category" }];
  // Optional search query for market titles.
  string query = 4 [(sebuf.http.query) = { name: "query" }];
}

// ListPredictionMarketsResponse contains prediction markets matching the request.
message ListPredictionMarketsResponse {
  // The list of prediction markets.
  repeated PredictionMarket markets = 1;
  // Pagination metadata.
  worldmonitor.core.v1.PaginationResponse pagination = 2;
}
