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,570 @@
|
|
|
1
|
+
/** Schemas empacotados: `bundledSchemas[domínio][slug][versão]` (cópia de `contracts/schemas`). */
|
|
2
|
+
export declare const bundledSchemas: {
|
|
3
|
+
readonly usuarios: {
|
|
4
|
+
readonly "usuario-atualizado": {
|
|
5
|
+
readonly v1: {
|
|
6
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
7
|
+
readonly title: "usuario.atualizado (v1)";
|
|
8
|
+
readonly description: "Cadastro alterado. Carrega o cadastro COMPLETO (snapshot) e a lista dos campos alterados.";
|
|
9
|
+
readonly type: "object";
|
|
10
|
+
readonly required: readonly ["versao", "ocorrido_em", "usuario", "campos_alterados"];
|
|
11
|
+
readonly additionalProperties: false;
|
|
12
|
+
readonly properties: {
|
|
13
|
+
readonly versao: {
|
|
14
|
+
readonly $ref: "#/$defs/versao";
|
|
15
|
+
};
|
|
16
|
+
readonly ocorrido_em: {
|
|
17
|
+
readonly $ref: "#/$defs/ocorrido_em";
|
|
18
|
+
};
|
|
19
|
+
readonly usuario: {
|
|
20
|
+
readonly $ref: "#/$defs/usuario";
|
|
21
|
+
};
|
|
22
|
+
readonly campos_alterados: {
|
|
23
|
+
readonly type: "array";
|
|
24
|
+
readonly minItems: 1;
|
|
25
|
+
readonly uniqueItems: true;
|
|
26
|
+
readonly items: {
|
|
27
|
+
readonly enum: readonly ["ativo", "idunica", "cpf", "nis", "nome", "nome_civil", "data_nascimento", "genero", "email", "telefone", "nome_pai", "nome_mae", "responsavel_legal_nome", "responsavel_legal_tipo", "endereco_cep", "endereco_uf", "endereco_cidade", "endereco_bairro", "endereco_tipo_logradouro", "endereco_logradouro", "endereco_numero", "raca_cor", "bolsa_familia", "tipo_usuario"];
|
|
28
|
+
};
|
|
29
|
+
readonly description: "Atributos que mudaram nesta versão (informativo; o estado é o snapshot).";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
readonly $defs: {
|
|
33
|
+
readonly login: {
|
|
34
|
+
readonly type: "string";
|
|
35
|
+
readonly minLength: 1;
|
|
36
|
+
readonly maxLength: 255;
|
|
37
|
+
readonly pattern: "^\\S+$";
|
|
38
|
+
readonly 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).";
|
|
39
|
+
};
|
|
40
|
+
readonly versao: {
|
|
41
|
+
readonly type: "integer";
|
|
42
|
+
readonly minimum: 1;
|
|
43
|
+
readonly 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.";
|
|
44
|
+
};
|
|
45
|
+
readonly ocorrido_em: {
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly format: "date-time";
|
|
48
|
+
readonly description: "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso).";
|
|
49
|
+
};
|
|
50
|
+
readonly usuario: {
|
|
51
|
+
readonly type: "object";
|
|
52
|
+
readonly required: readonly ["login", "ativo", "idunica", "cpf", "nis", "nome", "nome_civil", "data_nascimento", "genero", "email", "telefone", "nome_pai", "nome_mae", "responsavel_legal_nome", "responsavel_legal_tipo", "endereco_cep", "endereco_uf", "endereco_cidade", "endereco_bairro", "endereco_tipo_logradouro", "endereco_logradouro", "endereco_numero", "raca_cor", "bolsa_familia", "tipo_usuario"];
|
|
53
|
+
readonly additionalProperties: false;
|
|
54
|
+
readonly properties: {
|
|
55
|
+
readonly login: {
|
|
56
|
+
readonly $ref: "#/$defs/login";
|
|
57
|
+
};
|
|
58
|
+
readonly ativo: {
|
|
59
|
+
readonly type: "boolean";
|
|
60
|
+
readonly description: "Situação do cadastro. false após usuario.desativado; true após usuario.reativado.";
|
|
61
|
+
};
|
|
62
|
+
readonly idunica: {
|
|
63
|
+
readonly type: readonly ["string", "null"];
|
|
64
|
+
readonly minLength: 1;
|
|
65
|
+
readonly maxLength: 255;
|
|
66
|
+
readonly description: "Identificador único entre os sistemas (nem todo usuário tem).";
|
|
67
|
+
};
|
|
68
|
+
readonly cpf: {
|
|
69
|
+
readonly type: readonly ["string", "null"];
|
|
70
|
+
readonly pattern: "^[0-9]{11}$";
|
|
71
|
+
readonly description: "CPF, 11 dígitos, sem máscara.";
|
|
72
|
+
};
|
|
73
|
+
readonly nis: {
|
|
74
|
+
readonly type: readonly ["string", "null"];
|
|
75
|
+
readonly pattern: "^[0-9]{11}$";
|
|
76
|
+
readonly description: "NIS/PIS, 11 dígitos, sem máscara.";
|
|
77
|
+
};
|
|
78
|
+
readonly nome: {
|
|
79
|
+
readonly type: readonly ["string", "null"];
|
|
80
|
+
readonly minLength: 1;
|
|
81
|
+
readonly maxLength: 255;
|
|
82
|
+
readonly description: "Nome social, quando houver; senão o nome civil.";
|
|
83
|
+
};
|
|
84
|
+
readonly nome_civil: {
|
|
85
|
+
readonly type: readonly ["string", "null"];
|
|
86
|
+
readonly minLength: 1;
|
|
87
|
+
readonly maxLength: 255;
|
|
88
|
+
readonly description: "Nome civil (de registro); nunca o nome social.";
|
|
89
|
+
};
|
|
90
|
+
readonly data_nascimento: {
|
|
91
|
+
readonly type: readonly ["string", "null"];
|
|
92
|
+
readonly format: "date";
|
|
93
|
+
readonly description: "AAAA-MM-DD.";
|
|
94
|
+
};
|
|
95
|
+
readonly genero: {
|
|
96
|
+
readonly enum: readonly ["MASCULINO", "FEMININO", "OUTROS", null];
|
|
97
|
+
readonly description: "Gênero.";
|
|
98
|
+
};
|
|
99
|
+
readonly email: {
|
|
100
|
+
readonly type: readonly ["string", "null"];
|
|
101
|
+
readonly format: "email";
|
|
102
|
+
readonly maxLength: 254;
|
|
103
|
+
readonly description: "E-mail.";
|
|
104
|
+
};
|
|
105
|
+
readonly telefone: {
|
|
106
|
+
readonly type: readonly ["string", "null"];
|
|
107
|
+
readonly pattern: "^[0-9]{10,11}$";
|
|
108
|
+
readonly description: "Só dígitos, com DDD (10 ou 11 dígitos).";
|
|
109
|
+
};
|
|
110
|
+
readonly nome_pai: {
|
|
111
|
+
readonly type: readonly ["string", "null"];
|
|
112
|
+
readonly minLength: 1;
|
|
113
|
+
readonly maxLength: 255;
|
|
114
|
+
readonly description: "Nome do pai.";
|
|
115
|
+
};
|
|
116
|
+
readonly nome_mae: {
|
|
117
|
+
readonly type: readonly ["string", "null"];
|
|
118
|
+
readonly minLength: 1;
|
|
119
|
+
readonly maxLength: 255;
|
|
120
|
+
readonly description: "Nome da mãe.";
|
|
121
|
+
};
|
|
122
|
+
readonly responsavel_legal_nome: {
|
|
123
|
+
readonly type: readonly ["string", "null"];
|
|
124
|
+
readonly minLength: 1;
|
|
125
|
+
readonly maxLength: 255;
|
|
126
|
+
readonly description: "Nome do responsável legal.";
|
|
127
|
+
};
|
|
128
|
+
readonly responsavel_legal_tipo: {
|
|
129
|
+
readonly enum: readonly ["PAI", "MAE", "OUTROS", null];
|
|
130
|
+
readonly description: "Tipo do responsável legal.";
|
|
131
|
+
};
|
|
132
|
+
readonly endereco_cep: {
|
|
133
|
+
readonly type: readonly ["string", "null"];
|
|
134
|
+
readonly pattern: "^[0-9]{8}$";
|
|
135
|
+
readonly description: "CEP, 8 dígitos, sem máscara.";
|
|
136
|
+
};
|
|
137
|
+
readonly endereco_uf: {
|
|
138
|
+
readonly enum: readonly ["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO", null];
|
|
139
|
+
readonly description: "Sigla da UF.";
|
|
140
|
+
};
|
|
141
|
+
readonly endereco_cidade: {
|
|
142
|
+
readonly type: readonly ["string", "null"];
|
|
143
|
+
readonly minLength: 1;
|
|
144
|
+
readonly maxLength: 255;
|
|
145
|
+
readonly description: "Cidade.";
|
|
146
|
+
};
|
|
147
|
+
readonly endereco_bairro: {
|
|
148
|
+
readonly type: readonly ["string", "null"];
|
|
149
|
+
readonly minLength: 1;
|
|
150
|
+
readonly maxLength: 255;
|
|
151
|
+
readonly description: "Bairro.";
|
|
152
|
+
};
|
|
153
|
+
readonly endereco_tipo_logradouro: {
|
|
154
|
+
readonly type: readonly ["string", "null"];
|
|
155
|
+
readonly minLength: 1;
|
|
156
|
+
readonly maxLength: 255;
|
|
157
|
+
readonly description: "Tipo do logradouro (Rua, Avenida...).";
|
|
158
|
+
};
|
|
159
|
+
readonly endereco_logradouro: {
|
|
160
|
+
readonly type: readonly ["string", "null"];
|
|
161
|
+
readonly minLength: 1;
|
|
162
|
+
readonly maxLength: 255;
|
|
163
|
+
readonly description: "Logradouro.";
|
|
164
|
+
};
|
|
165
|
+
readonly endereco_numero: {
|
|
166
|
+
readonly type: readonly ["string", "null"];
|
|
167
|
+
readonly minLength: 1;
|
|
168
|
+
readonly maxLength: 20;
|
|
169
|
+
readonly description: "Número (texto: aceita 'S/N', '12A').";
|
|
170
|
+
};
|
|
171
|
+
readonly raca_cor: {
|
|
172
|
+
readonly enum: readonly ["BRANCA", "PRETA", "PARDA", "AMARELA", "INDIGENA", null];
|
|
173
|
+
readonly description: "Raça/cor (dado sensível, LGPD art. 11).";
|
|
174
|
+
};
|
|
175
|
+
readonly bolsa_familia: {
|
|
176
|
+
readonly type: readonly ["boolean", "null"];
|
|
177
|
+
readonly description: "Beneficiário do Bolsa Família (dado sensível).";
|
|
178
|
+
};
|
|
179
|
+
readonly tipo_usuario: {
|
|
180
|
+
readonly enum: readonly ["PROFESSOR", "ALUNO", "OPERACIONAL", null];
|
|
181
|
+
readonly description: "Tipo do usuário (um único tipo por usuário).";
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
readonly "usuario-criado": {
|
|
189
|
+
readonly v1: {
|
|
190
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
191
|
+
readonly title: "usuario.criado (v1)";
|
|
192
|
+
readonly description: "Usuário criado no sistema de origem. Carrega o cadastro completo.";
|
|
193
|
+
readonly type: "object";
|
|
194
|
+
readonly required: readonly ["versao", "ocorrido_em", "usuario"];
|
|
195
|
+
readonly additionalProperties: false;
|
|
196
|
+
readonly properties: {
|
|
197
|
+
readonly versao: {
|
|
198
|
+
readonly $ref: "#/$defs/versao";
|
|
199
|
+
};
|
|
200
|
+
readonly ocorrido_em: {
|
|
201
|
+
readonly $ref: "#/$defs/ocorrido_em";
|
|
202
|
+
};
|
|
203
|
+
readonly usuario: {
|
|
204
|
+
readonly $ref: "#/$defs/usuario";
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
readonly $defs: {
|
|
208
|
+
readonly login: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
readonly minLength: 1;
|
|
211
|
+
readonly maxLength: 255;
|
|
212
|
+
readonly pattern: "^\\S+$";
|
|
213
|
+
readonly 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).";
|
|
214
|
+
};
|
|
215
|
+
readonly versao: {
|
|
216
|
+
readonly type: "integer";
|
|
217
|
+
readonly minimum: 1;
|
|
218
|
+
readonly 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.";
|
|
219
|
+
};
|
|
220
|
+
readonly ocorrido_em: {
|
|
221
|
+
readonly type: "string";
|
|
222
|
+
readonly format: "date-time";
|
|
223
|
+
readonly description: "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso).";
|
|
224
|
+
};
|
|
225
|
+
readonly usuario: {
|
|
226
|
+
readonly type: "object";
|
|
227
|
+
readonly required: readonly ["login", "ativo", "idunica", "cpf", "nis", "nome", "nome_civil", "data_nascimento", "genero", "email", "telefone", "nome_pai", "nome_mae", "responsavel_legal_nome", "responsavel_legal_tipo", "endereco_cep", "endereco_uf", "endereco_cidade", "endereco_bairro", "endereco_tipo_logradouro", "endereco_logradouro", "endereco_numero", "raca_cor", "bolsa_familia", "tipo_usuario"];
|
|
228
|
+
readonly additionalProperties: false;
|
|
229
|
+
readonly properties: {
|
|
230
|
+
readonly login: {
|
|
231
|
+
readonly $ref: "#/$defs/login";
|
|
232
|
+
};
|
|
233
|
+
readonly ativo: {
|
|
234
|
+
readonly type: "boolean";
|
|
235
|
+
readonly description: "Situação do cadastro. false após usuario.desativado; true após usuario.reativado.";
|
|
236
|
+
};
|
|
237
|
+
readonly idunica: {
|
|
238
|
+
readonly type: readonly ["string", "null"];
|
|
239
|
+
readonly minLength: 1;
|
|
240
|
+
readonly maxLength: 255;
|
|
241
|
+
readonly description: "Identificador único entre os sistemas (nem todo usuário tem).";
|
|
242
|
+
};
|
|
243
|
+
readonly cpf: {
|
|
244
|
+
readonly type: readonly ["string", "null"];
|
|
245
|
+
readonly pattern: "^[0-9]{11}$";
|
|
246
|
+
readonly description: "CPF, 11 dígitos, sem máscara.";
|
|
247
|
+
};
|
|
248
|
+
readonly nis: {
|
|
249
|
+
readonly type: readonly ["string", "null"];
|
|
250
|
+
readonly pattern: "^[0-9]{11}$";
|
|
251
|
+
readonly description: "NIS/PIS, 11 dígitos, sem máscara.";
|
|
252
|
+
};
|
|
253
|
+
readonly nome: {
|
|
254
|
+
readonly type: readonly ["string", "null"];
|
|
255
|
+
readonly minLength: 1;
|
|
256
|
+
readonly maxLength: 255;
|
|
257
|
+
readonly description: "Nome social, quando houver; senão o nome civil.";
|
|
258
|
+
};
|
|
259
|
+
readonly nome_civil: {
|
|
260
|
+
readonly type: readonly ["string", "null"];
|
|
261
|
+
readonly minLength: 1;
|
|
262
|
+
readonly maxLength: 255;
|
|
263
|
+
readonly description: "Nome civil (de registro); nunca o nome social.";
|
|
264
|
+
};
|
|
265
|
+
readonly data_nascimento: {
|
|
266
|
+
readonly type: readonly ["string", "null"];
|
|
267
|
+
readonly format: "date";
|
|
268
|
+
readonly description: "AAAA-MM-DD.";
|
|
269
|
+
};
|
|
270
|
+
readonly genero: {
|
|
271
|
+
readonly enum: readonly ["MASCULINO", "FEMININO", "OUTROS", null];
|
|
272
|
+
readonly description: "Gênero.";
|
|
273
|
+
};
|
|
274
|
+
readonly email: {
|
|
275
|
+
readonly type: readonly ["string", "null"];
|
|
276
|
+
readonly format: "email";
|
|
277
|
+
readonly maxLength: 254;
|
|
278
|
+
readonly description: "E-mail.";
|
|
279
|
+
};
|
|
280
|
+
readonly telefone: {
|
|
281
|
+
readonly type: readonly ["string", "null"];
|
|
282
|
+
readonly pattern: "^[0-9]{10,11}$";
|
|
283
|
+
readonly description: "Só dígitos, com DDD (10 ou 11 dígitos).";
|
|
284
|
+
};
|
|
285
|
+
readonly nome_pai: {
|
|
286
|
+
readonly type: readonly ["string", "null"];
|
|
287
|
+
readonly minLength: 1;
|
|
288
|
+
readonly maxLength: 255;
|
|
289
|
+
readonly description: "Nome do pai.";
|
|
290
|
+
};
|
|
291
|
+
readonly nome_mae: {
|
|
292
|
+
readonly type: readonly ["string", "null"];
|
|
293
|
+
readonly minLength: 1;
|
|
294
|
+
readonly maxLength: 255;
|
|
295
|
+
readonly description: "Nome da mãe.";
|
|
296
|
+
};
|
|
297
|
+
readonly responsavel_legal_nome: {
|
|
298
|
+
readonly type: readonly ["string", "null"];
|
|
299
|
+
readonly minLength: 1;
|
|
300
|
+
readonly maxLength: 255;
|
|
301
|
+
readonly description: "Nome do responsável legal.";
|
|
302
|
+
};
|
|
303
|
+
readonly responsavel_legal_tipo: {
|
|
304
|
+
readonly enum: readonly ["PAI", "MAE", "OUTROS", null];
|
|
305
|
+
readonly description: "Tipo do responsável legal.";
|
|
306
|
+
};
|
|
307
|
+
readonly endereco_cep: {
|
|
308
|
+
readonly type: readonly ["string", "null"];
|
|
309
|
+
readonly pattern: "^[0-9]{8}$";
|
|
310
|
+
readonly description: "CEP, 8 dígitos, sem máscara.";
|
|
311
|
+
};
|
|
312
|
+
readonly endereco_uf: {
|
|
313
|
+
readonly enum: readonly ["AC", "AL", "AP", "AM", "BA", "CE", "DF", "ES", "GO", "MA", "MT", "MS", "MG", "PA", "PB", "PR", "PE", "PI", "RJ", "RN", "RS", "RO", "RR", "SC", "SP", "SE", "TO", null];
|
|
314
|
+
readonly description: "Sigla da UF.";
|
|
315
|
+
};
|
|
316
|
+
readonly endereco_cidade: {
|
|
317
|
+
readonly type: readonly ["string", "null"];
|
|
318
|
+
readonly minLength: 1;
|
|
319
|
+
readonly maxLength: 255;
|
|
320
|
+
readonly description: "Cidade.";
|
|
321
|
+
};
|
|
322
|
+
readonly endereco_bairro: {
|
|
323
|
+
readonly type: readonly ["string", "null"];
|
|
324
|
+
readonly minLength: 1;
|
|
325
|
+
readonly maxLength: 255;
|
|
326
|
+
readonly description: "Bairro.";
|
|
327
|
+
};
|
|
328
|
+
readonly endereco_tipo_logradouro: {
|
|
329
|
+
readonly type: readonly ["string", "null"];
|
|
330
|
+
readonly minLength: 1;
|
|
331
|
+
readonly maxLength: 255;
|
|
332
|
+
readonly description: "Tipo do logradouro (Rua, Avenida...).";
|
|
333
|
+
};
|
|
334
|
+
readonly endereco_logradouro: {
|
|
335
|
+
readonly type: readonly ["string", "null"];
|
|
336
|
+
readonly minLength: 1;
|
|
337
|
+
readonly maxLength: 255;
|
|
338
|
+
readonly description: "Logradouro.";
|
|
339
|
+
};
|
|
340
|
+
readonly endereco_numero: {
|
|
341
|
+
readonly type: readonly ["string", "null"];
|
|
342
|
+
readonly minLength: 1;
|
|
343
|
+
readonly maxLength: 20;
|
|
344
|
+
readonly description: "Número (texto: aceita 'S/N', '12A').";
|
|
345
|
+
};
|
|
346
|
+
readonly raca_cor: {
|
|
347
|
+
readonly enum: readonly ["BRANCA", "PRETA", "PARDA", "AMARELA", "INDIGENA", null];
|
|
348
|
+
readonly description: "Raça/cor (dado sensível, LGPD art. 11).";
|
|
349
|
+
};
|
|
350
|
+
readonly bolsa_familia: {
|
|
351
|
+
readonly type: readonly ["boolean", "null"];
|
|
352
|
+
readonly description: "Beneficiário do Bolsa Família (dado sensível).";
|
|
353
|
+
};
|
|
354
|
+
readonly tipo_usuario: {
|
|
355
|
+
readonly enum: readonly ["PROFESSOR", "ALUNO", "OPERACIONAL", null];
|
|
356
|
+
readonly description: "Tipo do usuário (um único tipo por usuário).";
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
readonly "usuario-desativado": {
|
|
364
|
+
readonly v1: {
|
|
365
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
366
|
+
readonly title: "usuario.desativado (v1)";
|
|
367
|
+
readonly description: "Cadastro inativado (exclusão lógica). Os dados continuam existindo.";
|
|
368
|
+
readonly type: "object";
|
|
369
|
+
readonly required: readonly ["versao", "ocorrido_em", "login"];
|
|
370
|
+
readonly additionalProperties: false;
|
|
371
|
+
readonly properties: {
|
|
372
|
+
readonly versao: {
|
|
373
|
+
readonly $ref: "#/$defs/versao";
|
|
374
|
+
};
|
|
375
|
+
readonly ocorrido_em: {
|
|
376
|
+
readonly $ref: "#/$defs/ocorrido_em";
|
|
377
|
+
};
|
|
378
|
+
readonly login: {
|
|
379
|
+
readonly $ref: "#/$defs/login";
|
|
380
|
+
};
|
|
381
|
+
};
|
|
382
|
+
readonly $defs: {
|
|
383
|
+
readonly login: {
|
|
384
|
+
readonly type: "string";
|
|
385
|
+
readonly minLength: 1;
|
|
386
|
+
readonly maxLength: 255;
|
|
387
|
+
readonly pattern: "^\\S+$";
|
|
388
|
+
readonly 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).";
|
|
389
|
+
};
|
|
390
|
+
readonly versao: {
|
|
391
|
+
readonly type: "integer";
|
|
392
|
+
readonly minimum: 1;
|
|
393
|
+
readonly 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.";
|
|
394
|
+
};
|
|
395
|
+
readonly ocorrido_em: {
|
|
396
|
+
readonly type: "string";
|
|
397
|
+
readonly format: "date-time";
|
|
398
|
+
readonly description: "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso).";
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
readonly "usuario-login-alterado": {
|
|
404
|
+
readonly v1: {
|
|
405
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
406
|
+
readonly title: "usuario.login-alterado (v1)";
|
|
407
|
+
readonly description: "O login (YRN do usuário) mudou. Publicado com a chave do login ANTERIOR; eventos seguintes usam o novo.";
|
|
408
|
+
readonly type: "object";
|
|
409
|
+
readonly required: readonly ["versao", "ocorrido_em", "login_anterior", "login_novo"];
|
|
410
|
+
readonly additionalProperties: false;
|
|
411
|
+
readonly properties: {
|
|
412
|
+
readonly versao: {
|
|
413
|
+
readonly $ref: "#/$defs/versao";
|
|
414
|
+
};
|
|
415
|
+
readonly ocorrido_em: {
|
|
416
|
+
readonly $ref: "#/$defs/ocorrido_em";
|
|
417
|
+
};
|
|
418
|
+
readonly login_anterior: {
|
|
419
|
+
readonly $ref: "#/$defs/login";
|
|
420
|
+
};
|
|
421
|
+
readonly login_novo: {
|
|
422
|
+
readonly $ref: "#/$defs/login";
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
readonly $defs: {
|
|
426
|
+
readonly login: {
|
|
427
|
+
readonly type: "string";
|
|
428
|
+
readonly minLength: 1;
|
|
429
|
+
readonly maxLength: 255;
|
|
430
|
+
readonly pattern: "^\\S+$";
|
|
431
|
+
readonly 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).";
|
|
432
|
+
};
|
|
433
|
+
readonly versao: {
|
|
434
|
+
readonly type: "integer";
|
|
435
|
+
readonly minimum: 1;
|
|
436
|
+
readonly 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.";
|
|
437
|
+
};
|
|
438
|
+
readonly ocorrido_em: {
|
|
439
|
+
readonly type: "string";
|
|
440
|
+
readonly format: "date-time";
|
|
441
|
+
readonly description: "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso).";
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
readonly "usuario-mesclado": {
|
|
447
|
+
readonly v1: {
|
|
448
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
449
|
+
readonly title: "usuario.mesclado (v1)";
|
|
450
|
+
readonly 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.";
|
|
451
|
+
readonly type: "object";
|
|
452
|
+
readonly required: readonly ["versao", "ocorrido_em", "login_origem", "login_destino"];
|
|
453
|
+
readonly additionalProperties: false;
|
|
454
|
+
readonly properties: {
|
|
455
|
+
readonly versao: {
|
|
456
|
+
readonly $ref: "#/$defs/versao";
|
|
457
|
+
};
|
|
458
|
+
readonly ocorrido_em: {
|
|
459
|
+
readonly $ref: "#/$defs/ocorrido_em";
|
|
460
|
+
};
|
|
461
|
+
readonly login_origem: {
|
|
462
|
+
readonly $ref: "#/$defs/login";
|
|
463
|
+
};
|
|
464
|
+
readonly login_destino: {
|
|
465
|
+
readonly $ref: "#/$defs/login";
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
readonly $defs: {
|
|
469
|
+
readonly login: {
|
|
470
|
+
readonly type: "string";
|
|
471
|
+
readonly minLength: 1;
|
|
472
|
+
readonly maxLength: 255;
|
|
473
|
+
readonly pattern: "^\\S+$";
|
|
474
|
+
readonly 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).";
|
|
475
|
+
};
|
|
476
|
+
readonly versao: {
|
|
477
|
+
readonly type: "integer";
|
|
478
|
+
readonly minimum: 1;
|
|
479
|
+
readonly 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.";
|
|
480
|
+
};
|
|
481
|
+
readonly ocorrido_em: {
|
|
482
|
+
readonly type: "string";
|
|
483
|
+
readonly format: "date-time";
|
|
484
|
+
readonly description: "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso).";
|
|
485
|
+
};
|
|
486
|
+
};
|
|
487
|
+
};
|
|
488
|
+
};
|
|
489
|
+
readonly "usuario-reativado": {
|
|
490
|
+
readonly v1: {
|
|
491
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
492
|
+
readonly title: "usuario.reativado (v1)";
|
|
493
|
+
readonly description: "Cadastro inativado voltou a ficar ativo.";
|
|
494
|
+
readonly type: "object";
|
|
495
|
+
readonly required: readonly ["versao", "ocorrido_em", "login"];
|
|
496
|
+
readonly additionalProperties: false;
|
|
497
|
+
readonly properties: {
|
|
498
|
+
readonly versao: {
|
|
499
|
+
readonly $ref: "#/$defs/versao";
|
|
500
|
+
};
|
|
501
|
+
readonly ocorrido_em: {
|
|
502
|
+
readonly $ref: "#/$defs/ocorrido_em";
|
|
503
|
+
};
|
|
504
|
+
readonly login: {
|
|
505
|
+
readonly $ref: "#/$defs/login";
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
readonly $defs: {
|
|
509
|
+
readonly login: {
|
|
510
|
+
readonly type: "string";
|
|
511
|
+
readonly minLength: 1;
|
|
512
|
+
readonly maxLength: 255;
|
|
513
|
+
readonly pattern: "^\\S+$";
|
|
514
|
+
readonly 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).";
|
|
515
|
+
};
|
|
516
|
+
readonly versao: {
|
|
517
|
+
readonly type: "integer";
|
|
518
|
+
readonly minimum: 1;
|
|
519
|
+
readonly 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.";
|
|
520
|
+
};
|
|
521
|
+
readonly ocorrido_em: {
|
|
522
|
+
readonly type: "string";
|
|
523
|
+
readonly format: "date-time";
|
|
524
|
+
readonly description: "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso).";
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
readonly "usuario-removido": {
|
|
530
|
+
readonly v1: {
|
|
531
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
532
|
+
readonly title: "usuario.removido (v1)";
|
|
533
|
+
readonly description: "Remoção definitiva do cadastro no sistema de origem.";
|
|
534
|
+
readonly type: "object";
|
|
535
|
+
readonly required: readonly ["versao", "ocorrido_em", "login"];
|
|
536
|
+
readonly additionalProperties: false;
|
|
537
|
+
readonly properties: {
|
|
538
|
+
readonly versao: {
|
|
539
|
+
readonly $ref: "#/$defs/versao";
|
|
540
|
+
};
|
|
541
|
+
readonly ocorrido_em: {
|
|
542
|
+
readonly $ref: "#/$defs/ocorrido_em";
|
|
543
|
+
};
|
|
544
|
+
readonly login: {
|
|
545
|
+
readonly $ref: "#/$defs/login";
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
readonly $defs: {
|
|
549
|
+
readonly login: {
|
|
550
|
+
readonly type: "string";
|
|
551
|
+
readonly minLength: 1;
|
|
552
|
+
readonly maxLength: 255;
|
|
553
|
+
readonly pattern: "^\\S+$";
|
|
554
|
+
readonly 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).";
|
|
555
|
+
};
|
|
556
|
+
readonly versao: {
|
|
557
|
+
readonly type: "integer";
|
|
558
|
+
readonly minimum: 1;
|
|
559
|
+
readonly 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.";
|
|
560
|
+
};
|
|
561
|
+
readonly ocorrido_em: {
|
|
562
|
+
readonly type: "string";
|
|
563
|
+
readonly format: "date-time";
|
|
564
|
+
readonly description: "Quando a mudança aconteceu no sistema de origem (RFC 3339, com fuso).";
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
};
|