(yargs: Argv)
| 27 | const describe = 'list invitations or retrieve a single invitation by id or index' |
| 28 | |
| 29 | const builder = (yargs: Argv): Argv<CommandArgs> => |
| 30 | outputItemOrListBuilder(apiCommandBuilder(yargs)) |
| 31 | .positional('id-or-index', { describe: 'the invitation id or number in list', type: 'string' }) |
| 32 | .option('channel', { |
| 33 | alias: 'C', |
| 34 | describe: 'channel id', |
| 35 | type: 'string', |
| 36 | }) |
| 37 | .example([ |
| 38 | ['$0 edge:channels:invites', 'list all invites on all channels you own'], |
| 39 | [ |
| 40 | '$0 edge:channels:invites 2', |
| 41 | 'display details for the second invite in the list retrieved by running' + |
| 42 | ' "smartthings edge:channels:invites"', |
| 43 | ], |
| 44 | [ |
| 45 | '$0 edge:channels:invites 5dfd6626-ab1d-42da-bb76-90def3153998', |
| 46 | 'display details for an invite by id', |
| 47 | ], |
| 48 | [ |
| 49 | '$0 edge:channels:invites --channel 92ece7fc-46d0-4a6c-932c-f7c4a1b8d754', |
| 50 | 'list invites for the specified channel', |
| 51 | ], |
| 52 | ]) |
| 53 | .epilog(buildEpilog({ command })) |
| 54 | |
| 55 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 56 | const command = edgeCommand(await apiCommand(argv)) |
nothing calls this directly
no test coverage detected