吸收数字员工安全服务重启入口
This commit is contained in:
@@ -26,6 +26,7 @@ import type {
|
||||
IngressRouteResponse,
|
||||
GovernanceCommandRequest,
|
||||
GovernanceCommandResponse,
|
||||
DigitalEmployeeManagedService,
|
||||
DigitalEmployeeWorkdayProjection,
|
||||
DigitalEmployeeWorkdayActionRequest,
|
||||
PlanDispatchResponse,
|
||||
@@ -613,6 +614,26 @@ export function postDigitalEmployeeWorkdayAction(
|
||||
});
|
||||
}
|
||||
|
||||
export function restartManagedService(
|
||||
serviceId: string,
|
||||
body: { reason?: string; actor?: string } = {},
|
||||
): Promise<{
|
||||
ok: boolean;
|
||||
service_id: string;
|
||||
action: 'restart';
|
||||
status: 'success' | 'failed' | 'rejected';
|
||||
message?: string;
|
||||
error?: string;
|
||||
managed_service?: DigitalEmployeeManagedService | null;
|
||||
event_id?: string | null;
|
||||
}> {
|
||||
return apiFetch(`/api/digital-employee/managed-services/${encodeURIComponent(serviceId)}/restart`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(body),
|
||||
timeoutMs: DIGITAL_EMPLOYEE_WORKDAY_TIMEOUT_MS,
|
||||
});
|
||||
}
|
||||
|
||||
export function dispatchPlanNow(planId: string): Promise<PlanDispatchResponse> {
|
||||
return apiFetch<PlanDispatchResponse>(`/api/debug/plan/${encodeURIComponent(planId)}/dispatch`, {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user