ig-costing / lib /serviceFilter.ts
imkrish's picture
deploy 09214549
020ed68 verified
Raw History Blame Contribute Delete
515 Bytes
export type ServiceType = 'all' | 'LLM' | 'STT' | 'TTS' | 'API' | 'Avatar'
// getServiceType() in lib/pricing.ts already classifies model === 'heygen' as
// service_type 'Avatar' when an ingested event doesn't specify one itself, so
// 'Avatar' is a real, if not-yet-populated, service_type value - no special-casing
// needed here.
export function buildServiceMatch(service: string | null | undefined): Record<string, unknown> {
if (!service || service === 'all') return {}
return { service_type: service }
}