(yargs: Argv)
| 54 | const describe = 'list device preferences or get information for a specific device preference' |
| 55 | |
| 56 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 57 | outputItemOrListBuilder(allOrganizationsBuilder(apiOrganizationCommandBuilder(yargs))) |
| 58 | .positional('id-or-index', { describe: 'the device preference id or number from list', type: 'string' }) |
| 59 | .option('namespace', { |
| 60 | describe: 'a specific namespace to query; will use all by default', |
| 61 | alias: 'n', |
| 62 | type: 'string', |
| 63 | }) |
| 64 | .option('standard', { |
| 65 | describe: 'show standard SmartThings device preferences', |
| 66 | alias: 's', |
| 67 | type: 'boolean', |
| 68 | default: false, |
| 69 | }) |
| 70 | .example([ |
| 71 | ['$0 devicepreferences', 'list all device preferences'], |
| 72 | ['$0 devicepreferences 2', 'display details for second item listed in the previous command'], |
| 73 | ['$0 devicepreferences motionSensitivity', 'display details for a preference by id'], |
| 74 | ['$0 devicepreferences --standard', 'list standard device preferences'], |
| 75 | ]) |
| 76 | .epilog(buildEpilog({ command, apiDocs: ['listPreferences', 'getPreferenceById'] })) |
| 77 | |
| 78 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 79 | const command = await apiOrganizationCommand(argv) |
nothing calls this directly
no test coverage detected