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

Function builder

src/commands/schema.ts:34–53  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

32const describe = 'list all Schema App links currently available in a user account'
33
34const builder = (yargs: Argv): Argv<CommandArgs> =>
35 outputItemOrListBuilder(allOrganizationsBuilder(apiOrganizationCommandBuilder(yargs)))
36 .positional(
37 'id-or-index',
38 { describe: 'the Schema App link id or number from list', type: 'string' },
39 )
40 .option('verbose',
41 { alias: 'v', describe: 'include ARNs in table output', type: 'boolean', default: false },
42 )
43 .example([
44 ['$0 schema', 'list all Schema App links'],
45 [
46 '$0 schema 1',
47 'display details for the first Schema App link in the list retrieved by running' +
48 ' "smartthings schema"'],
49 ['$0 schema 5dfd6626-ab1d-42da-bb76-90def3153998', 'display details for a schema' +
50 ' app link by id'],
51 ['$0 schema --verbose', 'include ARNs in the output'],
52 ])
53 .epilog(buildEpilog({ command, apiDocs: ['getAppsByUserToken', 'getAppsByEndpointAppId'] }))
54
55const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
56 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 3

allOrganizationsBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected