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

Function builder

src/commands/locations/rooms/delete.ts:21–36  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

19const describe = 'delete a room'
20
21const builder = (yargs: Argv): Argv<CommandArgs> =>
22 apiCommandBuilder(yargs)
23 .option('location', { alias: 'l', describe: 'filter rooms by location', type: 'string' })
24 .positional('id', { describe: 'room id', type: 'string' })
25 .example([
26 ['$0 rooms:delete', 'choose the room to delete from a list'],
27 [
28 '$0 rooms:delete 43daec4d-f2c6-4bc3-9df7-50ed1012c137',
29 'delete the room with the specified id',
30 ],
31 [
32 '$0 rooms:delete -l 8c39c0ac-0e6e-405e-a835-a2afd86aeaf0',
33 'choose the room to delete from a list of rooms in the specified location',
34 ],
35 ])
36 .epilog(buildEpilog({ command, apiDocs: 'deleteRoom' }))
37
38const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
39 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected