修复接口问题
parent
dea99acd78
commit
312004000f
|
|
@ -191,11 +191,18 @@ export function getDeviceMessagePairPage(params: PageParam) {
|
|||
}
|
||||
|
||||
/** 发送设备消息 */
|
||||
export function sendDeviceMessage(params: IotDeviceApi.DeviceMessageSendReq) {
|
||||
return requestClient.post('/iot/device/message/send', params);
|
||||
export function sendDeviceMessage(data: IotDeviceApi.DeviceMessageSendReq) {
|
||||
return requestClient.post('/iot/device/message/send', data);
|
||||
}
|
||||
|
||||
// Export aliases for compatibility
|
||||
/** 查询设备日志分页 */
|
||||
export function getDeviceLogPage(params: PageParam) {
|
||||
return requestClient.get<PageResult<any>>('/iot/device/log/page', {
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
// Export object with all functions for backward compatibility
|
||||
export const DeviceApi = {
|
||||
getDevicePage,
|
||||
getDevice,
|
||||
|
|
@ -215,10 +222,11 @@ export const DeviceApi = {
|
|||
getDeviceMessagePage,
|
||||
getDeviceMessagePairPage,
|
||||
sendDeviceMessage,
|
||||
getDeviceLogPage,
|
||||
};
|
||||
|
||||
export type DeviceVO = IotDeviceApi.Device;
|
||||
export type IotDeviceAuthInfoVO = IotDeviceApi.DeviceAuthInfo;
|
||||
export type IotDevicePropertyDetailRespVO = IotDeviceApi.DevicePropertyDetail;
|
||||
export type IotDevicePropertyRespVO = IotDeviceApi.DeviceProperty;
|
||||
// Re-export types for backward compatibility (use with: import type { ... } from ...)
|
||||
export type {
|
||||
IotDeviceApi as DeviceApiTypes,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ export interface ThingModelData {
|
|||
identifier?: string;
|
||||
name?: string;
|
||||
desc?: string;
|
||||
type?: string;
|
||||
type?: number;
|
||||
dataType?: string;
|
||||
property?: ThingModelProperty;
|
||||
event?: ThingModelEvent;
|
||||
|
|
@ -175,14 +175,13 @@ export function deleteThingModelList(ids: number[]) {
|
|||
});
|
||||
}
|
||||
|
||||
/** 导入物模型 TSL */
|
||||
export function importThingModelTSL(productId: number, tslData: any) {
|
||||
return requestClient.post('/iot/thing-model/import-tsl', {
|
||||
productId,
|
||||
tslData,
|
||||
});
|
||||
/** 获取物模型 TSL */
|
||||
export function getThingModelTSL(productId: number) {
|
||||
return requestClient.get<ThingModelApi.ThingModel[]>(
|
||||
'/iot/thing-model/get-tsl',
|
||||
{ params: { productId } },
|
||||
);
|
||||
}
|
||||
|
||||
/** 导出物模型 TSL */
|
||||
export function exportThingModelTSL(productId: number) {
|
||||
return requestClient.get<any>('/iot/thing-model/export-tsl', {
|
||||
|
|
@ -201,6 +200,6 @@ export const ThingModelApi = {
|
|||
updateThingModel,
|
||||
deleteThingModel,
|
||||
deleteThingModelList,
|
||||
importThingModelTSL,
|
||||
getThingModelTSL,
|
||||
exportThingModelTSL,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue