(connection: IntegrationConnection)
| 202 | }; |
| 203 | |
| 204 | const handleDisconnect = async (connection: IntegrationConnection) => { |
| 205 | resetError(); |
| 206 | setDeletingConnectionId(connection.id); |
| 207 | try { |
| 208 | await disconnect(connection.id, userId); |
| 209 | toast({ |
| 210 | title: 'Connection removed', |
| 211 | description: `${connection.providerName} credentials have been deleted.`, |
| 212 | }); |
| 213 | } catch (err) { |
| 214 | const message = err instanceof Error ? err.message : 'Failed to disconnect'; |
| 215 | toast({ |
| 216 | title: 'Disconnect failed', |
| 217 | description: message, |
| 218 | variant: 'destructive', |
| 219 | }); |
| 220 | } finally { |
| 221 | setDeletingConnectionId(null); |
| 222 | } |
| 223 | }; |
| 224 | |
| 225 | const handleManualReconnect = (connection: IntegrationConnection) => { |
| 226 | const provider = providers.find((item) => item.id === connection.provider); |
no outgoing calls
no test coverage detected