101 lines
2.7 KiB
TypeScript
101 lines
2.7 KiB
TypeScript
/// <reference types="vite/client" />
|
|
|
|
declare module 'tim-upload-plugin' {
|
|
const plugin: unknown
|
|
export default plugin
|
|
}
|
|
|
|
interface DoctorCallConfig {
|
|
patientId?: number | string | null
|
|
appointmentId?: number
|
|
appointment_type?: unknown
|
|
can_video_call?: unknown
|
|
can_audio_call?: unknown
|
|
call_disabled_reason?: string
|
|
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<void>
|
|
hangup(): Promise<void>
|
|
}
|
|
|
|
interface DoctorConsultationApi {
|
|
open(config: DoctorCallConfig): Promise<void>
|
|
close(): Promise<void>
|
|
startVideo(): Promise<void>
|
|
hangup(): Promise<void>
|
|
hostCallReady(ok: boolean, message?: string): void
|
|
callPolicyResult(requestId: string, policy: Record<string, unknown>): 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
|
|
}
|