(argv: ArgumentsCamelCase<CommandArgs>)
| 90 | })) |
| 91 | |
| 92 | const handler = async (argv: ArgumentsCamelCase<CommandArgs>): Promise<void> => { |
| 93 | const command = await apiOrganizationCommand(argv) |
| 94 | |
| 95 | const config: OutputItemOrListConfig<Channel & WithOrganization> = { |
| 96 | primaryKeyName: 'channelId', |
| 97 | sortKeyName: 'name', |
| 98 | listTableFieldDefinitions, |
| 99 | tableFieldDefinitions, |
| 100 | } |
| 101 | if (argv.allOrganizations) { |
| 102 | config.listTableFieldDefinitions = [...listTableFieldDefinitions, 'organization'] |
| 103 | } |
| 104 | |
| 105 | const subscriberType = (argv.subscriberType as SubscriberType | undefined) |
| 106 | ?? (argv.subscriberId ? 'HUB' : undefined) |
| 107 | await outputItemOrList<Channel & WithOrganization>( |
| 108 | command, |
| 109 | config, |
| 110 | argv.idOrIndex, |
| 111 | async () => listChannels( |
| 112 | command.client, |
| 113 | { |
| 114 | allOrganizations: argv.allOrganizations, |
| 115 | subscriberType, |
| 116 | subscriberId: argv.subscriberId, |
| 117 | includeReadOnly: argv.includeReadOnly, |
| 118 | }, |
| 119 | ), |
| 120 | id => command.client.channels.get(id), |
| 121 | ) |
| 122 | } |
| 123 | |
| 124 | const cmd: CommandModule<object, CommandArgs> = { command, describe, builder, handler } |
| 125 | export default cmd |
nothing calls this directly
no test coverage detected