event

Parameter Group Changed

A ParameterGroup was created or renamed. Renaming a group resyncs derived Revit projection metadata.

EventStatus: Implemented in api-v1

Purpose

The only domain event ParameterGroup has. One event name covers both create and rename, discriminated by change. It matters downstream because group naming feeds derived Revit projection metadata, so renaming a group is not a cosmetic operation.

Payload

Envelope is { name, occurredAt, payload } (apps/api-v1/src/modules/shared/domain/events/DomainEvent.ts).

FieldTypeMeaning
parameterGroupIdParameterGroupIdGroup that changed
change'created' | 'renamed'Which mutation happened
namestringGroup label after the change
previousNamestring | nullPrior label on renamed; null on created
changedAtDateWhen the change happened

Raised by

  • ParameterGroup.create (change: 'created') and ParameterGroup.rename (change: 'renamed') — apps/api-v1/src/modules/bim-ontology/core/domain/parameter-group/ParameterGroup.ts
  • CreateParameterGroupUseCase and UpdateParameterGroupUseCaseapps/api-v1/src/modules/bim-ontology/core/application/use-cases/ParameterGroupAuthoringUseCases.ts. A rename to the same name emits nothing and skips the Airtable write, so Airtable “when record updated” automations cannot loop
  • HTTP: createParameterGroup, updateParameterGroup

Consumers

CanonicalProjectionMetadataChangedHandler (adapters/inbound/events/) — the same instance that handles ParameterKeyUpdated — is registered in bim-ontology.composition.ts and calls ResyncDerivedProjectionMetadataUseCase.resyncForParameterGroup. That walks every projection derived from the group and refreshes its non-overridden metadata; projections whose nameSource is override are left alone.

A resync that changes shared-parameter-file output on an approved projection demotes it to draft.