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

Function builder

src/commands/locations/modes/create.ts:28–41  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

26const describe = 'create a mode'
27
28const builder = (yargs: Argv): Argv<CommandArgs> =>
29 inputAndOutputItemBuilder(apiCommandBuilder(yargs))
30 .option('location', { alias: 'l', describe: 'a specific location to create the mode in', type: 'string' })
31 .example([
32 [
33 '$0 locations:modes:create --input new-mode.json',
34 'create a new mode as defined in new-mode.json, prompting for a location',
35 ],
36 [
37 '$0 locations:modes:create --location 5dfd6626-ab1d-42da-bb76-90def3153998 --input=new-mode.json',
38 'create a new mode in the specified location as defined in new-mode.json',
39 ],
40 ])
41 .epilog(buildEpilog({ command, apiDocs: 'createMode' }))
42
43const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
44 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 3

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected