event

Class Parameter Assignment Updated

An existing ClassParameter binding changed — requiredness, inheritance mode, child behavior, or promotion from rendered to direct.

EventStatus: Implemented in api-v1

Purpose

Records a revision of an existing ClassParameter binding rather than a new one. Emitted only when something actually changed — a no-op revision emits nothing and skips the Airtable write. Promotion of a rendered (inherited) row to direct also lands here, because the binding identity is unchanged.

Payload

Envelope is { name, occurredAt, payload } (apps/api-v1/src/modules/shared/domain/events/DomainEvent.ts). All four ClassParameter* events share one payload type.

FieldTypeMeaning
classParameterIdClassParameterIdThe assignment record
objectClassIdObjectClassIdClass holding the assignment
parameterKeyIdParameterKeyIdCanonical key
allowedValueCountnumber (optional)Not populated on this event

Raised by

apps/api-v1/src/modules/bim-ontology/core/domain/class-parameter/ClassParameter.ts:

  • reviseBinding — requiredness plus inheritance mode (direct) or child behavior (rendered)
  • promoteToDirectAndReviseBinding — rendered overlay promoted to a direct assignment in one step
  • promoteToDirect — promotion alone; defined on the aggregate but not currently reached from any use case

Driven by UpsertClassParameterUseCase.upsertClassParameter (core/application/use-cases/ClassParameterUseCases.ts) — the same operation that raises ClassParameterAssigned when the binding does not exist yet.

HTTP: upsertClassParameter, assignClassParameters.

Consumers

The same two handlers as ClassParameterAssigned, both registered in bim-ontology.composition.ts:

HandlerEffect
ClassParameterDerivedRevitCategoryHandlerPersistDerivedRevitCategorySetsUseCase for the event’s parameterKeyId
RenderedParamTemplatesSyncHandlerSyncObjectClassRenderedParamTemplatesUseCase for the affected class subtree