mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 18:10:30 +08:00
feat(web): add M7/M8/M9 API client methods
This commit is contained in:
@@ -287,3 +287,51 @@ export function listProductLines(params) {
|
||||
export function getProductLine(id) {
|
||||
return axios.get(`/api/v1/integration/product-lines/${id}`);
|
||||
}
|
||||
|
||||
// —— M7 设备管理 ————————————————————————————
|
||||
export function listDevices(params) {
|
||||
return axios.get('/api/v1/devices', { params });
|
||||
}
|
||||
export function getDevice(id) {
|
||||
return axios.get(`/api/v1/devices/${id}`);
|
||||
}
|
||||
export function createDevice(body) {
|
||||
return axios.post('/api/v1/devices', body);
|
||||
}
|
||||
export function updateDevice(id, body) {
|
||||
return axios.put(`/api/v1/devices/${id}`, body);
|
||||
}
|
||||
export function getDeviceBindings(id) {
|
||||
return axios.get(`/api/v1/devices/${id}/bindings`);
|
||||
}
|
||||
export function createDeviceSwapRequest(id, body) {
|
||||
return axios.post(`/api/v1/devices/${id}/swap-request`, body);
|
||||
}
|
||||
|
||||
// —— M8 通知待办 ————————————————————————————
|
||||
export function listTodos(params) {
|
||||
return axios.get('/api/v1/todos', { params });
|
||||
}
|
||||
export function patchTodoStatus(id, body) {
|
||||
return axios.patch(`/api/v1/todos/${id}/status`, body);
|
||||
}
|
||||
export function batchUpdateTodoStatus(body) {
|
||||
return axios.post('/api/v1/todos/batch-status', body);
|
||||
}
|
||||
export function getNotificationConfig(params) {
|
||||
return axios.get('/api/v1/notifications/config', { params });
|
||||
}
|
||||
export function updateNotificationConfig(body) {
|
||||
return axios.put('/api/v1/notifications/config', body);
|
||||
}
|
||||
|
||||
// —— M9 报表对账 ————————————————————————————
|
||||
export function getContractSnReport(params) {
|
||||
return axios.get('/api/v1/reports/contract-sn', { params });
|
||||
}
|
||||
export function getCallbackStats(params) {
|
||||
return axios.get('/api/v1/reports/callback-stats', { params });
|
||||
}
|
||||
export function getProjectHealth() {
|
||||
return axios.get('/api/v1/reports/project-health');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user