()
| 1011 | * Test the Slack connection (auth.test) |
| 1012 | */ |
| 1013 | export async function testSlackConnection(): Promise<{ |
| 1014 | ok: boolean; |
| 1015 | team?: string; |
| 1016 | team_id?: string; |
| 1017 | user?: string; |
| 1018 | user_id?: string; |
| 1019 | bot_id?: string; |
| 1020 | error?: string; |
| 1021 | }> { |
| 1022 | try { |
| 1023 | const response = await slackRequest<{ |
| 1024 | team: string; |
| 1025 | team_id: string; |
| 1026 | user: string; |
| 1027 | user_id: string; |
| 1028 | bot_id: string; |
| 1029 | }>('auth.test'); |
| 1030 | |
| 1031 | return { |
| 1032 | ok: true, |
| 1033 | ...response, |
| 1034 | }; |
| 1035 | } catch (error) { |
| 1036 | const errorMessage = error instanceof Error ? error.message : 'Unknown error'; |
| 1037 | return { ok: false, error: errorMessage }; |
| 1038 | } |
| 1039 | } |
| 1040 | |
| 1041 | /** |
| 1042 | * Create a new public channel |
no outgoing calls
no test coverage detected