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

Function builder

src/commands/schema/create.ts:38–55  ·  view source on GitHub ↗
(yargs: Argv)

Source from the content-addressed store, hash-verified

36const describe = 'link Schema App to SmartThings'
37
38const builder = (yargs: Argv): Argv<CommandArgs> =>
39 inputAndOutputItemBuilder(lambdaAuthBuilder(apiOrganizationCommandBuilder(yargs)))
40 .option(
41 'authorize',
42 {
43 describe: "authorize connector's Lambda functions to be called by SmartThings",
44 type: 'boolean',
45 default: false,
46 },
47 )
48 .example([
49 ['$0 schema:create', 'link Schema App to SmartThings from prompted input'],
50 [
51 '$0 schema:create -i schema-app-details.yaml',
52 'link Schema App to SmartThings with details defined in "schema-app-details.yaml"',
53 ],
54 ])
55 .epilog(buildEpilog({ command, apiDocs: 'postApps' }))
56
57const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => {
58 const command = await apiOrganizationCommand(argv)

Callers

nothing calls this directly

Calls 4

lambdaAuthBuilderFunction · 0.85
buildEpilogFunction · 0.85

Tested by

no test coverage detected