(yargs: Argv)
| 29 | const describe = 'get a specific device profile or a list device profiles' |
| 30 | |
| 31 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 32 | outputItemOrListBuilder(allOrganizationsBuilder(apiOrganizationCommandBuilder(yargs))) |
| 33 | .positional( |
| 34 | 'id-or-index', |
| 35 | { describe: 'the device profile id or number from list', type: 'string' }, |
| 36 | ) |
| 37 | .option( |
| 38 | 'verbose', |
| 39 | { |
| 40 | alias: 'v', |
| 41 | describe: 'include presentationId and manufacturerName in list output', |
| 42 | type: 'boolean', |
| 43 | default: false, |
| 44 | }, |
| 45 | ) |
| 46 | .example([ |
| 47 | ['$0 deviceprofiles', 'list all device profiles'], |
| 48 | [ |
| 49 | '$0 deviceprofiles 2', |
| 50 | 'display details for the second device profile in the list retrieved by running "smartthings deviceprofiles"', |
| 51 | ], |
| 52 | ['$0 deviceprofiles 8bd382bb-07e8-48d3-8b11-5f0b508b1729', 'display details for a device profile by id'], |
| 53 | ]) |
| 54 | .epilog(buildEpilog({ command, apiDocs: ['listDeviceProfiles', 'getDeviceProfile'] })) |
| 55 | |
| 56 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 57 | const command = await apiOrganizationCommand(argv) |
nothing calls this directly
no test coverage detected