(yargs: Argv)
| 31 | const describe = 'update the settings of the app' |
| 32 | |
| 33 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 34 | inputAndOutputItemBuilder(lambdaAuthBuilder(apiCommandBuilder(yargs))) |
| 35 | .positional('id', { describe: 'app id', type: 'string' }) |
| 36 | .option( |
| 37 | 'authorize', |
| 38 | { describe: 'authorize Lambda functions to be called by SmartThings', type: 'boolean', default: false }, |
| 39 | ) |
| 40 | .example([ |
| 41 | [ |
| 42 | '$0 apps:update', |
| 43 | 'prompt for an app and edit it interactively', |
| 44 | ], |
| 45 | [ |
| 46 | '$0 apps:update -i my-app.json', |
| 47 | 'prompt for an app and update it using the data in "my-app.json"', |
| 48 | ], |
| 49 | [ |
| 50 | '$0 apps:update 392bcb11-e251-44f3-b58b-17f93015f3aa -i my-app.json', |
| 51 | 'update the app with the given id using the data in "my-app.json"', |
| 52 | ], |
| 53 | [ |
| 54 | '$0 apps:update 392bcb11-e251-44f3-b58b-17f93015f3aa -i my-app.json --authorize', |
| 55 | 'update the given app using the data in "my-app.json" and then authorize it\n' + |
| 56 | '(See "smartthings apps:authorize" for more information on authorization.)', |
| 57 | ], |
| 58 | ]) |
| 59 | .epilog('See apps:oauth:update and apps:oauth:generate for updating oauth-related data.\n\n' + |
| 60 | buildEpilog({ command, apiDocs: ['updateApp'] })) |
| 61 | |
| 62 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 63 | const command = await apiCommand(argv) |
nothing calls this directly
no test coverage detected