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

Function builder

src/commands/schema/update.ts:41–59  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

39const describe = 'update a link to a Schema App'
40
41const builder = (yargs: Argv): Argv<CommandArgs> =>
42 inputAndOutputItemBuilder(lambdaAuthBuilder(apiOrganizationCommandBuilder(yargs)))
43 .positional('id', { describe: 'the Schema App link id', type: 'string' })
44 .option('authorize', { describe: 'authorize Lambda functions to be called by SmartThings', type: 'boolean' })
45 .example([
46 [
47 '$0 schema:update',
48 'update a Schema App link by answering questions',
49 ],
50 [
51 '$0 schema:update -d',
52 'generate JSON for updating a Schema App link by answering questions',
53 ],
54 [
55 '$0 schema:update -i data.yaml',
56 'update a Schema App link with the definition in the file data.yaml',
57 ],
58 ])
59 .epilog(buildEpilog({ command, apiDocs: 'putAppsByEndpointAppId' }))
60
61const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
62 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 4

lambdaAuthBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected