import type { SupportedModel } from './gates.js'; import { TaskAnalysis } from './smart-routing.js'; import type { ModelType, ModelSubtype } from './model-registry.js'; import type { AnalysisMethod, RoutingStrategy, ReanalysisPeriod } from './history.js'; import type { ResponseFormatType } from './api-v3.js'; import type { GateType, AgentGateMode } from './sessions.js'; export interface User { id: string; email: string; passwordHash: string; createdAt: Date; updatedAt: Date; status: string; monthlySpendingLimit: number | null; currentMonthSpending: number; spendingPeriodStart: Date; alertThresholdPercentage: number; limitEnforcementType: string; lastSpendingAlertSentAt: Date | null; } export interface ApiKey { id: string; userId: string; keyHash: string; keyPrefix: string; name: string; isActive: boolean; lastUsedAt: Date | null; createdAt: Date; projectId?: string | null; boundGateId?: string | null; } export interface GateBase { name: string; model: SupportedModel; taskType: ModelType; taskSubtype?: ModelSubtype | null; description?: string; systemPrompt?: string; allowOverrides?: boolean | OverrideConfig; temperature?: number; maxTokens?: number; topP?: number; topK?: number; stopSequences?: string[]; reasoningEffort?: 'low' | 'medium' | 'high'; tags?: string[]; routingStrategy?: RoutingStrategy; fallbackModels?: SupportedModel[]; costWeight?: number; latencyWeight?: number; qualityWeight?: number; analysisMethod?: AnalysisMethod; maxCostPer1kTokens?: number; maxLatencyMs?: number; taskAnalysis?: TaskAnalysis; reanalysisPeriod?: ReanalysisPeriod; autoApplyRecommendations?: boolean; responseFormatEnabled?: boolean; responseFormatType?: ResponseFormatType; responseFormatSchema?: unknown; spendingLimit?: number | null; spendingLimitPeriod?: 'monthly' | 'daily'; spendingEnforcement?: 'alert_only' | 'block'; projectId?: string | null; gateType?: GateType; mode?: AgentGateMode; orchestrationType?: 'static' | 'dynamic'; subGates?: string[]; subGatePool?: string[]; modelPool?: ModelPoolEntry[]; sessionSpendingLimit?: number | null; sessionHardLimit?: number | null; sessionTimeoutMinutes?: number; lockedToGateId?: string | null; } export interface ModelPoolEntry { model: string; label?: string; description?: string; gateId?: string; } export interface Gate extends GateBase { id: string; userId: string; /** How traffic reaches this gate: 'sdk' (instrumented code via the * Verlon SDK) or a coding connector such as 'claude-code'. Drives * connect surfaces and creation templates only — never routing, * billing, or trace semantics. */ connector?: string; /** User-chosen default for this connector: `verlon connect` resolves * to this gate when no gate is named (picker pre-highlight; * non-interactive connects use it outright). At most one per * connector per user; never set on 'sdk' gates. */ isConnectDefault?: boolean; /** BYOK key this gate pins; null/absent = the provider default key. * A pin whose key is deactivated, deleted, or belongs to a different * provider than the serving model falls through to the default. */ pinnedProviderKeyId?: string | null; createdAt: Date; updatedAt: Date; spendingCurrent?: number; spendingPeriodStart?: string; spendingStatus?: 'active' | 'suspended'; digestFrequency?: string; digestLastSentAt?: Date; analysisWindowDays?: number; } export interface OverrideConfig { model?: boolean; temperature?: boolean; maxTokens?: boolean; topP?: boolean; } export declare enum OverrideField { Model = "model", Temperature = "temperature", MaxTokens = "maxTokens", TopP = "topP" } export interface Request { id: string; userId: string; gateId: string | null; gateName: string | null; modelCode: string | null; modelGate: string | null; modelUsed: string | null; promptTokens: number; completionTokens: number; totalTokens: number; costUsd: number; latencyMs: number; success: boolean; errorMessage: string | null; createdAt: Date; userAgent?: string; ipAddress?: string; duration?: number; } //# sourceMappingURL=models.d.ts.map