import type { RailDeckDirectIntegrationClient } from '@raildeck/frontend-sdk/direct-integration'; // Fixture values illustrate the source contract. Use reviewed development records. // Importing this module performs no requests. Every mutation requires an explicit call. /** * Calls liveCommands.recoverAccessoryCommand with retained, non-production fixture values. * @param client - Configured source client; use an isolated development environment. * @returns The SDK result; failures propagate without automatic retry. */ export async function exampleLiveCommandsRecoverAccessoryCommand(client: RailDeckDirectIntegrationClient) { return client.liveCommands.recoverAccessoryCommand( "1", "21", "11111111-1111-4111-8111-111111111111", { "layoutId": "18" }, {} ); } /** * Calls liveCommands.setLocomotiveSpeed with retained, non-production fixture values. * @param client - Configured source client; use an isolated development environment. * @returns The SDK result; failures propagate without automatic retry. */ export async function exampleLiveCommandsSetLocomotiveSpeed(client: RailDeckDirectIntegrationClient) { return client.liveCommands.setLocomotiveSpeed( "account-1", "controller-1", { "layoutId": "layout-1", "locomotiveId": "loco-1", "speedPercent": 35, "direction": "forward", "trainFormationId": "formation-1" } ); } /** * Calls liveCommands.setLocomotiveFunction with retained, non-production fixture values. * @param client - Configured source client; use an isolated development environment. * @returns The SDK result; failures propagate without automatic retry. */ export async function exampleLiveCommandsSetLocomotiveFunction(client: RailDeckDirectIntegrationClient) { return client.liveCommands.setLocomotiveFunction( "account-1", "controller-1", { "layoutId": "layout-1", "locomotiveId": "loco-1", "functionNumber": 2, "active": true, "momentary": true } ); } /** * Calls liveCommands.setAccessoryState with retained, non-production fixture values. * @param client - Configured source client; use an isolated development environment. * @returns The SDK result; failures propagate without automatic retry. */ export async function exampleLiveCommandsSetAccessoryState(client: RailDeckDirectIntegrationClient) { return client.liveCommands.setAccessoryState( "1", "21", { "layoutId": "18", "accessoryId": "194", "state": "thrown", "configurationRevision": 3, "expiresInMs": 2000, "commandId": "6ab90f92-1111-4111-8111-000000000001", "priority": "high" }, {} ); } /** * Calls liveCommands.emergencyStop with retained, non-production fixture values. * @param client - Configured source client; use an isolated development environment. * @returns The SDK result; failures propagate without automatic retry. */ export async function exampleLiveCommandsEmergencyStop(client: RailDeckDirectIntegrationClient) { return client.liveCommands.emergencyStop( "account-1", "controller-1", "layout-1", undefined ); }