MCPcopy Index your code
hub / github.com/SmartThingsCommunity/smartthings-cli / builder

Function builder

src/commands/installedschema.ts:30–61  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

28const describe = 'get a specific installed schema app or list installed schema apps'
29
30const builder = (yargs: Argv): Argv<CommandArgs> =>
31 outputItemOrListBuilder(apiCommandBuilder(yargs))
32 .positional(
33 'id-or-index',
34 { describe: 'the installed schema app id or number from list', type: 'string' },
35 )
36 .option(
37 'location',
38 { alias: 'l', describe: 'filter results by location', type: 'string', array: true },
39 )
40 .option(
41 'verbose',
42 {
43 alias: 'v',
44 describe: 'include location name in output',
45 type: 'boolean',
46 default: false,
47 },
48 )
49 .example([
50 ['$0 installedschema', 'list all installed schema apps'],
51 [
52 '$0 installedschema 1',
53 'display details for the first installed schema app in the list retrieved by running' +
54 ' "smartthings installedschema"',
55 ],
56 [
57 '$0 installedschema f45c2df1-9dce-4e63-85ba-c7f7fdfe9677',
58 'display details for an installed schema app by id',
59 ],
60 ])
61 .epilog(buildEpilog({ command, apiDocs: ['getIsaByLocationId', 'getDevicesByIsaId'] }))
62
63const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
64 const command = await apiCommand(argv)

Callers

nothing calls this directly

Calls 2

apiCommandBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected