// Warconomy consumer types — generated, hand-maintained, aligned with the // published JSON Schemas (schema version 2). Not an npm package. // Dataset export version at time of writing: 1.187.0. // Source of truth: https://warconomy.com/datasets/conflict-economic-impact/schema.json // Types are additive: index signatures allow new fields without breaking you. export type Confidence = "high" | "medium" | "low"; export type DataMode = "live" | "sample"; export type SubjectType = | "conflict" | "chokepoint" | "sanctions" | "commodity" | "dashboard" | "global"; export interface MetricObservation { id: string; metricId: string; subjectType: SubjectType; subjectId: string; value: number | string; unit?: string | null; asOf: string; // YYYY-MM-DD lastReviewed?: string | null; sourceId: string; confidence: Confidence; dataMode: DataMode; [extra: string]: unknown; } export interface Source { id: string; title: string; publisher: string; url: string; type: "official" | "intergovernmental" | "academic" | "market" | "industry"; cadence?: "monthly" | "annual" | "unknown"; accessedDate?: string; [extra: string]: unknown; } export interface SeriesSnapshot { period: string; asOf: string; value: number | string; sourceId: string; confidence: Confidence; [extra: string]: unknown; } export interface IndicatorSeries { id: string; title: string; metricId: string; subjectType: SubjectType; subjectId: string; unit: string; cadence: "monthly" | "quarterly" | "annual" | "unknown"; latestObservationId?: string | null; snapshots: SeriesSnapshot[]; [extra: string]: unknown; } export interface CitationFact { id: string; subjectType: SubjectType; subjectId: string; statement: string; sourceId: string; confidence: Confidence; dataMode: DataMode; asOf?: string; [extra: string]: unknown; } export interface ProvenanceRecord { recordId: string; recordType: "observation" | "fact" | "seriesSnapshot" | "policyThreshold"; sourceId: string; sourceName: string | null; publisher: string | null; sourceUrl: string | null; sourceAuthority: string | null; citationReadiness: string | null; asOf: string | null; dataMode: string | null; confidence: string | null; relatedPath: string | null; caveats: string[]; [extra: string]: unknown; } export interface VersionDiff { version: string; previousVersion: string | null; frozenPreviousSnapshot: boolean; valueLevel: boolean; valueDelta?: unknown; [extra: string]: unknown; } export interface GraphNode { id: string; type: string; label: string; path?: string; [extra: string]: unknown; } export interface GraphEdge { from: string; to: string; type: string; [extra: string]: unknown; } export interface RecordHistory { recordKey: string; recordId: string; recordType: "observation" | "fact" | "source" | "series"; versions: string[]; versionCount: number; [extra: string]: unknown; } export interface DatasetExport { version: string; observations: MetricObservation[]; sources: Source[]; facts: CitationFact[]; series: IndicatorSeries[]; [extra: string]: unknown; }