Fix remaining TypeScript 'Untyped function calls' errors

- Add DatabaseAdapter type imports where needed
- Properly type database adapter calls with type assertions
- Fix type mismatches in schemaMappingService
- Fix ensureInitialized calls on DatabaseAdapter
This commit is contained in:
2026-01-21 09:39:58 +01:00
parent 6bb5907bbd
commit 9ad4bd9a73
6 changed files with 35 additions and 19 deletions

View File

@@ -8,6 +8,7 @@ import { logger } from './logger.js';
import { normalizedCacheStore as cacheStore } from './normalizedCacheStore.js';
import { jiraAssetsClient, JiraObjectNotFoundError } from './jiraAssetsClient.js';
import type { CMDBObject } from '../generated/jira-types.js';
import type { DatabaseAdapter } from './database/interface.js';
export interface BrokenReference {
object_id: string;
@@ -150,7 +151,8 @@ class DataIntegrityService {
// 1. Check cache first
const db = (cacheStore as any).db;
if (db) {
const objRow = await db.queryOne<{
const typedDb = db as DatabaseAdapter;
const objRow = await typedDb.queryOne<{
id: string;
object_type_name: string;
}>(`