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

Function builder

src/commands/rules/delete.ts:22–33  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected