dl-commons 0.0.2-testing.9 → 0.1.1
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 +4 -88
- package/dist/dl-commons.module.js +3 -2
- package/dist/dl-commons.module.js.map +1 -1
- package/dist/filters/base-exception.filter.d.ts +3 -3
- package/dist/filters/base-exception.filter.js +5 -11
- package/dist/filters/base-exception.filter.js.map +1 -1
- package/dist/guards/permission.guard.d.ts +1 -0
- package/dist/guards/permission.guard.js +3 -2
- package/dist/guards/permission.guard.js.map +1 -1
- package/dist/index.d.ts +33 -2
- package/dist/index.js +56 -2
- package/dist/index.js.map +1 -1
- package/dist/models/consts/env-vars.const.d.ts +2 -0
- package/dist/models/consts/env-vars.const.js +3 -1
- package/dist/models/consts/env-vars.const.js.map +1 -1
- package/dist/models/dtos/commons/crop-area.dto.d.ts +6 -0
- package/dist/models/dtos/commons/crop-area.dto.js +37 -0
- package/dist/models/dtos/commons/crop-area.dto.js.map +1 -0
- package/dist/models/dtos/commons/id.param.d.ts +3 -0
- package/dist/models/dtos/commons/id.param.js +22 -0
- package/dist/models/dtos/commons/id.param.js.map +1 -0
- package/dist/models/dtos/wrappers/rest-wrapper.class.js +1 -1
- package/dist/models/enums/attachment-type.enum.d.ts +4 -0
- package/dist/models/enums/attachment-type.enum.js +9 -0
- package/dist/models/enums/attachment-type.enum.js.map +1 -0
- package/dist/models/enums/location-type.enum.d.ts +5 -0
- package/dist/models/enums/location-type.enum.js +10 -0
- package/dist/models/enums/location-type.enum.js.map +1 -0
- package/dist/models/enums/user-type.enum.d.ts +7 -0
- package/dist/models/enums/user-type.enum.js +12 -0
- package/dist/models/enums/user-type.enum.js.map +1 -0
- package/dist/models/enums/virtual-address-type.enum.d.ts +15 -0
- package/dist/models/enums/virtual-address-type.enum.js +20 -0
- package/dist/models/enums/virtual-address-type.enum.js.map +1 -0
- package/dist/models/interfaces/archive.interface.d.ts +4 -0
- package/dist/models/interfaces/archive.interface.js +3 -0
- package/dist/models/interfaces/archive.interface.js.map +1 -0
- package/dist/models/interfaces/attachment.interface.d.ts +8 -0
- package/dist/models/interfaces/attachment.interface.js +3 -0
- package/dist/models/interfaces/attachment.interface.js.map +1 -0
- package/dist/models/interfaces/author.interface.d.ts +9 -0
- package/dist/models/interfaces/author.interface.js +3 -0
- package/dist/models/interfaces/author.interface.js.map +1 -0
- package/dist/models/interfaces/crop-area.interface.d.ts +6 -0
- package/dist/models/interfaces/crop-area.interface.js +3 -0
- package/dist/models/interfaces/crop-area.interface.js.map +1 -0
- package/dist/models/interfaces/date-time-range.interface.d.ts +4 -0
- package/dist/models/interfaces/date-time-range.interface.js +3 -0
- package/dist/models/interfaces/date-time-range.interface.js.map +1 -0
- package/dist/models/interfaces/dictionary.interface.d.ts +1 -1
- package/dist/models/interfaces/dl-storage.interface.d.ts +35 -0
- package/dist/models/interfaces/dl-storage.interface.js +7 -0
- package/dist/models/interfaces/dl-storage.interface.js.map +1 -0
- package/dist/models/interfaces/group-embedded.interface.d.ts +2 -0
- package/dist/models/interfaces/group-request.interface.d.ts +7 -0
- package/dist/models/interfaces/group-request.interface.js +3 -0
- package/dist/models/interfaces/group-request.interface.js.map +1 -0
- package/dist/models/interfaces/location.interface.d.ts +8 -0
- package/dist/models/interfaces/location.interface.js +3 -0
- package/dist/models/interfaces/location.interface.js.map +1 -0
- package/dist/models/interfaces/physical-address.interface.d.ts +7 -0
- package/dist/models/interfaces/physical-address.interface.js +3 -0
- package/dist/models/interfaces/physical-address.interface.js.map +1 -0
- package/dist/models/interfaces/picture.interface.d.ts +7 -0
- package/dist/models/interfaces/picture.interface.js +3 -0
- package/dist/models/interfaces/picture.interface.js.map +1 -0
- package/dist/models/interfaces/s3.interface.d.ts +1 -2
- package/dist/models/interfaces/user-meta.interface.d.ts +1 -0
- package/dist/models/interfaces/virtual-address.interface.d.ts +5 -0
- package/dist/models/interfaces/virtual-address.interface.js +3 -0
- package/dist/models/interfaces/virtual-address.interface.js.map +1 -0
- package/dist/models/schemas/base.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/archive.schema.d.ts +16 -0
- package/dist/models/schemas/embedded/archive.schema.js +29 -0
- package/dist/models/schemas/embedded/archive.schema.js.map +1 -0
- package/dist/models/schemas/embedded/attachment.schema.d.ts +20 -0
- package/dist/models/schemas/embedded/attachment.schema.js +36 -0
- package/dist/models/schemas/embedded/attachment.schema.js.map +1 -0
- package/dist/models/schemas/embedded/author.schema.d.ts +20 -0
- package/dist/models/schemas/embedded/author.schema.js +46 -0
- package/dist/models/schemas/embedded/author.schema.js.map +1 -0
- package/dist/models/schemas/embedded/contact.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/crop-area.schema.d.ts +18 -0
- package/dist/models/schemas/embedded/crop-area.schema.js +37 -0
- package/dist/models/schemas/embedded/crop-area.schema.js.map +1 -0
- package/dist/models/schemas/embedded/date-time-range.schema.d.ts +16 -0
- package/dist/models/schemas/embedded/date-time-range.schema.js +29 -0
- package/dist/models/schemas/embedded/date-time-range.schema.js.map +1 -0
- package/dist/models/schemas/embedded/dictionary-embedded.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/group-session.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/i18n.embedded.d.ts +2 -2
- package/dist/models/schemas/embedded/location.schema.d.ts +20 -0
- package/dist/models/schemas/embedded/location.schema.js +36 -0
- package/dist/models/schemas/embedded/location.schema.js.map +1 -0
- package/dist/models/schemas/embedded/person.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/physical-address.schema.d.ts +19 -0
- package/dist/models/schemas/embedded/physical-address.schema.js +38 -0
- package/dist/models/schemas/embedded/physical-address.schema.js.map +1 -0
- package/dist/models/schemas/embedded/picture.schema.d.ts +19 -0
- package/dist/models/schemas/embedded/picture.schema.js +35 -0
- package/dist/models/schemas/embedded/picture.schema.js.map +1 -0
- package/dist/models/schemas/embedded/record.embedded.d.ts +2 -2
- package/dist/models/schemas/embedded/residence.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/s3.schema.d.ts +16 -17
- package/dist/models/schemas/embedded/s3.schema.js +0 -4
- package/dist/models/schemas/embedded/s3.schema.js.map +1 -1
- package/dist/models/schemas/embedded/session-user.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/student-embedded.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/teacher.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/time.schema.d.ts +2 -2
- package/dist/models/schemas/embedded/virtual-address.schema.d.ts +17 -0
- package/dist/models/schemas/embedded/virtual-address.schema.js +30 -0
- package/dist/models/schemas/embedded/virtual-address.schema.js.map +1 -0
- package/dist/models/schemas/identifable.schema.d.ts +2 -2
- package/dist/models/schemas/parent.schema.d.ts +2 -2
- package/dist/models/schemas/session.schema.d.ts +2 -2
- package/dist/services/app-logger.service.d.ts +8 -0
- package/dist/services/app-logger.service.js +37 -0
- package/dist/services/app-logger.service.js.map +1 -0
- package/dist/services/dictionaries.service.js +14 -4
- package/dist/services/dictionaries.service.js.map +1 -1
- package/dist/services/groups.service.d.ts +12 -0
- package/dist/services/groups.service.js +65 -0
- package/dist/services/groups.service.js.map +1 -0
- package/dist/services/iam.service.d.ts +16 -0
- package/dist/services/iam.service.js +112 -0
- package/dist/services/iam.service.js.map +1 -0
- package/dist/services/permissions-scanner.service.d.ts +10 -0
- package/dist/services/permissions-scanner.service.js +50 -0
- package/dist/services/permissions-scanner.service.js.map +1 -0
- package/dist/services/sessions.service.d.ts +2 -0
- package/dist/services/sessions.service.js +20 -0
- package/dist/services/sessions.service.js.map +1 -1
- package/dist/services/storage.service.d.ts +18 -0
- package/dist/services/storage.service.js +81 -0
- package/dist/services/storage.service.js.map +1 -0
- package/dist/services/students.service.d.ts +10 -0
- package/dist/services/students.service.js +48 -0
- package/dist/services/students.service.js.map +1 -0
- package/dist/transformers/common.transformer.d.ts +1 -0
- package/dist/transformers/common.transformer.js +4 -0
- package/dist/transformers/common.transformer.js.map +1 -1
- package/dist/utils/helper.utils.d.ts +2 -1
- package/dist/utils/helper.utils.js +17 -1
- package/dist/utils/helper.utils.js.map +1 -1
- package/dist/utils/logger.class.d.ts +13 -0
- package/dist/utils/logger.class.js +80 -0
- package/dist/utils/logger.class.js.map +1 -0
- package/package.json +60 -33
- package/.eslintrc.js +0 -26
- package/.prettierrc +0 -6
- package/devops.testing.md +0 -16
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/constraints/is-map-of-strings.constraint.ts +0 -22
- package/src/decorators/is-map-of-strings.decorator.ts +0 -10
- package/src/dl-commons.module.ts +0 -36
- package/src/exceptions/custom.exception.ts +0 -20
- package/src/factories/exception.factory.ts +0 -14
- package/src/filters/base-exception.filter.ts +0 -159
- package/src/guards/access-token.guard.ts +0 -20
- package/src/guards/permission.guard.ts +0 -66
- package/src/index.ts +0 -300
- package/src/models/consts/env-vars.const.ts +0 -10
- package/src/models/dtos/commons/i18n.dto.ts +0 -15
- package/src/models/dtos/wrappers/rest-wrapper.class.ts +0 -246
- package/src/models/enums/contact-type.enum.ts +0 -4
- package/src/models/enums/group-state.enum.ts +0 -5
- package/src/models/enums/record-state.enum.ts +0 -5
- package/src/models/enums/s3.enum.ts +0 -12
- package/src/models/enums/user-verifiation-level.enum.ts +0 -5
- package/src/models/enums/week-day.enum.ts +0 -9
- package/src/models/interfaces/base.interface.ts +0 -6
- package/src/models/interfaces/contact.interface.ts +0 -9
- package/src/models/interfaces/dictionary.interface.ts +0 -10
- package/src/models/interfaces/group-embedded.interface.ts +0 -18
- package/src/models/interfaces/group-session.interface.ts +0 -15
- package/src/models/interfaces/i18n.interface.ts +0 -5
- package/src/models/interfaces/identifable.interface.ts +0 -5
- package/src/models/interfaces/parent.interface.ts +0 -8
- package/src/models/interfaces/permission.interface.ts +0 -8
- package/src/models/interfaces/person.interface.ts +0 -11
- package/src/models/interfaces/record.interface.ts +0 -9
- package/src/models/interfaces/residence.interface.ts +0 -8
- package/src/models/interfaces/role.interface.ts +0 -10
- package/src/models/interfaces/s3.interface.ts +0 -55
- package/src/models/interfaces/session-user.interface.ts +0 -12
- package/src/models/interfaces/session.interface.ts +0 -9
- package/src/models/interfaces/smtp-api-config.interface.ts +0 -5
- package/src/models/interfaces/smtp.interface.ts +0 -5
- package/src/models/interfaces/student-embedded.interface.ts +0 -12
- package/src/models/interfaces/teacher.interface.ts +0 -7
- package/src/models/interfaces/user-meta.interface.ts +0 -4
- package/src/models/interfaces/user.interface.ts +0 -16
- package/src/models/schemas/base.schema.ts +0 -20
- package/src/models/schemas/embedded/contact.schema.ts +0 -23
- package/src/models/schemas/embedded/dictionary-embedded.schema.ts +0 -24
- package/src/models/schemas/embedded/group-session.schema.ts +0 -23
- package/src/models/schemas/embedded/i18n.embedded.ts +0 -18
- package/src/models/schemas/embedded/person.schema.ts +0 -31
- package/src/models/schemas/embedded/record.embedded.ts +0 -25
- package/src/models/schemas/embedded/residence.schema.ts +0 -23
- package/src/models/schemas/embedded/s3.schema.ts +0 -133
- package/src/models/schemas/embedded/session-user.schema.ts +0 -32
- package/src/models/schemas/embedded/student-embedded.schema.ts +0 -28
- package/src/models/schemas/embedded/teacher.schema.ts +0 -17
- package/src/models/schemas/embedded/time.schema.ts +0 -18
- package/src/models/schemas/identifable.schema.ts +0 -11
- package/src/models/schemas/parent.schema.ts +0 -22
- package/src/models/schemas/session.schema.ts +0 -24
- package/src/pipes/mongo-id.pipe.ts +0 -10
- package/src/pipes/mongo-ids.pipe.ts +0 -10
- package/src/services/dictionaries.service.ts +0 -99
- package/src/services/sessions.service.ts +0 -80
- package/src/services/smtp.service.ts +0 -71
- package/src/transformers/common.transformer.ts +0 -27
- package/src/utils/helper.utils.ts +0 -30
- package/tsconfig.build.json +0 -9
- package/tsconfig.json +0 -30
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ValidationArguments, ValidatorConstraint, ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
-
|
|
3
|
-
@ValidatorConstraint({ name: 'IsMapOfStrings', async: false })
|
|
4
|
-
export class IsMapOfStringsConstraint implements ValidatorConstraintInterface {
|
|
5
|
-
validate(value: any, args: ValidationArguments): boolean {
|
|
6
|
-
if (!value || typeof value !== 'object') {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
for (let key in value) {
|
|
11
|
-
if (typeof value[key] !== 'string') {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
defaultMessage(args: ValidationArguments): string {
|
|
20
|
-
return `${args.property} must be a map object with string values.`;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Validate } from 'class-validator';
|
|
2
|
-
import { IsMapOfStringsConstraint } from '../constraints/is-map-of-strings.constraint';
|
|
3
|
-
|
|
4
|
-
export function IsMapOfStrings() {
|
|
5
|
-
return function (object: Record<string, any>, propertyName: string): void {
|
|
6
|
-
Validate(IsMapOfStringsConstraint, {
|
|
7
|
-
message: `${propertyName} must be a map object with string values.`,
|
|
8
|
-
})(object, propertyName);
|
|
9
|
-
};
|
|
10
|
-
}
|
package/src/dl-commons.module.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Module } from '@nestjs/common';
|
|
2
|
-
import { ConfigModule, ConfigService } from '@nestjs/config';
|
|
3
|
-
import { SessionsService } from './services/sessions.service';
|
|
4
|
-
import { MongooseModule } from '@nestjs/mongoose';
|
|
5
|
-
import { DL_SESSIONS__MONGO__CS } from './models/consts/env-vars.const';
|
|
6
|
-
import { Session, SessionSchema } from './models/schemas/session.schema';
|
|
7
|
-
import { HttpModule } from '@nestjs/axios';
|
|
8
|
-
import { ISession } from './models/interfaces/session.interface';
|
|
9
|
-
import { DictionariesService } from './services/dictionaries.service';
|
|
10
|
-
|
|
11
|
-
declare global {
|
|
12
|
-
namespace Express {
|
|
13
|
-
interface Request {
|
|
14
|
-
session: ISession;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@Module({
|
|
20
|
-
imports: [
|
|
21
|
-
ConfigModule,
|
|
22
|
-
HttpModule,
|
|
23
|
-
MongooseModule.forRootAsync({
|
|
24
|
-
connectionName: 'sessions-store',
|
|
25
|
-
useFactory: async (configService: ConfigService) => ({
|
|
26
|
-
uri: configService.get(DL_SESSIONS__MONGO__CS),
|
|
27
|
-
}),
|
|
28
|
-
inject: [ConfigService],
|
|
29
|
-
}),
|
|
30
|
-
MongooseModule.forFeature([{ name: Session.name, schema: SessionSchema }], 'sessions-store'),
|
|
31
|
-
],
|
|
32
|
-
controllers: [],
|
|
33
|
-
providers: [SessionsService, DictionariesService],
|
|
34
|
-
exports: [SessionsService, DictionariesService],
|
|
35
|
-
})
|
|
36
|
-
export class DLCommonsModule {}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { HttpException, HttpStatus } from '@nestjs/common';
|
|
2
|
-
import { Response } from 'express';
|
|
3
|
-
import { RESTError, RESTResponseBody } from '../models/dtos/wrappers/rest-wrapper.class';
|
|
4
|
-
|
|
5
|
-
class HandledException extends HttpException {
|
|
6
|
-
constructor(private readonly _errors: RESTError[], private readonly _statusCode?: HttpStatus) {
|
|
7
|
-
super({ errors: _errors }, _statusCode || HttpStatus.BAD_REQUEST);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
public send(response: Response) {
|
|
11
|
-
const responseBody = RESTResponseBody.fail(this._errors, this._statusCode || HttpStatus.BAD_REQUEST);
|
|
12
|
-
response.status(this._statusCode).json(responseBody);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public getErrors() {
|
|
16
|
-
return this._errors;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { HandledException };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { HttpStatus } from '@nestjs/common';
|
|
2
|
-
import { ValidationError } from 'class-validator';
|
|
3
|
-
import { HandledException } from '../exceptions/custom.exception';
|
|
4
|
-
import { RESTError } from '../models/dtos/wrappers/rest-wrapper.class';
|
|
5
|
-
|
|
6
|
-
function validationExceptionFactory(_errors: ValidationError[]): HandledException {
|
|
7
|
-
const error = new RESTError('data_validation');
|
|
8
|
-
_errors.forEach((i: any) => {
|
|
9
|
-
error.validation = i;
|
|
10
|
-
});
|
|
11
|
-
return new HandledException([error], HttpStatus.UNPROCESSABLE_ENTITY);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export { validationExceptionFactory };
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ArgumentsHost,
|
|
3
|
-
BadGatewayException,
|
|
4
|
-
BadRequestException,
|
|
5
|
-
ConflictException,
|
|
6
|
-
ExceptionFilter,
|
|
7
|
-
ForbiddenException,
|
|
8
|
-
GatewayTimeoutException,
|
|
9
|
-
GoneException,
|
|
10
|
-
HttpStatus,
|
|
11
|
-
HttpVersionNotSupportedException,
|
|
12
|
-
ImATeapotException,
|
|
13
|
-
InternalServerErrorException,
|
|
14
|
-
MethodNotAllowedException,
|
|
15
|
-
NotAcceptableException,
|
|
16
|
-
NotFoundException,
|
|
17
|
-
NotImplementedException,
|
|
18
|
-
PayloadTooLargeException,
|
|
19
|
-
PreconditionFailedException,
|
|
20
|
-
RequestTimeoutException,
|
|
21
|
-
ServiceUnavailableException,
|
|
22
|
-
UnauthorizedException,
|
|
23
|
-
UnprocessableEntityException,
|
|
24
|
-
UnsupportedMediaTypeException,
|
|
25
|
-
} from '@nestjs/common';
|
|
26
|
-
import { mongo } from 'mongoose';
|
|
27
|
-
import { ValidationError } from 'class-validator';
|
|
28
|
-
import { HandledException } from '../exceptions/custom.exception';
|
|
29
|
-
import { RESTError } from '../models/dtos/wrappers/rest-wrapper.class';
|
|
30
|
-
|
|
31
|
-
export class BaseExceptionsFilter implements ExceptionFilter {
|
|
32
|
-
private _debug: boolean = false;
|
|
33
|
-
private _log: boolean = false;
|
|
34
|
-
|
|
35
|
-
constructor(debug: boolean, log?: boolean) {
|
|
36
|
-
this._debug = debug;
|
|
37
|
-
this._log = log;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
catch(exception: any, host: ArgumentsHost) {
|
|
41
|
-
const context = host.switchToHttp();
|
|
42
|
-
const response = context.getResponse<Response>();
|
|
43
|
-
|
|
44
|
-
if (this._debug) {
|
|
45
|
-
console.log('BaseExceptionsFilter - name:', exception.constructor.name);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (this._log) {
|
|
49
|
-
console.log(exception);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
let handledException: HandledException | any = null;
|
|
53
|
-
|
|
54
|
-
const { restErrors, statusCode } = this.filterException(exception);
|
|
55
|
-
handledException = new HandledException(restErrors, statusCode);
|
|
56
|
-
|
|
57
|
-
handledException.send(response);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
private filterException(exception: any) {
|
|
61
|
-
const restErrors: RESTError[] = [];
|
|
62
|
-
let statusCode: HttpStatus = null;
|
|
63
|
-
|
|
64
|
-
try {
|
|
65
|
-
if (exception instanceof HandledException) {
|
|
66
|
-
restErrors.push(...exception.getErrors());
|
|
67
|
-
statusCode = exception.getStatus() || HttpStatus.BAD_REQUEST;
|
|
68
|
-
} else if (exception instanceof RESTError) {
|
|
69
|
-
restErrors.push(exception);
|
|
70
|
-
statusCode = exception.statusCode || HttpStatus.BAD_REQUEST;
|
|
71
|
-
} else if (exception instanceof Array) {
|
|
72
|
-
exception.forEach((item) => {
|
|
73
|
-
restErrors.push(...this.filterException(item).restErrors);
|
|
74
|
-
});
|
|
75
|
-
statusCode = HttpStatus.BAD_REQUEST;
|
|
76
|
-
} else if (exception instanceof BadRequestException) {
|
|
77
|
-
restErrors.push(new RESTError('bad_request'));
|
|
78
|
-
statusCode = HttpStatus.BAD_REQUEST;
|
|
79
|
-
} else if (exception instanceof UnauthorizedException) {
|
|
80
|
-
restErrors.push(new RESTError('unauthorized'));
|
|
81
|
-
statusCode = HttpStatus.UNAUTHORIZED;
|
|
82
|
-
} else if (exception instanceof NotFoundException) {
|
|
83
|
-
restErrors.push(new RESTError('method_not_found', exception.message));
|
|
84
|
-
statusCode = HttpStatus.METHOD_NOT_ALLOWED;
|
|
85
|
-
} else if (exception instanceof ForbiddenException) {
|
|
86
|
-
restErrors.push(new RESTError('forbidden'));
|
|
87
|
-
statusCode = HttpStatus.FORBIDDEN;
|
|
88
|
-
} else if (exception instanceof NotAcceptableException) {
|
|
89
|
-
restErrors.push(new RESTError('NotAcceptableException'));
|
|
90
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
91
|
-
} else if (exception instanceof RequestTimeoutException) {
|
|
92
|
-
restErrors.push(new RESTError('RequestTimeoutException'));
|
|
93
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
94
|
-
} else if (exception instanceof ConflictException) {
|
|
95
|
-
restErrors.push(new RESTError('ConflictException'));
|
|
96
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
97
|
-
} else if (exception instanceof GoneException) {
|
|
98
|
-
restErrors.push(new RESTError('GoneException'));
|
|
99
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
100
|
-
} else if (exception instanceof HttpVersionNotSupportedException) {
|
|
101
|
-
restErrors.push(new RESTError('HttpVersionNotSupportedException'));
|
|
102
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
103
|
-
} else if (exception instanceof PayloadTooLargeException) {
|
|
104
|
-
restErrors.push(new RESTError('PayloadTooLargeException'));
|
|
105
|
-
statusCode = HttpStatus.PAYLOAD_TOO_LARGE;
|
|
106
|
-
} else if (exception instanceof UnsupportedMediaTypeException) {
|
|
107
|
-
restErrors.push(new RESTError('UnsupportedMediaTypeException'));
|
|
108
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
109
|
-
} else if (exception instanceof UnprocessableEntityException) {
|
|
110
|
-
restErrors.push(new RESTError('UnprocessableEntityException'));
|
|
111
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
112
|
-
} else if (exception instanceof InternalServerErrorException) {
|
|
113
|
-
restErrors.push(new RESTError('InternalServerErrorException'));
|
|
114
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
115
|
-
} else if (exception instanceof NotImplementedException) {
|
|
116
|
-
restErrors.push(new RESTError('NotImplementedException'));
|
|
117
|
-
statusCode = HttpStatus.NOT_IMPLEMENTED;
|
|
118
|
-
} else if (exception instanceof ImATeapotException) {
|
|
119
|
-
restErrors.push(new RESTError('ImATeapotException'));
|
|
120
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
121
|
-
} else if (exception instanceof MethodNotAllowedException) {
|
|
122
|
-
restErrors.push(new RESTError('MethodNotAllowedException'));
|
|
123
|
-
statusCode = HttpStatus.METHOD_NOT_ALLOWED;
|
|
124
|
-
} else if (exception instanceof BadGatewayException) {
|
|
125
|
-
restErrors.push(new RESTError('BadGatewayException'));
|
|
126
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
127
|
-
} else if (exception instanceof ServiceUnavailableException) {
|
|
128
|
-
restErrors.push(new RESTError('ServiceUnavailableException'));
|
|
129
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
130
|
-
} else if (exception instanceof GatewayTimeoutException) {
|
|
131
|
-
restErrors.push(new RESTError('GatewayTimeoutException'));
|
|
132
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
133
|
-
} else if (exception instanceof PreconditionFailedException) {
|
|
134
|
-
restErrors.push(new RESTError('PreconditionFailedException'));
|
|
135
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
136
|
-
} else if (exception instanceof TypeError) {
|
|
137
|
-
restErrors.push(new RESTError('type_error', exception.message));
|
|
138
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
139
|
-
} else if (exception instanceof mongo.MongoError) {
|
|
140
|
-
restErrors.push(new RESTError('mongo_error', exception.message));
|
|
141
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
142
|
-
} else if (exception instanceof ValidationError) {
|
|
143
|
-
restErrors.push(new RESTError('validation_error', exception));
|
|
144
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
145
|
-
} else if (exception instanceof mongo.MongoServerError) {
|
|
146
|
-
restErrors.push(new RESTError('mongo_server_error', exception.message));
|
|
147
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
148
|
-
} else {
|
|
149
|
-
restErrors.push(new RESTError('unknown_error', exception.message));
|
|
150
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
151
|
-
}
|
|
152
|
-
} catch (ex) {
|
|
153
|
-
restErrors.push(new RESTError('base_exception_filter_error', ex));
|
|
154
|
-
statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
return { restErrors, statusCode };
|
|
158
|
-
}
|
|
159
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CanActivate, ExecutionContext, Injectable, UnauthorizedException } from '@nestjs/common';
|
|
2
|
-
import { ConfigService } from '@nestjs/config';
|
|
3
|
-
import { Observable, of } from 'rxjs';
|
|
4
|
-
import { APP__ACCESS_TOKEN } from '../models/consts/env-vars.const';
|
|
5
|
-
|
|
6
|
-
@Injectable()
|
|
7
|
-
export class AccessTokenGuard implements CanActivate {
|
|
8
|
-
constructor(private readonly _configService: ConfigService) {}
|
|
9
|
-
|
|
10
|
-
canActivate(context: ExecutionContext): Observable<boolean> {
|
|
11
|
-
const req = context.switchToHttp().getRequest();
|
|
12
|
-
const token = req.headers['x-access-token'];
|
|
13
|
-
|
|
14
|
-
if (!token || token !== this._configService.get<string>(APP__ACCESS_TOKEN)) {
|
|
15
|
-
throw new UnauthorizedException();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return of(true);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { Injectable, CanActivate, ExecutionContext, UnauthorizedException, ForbiddenException } from '@nestjs/common';
|
|
2
|
-
import { Reflector } from '@nestjs/core';
|
|
3
|
-
import { SessionsService } from '../services/sessions.service';
|
|
4
|
-
|
|
5
|
-
export class PermissionGuardArgs {
|
|
6
|
-
keywords?: string[] | null | undefined;
|
|
7
|
-
verificationLevels?: string[] | null | undefined;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export const AllowPermissions = Reflector.createDecorator<PermissionGuardArgs>();
|
|
11
|
-
|
|
12
|
-
@Injectable()
|
|
13
|
-
export class PermissionGuard implements CanActivate {
|
|
14
|
-
constructor(private readonly _sessionsService: SessionsService, private readonly _reflector: Reflector) {}
|
|
15
|
-
|
|
16
|
-
async canActivate(context: ExecutionContext) {
|
|
17
|
-
const args = this._reflector.get<PermissionGuardArgs>(AllowPermissions, context.getHandler());
|
|
18
|
-
|
|
19
|
-
const request = context.switchToHttp().getRequest();
|
|
20
|
-
const token: string = this._getToken(request);
|
|
21
|
-
|
|
22
|
-
if (!token) {
|
|
23
|
-
throw new UnauthorizedException();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const session = await this._sessionsService.read(token);
|
|
27
|
-
if (!session) {
|
|
28
|
-
throw new UnauthorizedException();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
let isPermissionsOk = true;
|
|
32
|
-
if (args && args.keywords) {
|
|
33
|
-
isPermissionsOk = false;
|
|
34
|
-
for (let keyword of args.keywords) {
|
|
35
|
-
isPermissionsOk = this._checkPermission(session.user.permissions, keyword);
|
|
36
|
-
if (isPermissionsOk) {
|
|
37
|
-
break;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (!isPermissionsOk) {
|
|
43
|
-
throw new ForbiddenException();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
request.session = session;
|
|
47
|
-
return true;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
private _getToken(request: any) {
|
|
51
|
-
let token = request?.headers?.authorization;
|
|
52
|
-
|
|
53
|
-
if (!token) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
token = token.replace('bearer ', '');
|
|
58
|
-
token = token.replace('Bearer ', '');
|
|
59
|
-
|
|
60
|
-
return token;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
private _checkPermission(userPermissions: string[], allowedPermission: string): boolean {
|
|
64
|
-
return userPermissions.some((keyword) => keyword === allowedPermission);
|
|
65
|
-
}
|
|
66
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
import { IsMapOfStrings } from './decorators/is-map-of-strings.decorator';
|
|
2
|
-
import { DLCommonsModule } from './dl-commons.module';
|
|
3
|
-
import { HandledException } from './exceptions/custom.exception';
|
|
4
|
-
import { validationExceptionFactory } from './factories/exception.factory';
|
|
5
|
-
import { BaseExceptionsFilter } from './filters/base-exception.filter';
|
|
6
|
-
import { AccessTokenGuard } from './guards/access-token.guard';
|
|
7
|
-
import { AllowPermissions, PermissionGuard } from './guards/permission.guard';
|
|
8
|
-
import {
|
|
9
|
-
APP__PORT,
|
|
10
|
-
APP__DEBUG,
|
|
11
|
-
APP__ACCESS_TOKEN,
|
|
12
|
-
MONGO__CS,
|
|
13
|
-
REDIS__CS,
|
|
14
|
-
KAFKA__BROKERS,
|
|
15
|
-
APP__MONGO__CS,
|
|
16
|
-
DL_SESSIONS__MONGO__CS,
|
|
17
|
-
} from './models/consts/env-vars.const';
|
|
18
|
-
import { I18nDTO } from './models/dtos/commons/i18n.dto';
|
|
19
|
-
import {
|
|
20
|
-
IMongoPage,
|
|
21
|
-
RESTError,
|
|
22
|
-
RESTPage,
|
|
23
|
-
RESTPaging,
|
|
24
|
-
RESTQueryParams,
|
|
25
|
-
RESTRequestBody,
|
|
26
|
-
RESTResponseBody,
|
|
27
|
-
RESTResult,
|
|
28
|
-
RESTSort,
|
|
29
|
-
SortDirection,
|
|
30
|
-
} from './models/dtos/wrappers/rest-wrapper.class';
|
|
31
|
-
import { ContactType } from './models/enums/contact-type.enum';
|
|
32
|
-
import { RecordState } from './models/enums/record-state.enum';
|
|
33
|
-
import { UserVerificationLevel } from './models/enums/user-verifiation-level.enum';
|
|
34
|
-
import { IBase } from './models/interfaces/base.interface';
|
|
35
|
-
import { IContact } from './models/interfaces/contact.interface';
|
|
36
|
-
import { IDictionary } from './models/interfaces/dictionary.interface';
|
|
37
|
-
import { II18n } from './models/interfaces/i18n.interface';
|
|
38
|
-
import { IIdentifable } from './models/interfaces/identifable.interface';
|
|
39
|
-
import { IPermission } from './models/interfaces/permission.interface';
|
|
40
|
-
import { IPerson } from './models/interfaces/person.interface';
|
|
41
|
-
import { IRecord } from './models/interfaces/record.interface';
|
|
42
|
-
import { IResidence } from './models/interfaces/residence.interface';
|
|
43
|
-
import { IRole } from './models/interfaces/role.interface';
|
|
44
|
-
import { ISession } from './models/interfaces/session.interface';
|
|
45
|
-
import { ISessionUser } from './models/interfaces/session-user.interface';
|
|
46
|
-
import { Base, BaseDocument, BaseSchema } from './models/schemas/base.schema';
|
|
47
|
-
import { Contact, ContactDocument, ContactSchema } from './models/schemas/embedded/contact.schema';
|
|
48
|
-
import { DictionaryEmbedded, DictionaryEmbeddedDocument, DictionaryEmbeddedSchema } from './models/schemas/embedded/dictionary-embedded.schema';
|
|
49
|
-
import { I18n, I18nSchema, I18nDocument } from './models/schemas/embedded/i18n.embedded';
|
|
50
|
-
import { Person, PersonSchema, PersonDocument } from './models/schemas/embedded/person.schema';
|
|
51
|
-
import { Record, RecordSchema, RecordDocument } from './models/schemas/embedded/record.embedded';
|
|
52
|
-
import { Residence, ResidenceDocument, ResidenceSchema } from './models/schemas/embedded/residence.schema';
|
|
53
|
-
import { Identifable, IdentifableDocument, IdentifableSchema } from './models/schemas/identifable.schema';
|
|
54
|
-
import { MongoIdPipe } from './pipes/mongo-id.pipe';
|
|
55
|
-
import { MongoIdsPipe } from './pipes/mongo-ids.pipe';
|
|
56
|
-
import { SessionsService } from './services/sessions.service';
|
|
57
|
-
import { transformers } from './transformers/common.transformer';
|
|
58
|
-
import { IUser } from './models/interfaces/user.interface';
|
|
59
|
-
import { SessionUser, SessionUserDocument, SessionUserSchema } from './models/schemas/embedded/session-user.schema';
|
|
60
|
-
import { Session, SessionDocument, SessionSchema } from './models/schemas/session.schema';
|
|
61
|
-
import { DictionariesService } from './services/dictionaries.service';
|
|
62
|
-
import { IParent } from './models/interfaces/parent.interface';
|
|
63
|
-
import { IGroupEmbedded } from './models/interfaces/group-embedded.interface';
|
|
64
|
-
import { IStudentEmbedded } from './models/interfaces/student-embedded.interface';
|
|
65
|
-
import { StudentEmbedded, StudentEmbeddedDocument, StudentEmbeddedSchema } from './models/schemas/embedded/student-embedded.schema';
|
|
66
|
-
import { ITeacher } from './models/interfaces/teacher.interface';
|
|
67
|
-
import { WeekDay } from './models/enums/week-day.enum';
|
|
68
|
-
import { IGroupSession, ITime } from './models/interfaces/group-session.interface';
|
|
69
|
-
import { GroupState } from './models/enums/group-state.enum';
|
|
70
|
-
import { GroupSessionSchema, GroupSessionDocument, GroupSession } from './models/schemas/embedded/group-session.schema';
|
|
71
|
-
import { TeacherSchema, TeacherDocument, Teacher } from './models/schemas/embedded/teacher.schema';
|
|
72
|
-
import { ISMTPAPIConfig } from './models/interfaces/smtp-api-config.interface';
|
|
73
|
-
import { SMTPService } from './services/smtp.service';
|
|
74
|
-
import { Time, TimeDocument, TimeSchema } from './models/schemas/embedded/time.schema';
|
|
75
|
-
import { FileLogInitType, S3FileState } from './models/enums/s3.enum';
|
|
76
|
-
import { IS3, ILogInitiator, IS3File, IFileState, IFileRecord, IFileMeta, IFileLog } from './models/interfaces/s3.interface';
|
|
77
|
-
import {
|
|
78
|
-
S3,
|
|
79
|
-
S3Schema,
|
|
80
|
-
S3Document,
|
|
81
|
-
LogInitiatorDocument,
|
|
82
|
-
LogInitiatorSchema,
|
|
83
|
-
LogInitiator,
|
|
84
|
-
FileLog,
|
|
85
|
-
FileLogSchema,
|
|
86
|
-
FileLogDocument,
|
|
87
|
-
FileMetaDocument,
|
|
88
|
-
FileMetaSchema,
|
|
89
|
-
FileMeta,
|
|
90
|
-
FileState,
|
|
91
|
-
FileStateSchema,
|
|
92
|
-
FileStateDocument,
|
|
93
|
-
FileRecord,
|
|
94
|
-
FileRecordSchema,
|
|
95
|
-
FileRecordDocument,
|
|
96
|
-
S3File,
|
|
97
|
-
S3FileSchema,
|
|
98
|
-
S3FileDocument,
|
|
99
|
-
FileEmbedded,
|
|
100
|
-
FileEmbeddedDocument,
|
|
101
|
-
FileEmbeddedSchema,
|
|
102
|
-
} from './models/schemas/embedded/s3.schema';
|
|
103
|
-
import { IUserMeta } from './models/interfaces/user-meta.interface';
|
|
104
|
-
|
|
105
|
-
export {
|
|
106
|
-
/**
|
|
107
|
-
* Services
|
|
108
|
-
*/
|
|
109
|
-
SessionsService,
|
|
110
|
-
DictionariesService,
|
|
111
|
-
SMTPService,
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Rest Wrapper
|
|
115
|
-
*/
|
|
116
|
-
RESTError,
|
|
117
|
-
RESTPage,
|
|
118
|
-
RESTPaging,
|
|
119
|
-
RESTQueryParams,
|
|
120
|
-
RESTRequestBody,
|
|
121
|
-
RESTResponseBody,
|
|
122
|
-
RESTResult,
|
|
123
|
-
RESTSort,
|
|
124
|
-
SortDirection,
|
|
125
|
-
IMongoPage,
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Guards
|
|
129
|
-
*/
|
|
130
|
-
AccessTokenGuard,
|
|
131
|
-
PermissionGuard,
|
|
132
|
-
AllowPermissions,
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Consts
|
|
136
|
-
*/
|
|
137
|
-
APP__PORT,
|
|
138
|
-
APP__DEBUG,
|
|
139
|
-
APP__ACCESS_TOKEN,
|
|
140
|
-
APP__MONGO__CS,
|
|
141
|
-
DL_SESSIONS__MONGO__CS,
|
|
142
|
-
MONGO__CS,
|
|
143
|
-
REDIS__CS,
|
|
144
|
-
KAFKA__BROKERS,
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Enums
|
|
148
|
-
*/
|
|
149
|
-
RecordState,
|
|
150
|
-
ContactType,
|
|
151
|
-
UserVerificationLevel,
|
|
152
|
-
WeekDay,
|
|
153
|
-
GroupState,
|
|
154
|
-
S3FileState,
|
|
155
|
-
FileLogInitType,
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* DTOs
|
|
159
|
-
*/
|
|
160
|
-
I18nDTO,
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Interfaces
|
|
164
|
-
*/
|
|
165
|
-
IIdentifable,
|
|
166
|
-
IBase,
|
|
167
|
-
IRecord,
|
|
168
|
-
II18n,
|
|
169
|
-
IDictionary,
|
|
170
|
-
IPermission,
|
|
171
|
-
IRole,
|
|
172
|
-
IContact,
|
|
173
|
-
IPerson,
|
|
174
|
-
IResidence,
|
|
175
|
-
ISessionUser,
|
|
176
|
-
ISession,
|
|
177
|
-
IUser,
|
|
178
|
-
IParent,
|
|
179
|
-
IGroupEmbedded,
|
|
180
|
-
IStudentEmbedded,
|
|
181
|
-
ITeacher,
|
|
182
|
-
IGroupSession,
|
|
183
|
-
ITime,
|
|
184
|
-
ISMTPAPIConfig,
|
|
185
|
-
IS3,
|
|
186
|
-
ILogInitiator,
|
|
187
|
-
IS3File,
|
|
188
|
-
IFileState,
|
|
189
|
-
IFileRecord,
|
|
190
|
-
IFileMeta,
|
|
191
|
-
IFileLog,
|
|
192
|
-
IUserMeta,
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Schemas & Documents
|
|
196
|
-
*/
|
|
197
|
-
Identifable,
|
|
198
|
-
IdentifableSchema,
|
|
199
|
-
IdentifableDocument,
|
|
200
|
-
Base,
|
|
201
|
-
BaseSchema,
|
|
202
|
-
BaseDocument,
|
|
203
|
-
Record,
|
|
204
|
-
RecordSchema,
|
|
205
|
-
RecordDocument,
|
|
206
|
-
I18n,
|
|
207
|
-
I18nSchema,
|
|
208
|
-
I18nDocument,
|
|
209
|
-
Residence,
|
|
210
|
-
ResidenceSchema,
|
|
211
|
-
ResidenceDocument,
|
|
212
|
-
Contact,
|
|
213
|
-
ContactSchema,
|
|
214
|
-
ContactDocument,
|
|
215
|
-
Person,
|
|
216
|
-
PersonSchema,
|
|
217
|
-
PersonDocument,
|
|
218
|
-
DictionaryEmbedded,
|
|
219
|
-
DictionaryEmbeddedSchema,
|
|
220
|
-
DictionaryEmbeddedDocument,
|
|
221
|
-
SessionUser,
|
|
222
|
-
SessionUserSchema,
|
|
223
|
-
SessionUserDocument,
|
|
224
|
-
Session,
|
|
225
|
-
SessionSchema,
|
|
226
|
-
SessionDocument,
|
|
227
|
-
GroupSessionSchema,
|
|
228
|
-
GroupSessionDocument,
|
|
229
|
-
GroupSession,
|
|
230
|
-
TeacherSchema,
|
|
231
|
-
TeacherDocument,
|
|
232
|
-
Teacher,
|
|
233
|
-
StudentEmbeddedSchema,
|
|
234
|
-
StudentEmbeddedDocument,
|
|
235
|
-
StudentEmbedded,
|
|
236
|
-
TimeSchema,
|
|
237
|
-
TimeDocument,
|
|
238
|
-
Time,
|
|
239
|
-
S3,
|
|
240
|
-
S3Schema,
|
|
241
|
-
S3Document,
|
|
242
|
-
LogInitiator,
|
|
243
|
-
LogInitiatorSchema,
|
|
244
|
-
LogInitiatorDocument,
|
|
245
|
-
FileLog,
|
|
246
|
-
FileLogSchema,
|
|
247
|
-
FileLogDocument,
|
|
248
|
-
FileMeta,
|
|
249
|
-
FileMetaSchema,
|
|
250
|
-
FileMetaDocument,
|
|
251
|
-
FileState,
|
|
252
|
-
FileStateSchema,
|
|
253
|
-
FileStateDocument,
|
|
254
|
-
FileRecord,
|
|
255
|
-
FileRecordSchema,
|
|
256
|
-
FileRecordDocument,
|
|
257
|
-
S3File,
|
|
258
|
-
S3FileSchema,
|
|
259
|
-
S3FileDocument,
|
|
260
|
-
FileEmbedded,
|
|
261
|
-
FileEmbeddedSchema,
|
|
262
|
-
FileEmbeddedDocument,
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
/**
|
|
266
|
-
* Filters
|
|
267
|
-
*/
|
|
268
|
-
BaseExceptionsFilter,
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Factories
|
|
272
|
-
*/
|
|
273
|
-
validationExceptionFactory,
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Exceptions
|
|
277
|
-
*/
|
|
278
|
-
HandledException,
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Decorators
|
|
282
|
-
*/
|
|
283
|
-
IsMapOfStrings,
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* Transformers
|
|
287
|
-
*/
|
|
288
|
-
transformers,
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Pipes
|
|
292
|
-
*/
|
|
293
|
-
MongoIdPipe,
|
|
294
|
-
MongoIdsPipe,
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Modules
|
|
298
|
-
*/
|
|
299
|
-
DLCommonsModule,
|
|
300
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const APP__PORT = 'APP__PORT';
|
|
2
|
-
export const APP__DEBUG = 'APP__DEBUG';
|
|
3
|
-
export const APP__ACCESS_TOKEN = 'APP__ACCESS_TOKEN';
|
|
4
|
-
export const APP__MONGO__CS = 'APP__MONGO__CS';
|
|
5
|
-
|
|
6
|
-
export const MONGO__CS = 'MONGO__CS';
|
|
7
|
-
export const REDIS__CS = 'REDIS__CS';
|
|
8
|
-
export const KAFKA__BROKERS = 'KAFKA__BROKERS';
|
|
9
|
-
|
|
10
|
-
export const DL_SESSIONS__MONGO__CS = 'DL_SESSIONS__MONGO__CS';
|