feat(operations): add source diagnosis workspace
This commit is contained in:
@@ -56,7 +56,9 @@ import type {
|
||||
VehicleIdentityResolution,
|
||||
VehicleServiceOverview,
|
||||
VehicleServiceSummary,
|
||||
VehicleSourceDiagnostic,
|
||||
VehicleSourceEvidence,
|
||||
VehicleSourcePolicyUpdate,
|
||||
VehicleRow
|
||||
} from './types';
|
||||
import { getAccessToken, notifyUnauthorizedSession } from '../v2/auth/session';
|
||||
@@ -273,6 +275,23 @@ export const api = {
|
||||
const suffix = params.toString() ? `?${params.toString()}` : '';
|
||||
return request<VehicleSourceEvidence>(`/api/v2/vehicles/${encodeURIComponent(vin)}/source-evidence${suffix}`, withSignal(undefined, signal));
|
||||
},
|
||||
vehicleSourceDiagnostic: (vin: string, signal?: AbortSignal) => request<VehicleSourceDiagnostic>(
|
||||
`/api/v2/operations/vehicles/${encodeURIComponent(vin)}/sources`,
|
||||
withSignal(undefined, signal)
|
||||
),
|
||||
updateVehicleSourcePolicy: (vin: string, update: VehicleSourcePolicyUpdate) => request<VehicleSourceDiagnostic>(
|
||||
`/api/v2/operations/vehicles/${encodeURIComponent(vin)}/sources/${encodeURIComponent(update.sourceRef)}`,
|
||||
{
|
||||
method: 'PUT',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
version: update.version,
|
||||
enabled: update.enabled,
|
||||
priority: update.priority,
|
||||
remark: update.remark
|
||||
})
|
||||
}
|
||||
),
|
||||
updateVehicleProfile: (vin: string, input: VehicleProfileInput) => request<VehicleProfile>(`/api/v2/vehicles/${encodeURIComponent(vin)}/profile`, {
|
||||
method: 'PUT', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(input)
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user