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

Function handler

src/commands/capabilities/delete.ts:32–38  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

30 .epilog(buildEpilog({ command, apiDocs: 'deleteCapability' }))
31
32const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
33 const command = await apiOrganizationCommand(argv)
34
35 const id = await chooseCapability(command, argv.id, argv.capabilityVersion)
36 await command.client.capabilities.delete(id.id, id.version)
37 console.log(`capability ${id.id} (version ${id.version}) deleted`)
38}
39
40const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
41export default cmd

Callers

nothing calls this directly

Calls 2

apiOrganizationCommandFunction · 0.85
chooseCapabilityFunction · 0.50

Tested by

no test coverage detected