fiscalia_bo-nest-helpers 1.1.0 → 1.1.2
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/dist/dto/response.dto.d.ts +2 -2
- package/dist/helpers/global-exception.filter.d.ts +7 -1
- package/dist/helpers/global-exception.filter.js +13 -1
- package/dist/helpers/global-exception.filter.js.map +1 -1
- package/dist/modules/ms-personas/dto/ms-persona.input.d.ts +78 -0
- package/dist/modules/ms-personas/dto/ms-persona.input.js +469 -1
- package/dist/modules/ms-personas/dto/ms-persona.input.js.map +1 -1
- package/dist/modules/ms-personas/dto/ms-persona.res.d.ts +126 -0
- package/dist/modules/ms-personas/ms-personas.service.d.ts +18 -1
- package/dist/modules/ms-personas/ms-personas.service.js +93 -0
- package/dist/modules/ms-personas/ms-personas.service.js.map +1 -1
- package/dist/modules/ms-seguridad/index.d.ts +1 -0
- package/dist/modules/ms-seguridad/index.js +3 -1
- package/dist/modules/ms-seguridad/index.js.map +1 -1
- package/dist/modules/ms-seguridad-convenio/decorators/token.decorator.js +5 -6
- package/dist/modules/ms-seguridad-convenio/decorators/token.decorator.js.map +1 -1
- package/dist/modules/ms-seguridad-convenio/index.d.ts +2 -2
- package/dist/modules/ms-seguridad-convenio/index.js +4 -4
- package/dist/modules/ms-seguridad-convenio/index.js.map +1 -1
- package/dist/modules/ms-seguridad-convenio/ms-seguridad-convenio.decorator.js +4 -4
- package/dist/modules/ms-seguridad-convenio/ms-seguridad-convenio.decorator.js.map +1 -1
- package/dist/modules/ms-seguridad-convenio/ms-seguridad-convenio.module.js +4 -4
- package/dist/modules/ms-seguridad-convenio/ms-seguridad-convenio.module.js.map +1 -1
- package/dist/modules/ms-seguridad-convenio/ms-seguridad-convenio.service.js +1 -1
- package/dist/modules/ms-seguridad-convenio/ms-seguridad-convenio.service.js.map +1 -1
- package/dist/modules/ms-seguridad-convenio/{permision.guard.d.ts → permision-convenio.guard.d.ts} +1 -1
- package/dist/modules/ms-seguridad-convenio/{permision.guard.js → permision-convenio.guard.js} +6 -6
- package/dist/modules/ms-seguridad-convenio/permision-convenio.guard.js.map +1 -0
- package/dist/modules/ms-seguridad-convenio/{token-auth.guard.js → token-auth-convenio.guard.js} +1 -1
- package/dist/modules/ms-seguridad-convenio/token-auth-convenio.guard.js.map +1 -0
- package/dist/modules/ms-whatsapp/ms-whatsapp.service.js +8 -2
- package/dist/modules/ms-whatsapp/ms-whatsapp.service.js.map +1 -1
- package/package.json +2 -2
- package/dist/modules/ms-seguridad-convenio/helpers/global-exception.helper.d.ts +0 -20
- package/dist/modules/ms-seguridad-convenio/helpers/global-exception.helper.js +0 -86
- package/dist/modules/ms-seguridad-convenio/helpers/global-exception.helper.js.map +0 -1
- package/dist/modules/ms-seguridad-convenio/permision.guard.js.map +0 -1
- package/dist/modules/ms-seguridad-convenio/token-auth.guard.js.map +0 -1
- /package/dist/modules/ms-seguridad-convenio/{token-auth.guard.d.ts → token-auth-convenio.guard.d.ts} +0 -0
@@ -1,20 +0,0 @@
|
|
1
|
-
import { ExceptionFilter, ArgumentsHost, BadRequestException, HttpException, NotAcceptableException, UnauthorizedException } from '@nestjs/common';
|
2
|
-
import { RpcException } from '@nestjs/microservices';
|
3
|
-
export declare class GlobalExceptionFilter implements ExceptionFilter {
|
4
|
-
catch(error: Error, host: ArgumentsHost): void;
|
5
|
-
}
|
6
|
-
export declare class CustomHttpError extends HttpException {
|
7
|
-
constructor(message?: string, status?: number, response?: any, error?: boolean);
|
8
|
-
}
|
9
|
-
export declare class ApiBadRequestError extends BadRequestException {
|
10
|
-
constructor(message?: string, response?: any, status?: number, error?: boolean);
|
11
|
-
}
|
12
|
-
export declare class ApiUnauthorizedError extends UnauthorizedException {
|
13
|
-
constructor(message?: string, response?: any, status?: number, error?: boolean);
|
14
|
-
}
|
15
|
-
export declare class NotAcceptableError extends NotAcceptableException {
|
16
|
-
constructor(message?: string, response?: any, status?: number, error?: boolean);
|
17
|
-
}
|
18
|
-
export declare class RpcExceptionError extends RpcException {
|
19
|
-
constructor(message?: string, response?: any, status?: number, error?: boolean);
|
20
|
-
}
|
@@ -1,86 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.RpcExceptionError = exports.NotAcceptableError = exports.ApiUnauthorizedError = exports.ApiBadRequestError = exports.CustomHttpError = exports.GlobalExceptionFilter = void 0;
|
10
|
-
const common_1 = require("@nestjs/common");
|
11
|
-
const microservices_1 = require("@nestjs/microservices");
|
12
|
-
const throttler_1 = require("@nestjs/throttler");
|
13
|
-
let GlobalExceptionFilter = class GlobalExceptionFilter {
|
14
|
-
catch(error, host) {
|
15
|
-
const response = host.switchToHttp().getResponse();
|
16
|
-
let resp = {
|
17
|
-
error: true,
|
18
|
-
message: 'Error interno del servidor',
|
19
|
-
response: null,
|
20
|
-
status: 500,
|
21
|
-
};
|
22
|
-
if (error instanceof throttler_1.ThrottlerException) {
|
23
|
-
resp.message = 'Superó la cantidad de solicitudes permitidos, re-intente mas tarde';
|
24
|
-
resp.status = 429;
|
25
|
-
}
|
26
|
-
if (error instanceof common_1.BadRequestException) {
|
27
|
-
resp.message = `Excepción de solicitud incorrecta, ${error.getResponse().message}`;
|
28
|
-
resp.status = 400;
|
29
|
-
}
|
30
|
-
else if (error instanceof common_1.NotFoundException) {
|
31
|
-
resp.message = 'No encontrado';
|
32
|
-
resp.status = 404;
|
33
|
-
}
|
34
|
-
else if (error instanceof common_1.UnprocessableEntityException) {
|
35
|
-
resp.message = 'Entidad no processable';
|
36
|
-
resp.status = 422;
|
37
|
-
}
|
38
|
-
else if (error instanceof common_1.HttpException) {
|
39
|
-
const respErr = error.getResponse();
|
40
|
-
if (typeof (respErr === null || respErr === void 0 ? void 0 : respErr.error) !== 'boolean' && typeof (respErr === null || respErr === void 0 ? void 0 : respErr.message) !== 'string') {
|
41
|
-
if (typeof respErr === 'string')
|
42
|
-
response.message = respErr;
|
43
|
-
}
|
44
|
-
else
|
45
|
-
resp = respErr;
|
46
|
-
if (!resp.status || resp.status < 200)
|
47
|
-
resp.status = 400;
|
48
|
-
}
|
49
|
-
response.status(resp.status).json(resp);
|
50
|
-
}
|
51
|
-
};
|
52
|
-
exports.GlobalExceptionFilter = GlobalExceptionFilter;
|
53
|
-
exports.GlobalExceptionFilter = GlobalExceptionFilter = __decorate([
|
54
|
-
(0, common_1.Catch)()
|
55
|
-
], GlobalExceptionFilter);
|
56
|
-
class CustomHttpError extends common_1.HttpException {
|
57
|
-
constructor(message = 'Ocurrio un error', status = 400, response = null, error = true) {
|
58
|
-
super({ error, message, status, response }, status);
|
59
|
-
}
|
60
|
-
}
|
61
|
-
exports.CustomHttpError = CustomHttpError;
|
62
|
-
class ApiBadRequestError extends common_1.BadRequestException {
|
63
|
-
constructor(message = 'Ocurrio un error', response = null, status = 400, error = true) {
|
64
|
-
super({ error, message, status, response });
|
65
|
-
}
|
66
|
-
}
|
67
|
-
exports.ApiBadRequestError = ApiBadRequestError;
|
68
|
-
class ApiUnauthorizedError extends common_1.UnauthorizedException {
|
69
|
-
constructor(message = 'usuario no autenticado y/o token no válido', response = null, status = 401, error = true) {
|
70
|
-
super({ error, message, status, response });
|
71
|
-
}
|
72
|
-
}
|
73
|
-
exports.ApiUnauthorizedError = ApiUnauthorizedError;
|
74
|
-
class NotAcceptableError extends common_1.NotAcceptableException {
|
75
|
-
constructor(message = 'no es posible devolver datos por un error', response = null, status = 406, error = true) {
|
76
|
-
super({ error, message, status, response });
|
77
|
-
}
|
78
|
-
}
|
79
|
-
exports.NotAcceptableError = NotAcceptableError;
|
80
|
-
class RpcExceptionError extends microservices_1.RpcException {
|
81
|
-
constructor(message = 'no es posible devolver datos por un error', response = null, status = 406, error = true) {
|
82
|
-
super({ error, message, status, response });
|
83
|
-
}
|
84
|
-
}
|
85
|
-
exports.RpcExceptionError = RpcExceptionError;
|
86
|
-
//# sourceMappingURL=global-exception.helper.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"global-exception.helper.js","sourceRoot":"","sources":["../../../../src/modules/ms-seguridad-convenio/helpers/global-exception.helper.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAUwB;AACxB,yDAAqD;AACrD,iDAAuD;AAIhD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,KAAK,CAAC,KAAY,EAAE,IAAmB;QACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC,WAAW,EAAE,CAAC;QACnD,IAAI,IAAI,GAAc;YACpB,KAAK,EAAE,IAAI;YACX,OAAO,EAAE,4BAA4B;YACrC,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,GAAG;SACZ,CAAC;QAEF,IAAI,KAAK,YAAY,8BAAkB,EAAE,CAAC;YACxC,IAAI,CAAC,OAAO,GAAG,oEAAoE,CAAC;YACpF,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QACpB,CAAC;QACD,IAAI,KAAK,YAAY,4BAAmB,EAAE,CAAC;YACzC,IAAI,CAAC,OAAO,GAAG,sCACZ,KAAK,CAAC,WAAW,EAA2B,CAAC,OAChD,EAAE,CAAC;YAEH,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QACpB,CAAC;aAAM,IAAI,KAAK,YAAY,0BAAiB,EAAE,CAAC;YAC9C,IAAI,CAAC,OAAO,GAAG,eAAe,CAAC;YAC/B,IAAI,CAAC,MAAM,GAAG,G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