This commit is contained in:
@@ -18,13 +18,15 @@ import type {
|
||||
BatchSetDeviceSeriesBindingRequest,
|
||||
BatchSetDeviceSeriesBindingResponse,
|
||||
BatchUpdateAssetRealnamePolicyRequest,
|
||||
BatchUpdateAssetRealnamePolicyResponse,
|
||||
ImportDeviceRequest,
|
||||
ImportDeviceResponse,
|
||||
DeviceImportTaskQueryParams,
|
||||
DeviceImportTaskListResponse,
|
||||
DeviceImportTaskDetail,
|
||||
DeviceBatchAllocationRequest,
|
||||
DeviceBatchAllocationResponse,
|
||||
BaseResponse,
|
||||
SetSpeedLimitRequest,
|
||||
SwitchCardRequest,
|
||||
SetWiFiRequest,
|
||||
DeviceOperationResponse
|
||||
@@ -147,6 +149,15 @@ export class DeviceService extends BaseService {
|
||||
)
|
||||
}
|
||||
|
||||
static createAllocationTask(
|
||||
data: DeviceBatchAllocationRequest
|
||||
): Promise<BaseResponse<DeviceBatchAllocationResponse>> {
|
||||
return this.post<BaseResponse<DeviceBatchAllocationResponse>>(
|
||||
'/api/admin/devices/import/allocations',
|
||||
data
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导入任务详情
|
||||
* @param id 任务ID
|
||||
@@ -176,8 +187,8 @@ export class DeviceService extends BaseService {
|
||||
static batchUpdateRealnamePolicy(
|
||||
data: BatchUpdateAssetRealnamePolicyRequest,
|
||||
config?: Record<string, any>
|
||||
): Promise<BaseResponse<void>> {
|
||||
return this.post<BaseResponse<void>>(
|
||||
): Promise<BaseResponse<BatchUpdateAssetRealnamePolicyResponse>> {
|
||||
return this.post<BaseResponse<BatchUpdateAssetRealnamePolicyResponse>>(
|
||||
'/api/admin/devices/batch-update-realname-policy',
|
||||
data,
|
||||
config
|
||||
@@ -208,21 +219,6 @@ export class DeviceService extends BaseService {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置限速
|
||||
* @param imei 设备号(IMEI)
|
||||
* @param data 限速参数
|
||||
*/
|
||||
static setSpeedLimit(
|
||||
imei: string,
|
||||
data: SetSpeedLimitRequest
|
||||
): Promise<BaseResponse<DeviceOperationResponse>> {
|
||||
return this.put<BaseResponse<DeviceOperationResponse>>(
|
||||
`/api/admin/devices/by-identifier/${imei}/speed-limit`,
|
||||
data
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换SIM卡
|
||||
* @param imei 设备号(IMEI)
|
||||
|
||||
Reference in New Issue
Block a user