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

Function builder

src/commands/devices/update.ts:27–40  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected