feat(file-check): 新增文件资产管理与清理功能,支持上传、查询、删除及下载

This commit is contained in:
hugo committed 2026-07-14 09:14:44 +08:00
1 parent 143e054d86
commit 729546a7b7
52 files changed
+3420 -34

No files matched your search

@@ -15,6 +15,8 @@ import type {
ShippingNoticeHeader,
ShippingNoticeLine,
ShippingNoticeUploadResponse,
ShippingNoticeIntakeResponse,
ShippingCreateBatchFromIntakesResponse,
ShippingTaskCreateResponse,
ShippingTaskDetail,
ShippingTaskSummary,
@@ -471,6 +473,66 @@ export async function generateWorkspaceShippingExcel(taskNo: string) {
/** 发货通知 Agent 应用类型标识(运行时识别)。 */
export const SHIPPING_NOTICE_AGENT_CODE = 'shipping_notice';
export const createShippingNoticeIntake = (
assetNo: string,
conversationId?: string | null,
) => requestJson<ShippingNoticeIntakeResponse>('/api/workspace/shipping-notice/intakes', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
asset_no: assetNo,
conversation_id: conversationId || undefined,
}),
});
export const getShippingNoticeIntake = (intakeNo: string) =>
requestJson<ShippingNoticeIntakeResponse>(`/api/workspace/shipping-notice/intakes/${encodeURIComponent(intakeNo)}`);
export const getShippingNoticeIntakeStatuses = (intakeNos: string[]) =>
requestJson<{ items: ShippingNoticeIntakeResponse[] }>('/api/workspace/shipping-notice/intakes/status', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ intake_nos: intakeNos }),
});
export const listActiveShippingNoticeIntakes = (conversationId?: string | null) => {
const sp = new URLSearchParams({ status: 'active' });
if (conversationId) sp.set('conversation_id', conversationId);
return requestJson<{ items: ShippingNoticeIntakeResponse[] }>(
`/api/workspace/shipping-notice/intakes?${sp.toString()}`,
);
};
export const retryShippingNoticeIntake = (intakeNo: string) =>
requestJson<ShippingNoticeIntakeResponse>(
`/api/workspace/shipping-notice/intakes/${encodeURIComponent(intakeNo)}/retry`,
{ method: 'POST' },
);
export const cancelShippingNoticeIntake = (intakeNo: string) =>
requestJson<{ cancelled: boolean }>(
`/api/workspace/shipping-notice/intakes/${encodeURIComponent(intakeNo)}`,
{ method: 'DELETE' },
);
export const createWorkspaceShippingBatchFromIntakes = (
intakeNos: string[],
conversationId?: string | null,
idempotencyKey?: string,
) =>
requestJson<ShippingCreateBatchFromIntakesResponse>('/api/workspace/shipping-batches/create-from-intakes', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
...(idempotencyKey ? { 'Idempotency-Key': idempotencyKey } : {}),
},
body: JSON.stringify({
intake_nos: intakeNos,
conversation_id: conversationId || undefined,
idempotency_key: idempotencyKey,
}),
});
export type {
ShippingBatchSummary,
ShippingBatchUiState,
@@ -485,6 +547,8 @@ export type {
ShippingNoticeHeader,
ShippingNoticeLine,
ShippingNoticeUploadResponse,
ShippingNoticeIntakeResponse,
ShippingCreateBatchFromIntakesResponse,
ShippingTaskCreateResponse,
ShippingTaskDetail,
ShippingTaskSummary,