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

Function builder

src/commands/locations/modes/update.ts:29–47  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

27const describe = "update a mode's label"
28
29const builder = (yargs: Argv): Argv<CommandArgs> =>
30 inputAndOutputItemBuilder(apiCommandBuilder(yargs))
31 .positional('id', { describe: 'mode id', type: 'string' })
32 .option('location', { alias: 'l', describe: 'a specific location to query', type: 'string' })
33 .example([
34 [
35 '$0 locations:modes:update --input mode.json',
36 'select a mode from a list of all modes and update it using the data in mode.json',
37 ],
38 [
39 '$0 locations:modes:update --location 5dfd6626-ab1d-42da-bb76-90def3153998 --input mode.yaml',
40 'select a mode from a list of modes in a specified location and update it using the data in mode.yaml',
41 ],
42 [
43 '$0 locations:modes:update 636169e4-8b9f-4438-a941-953b0d617231 --input mode.json',
44 'update a specified mode using the data in mode.json',
45 ],
46 ])
47 .epilog(buildEpilog({ command, apiDocs: 'updateMode' }))
48
49const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
50 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 3

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected