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

Function builder

src/commands/devicepreferences/update.ts:30–43  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

28const describe = 'update a device preference'
29
30const builder = (yargs: Argv): Argv<CommandArgs> =>
31 inputAndOutputItemBuilder(apiOrganizationCommandBuilder(yargs))
32 .positional('id', { describe: 'device preference id', type: 'string' })
33 .example([
34 [
35 '$0 devicepreferences:update --input dp.json',
36 'select a device preference from a list and update it with data from dp.json',
37 ],
38 [
39 '$0 devicepreferences:update --input dp.yaml motionSensitivity',
40 'update specified device preference with data from dp.yaml',
41 ],
42 ])
43 .epilog(buildEpilog({ command, apiDocs: ['updatePreferenceById'] }))
44
45const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
46 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 3

buildEpilogFunction · 0.85

Tested by

no test coverage detected