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

Function builder

src/commands/virtualdevices/update.ts:31–44  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

29const describe = "update a virtual device's label and room"
30
31const builder = (yargs: Argv): Argv<CommandArgs> =>
32 inputAndOutputItemBuilder(apiCommandBuilder(yargs))
33 .positional('id', { describe: 'the device id', type: 'string' })
34 .example([
35 [
36 '$0 virtualdevices:update -i my-virtualdevice.yaml',
37 'prompt for a virtual device and update it using the data in "my-virtualdevice.yaml"',
38 ],
39 [
40 '$0 virtualdevices:update 392bcb11-e251-44f3-b58b-17f93015f3aa -i my-virtualdevice.json',
41 'update the virtual device with the given id using the data in "my-virtualdevice.json"',
42 ],
43 ])
44 .epilog(buildEpilog({ command, apiDocs: ['updateDevice'] }))
45
46const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
47 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 3

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected