/// declare module 'tim-upload-plugin' { const plugin: unknown export default plugin } interface DoctorCallConfig { SDKAppID?: number | string sdkAppId?: number | string userID?: string userId?: string userSig: string targetUserId?: string patientUserId?: string diagnosisId: number | string patientName?: string patientCase?: DoctorPatientCase mode?: 'chat' | 'video' } interface DoctorPatientCase { diagnosisId?: number | string name?: string gender?: string age?: string | number height?: string | number weight?: string | number diagnosisDate?: string appointmentDate?: string clinicalDiagnosis?: string chiefComplaint?: string presentIllness?: string pastHistory?: string allergyHistory?: string personalHistory?: string familyHistory?: string currentMedication?: string tongue?: string pulse?: string prescriptionOpinion?: string remark?: string } interface DoctorCallApi { start(config: DoctorCallConfig): Promise hangup(): Promise } interface DoctorConsultationApi { open(config: DoctorCallConfig): Promise close(): Promise startVideo(): Promise hangup(): Promise hostCallReady(ok: boolean, message?: string): void recordingResult(ok: boolean, message: string): void roomBindingResult(roomId: string, ok: boolean, message: string): void screenshotResult(ok: boolean, message: string): void transcriptionResult( operation: 'start' | 'segment' | 'stop', sessionId: string, segmentId: string, ok: boolean, message: string, ): void localRecordingResult( operation: 'start' | 'chunk' | 'finish', sessionId: string, sequence: number, ok: boolean, message: string, ): void } interface QtVideoBridge { notify?: (payload: string) => void saveScreenshot?: (dataUrl: string) => void startLocalAudioRecording?: (sessionId: string, mimeType: string) => void appendLocalAudioChunk?: (sessionId: string, sequence: number, encoded: string) => void finishLocalAudioRecording?: (sessionId: string, totalBytes: number) => void abortLocalAudioRecording?: (sessionId: string) => void } interface Window { doctorCall: DoctorCallApi doctorConsultation: DoctorConsultationApi qtVideoBridge?: QtVideoBridge qt?: { webChannelTransport?: unknown } QWebChannel?: new ( transport: unknown, callback: (channel: { objects: { qtVideoBridge?: QtVideoBridge } }) => void, ) => unknown }