Skip to main content
Glama
interface.ts1.72 kB
/** * Database Service Interface * * Defines the contract for data storage operations. * This allows us to swap between JSON and PostgreSQL implementations. */ import { HistoricalQuote, RFPEvaluation } from '../types'; export interface IStorageService { // Historical Quotes getAllQuotes(): Promise<HistoricalQuote[]>; getQuoteById(id: string): Promise<HistoricalQuote | null>; addQuote(quote: HistoricalQuote): Promise<void>; updateQuote(id: string, quote: Partial<HistoricalQuote>): Promise<void>; deleteQuote(id: string): Promise<void>; searchQuotes(criteria: QuoteSearchCriteria): Promise<HistoricalQuote[]>; // Evaluations getAllEvaluations(): Promise<RFPEvaluation[]>; getEvaluationById(id: string): Promise<RFPEvaluation | null>; getEvaluationByIdempotencyKey(key: string): Promise<RFPEvaluation | null>; addEvaluation(evaluation: RFPEvaluation): Promise<void>; updateEvaluation(id: string, evaluation: Partial<RFPEvaluation>): Promise<void>; // Vector Search (Phase 1) searchQuotesByVector(embedding: number[], limit?: number): Promise<QuoteWithSimilarity[]>; updateQuoteEmbedding(id: string, embedding: number[]): Promise<void>; // Health Check healthCheck(): Promise<boolean>; } export interface QuoteSearchCriteria { material?: string; processes?: string[]; qtyMin?: number; qtyMax?: number; customerName?: string; dateFrom?: Date; dateTo?: Date; approved?: boolean; } export interface QuoteWithSimilarity extends HistoricalQuote { similarity: number; } export interface AuditLogEntry { action: string; resourceType?: string; resourceId?: string; details?: any; userId?: number; ipAddress?: string; userAgent?: string; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/r-long/mcp-quoting-system'

If you have feedback or need assistance with the MCP directory API, please join our Discord server