import type { RailDeckDirectIntegrationClient as Client } from '@raildeck/frontend-sdk/direct-integration'; /** * Read handling evidence and preview a chosen train’s requested speed. * @param client - Configured client; the caller owns current authority. * @param accountId - Authorised account for this workflow. * @param layoutId - Explicitly selected layout within the account. * @param locomotiveId - Explicitly selected locomotive. * @param trainId - Explicitly selected saved train. * @param input - Reviewed input for this operation. * @returns An explanation of the current policy, without claiming control or sending speed. */ export async function reviewTrainSpeedPolicy( client: Client, accountId: string, layoutId: string, locomotiveId: string, trainId: string, input: Omit[3], 'trainFormationId'>, ) { const handling = await client.trainFormations.getHandlingProfile(accountId, trainId); const policy = await client.operatingPolicy.previewLocomotive(accountId, layoutId, locomotiveId, { ...input, trainFormationId: trainId, }); return { handling, policy }; }