117 lines
2.0 KiB
TypeScript
117 lines
2.0 KiB
TypeScript
// Flow Types
|
|
export type FlowRecordType = 'text' | 'voice' | 'image';
|
|
|
|
export interface FlowRecord {
|
|
id: string;
|
|
type: FlowRecordType;
|
|
content: string;
|
|
imageUri?: string;
|
|
createdAt: Date;
|
|
emotion?: string;
|
|
isArchived: boolean;
|
|
archivedAt?: Date;
|
|
}
|
|
|
|
// Vault Types
|
|
export type VaultAssetType =
|
|
| 'game_account'
|
|
| 'private_key'
|
|
| 'document'
|
|
| 'photo'
|
|
| 'will'
|
|
| 'custom';
|
|
|
|
export interface VaultAsset {
|
|
id: string;
|
|
type: VaultAssetType;
|
|
label: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
isEncrypted: boolean;
|
|
heirEmail?: string;
|
|
rawData?: any; // For debug logging
|
|
}
|
|
|
|
// Sentinel Types
|
|
export type SystemStatus = 'normal' | 'warning' | 'releasing';
|
|
|
|
export interface SentinelState {
|
|
status: SystemStatus;
|
|
lastSubscriptionCheck: Date;
|
|
lastFlowActivity: Date;
|
|
killSwitchLogs: KillSwitchLog[];
|
|
}
|
|
|
|
export interface KillSwitchLog {
|
|
id: string;
|
|
action: string;
|
|
timestamp: Date;
|
|
}
|
|
|
|
// Heritage Types
|
|
export type HeirStatus = 'invited' | 'confirmed';
|
|
export type PaymentStrategy = 'prepaid' | 'pay_on_access';
|
|
|
|
export interface Heir {
|
|
id: string;
|
|
name: string;
|
|
email: string;
|
|
phone?: string;
|
|
status: HeirStatus;
|
|
releaseLevel: number; // 1-3
|
|
releaseOrder: number;
|
|
paymentStrategy: PaymentStrategy;
|
|
}
|
|
|
|
// Me Types
|
|
export interface SubscriptionInfo {
|
|
plan: string;
|
|
expiresAt: Date;
|
|
isActive: boolean;
|
|
}
|
|
|
|
export interface ProtocolInfo {
|
|
version: string;
|
|
lastUpdated: Date;
|
|
}
|
|
|
|
// Auth Types
|
|
export interface User {
|
|
id: number;
|
|
username: string;
|
|
email?: string;
|
|
public_key: string;
|
|
is_admin: boolean;
|
|
guale: boolean;
|
|
tier: string;
|
|
tier_expires_at: string;
|
|
last_active_at: string;
|
|
}
|
|
|
|
export interface LoginRequest {
|
|
username: string;
|
|
password: string;
|
|
}
|
|
|
|
export interface RegisterRequest {
|
|
username: string;
|
|
password: string;
|
|
email: string;
|
|
}
|
|
|
|
export interface LoginResponse {
|
|
access_token: string;
|
|
token_type: string;
|
|
user: User;
|
|
}
|
|
|
|
// AI Types
|
|
export interface AIRole {
|
|
id: string;
|
|
name: string;
|
|
description: string;
|
|
systemPrompt: string;
|
|
icon: string;
|
|
iconFamily: string;
|
|
}
|