Partner Updated
The personal data of a franchise partner changed in CNA Nexus - name, legal name, e-mail, phone or birth date. Snapshot of the person, keyed by the person id. To be published by cna-nexus and consumed by cna-one; neither side has the class yet.
Overview
Fact: the data of a PartnerPartnerEntityv1.0.0A person (common.persons in Nexus) in their capacity as partner of one or more franchise units - the identity and contac...Ownercna-platformView docs changed. The payload is the snapshot of the person as common.persons holds it after the change: the same fields 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 carries in person, without isFranchisee, and without the roles or the units, which belong to the 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 links on Franchise (Kafka topic)Franchise (Kafka topic)Channelv1.0.0Kafka topic for the Franchise aggregate. Carries the nine NEXUS events about franchise units, their addresses, economic ...Ownercna-platformView docs.
Why it exists. Editing a person in Nexus (updatePerson) writes straight to common.persons and publishes nothing. The partner events only go out when a link is added, removed or changes roles, so a new e-mail, phone, name or birth date of a partner reached CNA OneCNA OneServicev1.0.0Franchise operating system (franchises and employees, pricing, products and learning books, school operations). Publishe...PublishesGrantApplicationAccess, EmployeeCreated +6SubscribesInviteUser, FranchiseCreated +9Ownercna-platformMapRepoView docs only by accident, inside the next FranchiseUpdated snapshot of one of their units. PartnerUpdated carries that change on its own, keyed by the person, and leaves the partner events with their single meaning: the link changed.
When it is published (target). 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 the updatePerson command, registered with manager.afterCommit(), when both hold:
- the person holds at least one
FranchisePartnerlink (existsFranchisePartnerByPersonId); a person with no link is not a partner and publishes nothing; - at least one field of the payload actually changed. A no-op update publishes nothing, which is what keeps a consumer that mirrors and re-announces the person from looping.
Not published by createPerson (the link that makes the person a partner arrives as FranchisePartnerAdded with the same snapshot), by updatePersonSituation (the situation is not in the payload) or by deletePerson. birthDate is formatted with toCalendarDate, as in the partner events since 1.1.0.
What the consumer does (target). cna-one, on a consumer of the Partner topic: normalises document, looks the person up by it, and drops the message with a log when no person is stored, since a partner it never mirrored is not one it has to update. When the person is known it rewrites the mirrored fields (name split into name and surname, e-mail under the same uniqueness rules the partner sync applies, phone, birth date) and re-announces the person as EmployeeUpdated when they are an employee, so CNA AuthCNA AuthServicev1.0.0Authentication and identity provider for the CNA platform (accounts, tokens, OTP/2FA, per-application access grants). Co...SubscribesGrantApplicationAccess, RevokeApplicationAccess +2Ownercna-platformMapRepoView docs sees the new e-mail. cna-one does not publish a person event back.
Kafka
Topic (aggregateRoot) | Partner |
Message key (routingKey) | payload.id |
| Contract owner | NEXUS |
metadata.event | PartnerUpdated |
metadata.version | 1.0.0 |
| Consumer group | none yet (cna-one, to be created) |
Payload schema
Flat snapshot of the person. id, document, documentType and name are always present; the rest is optional and nullable. document cannot change in Nexus, so it is a stable correlation key.
Source of truth
Target class, to be created in cna-nexus at api/app/events/nexus/partner/PartnerUpdated.ts:
export type PartnerUpdatedPayload = { id: string; document: string; documentType: PersonsDocumentType; name: string; legalName?: string | null; email?: string | null; phone?: string | null; birthDate?: string | null; // YYYY-MM-DD};
export class PartnerUpdated extends Event<PartnerUpdatedPayload> { static readonly owner = 'NEXUS'; static readonly aggregateRoot = 'Partner'; static readonly routingKey = 'id'; static readonly version = '1.0.0';}Known drift
Observed 2026-09-24.
- cna-nexus, the canonical repository, has no
PartnerUpdatedclass andupdatePerson(api/app/domains/common/person/commands/updatePerson.ts) emits nothing. The class above is the target; theNo producerbadge and this note go when the cna-nexus pull request is in production, and its link goes here when it opens. - cna-one has no class and no consumer on the
Partnertopic. Its partner ingestion (branchjl/feature/CWH-49388-consume-franchise-partner-events, not merged) already reads the same person block from the partner events and correlates by document; the consumer of this event is a task of its own. TheNo consumerbadge goes when it is in production.
Custom properties
| Property | Value |
|---|---|
| Contract Ownerx-contract-owner | NEXUS |
| Kafka Topicx-kafka-topic | Partner |
| Message Keyx-message-key | id |
| Sourcex-source | cna-nexus api/app/events/nexus/partner/PartnerUpdated.ts (target, not written yet) |
| Driftx-drift | No class exists in cna-nexus or cna-one yet. The contract was defined on 2026-09-24 and this page is written against the tasks opened for the two teams; the links go here when the pull requests open. |
Person id (UUID) in common.persons. Kafka message key. Same value as person.id in the FranchisePartner events.
Person document; format depends on documentType. The key cna-one correlates the person by.
Document type (PersonsDocumentType).
CPF CNPJ RNMPerson name.
Legal name, for companies.
E-mail, or null.
Phone, or null.
Birth date as a calendar day, YYYY-MM-DD, no time zone. Null when unknown.