30 lines
856 B
TypeScript
30 lines
856 B
TypeScript
export type SourceId = "geonet" | "parliament" | "stats-nz" | "data-govt-nz" | "treasury" | "rbnz" | "mbie-jobs-online" | "companies-office" | "nz-gazette" | "electricity-authority";
|
|
|
|
export interface SourceDefinition {
|
|
id: SourceId;
|
|
name: string;
|
|
type: "geojson" | "html" | "sitemap" | "ckan" | "rss";
|
|
url: string;
|
|
publisher: string;
|
|
sourceClass: "official_primary" | "official_data" | "official_registry" | "official_notice" | "official_analysis" | "catalogue";
|
|
independenceGroup: string;
|
|
authorityTier: 1 | 2 | 3;
|
|
}
|
|
|
|
export interface NormalizedItem {
|
|
sourceId: SourceId;
|
|
externalId: string;
|
|
title: string;
|
|
summary: string;
|
|
url: string;
|
|
publishedAt: string | null;
|
|
topics: string[];
|
|
raw: unknown;
|
|
metrics?: Record<string, number | string | null>;
|
|
}
|
|
|
|
export interface ScoredItem {
|
|
score: number;
|
|
reasons: string[];
|
|
}
|