@veritas-lex/contract-analysis-package 1.2.3
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 +181 -0
- package/dist/auth/auth-core.module.d.ts +21 -0
- package/dist/auth/auth-core.module.d.ts.map +1 -0
- package/dist/auth/auth-core.module.js +56 -0
- package/dist/auth/auth-core.module.js.map +1 -0
- package/dist/auth/decorators/current-user.decorator.d.ts +2 -0
- package/dist/auth/decorators/current-user.decorator.d.ts.map +1 -0
- package/dist/auth/decorators/current-user.decorator.js +9 -0
- package/dist/auth/decorators/current-user.decorator.js.map +1 -0
- package/dist/auth/decorators/public.decorator.d.ts +3 -0
- package/dist/auth/decorators/public.decorator.d.ts.map +1 -0
- package/dist/auth/decorators/public.decorator.js +8 -0
- package/dist/auth/decorators/public.decorator.js.map +1 -0
- package/dist/auth/guards/jwt-auth.guard.d.ts +11 -0
- package/dist/auth/guards/jwt-auth.guard.d.ts.map +1 -0
- package/dist/auth/guards/jwt-auth.guard.js +39 -0
- package/dist/auth/guards/jwt-auth.guard.js.map +1 -0
- package/dist/auth/index.d.ts +7 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +15 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/interfaces/jwt-payload.interface.d.ts +24 -0
- package/dist/auth/interfaces/jwt-payload.interface.d.ts.map +1 -0
- package/dist/auth/interfaces/jwt-payload.interface.js +3 -0
- package/dist/auth/interfaces/jwt-payload.interface.js.map +1 -0
- package/dist/auth/strategies/base-jwt.strategy.d.ts +47 -0
- package/dist/auth/strategies/base-jwt.strategy.d.ts.map +1 -0
- package/dist/auth/strategies/base-jwt.strategy.js +162 -0
- package/dist/auth/strategies/base-jwt.strategy.js.map +1 -0
- package/dist/bootstrap/configure-app.d.ts +50 -0
- package/dist/bootstrap/configure-app.d.ts.map +1 -0
- package/dist/bootstrap/configure-app.js +117 -0
- package/dist/bootstrap/configure-app.js.map +1 -0
- package/dist/bootstrap/index.d.ts +3 -0
- package/dist/bootstrap/index.d.ts.map +1 -0
- package/dist/bootstrap/index.js +6 -0
- package/dist/bootstrap/index.js.map +1 -0
- package/dist/config/app.config.d.ts +37 -0
- package/dist/config/app.config.d.ts.map +1 -0
- package/dist/config/app.config.js +28 -0
- package/dist/config/app.config.js.map +1 -0
- package/dist/config/database.config.d.ts +48 -0
- package/dist/config/database.config.d.ts.map +1 -0
- package/dist/config/database.config.js +34 -0
- package/dist/config/database.config.js.map +1 -0
- package/dist/config/doc.config.d.ts +31 -0
- package/dist/config/doc.config.d.ts.map +1 -0
- package/dist/config/doc.config.js +22 -0
- package/dist/config/doc.config.js.map +1 -0
- package/dist/config/index.d.ts +17 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +26 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/jwt.config.d.ts +19 -0
- package/dist/config/jwt.config.d.ts.map +1 -0
- package/dist/config/jwt.config.js +28 -0
- package/dist/config/jwt.config.js.map +1 -0
- package/dist/config/logging.config.d.ts +33 -0
- package/dist/config/logging.config.d.ts.map +1 -0
- package/dist/config/logging.config.js +106 -0
- package/dist/config/logging.config.js.map +1 -0
- package/dist/config/redis.config.d.ts +19 -0
- package/dist/config/redis.config.d.ts.map +1 -0
- package/dist/config/redis.config.js +16 -0
- package/dist/config/redis.config.js.map +1 -0
- package/dist/config/security.config.d.ts +66 -0
- package/dist/config/security.config.d.ts.map +1 -0
- package/dist/config/security.config.js +66 -0
- package/dist/config/security.config.js.map +1 -0
- package/dist/config/storage.config.d.ts +20 -0
- package/dist/config/storage.config.d.ts.map +1 -0
- package/dist/config/storage.config.js +17 -0
- package/dist/config/storage.config.js.map +1 -0
- package/dist/config/validation.config.d.ts +62 -0
- package/dist/config/validation.config.d.ts.map +1 -0
- package/dist/config/validation.config.js +139 -0
- package/dist/config/validation.config.js.map +1 -0
- package/dist/constants/enums.d.ts +76 -0
- package/dist/constants/enums.d.ts.map +1 -0
- package/dist/constants/enums.js +92 -0
- package/dist/constants/enums.js.map +1 -0
- package/dist/constants/file-validation.constants.d.ts +28 -0
- package/dist/constants/file-validation.constants.d.ts.map +1 -0
- package/dist/constants/file-validation.constants.js +81 -0
- package/dist/constants/file-validation.constants.js.map +1 -0
- package/dist/constants/index.d.ts +6 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +26 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/pii-classifications.constants.d.ts +27 -0
- package/dist/constants/pii-classifications.constants.d.ts.map +1 -0
- package/dist/constants/pii-classifications.constants.js +68 -0
- package/dist/constants/pii-classifications.constants.js.map +1 -0
- package/dist/database/base.entity.d.ts +6 -0
- package/dist/database/base.entity.d.ts.map +1 -0
- package/dist/database/base.entity.js +32 -0
- package/dist/database/base.entity.js.map +1 -0
- package/dist/database/database.module.d.ts +32 -0
- package/dist/database/database.module.d.ts.map +1 -0
- package/dist/database/database.module.js +69 -0
- package/dist/database/database.module.js.map +1 -0
- package/dist/database/entities/base-audit-log.entity.d.ts +21 -0
- package/dist/database/entities/base-audit-log.entity.d.ts.map +1 -0
- package/dist/database/entities/base-audit-log.entity.js +90 -0
- package/dist/database/entities/base-audit-log.entity.js.map +1 -0
- package/dist/database/entities/base-contract-chunk.entity.d.ts +18 -0
- package/dist/database/entities/base-contract-chunk.entity.d.ts.map +1 -0
- package/dist/database/entities/base-contract-chunk.entity.js +71 -0
- package/dist/database/entities/base-contract-chunk.entity.js.map +1 -0
- package/dist/database/entities/base-contract-event.entity.d.ts +16 -0
- package/dist/database/entities/base-contract-event.entity.d.ts.map +1 -0
- package/dist/database/entities/base-contract-event.entity.js +66 -0
- package/dist/database/entities/base-contract-event.entity.js.map +1 -0
- package/dist/database/entities/base-contract-key-date-rule.entity.d.ts +31 -0
- package/dist/database/entities/base-contract-key-date-rule.entity.d.ts.map +1 -0
- package/dist/database/entities/base-contract-key-date-rule.entity.js +140 -0
- package/dist/database/entities/base-contract-key-date-rule.entity.js.map +1 -0
- package/dist/database/entities/base-contract-pii-replacement.entity.d.ts +18 -0
- package/dist/database/entities/base-contract-pii-replacement.entity.d.ts.map +1 -0
- package/dist/database/entities/base-contract-pii-replacement.entity.js +67 -0
- package/dist/database/entities/base-contract-pii-replacement.entity.js.map +1 -0
- package/dist/database/entities/base-contract-red-flag.entity.d.ts +27 -0
- package/dist/database/entities/base-contract-red-flag.entity.d.ts.map +1 -0
- package/dist/database/entities/base-contract-red-flag.entity.js +114 -0
- package/dist/database/entities/base-contract-red-flag.entity.js.map +1 -0
- package/dist/database/entities/base-contract-task.entity.d.ts +20 -0
- package/dist/database/entities/base-contract-task.entity.d.ts.map +1 -0
- package/dist/database/entities/base-contract-task.entity.js +87 -0
- package/dist/database/entities/base-contract-task.entity.js.map +1 -0
- package/dist/database/entities/base-contract-text.entity.d.ts +19 -0
- package/dist/database/entities/base-contract-text.entity.d.ts.map +1 -0
- package/dist/database/entities/base-contract-text.entity.js +77 -0
- package/dist/database/entities/base-contract-text.entity.js.map +1 -0
- package/dist/database/entities/base-contract.entity.d.ts +56 -0
- package/dist/database/entities/base-contract.entity.d.ts.map +1 -0
- package/dist/database/entities/base-contract.entity.js +221 -0
- package/dist/database/entities/base-contract.entity.js.map +1 -0
- package/dist/database/entities/base-job.entity.d.ts +21 -0
- package/dist/database/entities/base-job.entity.d.ts.map +1 -0
- package/dist/database/entities/base-job.entity.js +89 -0
- package/dist/database/entities/base-job.entity.js.map +1 -0
- package/dist/database/entities/base-qna-question.entity.d.ts +22 -0
- package/dist/database/entities/base-qna-question.entity.d.ts.map +1 -0
- package/dist/database/entities/base-qna-question.entity.js +92 -0
- package/dist/database/entities/base-qna-question.entity.js.map +1 -0
- package/dist/database/entities/base-scoring-criteria.entity.d.ts +57 -0
- package/dist/database/entities/base-scoring-criteria.entity.d.ts.map +1 -0
- package/dist/database/entities/base-scoring-criteria.entity.js +376 -0
- package/dist/database/entities/base-scoring-criteria.entity.js.map +1 -0
- package/dist/database/entities/base-users-profile.entity.d.ts +32 -0
- package/dist/database/entities/base-users-profile.entity.d.ts.map +1 -0
- package/dist/database/entities/base-users-profile.entity.js +91 -0
- package/dist/database/entities/base-users-profile.entity.js.map +1 -0
- package/dist/database/entities/index.d.ts +16 -0
- package/dist/database/entities/index.d.ts.map +1 -0
- package/dist/database/entities/index.js +37 -0
- package/dist/database/entities/index.js.map +1 -0
- package/dist/database/entities/qna-question-template.entity.d.ts +30 -0
- package/dist/database/entities/qna-question-template.entity.d.ts.map +1 -0
- package/dist/database/entities/qna-question-template.entity.js +145 -0
- package/dist/database/entities/qna-question-template.entity.js.map +1 -0
- package/dist/database/entities/qna-response.entity.d.ts +29 -0
- package/dist/database/entities/qna-response.entity.d.ts.map +1 -0
- package/dist/database/entities/qna-response.entity.js +129 -0
- package/dist/database/entities/qna-response.entity.js.map +1 -0
- package/dist/database/index.d.ts +7 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +32 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/redis.module.d.ts +12 -0
- package/dist/database/redis.module.d.ts.map +1 -0
- package/dist/database/redis.module.js +40 -0
- package/dist/database/redis.module.js.map +1 -0
- package/dist/database/redis.provider.d.ts +15 -0
- package/dist/database/redis.provider.d.ts.map +1 -0
- package/dist/database/redis.provider.js +42 -0
- package/dist/database/redis.provider.js.map +1 -0
- package/dist/dto/api-response.dto.d.ts +36 -0
- package/dist/dto/api-response.dto.d.ts.map +1 -0
- package/dist/dto/api-response.dto.js +88 -0
- package/dist/dto/api-response.dto.js.map +1 -0
- package/dist/dto/index.d.ts +2 -0
- package/dist/dto/index.d.ts.map +1 -0
- package/dist/dto/index.js +6 -0
- package/dist/dto/index.js.map +1 -0
- package/dist/filters/all-exceptions.filter.d.ts +43 -0
- package/dist/filters/all-exceptions.filter.d.ts.map +1 -0
- package/dist/filters/all-exceptions.filter.js +123 -0
- package/dist/filters/all-exceptions.filter.js.map +1 -0
- package/dist/filters/index.d.ts +3 -0
- package/dist/filters/index.d.ts.map +1 -0
- package/dist/filters/index.js +6 -0
- package/dist/filters/index.js.map +1 -0
- package/dist/helpers/crypto.service.d.ts +53 -0
- package/dist/helpers/crypto.service.d.ts.map +1 -0
- package/dist/helpers/crypto.service.js +153 -0
- package/dist/helpers/crypto.service.js.map +1 -0
- package/dist/helpers/index.d.ts +2 -0
- package/dist/helpers/index.d.ts.map +1 -0
- package/dist/helpers/index.js +6 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -0
- package/dist/swagger/index.d.ts +2 -0
- package/dist/swagger/index.d.ts.map +1 -0
- package/dist/swagger/index.js +6 -0
- package/dist/swagger/index.js.map +1 -0
- package/dist/swagger/swagger.d.ts +16 -0
- package/dist/swagger/swagger.d.ts.map +1 -0
- package/dist/swagger/swagger.js +59 -0
- package/dist/swagger/swagger.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ApiResponseDto = void 0;
|
|
4
|
+
var api_response_dto_1 = require("./api-response.dto");
|
|
5
|
+
Object.defineProperty(exports, "ApiResponseDto", { enumerable: true, get: function () { return api_response_dto_1.ApiResponseDto; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dto/index.ts"],"names":[],"mappings":";;;AAAA,uDAAoD;AAA3C,kHAAA,cAAc,OAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ExceptionFilter, ArgumentsHost } from "@nestjs/common";
|
|
2
|
+
/**
|
|
3
|
+
* Standard error response format for API consistency.
|
|
4
|
+
* Matches the ApiResponseDto structure with `success: false`.
|
|
5
|
+
*/
|
|
6
|
+
export interface ErrorResponse {
|
|
7
|
+
success: false;
|
|
8
|
+
message: string | string[];
|
|
9
|
+
error: {
|
|
10
|
+
statusCode: number;
|
|
11
|
+
error: string;
|
|
12
|
+
path: string;
|
|
13
|
+
method: string;
|
|
14
|
+
stack?: string;
|
|
15
|
+
};
|
|
16
|
+
timestamp: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Global Exception Filter
|
|
20
|
+
*
|
|
21
|
+
* Catches all exceptions and formats them into a consistent response structure.
|
|
22
|
+
* - Handles HttpException instances with their specific status codes
|
|
23
|
+
* - Handles unknown errors as 500 Internal Server Error
|
|
24
|
+
* - Only exposes stack traces in non-production environments
|
|
25
|
+
* - Logs server errors (5xx) at `error` level, client errors (4xx) at `warn` level
|
|
26
|
+
*/
|
|
27
|
+
export declare class AllExceptionsFilter implements ExceptionFilter {
|
|
28
|
+
private readonly logger;
|
|
29
|
+
catch(exception: unknown, host: ArgumentsHost): void;
|
|
30
|
+
/**
|
|
31
|
+
* Extract error details from the exception
|
|
32
|
+
*/
|
|
33
|
+
private extractErrorDetails;
|
|
34
|
+
/**
|
|
35
|
+
* Get human-readable error name from status code
|
|
36
|
+
*/
|
|
37
|
+
private getErrorName;
|
|
38
|
+
/**
|
|
39
|
+
* Log the exception with appropriate level and context
|
|
40
|
+
*/
|
|
41
|
+
private logException;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=all-exceptions.filter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all-exceptions.filter.d.ts","sourceRoot":"","sources":["../../src/filters/all-exceptions.filter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,aAAa,EAId,MAAM,gBAAgB,CAAC;AAGxB;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,KAAK,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC3B,KAAK,EAAE;QACL,UAAU,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,qBACa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAwC;IAE/D,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI;IA4BpD;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAuC3B;;OAEG;IACH,OAAO,CAAC,YAAY;IAmBpB;;OAEG;IACH,OAAO,CAAC,YAAY;CA8BrB"}
|
|
@@ -0,0 +1,123 @@
|
|
|
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
|
+
var AllExceptionsFilter_1;
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.AllExceptionsFilter = void 0;
|
|
11
|
+
const common_1 = require("@nestjs/common");
|
|
12
|
+
/**
|
|
13
|
+
* Global Exception Filter
|
|
14
|
+
*
|
|
15
|
+
* Catches all exceptions and formats them into a consistent response structure.
|
|
16
|
+
* - Handles HttpException instances with their specific status codes
|
|
17
|
+
* - Handles unknown errors as 500 Internal Server Error
|
|
18
|
+
* - Only exposes stack traces in non-production environments
|
|
19
|
+
* - Logs server errors (5xx) at `error` level, client errors (4xx) at `warn` level
|
|
20
|
+
*/
|
|
21
|
+
let AllExceptionsFilter = AllExceptionsFilter_1 = class AllExceptionsFilter {
|
|
22
|
+
logger = new common_1.Logger(AllExceptionsFilter_1.name);
|
|
23
|
+
catch(exception, host) {
|
|
24
|
+
const ctx = host.switchToHttp();
|
|
25
|
+
const response = ctx.getResponse();
|
|
26
|
+
const request = ctx.getRequest();
|
|
27
|
+
const { status, message, error } = this.extractErrorDetails(exception);
|
|
28
|
+
const isProduction = process.env.NODE_ENV === "production";
|
|
29
|
+
const errorResponse = {
|
|
30
|
+
success: false,
|
|
31
|
+
message,
|
|
32
|
+
error: {
|
|
33
|
+
statusCode: status,
|
|
34
|
+
error,
|
|
35
|
+
path: request.url,
|
|
36
|
+
method: request.method,
|
|
37
|
+
...(!isProduction && {
|
|
38
|
+
stack: exception instanceof Error ? exception.stack : undefined,
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
timestamp: new Date().toISOString(),
|
|
42
|
+
};
|
|
43
|
+
this.logException(request, status, exception);
|
|
44
|
+
response.status(status).json(errorResponse);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Extract error details from the exception
|
|
48
|
+
*/
|
|
49
|
+
extractErrorDetails(exception) {
|
|
50
|
+
if (exception instanceof common_1.HttpException) {
|
|
51
|
+
const status = exception.getStatus();
|
|
52
|
+
const exceptionResponse = exception.getResponse();
|
|
53
|
+
// Handle validation errors (class-validator)
|
|
54
|
+
if (typeof exceptionResponse === "object" && exceptionResponse !== null) {
|
|
55
|
+
const response = exceptionResponse;
|
|
56
|
+
return {
|
|
57
|
+
status,
|
|
58
|
+
message: response.message || exception.message,
|
|
59
|
+
error: response.error || this.getErrorName(status),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
status,
|
|
64
|
+
message: typeof exceptionResponse === "string"
|
|
65
|
+
? exceptionResponse
|
|
66
|
+
: exception.message,
|
|
67
|
+
error: this.getErrorName(status),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
status: common_1.HttpStatus.INTERNAL_SERVER_ERROR,
|
|
72
|
+
message: exception instanceof Error
|
|
73
|
+
? exception.message
|
|
74
|
+
: "An unexpected error occurred",
|
|
75
|
+
error: "Internal Server Error",
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Get human-readable error name from status code
|
|
80
|
+
*/
|
|
81
|
+
getErrorName(status) {
|
|
82
|
+
const errorNames = {
|
|
83
|
+
[common_1.HttpStatus.BAD_REQUEST]: "Bad Request",
|
|
84
|
+
[common_1.HttpStatus.UNAUTHORIZED]: "Unauthorized",
|
|
85
|
+
[common_1.HttpStatus.FORBIDDEN]: "Forbidden",
|
|
86
|
+
[common_1.HttpStatus.NOT_FOUND]: "Not Found",
|
|
87
|
+
[common_1.HttpStatus.METHOD_NOT_ALLOWED]: "Method Not Allowed",
|
|
88
|
+
[common_1.HttpStatus.CONFLICT]: "Conflict",
|
|
89
|
+
[common_1.HttpStatus.UNPROCESSABLE_ENTITY]: "Unprocessable Entity",
|
|
90
|
+
[common_1.HttpStatus.TOO_MANY_REQUESTS]: "Too Many Requests",
|
|
91
|
+
[common_1.HttpStatus.INTERNAL_SERVER_ERROR]: "Internal Server Error",
|
|
92
|
+
[common_1.HttpStatus.BAD_GATEWAY]: "Bad Gateway",
|
|
93
|
+
[common_1.HttpStatus.SERVICE_UNAVAILABLE]: "Service Unavailable",
|
|
94
|
+
[common_1.HttpStatus.GATEWAY_TIMEOUT]: "Gateway Timeout",
|
|
95
|
+
};
|
|
96
|
+
return errorNames[status] || "Error";
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Log the exception with appropriate level and context
|
|
100
|
+
*/
|
|
101
|
+
logException(request, status, exception) {
|
|
102
|
+
const logContext = {
|
|
103
|
+
method: request.method,
|
|
104
|
+
url: request.url,
|
|
105
|
+
statusCode: status,
|
|
106
|
+
userAgent: request.headers["user-agent"],
|
|
107
|
+
ip: request.ip || request.headers["x-forwarded-for"],
|
|
108
|
+
};
|
|
109
|
+
const errorMessage = exception instanceof Error ? exception.message : String(exception);
|
|
110
|
+
const stack = exception instanceof Error ? exception.stack : undefined;
|
|
111
|
+
if (status >= common_1.HttpStatus.INTERNAL_SERVER_ERROR) {
|
|
112
|
+
this.logger.error(`${request.method} ${request.url} - ${status} - ${errorMessage}`, stack, JSON.stringify(logContext));
|
|
113
|
+
}
|
|
114
|
+
else if (status >= common_1.HttpStatus.BAD_REQUEST) {
|
|
115
|
+
this.logger.warn(`${request.method} ${request.url} - ${status} - ${errorMessage}`, JSON.stringify(logContext));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
exports.AllExceptionsFilter = AllExceptionsFilter;
|
|
120
|
+
exports.AllExceptionsFilter = AllExceptionsFilter = AllExceptionsFilter_1 = __decorate([
|
|
121
|
+
(0, common_1.Catch)()
|
|
122
|
+
], AllExceptionsFilter);
|
|
123
|
+
//# sourceMappingURL=all-exceptions.filter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"all-exceptions.filter.js","sourceRoot":"","sources":["../../src/filters/all-exceptions.filter.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAOwB;AAoBxB;;;;;;;;GAQG;AAEI,IAAM,mBAAmB,2BAAzB,MAAM,mBAAmB;IACb,MAAM,GAAG,IAAI,eAAM,CAAC,qBAAmB,CAAC,IAAI,CAAC,CAAC;IAE/D,KAAK,CAAC,SAAkB,EAAE,IAAmB;QAC3C,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAChC,MAAM,QAAQ,GAAG,GAAG,CAAC,WAAW,EAAY,CAAC;QAC7C,MAAM,OAAO,GAAG,GAAG,CAAC,UAAU,EAAW,CAAC;QAE1C,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,mBAAmB,CAAC,SAAS,CAA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AAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AllExceptionsFilter = void 0;
|
|
4
|
+
var all_exceptions_filter_1 = require("./all-exceptions.filter");
|
|
5
|
+
Object.defineProperty(exports, "AllExceptionsFilter", { enumerable: true, get: function () { return all_exceptions_filter_1.AllExceptionsFilter; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/filters/index.ts"],"names":[],"mappings":";;;AAAA,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ConfigService } from "@nestjs/config";
|
|
2
|
+
/**
|
|
3
|
+
* CryptoService
|
|
4
|
+
*
|
|
5
|
+
* Handles encryption/decryption of sensitive data (PII) using AES-256-GCM,
|
|
6
|
+
* plus deterministic hashing utilities.
|
|
7
|
+
*
|
|
8
|
+
* Security features:
|
|
9
|
+
* - AES-256-GCM authenticated encryption
|
|
10
|
+
* - Random IV for each encryption operation
|
|
11
|
+
* - Authentication tag to prevent tampering
|
|
12
|
+
* - Environment-based key management
|
|
13
|
+
*
|
|
14
|
+
* Storage format: iv:authTag:ciphertext (all hex-encoded)
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* // Register as a provider in any module
|
|
19
|
+
* @Module({ providers: [CryptoService], exports: [CryptoService] })
|
|
20
|
+
* export class CommonModule {}
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare class CryptoService {
|
|
24
|
+
private readonly configService;
|
|
25
|
+
private readonly logger;
|
|
26
|
+
private readonly algorithm;
|
|
27
|
+
private readonly encryptionKey;
|
|
28
|
+
constructor(configService: ConfigService);
|
|
29
|
+
/**
|
|
30
|
+
* Encrypt sensitive text (PII)
|
|
31
|
+
*
|
|
32
|
+
* @param plaintext - The text to encrypt
|
|
33
|
+
* @returns Encrypted string in format: iv:authTag:ciphertext (hex-encoded)
|
|
34
|
+
*/
|
|
35
|
+
encrypt(plaintext: string): string;
|
|
36
|
+
/**
|
|
37
|
+
* Decrypt sensitive text (PII)
|
|
38
|
+
*
|
|
39
|
+
* @param encrypted - Encrypted string in format: iv:authTag:ciphertext
|
|
40
|
+
* @returns Decrypted plaintext
|
|
41
|
+
*/
|
|
42
|
+
decrypt(encrypted: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* Deterministic integer hash of a string (SHA-256, first 8 hex chars → int).
|
|
45
|
+
* Useful for generating stable numeric IDs from text.
|
|
46
|
+
*/
|
|
47
|
+
hashInt(text: string): number;
|
|
48
|
+
/**
|
|
49
|
+
* Deterministic SHA-256 hex hash of a string.
|
|
50
|
+
*/
|
|
51
|
+
hashString(text: string): string;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=crypto.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.service.d.ts","sourceRoot":"","sources":["../../src/helpers/crypto.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBACa,aAAa;IAKZ,OAAO,CAAC,QAAQ,CAAC,aAAa;IAJ1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkC;IACzD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAEV,aAAa,EAAE,aAAa;IAkBzD;;;;;OAKG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAqBlC;;;;;OAKG;IACH,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IA4BlC;;;OAGG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAK7B;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;CAGjC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
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;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
var CryptoService_1;
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.CryptoService = void 0;
|
|
47
|
+
const common_1 = require("@nestjs/common");
|
|
48
|
+
const config_1 = require("@nestjs/config");
|
|
49
|
+
const crypto = __importStar(require("crypto"));
|
|
50
|
+
/**
|
|
51
|
+
* CryptoService
|
|
52
|
+
*
|
|
53
|
+
* Handles encryption/decryption of sensitive data (PII) using AES-256-GCM,
|
|
54
|
+
* plus deterministic hashing utilities.
|
|
55
|
+
*
|
|
56
|
+
* Security features:
|
|
57
|
+
* - AES-256-GCM authenticated encryption
|
|
58
|
+
* - Random IV for each encryption operation
|
|
59
|
+
* - Authentication tag to prevent tampering
|
|
60
|
+
* - Environment-based key management
|
|
61
|
+
*
|
|
62
|
+
* Storage format: iv:authTag:ciphertext (all hex-encoded)
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* // Register as a provider in any module
|
|
67
|
+
* @Module({ providers: [CryptoService], exports: [CryptoService] })
|
|
68
|
+
* export class CommonModule {}
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
let CryptoService = CryptoService_1 = class CryptoService {
|
|
72
|
+
configService;
|
|
73
|
+
logger = new common_1.Logger(CryptoService_1.name);
|
|
74
|
+
algorithm = "aes-256-gcm";
|
|
75
|
+
encryptionKey;
|
|
76
|
+
constructor(configService) {
|
|
77
|
+
this.configService = configService;
|
|
78
|
+
const key = this.configService.get("security.piiEncryptionKey");
|
|
79
|
+
if (!key) {
|
|
80
|
+
throw new Error("PII_ENCRYPTION_KEY not found in configuration");
|
|
81
|
+
}
|
|
82
|
+
this.encryptionKey = Buffer.from(key, "hex");
|
|
83
|
+
if (this.encryptionKey.length !== 32) {
|
|
84
|
+
throw new Error("PII_ENCRYPTION_KEY must be 32 bytes (64 hex characters)");
|
|
85
|
+
}
|
|
86
|
+
this.logger.log("CryptoService initialized with AES-256-GCM encryption");
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Encrypt sensitive text (PII)
|
|
90
|
+
*
|
|
91
|
+
* @param plaintext - The text to encrypt
|
|
92
|
+
* @returns Encrypted string in format: iv:authTag:ciphertext (hex-encoded)
|
|
93
|
+
*/
|
|
94
|
+
encrypt(plaintext) {
|
|
95
|
+
try {
|
|
96
|
+
const iv = crypto.randomBytes(16);
|
|
97
|
+
const cipher = crypto.createCipheriv(this.algorithm, this.encryptionKey, iv);
|
|
98
|
+
let ciphertext = cipher.update(plaintext, "utf8", "hex");
|
|
99
|
+
ciphertext += cipher.final("hex");
|
|
100
|
+
const authTag = cipher.getAuthTag();
|
|
101
|
+
return `${iv.toString("hex")}:${authTag.toString("hex")}:${ciphertext}`;
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
this.logger.error(`Encryption failed: ${error.message}`);
|
|
105
|
+
throw new Error("Failed to encrypt PII");
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Decrypt sensitive text (PII)
|
|
110
|
+
*
|
|
111
|
+
* @param encrypted - Encrypted string in format: iv:authTag:ciphertext
|
|
112
|
+
* @returns Decrypted plaintext
|
|
113
|
+
*/
|
|
114
|
+
decrypt(encrypted) {
|
|
115
|
+
try {
|
|
116
|
+
const [ivHex, authTagHex, ciphertext] = encrypted.split(":");
|
|
117
|
+
if (!ivHex || !authTagHex || !ciphertext) {
|
|
118
|
+
throw new Error("Invalid encrypted format");
|
|
119
|
+
}
|
|
120
|
+
const iv = Buffer.from(ivHex, "hex");
|
|
121
|
+
const authTag = Buffer.from(authTagHex, "hex");
|
|
122
|
+
const decipher = crypto.createDecipheriv(this.algorithm, this.encryptionKey, iv);
|
|
123
|
+
decipher.setAuthTag(authTag);
|
|
124
|
+
let plaintext = decipher.update(ciphertext, "hex", "utf8");
|
|
125
|
+
plaintext += decipher.final("utf8");
|
|
126
|
+
return plaintext;
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
this.logger.error(`Decryption failed: ${error.message}`);
|
|
130
|
+
throw new Error("Failed to decrypt PII");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Deterministic integer hash of a string (SHA-256, first 8 hex chars → int).
|
|
135
|
+
* Useful for generating stable numeric IDs from text.
|
|
136
|
+
*/
|
|
137
|
+
hashInt(text) {
|
|
138
|
+
const hash = crypto.createHash("sha256").update(text).digest("hex");
|
|
139
|
+
return parseInt(hash.substring(0, 8), 16);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Deterministic SHA-256 hex hash of a string.
|
|
143
|
+
*/
|
|
144
|
+
hashString(text) {
|
|
145
|
+
return crypto.createHash("sha256").update(text).digest("hex");
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
exports.CryptoService = CryptoService;
|
|
149
|
+
exports.CryptoService = CryptoService = CryptoService_1 = __decorate([
|
|
150
|
+
(0, common_1.Injectable)(),
|
|
151
|
+
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
152
|
+
], CryptoService);
|
|
153
|
+
//# sourceMappingURL=crypto.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto.service.js","sourceRoot":"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C;YACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACzD,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,OAAO,CAAC,IAAY;QAClB,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpE,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,IAAY;QACrB,OAAO,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;CACF,CAAA;AAnGY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;qCAMiC,sBAAa;GAL9C,aAAa,CAmGzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CryptoService = void 0;
|
|
4
|
+
var crypto_service_1 = require("./crypto.service");
|
|
5
|
+
Object.defineProperty(exports, "CryptoService", { enumerable: true, get: function () { return crypto_service_1.CryptoService; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAAxC,+GAAA,aAAa,OAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { CurrentUser, IS_PUBLIC_KEY, Public, JwtAuthGuard, BaseJwtStrategy, AuthCoreModule, } from "./auth";
|
|
2
|
+
export type { JwtPayload } from "./auth";
|
|
3
|
+
export { createAppConfig, createDatabaseConfig, createDocConfig, createJwtConfig, createLoggingConfig, createSecurityConfig, buildPinoParams, RedisConfig, StorageConfig, createBaseValidationRules, } from "./config";
|
|
4
|
+
export type { AppConfigOptions, DatabaseConfigOptions, DocConfigOptions, JwtConfigOptions, LoggingConfigOptions, SecurityConfigOptions, BaseValidationOptions, } from "./config";
|
|
5
|
+
export { CRITICAL_PII_TYPES, HIGH_RISK_PII_TYPES, CONTEXTUAL_ENTITIES, STANDARD_PII_TYPES, ALL_MASKABLE_PII_TYPES, APPROVAL_REQUIRED_PII_TYPES, ContractStatus, JobType, JobStatus, TaskStatus, TaskPriority, RiskLevel, RuleKind, RuleDirection, MAX_UPLOAD_SIZE_BYTES, ALLOWED_MIME_TYPES, EXTENSION_TO_MIME, MIME_TO_EXTENSIONS, validateExtensionMimeMatch, } from "./constants";
|
|
6
|
+
export type { PiiRiskLevel, AllowedMimeType } from "./constants";
|
|
7
|
+
export { UserTier } from "./database";
|
|
8
|
+
export { BaseEntity, DatabaseModule, RedisModule, RedisProvider, BaseUsersProfileEntity, BaseContractEntity, PiiEntity, BaseJobEntity, BaseContractTextEntity, BaseContractChunkEntity, BaseContractRedFlagEntity, BaseContractPiiReplacementEntity, BaseContractTaskEntity, BaseContractKeyDateRuleEntity, BaseContractEventEntity, BaseAuditLogEntity, BaseQnaQuestionEntity, BaseScoringCriteriaEntity, QnaQuestionTemplate, QnaResponse, } from "./database";
|
|
9
|
+
export type { DatabaseModuleOptions } from "./database";
|
|
10
|
+
export { ApiResponseDto } from "./dto";
|
|
11
|
+
export { AllExceptionsFilter } from "./filters";
|
|
12
|
+
export type { ErrorResponse } from "./filters";
|
|
13
|
+
export { SwaggerDocs } from "./swagger";
|
|
14
|
+
export { configureApp } from "./bootstrap";
|
|
15
|
+
export type { AppBootstrapOptions } from "./bootstrap";
|
|
16
|
+
export { CryptoService } from "./helpers";
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,aAAa,EACb,MAAM,EACN,YAAY,EACZ,eAAe,EACf,cAAc,GACf,MAAM,QAAQ,CAAC;AAChB,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAGzC,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,aAAa,EACb,yBAAyB,GAC1B,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,2BAA2B,EAC3B,cAAc,EACd,OAAO,EACP,SAAS,EACT,UAAU,EACV,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EACL,UAAU,EACV,cAAc,EACd,WAAW,EACX,aAAa,EAEb,sBAAsB,EACtB,kBAAkB,EAClB,SAAS,EACT,aAAa,EACb,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,gCAAgC,EAChC,sBAAsB,EACtB,6BAA6B,EAC7B,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,yBAAyB,EAEzB,mBAAmB,EACnB,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGxD,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,YAAY,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseContractEventEntity = exports.BaseContractKeyDateRuleEntity = exports.BaseContractTaskEntity = exports.BaseContractPiiReplacementEntity = exports.BaseContractRedFlagEntity = exports.BaseContractChunkEntity = exports.BaseContractTextEntity = exports.BaseJobEntity = exports.BaseContractEntity = exports.BaseUsersProfileEntity = exports.RedisProvider = exports.RedisModule = exports.DatabaseModule = exports.BaseEntity = exports.UserTier = exports.validateExtensionMimeMatch = exports.MIME_TO_EXTENSIONS = exports.EXTENSION_TO_MIME = exports.ALLOWED_MIME_TYPES = exports.MAX_UPLOAD_SIZE_BYTES = exports.RuleDirection = exports.RuleKind = exports.RiskLevel = exports.TaskPriority = exports.TaskStatus = exports.JobStatus = exports.JobType = exports.ContractStatus = exports.APPROVAL_REQUIRED_PII_TYPES = exports.ALL_MASKABLE_PII_TYPES = exports.STANDARD_PII_TYPES = exports.CONTEXTUAL_ENTITIES = exports.HIGH_RISK_PII_TYPES = exports.CRITICAL_PII_TYPES = exports.createBaseValidationRules = exports.StorageConfig = exports.RedisConfig = exports.buildPinoParams = exports.createSecurityConfig = exports.createLoggingConfig = exports.createJwtConfig = exports.createDocConfig = exports.createDatabaseConfig = exports.createAppConfig = exports.AuthCoreModule = exports.BaseJwtStrategy = exports.JwtAuthGuard = exports.Public = exports.IS_PUBLIC_KEY = exports.CurrentUser = void 0;
|
|
4
|
+
exports.CryptoService = exports.configureApp = exports.SwaggerDocs = exports.AllExceptionsFilter = exports.ApiResponseDto = exports.QnaResponse = exports.QnaQuestionTemplate = exports.BaseScoringCriteriaEntity = exports.BaseQnaQuestionEntity = exports.BaseAuditLogEntity = void 0;
|
|
5
|
+
// ── Auth ──────────────────────────────────────────────────────────────
|
|
6
|
+
var auth_1 = require("./auth");
|
|
7
|
+
Object.defineProperty(exports, "CurrentUser", { enumerable: true, get: function () { return auth_1.CurrentUser; } });
|
|
8
|
+
Object.defineProperty(exports, "IS_PUBLIC_KEY", { enumerable: true, get: function () { return auth_1.IS_PUBLIC_KEY; } });
|
|
9
|
+
Object.defineProperty(exports, "Public", { enumerable: true, get: function () { return auth_1.Public; } });
|
|
10
|
+
Object.defineProperty(exports, "JwtAuthGuard", { enumerable: true, get: function () { return auth_1.JwtAuthGuard; } });
|
|
11
|
+
Object.defineProperty(exports, "BaseJwtStrategy", { enumerable: true, get: function () { return auth_1.BaseJwtStrategy; } });
|
|
12
|
+
Object.defineProperty(exports, "AuthCoreModule", { enumerable: true, get: function () { return auth_1.AuthCoreModule; } });
|
|
13
|
+
// ── Config ────────────────────────────────────────────────────────────
|
|
14
|
+
var config_1 = require("./config");
|
|
15
|
+
Object.defineProperty(exports, "createAppConfig", { enumerable: true, get: function () { return config_1.createAppConfig; } });
|
|
16
|
+
Object.defineProperty(exports, "createDatabaseConfig", { enumerable: true, get: function () { return config_1.createDatabaseConfig; } });
|
|
17
|
+
Object.defineProperty(exports, "createDocConfig", { enumerable: true, get: function () { return config_1.createDocConfig; } });
|
|
18
|
+
Object.defineProperty(exports, "createJwtConfig", { enumerable: true, get: function () { return config_1.createJwtConfig; } });
|
|
19
|
+
Object.defineProperty(exports, "createLoggingConfig", { enumerable: true, get: function () { return config_1.createLoggingConfig; } });
|
|
20
|
+
Object.defineProperty(exports, "createSecurityConfig", { enumerable: true, get: function () { return config_1.createSecurityConfig; } });
|
|
21
|
+
Object.defineProperty(exports, "buildPinoParams", { enumerable: true, get: function () { return config_1.buildPinoParams; } });
|
|
22
|
+
Object.defineProperty(exports, "RedisConfig", { enumerable: true, get: function () { return config_1.RedisConfig; } });
|
|
23
|
+
Object.defineProperty(exports, "StorageConfig", { enumerable: true, get: function () { return config_1.StorageConfig; } });
|
|
24
|
+
Object.defineProperty(exports, "createBaseValidationRules", { enumerable: true, get: function () { return config_1.createBaseValidationRules; } });
|
|
25
|
+
// ── Constants ─────────────────────────────────────────────────────────
|
|
26
|
+
var constants_1 = require("./constants");
|
|
27
|
+
Object.defineProperty(exports, "CRITICAL_PII_TYPES", { enumerable: true, get: function () { return constants_1.CRITICAL_PII_TYPES; } });
|
|
28
|
+
Object.defineProperty(exports, "HIGH_RISK_PII_TYPES", { enumerable: true, get: function () { return constants_1.HIGH_RISK_PII_TYPES; } });
|
|
29
|
+
Object.defineProperty(exports, "CONTEXTUAL_ENTITIES", { enumerable: true, get: function () { return constants_1.CONTEXTUAL_ENTITIES; } });
|
|
30
|
+
Object.defineProperty(exports, "STANDARD_PII_TYPES", { enumerable: true, get: function () { return constants_1.STANDARD_PII_TYPES; } });
|
|
31
|
+
Object.defineProperty(exports, "ALL_MASKABLE_PII_TYPES", { enumerable: true, get: function () { return constants_1.ALL_MASKABLE_PII_TYPES; } });
|
|
32
|
+
Object.defineProperty(exports, "APPROVAL_REQUIRED_PII_TYPES", { enumerable: true, get: function () { return constants_1.APPROVAL_REQUIRED_PII_TYPES; } });
|
|
33
|
+
Object.defineProperty(exports, "ContractStatus", { enumerable: true, get: function () { return constants_1.ContractStatus; } });
|
|
34
|
+
Object.defineProperty(exports, "JobType", { enumerable: true, get: function () { return constants_1.JobType; } });
|
|
35
|
+
Object.defineProperty(exports, "JobStatus", { enumerable: true, get: function () { return constants_1.JobStatus; } });
|
|
36
|
+
Object.defineProperty(exports, "TaskStatus", { enumerable: true, get: function () { return constants_1.TaskStatus; } });
|
|
37
|
+
Object.defineProperty(exports, "TaskPriority", { enumerable: true, get: function () { return constants_1.TaskPriority; } });
|
|
38
|
+
Object.defineProperty(exports, "RiskLevel", { enumerable: true, get: function () { return constants_1.RiskLevel; } });
|
|
39
|
+
Object.defineProperty(exports, "RuleKind", { enumerable: true, get: function () { return constants_1.RuleKind; } });
|
|
40
|
+
Object.defineProperty(exports, "RuleDirection", { enumerable: true, get: function () { return constants_1.RuleDirection; } });
|
|
41
|
+
Object.defineProperty(exports, "MAX_UPLOAD_SIZE_BYTES", { enumerable: true, get: function () { return constants_1.MAX_UPLOAD_SIZE_BYTES; } });
|
|
42
|
+
Object.defineProperty(exports, "ALLOWED_MIME_TYPES", { enumerable: true, get: function () { return constants_1.ALLOWED_MIME_TYPES; } });
|
|
43
|
+
Object.defineProperty(exports, "EXTENSION_TO_MIME", { enumerable: true, get: function () { return constants_1.EXTENSION_TO_MIME; } });
|
|
44
|
+
Object.defineProperty(exports, "MIME_TO_EXTENSIONS", { enumerable: true, get: function () { return constants_1.MIME_TO_EXTENSIONS; } });
|
|
45
|
+
Object.defineProperty(exports, "validateExtensionMimeMatch", { enumerable: true, get: function () { return constants_1.validateExtensionMimeMatch; } });
|
|
46
|
+
var database_1 = require("./database");
|
|
47
|
+
Object.defineProperty(exports, "UserTier", { enumerable: true, get: function () { return database_1.UserTier; } });
|
|
48
|
+
// ── Database ──────────────────────────────────────────────────────────
|
|
49
|
+
var database_2 = require("./database");
|
|
50
|
+
Object.defineProperty(exports, "BaseEntity", { enumerable: true, get: function () { return database_2.BaseEntity; } });
|
|
51
|
+
Object.defineProperty(exports, "DatabaseModule", { enumerable: true, get: function () { return database_2.DatabaseModule; } });
|
|
52
|
+
Object.defineProperty(exports, "RedisModule", { enumerable: true, get: function () { return database_2.RedisModule; } });
|
|
53
|
+
Object.defineProperty(exports, "RedisProvider", { enumerable: true, get: function () { return database_2.RedisProvider; } });
|
|
54
|
+
// Abstract base entities
|
|
55
|
+
Object.defineProperty(exports, "BaseUsersProfileEntity", { enumerable: true, get: function () { return database_2.BaseUsersProfileEntity; } });
|
|
56
|
+
Object.defineProperty(exports, "BaseContractEntity", { enumerable: true, get: function () { return database_2.BaseContractEntity; } });
|
|
57
|
+
Object.defineProperty(exports, "BaseJobEntity", { enumerable: true, get: function () { return database_2.BaseJobEntity; } });
|
|
58
|
+
Object.defineProperty(exports, "BaseContractTextEntity", { enumerable: true, get: function () { return database_2.BaseContractTextEntity; } });
|
|
59
|
+
Object.defineProperty(exports, "BaseContractChunkEntity", { enumerable: true, get: function () { return database_2.BaseContractChunkEntity; } });
|
|
60
|
+
Object.defineProperty(exports, "BaseContractRedFlagEntity", { enumerable: true, get: function () { return database_2.BaseContractRedFlagEntity; } });
|
|
61
|
+
Object.defineProperty(exports, "BaseContractPiiReplacementEntity", { enumerable: true, get: function () { return database_2.BaseContractPiiReplacementEntity; } });
|
|
62
|
+
Object.defineProperty(exports, "BaseContractTaskEntity", { enumerable: true, get: function () { return database_2.BaseContractTaskEntity; } });
|
|
63
|
+
Object.defineProperty(exports, "BaseContractKeyDateRuleEntity", { enumerable: true, get: function () { return database_2.BaseContractKeyDateRuleEntity; } });
|
|
64
|
+
Object.defineProperty(exports, "BaseContractEventEntity", { enumerable: true, get: function () { return database_2.BaseContractEventEntity; } });
|
|
65
|
+
Object.defineProperty(exports, "BaseAuditLogEntity", { enumerable: true, get: function () { return database_2.BaseAuditLogEntity; } });
|
|
66
|
+
Object.defineProperty(exports, "BaseQnaQuestionEntity", { enumerable: true, get: function () { return database_2.BaseQnaQuestionEntity; } });
|
|
67
|
+
Object.defineProperty(exports, "BaseScoringCriteriaEntity", { enumerable: true, get: function () { return database_2.BaseScoringCriteriaEntity; } });
|
|
68
|
+
// Concrete shared entities
|
|
69
|
+
Object.defineProperty(exports, "QnaQuestionTemplate", { enumerable: true, get: function () { return database_2.QnaQuestionTemplate; } });
|
|
70
|
+
Object.defineProperty(exports, "QnaResponse", { enumerable: true, get: function () { return database_2.QnaResponse; } });
|
|
71
|
+
// ── DTO ───────────────────────────────────────────────────────────────
|
|
72
|
+
var dto_1 = require("./dto");
|
|
73
|
+
Object.defineProperty(exports, "ApiResponseDto", { enumerable: true, get: function () { return dto_1.ApiResponseDto; } });
|
|
74
|
+
// ── Filters ───────────────────────────────────────────────────────────
|
|
75
|
+
var filters_1 = require("./filters");
|
|
76
|
+
Object.defineProperty(exports, "AllExceptionsFilter", { enumerable: true, get: function () { return filters_1.AllExceptionsFilter; } });
|
|
77
|
+
// ── Swagger ───────────────────────────────────────────────────────────
|
|
78
|
+
var swagger_1 = require("./swagger");
|
|
79
|
+
Object.defineProperty(exports, "SwaggerDocs", { enumerable: true, get: function () { return swagger_1.SwaggerDocs; } });
|
|
80
|
+
// ── Bootstrap ─────────────────────────────────────────────────────────
|
|
81
|
+
var bootstrap_1 = require("./bootstrap");
|
|
82
|
+
Object.defineProperty(exports, "configureApp", { enumerable: true, get: function () { return bootstrap_1.configureApp; } });
|
|
83
|
+
// ── Helpers ───────────────────────────────────────────────────────────
|
|
84
|
+
var helpers_1 = require("./helpers");
|
|
85
|
+
Object.defineProperty(exports, "CryptoService", { enumerable: true, get: function () { return helpers_1.CryptoService; } });
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,yEAAyE;AACzE,+BAOgB;AANd,mGAAA,WAAW,OAAA;AACX,qGAAA,aAAa,OAAA;AACb,8FAAA,MAAM,OAAA;AACN,oGAAA,YAAY,OAAA;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,gCAAgC,OAAA;AAChC,kHAAA,sBAAsB,OAAA;AACtB,yHAAA,6BAA6B,OAAA;AAC7B,mHAAA,uBAAuB,OAAA;AACvB,8GAAA,kBAAkB,OAAA;AAClB,iHAAA,qBAAqB,OAAA;AACrB,qHAAA,yBAAyB,OAAA;AACzB,2BAA2B;AAC3B,+GAAA,mBAAmB,OAAA;AACnB,uGAAA,WAAW,OAAA;AAIb,yEAAyE;AACzE,6BAAuC;AAA9B,qGAAA,cAAc,OAAA;AAEvB,yEAAyE;AACzE,qCAAgD;AAAvC,8GAAA,mBAAmB,OAAA;AAG5B,yEAAyE;AACzE,qCAAwC;AAA/B,sGAAA,WAAW,OAAA;AAEpB,yEAAyE;AACzE,yCAA2C;AAAlC,yGAAA,YAAY,OAAA;AAGrB,yEAAyE;AACzE,qCAA0C;AAAjC,wGAAA,aAAa,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/swagger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SwaggerDocs = void 0;
|
|
4
|
+
var swagger_1 = require("./swagger");
|
|
5
|
+
Object.defineProperty(exports, "SwaggerDocs", { enumerable: true, get: function () { return swagger_1.SwaggerDocs; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/swagger/index.ts"],"names":[],"mappings":";;;AAAA,qCAAwC;AAA/B,sGAAA,WAAW,OAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NestApplication } from "@nestjs/core";
|
|
2
|
+
/**
|
|
3
|
+
* Swagger/OpenAPI Documentation Setup
|
|
4
|
+
*
|
|
5
|
+
* Reads configuration from the `'doc'` config namespace:
|
|
6
|
+
* - `doc.name` — API title
|
|
7
|
+
* - `doc.description` — API description
|
|
8
|
+
* - `doc.version` — API version
|
|
9
|
+
* - `doc.prefix` — URL prefix (default `/docs`)
|
|
10
|
+
* - `doc.auth.username` / `doc.auth.password` — basic-auth credentials
|
|
11
|
+
*
|
|
12
|
+
* Protected with HTTP basic authentication.
|
|
13
|
+
* Uses the DARK swagger theme.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SwaggerDocs: (app: NestApplication) => void;
|
|
16
|
+
//# sourceMappingURL=swagger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swagger.d.ts","sourceRoot":"","sources":["../../src/swagger/swagger.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAK/C;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,WAAW,GAAI,KAAK,eAAe,KAAG,IA+ClD,CAAC"}
|