吸收数字员工产物访问治理

This commit is contained in:
baiyanyun
2026-06-10 10:00:34 +08:00
parent cc36d8dcaf
commit 362f397e37
18 changed files with 1016 additions and 166 deletions

View File

@@ -723,6 +723,22 @@ export function getArtifacts(): Promise<any[]> {
.then((data) => data.artifacts ?? []);
}
export function accessArtifact(artifactId: string, action: 'preview' | 'download' | 'open_location'): Promise<any> {
return apiFetch(`/api/digital-employee/artifacts/${encodeURIComponent(artifactId)}/access`, {
method: 'POST',
body: JSON.stringify({ action }),
});
}
export function getArtifactAccessEvents(params: Record<string, string | number | undefined> = {}): Promise<any> {
const search = new URLSearchParams();
for (const [key, value] of Object.entries(params)) {
if (value !== undefined && value !== '') search.set(key, String(value));
}
const suffix = search.toString() ? `?${search.toString()}` : '';
return apiFetch(`/api/digital-employee/artifact-access-events${suffix}`);
}
export function getDebugConversations(): Promise<any[]> {
return apiFetch<{ conversations: any[] }>('/api/debug/conversations')
.then((data) => data.conversations ?? []);