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

Function getInputFromUser

src/commands/apps/oauth/update.ts:58–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 const appId = await chooseApp(command, argv.id)
57
58 const getInputFromUser = async (): Promise<AppOAuthRequest> => {
59 const startingRequest: AppOAuthRequest = await command.client.apps.getOauth(appId)
60 if (!startingRequest.scope) {
61 startingRequest.scope = []
62 }
63 const inputDef = objectDef('OAuth Settings', {
64 clientName: stringDef('Client Name'),
65 scope: oauthAppScopeDef,
66 redirectUris: redirectUrisDef,
67 }, { helpText: itemInputHelpText(docNames) })
68
69 return updateFromUserInput(command, inputDef, startingRequest, { dryRun: !!argv.dryRun })
70 }
71
72 await inputAndOutputItem(command, { tableFieldDefinitions: oauthTableFieldDefinitions },
73 (_, data: AppOAuthRequest) => command.client.apps.updateOauth(appId, data),

Callers

nothing calls this directly

Calls 4

objectDefFunction · 0.85
stringDefFunction · 0.85
itemInputHelpTextFunction · 0.85
updateFromUserInputFunction · 0.50

Tested by

no test coverage detected