test: define schema contract for topic fact graph

This commit is contained in:
2026-05-11 10:42:50 +09:00
parent cadc1b0733
commit fb140d7a50
5 changed files with 188 additions and 0 deletions

22
src/types/api.ts Normal file
View File

@@ -0,0 +1,22 @@
import type { JsonValue, TopicCategory, TopicGranularity } from './domain';
export interface UpsertTopicInput {
name: string;
category?: TopicCategory;
granularity?: TopicGranularity;
description?: string | null;
metadata?: JsonValue | null;
}
export interface TopicLinkInput extends UpsertTopicInput {
role?: string | null;
}
export interface AddFactInput {
statement: string;
summary?: string | null;
source?: string | null;
confidence?: number | null;
metadata?: JsonValue | null;
topics: TopicLinkInput[];
}