File size: 515 Bytes
020ed68
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
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 }
}