Add Scene 7 claim report workflow

This commit is contained in:
2026-08-22 17:02:30 +02:00
parent a7f99a2a39
commit cea0d56cb9
23 changed files with 638 additions and 82 deletions
+48 -2
View File
@@ -1,4 +1,4 @@
export type ExhibitType = 'folder' | 'document' | 'note' | 'event' | 'party'
export type ExhibitType = 'folder' | 'document' | 'note' | 'event' | 'party' | 'claim'
export type PartyKind = 'person' | 'organization'
export type OrganizationKind = 'business' | 'public_body' | 'association' | 'informal_group' | 'other'
export type SourceFileType = 'image' | 'pdf' | 'web_capture' | 'email' | 'article' | 'filing' | 'price_list' | 'text' | 'file'
@@ -34,11 +34,14 @@ export interface FolderExhibit extends ExhibitBase {
export interface DocumentExhibit extends ExhibitBase {
type: 'document'
/** Stable, board-local number used when citing this exhibit. */
displayNumber?: number
/** Author-mode reveal requirements. Omitted from play-mode payloads. */
requiredFlags?: string[]
publishedAt?: string
capturedAt?: string
sourceUri?: string
sourceCitation?: string
body: string[]
regions: DocumentRegion[]
assetId?: string
@@ -80,7 +83,12 @@ export interface PartyExhibit extends ExhibitBase {
aliases: string[]
}
export type Exhibit = FolderExhibit | DocumentExhibit | NoteExhibit | EventExhibit | PartyExhibit
export interface ClaimExhibit extends ExhibitBase {
type: 'claim'
statement: string
}
export type Exhibit = FolderExhibit | DocumentExhibit | NoteExhibit | EventExhibit | PartyExhibit | ClaimExhibit
export type Evidence = Exclude<Exhibit, DocumentExhibit>
export type CaseDocument = DocumentExhibit
export type EvidenceType = Evidence['type']
@@ -167,6 +175,42 @@ export interface LevelGoal {
newlyCompleted: boolean
}
export type CaseReportSubmissionStatus = 'evidence_insufficient' | 'evidence_accepted_report_incomplete' | 'accepted'
export interface CaseReportEvidence {
connectionId: string
documentExhibitId: string
displayNumber: number
documentTitle: string
fileType: SourceFileType
relationText: string
publishedAt?: string
sourceCitation?: string
sourceUri?: string
evidenceAccepted: boolean
}
export interface CaseReportClaim {
claimExhibitId: string
statement: string
evidence: CaseReportEvidence[]
}
export interface CaseReport {
title: string
investigatorName: string
requiredForCompletion: boolean
status: 'draft' | CaseReportSubmissionStatus
feedback?: string
issues: string[]
claims: CaseReportClaim[]
}
export interface CaseReportSubmissionInput {
investigatorName: string
evidence: Array<Pick<CaseReportEvidence, 'connectionId' | 'documentExhibitId' | 'relationText' | 'publishedAt' | 'sourceCitation' | 'sourceUri'>>
}
export interface CaseState {
id: string
title: string
@@ -178,6 +222,7 @@ export interface CaseState {
viewport: Viewport
brief: LevelBrief
goals: LevelGoal[]
report?: CaseReport
revision: number
updatedAt?: string
levelStatus?: string
@@ -243,3 +288,4 @@ export function isEvidenceExhibit(exhibit: Exhibit): exhibit is Evidence { retur
export function isFolderExhibit(exhibit: Exhibit): exhibit is FolderExhibit { return exhibit.type === 'folder' }
export function isEventExhibit(exhibit: Exhibit): exhibit is EventExhibit { return exhibit.type === 'event' }
export function isPartyExhibit(exhibit: Exhibit): exhibit is PartyExhibit { return exhibit.type === 'party' }
export function isClaimExhibit(exhibit: Exhibit): exhibit is ClaimExhibit { return exhibit.type === 'claim' }