MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / builder

Function builder

src/commands/deviceprofiles.ts:31–54  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

29const describe = 'get a specific device profile or a list device profiles'
30
31const 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
56const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
57 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 3

allOrganizationsBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected