more package declarations

This commit is contained in:
2026-05-17 21:52:38 -04:00
parent a8a5930ced
commit f118d3a4f3
44 changed files with 14019 additions and 1918 deletions

View File

@@ -6,6 +6,7 @@ import {
SchedulerConfig,
ScheduledScanResult,
} from './types';
// @ts-expect-error uuid v10 ships with its own types but module resolution is complex
import { v4 as uuidv4 } from 'uuid';
const DEFAULT_SCHEDULER_CONFIG: SchedulerConfig = {
@@ -72,6 +73,7 @@ export class HomeTitleSchedulerService {
const scanId = uuidv4();
const startedAt = new Date().toISOString();
const errors: string[] = [];
let propertiesScanned = 0;
let changesDetected = 0;
let alertsCreated = 0;
let notificationsSent = 0;
@@ -95,6 +97,7 @@ export class HomeTitleSchedulerService {
const propertySnapshots = await this.fetchLatestSnapshots(
subscription.userId,
);
propertiesScanned += propertySnapshots.length;
for (const snapshot of propertySnapshots) {
const previousSnapshot = await this.fetchPreviousSnapshot(
@@ -107,7 +110,7 @@ export class HomeTitleSchedulerService {
const result = detectChanges(previousSnapshot, snapshot);
if (shouldTriggerAlert(result, 'moderate')) {
if (shouldTriggerAlert(result, 'warning')) {
changesDetected++;
const alert = await homeTitleAlertPipeline.processChangeDetection(
@@ -140,7 +143,7 @@ export class HomeTitleSchedulerService {
const scanResult: ScheduledScanResult = {
scanId,
propertiesScanned: changesDetected,
propertiesScanned,
changesDetected,
alertsCreated,
notificationsSent,