syntax = "proto3";

package worldmonitor.intelligence.v1;

import "sebuf/http/annotations.proto";

// Request to fetch enrichment data for a company.
// NOTE: This endpoint is DISABLED — the handler returns an empty stub regardless of
// input. Requires either domain (e.g. "github.com") or name (e.g. "GitHub") to pass
// validation, but no enrichment is performed.
message GetCompanyEnrichmentRequest {
  // Company domain to enrich, such as "github.com".
  string domain = 1 [(sebuf.http.query) = {name: "domain"}];
  // Company name to enrich when a domain is not available.
  string name = 2 [(sebuf.http.query) = {name: "name"}];
}

// Company enrichment data. DISABLED: the handler returns an empty stub — `company`
// echoes only the requested name/domain, and all other fields are empty/undefined.
message GetCompanyEnrichmentResponse {
  EnrichedCompany company = 1;
  EnrichedGithub github = 2;
  repeated TechStackItem tech_stack = 3;
  SecFilings sec_filings = 4;
  repeated HNMention hacker_news_mentions = 5;
  
  // Unix timestamp in milliseconds when this data was fetched.
  int64 enriched_at_ms = 6 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER];
  
  // List of sources successfully reached (e.g. "github", "sec_edgar").
  repeated string sources = 7;
}

message EnrichedCompany {
  string name = 1;
  string domain = 2;
  string description = 3;
  string location = 4;
  string website = 5;
  int32 founded = 6;
}

message EnrichedGithub {
  int32 public_repos = 1;
  int32 followers = 2;
  string avatar_url = 3;
}

message TechStackItem {
  string name = 1;
  string category = 2;
  float confidence = 3;
}

message SecFilings {
  int32 total_filings = 1;
  repeated SecFiling recent_filings = 2;
}

message SecFiling {
  string form = 1;
  string file_date = 2; // ISO 8601 date (YYYY-MM-DD)
  string description = 3;
}

message HNMention {
  string title = 1;
  string url = 2;
  int32 points = 3;
  int32 comments = 4;
  
  // Unix timestamp in milliseconds when the post was created.
  int64 created_at_ms = 5 [(sebuf.http.int64_encoding) = INT64_ENCODING_NUMBER];
}
