fiscalia_bo-nest-helpers 0.1.80 → 0.1.82
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/README.md +49 -50
- package/dist/ms-files/ms-files.module.js +4 -4
- package/dist/ms-files/ms-files.module.js.map +1 -1
- package/dist/ms-logs/logs.module.js +5 -5
- package/dist/ms-logs/logs.module.js.map +1 -1
- package/dist/ms-seguridad/seguridad.pb.d.ts +2 -1
- package/dist/ms-seguridad/seguridad.pb.js.map +1 -1
- package/dist/ms-seguridad/seguridad.proto +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -16,7 +16,7 @@ Este proyecto esta orientado a la publicación de helpers básicos al momento de
|
|
16
16
|
|
17
17
|
De momento se tienen los siguientes servicios:
|
18
18
|
|
19
|
-
- <b>MS-FILES</b>: Para su uso debe tener la variable de entorno "
|
19
|
+
- <b>MS-FILES</b>: Para su uso debe tener la variable de entorno "ENV_SERVICE_MS_FILES_URL='url del entorno de ms-files'"
|
20
20
|
|
21
21
|
## Compilación antes de publicar
|
22
22
|
|
@@ -39,7 +39,7 @@ import { MsFilesService } from 'fiscalia_bo-nest-helpers';
|
|
39
39
|
## variables de entorno obligatorios
|
40
40
|
|
41
41
|
```properties
|
42
|
-
|
42
|
+
ENV_SERVICE_MS_FILES_URL='https://ms-files.url'
|
43
43
|
```
|
44
44
|
|
45
45
|
# USO DEL MODULO `MS-SEGURIDAD`
|
@@ -338,7 +338,6 @@ Descripcion de los objecto para envio de datos
|
|
338
338
|
| queueListen | String (null) | El canal o queue que desea transmitir datos |
|
339
339
|
| data | String | Campo necesario para enviar datos en formato Json String |
|
340
340
|
|
341
|
-
|
342
341
|
# USO DEL MODULO `MS-LOGS`
|
343
342
|
|
344
343
|
Configuracion de Paquete en el archivo app.module.ts
|
@@ -348,8 +347,8 @@ import { MsLogsModule } from 'fiscalia_bo-nest-helpers';
|
|
348
347
|
@Module({
|
349
348
|
imports: [
|
350
349
|
MsLogsModule.register({
|
351
|
-
global:true,
|
352
|
-
urlMsLogs:process.env.
|
350
|
+
global: true,
|
351
|
+
urlMsLogs: process.env.ENV_SERVICE_MS_LOGS,
|
353
352
|
}),
|
354
353
|
],
|
355
354
|
controllers: [],
|
@@ -358,62 +357,62 @@ import { MsLogsModule } from 'fiscalia_bo-nest-helpers';
|
|
358
357
|
export class AppModule {}
|
359
358
|
```
|
360
359
|
|
361
|
-
Servicios Disponibles para el uso de logs
|
360
|
+
Servicios Disponibles para el uso de logs
|
362
361
|
|
363
362
|
```typescript
|
364
363
|
import { MsLogsService } from 'fiscalia_bo-nest-helpers';
|
365
364
|
@Injectable()
|
366
365
|
export class AppService {
|
367
|
-
constructor(private readonly msLogsService:MsLogsService) {}
|
366
|
+
constructor(private readonly msLogsService: MsLogsService) {}
|
368
367
|
async test_services_logs() {
|
369
368
|
try {
|
370
369
|
await this.msLogsService.generateLogLogin({
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
})
|
370
|
+
aplicacion: 'jl1',
|
371
|
+
funcionario_id: 1,
|
372
|
+
funcionario_ci: '51234124',
|
373
|
+
funcionario_nombre: 'Javier Contreras Mamani',
|
374
|
+
dispositivo_ip: '192.168.0.1',
|
375
|
+
dispositivo_so: 'Windows 11',
|
376
|
+
dispositivo_navegador: 'Chrome 99',
|
377
|
+
});
|
379
378
|
await this.msLogsService.generateLogView({
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
})
|
379
|
+
aplicacion: 'jl2',
|
380
|
+
apartado: 'caso',
|
381
|
+
apartado_info_extra: 'cud: 3143233',
|
382
|
+
tabla_id: 'string',
|
383
|
+
tabla_nombre: 'vacaciones',
|
384
|
+
funcionario_id: 1,
|
385
|
+
funcionario_ci: '51234124',
|
386
|
+
funcionario_nombre: 'Javier Contreras Mamani',
|
387
|
+
dispositivo_ip: '192.168.0.1',
|
388
|
+
dispositivo_so: 'Windows 11',
|
389
|
+
dispositivo_navegador: 'Chrome 99',
|
390
|
+
});
|
392
391
|
await this.msLogsService.generateLogEvents({
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
})
|
392
|
+
aplicacion: 'jl2',
|
393
|
+
evento: 'editar',
|
394
|
+
tabla_id: '1001',
|
395
|
+
tabla_nombre: 'vacaciones',
|
396
|
+
tabla_pre_cambios: '{id:123,nombre:"misnombre"}',
|
397
|
+
request: 'PUT /listar/vacaciones',
|
398
|
+
funcionario_id: 1,
|
399
|
+
funcionario_ci: '5131343',
|
400
|
+
funcionario_nombre: 'Javier Contreras Mamani',
|
401
|
+
dispositivo_ip: '192.168.0.1',
|
402
|
+
dispositivo_so: 'Windows 11',
|
403
|
+
dispositivo_navegador: 'Chrome 99',
|
404
|
+
});
|
406
405
|
await this.msLogsService.generateLogError({
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
})
|
414
|
-
}catch(e){
|
415
|
-
console.log(e)
|
416
|
-
throw e
|
406
|
+
aplicacion: 'jl2',
|
407
|
+
evento: 'Listar vacaciones',
|
408
|
+
tabla_id: 'string',
|
409
|
+
tabla_nombre: 'vacaciones',
|
410
|
+
request: 'POST /listar/vacaciones',
|
411
|
+
error_string_json: 'string',
|
412
|
+
});
|
413
|
+
} catch (e) {
|
414
|
+
console.log(e);
|
415
|
+
throw e;
|
417
416
|
}
|
418
417
|
}
|
419
418
|
}
|
@@ -14,9 +14,9 @@ const ms_files_service_1 = require("./ms-files.service");
|
|
14
14
|
const chalk_1 = require("chalk");
|
15
15
|
let MsFilesModule = MsFilesModule_1 = class MsFilesModule {
|
16
16
|
static register(options) {
|
17
|
-
const url = (options === null || options === void 0 ? void 0 : options.urlMsFiles) || process.env.
|
17
|
+
const url = (options === null || options === void 0 ? void 0 : options.urlMsFiles) || process.env.ENV_SERVICE_MS_FILES_URL;
|
18
18
|
if (!url)
|
19
|
-
console.warn(chalk_1.bold.red(`
|
19
|
+
console.warn(chalk_1.bold.red(`ENV_SERVICE_MS_FILES_URL no definido en variables de entorno para ms-files`));
|
20
20
|
return {
|
21
21
|
global: options.global,
|
22
22
|
module: MsFilesModule_1,
|
@@ -34,9 +34,9 @@ let MsFilesModule = MsFilesModule_1 = class MsFilesModule {
|
|
34
34
|
};
|
35
35
|
}
|
36
36
|
static async registerAsync(options) {
|
37
|
-
const url = (options === null || options === void 0 ? void 0 : options.urlMsFiles) || process.env.
|
37
|
+
const url = (options === null || options === void 0 ? void 0 : options.urlMsFiles) || process.env.ENV_SERVICE_MS_FILES_URL;
|
38
38
|
if (!url)
|
39
|
-
console.warn(chalk_1.bold.red(`
|
39
|
+
console.warn(chalk_1.bold.red(`ENV_SERVICE_MS_FILES_URL no definido en variables de entorno para ms-files`));
|
40
40
|
return {
|
41
41
|
global: options.global,
|
42
42
|
module: MsFilesModule_1,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ms-files.module.js","sourceRoot":"","sources":["../../src/ms-files/ms-files.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,yCAA2C;AAC3C,2CAAuD;AACvD,yDAAoD;AACpD,iCAA6B;AAUtB,IAAM,aAAa,qBAAnB,MAAM,aAAa;IAIxB,MAAM,CAAC,QAAQ,CAAC,OAA8B;QAC5C,MAAM,GAAG,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,KAAI,OAAO,CAAC,GAAG,CAAC,
|
1
|
+
{"version":3,"file":"ms-files.module.js","sourceRoot":"","sources":["../../src/ms-files/ms-files.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,yCAA2C;AAC3C,2CAAuD;AACvD,yDAAoD;AACpD,iCAA6B;AAUtB,IAAM,aAAa,qBAA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gBAAgB;iBAC3C,CAAC;aACH;YACD,SAAS,EAAE,CAAC,iCAAc,CAAC;YAC3B,OAAO,EAAE,CAAC,iCAAc,CAAC;SAC1B,CAAC;IACJ,CAAC;CACF,CAAA;AArDY,aAAa;IADzB,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,aAAa,CAqDzB;AArDY,sCAAa"}
|
@@ -14,9 +14,9 @@ const logs_service_1 = require("./logs.service");
|
|
14
14
|
const chalk_1 = require("chalk");
|
15
15
|
let MsLogsModule = MsLogsModule_1 = class MsLogsModule {
|
16
16
|
static register(options) {
|
17
|
-
const url = (options === null || options === void 0 ? void 0 : options.urlMsLogs) || process.env.
|
17
|
+
const url = (options === null || options === void 0 ? void 0 : options.urlMsLogs) || process.env.ENV_SERVICE_MS_LOGS;
|
18
18
|
if (!url)
|
19
|
-
console.warn(chalk_1.bold.red(`
|
19
|
+
console.warn(chalk_1.bold.red(`ENV_SERVICE_MS_LOGS no definido en variables de entorno para ms-files`));
|
20
20
|
return {
|
21
21
|
global: options.global,
|
22
22
|
module: MsLogsModule_1,
|
@@ -31,9 +31,9 @@ let MsLogsModule = MsLogsModule_1 = class MsLogsModule {
|
|
31
31
|
};
|
32
32
|
}
|
33
33
|
static async registerAsync(options) {
|
34
|
-
const url = (options === null || options === void 0 ? void 0 : options.urlMsLogs) || process.env.
|
34
|
+
const url = (options === null || options === void 0 ? void 0 : options.urlMsLogs) || process.env.ENV_SERVICE_MS_LOGS;
|
35
35
|
if (!url)
|
36
|
-
console.warn(chalk_1.bold.red(`
|
36
|
+
console.warn(chalk_1.bold.red(`ENV_SERVICE_MS_LOGS no definido en variables de entorno para ms-files`));
|
37
37
|
return {
|
38
38
|
global: options.global,
|
39
39
|
module: MsLogsModule_1,
|
@@ -55,7 +55,7 @@ MsLogsModule = MsLogsModule_1 = __decorate([
|
|
55
55
|
logs_service_1.MsLogsService,
|
56
56
|
{
|
57
57
|
provide: 'BASE_URL',
|
58
|
-
useValue: process.env.
|
58
|
+
useValue: process.env.ENV_SERVICE_MS_LOGS,
|
59
59
|
},
|
60
60
|
],
|
61
61
|
})
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"logs.module.js","sourceRoot":"","sources":["../../src/ms-logs/logs.module.ts"],"names":[],"mappings":";;;;;;;;;;AAUA,yCAA2C;AAC3C,2CAAuD;AACvD,iDAA+C;AAC/C,iCAA6B;AAsBtB,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACvB,MAAM,CAAC,QAAQ,CAAC,OAA6B;QAC3C,MAAM,GAAG,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,OAAO,CAAC,GAAG,CAAC,
|
1
|
+
{"version":3,"file":"logs.module.js","sourceRoot":"","sources":["../../src/ms-logs/logs.module.ts"],"names":[],"mappings":";;;;;;;;;;AAUA,yCAA2C;AAC3C,2CAAuD;AACvD,iDAA+C;AAC/C,iCAA6B;AAsBtB,IAAM,YAAY,oBAAlB,MAAM,YAAY;IACvB,MAAM,CAAC,QAAQ,CAAC,OAA6B;QAC3C,MAAM,GAAG,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;QAClE,IAAI,CAAC,GAAG;YACN,OAAO,CAAC,IAAI,CACV,YAAI,CAAC,GAAG,CAAC,uEAAuE,CAAC,CAClF,CAAC;QACJ,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,cAAY;YACpB,SAAS,EAAE;gBACT,4BAAa;gBACb;oBACE,OAAO,EAAE,UAAU;oBACnB,QAAQ,EAAE,GAAG;iBACd;aACF;YACD,OAAO,EAAE,CAAC,4BAAa,CAAC;SACzB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,OAA4B;QACrD,MAAM,GAAG,GAAG,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;QAClE,IAAI,CAAC,GAAG;YACN,OAAO,CAAC,IAAI,CACV,YAAI,CAAC,GAAG,CAAC,uEAAuE,CAAC,CAClF,CAAC;QAEJ,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,MAAM,EAAE,cAAY;YACpB,SAAS,EAAE;gBACT,4BAAa;gBACb;oBACE,OAAO,EAAE,UAAU;oBACnB,QAAQ,EAAE,GAAG;iBACd;aACF;YACD,OAAO,EAAE,CAAC,4BAAa,CAAC;SACzB,CAAC;IACJ,CAAC;CACF,CAAA;AAzCY,YAAY;IAXxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,kBAAU,CAAC;QAErB,SAAS,EAAE;YACT,4BAAa;YACb;gBACE,OAAO,EAAE,UAAU;gBACnB,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;aAC1C;SACF;KACF,CAAC;GACW,YAAY,CAyCxB;AAzCY,oCAAY"}
|
@@ -201,12 +201,13 @@ export interface LoginResponse_Funcionario {
|
|
201
201
|
oficina: string;
|
202
202
|
oficinaId: number;
|
203
203
|
municipio: string;
|
204
|
-
|
204
|
+
municipioId: number;
|
205
205
|
entidad: string;
|
206
206
|
entidadId: number;
|
207
207
|
institucionId: number;
|
208
208
|
institucion: string;
|
209
209
|
departamento: string;
|
210
|
+
departamentoId: number;
|
210
211
|
}
|
211
212
|
export interface LoginResponse_App {
|
212
213
|
nombre: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"seguridad.pb.js","sourceRoot":"","sources":["../../src/ms-seguridad/seguridad.pb.ts"],"names":[],"mappings":";;;AACA,yDAAqE;AAGxD,QAAA,eAAe,GAAG,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"seguridad.pb.js","sourceRoot":"","sources":["../../src/ms-seguridad/seguridad.pb.ts"],"names":[],"mappings":";;;AACA,yDAAqE;AAGxD,QAAA,eAAe,GAAG,oBAAoB,CAAC;AAsTvC,QAAA,+BAA+B,GAAG,oBAAoB,CAAC;AAgGpE,SAAgB,iCAAiC;IAC/C,OAAO,UAAU,WAAqB;QACpC,MAAM,WAAW,GAAa;YAC5B,iBAAiB;YACjB,cAAc;YACd,eAAe;YACf,gBAAgB;YAChB,aAAa;YACb,0BAA0B;YAC1B,sBAAsB;YACtB,wBAAwB;YACxB,wBAAwB;YACxB,YAAY;YACZ,OAAO;YACP,wBAAwB;YACxB,kBAAkB;YAClB,QAAQ;YACR,iBAAiB;YACjB,YAAY;YACZ,UAAU;SACX,CAAC;QACF,KAAK,MAAM,MAAM,IAAI,WAAW,EAAE;YAChC,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACxF,IAAA,0BAAU,EAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;SAC3F;QACD,MAAM,iBAAiB,GAAa,EAAE,CAAC;QACvC,KAAK,MAAM,MAAM,IAAI,iBAAiB,EAAE;YACtC,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;YACxF,IAAA,gCAAgB,EAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;SACjG;IACH,CAAC,CAAC;AACJ,CAAC;AA/BD,8EA+BC;AAEY,QAAA,sBAAsB,GAAG,kBAAkB,CAAC"}
|
@@ -259,12 +259,13 @@ message LoginResponse {
|
|
259
259
|
string oficina = 19;
|
260
260
|
int32 oficinaId = 20;
|
261
261
|
string municipio = 21;
|
262
|
-
int32
|
262
|
+
int32 municipioId = 22;
|
263
263
|
string entidad = 23;
|
264
264
|
int32 entidadId = 24;
|
265
265
|
int32 institucionId = 25;
|
266
266
|
string institucion = 26;
|
267
267
|
string departamento = 27;
|
268
|
+
int32 departamentoId = 28;
|
268
269
|
}
|
269
270
|
|
270
271
|
message App {
|