Franchise Partner Updated(v1.0.0)
The roles of a franchise partner changed - roles are the only mutable field. Carries the roles before and after. Consumed by cna-nexus itself to invalidate the economic group statistics cache.
You are looking at a previous version of the event Franchise Partner Updated. The latest version of this event isv1.1.0 →
Overview
Fact: the roles of a Franchise PartnerFranchise PartnerEntityv1.0.0The link between a franchise unit and a person behind it, with one or more roles - FRANCHISEE (leads the unit) or OPERAT...Ownercna-platformView docs changed. The payload is the Franchise Partner AddedFranchise Partner AddedEventv1.1.0A person became a partner of a franchise unit, with their roles. One message per partner. Consumed by cna-nexus itself t...Ownercna-platformSchemaMapView docs payload plus previousRoles.
When it is published. CNA NexusCNA NexusServicev1.0.0Franchise network back-office (franchises, economic groups, partners, contracts and amendments, document storage, AI doc...PublishesInviteUser, ContractActivationRequested +13SubscribesContractActivationRequested, AmendmentApplyRequested +4Ownercna-platformMapRepoView docs, in updatePartners inside replaceFranchisePartners, only for partners whose incoming roles differ from the stored ones. Registered with manager.afterCommit(), one message per changed partner.
What the consumer does. Same as for FranchisePartnerAdded: cna-nexus bumps the updatedAt of the franchise’s economic group, if any. A role change can move a person in or out of the franchisee count.
Kafka
Topic (aggregateRoot) | Franchise |
Message key (routingKey) | payload.franchiseId |
| Contract owner | NEXUS |
metadata.event | FranchisePartnerUpdated |
| Consumer group | economic-group-partner-touch |
Payload schema
Source of truth
export type FranchisePartnerUpdatedPayload = { franchiseId: string; roles: FranchisePartnerRole[]; previousRoles: FranchisePartnerRole[]; person: FranchisePartnerEventPerson;};
export class FranchisePartnerUpdated extends Event<FranchisePartnerUpdatedPayload> { static readonly owner = 'NEXUS'; static readonly aggregateRoot = 'Franchise'; static readonly routingKey = 'franchiseId';}Custom properties
| Property | Value |
|---|---|
| Contract Ownerx-contract-owner | NEXUS |
| Kafka Topicx-kafka-topic | Franchise |
| Message Keyx-message-key | franchiseId |
| Sourcex-source | cna-nexus api/app/events/nexus/franchise/FranchisePartnerUpdated.ts |
Franchise id (UUID). Kafka message key.
Roles after the change (FranchisePartnerRole). Never empty.
Roles before the change.
Snapshot of the person (common.persons).