For developers

TypeScript types

Hand-maintained TypeScript consumer types aligned with Warconomy's JSON Schemas, for typed consumption without a dependency. Download warconomy-types.d.ts directly — there is no npm package. Types are additive, so new export fields never break a consumer.

static reference · data June 5, 2026

These TypeScript interfaces mirror Warconomy's published JSON Schemas so you can consume the static exports with full typing and no dependency to install. Download the .d.ts and reference it directly, or copy the interfaces you need. They use index signatures, matching the additive schema policy, so a new export field never breaks your build.

  • 14 exported types, aligned with schema v2.
  • Download warconomy-types.d.ts — no npm package, no dependency.
  • Machine-readable at /developers/types/data.json.

Exported types

ConfidenceDataModeSubjectTypeMetricObservationSourceSeriesSnapshotIndicatorSeriesCitationFactProvenanceRecordVersionDiffGraphNodeGraphEdgeRecordHistoryDatasetExport

Download: warconomy-types.d.ts · contract: /data-dictionary · schemas: schema.json.

Declaration

// 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;
}

Related Warconomy pages