Files
gupi-osint-board/src/types.ts
T

92 lines
2.1 KiB
TypeScript
Raw Normal View History

export type EvidenceType = 'folder' | 'evidence' | 'note' | 'event' | 'party'
export type PartyKind = 'person' | 'organization'
export type OrganizationKind = 'business' | 'public_body' | 'association' | 'informal_group' | 'other'
2026-08-14 12:43:11 +02:00
export type SourceFileType = 'image' | 'pdf' | 'web_capture' | 'email' | 'article' | 'filing' | 'price_list' | 'text' | 'file'
export interface DocumentRegion {
id: string
label: string
excerpt: string
date?: string
}
export interface CaseDocument {
id: string
title: string
kind: string
date: string
publishedAt?: string
body: string[]
regions: DocumentRegion[]
assetId?: string
fileName?: string
mimeType?: string
fileSize?: number
fileType: SourceFileType
metadata: Record<string, string>
}
export interface Evidence {
id: string
type: EvidenceType
title: string
content: string
sourceDocumentId?: string
sourceRegionId?: string
eventDate?: string
supportingEvidenceIds?: string[]
partyKind?: PartyKind
organizationKind?: OrganizationKind
aliases?: string[]
relatedEvidenceIds?: string[]
2026-08-14 12:43:11 +02:00
x: number
y: number
width: number
config?: Record<string, unknown>
/** Compatibility projection for clients predating the generic relation graph. */
containedDocumentIds?: string[]
}
export interface WidgetRelation {
id: string
fromWidgetId: string
toWidgetId: string
type: string
sortOrder?: number
config?: Record<string, unknown>
}
export interface Connection {
id: string
fromEvidenceId: string
toEvidenceId: string
}
export interface Viewport { x: number; y: number; zoom: number }
export interface BriefConcept {
id: string
label: string
context: string
expectedPartyKind?: PartyKind
resolvedPartyExhibitId?: string
}
export interface LevelBrief { body: string; concepts: BriefConcept[] }
2026-08-14 12:43:11 +02:00
export interface CaseState {
id: string
title: string
subtitle: string
documents: CaseDocument[]
evidence: Evidence[]
relations: WidgetRelation[]
connections: Connection[]
viewport: Viewport
brief: LevelBrief
2026-08-14 12:43:11 +02:00
updatedAt?: string
levelStatus?: string
sourceTemplateVersionId?: string
2026-08-14 12:43:11 +02:00
editingAllowed?: boolean
}