UNPKG

@hcapp01/quiz-data

Version:

quiz-data

35 lines (27 loc) 1.14 kB
import { QuizContent } from '@hcapp01/quiz-fetcher'; interface SinoProps { explain: string; pinyin: string; composition?: string; imageUrl?: string; pictoUrl?: string; imageUrls: string[]; pictoUrls?: string[]; } type SinoContent = QuizContent<SinoProps>; declare function fetchUnits(mode?: 'simplified' | 'cantonese'): Promise<SinoContent[][]>; interface ParsedCoach { name: string; description: string; baseUrl?: string; } type ActionType = 'mad' | 'angry' | 'cheerful' | 'point_up' | 'point_left' | 'clapping'; declare const ACTION_TYPES: ActionType[]; interface SinoCoach extends ParsedCoach { urls: Record<ActionType, string[]>; } declare function fetchCoaches(): Promise<SinoCoach[]>; declare const UNITS_JSON_PATH = "json/units.json"; declare function getRemoteUnitsUrl(mode?: 'simplified' | 'cantonese'): string; declare const REMOTE_COACHES_URL = "https://pub-f346707a49714b4caf6255c0d238cec5.r2.dev/coach/json/coaches.json"; export { ACTION_TYPES, type ActionType, REMOTE_COACHES_URL, type SinoCoach, type SinoProps, UNITS_JSON_PATH, fetchCoaches, fetchUnits, getRemoteUnitsUrl };