Employee Created
v1.0.0eventsAn employee was created in CNA One, with the person it points at. Consumed by cna-auth to provision the account and the login user.
1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "title": "EmployeeCreated payload",
4 "type": "object",
5 "additionalProperties": false,
6 "properties": {
7 "id": {
8 "type": "string",
9 "description": "Employee id (UUID) in cna-one franchise.employees. Kafka message key; stored as employeeId on the cna-auth account and user."
10 },
11 "email": {
12 "type": "string",
13 "description": "Employee work e-mail, unique across employees. Becomes the cna-auth user e-mail."
14 },
15 "isActive": {
16 "type": "boolean",
17 "description": "Whether the employee is active. cna-auth sets blockedAt on the user when false and clears it when true."
18 },
19 "person": {
20 "type": "object",
21 "description": "Snapshot of the Person the employee points at (cna-one common.persons).",
22 "additionalProperties": false,
23 "properties": {
24 "id": {
25 "type": "string",
26 "description": "Person id (UUID). Stored as personId on the cna-auth account."
27 },
28 "name": {
29 "type": "string",
30 "description": "First name(s)."
31 },
32 "surname": {
33 "type": "string",
34 "description": "Surname. May be empty when the origin provided a single-word name."
35 },
36 "birthdate": {
37 "type": ["string", "null"],
38 "format": "date",
39 "description": "Birth date as YYYY-MM-DD, or null."
40 },
41 "document": {
42 "type": "string",
43 "description": "Person document without mask: 11 digits for CPF, 14 for CNPJ, alphanumeric for RNM."
44 },
45 "type": {
46 "type": "string",
47 "enum": ["CPF", "CNPJ", "RNM"],
48 "description": "Document type (cna-one DocumentType). cna-auth only accepts CPF and drops the others."
49 },
50 "email": {
51 "type": ["string", "null"],
52 "description": "Personal e-mail, or null."
53 },
54 "phone": {
55 "type": ["string", "null"],
56 "description": "Phone number, or null."
57 }
58 },
59 "required": ["id", "name", "surname", "document", "type"]
60 }
61 },
62 "required": ["id", "email", "isActive", "person"]
63}
64Details
- Format
- JSON Schema
- Resource
- events
- Filename
- schema.json