syntax = "proto3";

package worldmonitor.economic.v1;

import "buf/validate/validate.proto";
import "sebuf/http/annotations.proto";
import "worldmonitor/core/v1/pagination.proto";
import "worldmonitor/economic/v1/economic_data.proto";

// ListWorldBankIndicatorsRequest specifies filters for retrieving World Bank data.
message ListWorldBankIndicatorsRequest {
  // World Bank indicator code (e.g., "NY.GDP.MKTP.CD").
  string indicator_code = 1 [
    (buf.validate.field).required = true,
    (buf.validate.field).string.min_len = 1,
    (sebuf.http.query) = { name: "indicator_code" }
  ];
  // Optional country filter (ISO 3166-1 alpha-2).
  string country_code = 2 [(sebuf.http.query) = { name: "country_code" }];
  // Optional year filter. Defaults to latest available.
  int32 year = 3 [(sebuf.http.query) = { name: "year" }];
  // Maximum items per page.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  int32 page_size = 4 [(sebuf.http.query) = { name: "page_size" }, (sebuf.http.unimplemented) = true];
  // Cursor for next page.
  // Accepted but currently ignored; no-op until this handler supports the parameter.
  string cursor = 5 [(sebuf.http.query) = { name: "cursor" }, (sebuf.http.unimplemented) = true];
}

// ListWorldBankIndicatorsResponse contains World Bank indicator data.
message ListWorldBankIndicatorsResponse {
  // Country-level indicator data.
  repeated WorldBankCountryData data = 1;
  // Pagination metadata.
  worldmonitor.core.v1.PaginationResponse pagination = 2;
}
