65 lines
1.4 KiB
TypeScript
65 lines
1.4 KiB
TypeScript
export type TopicCategory = 'entity' | 'concept' | 'temporal' | 'custom';
|
|
|
|
export type TopicGranularity = 'abstract' | 'concrete' | 'mixed';
|
|
|
|
export type JsonPrimitive = string | number | boolean | null;
|
|
export type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue };
|
|
|
|
export interface TopicRecord {
|
|
id: string;
|
|
name: string;
|
|
normalized_name: string;
|
|
category: TopicCategory;
|
|
granularity: TopicGranularity;
|
|
description: string | null;
|
|
metadata: string | null;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
export interface FactRecord {
|
|
id: string;
|
|
statement: string;
|
|
summary: string | null;
|
|
source: string | null;
|
|
confidence: number | null;
|
|
metadata: string | null;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
export interface FactTopicRecord {
|
|
fact_id: string;
|
|
topic_id: string;
|
|
role: string | null;
|
|
position: number;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface TopicRelationRecord {
|
|
parent_topic_id: string;
|
|
child_topic_id: string;
|
|
relation: string;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface TopicAliasRecord {
|
|
id: string;
|
|
topic_id: string;
|
|
alias: string;
|
|
normalized_alias: string;
|
|
is_primary: number;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
export interface FactEmbeddingRecord {
|
|
fact_id: string;
|
|
model: string;
|
|
dimensions: number;
|
|
embedding: string;
|
|
content_hash: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|