{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://quantumbrief.ca/api/v1/schema.json",
 "title": "Quantum Brief API v1 page",
 "description": "Envelope for every /api/v1/<dataset>/page-<n>.json file. Item fields per dataset are under $defs; meanings are on /data/dictionary/.",
 "type": "object",
 "required": [
  "api",
  "version",
  "dataset",
  "page",
  "page_size",
  "total",
  "total_pages",
  "links",
  "items"
 ],
 "properties": {
  "api": {
   "const": "quantumbrief"
  },
  "version": {
   "const": 1
  },
  "dataset": {
   "enum": [
    "careers",
    "companies",
    "corrections",
    "deals",
    "education",
    "events",
    "events-upcoming",
    "funding",
    "markets",
    "news",
    "people",
    "pqc",
    "programmes",
    "research",
    "roadmaps"
   ]
  },
  "page": {
   "type": "integer",
   "minimum": 1
  },
  "page_size": {
   "type": "integer"
  },
  "total": {
   "type": "integer"
  },
  "total_pages": {
   "type": "integer"
  },
  "links": {
   "type": "object",
   "properties": {
    "self": {
     "type": [
      "string",
      "null"
     ]
    },
    "first": {
     "type": [
      "string",
      "null"
     ]
    },
    "last": {
     "type": [
      "string",
      "null"
     ]
    },
    "prev": {
     "type": [
      "string",
      "null"
     ]
    },
    "next": {
     "type": [
      "string",
      "null"
     ]
    },
    "file": {
     "type": [
      "string",
      "null"
     ]
    },
    "schema": {
     "type": [
      "string",
      "null"
     ]
    },
    "docs": {
     "type": [
      "string",
      "null"
     ]
    }
   }
  },
  "items": {
   "type": "array",
   "maxItems": 50,
   "items": {
    "type": "object"
   }
  }
 },
 "$defs": {
  "careers": {
   "type": "object",
   "properties": {
    "company": {
     "type": "string"
    },
    "id": {
     "type": "string"
    },
    "country": {
     "type": "string"
    },
    "careers_url": {
     "type": "string"
    }
   }
  },
  "companies": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string"
    },
    "name": {
     "type": "string"
    },
    "region": {
     "type": "string"
    },
    "country": {
     "type": "string"
    },
    "countrySlug": {
     "type": "string"
    },
    "city": {
     "type": "string"
    },
    "modalities": {
     "type": "array"
    },
    "leaders": {
     "type": "string"
    },
    "stage": {
     "type": "string"
    },
    "summary": {
     "type": "string"
    },
    "scale": {
     "type": "object"
    },
    "website": {
     "type": "string"
    },
    "sources": {
     "type": "array"
    },
    "logo": {
     "type": "string"
    },
    "founded": {
     "type": [
      "integer",
      "null",
      "string"
     ]
    },
    "alsoRegions": {
     "type": "array"
    },
    "funding": {
     "type": "object"
    },
    "headcount": {
     "type": "object"
    }
   }
  },
  "corrections": {
   "type": "object",
   "properties": {
    "date": {
     "type": "string"
    },
    "page": {
     "type": "string"
    },
    "record": {
     "type": "string"
    },
    "change": {
     "type": "string"
    },
    "source": {
     "type": "string"
    }
   }
  },
  "deals": {
   "type": "object",
   "properties": {
    "date": {
     "type": "string"
    },
    "party": {
     "type": "string"
    },
    "type": {
     "type": "string"
    },
    "amount": {
     "type": [
      "null",
      "number"
     ]
    },
    "currency": {
     "type": [
      "null",
      "string"
     ]
    },
    "amount_text": {
     "type": "string"
    },
    "counterparty": {
     "type": "string"
    },
    "status": {
     "type": "string"
    },
    "summary": {
     "type": "string"
    },
    "source": {
     "type": "string"
    },
    "news_page": {
     "type": [
      "null",
      "string"
     ]
    }
   }
  },
  "education": {
   "type": "object",
   "properties": {
    "country": {
     "type": "string"
    },
    "level": {
     "type": "string"
    },
    "type": {
     "type": "string"
    },
    "name": {
     "type": "string"
    },
    "institution": {
     "type": "string"
    },
    "url": {
     "type": "string"
    },
    "note": {
     "type": "string"
    }
   }
  },
  "events-upcoming": {
   "type": "object",
   "properties": {
    "start": {
     "type": "string"
    },
    "end": {
     "type": "string"
    },
    "name": {
     "type": "string"
    },
    "type": {
     "type": "string"
    },
    "location": {
     "type": "string"
    },
    "organizer": {
     "type": "string"
    },
    "country": {
     "type": "string"
    },
    "url": {
     "type": "string"
    },
    "notes": {
     "type": "string"
    }
   }
  },
  "events": {
   "type": "object",
   "properties": {
    "date": {
     "type": "string"
    },
    "title": {
     "type": "string"
    },
    "type": {
     "type": "string"
    },
    "programmes": {
     "type": "array"
    },
    "source": {
     "type": [
      "null",
      "string"
     ]
    },
    "companies": {
     "type": "array"
    }
   }
  },
  "funding": {
   "type": "object",
   "properties": {
    "country": {
     "type": "string"
    },
    "program": {
     "type": "string"
    },
    "amount": {
     "type": "string"
    },
    "currency": {
     "type": "string"
    },
    "period": {
     "type": "string"
    },
    "status": {
     "type": "string"
    },
    "date": {
     "type": "string"
    },
    "source_url": {
     "type": "string"
    },
    "note": {
     "type": "string"
    }
   }
  },
  "markets": {
   "type": "object",
   "properties": {
    "company": {
     "type": "string"
    },
    "ticker": {
     "type": "string"
    },
    "exchange": {
     "type": "string"
    },
    "country": {
     "type": "string"
    },
    "segment": {
     "type": "string"
    },
    "tier": {
     "type": "string"
    },
    "ir_url": {
     "type": "string"
    },
    "source_url": {
     "type": "string"
    },
    "notes": {
     "type": "string"
    }
   }
  },
  "news": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string"
    },
    "slug": {
     "type": "string"
    },
    "title": {
     "type": "string"
    },
    "date": {
     "type": "string"
    },
    "publication": {
     "type": "string"
    },
    "url": {
     "type": "string"
    },
    "summary": {
     "type": "string"
    },
    "why_it_matters": {
     "type": "string"
    },
    "published_at": {
     "type": "string"
    },
    "claim_label": {
     "type": "string"
    },
    "also": {
     "type": "array"
    },
    "companies": {
     "type": [
      "array",
      "null"
     ]
    },
    "arxiv": {
     "type": "string"
    },
    "tags": {
     "type": "array"
    },
    "publication_note": {
     "type": "string"
    }
   }
  },
  "people": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string"
    },
    "name": {
     "type": "string"
    },
    "roles": {
     "type": "array"
    },
    "bio": {
     "type": "string"
    },
    "sources": {
     "type": "array"
    }
   }
  },
  "pqc": {
   "type": "object",
   "properties": {
    "jurisdiction_or_body": {
     "type": "string"
    },
    "item": {
     "type": "string"
    },
    "type": {
     "type": "string"
    },
    "date": {
     "type": "string"
    },
    "details": {
     "type": "string"
    },
    "source_url": {
     "type": "string"
    }
   }
  },
  "programmes": {
   "type": "object",
   "properties": {
    "id": {
     "type": "string"
    },
    "name": {
     "type": "string"
    },
    "region": {
     "type": "string"
    },
    "country": {
     "type": "string"
    },
    "summary": {
     "type": "string"
    },
    "website": {
     "type": "string"
    },
    "sources": {
     "type": "array"
    }
   }
  },
  "research": {
   "type": "object",
   "properties": {
    "date": {
     "type": "string"
    },
    "title": {
     "type": "string"
    },
    "type": {
     "type": "string"
    },
    "claim_label": {
     "type": "string"
    },
    "arxiv": {
     "type": [
      "null",
      "string"
     ]
    },
    "summary": {
     "type": "string"
    },
    "source": {
     "type": "string"
    },
    "picked": {
     "type": "string"
    },
    "desk": {
     "type": [
      "null",
      "string"
     ]
    }
   }
  },
  "roadmaps": {
   "type": "object",
   "properties": {
    "company": {
     "type": "string"
    },
    "milestone": {
     "type": "string"
    },
    "metric": {
     "type": "string"
    },
    "target_value": {
     "type": "string"
    },
    "target_date": {
     "type": "string"
    },
    "status": {
     "type": "string"
    },
    "evidence_type": {
     "type": "string"
    },
    "announced_date": {
     "type": "string"
    },
    "source_url": {
     "type": "string"
    },
    "label": {
     "type": "string"
    }
   }
  }
 }
}
