Interface ReportFacetsConfig

Contains the configurations required to filter on a specific portion of the reports data.

interface ReportFacetsConfig {
    attributes?: string[];
    callback?: ((data) => void);
    defaultFilters?: FacetFilter[];
    defaultPageSize?: number;
    facetChangedCallback?: ((facet) => void);
    facetFiltersChangedCallback?: ((data) => void);
    factSheetIds?: string[];
    fixedFactSheetType?: string;
    fullTextSearchTerm?: string;
    key: string;
    label?: string;
    sortings?: Sorting[];
}

Properties

attributes?: string[]

The Fact Sheet attributes to query from the backend. Strings are GraphQL selection-set fragments, not plain field names.

  • Scalar fields: use the field name directly — 'businessCriticality'
  • Object fields: specify the subfields needed — 'lifecycle { asString phases { phase startDate } }'
  • Relation targets: use inline fragments to access type-specific fields — 'relApplicationToBusinessCapability { edges { node { factSheet { ... on BusinessCapability { id displayName } } } } }'

Always verify available field names using lx.currentSetup.settings.dataModel or the LeanIX MCP tools before writing queries.

Example

attributes: [
'id',
'displayName',
'businessCriticality',
'lifecycle { asString }',
'tags { name }',
'relApplicationToBusinessCapability { edges { node { factSheet { id displayName } } } }'
]

See

LeanIX GraphQL API reference

callback?: ((data) => void)

Type declaration

    • (data): void
    • Called each time the facet result set changes (on filter change and on initial load).

      data is an array of Fact Sheet objects shaped as GraphQL BaseFactSheet nodes extended with the fields requested via attributes. Access fields directly on each element (e.g. item.businessCriticality, item.lifecycle?.asString). This is the primary data delivery mechanism for facet-based reports.

      Parameters

      • data: any[]

      Returns void

defaultFilters?: FacetFilter[]

If defined these filters will be applied as initial default when the user enters the report.

defaultPageSize?: number

Deprecated

this parameter has no effect on the page size anymore.

facetChangedCallback?: ((facet) => void)

Type declaration

facetFiltersChangedCallback?: ((data) => void)

Type declaration

    • (data): void
    • Called every time the facet filter selection changes — including the initial load. Receives the complete current ReportFacetsSelection (all active facets, direct hits, and full-text search term) so the report can re-render without needing to track individual changes.

      Prefer this over the deprecated facetChangedCallback.

      Parameters

      Returns void

factSheetIds?: string[]

If defined these direct hits will be applied in initial report loading

fixedFactSheetType?: string

If defined the facet will have a fixed filter on the fact sheet type with this value. Important to mention is that updating this value won't work. Therefore, we recommend creating a new facet if you want to change the fixed fact sheet type. Another recommendation is to always reflect the fact sheet type in the key value of the facet.

fullTextSearchTerm?: string

If defined this full text search term is applied in initial report loading

key: string
label?: string
sortings?: Sorting[]

Generated using TypeDoc