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

Function handler

src/commands/capabilities/update.ts:44–53  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

42 .epilog(buildEpilog({ command, apiDocs: 'updateCapability' }))
43
44const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
45 const command = await apiOrganizationCommand(argv)
46
47 const id = await chooseCapability(command, argv.id, argv.capabilityVersion)
48 await inputAndOutputItem<CapabilityUpdate, Capability>(
49 command,
50 { buildTableOutput: data => buildTableOutput(command.tableGenerator, data) },
51 (_, capability) => command.client.capabilities.update(id.id, id.version, capability),
52 )
53}
54
55const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
56export default cmd

Callers

nothing calls this directly

Calls 3

apiOrganizationCommandFunction · 0.85
chooseCapabilityFunction · 0.50
buildTableOutputFunction · 0.50

Tested by

no test coverage detected