| 63 | const deviceId = await chooseDeviceFn({ type: DeviceIntegrationType.VIRTUAL })(command, argv.deviceId) |
| 64 | |
| 65 | const createEvents = async (_: void, input: DeviceEvent[]): Promise<EventInputOutput[]> => { |
| 66 | const output = await command.client.virtualDevices.createEvents(deviceId, input) |
| 67 | return input.map((event, index) => ({ event, stateChange: output.stateChanges[index] })) |
| 68 | } |
| 69 | // TODO: This really should provide separate input processors for command line input and |
| 70 | // user input rather than doing it all in `getInputFromUser` |
| 71 | await inputAndOutputItem<DeviceEvent[], EventInputOutput[]>( |