From 293a2e131dc5e26be3fe712708280b52076cd321 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 30 Oct 2025 05:18:31 +0000 Subject: [PATCH] Critical: Fix type definition mismatch for newApplications field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make newApplications optional in OrganizationReportSummary type definition to match the validation logic. This resolves the type safety violation where compile-time type checking required the field but runtime validation treated it as optional. The field is optional because legacy encrypted data predates this field's introduction, and making it required would break decryption of existing data. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../src/dirt/reports/risk-insights/models/report-models.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/report-models.ts b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/report-models.ts index 76892004d3e..1e1de537543 100644 --- a/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/report-models.ts +++ b/bitwarden_license/bit-common/src/dirt/reports/risk-insights/models/report-models.ts @@ -55,7 +55,8 @@ export type OrganizationReportSummary = { totalCriticalMemberCount: number; totalCriticalAtRiskMemberCount: number; totalCriticalAtRiskApplicationCount: number; - newApplications: string[]; + /** Optional for backward compatibility - legacy encrypted data predates this field */ + newApplications?: string[]; }; /**