(yargs: Argv)
| 26 | const describe = 'get the current health status of a device' |
| 27 | |
| 28 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 29 | formatAndWriteItemBuilder(apiCommandBuilder(yargs)) |
| 30 | .positional('id-or-index', { describe: 'device id or number from list', type: 'string' }) |
| 31 | .example([ |
| 32 | ['$0 devices:health', 'choose a device from a list and display its health status'], |
| 33 | [ |
| 34 | '$0 devices:health 3', |
| 35 | 'display the health status for the third device listed when running "smartthings devices"', |
| 36 | ], |
| 37 | [ |
| 38 | '$0 devices:health a13a3fbb-2b97-4c73-978d-ae7c2fca3ea8', |
| 39 | 'display the health status for the specified device', |
| 40 | ], |
| 41 | ]) |
| 42 | .epilog(buildEpilog({ command })) |
| 43 | |
| 44 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 45 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected