mirror of
https://github.com/hpd840321/craftlabs-authorization-sdk.git
synced 2026-06-09 10:00:30 +08:00
feat(web): I4 delivery and license SN UI
Add routes, menu entries, platform API helpers, and views for delivery batches and license SN management. Made-with: Cursor
This commit is contained in:
@@ -106,3 +106,99 @@ export function patchContractStatus(id, body) {
|
||||
export function listAuditEvents(params) {
|
||||
return axios.get("/api/v1/audit-events", { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{ page?: number, size?: number, projectId?: string | number, keyword?: string }} params
|
||||
*/
|
||||
export function listDeliveryBatches(params) {
|
||||
return axios.get("/api/v1/delivery-batches", { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Record<string, unknown>} body
|
||||
*/
|
||||
export function createDeliveryBatch(body) {
|
||||
return axios.post("/api/v1/delivery-batches", body);
|
||||
}
|
||||
|
||||
export function getDeliveryBatch(id) {
|
||||
return axios.get(`/api/v1/delivery-batches/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string | number} id
|
||||
* @param {Record<string, unknown>} body
|
||||
*/
|
||||
export function updateDeliveryBatch(id, body) {
|
||||
return axios.put(`/api/v1/delivery-batches/${id}`, body);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string | number} id
|
||||
* @param {{ status: string }} body
|
||||
*/
|
||||
export function patchDeliveryBatchStatus(id, body) {
|
||||
return axios.patch(`/api/v1/delivery-batches/${id}/status`, body);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string | number} batchId
|
||||
*/
|
||||
export function listDeliveryLines(batchId) {
|
||||
return axios.get(`/api/v1/delivery-batches/${batchId}/lines`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string | number} batchId
|
||||
* @param {Record<string, unknown>} body
|
||||
*/
|
||||
export function addDeliveryLine(batchId, body) {
|
||||
return axios.post(`/api/v1/delivery-batches/${batchId}/lines`, body);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string | number} batchId
|
||||
* @param {string | number} lineId
|
||||
* @param {Record<string, unknown>} body
|
||||
*/
|
||||
export function updateDeliveryLine(batchId, lineId, body) {
|
||||
return axios.put(`/api/v1/delivery-batches/${batchId}/lines/${lineId}`, body);
|
||||
}
|
||||
|
||||
export function deleteDeliveryLine(batchId, lineId) {
|
||||
return axios.delete(`/api/v1/delivery-batches/${batchId}/lines/${lineId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{ page?: number, size?: number, projectId?: string | number, keyword?: string }} params
|
||||
*/
|
||||
export function listLicenseSns(params) {
|
||||
return axios.get("/api/v1/license-sns", { params });
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Record<string, unknown>} body
|
||||
*/
|
||||
export function createLicenseSn(body) {
|
||||
return axios.post("/api/v1/license-sns", body);
|
||||
}
|
||||
|
||||
export function getLicenseSn(id) {
|
||||
return axios.get(`/api/v1/license-sns/${id}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string | number} id
|
||||
* @param {Record<string, unknown>} body
|
||||
*/
|
||||
export function updateLicenseSn(id, body) {
|
||||
return axios.put(`/api/v1/license-sns/${id}`, body);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string | number} id
|
||||
* @param {{ status: string }} body
|
||||
*/
|
||||
export function patchLicenseSnStatus(id, body) {
|
||||
return axios.patch(`/api/v1/license-sns/${id}/status`, body);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user