From b363985ea0e848c5599d5b74e4da5bfdd5c756a8 Mon Sep 17 00:00:00 2001 From: "Joseph T. French" Date: Fri, 9 Oct 2026 00:19:03 -0500 Subject: [PATCH] fix(ledger): a report package's block selects its entity 2.10.0 added entityId to the information-block documents but not to the report package's block, so a report block no longer typed as an InformationBlock. A type assertion keeps the two selections in step. --- clients/LedgerClient.ts | 7 +++++++ clients/graphql/generated/graphql.ts | 2 ++ clients/graphql/queries/ledger/reportPackage.ts | 1 + 3 files changed, 10 insertions(+) diff --git a/clients/LedgerClient.ts b/clients/LedgerClient.ts index 4c66bac..ef24697 100644 --- a/clients/LedgerClient.ts +++ b/clients/LedgerClient.ts @@ -360,6 +360,13 @@ export type LedgerReconciliationComponent = LedgerReconciliation['components'][n export type Report = NonNullable export type ReportPackage = NonNullable export type ReportPackageItem = ReportPackage['items'][number] +// A report's block renders through the same viewers as a read block, so its +// selection must keep pace with the information-block documents. +type AssertTrue = T +// eslint-disable-next-line @typescript-eslint/no-unused-vars +type ReportBlockIsInformationBlock = AssertTrue< + ReportPackageItem['block'] extends InformationBlock ? true : false +> export type ReportListItem = NonNullable['reports'][number] export type StatementData = NonNullable export type StatementPeriod = StatementData['periods'][number] diff --git a/clients/graphql/generated/graphql.ts b/clients/graphql/generated/graphql.ts index 10fad54..8b1da89 100644 --- a/clients/graphql/generated/graphql.ts +++ b/clients/graphql/generated/graphql.ts @@ -1545,6 +1545,7 @@ export type GetLedgerReportPackageQuery = { category: string taxonomyId: string | null taxonomyName: string | null + entityId: string | null informationModel: { conceptArrangement: string | null; memberArrangement: string | null } artifact: { topic: string | null @@ -6480,6 +6481,7 @@ export const GetLedgerReportPackageDocument = { { kind: 'Field', name: { kind: 'Name', value: 'category' } }, { kind: 'Field', name: { kind: 'Name', value: 'taxonomyId' } }, { kind: 'Field', name: { kind: 'Name', value: 'taxonomyName' } }, + { kind: 'Field', name: { kind: 'Name', value: 'entityId' } }, { kind: 'Field', name: { kind: 'Name', value: 'informationModel' }, diff --git a/clients/graphql/queries/ledger/reportPackage.ts b/clients/graphql/queries/ledger/reportPackage.ts index 7f2a135..bef251c 100644 --- a/clients/graphql/queries/ledger/reportPackage.ts +++ b/clients/graphql/queries/ledger/reportPackage.ts @@ -46,6 +46,7 @@ export const GET_REPORT_PACKAGE = gql` category taxonomyId taxonomyName + entityId informationModel { conceptArrangement memberArrangement