按设备回执确认音量调整完成

This commit is contained in:
stu2not
2026-06-05 17:12:48 +08:00
parent a52fa21ecf
commit d33212613b
11 changed files with 405 additions and 62 deletions

View File

@@ -65,6 +65,19 @@ export interface DeviceVolumeUpdateResponse {
device_id: string
level: number
msg_id: string
time: number
status: string
}
export interface DeviceVolumeCommandStatusResponse {
device_id: string
level: number
msg_id: string
time: number
status: 'sent' | 'completed' | 'failed' | string
current_level?: number | null
response_status?: string | null
error?: string | null
}
export interface DeviceSleepScheduleUpdateResponse {
@@ -179,6 +192,13 @@ export async function setDeviceVolume(level: number, deviceId?: string): Promise
})
}
export async function getDeviceVolumeCommandStatus(
deviceId: string,
commandTime: number,
): Promise<DeviceVolumeCommandStatusResponse> {
return request<DeviceVolumeCommandStatusResponse>(`/banban/devices/${deviceId}/volume/${commandTime}`)
}
export async function setDeviceSleepSchedule(
start: string,
end: string,