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

Function handler

src/commands/installedapps/delete.ts:43–54  ·  view source on GitHub ↗
(argv: ArgumentsCamelCase<CommandArgs>)

Source from the content-addressed store, hash-verified

41
42
43const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
44 const command = await apiCommand(argv)
45
46 const listOptions: InstalledAppListOptions = {
47 locationId: argv.location,
48 }
49 const chooseFunction = chooseInstalledAppFn({ listOptions, verbose: argv.verbose })
50 const id = await chooseFunction(command, argv.id, { promptMessage: 'Select an installed app to delete.' })
51
52 await command.client.installedApps.delete(id)
53 console.log(`Installed app ${id} deleted.`)
54}
55
56const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler }
57export default cmd

Callers

nothing calls this directly

Calls 2

apiCommandFunction · 0.85
chooseInstalledAppFnFunction · 0.85

Tested by

no test coverage detected