youeduc-sdk-messaging 0.0.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +218 -0
- package/dist/admin.d.ts +61 -0
- package/dist/admin.js +143 -0
- package/dist/admin.js.map +1 -0
- package/dist/config.d.ts +74 -0
- package/dist/config.js +128 -0
- package/dist/config.js.map +1 -0
- package/dist/consumer-client.d.ts +155 -0
- package/dist/consumer-client.js +299 -0
- package/dist/consumer-client.js.map +1 -0
- package/dist/consumer.d.ts +156 -0
- package/dist/consumer.js +1228 -0
- package/dist/consumer.js.map +1 -0
- package/dist/contracts/index.d.ts +16 -0
- package/dist/contracts/index.js +42 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/schemas.d.ts +570 -0
- package/dist/contracts/schemas.js +902 -0
- package/dist/contracts/schemas.js.map +1 -0
- package/dist/contracts/usuarios.d.ts +163 -0
- package/dist/contracts/usuarios.js +5 -0
- package/dist/contracts/usuarios.js.map +1 -0
- package/dist/dedup.d.ts +29 -0
- package/dist/dedup.js +65 -0
- package/dist/dedup.js.map +1 -0
- package/dist/dlq.d.ts +161 -0
- package/dist/dlq.js +341 -0
- package/dist/dlq.js.map +1 -0
- package/dist/errors.d.ts +72 -0
- package/dist/errors.js +95 -0
- package/dist/errors.js.map +1 -0
- package/dist/headers.d.ts +92 -0
- package/dist/headers.js +144 -0
- package/dist/headers.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/redis.d.ts +118 -0
- package/dist/integrations/redis.js +272 -0
- package/dist/integrations/redis.js.map +1 -0
- package/dist/integrations/runtime.d.ts +232 -0
- package/dist/integrations/runtime.js +554 -0
- package/dist/integrations/runtime.js.map +1 -0
- package/dist/logger.d.ts +37 -0
- package/dist/logger.js +49 -0
- package/dist/logger.js.map +1 -0
- package/dist/messaging.d.ts +145 -0
- package/dist/messaging.js +164 -0
- package/dist/messaging.js.map +1 -0
- package/dist/naming.d.ts +64 -0
- package/dist/naming.js +167 -0
- package/dist/naming.js.map +1 -0
- package/dist/payload.d.ts +8 -0
- package/dist/payload.js +32 -0
- package/dist/payload.js.map +1 -0
- package/dist/publisher.d.ts +50 -0
- package/dist/publisher.js +199 -0
- package/dist/publisher.js.map +1 -0
- package/dist/retry.d.ts +24 -0
- package/dist/retry.js +42 -0
- package/dist/retry.js.map +1 -0
- package/dist/schema.d.ts +83 -0
- package/dist/schema.js +676 -0
- package/dist/schema.js.map +1 -0
- package/dist/telemetry.d.ts +52 -0
- package/dist/telemetry.js +221 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/transport.d.ts +130 -0
- package/dist/transport.js +283 -0
- package/dist/transport.js.map +1 -0
- package/dist/types.d.ts +148 -0
- package/dist/types.js +35 -0
- package/dist/types.js.map +1 -0
- package/dist/util.d.ts +38 -0
- package/dist/util.js +112 -0
- package/dist/util.js.map +1 -0
- package/dist/w3c.d.ts +16 -0
- package/dist/w3c.js +119 -0
- package/dist/w3c.js.map +1 -0
- package/package.json +74 -1
|
@@ -0,0 +1,902 @@
|
|
|
1
|
+
// Gerado por scripts/gen_contracts.py a partir de contracts/ — não edite.
|
|
2
|
+
// biome-ignore-all format: arquivo gerado por scripts/gen_contracts.py
|
|
3
|
+
// biome-ignore-all lint: arquivo gerado por scripts/gen_contracts.py
|
|
4
|
+
/** Schemas empacotados: `bundledSchemas[domínio][slug][versão]` (cópia de `contracts/schemas`). */
|
|
5
|
+
export const bundledSchemas = deepFreeze({
|
|
6
|
+
"usuarios": {
|
|
7
|
+
"usuario-atualizado": {
|
|
8
|
+
"v1": {
|
|
9
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
10
|
+
"title": "usuario.atualizado (v1)",
|
|
11
|
+
"description": "Cadastro alterado. Carrega o cadastro COMPLETO (snapshot) e a lista dos campos alterados.",
|
|
12
|
+
"type": "object",
|
|
13
|
+
"required": [
|
|
14
|
+
"versao",
|
|
15
|
+
"ocorrido_em",
|
|
16
|
+
"usuario",
|
|
17
|
+
"campos_alterados"
|
|
18
|
+
],
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"properties": {
|
|
21
|
+
"versao": {
|
|
22
|
+
"$ref": "#/$defs/versao"
|
|
23
|
+
},
|
|
24
|
+
"ocorrido_em": {
|
|
25
|
+
"$ref": "#/$defs/ocorrido_em"
|
|
26
|
+
},
|
|
27
|
+
"usuario": {
|
|
28
|
+
"$ref": "#/$defs/usuario"
|
|
29
|
+
},
|
|
30
|
+
"campos_alterados": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"minItems": 1,
|
|
33
|
+
"uniqueItems": true,
|
|
34
|
+
"items": {
|
|
35
|
+
"enum": [
|
|
36
|
+
"ativo",
|
|
37
|
+
"idunica",
|
|
38
|
+
"cpf",
|
|
39
|
+
"nis",
|
|
40
|
+
"nome",
|
|
41
|
+
"nome_civil",
|
|
42
|
+
"data_nascimento",
|
|
43
|
+
"genero",
|
|
44
|
+
"email",
|
|
45
|
+
"telefone",
|
|
46
|
+
"nome_pai",
|
|
47
|
+
"nome_mae",
|
|
48
|
+
"responsavel_legal_nome",
|
|
49
|
+
"responsavel_legal_tipo",
|
|
50
|
+
"endereco_cep",
|
|
51
|
+
"endereco_uf",
|
|
52
|
+
"endereco_cidade",
|
|
53
|
+
"endereco_bairro",
|
|
54
|
+
"endereco_tipo_logradouro",
|
|
55
|
+
"endereco_logradouro",
|
|
56
|
+
"endereco_numero",
|
|
57
|
+
"raca_cor",
|
|
58
|
+
"bolsa_familia",
|
|
59
|
+
"tipo_usuario"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"description": "Atributos que mudaram nesta versão (informativo; o estado é o snapshot)."
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"$defs": {
|
|
66
|
+
"login": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"maxLength": 255,
|
|
70
|
+
"pattern": "^\\S+$",
|
|
71
|
+
"description": "YRN do usuário: identificador estável e chave da mensagem no Kafka. Sem espaços; comparação exata (sensível a maiúsculas)."
|
|
72
|
+
},
|
|
73
|
+
"versao": {
|
|
74
|
+
"type": "integer",
|
|
75
|
+
"minimum": 1,
|
|
76
|
+
"description": "Contador monotônico por usuário (continua após login-alterado). O consumidor ignora eventos com versão menor ou igual à que já aplicou."
|
|
77
|
+
},
|
|
78
|
+
"ocorrido_em": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"format": "date-time",
|
|
81
|
+
"description": "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso)."
|
|
82
|
+
},
|
|
83
|
+
"usuario": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"required": [
|
|
86
|
+
"login",
|
|
87
|
+
"ativo",
|
|
88
|
+
"idunica",
|
|
89
|
+
"cpf",
|
|
90
|
+
"nis",
|
|
91
|
+
"nome",
|
|
92
|
+
"nome_civil",
|
|
93
|
+
"data_nascimento",
|
|
94
|
+
"genero",
|
|
95
|
+
"email",
|
|
96
|
+
"telefone",
|
|
97
|
+
"nome_pai",
|
|
98
|
+
"nome_mae",
|
|
99
|
+
"responsavel_legal_nome",
|
|
100
|
+
"responsavel_legal_tipo",
|
|
101
|
+
"endereco_cep",
|
|
102
|
+
"endereco_uf",
|
|
103
|
+
"endereco_cidade",
|
|
104
|
+
"endereco_bairro",
|
|
105
|
+
"endereco_tipo_logradouro",
|
|
106
|
+
"endereco_logradouro",
|
|
107
|
+
"endereco_numero",
|
|
108
|
+
"raca_cor",
|
|
109
|
+
"bolsa_familia",
|
|
110
|
+
"tipo_usuario"
|
|
111
|
+
],
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"properties": {
|
|
114
|
+
"login": {
|
|
115
|
+
"$ref": "#/$defs/login"
|
|
116
|
+
},
|
|
117
|
+
"ativo": {
|
|
118
|
+
"type": "boolean",
|
|
119
|
+
"description": "Situação do cadastro. false após usuario.desativado; true após usuario.reativado."
|
|
120
|
+
},
|
|
121
|
+
"idunica": {
|
|
122
|
+
"type": [
|
|
123
|
+
"string",
|
|
124
|
+
"null"
|
|
125
|
+
],
|
|
126
|
+
"minLength": 1,
|
|
127
|
+
"maxLength": 255,
|
|
128
|
+
"description": "Identificador único entre os sistemas (nem todo usuário tem)."
|
|
129
|
+
},
|
|
130
|
+
"cpf": {
|
|
131
|
+
"type": [
|
|
132
|
+
"string",
|
|
133
|
+
"null"
|
|
134
|
+
],
|
|
135
|
+
"pattern": "^[0-9]{11}$",
|
|
136
|
+
"description": "CPF, 11 dígitos, sem máscara."
|
|
137
|
+
},
|
|
138
|
+
"nis": {
|
|
139
|
+
"type": [
|
|
140
|
+
"string",
|
|
141
|
+
"null"
|
|
142
|
+
],
|
|
143
|
+
"pattern": "^[0-9]{11}$",
|
|
144
|
+
"description": "NIS/PIS, 11 dígitos, sem máscara."
|
|
145
|
+
},
|
|
146
|
+
"nome": {
|
|
147
|
+
"type": [
|
|
148
|
+
"string",
|
|
149
|
+
"null"
|
|
150
|
+
],
|
|
151
|
+
"minLength": 1,
|
|
152
|
+
"maxLength": 255,
|
|
153
|
+
"description": "Nome social, quando houver; senão o nome civil."
|
|
154
|
+
},
|
|
155
|
+
"nome_civil": {
|
|
156
|
+
"type": [
|
|
157
|
+
"string",
|
|
158
|
+
"null"
|
|
159
|
+
],
|
|
160
|
+
"minLength": 1,
|
|
161
|
+
"maxLength": 255,
|
|
162
|
+
"description": "Nome civil (de registro); nunca o nome social."
|
|
163
|
+
},
|
|
164
|
+
"data_nascimento": {
|
|
165
|
+
"type": [
|
|
166
|
+
"string",
|
|
167
|
+
"null"
|
|
168
|
+
],
|
|
169
|
+
"format": "date",
|
|
170
|
+
"description": "AAAA-MM-DD."
|
|
171
|
+
},
|
|
172
|
+
"genero": {
|
|
173
|
+
"enum": [
|
|
174
|
+
"MASCULINO",
|
|
175
|
+
"FEMININO",
|
|
176
|
+
"OUTROS",
|
|
177
|
+
null
|
|
178
|
+
],
|
|
179
|
+
"description": "Gênero."
|
|
180
|
+
},
|
|
181
|
+
"email": {
|
|
182
|
+
"type": [
|
|
183
|
+
"string",
|
|
184
|
+
"null"
|
|
185
|
+
],
|
|
186
|
+
"format": "email",
|
|
187
|
+
"maxLength": 254,
|
|
188
|
+
"description": "E-mail."
|
|
189
|
+
},
|
|
190
|
+
"telefone": {
|
|
191
|
+
"type": [
|
|
192
|
+
"string",
|
|
193
|
+
"null"
|
|
194
|
+
],
|
|
195
|
+
"pattern": "^[0-9]{10,11}$",
|
|
196
|
+
"description": "Só dígitos, com DDD (10 ou 11 dígitos)."
|
|
197
|
+
},
|
|
198
|
+
"nome_pai": {
|
|
199
|
+
"type": [
|
|
200
|
+
"string",
|
|
201
|
+
"null"
|
|
202
|
+
],
|
|
203
|
+
"minLength": 1,
|
|
204
|
+
"maxLength": 255,
|
|
205
|
+
"description": "Nome do pai."
|
|
206
|
+
},
|
|
207
|
+
"nome_mae": {
|
|
208
|
+
"type": [
|
|
209
|
+
"string",
|
|
210
|
+
"null"
|
|
211
|
+
],
|
|
212
|
+
"minLength": 1,
|
|
213
|
+
"maxLength": 255,
|
|
214
|
+
"description": "Nome da mãe."
|
|
215
|
+
},
|
|
216
|
+
"responsavel_legal_nome": {
|
|
217
|
+
"type": [
|
|
218
|
+
"string",
|
|
219
|
+
"null"
|
|
220
|
+
],
|
|
221
|
+
"minLength": 1,
|
|
222
|
+
"maxLength": 255,
|
|
223
|
+
"description": "Nome do responsável legal."
|
|
224
|
+
},
|
|
225
|
+
"responsavel_legal_tipo": {
|
|
226
|
+
"enum": [
|
|
227
|
+
"PAI",
|
|
228
|
+
"MAE",
|
|
229
|
+
"OUTROS",
|
|
230
|
+
null
|
|
231
|
+
],
|
|
232
|
+
"description": "Tipo do responsável legal."
|
|
233
|
+
},
|
|
234
|
+
"endereco_cep": {
|
|
235
|
+
"type": [
|
|
236
|
+
"string",
|
|
237
|
+
"null"
|
|
238
|
+
],
|
|
239
|
+
"pattern": "^[0-9]{8}$",
|
|
240
|
+
"description": "CEP, 8 dígitos, sem máscara."
|
|
241
|
+
},
|
|
242
|
+
"endereco_uf": {
|
|
243
|
+
"enum": [
|
|
244
|
+
"AC",
|
|
245
|
+
"AL",
|
|
246
|
+
"AP",
|
|
247
|
+
"AM",
|
|
248
|
+
"BA",
|
|
249
|
+
"CE",
|
|
250
|
+
"DF",
|
|
251
|
+
"ES",
|
|
252
|
+
"GO",
|
|
253
|
+
"MA",
|
|
254
|
+
"MT",
|
|
255
|
+
"MS",
|
|
256
|
+
"MG",
|
|
257
|
+
"PA",
|
|
258
|
+
"PB",
|
|
259
|
+
"PR",
|
|
260
|
+
"PE",
|
|
261
|
+
"PI",
|
|
262
|
+
"RJ",
|
|
263
|
+
"RN",
|
|
264
|
+
"RS",
|
|
265
|
+
"RO",
|
|
266
|
+
"RR",
|
|
267
|
+
"SC",
|
|
268
|
+
"SP",
|
|
269
|
+
"SE",
|
|
270
|
+
"TO",
|
|
271
|
+
null
|
|
272
|
+
],
|
|
273
|
+
"description": "Sigla da UF."
|
|
274
|
+
},
|
|
275
|
+
"endereco_cidade": {
|
|
276
|
+
"type": [
|
|
277
|
+
"string",
|
|
278
|
+
"null"
|
|
279
|
+
],
|
|
280
|
+
"minLength": 1,
|
|
281
|
+
"maxLength": 255,
|
|
282
|
+
"description": "Cidade."
|
|
283
|
+
},
|
|
284
|
+
"endereco_bairro": {
|
|
285
|
+
"type": [
|
|
286
|
+
"string",
|
|
287
|
+
"null"
|
|
288
|
+
],
|
|
289
|
+
"minLength": 1,
|
|
290
|
+
"maxLength": 255,
|
|
291
|
+
"description": "Bairro."
|
|
292
|
+
},
|
|
293
|
+
"endereco_tipo_logradouro": {
|
|
294
|
+
"type": [
|
|
295
|
+
"string",
|
|
296
|
+
"null"
|
|
297
|
+
],
|
|
298
|
+
"minLength": 1,
|
|
299
|
+
"maxLength": 255,
|
|
300
|
+
"description": "Tipo do logradouro (Rua, Avenida...)."
|
|
301
|
+
},
|
|
302
|
+
"endereco_logradouro": {
|
|
303
|
+
"type": [
|
|
304
|
+
"string",
|
|
305
|
+
"null"
|
|
306
|
+
],
|
|
307
|
+
"minLength": 1,
|
|
308
|
+
"maxLength": 255,
|
|
309
|
+
"description": "Logradouro."
|
|
310
|
+
},
|
|
311
|
+
"endereco_numero": {
|
|
312
|
+
"type": [
|
|
313
|
+
"string",
|
|
314
|
+
"null"
|
|
315
|
+
],
|
|
316
|
+
"minLength": 1,
|
|
317
|
+
"maxLength": 20,
|
|
318
|
+
"description": "Número (texto: aceita 'S/N', '12A')."
|
|
319
|
+
},
|
|
320
|
+
"raca_cor": {
|
|
321
|
+
"enum": [
|
|
322
|
+
"BRANCA",
|
|
323
|
+
"PRETA",
|
|
324
|
+
"PARDA",
|
|
325
|
+
"AMARELA",
|
|
326
|
+
"INDIGENA",
|
|
327
|
+
null
|
|
328
|
+
],
|
|
329
|
+
"description": "Raça/cor (dado sensível, LGPD art. 11)."
|
|
330
|
+
},
|
|
331
|
+
"bolsa_familia": {
|
|
332
|
+
"type": [
|
|
333
|
+
"boolean",
|
|
334
|
+
"null"
|
|
335
|
+
],
|
|
336
|
+
"description": "Beneficiário do Bolsa Família (dado sensível)."
|
|
337
|
+
},
|
|
338
|
+
"tipo_usuario": {
|
|
339
|
+
"enum": [
|
|
340
|
+
"PROFESSOR",
|
|
341
|
+
"ALUNO",
|
|
342
|
+
"OPERACIONAL",
|
|
343
|
+
null
|
|
344
|
+
],
|
|
345
|
+
"description": "Tipo do usuário (um único tipo por usuário)."
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
},
|
|
352
|
+
"usuario-criado": {
|
|
353
|
+
"v1": {
|
|
354
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
355
|
+
"title": "usuario.criado (v1)",
|
|
356
|
+
"description": "Usuário criado no sistema de origem. Carrega o cadastro completo.",
|
|
357
|
+
"type": "object",
|
|
358
|
+
"required": [
|
|
359
|
+
"versao",
|
|
360
|
+
"ocorrido_em",
|
|
361
|
+
"usuario"
|
|
362
|
+
],
|
|
363
|
+
"additionalProperties": false,
|
|
364
|
+
"properties": {
|
|
365
|
+
"versao": {
|
|
366
|
+
"$ref": "#/$defs/versao"
|
|
367
|
+
},
|
|
368
|
+
"ocorrido_em": {
|
|
369
|
+
"$ref": "#/$defs/ocorrido_em"
|
|
370
|
+
},
|
|
371
|
+
"usuario": {
|
|
372
|
+
"$ref": "#/$defs/usuario"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"$defs": {
|
|
376
|
+
"login": {
|
|
377
|
+
"type": "string",
|
|
378
|
+
"minLength": 1,
|
|
379
|
+
"maxLength": 255,
|
|
380
|
+
"pattern": "^\\S+$",
|
|
381
|
+
"description": "YRN do usuário: identificador estável e chave da mensagem no Kafka. Sem espaços; comparação exata (sensível a maiúsculas)."
|
|
382
|
+
},
|
|
383
|
+
"versao": {
|
|
384
|
+
"type": "integer",
|
|
385
|
+
"minimum": 1,
|
|
386
|
+
"description": "Contador monotônico por usuário (continua após login-alterado). O consumidor ignora eventos com versão menor ou igual à que já aplicou."
|
|
387
|
+
},
|
|
388
|
+
"ocorrido_em": {
|
|
389
|
+
"type": "string",
|
|
390
|
+
"format": "date-time",
|
|
391
|
+
"description": "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso)."
|
|
392
|
+
},
|
|
393
|
+
"usuario": {
|
|
394
|
+
"type": "object",
|
|
395
|
+
"required": [
|
|
396
|
+
"login",
|
|
397
|
+
"ativo",
|
|
398
|
+
"idunica",
|
|
399
|
+
"cpf",
|
|
400
|
+
"nis",
|
|
401
|
+
"nome",
|
|
402
|
+
"nome_civil",
|
|
403
|
+
"data_nascimento",
|
|
404
|
+
"genero",
|
|
405
|
+
"email",
|
|
406
|
+
"telefone",
|
|
407
|
+
"nome_pai",
|
|
408
|
+
"nome_mae",
|
|
409
|
+
"responsavel_legal_nome",
|
|
410
|
+
"responsavel_legal_tipo",
|
|
411
|
+
"endereco_cep",
|
|
412
|
+
"endereco_uf",
|
|
413
|
+
"endereco_cidade",
|
|
414
|
+
"endereco_bairro",
|
|
415
|
+
"endereco_tipo_logradouro",
|
|
416
|
+
"endereco_logradouro",
|
|
417
|
+
"endereco_numero",
|
|
418
|
+
"raca_cor",
|
|
419
|
+
"bolsa_familia",
|
|
420
|
+
"tipo_usuario"
|
|
421
|
+
],
|
|
422
|
+
"additionalProperties": false,
|
|
423
|
+
"properties": {
|
|
424
|
+
"login": {
|
|
425
|
+
"$ref": "#/$defs/login"
|
|
426
|
+
},
|
|
427
|
+
"ativo": {
|
|
428
|
+
"type": "boolean",
|
|
429
|
+
"description": "Situação do cadastro. false após usuario.desativado; true após usuario.reativado."
|
|
430
|
+
},
|
|
431
|
+
"idunica": {
|
|
432
|
+
"type": [
|
|
433
|
+
"string",
|
|
434
|
+
"null"
|
|
435
|
+
],
|
|
436
|
+
"minLength": 1,
|
|
437
|
+
"maxLength": 255,
|
|
438
|
+
"description": "Identificador único entre os sistemas (nem todo usuário tem)."
|
|
439
|
+
},
|
|
440
|
+
"cpf": {
|
|
441
|
+
"type": [
|
|
442
|
+
"string",
|
|
443
|
+
"null"
|
|
444
|
+
],
|
|
445
|
+
"pattern": "^[0-9]{11}$",
|
|
446
|
+
"description": "CPF, 11 dígitos, sem máscara."
|
|
447
|
+
},
|
|
448
|
+
"nis": {
|
|
449
|
+
"type": [
|
|
450
|
+
"string",
|
|
451
|
+
"null"
|
|
452
|
+
],
|
|
453
|
+
"pattern": "^[0-9]{11}$",
|
|
454
|
+
"description": "NIS/PIS, 11 dígitos, sem máscara."
|
|
455
|
+
},
|
|
456
|
+
"nome": {
|
|
457
|
+
"type": [
|
|
458
|
+
"string",
|
|
459
|
+
"null"
|
|
460
|
+
],
|
|
461
|
+
"minLength": 1,
|
|
462
|
+
"maxLength": 255,
|
|
463
|
+
"description": "Nome social, quando houver; senão o nome civil."
|
|
464
|
+
},
|
|
465
|
+
"nome_civil": {
|
|
466
|
+
"type": [
|
|
467
|
+
"string",
|
|
468
|
+
"null"
|
|
469
|
+
],
|
|
470
|
+
"minLength": 1,
|
|
471
|
+
"maxLength": 255,
|
|
472
|
+
"description": "Nome civil (de registro); nunca o nome social."
|
|
473
|
+
},
|
|
474
|
+
"data_nascimento": {
|
|
475
|
+
"type": [
|
|
476
|
+
"string",
|
|
477
|
+
"null"
|
|
478
|
+
],
|
|
479
|
+
"format": "date",
|
|
480
|
+
"description": "AAAA-MM-DD."
|
|
481
|
+
},
|
|
482
|
+
"genero": {
|
|
483
|
+
"enum": [
|
|
484
|
+
"MASCULINO",
|
|
485
|
+
"FEMININO",
|
|
486
|
+
"OUTROS",
|
|
487
|
+
null
|
|
488
|
+
],
|
|
489
|
+
"description": "Gênero."
|
|
490
|
+
},
|
|
491
|
+
"email": {
|
|
492
|
+
"type": [
|
|
493
|
+
"string",
|
|
494
|
+
"null"
|
|
495
|
+
],
|
|
496
|
+
"format": "email",
|
|
497
|
+
"maxLength": 254,
|
|
498
|
+
"description": "E-mail."
|
|
499
|
+
},
|
|
500
|
+
"telefone": {
|
|
501
|
+
"type": [
|
|
502
|
+
"string",
|
|
503
|
+
"null"
|
|
504
|
+
],
|
|
505
|
+
"pattern": "^[0-9]{10,11}$",
|
|
506
|
+
"description": "Só dígitos, com DDD (10 ou 11 dígitos)."
|
|
507
|
+
},
|
|
508
|
+
"nome_pai": {
|
|
509
|
+
"type": [
|
|
510
|
+
"string",
|
|
511
|
+
"null"
|
|
512
|
+
],
|
|
513
|
+
"minLength": 1,
|
|
514
|
+
"maxLength": 255,
|
|
515
|
+
"description": "Nome do pai."
|
|
516
|
+
},
|
|
517
|
+
"nome_mae": {
|
|
518
|
+
"type": [
|
|
519
|
+
"string",
|
|
520
|
+
"null"
|
|
521
|
+
],
|
|
522
|
+
"minLength": 1,
|
|
523
|
+
"maxLength": 255,
|
|
524
|
+
"description": "Nome da mãe."
|
|
525
|
+
},
|
|
526
|
+
"responsavel_legal_nome": {
|
|
527
|
+
"type": [
|
|
528
|
+
"string",
|
|
529
|
+
"null"
|
|
530
|
+
],
|
|
531
|
+
"minLength": 1,
|
|
532
|
+
"maxLength": 255,
|
|
533
|
+
"description": "Nome do responsável legal."
|
|
534
|
+
},
|
|
535
|
+
"responsavel_legal_tipo": {
|
|
536
|
+
"enum": [
|
|
537
|
+
"PAI",
|
|
538
|
+
"MAE",
|
|
539
|
+
"OUTROS",
|
|
540
|
+
null
|
|
541
|
+
],
|
|
542
|
+
"description": "Tipo do responsável legal."
|
|
543
|
+
},
|
|
544
|
+
"endereco_cep": {
|
|
545
|
+
"type": [
|
|
546
|
+
"string",
|
|
547
|
+
"null"
|
|
548
|
+
],
|
|
549
|
+
"pattern": "^[0-9]{8}$",
|
|
550
|
+
"description": "CEP, 8 dígitos, sem máscara."
|
|
551
|
+
},
|
|
552
|
+
"endereco_uf": {
|
|
553
|
+
"enum": [
|
|
554
|
+
"AC",
|
|
555
|
+
"AL",
|
|
556
|
+
"AP",
|
|
557
|
+
"AM",
|
|
558
|
+
"BA",
|
|
559
|
+
"CE",
|
|
560
|
+
"DF",
|
|
561
|
+
"ES",
|
|
562
|
+
"GO",
|
|
563
|
+
"MA",
|
|
564
|
+
"MT",
|
|
565
|
+
"MS",
|
|
566
|
+
"MG",
|
|
567
|
+
"PA",
|
|
568
|
+
"PB",
|
|
569
|
+
"PR",
|
|
570
|
+
"PE",
|
|
571
|
+
"PI",
|
|
572
|
+
"RJ",
|
|
573
|
+
"RN",
|
|
574
|
+
"RS",
|
|
575
|
+
"RO",
|
|
576
|
+
"RR",
|
|
577
|
+
"SC",
|
|
578
|
+
"SP",
|
|
579
|
+
"SE",
|
|
580
|
+
"TO",
|
|
581
|
+
null
|
|
582
|
+
],
|
|
583
|
+
"description": "Sigla da UF."
|
|
584
|
+
},
|
|
585
|
+
"endereco_cidade": {
|
|
586
|
+
"type": [
|
|
587
|
+
"string",
|
|
588
|
+
"null"
|
|
589
|
+
],
|
|
590
|
+
"minLength": 1,
|
|
591
|
+
"maxLength": 255,
|
|
592
|
+
"description": "Cidade."
|
|
593
|
+
},
|
|
594
|
+
"endereco_bairro": {
|
|
595
|
+
"type": [
|
|
596
|
+
"string",
|
|
597
|
+
"null"
|
|
598
|
+
],
|
|
599
|
+
"minLength": 1,
|
|
600
|
+
"maxLength": 255,
|
|
601
|
+
"description": "Bairro."
|
|
602
|
+
},
|
|
603
|
+
"endereco_tipo_logradouro": {
|
|
604
|
+
"type": [
|
|
605
|
+
"string",
|
|
606
|
+
"null"
|
|
607
|
+
],
|
|
608
|
+
"minLength": 1,
|
|
609
|
+
"maxLength": 255,
|
|
610
|
+
"description": "Tipo do logradouro (Rua, Avenida...)."
|
|
611
|
+
},
|
|
612
|
+
"endereco_logradouro": {
|
|
613
|
+
"type": [
|
|
614
|
+
"string",
|
|
615
|
+
"null"
|
|
616
|
+
],
|
|
617
|
+
"minLength": 1,
|
|
618
|
+
"maxLength": 255,
|
|
619
|
+
"description": "Logradouro."
|
|
620
|
+
},
|
|
621
|
+
"endereco_numero": {
|
|
622
|
+
"type": [
|
|
623
|
+
"string",
|
|
624
|
+
"null"
|
|
625
|
+
],
|
|
626
|
+
"minLength": 1,
|
|
627
|
+
"maxLength": 20,
|
|
628
|
+
"description": "Número (texto: aceita 'S/N', '12A')."
|
|
629
|
+
},
|
|
630
|
+
"raca_cor": {
|
|
631
|
+
"enum": [
|
|
632
|
+
"BRANCA",
|
|
633
|
+
"PRETA",
|
|
634
|
+
"PARDA",
|
|
635
|
+
"AMARELA",
|
|
636
|
+
"INDIGENA",
|
|
637
|
+
null
|
|
638
|
+
],
|
|
639
|
+
"description": "Raça/cor (dado sensível, LGPD art. 11)."
|
|
640
|
+
},
|
|
641
|
+
"bolsa_familia": {
|
|
642
|
+
"type": [
|
|
643
|
+
"boolean",
|
|
644
|
+
"null"
|
|
645
|
+
],
|
|
646
|
+
"description": "Beneficiário do Bolsa Família (dado sensível)."
|
|
647
|
+
},
|
|
648
|
+
"tipo_usuario": {
|
|
649
|
+
"enum": [
|
|
650
|
+
"PROFESSOR",
|
|
651
|
+
"ALUNO",
|
|
652
|
+
"OPERACIONAL",
|
|
653
|
+
null
|
|
654
|
+
],
|
|
655
|
+
"description": "Tipo do usuário (um único tipo por usuário)."
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
"usuario-desativado": {
|
|
663
|
+
"v1": {
|
|
664
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
665
|
+
"title": "usuario.desativado (v1)",
|
|
666
|
+
"description": "Cadastro inativado (exclusão lógica). Os dados continuam existindo.",
|
|
667
|
+
"type": "object",
|
|
668
|
+
"required": [
|
|
669
|
+
"versao",
|
|
670
|
+
"ocorrido_em",
|
|
671
|
+
"login"
|
|
672
|
+
],
|
|
673
|
+
"additionalProperties": false,
|
|
674
|
+
"properties": {
|
|
675
|
+
"versao": {
|
|
676
|
+
"$ref": "#/$defs/versao"
|
|
677
|
+
},
|
|
678
|
+
"ocorrido_em": {
|
|
679
|
+
"$ref": "#/$defs/ocorrido_em"
|
|
680
|
+
},
|
|
681
|
+
"login": {
|
|
682
|
+
"$ref": "#/$defs/login"
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
"$defs": {
|
|
686
|
+
"login": {
|
|
687
|
+
"type": "string",
|
|
688
|
+
"minLength": 1,
|
|
689
|
+
"maxLength": 255,
|
|
690
|
+
"pattern": "^\\S+$",
|
|
691
|
+
"description": "YRN do usuário: identificador estável e chave da mensagem no Kafka. Sem espaços; comparação exata (sensível a maiúsculas)."
|
|
692
|
+
},
|
|
693
|
+
"versao": {
|
|
694
|
+
"type": "integer",
|
|
695
|
+
"minimum": 1,
|
|
696
|
+
"description": "Contador monotônico por usuário (continua após login-alterado). O consumidor ignora eventos com versão menor ou igual à que já aplicou."
|
|
697
|
+
},
|
|
698
|
+
"ocorrido_em": {
|
|
699
|
+
"type": "string",
|
|
700
|
+
"format": "date-time",
|
|
701
|
+
"description": "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso)."
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
"usuario-login-alterado": {
|
|
707
|
+
"v1": {
|
|
708
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
709
|
+
"title": "usuario.login-alterado (v1)",
|
|
710
|
+
"description": "O login (YRN do usuário) mudou. Publicado com a chave do login ANTERIOR; eventos seguintes usam o novo.",
|
|
711
|
+
"type": "object",
|
|
712
|
+
"required": [
|
|
713
|
+
"versao",
|
|
714
|
+
"ocorrido_em",
|
|
715
|
+
"login_anterior",
|
|
716
|
+
"login_novo"
|
|
717
|
+
],
|
|
718
|
+
"additionalProperties": false,
|
|
719
|
+
"properties": {
|
|
720
|
+
"versao": {
|
|
721
|
+
"$ref": "#/$defs/versao"
|
|
722
|
+
},
|
|
723
|
+
"ocorrido_em": {
|
|
724
|
+
"$ref": "#/$defs/ocorrido_em"
|
|
725
|
+
},
|
|
726
|
+
"login_anterior": {
|
|
727
|
+
"$ref": "#/$defs/login"
|
|
728
|
+
},
|
|
729
|
+
"login_novo": {
|
|
730
|
+
"$ref": "#/$defs/login"
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
"$defs": {
|
|
734
|
+
"login": {
|
|
735
|
+
"type": "string",
|
|
736
|
+
"minLength": 1,
|
|
737
|
+
"maxLength": 255,
|
|
738
|
+
"pattern": "^\\S+$",
|
|
739
|
+
"description": "YRN do usuário: identificador estável e chave da mensagem no Kafka. Sem espaços; comparação exata (sensível a maiúsculas)."
|
|
740
|
+
},
|
|
741
|
+
"versao": {
|
|
742
|
+
"type": "integer",
|
|
743
|
+
"minimum": 1,
|
|
744
|
+
"description": "Contador monotônico por usuário (continua após login-alterado). O consumidor ignora eventos com versão menor ou igual à que já aplicou."
|
|
745
|
+
},
|
|
746
|
+
"ocorrido_em": {
|
|
747
|
+
"type": "string",
|
|
748
|
+
"format": "date-time",
|
|
749
|
+
"description": "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso)."
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
"usuario-mesclado": {
|
|
755
|
+
"v1": {
|
|
756
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
757
|
+
"title": "usuario.mesclado (v1)",
|
|
758
|
+
"description": "Dois cadastros do mesmo usuário foram unificados: login_origem deixa de existir e passa a ser login_destino. Publicado com a chave de login_origem.",
|
|
759
|
+
"type": "object",
|
|
760
|
+
"required": [
|
|
761
|
+
"versao",
|
|
762
|
+
"ocorrido_em",
|
|
763
|
+
"login_origem",
|
|
764
|
+
"login_destino"
|
|
765
|
+
],
|
|
766
|
+
"additionalProperties": false,
|
|
767
|
+
"properties": {
|
|
768
|
+
"versao": {
|
|
769
|
+
"$ref": "#/$defs/versao"
|
|
770
|
+
},
|
|
771
|
+
"ocorrido_em": {
|
|
772
|
+
"$ref": "#/$defs/ocorrido_em"
|
|
773
|
+
},
|
|
774
|
+
"login_origem": {
|
|
775
|
+
"$ref": "#/$defs/login"
|
|
776
|
+
},
|
|
777
|
+
"login_destino": {
|
|
778
|
+
"$ref": "#/$defs/login"
|
|
779
|
+
}
|
|
780
|
+
},
|
|
781
|
+
"$defs": {
|
|
782
|
+
"login": {
|
|
783
|
+
"type": "string",
|
|
784
|
+
"minLength": 1,
|
|
785
|
+
"maxLength": 255,
|
|
786
|
+
"pattern": "^\\S+$",
|
|
787
|
+
"description": "YRN do usuário: identificador estável e chave da mensagem no Kafka. Sem espaços; comparação exata (sensível a maiúsculas)."
|
|
788
|
+
},
|
|
789
|
+
"versao": {
|
|
790
|
+
"type": "integer",
|
|
791
|
+
"minimum": 1,
|
|
792
|
+
"description": "Contador monotônico por usuário (continua após login-alterado). O consumidor ignora eventos com versão menor ou igual à que já aplicou."
|
|
793
|
+
},
|
|
794
|
+
"ocorrido_em": {
|
|
795
|
+
"type": "string",
|
|
796
|
+
"format": "date-time",
|
|
797
|
+
"description": "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso)."
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
},
|
|
802
|
+
"usuario-reativado": {
|
|
803
|
+
"v1": {
|
|
804
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
805
|
+
"title": "usuario.reativado (v1)",
|
|
806
|
+
"description": "Cadastro inativado voltou a ficar ativo.",
|
|
807
|
+
"type": "object",
|
|
808
|
+
"required": [
|
|
809
|
+
"versao",
|
|
810
|
+
"ocorrido_em",
|
|
811
|
+
"login"
|
|
812
|
+
],
|
|
813
|
+
"additionalProperties": false,
|
|
814
|
+
"properties": {
|
|
815
|
+
"versao": {
|
|
816
|
+
"$ref": "#/$defs/versao"
|
|
817
|
+
},
|
|
818
|
+
"ocorrido_em": {
|
|
819
|
+
"$ref": "#/$defs/ocorrido_em"
|
|
820
|
+
},
|
|
821
|
+
"login": {
|
|
822
|
+
"$ref": "#/$defs/login"
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
"$defs": {
|
|
826
|
+
"login": {
|
|
827
|
+
"type": "string",
|
|
828
|
+
"minLength": 1,
|
|
829
|
+
"maxLength": 255,
|
|
830
|
+
"pattern": "^\\S+$",
|
|
831
|
+
"description": "YRN do usuário: identificador estável e chave da mensagem no Kafka. Sem espaços; comparação exata (sensível a maiúsculas)."
|
|
832
|
+
},
|
|
833
|
+
"versao": {
|
|
834
|
+
"type": "integer",
|
|
835
|
+
"minimum": 1,
|
|
836
|
+
"description": "Contador monotônico por usuário (continua após login-alterado). O consumidor ignora eventos com versão menor ou igual à que já aplicou."
|
|
837
|
+
},
|
|
838
|
+
"ocorrido_em": {
|
|
839
|
+
"type": "string",
|
|
840
|
+
"format": "date-time",
|
|
841
|
+
"description": "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso)."
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
"usuario-removido": {
|
|
847
|
+
"v1": {
|
|
848
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
849
|
+
"title": "usuario.removido (v1)",
|
|
850
|
+
"description": "Remoção definitiva do cadastro no sistema de origem.",
|
|
851
|
+
"type": "object",
|
|
852
|
+
"required": [
|
|
853
|
+
"versao",
|
|
854
|
+
"ocorrido_em",
|
|
855
|
+
"login"
|
|
856
|
+
],
|
|
857
|
+
"additionalProperties": false,
|
|
858
|
+
"properties": {
|
|
859
|
+
"versao": {
|
|
860
|
+
"$ref": "#/$defs/versao"
|
|
861
|
+
},
|
|
862
|
+
"ocorrido_em": {
|
|
863
|
+
"$ref": "#/$defs/ocorrido_em"
|
|
864
|
+
},
|
|
865
|
+
"login": {
|
|
866
|
+
"$ref": "#/$defs/login"
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
"$defs": {
|
|
870
|
+
"login": {
|
|
871
|
+
"type": "string",
|
|
872
|
+
"minLength": 1,
|
|
873
|
+
"maxLength": 255,
|
|
874
|
+
"pattern": "^\\S+$",
|
|
875
|
+
"description": "YRN do usuário: identificador estável e chave da mensagem no Kafka. Sem espaços; comparação exata (sensível a maiúsculas)."
|
|
876
|
+
},
|
|
877
|
+
"versao": {
|
|
878
|
+
"type": "integer",
|
|
879
|
+
"minimum": 1,
|
|
880
|
+
"description": "Contador monotônico por usuário (continua após login-alterado). O consumidor ignora eventos com versão menor ou igual à que já aplicou."
|
|
881
|
+
},
|
|
882
|
+
"ocorrido_em": {
|
|
883
|
+
"type": "string",
|
|
884
|
+
"format": "date-time",
|
|
885
|
+
"description": "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso)."
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
/** Congela em profundidade: os dados `as const` também são imutáveis em runtime. */
|
|
893
|
+
function deepFreeze(value) {
|
|
894
|
+
if (typeof value === "object" && value !== null) {
|
|
895
|
+
for (const child of Object.values(value)) {
|
|
896
|
+
deepFreeze(child);
|
|
897
|
+
}
|
|
898
|
+
Object.freeze(value);
|
|
899
|
+
}
|
|
900
|
+
return value;
|
|
901
|
+
}
|
|
902
|
+
//# sourceMappingURL=schemas.js.map
|