memofai
Version:
Revolutionary dual-track AI memory infrastructure SDK for JavaScript/TypeScript applications
162 lines • 4.37 kB
TypeScript
export type Environment = 'alpha' | 'beta' | 'production';
export interface EnvironmentConfig {
baseURL: string;
description: string;
}
export declare const ENVIRONMENTS: Record<Environment, EnvironmentConfig>;
export interface MOAClientConfig {
environment: Environment;
apiKey: string;
apiVersion?: string;
timeout?: number;
retryAttempts?: number;
baseURL?: string;
headers?: Record<string, string>;
}
export interface MemoryCreateRequest {
content: string;
metadata?: Record<string, unknown>;
tags?: string[];
retention_days?: number;
}
export interface MemoryUpdateRequest {
content?: string;
metadata?: Record<string, unknown>;
tags?: string[];
}
export interface MemoryResponse {
memory_id: string;
status: string;
message?: string;
}
export interface Memory {
memory_id: string;
content: string;
metadata?: Record<string, unknown>;
tags?: string[];
created_at: string;
updated_at: string;
retention_days: number;
}
export interface SearchParams {
query: string;
filters?: string;
vector_weight?: number;
keyword_weight?: number;
fuzzy_weight?: number;
temporal_weight?: number;
metadata_weight?: number;
max_results?: number;
}
export interface SearchResponse {
results: SearchResult[];
total_results: number;
search_time_ms: number;
search_config: Record<string, number>;
}
export interface SearchResult {
memory_id: string;
content: string;
metadata?: Record<string, unknown>;
tags?: string[];
score: number;
created_at: string;
updated_at: string;
}
export type GraphSearchType = 'shortest_path' | 'similarity_cluster' | 'concept_traversal' | 'temporal_flow' | 'causal_chain' | 'semantic_neighborhood' | 'multi_hop_similarity' | 'concept_intersection';
export interface GraphSearchRequest {
query: string;
search_type: GraphSearchType;
max_depth?: number;
max_results?: number;
min_relationship_strength?: number;
min_concept_relevance?: number;
include_relationship_types?: string[];
exclude_relationship_types?: string[];
weight_by_recency?: boolean;
weight_by_access_frequency?: boolean;
boost_direct_connections?: number;
}
export interface GraphSearchResponse {
results: GraphSearchResult[];
total_results: number;
search_type: string;
execution_time_ms: number;
graph_stats: Record<string, unknown>;
search_config: Record<string, unknown>;
}
export interface GraphSearchResult {
memory_id: string;
content: string;
metadata?: Record<string, unknown>;
tags?: string[];
score: number;
path_length?: number;
relationship_types?: string[];
created_at: string;
updated_at: string;
}
export interface RelationshipGenerationRequest {
memory_ids?: string[];
force_regenerate?: boolean;
batch_size?: number;
}
export interface RelationshipGenerationResponse {
status: string;
message: string;
stats: Record<string, number>;
processing_time_ms: number;
}
export interface RelationshipStats {
total_relationships: number;
relationship_types: Record<string, number>;
average_strength: number;
last_updated: string;
}
export interface CleanupResponse {
status: string;
message: string;
deleted_count: number;
processing_time_ms: number;
}
export interface AnalyticsResponse {
total_memories: number;
total_relationships: number;
memory_growth: MemoryGrowthStats;
search_stats: SearchStats;
top_tags: TagStats[];
storage_usage: StorageStats;
}
export interface MemoryGrowthStats {
daily: number[];
weekly: number[];
monthly: number[];
}
export interface SearchStats {
total_searches: number;
average_response_time: number;
popular_queries: string[];
}
export interface TagStats {
tag: string;
count: number;
}
export interface StorageStats {
total_size_mb: number;
average_memory_size_kb: number;
}
export interface ValidationError {
loc: (string | number)[];
msg: string;
type: string;
}
export interface HTTPValidationError {
detail: ValidationError[];
}
export interface SearchTypeInfo {
type: GraphSearchType;
description: string;
use_cases: string[];
parameters: Record<string, unknown>;
}
//# sourceMappingURL=index.d.ts.map