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

Function builder

src/commands/devices/delete.ts:20–30  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

18const describe = 'delete a device'
19
20const builder = (yargs: Argv): Argv<CommandArgs> =>
21 apiCommandBuilder(yargs)
22 .positional('id', { describe: 'device id', type: 'string' })
23 .example([
24 ['$0 devices:delete', 'choose the device to delete from a list'],
25 [
26 '$0 devices:delete 43daec4d-f2c6-4bc3-9df7-50ed1012c137',
27 'delete the device with the specified id',
28 ],
29 ])
30 .epilog(buildEpilog({ command, apiDocs: ['deleteDevice'] }))
31
32const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
33 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected