()
| 110 | } |
| 111 | |
| 112 | function createElectronTransport(): ApiTransport { |
| 113 | const api = window.apiServerApi |
| 114 | return { |
| 115 | getConfig: () => api.getConfig(), |
| 116 | getStatus: () => api.getStatus(), |
| 117 | setEnabled: (enabled) => api.setEnabled(enabled), |
| 118 | setPort: (port) => api.setPort(port), |
| 119 | regenerateToken: () => api.regenerateToken(), |
| 120 | onStartupError: (cb) => api.onStartupError(cb), |
| 121 | getDataSources: () => api.getDataSources(), |
| 122 | addDataSource: (partial) => api.addDataSource(partial), |
| 123 | updateDataSource: (id, updates) => api.updateDataSource(id, updates), |
| 124 | deleteDataSource: (id) => api.deleteDataSource(id), |
| 125 | addImportSessions: (sourceId, sessions) => api.addImportSessions(sourceId, sessions), |
| 126 | removeImportSession: (sourceId, sessionId, deleteData?) => api.removeImportSession(sourceId, sessionId, deleteData), |
| 127 | triggerPull: (sourceId, sessionId?) => api.triggerPull(sourceId, sessionId), |
| 128 | triggerPullAll: (sourceId) => api.triggerPullAll(sourceId), |
| 129 | onPullResult: (cb) => api.onPullResult(cb), |
| 130 | fetchRemoteSessions: (baseUrl, token?, query?) => api.fetchRemoteSessions(baseUrl, token, query), |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | function createWebTransport(): ApiTransport { |
| 135 | const noop = () => () => {} |
no test coverage detected