move getStats to adapter.js

what if the key is not in the map? you need to do something like:
```typescript
result.localType = candidateTypeMapping[localCandidate.candidateType] || 'unknown'
```