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

Function builder

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

Source from the content-addressed store, hash-verified

28const describe = 'show device profile and device configuration in a single, consolidated view'
29
30export const builder = (yargs: Argv): Argv<CommandArgs> =>
31 formatAndWriteItemBuilder(apiOrganizationCommandBuilder(yargs))
32 .positional('id-or-index', { describe: 'device profile id or number from list', type: 'string' })
33 .example([
34 [
35 '$0 deviceprofiles:view',
36 'prompt for a device profile and display configuration info for it',
37 ],
38 [
39 '$0 deviceprofiles:view 3',
40 'display configuration info for the third device profile in the list retrieved by ' +
41 ' running "smartthings deviceprofiles"',
42 ],
43 [
44 '$0 deviceprofiles:view aaddcbec-e8ce-4227-b9b2-f4f22f87f2ec',
45 'display configuration info for a device profile by id',
46 ],
47 ])
48 .epilog(buildEpilog({ command, apiDocs: ['getDeviceProfile', 'getDeviceConfiguration'] }))
49
50const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
51 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 2

buildEpilogFunction · 0.85

Tested by

no test coverage detected