@forklaunch/core 0.2.6 → 0.2.7
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/lib/jest.config.d.ts.map +1 -1
- package/lib/jest.config.js +0 -2
- package/lib/src/http/guards/isForklaunchRouter.d.ts +4 -0
- package/lib/src/http/guards/isForklaunchRouter.d.ts.map +1 -0
- package/lib/src/http/guards/isForklaunchRouter.js +7 -0
- package/lib/src/http/guards/isTypedHandler.d.ts +1 -1
- package/lib/src/http/guards/isTypedHandler.d.ts.map +1 -1
- package/lib/src/http/handlers/typedAuthHandler.d.ts +5 -0
- package/lib/src/http/handlers/typedAuthHandler.d.ts.map +1 -0
- package/lib/src/http/handlers/typedAuthHandler.js +3 -0
- package/lib/src/http/handlers/typedHandler.d.ts +0 -6
- package/lib/src/http/handlers/typedHandler.d.ts.map +1 -1
- package/lib/src/http/index.d.ts +2 -0
- package/lib/src/http/index.d.ts.map +1 -1
- package/lib/src/http/index.js +2 -0
- package/lib/src/http/middleware/request/auth.middleware.d.ts +3 -18
- package/lib/src/http/middleware/request/auth.middleware.d.ts.map +1 -1
- package/lib/src/http/middleware/request/auth.middleware.js +104 -69
- package/lib/src/http/openApiV3Generator/openApiV3Generator.js +1 -1
- package/lib/src/http/router/expressLikeRouter.d.ts.map +1 -1
- package/lib/src/http/router/expressLikeRouter.js +4 -23
- package/lib/src/http/types/apiDefinition.types.d.ts +36 -13
- package/lib/src/http/types/apiDefinition.types.d.ts.map +1 -1
- package/lib/src/http/types/contractDetails.types.d.ts +53 -11
- package/lib/src/http/types/contractDetails.types.d.ts.map +1 -1
- package/lib/src/http/types/expressLikeRouter.types.d.ts +1 -1
- package/lib/src/http/types/expressLikeRouter.types.d.ts.map +1 -1
- package/lib/src/http/types/typedHandler.types.d.ts +10 -0
- package/lib/src/http/types/typedHandler.types.d.ts.map +1 -0
- package/lib/tests/expressLikeRouterInstantiation.test.js +47 -2
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -15
- package/LICENSE +0 -21
- package/lib/dist/cache/index.d.ts +0 -4
- package/lib/dist/cache/index.d.ts.map +0 -1
- package/lib/dist/cache/index.js +0 -3
- package/lib/dist/cache/interfaces/ttlCache.interface.d.ts +0 -2
- package/lib/dist/cache/interfaces/ttlCache.interface.d.ts.map +0 -1
- package/lib/dist/cache/redisTtlCache.d.ts +0 -353
- package/lib/dist/cache/redisTtlCache.d.ts.map +0 -1
- package/lib/dist/cache/redisTtlCache.js +0 -98
- package/lib/dist/cache/types/ttlCacheRecord.types.d.ts +0 -2
- package/lib/dist/cache/types/ttlCacheRecord.types.d.ts.map +0 -1
- package/lib/dist/cache/types/ttlCacheRecord.types.js +0 -1
- package/lib/dist/controllers/index.d.ts +0 -2
- package/lib/dist/controllers/index.d.ts.map +0 -1
- package/lib/dist/controllers/index.js +0 -1
- package/lib/dist/controllers/interfaces/controller.interface.d.ts +0 -2
- package/lib/dist/controllers/interfaces/controller.interface.d.ts.map +0 -1
- package/lib/dist/controllers/interfaces/controller.interface.js +0 -1
- package/lib/dist/database/index.d.ts +0 -2
- package/lib/dist/database/index.d.ts.map +0 -1
- package/lib/dist/database/index.js +0 -1
- package/lib/dist/database/mikro/models/entities/base.entity.d.ts +0 -26
- package/lib/dist/database/mikro/models/entities/base.entity.d.ts.map +0 -1
- package/lib/dist/database/mikro/models/entities/base.entity.js +0 -46
- package/lib/dist/entityMapper/index.d.ts +0 -3
- package/lib/dist/entityMapper/index.d.ts.map +0 -1
- package/lib/dist/entityMapper/index.js +0 -2
- package/lib/dist/entityMapper/interfaces/entityMapper.interface.d.ts +0 -2
- package/lib/dist/entityMapper/interfaces/entityMapper.interface.d.ts.map +0 -1
- package/lib/dist/entityMapper/interfaces/entityMapper.interface.js +0 -1
- package/lib/dist/entityMapper/models/baseEntityMapper.model.d.ts +0 -63
- package/lib/dist/entityMapper/models/baseEntityMapper.model.d.ts.map +0 -1
- package/lib/dist/entityMapper/models/baseEntityMapper.model.js +0 -75
- package/lib/dist/entityMapper/models/requestEntityMapper.model.d.ts +0 -58
- package/lib/dist/entityMapper/models/requestEntityMapper.model.d.ts.map +0 -1
- package/lib/dist/entityMapper/models/requestEntityMapper.model.js +0 -70
- package/lib/dist/entityMapper/models/responseEntityMapper.model.d.ts +0 -56
- package/lib/dist/entityMapper/models/responseEntityMapper.model.d.ts.map +0 -1
- package/lib/dist/entityMapper/models/responseEntityMapper.model.js +0 -65
- package/lib/dist/entityMapper/types/entityMapper.types.d.ts +0 -2
- package/lib/dist/entityMapper/types/entityMapper.types.d.ts.map +0 -1
- package/lib/dist/entityMapper/types/entityMapper.types.js +0 -1
- package/lib/dist/http/guards/isHttpContractDetails.d.ts +0 -5
- package/lib/dist/http/guards/isHttpContractDetails.d.ts.map +0 -1
- package/lib/dist/http/guards/isHttpContractDetails.js +0 -6
- package/lib/dist/http/guards/isResponseShape.d.ts +0 -2
- package/lib/dist/http/guards/isResponseShape.d.ts.map +0 -1
- package/lib/dist/http/guards/isResponseShape.js +0 -7
- package/lib/dist/http/index.d.ts +0 -6
- package/lib/dist/http/index.d.ts.map +0 -1
- package/lib/dist/http/index.js +0 -5
- package/lib/dist/http/interfaces/expressLikeApplication.interface.d.ts +0 -12
- package/lib/dist/http/interfaces/expressLikeApplication.interface.d.ts.map +0 -1
- package/lib/dist/http/interfaces/expressLikeApplication.interface.js +0 -14
- package/lib/dist/http/interfaces/expressLikeRouter.interface.d.ts +0 -103
- package/lib/dist/http/interfaces/expressLikeRouter.interface.d.ts.map +0 -1
- package/lib/dist/http/interfaces/expressLikeRouter.interface.js +0 -336
- package/lib/dist/http/interfaces/index.d.ts +0 -3
- package/lib/dist/http/interfaces/index.d.ts.map +0 -1
- package/lib/dist/http/interfaces/index.js +0 -2
- package/lib/dist/http/middleware/index.d.ts +0 -3
- package/lib/dist/http/middleware/index.d.ts.map +0 -1
- package/lib/dist/http/middleware/index.js +0 -2
- package/lib/dist/http/middleware/request.middleware.d.ts +0 -69
- package/lib/dist/http/middleware/request.middleware.d.ts.map +0 -1
- package/lib/dist/http/middleware/request.middleware.js +0 -210
- package/lib/dist/http/middleware/response.middleware.d.ts +0 -27
- package/lib/dist/http/middleware/response.middleware.d.ts.map +0 -1
- package/lib/dist/http/middleware/response.middleware.js +0 -52
- package/lib/dist/http/openApiV3Generator/index.d.ts +0 -2
- package/lib/dist/http/openApiV3Generator/index.d.ts.map +0 -1
- package/lib/dist/http/openApiV3Generator/index.js +0 -1
- package/lib/dist/http/openApiV3Generator/openApiV3Generator.d.ts +0 -11
- package/lib/dist/http/openApiV3Generator/openApiV3Generator.d.ts.map +0 -1
- package/lib/dist/http/openApiV3Generator/openApiV3Generator.js +0 -167
- package/lib/dist/http/types/apiDefinition.types.d.ts +0 -2
- package/lib/dist/http/types/apiDefinition.types.d.ts.map +0 -1
- package/lib/dist/http/types/apiDefinition.types.js +0 -1
- package/lib/dist/http/types/contractDetails.types.d.ts +0 -2
- package/lib/dist/http/types/contractDetails.types.d.ts.map +0 -1
- package/lib/dist/http/types/contractDetails.types.js +0 -1
- package/lib/dist/http/types/index.d.ts +0 -4
- package/lib/dist/http/types/index.d.ts.map +0 -1
- package/lib/dist/http/types/index.js +0 -3
- package/lib/dist/http/types/router.types.d.ts +0 -2
- package/lib/dist/http/types/router.types.d.ts.map +0 -1
- package/lib/dist/http/types/router.types.js +0 -1
- package/lib/dist/http/utils/enrichExpressLikeSend.d.ts +0 -28
- package/lib/dist/http/utils/enrichExpressLikeSend.d.ts.map +0 -1
- package/lib/dist/http/utils/enrichExpressLikeSend.js +0 -50
- package/lib/dist/http/utils/httpStatusCodes.d.ts +0 -986
- package/lib/dist/http/utils/httpStatusCodes.d.ts.map +0 -1
- package/lib/dist/http/utils/httpStatusCodes.js +0 -1039
- package/lib/dist/http/utils/index.d.ts +0 -3
- package/lib/dist/http/utils/index.d.ts.map +0 -1
- package/lib/dist/http/utils/index.js +0 -2
- package/lib/dist/index.d.ts +0 -7
- package/lib/dist/index.d.ts.map +0 -1
- package/lib/dist/index.js +0 -6
- package/lib/dist/jest.config.d.ts +0 -15
- package/lib/dist/jest.config.d.ts.map +0 -1
- package/lib/dist/jest.config.js +0 -21
- package/lib/dist/lib/index.d.ts +0 -7
- package/lib/dist/lib/index.d.ts.map +0 -1
- package/lib/dist/lib/index.js +0 -6
- package/lib/dist/lib/jest.config.d.ts +0 -15
- package/lib/dist/lib/jest.config.d.ts.map +0 -1
- package/lib/dist/lib/jest.config.js +0 -21
- package/lib/dist/lib/src/cache/index.d.ts +0 -4
- package/lib/dist/lib/src/cache/index.d.ts.map +0 -1
- package/lib/dist/lib/src/cache/index.js +0 -3
- package/lib/dist/lib/src/cache/interfaces/ttlCache.interface.d.ts +0 -2
- package/lib/dist/lib/src/cache/interfaces/ttlCache.interface.d.ts.map +0 -1
- package/lib/dist/lib/src/cache/interfaces/ttlCache.interface.js +0 -1
- package/lib/dist/lib/src/cache/redisTtlCache.d.ts +0 -353
- package/lib/dist/lib/src/cache/redisTtlCache.d.ts.map +0 -1
- package/lib/dist/lib/src/cache/redisTtlCache.js +0 -98
- package/lib/dist/lib/src/cache/types/ttlCacheRecord.types.d.ts +0 -2
- package/lib/dist/lib/src/cache/types/ttlCacheRecord.types.d.ts.map +0 -1
- package/lib/dist/lib/src/cache/types/ttlCacheRecord.types.js +0 -1
- package/lib/dist/lib/src/controllers/index.d.ts +0 -2
- package/lib/dist/lib/src/controllers/index.d.ts.map +0 -1
- package/lib/dist/lib/src/controllers/index.js +0 -1
- package/lib/dist/lib/src/controllers/interfaces/controller.interface.d.ts +0 -2
- package/lib/dist/lib/src/controllers/interfaces/controller.interface.d.ts.map +0 -1
- package/lib/dist/lib/src/controllers/interfaces/controller.interface.js +0 -1
- package/lib/dist/lib/src/database/index.d.ts +0 -2
- package/lib/dist/lib/src/database/index.d.ts.map +0 -1
- package/lib/dist/lib/src/database/index.js +0 -1
- package/lib/dist/lib/src/database/mikro/models/entities/base.entity.d.ts +0 -26
- package/lib/dist/lib/src/database/mikro/models/entities/base.entity.d.ts.map +0 -1
- package/lib/dist/lib/src/database/mikro/models/entities/base.entity.js +0 -46
- package/lib/dist/lib/src/domainMapper/index.d.ts +0 -3
- package/lib/dist/lib/src/domainMapper/index.d.ts.map +0 -1
- package/lib/dist/lib/src/domainMapper/index.js +0 -2
- package/lib/dist/lib/src/domainMapper/interfaces/dtoMapper.interface.d.ts +0 -2
- package/lib/dist/lib/src/domainMapper/interfaces/dtoMapper.interface.d.ts.map +0 -1
- package/lib/dist/lib/src/domainMapper/interfaces/dtoMapper.interface.js +0 -1
- package/lib/dist/lib/src/domainMapper/models/baseDtoMapper.model.d.ts +0 -63
- package/lib/dist/lib/src/domainMapper/models/baseDtoMapper.model.d.ts.map +0 -1
- package/lib/dist/lib/src/domainMapper/models/baseDtoMapper.model.js +0 -75
- package/lib/dist/lib/src/domainMapper/models/requestDtoMapper.model.d.ts +0 -58
- package/lib/dist/lib/src/domainMapper/models/requestDtoMapper.model.d.ts.map +0 -1
- package/lib/dist/lib/src/domainMapper/models/requestDtoMapper.model.js +0 -70
- package/lib/dist/lib/src/domainMapper/models/responseDtoMapper.model.d.ts +0 -56
- package/lib/dist/lib/src/domainMapper/models/responseDtoMapper.model.d.ts.map +0 -1
- package/lib/dist/lib/src/domainMapper/models/responseDtoMapper.model.js +0 -65
- package/lib/dist/lib/src/domainMapper/types/dtoMapper.types.d.ts +0 -2
- package/lib/dist/lib/src/domainMapper/types/dtoMapper.types.d.ts.map +0 -1
- package/lib/dist/lib/src/domainMapper/types/dtoMapper.types.js +0 -1
- package/lib/dist/lib/src/dtoMapper/index.d.ts +0 -3
- package/lib/dist/lib/src/dtoMapper/index.d.ts.map +0 -1
- package/lib/dist/lib/src/dtoMapper/index.js +0 -2
- package/lib/dist/lib/src/dtoMapper/interfaces/dtoMapper.interface.d.ts +0 -2
- package/lib/dist/lib/src/dtoMapper/interfaces/dtoMapper.interface.d.ts.map +0 -1
- package/lib/dist/lib/src/dtoMapper/interfaces/dtoMapper.interface.js +0 -1
- package/lib/dist/lib/src/dtoMapper/models/baseDtoMapper.model.d.ts +0 -63
- package/lib/dist/lib/src/dtoMapper/models/baseDtoMapper.model.d.ts.map +0 -1
- package/lib/dist/lib/src/dtoMapper/models/baseDtoMapper.model.js +0 -75
- package/lib/dist/lib/src/dtoMapper/models/requestDtoMapper.model.d.ts +0 -58
- package/lib/dist/lib/src/dtoMapper/models/requestDtoMapper.model.d.ts.map +0 -1
- package/lib/dist/lib/src/dtoMapper/models/requestDtoMapper.model.js +0 -70
- package/lib/dist/lib/src/dtoMapper/models/responseDtoMapper.model.d.ts +0 -56
- package/lib/dist/lib/src/dtoMapper/models/responseDtoMapper.model.d.ts.map +0 -1
- package/lib/dist/lib/src/dtoMapper/models/responseDtoMapper.model.js +0 -65
- package/lib/dist/lib/src/dtoMapper/types/dtoMapper.types.d.ts +0 -2
- package/lib/dist/lib/src/dtoMapper/types/dtoMapper.types.d.ts.map +0 -1
- package/lib/dist/lib/src/dtoMapper/types/dtoMapper.types.js +0 -1
- package/lib/dist/lib/src/http/application/expressLikeApplication.d.ts +0 -18
- package/lib/dist/lib/src/http/application/expressLikeApplication.d.ts.map +0 -1
- package/lib/dist/lib/src/http/application/expressLikeApplication.js +0 -20
- package/lib/dist/lib/src/http/guards/isHttpContractDetails.d.ts +0 -5
- package/lib/dist/lib/src/http/guards/isHttpContractDetails.d.ts.map +0 -1
- package/lib/dist/lib/src/http/guards/isHttpContractDetails.js +0 -6
- package/lib/dist/lib/src/http/guards/isResponseShape.d.ts +0 -2
- package/lib/dist/lib/src/http/guards/isResponseShape.d.ts.map +0 -1
- package/lib/dist/lib/src/http/guards/isResponseShape.js +0 -7
- package/lib/dist/lib/src/http/handler/typedHandler.d.ts +0 -21
- package/lib/dist/lib/src/http/handler/typedHandler.d.ts.map +0 -1
- package/lib/dist/lib/src/http/handler/typedHandler.js +0 -25
- package/lib/dist/lib/src/http/index.d.ts +0 -11
- package/lib/dist/lib/src/http/index.d.ts.map +0 -1
- package/lib/dist/lib/src/http/index.js +0 -10
- package/lib/dist/lib/src/http/interfaces/expressLikeApplication.interface.d.ts +0 -12
- package/lib/dist/lib/src/http/interfaces/expressLikeApplication.interface.d.ts.map +0 -1
- package/lib/dist/lib/src/http/interfaces/expressLikeApplication.interface.js +0 -14
- package/lib/dist/lib/src/http/interfaces/expressLikeRouter.interface.d.ts +0 -2
- package/lib/dist/lib/src/http/interfaces/expressLikeRouter.interface.d.ts.map +0 -1
- package/lib/dist/lib/src/http/interfaces/expressLikeRouter.interface.js +0 -1
- package/lib/dist/lib/src/http/interfaces/index.d.ts +0 -3
- package/lib/dist/lib/src/http/interfaces/index.d.ts.map +0 -1
- package/lib/dist/lib/src/http/interfaces/index.js +0 -2
- package/lib/dist/lib/src/http/middleware/index.d.ts +0 -3
- package/lib/dist/lib/src/http/middleware/index.d.ts.map +0 -1
- package/lib/dist/lib/src/http/middleware/index.js +0 -2
- package/lib/dist/lib/src/http/middleware/request/auth.middleware.d.ts +0 -27
- package/lib/dist/lib/src/http/middleware/request/auth.middleware.d.ts.map +0 -1
- package/lib/dist/lib/src/http/middleware/request/auth.middleware.js +0 -107
- package/lib/dist/lib/src/http/middleware/request/cors.middleware.d.ts +0 -9
- package/lib/dist/lib/src/http/middleware/request/cors.middleware.d.ts.map +0 -1
- package/lib/dist/lib/src/http/middleware/request/cors.middleware.js +0 -15
- package/lib/dist/lib/src/http/middleware/request/createContext.middleware.d.ts +0 -12
- package/lib/dist/lib/src/http/middleware/request/createContext.middleware.d.ts.map +0 -1
- package/lib/dist/lib/src/http/middleware/request/createContext.middleware.js +0 -26
- package/lib/dist/lib/src/http/middleware/request/enrichDetails.middleware.d.ts +0 -12
- package/lib/dist/lib/src/http/middleware/request/enrichDetails.middleware.d.ts.map +0 -1
- package/lib/dist/lib/src/http/middleware/request/enrichDetails.middleware.js +0 -19
- package/lib/dist/lib/src/http/middleware/request/parse.middleware.d.ts +0 -13
- package/lib/dist/lib/src/http/middleware/request/parse.middleware.d.ts.map +0 -1
- package/lib/dist/lib/src/http/middleware/request/parse.middleware.js +0 -43
- package/lib/dist/lib/src/http/middleware/request.middleware.d.ts +0 -69
- package/lib/dist/lib/src/http/middleware/request.middleware.d.ts.map +0 -1
- package/lib/dist/lib/src/http/middleware/request.middleware.js +0 -210
- package/lib/dist/lib/src/http/middleware/response/parse.middleware.d.ts +0 -27
- package/lib/dist/lib/src/http/middleware/response/parse.middleware.d.ts.map +0 -1
- package/lib/dist/lib/src/http/middleware/response/parse.middleware.js +0 -52
- package/lib/dist/lib/src/http/middleware/response.middleware.d.ts +0 -27
- package/lib/dist/lib/src/http/middleware/response.middleware.d.ts.map +0 -1
- package/lib/dist/lib/src/http/middleware/response.middleware.js +0 -52
- package/lib/dist/lib/src/http/openApiV3Generator/index.d.ts +0 -2
- package/lib/dist/lib/src/http/openApiV3Generator/index.d.ts.map +0 -1
- package/lib/dist/lib/src/http/openApiV3Generator/index.js +0 -1
- package/lib/dist/lib/src/http/openApiV3Generator/openApiV3Generator.d.ts +0 -11
- package/lib/dist/lib/src/http/openApiV3Generator/openApiV3Generator.d.ts.map +0 -1
- package/lib/dist/lib/src/http/openApiV3Generator/openApiV3Generator.js +0 -167
- package/lib/dist/lib/src/http/router/expressLikeRouter.d.ts +0 -89
- package/lib/dist/lib/src/http/router/expressLikeRouter.d.ts.map +0 -1
- package/lib/dist/lib/src/http/router/expressLikeRouter.js +0 -322
- package/lib/dist/lib/src/http/types/apiDefinition.types.d.ts +0 -2
- package/lib/dist/lib/src/http/types/apiDefinition.types.d.ts.map +0 -1
- package/lib/dist/lib/src/http/types/apiDefinition.types.js +0 -1
- package/lib/dist/lib/src/http/types/contractDetails.types.d.ts +0 -2
- package/lib/dist/lib/src/http/types/contractDetails.types.d.ts.map +0 -1
- package/lib/dist/lib/src/http/types/contractDetails.types.js +0 -1
- package/lib/dist/lib/src/http/types/index.d.ts +0 -4
- package/lib/dist/lib/src/http/types/index.d.ts.map +0 -1
- package/lib/dist/lib/src/http/types/index.js +0 -3
- package/lib/dist/lib/src/http/types/router.types.d.ts +0 -2
- package/lib/dist/lib/src/http/types/router.types.d.ts.map +0 -1
- package/lib/dist/lib/src/http/types/router.types.js +0 -1
- package/lib/dist/lib/src/http/utils/enrichExpressLikeSend.d.ts +0 -28
- package/lib/dist/lib/src/http/utils/enrichExpressLikeSend.d.ts.map +0 -1
- package/lib/dist/lib/src/http/utils/enrichExpressLikeSend.js +0 -50
- package/lib/dist/lib/src/http/utils/httpStatusCodes.d.ts +0 -986
- package/lib/dist/lib/src/http/utils/httpStatusCodes.d.ts.map +0 -1
- package/lib/dist/lib/src/http/utils/httpStatusCodes.js +0 -1039
- package/lib/dist/lib/src/http/utils/index.d.ts +0 -3
- package/lib/dist/lib/src/http/utils/index.d.ts.map +0 -1
- package/lib/dist/lib/src/http/utils/index.js +0 -2
- package/lib/dist/lib/src/services/index.d.ts +0 -2
- package/lib/dist/lib/src/services/index.d.ts.map +0 -1
- package/lib/dist/lib/src/services/index.js +0 -1
- package/lib/dist/lib/src/services/interfaces/baseService.d.ts +0 -2
- package/lib/dist/lib/src/services/interfaces/baseService.d.ts.map +0 -1
- package/lib/dist/lib/src/services/interfaces/baseService.js +0 -1
- package/lib/dist/lib/tests/dtoMapper.test.d.ts +0 -2
- package/lib/dist/lib/tests/dtoMapper.test.d.ts.map +0 -1
- package/lib/dist/lib/tests/dtoMapper.test.js +0 -172
- package/lib/dist/lib/tests/entityMapper.test.d.ts +0 -2
- package/lib/dist/lib/tests/entityMapper.test.d.ts.map +0 -1
- package/lib/dist/lib/tests/entityMapper.test.js +0 -172
- package/lib/dist/lib/tests/expressLikeRouter.test.d.ts +0 -2
- package/lib/dist/lib/tests/expressLikeRouter.test.d.ts.map +0 -1
- package/lib/dist/lib/tests/expressLikeRouter.test.js +0 -3
- package/lib/dist/lib/tests/http.middleware.test.d.ts +0 -2
- package/lib/dist/lib/tests/http.middleware.test.d.ts.map +0 -1
- package/lib/dist/lib/tests/http.middleware.test.js +0 -95
- package/lib/dist/lib/tests/openApiV3Generator.test.d.ts +0 -2
- package/lib/dist/lib/tests/openApiV3Generator.test.d.ts.map +0 -1
- package/lib/dist/lib/tests/openApiV3Generator.test.js +0 -66
- package/lib/dist/lib/tests/redisTtlCache.test.d.ts +0 -2
- package/lib/dist/lib/tests/redisTtlCache.test.d.ts.map +0 -1
- package/lib/dist/lib/tests/redisTtlCache.test.js +0 -49
- package/lib/dist/lib/tests/typedHandler.test.d.ts +0 -2
- package/lib/dist/lib/tests/typedHandler.test.d.ts.map +0 -1
- package/lib/dist/lib/tests/typedHandler.test.js +0 -3
- package/lib/dist/lib/vitest.config.d.ts +0 -3
- package/lib/dist/lib/vitest.config.d.ts.map +0 -1
- package/lib/dist/lib/vitest.config.js +0 -7
- package/lib/dist/services/index.d.ts +0 -2
- package/lib/dist/services/index.d.ts.map +0 -1
- package/lib/dist/services/index.js +0 -1
- package/lib/dist/services/interfaces/baseService.d.ts +0 -2
- package/lib/dist/services/interfaces/baseService.d.ts.map +0 -1
- package/lib/dist/services/interfaces/baseService.js +0 -1
- package/lib/dist/tests/entityMapper.test.d.ts +0 -2
- package/lib/dist/tests/entityMapper.test.d.ts.map +0 -1
- package/lib/dist/tests/entityMapper.test.js +0 -171
- package/lib/dist/tests/http.middleware.test.d.ts +0 -2
- package/lib/dist/tests/http.middleware.test.d.ts.map +0 -1
- package/lib/dist/tests/http.middleware.test.js +0 -93
- package/lib/dist/tests/openApiV3Generator.test.d.ts +0 -2
- package/lib/dist/tests/openApiV3Generator.test.d.ts.map +0 -1
- package/lib/dist/tests/openApiV3Generator.test.js +0 -66
- package/lib/dist/tests/redisTtlCache.test.d.ts +0 -2
- package/lib/dist/tests/redisTtlCache.test.d.ts.map +0 -1
- package/lib/dist/tests/redisTtlCache.test.js +0 -49
- package/lib/index.d.ts +0 -7
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js +0 -7
- package/lib/src/domainMapper/index.d.ts +0 -3
- package/lib/src/domainMapper/index.d.ts.map +0 -1
- package/lib/src/domainMapper/index.js +0 -2
- package/lib/src/domainMapper/interfaces/dtoMapper.interface.d.ts +0 -18
- package/lib/src/domainMapper/interfaces/dtoMapper.interface.d.ts.map +0 -1
- package/lib/src/domainMapper/interfaces/dtoMapper.interface.js +0 -1
- package/lib/src/domainMapper/models/baseDtoMapper.model.d.ts +0 -72
- package/lib/src/domainMapper/models/baseDtoMapper.model.d.ts.map +0 -1
- package/lib/src/domainMapper/models/baseDtoMapper.model.js +0 -75
- package/lib/src/domainMapper/models/requestDtoMapper.model.d.ts +0 -68
- package/lib/src/domainMapper/models/requestDtoMapper.model.d.ts.map +0 -1
- package/lib/src/domainMapper/models/requestDtoMapper.model.js +0 -70
- package/lib/src/domainMapper/models/responseDtoMapper.model.d.ts +0 -67
- package/lib/src/domainMapper/models/responseDtoMapper.model.d.ts.map +0 -1
- package/lib/src/domainMapper/models/responseDtoMapper.model.js +0 -65
- package/lib/src/domainMapper/types/dtoMapper.types.d.ts +0 -9
- package/lib/src/domainMapper/types/dtoMapper.types.d.ts.map +0 -1
- package/lib/src/domainMapper/types/dtoMapper.types.js +0 -1
- package/lib/src/http/handler/typedHandler.d.ts +0 -24
- package/lib/src/http/handler/typedHandler.d.ts.map +0 -1
- package/lib/src/http/handler/typedHandler.js +0 -25
- package/lib/src/http/interfaces/expressLikeApplication.interface.d.ts +0 -16
- package/lib/src/http/interfaces/expressLikeApplication.interface.d.ts.map +0 -1
- package/lib/src/http/interfaces/expressLikeApplication.interface.js +0 -14
- package/lib/src/http/interfaces/index.d.ts +0 -3
- package/lib/src/http/interfaces/index.d.ts.map +0 -1
- package/lib/src/http/interfaces/index.js +0 -2
- package/lib/src/http/middleware/index.d.ts +0 -3
- package/lib/src/http/middleware/index.d.ts.map +0 -1
- package/lib/src/http/middleware/index.js +0 -2
- package/lib/src/http/middleware/request.middleware.d.ts +0 -73
- package/lib/src/http/middleware/request.middleware.d.ts.map +0 -1
- package/lib/src/http/middleware/request.middleware.js +0 -210
- package/lib/src/http/middleware/response.middleware.d.ts +0 -31
- package/lib/src/http/middleware/response.middleware.d.ts.map +0 -1
- package/lib/src/http/middleware/response.middleware.js +0 -52
- package/lib/src/http/openApiV3Generator/index.d.ts +0 -2
- package/lib/src/http/openApiV3Generator/index.d.ts.map +0 -1
- package/lib/src/http/openApiV3Generator/index.js +0 -1
- package/lib/src/http/types/index.d.ts +0 -4
- package/lib/src/http/types/index.d.ts.map +0 -1
- package/lib/src/http/types/index.js +0 -3
- package/lib/src/http/utils/index.d.ts +0 -3
- package/lib/src/http/utils/index.d.ts.map +0 -1
- package/lib/src/http/utils/index.js +0 -2
- package/lib/tests/entityMapper.test.d.ts +0 -2
- package/lib/tests/entityMapper.test.d.ts.map +0 -1
- package/lib/tests/entityMapper.test.js +0 -168
- package/lib/tests/expressLikeRouter.test.d.ts +0 -2
- package/lib/tests/expressLikeRouter.test.d.ts.map +0 -1
- package/lib/tests/expressLikeRouter.test.js +0 -3
- /package/lib/{dist/cache/interfaces/ttlCache.interface.js → src/http/types/typedHandler.types.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../dist/controllers/index.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './interfaces/controller.interface';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.interface.d.ts","sourceRoot":"","sources":["../../../../dist/controllers/interfaces/controller.interface.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../dist/database/index.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mikro/models/entities/base.entity';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Abstract class representing a base entity.
|
|
3
|
-
*/
|
|
4
|
-
export class BaseEntity {
|
|
5
|
-
/**
|
|
6
|
-
* The unique identifier for the entity.
|
|
7
|
-
*
|
|
8
|
-
* @type {string}
|
|
9
|
-
* @readonly
|
|
10
|
-
*/
|
|
11
|
-
readonly id: string;
|
|
12
|
-
/**
|
|
13
|
-
* The date when the entity was created.
|
|
14
|
-
*
|
|
15
|
-
* @type {Date}
|
|
16
|
-
*/
|
|
17
|
-
createdAt: Date;
|
|
18
|
-
/**
|
|
19
|
-
* The date when the entity was last updated.
|
|
20
|
-
*
|
|
21
|
-
* @type {Date}
|
|
22
|
-
* @readonly
|
|
23
|
-
*/
|
|
24
|
-
readonly updatedAt: Date;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=base.entity.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base.entity.d.ts","sourceRoot":"","sources":["../../../../../../dist/database/mikro/models/entities/base.entity.js"],"names":[],"mappings":"AAQA;;GAEG;AACH;IACI;;;;;OAKG;IACH,aAHU,MAAM,CAGN;IACV;;;;OAIG;IACH,WAFU,IAAI,CAES;IACvB;;;;;OAKG;IACH,oBAHU,IAAI,CAGS;CAC1B"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
4
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else
|
|
6
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
7
|
-
if (d = decorators[i])
|
|
8
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
9
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
10
|
-
};
|
|
11
|
-
import { v4 } from 'uuid';
|
|
12
|
-
import { PrimaryKey, Property } from '@mikro-orm/core';
|
|
13
|
-
/**
|
|
14
|
-
* Abstract class representing a base entity.
|
|
15
|
-
*/
|
|
16
|
-
export class BaseEntity {
|
|
17
|
-
/**
|
|
18
|
-
* The unique identifier for the entity.
|
|
19
|
-
*
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @readonly
|
|
22
|
-
*/
|
|
23
|
-
id = v4();
|
|
24
|
-
/**
|
|
25
|
-
* The date when the entity was created.
|
|
26
|
-
*
|
|
27
|
-
* @type {Date}
|
|
28
|
-
*/
|
|
29
|
-
createdAt = new Date();
|
|
30
|
-
/**
|
|
31
|
-
* The date when the entity was last updated.
|
|
32
|
-
*
|
|
33
|
-
* @type {Date}
|
|
34
|
-
* @readonly
|
|
35
|
-
*/
|
|
36
|
-
updatedAt = new Date();
|
|
37
|
-
}
|
|
38
|
-
__decorate([
|
|
39
|
-
PrimaryKey({ type: 'uuid' })
|
|
40
|
-
], BaseEntity.prototype, "id", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
Property()
|
|
43
|
-
], BaseEntity.prototype, "createdAt", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
Property({ onUpdate: () => new Date() })
|
|
46
|
-
], BaseEntity.prototype, "updatedAt", void 0);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../dist/entityMapper/index.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entityMapper.interface.d.ts","sourceRoot":"","sources":["../../../../dist/entityMapper/interfaces/entityMapper.interface.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constructs an instance of a T.
|
|
3
|
-
*
|
|
4
|
-
* @template T - A type that extends BaseEntityMapper.
|
|
5
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
6
|
-
* @param {EntityMapperConstructor<T, SV>} self - The constructor of the T.
|
|
7
|
-
* @param {SV} [schemaValidator] - The optional schema validator.
|
|
8
|
-
* @returns {T} - An instance of the T.
|
|
9
|
-
*/
|
|
10
|
-
export function construct<T, SV>(self: EntityMapperConstructor<T, SV>, schemaValidator?: SV | undefined): T;
|
|
11
|
-
/**
|
|
12
|
-
* Abstract class representing a base entity mapper.
|
|
13
|
-
*
|
|
14
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
15
|
-
*/
|
|
16
|
-
export class BaseEntityMapper<SV> {
|
|
17
|
-
/**
|
|
18
|
-
* Gets the schema of a T.
|
|
19
|
-
*
|
|
20
|
-
* @template T - A type that extends BaseEntityMapper.
|
|
21
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
22
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
23
|
-
* @returns {T['schema']} - The schema of the T.
|
|
24
|
-
*/
|
|
25
|
-
static schema<T, SV_1>(): T["schema"];
|
|
26
|
-
/**
|
|
27
|
-
* Creates an instance of BaseEntityMapper.
|
|
28
|
-
*
|
|
29
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
30
|
-
*/
|
|
31
|
-
constructor(schemaValidator: SV);
|
|
32
|
-
/**
|
|
33
|
-
* The schema validator exact type.
|
|
34
|
-
* @type {SV}
|
|
35
|
-
* @protected
|
|
36
|
-
*/
|
|
37
|
-
protected _SV: SV;
|
|
38
|
-
/**
|
|
39
|
-
* The schema validator as a general type.
|
|
40
|
-
* @type {SchemaValidator}
|
|
41
|
-
* @protected
|
|
42
|
-
*/
|
|
43
|
-
protected schemaValidator: SchemaValidator;
|
|
44
|
-
/**
|
|
45
|
-
* The Data Transfer Object (DTO).
|
|
46
|
-
* @type {Schema<this['schema'], SV>}
|
|
47
|
-
*/
|
|
48
|
-
_dto: Schema<this["schema"], SV>;
|
|
49
|
-
/**
|
|
50
|
-
* Validates and sets the Data Transfer Object (DTO).
|
|
51
|
-
*
|
|
52
|
-
* @param {this['_dto']} dto - The Data Transfer Object (DTO).
|
|
53
|
-
* @throws {Error} - Throws an error if the DTO is invalid.
|
|
54
|
-
*/
|
|
55
|
-
set dto(_dto: this["_dto"]);
|
|
56
|
-
/**
|
|
57
|
-
* Validates and gets the Data Transfer Object (DTO).
|
|
58
|
-
*
|
|
59
|
-
* @returns {this['_dto']} - The Data Transfer Object (DTO).
|
|
60
|
-
*/
|
|
61
|
-
get dto(): this["_dto"];
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=baseEntityMapper.model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"baseEntityMapper.model.d.ts","sourceRoot":"","sources":["../../../../dist/entityMapper/models/baseEntityMapper.model.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,0BANa,CAAC,EACD,EAAE,QACJ,uBAAuB,CAAC,CAAC,EAAE,EAAE,CAAC,qCAE5B,CAAC,CAIb;AACD;;;;GAIG;AACH,8BAFa,EAAE;IAgDX;;;;;;;OAOG;IACH,cALa,CAAC,WAGD,CAAC,CAAC,QAAQ,CAAC,CAIvB;IAtCD;;;;OAIG;IACH,6BAFW,EAAE,EAIZ;IAxBD;;;;OAIG;IACH,eAHU,EAAE,CAGR;IACJ;;;;OAIG;IACH,2BAHU,eAAe,CAGT;IAChB;;;OAGG;IACH,MAFU,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAE1B;IASV;;;;;OAKG;IACH,4BAKC;IACD;;;;OAIG;IACH,wBAEC;CAYJ"}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constructs an instance of a T.
|
|
3
|
-
*
|
|
4
|
-
* @template T - A type that extends BaseEntityMapper.
|
|
5
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
6
|
-
* @param {EntityMapperConstructor<T, SV>} self - The constructor of the T.
|
|
7
|
-
* @param {SV} [schemaValidator] - The optional schema validator.
|
|
8
|
-
* @returns {T} - An instance of the T.
|
|
9
|
-
*/
|
|
10
|
-
export function construct(self, schemaValidator) {
|
|
11
|
-
return new self(schemaValidator || {});
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Abstract class representing a base entity mapper.
|
|
15
|
-
*
|
|
16
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
17
|
-
*/
|
|
18
|
-
export class BaseEntityMapper {
|
|
19
|
-
/**
|
|
20
|
-
* The schema validator exact type.
|
|
21
|
-
* @type {SV}
|
|
22
|
-
* @protected
|
|
23
|
-
*/
|
|
24
|
-
_SV;
|
|
25
|
-
/**
|
|
26
|
-
* The schema validator as a general type.
|
|
27
|
-
* @type {SchemaValidator}
|
|
28
|
-
* @protected
|
|
29
|
-
*/
|
|
30
|
-
schemaValidator;
|
|
31
|
-
/**
|
|
32
|
-
* The Data Transfer Object (DTO).
|
|
33
|
-
* @type {Schema<this['schema'], SV>}
|
|
34
|
-
*/
|
|
35
|
-
_dto = {};
|
|
36
|
-
/**
|
|
37
|
-
* Creates an instance of BaseEntityMapper.
|
|
38
|
-
*
|
|
39
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
40
|
-
*/
|
|
41
|
-
constructor(schemaValidator) {
|
|
42
|
-
this.schemaValidator = schemaValidator;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Validates and sets the Data Transfer Object (DTO).
|
|
46
|
-
*
|
|
47
|
-
* @param {this['_dto']} dto - The Data Transfer Object (DTO).
|
|
48
|
-
* @throws {Error} - Throws an error if the DTO is invalid.
|
|
49
|
-
*/
|
|
50
|
-
set dto(_dto) {
|
|
51
|
-
if (!this.schemaValidator.validate(this.schemaValidator.schemify(this.schema), _dto)) {
|
|
52
|
-
throw new Error('Invalid DTO');
|
|
53
|
-
}
|
|
54
|
-
this._dto = _dto;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Validates and gets the Data Transfer Object (DTO).
|
|
58
|
-
*
|
|
59
|
-
* @returns {this['_dto']} - The Data Transfer Object (DTO).
|
|
60
|
-
*/
|
|
61
|
-
get dto() {
|
|
62
|
-
return this._dto;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Gets the schema of a T.
|
|
66
|
-
*
|
|
67
|
-
* @template T - A type that extends BaseEntityMapper.
|
|
68
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
69
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
70
|
-
* @returns {T['schema']} - The schema of the T.
|
|
71
|
-
*/
|
|
72
|
-
static schema() {
|
|
73
|
-
return construct(this).schema;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Abstract class representing a request entity mapper.
|
|
3
|
-
*
|
|
4
|
-
* @template Entity - A type that extends BaseEntity.
|
|
5
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
6
|
-
* @extends {BaseEntityMapper<SV>}
|
|
7
|
-
*/
|
|
8
|
-
export class RequestEntityMapper<Entity, SV> extends BaseEntityMapper<SV> {
|
|
9
|
-
/**
|
|
10
|
-
* Creates an instance of a RequestEntityMapper from a JSON object.
|
|
11
|
-
*
|
|
12
|
-
* @template T - A type that extends RequestEntityMapper.
|
|
13
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
14
|
-
* @template JsonType - The type of the JSON object.
|
|
15
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
16
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
17
|
-
* @param {JsonType} json - The JSON object.
|
|
18
|
-
* @returns {T} - An instance of the T.
|
|
19
|
-
*/
|
|
20
|
-
static fromJson<T, SV_1, JsonType>(schemaValidator: SV_1, json: JsonType): T;
|
|
21
|
-
/**
|
|
22
|
-
* Deserializes a JSON object to an entity.
|
|
23
|
-
*
|
|
24
|
-
* @template T - A type that extends RequestEntityMapper.
|
|
25
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
26
|
-
* @template JsonType - The type of the JSON object.
|
|
27
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
28
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
29
|
-
* @param {JsonType} json - The JSON object.
|
|
30
|
-
* @param {...unknown[]} additionalArgs - Additional arguments.
|
|
31
|
-
* @returns {T['_Entity']} - The entity.
|
|
32
|
-
*/
|
|
33
|
-
static deserializeJsonToEntity<T, SV_1, JsonType>(schemaValidator: SV_1, json: JsonType, ...additionalArgs: unknown[][]): T["_Entity"];
|
|
34
|
-
constructor(schemaValidator: SV);
|
|
35
|
-
/**
|
|
36
|
-
* The entity type.
|
|
37
|
-
* @type {Entity}
|
|
38
|
-
* @protected
|
|
39
|
-
*/
|
|
40
|
-
protected _Entity: Entity;
|
|
41
|
-
/**
|
|
42
|
-
* Populates the DTO with data from a JSON object.
|
|
43
|
-
*
|
|
44
|
-
* @param {this['_dto']} json - The JSON object.
|
|
45
|
-
* @returns {this} - The instance of the RequestEntityMapper.
|
|
46
|
-
*/
|
|
47
|
-
fromJson(json: this["_dto"]): this;
|
|
48
|
-
/**
|
|
49
|
-
* Deserializes a JSON object to an entity.
|
|
50
|
-
*
|
|
51
|
-
* @param {this['_dto']} json - The JSON object.
|
|
52
|
-
* @param {...unknown[]} additionalArgs - Additional arguments.
|
|
53
|
-
* @returns {Entity} - The entity.
|
|
54
|
-
*/
|
|
55
|
-
deserializeJsonToEntity(json: this["_dto"], ...additionalArgs: unknown[][]): Entity;
|
|
56
|
-
}
|
|
57
|
-
import { BaseEntityMapper } from './baseEntityMapper.model';
|
|
58
|
-
//# sourceMappingURL=requestEntityMapper.model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"requestEntityMapper.model.d.ts","sourceRoot":"","sources":["../../../../dist/entityMapper/models/requestEntityMapper.model.js"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH,iCAJa,MAAM,EACN,EAAE;IAiCX;;;;;;;;;;OAUG;IACH,gBARa,CAAC,QAED,QAAQ,mBAEV,IAAE,QACF,QAAQ,GACN,CAAC,CAIb;IACD;;;;;;;;;;;OAWG;IACH,+BATa,CAAC,QAED,QAAQ,mBAEV,IAAE,QACF,QAAQ,qBACL,OAAO,EAAE,EAAA,GACV,CAAC,CAAC,SAAS,CAAC,CAMxB;;IA3DD;;;;OAIG;IACH,mBAHU,MAAM,CAGR;IACR;;;;;OAKG;IACH,eAHW,IAAI,CAAC,MAAM,CAAC,GACV,IAAI,CAQhB;IACD;;;;;;OAMG;IACH,8BAJW,IAAI,CAAC,MAAM,CAAC,qBACT,OAAO,EAAE,EAAA,GACV,MAAM,CAIlB;CAgCJ;iCArE2C,0BAA0B"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { BaseEntityMapper, construct } from './baseEntityMapper.model';
|
|
2
|
-
/**
|
|
3
|
-
* Abstract class representing a request entity mapper.
|
|
4
|
-
*
|
|
5
|
-
* @template Entity - A type that extends BaseEntity.
|
|
6
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
7
|
-
* @extends {BaseEntityMapper<SV>}
|
|
8
|
-
*/
|
|
9
|
-
export class RequestEntityMapper extends BaseEntityMapper {
|
|
10
|
-
/**
|
|
11
|
-
* The entity type.
|
|
12
|
-
* @type {Entity}
|
|
13
|
-
* @protected
|
|
14
|
-
*/
|
|
15
|
-
_Entity;
|
|
16
|
-
/**
|
|
17
|
-
* Populates the DTO with data from a JSON object.
|
|
18
|
-
*
|
|
19
|
-
* @param {this['_dto']} json - The JSON object.
|
|
20
|
-
* @returns {this} - The instance of the RequestEntityMapper.
|
|
21
|
-
*/
|
|
22
|
-
fromJson(json) {
|
|
23
|
-
if (!this.schemaValidator.validate(this.schemaValidator.schemify(this.schema), json)) {
|
|
24
|
-
throw new Error('Invalid DTO');
|
|
25
|
-
}
|
|
26
|
-
this.dto = json;
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Deserializes a JSON object to an entity.
|
|
31
|
-
*
|
|
32
|
-
* @param {this['_dto']} json - The JSON object.
|
|
33
|
-
* @param {...unknown[]} additionalArgs - Additional arguments.
|
|
34
|
-
* @returns {Entity} - The entity.
|
|
35
|
-
*/
|
|
36
|
-
deserializeJsonToEntity(json, ...additionalArgs) {
|
|
37
|
-
return this.fromJson(json).toEntity(...additionalArgs);
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Creates an instance of a RequestEntityMapper from a JSON object.
|
|
41
|
-
*
|
|
42
|
-
* @template T - A type that extends RequestEntityMapper.
|
|
43
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
44
|
-
* @template JsonType - The type of the JSON object.
|
|
45
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
46
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
47
|
-
* @param {JsonType} json - The JSON object.
|
|
48
|
-
* @returns {T} - An instance of the T.
|
|
49
|
-
*/
|
|
50
|
-
static fromJson(schemaValidator, json) {
|
|
51
|
-
return construct(this, schemaValidator).fromJson(json);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Deserializes a JSON object to an entity.
|
|
55
|
-
*
|
|
56
|
-
* @template T - A type that extends RequestEntityMapper.
|
|
57
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
58
|
-
* @template JsonType - The type of the JSON object.
|
|
59
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
60
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
61
|
-
* @param {JsonType} json - The JSON object.
|
|
62
|
-
* @param {...unknown[]} additionalArgs - Additional arguments.
|
|
63
|
-
* @returns {T['_Entity']} - The entity.
|
|
64
|
-
*/
|
|
65
|
-
static deserializeJsonToEntity(schemaValidator, json, ...additionalArgs) {
|
|
66
|
-
return construct(this, schemaValidator)
|
|
67
|
-
.fromJson(json)
|
|
68
|
-
.toEntity(...additionalArgs);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Abstract class representing a response entity mapper.
|
|
3
|
-
*
|
|
4
|
-
* @template Entity - A type that extends BaseEntity.
|
|
5
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
6
|
-
* @extends {BaseEntityMapper<SV>}
|
|
7
|
-
*/
|
|
8
|
-
export class ResponseEntityMapper<Entity, SV> extends BaseEntityMapper<SV> {
|
|
9
|
-
/**
|
|
10
|
-
* Populates entity mapper with DTO from an entity.
|
|
11
|
-
*
|
|
12
|
-
* @template T - A type that extends ResponseEntityMapper.
|
|
13
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
14
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
15
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
16
|
-
* @param {T['_Entity']} entity - The entity to convert.
|
|
17
|
-
* @returns {T} - An instance of the T.
|
|
18
|
-
*/
|
|
19
|
-
static fromEntity<T, SV_1>(schemaValidator: SV_1, entity: T["_Entity"]): T;
|
|
20
|
-
/**
|
|
21
|
-
* Serializes an entity to a JSON object.
|
|
22
|
-
*
|
|
23
|
-
* @template T - A type that extends ResponseEntityMapper.
|
|
24
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
25
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
26
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
27
|
-
* @param {T['_Entity']} entity - The entity to serialize.
|
|
28
|
-
* @returns {T['_dto']} - The JSON object.
|
|
29
|
-
* @throws {Error} - Throws an error if the DTO is invalid.
|
|
30
|
-
*/
|
|
31
|
-
static serializeEntityToJson<T, SV_1>(schemaValidator: SV_1, entity: T["_Entity"]): T["_dto"];
|
|
32
|
-
constructor(schemaValidator: SV);
|
|
33
|
-
/**
|
|
34
|
-
* The entity type.
|
|
35
|
-
* @type {Entity}
|
|
36
|
-
* @protected
|
|
37
|
-
*/
|
|
38
|
-
protected _Entity: Entity;
|
|
39
|
-
/**
|
|
40
|
-
* Converts the underlying DTO to a JSON object.
|
|
41
|
-
*
|
|
42
|
-
* @returns {this['_dto']} - The JSON object.
|
|
43
|
-
* @throws {Error} - Throws an error if the DTO is invalid.
|
|
44
|
-
*/
|
|
45
|
-
toJson(): this["_dto"];
|
|
46
|
-
/**
|
|
47
|
-
* Serializes an entity to a JSON object.
|
|
48
|
-
*
|
|
49
|
-
* @param {Entity} entity - The entity to serialize.
|
|
50
|
-
* @returns {this['_dto']} - The JSON object.
|
|
51
|
-
* @throws {Error} - Throws an error if the DTO is invalid.
|
|
52
|
-
*/
|
|
53
|
-
serializeEntityToJson(entity: Entity): this["_dto"];
|
|
54
|
-
}
|
|
55
|
-
import { BaseEntityMapper } from './baseEntityMapper.model';
|
|
56
|
-
//# sourceMappingURL=responseEntityMapper.model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responseEntityMapper.model.d.ts","sourceRoot":"","sources":["../../../../dist/entityMapper/models/responseEntityMapper.model.js"],"names":[],"mappings":"AACA;;;;;;GAMG;AACH,kCAJa,MAAM,EACN,EAAE;IAgCX;;;;;;;;;OASG;IACH,kBAPa,CAAC,yBAGH,IAAE,UACF,CAAC,CAAC,SAAS,CAAC,GACV,CAAC,CAIb;IACD;;;;;;;;;;OAUG;IACH,6BARa,CAAC,yBAGH,IAAE,UACF,CAAC,CAAC,SAAS,CAAC,GACV,CAAC,CAAC,MAAM,CAAC,CAKrB;;IAtDD;;;;OAIG;IACH,mBAHU,MAAM,CAGR;IACR;;;;;OAKG;IACH,UAHa,IAAI,CAAC,MAAM,CAAC,CAQxB;IACD;;;;;;OAMG;IACH,8BAJW,MAAM,GACJ,IAAI,CAAC,MAAM,CAAC,CAKxB;CA4BJ;iCAhE2C,0BAA0B"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { BaseEntityMapper, construct } from './baseEntityMapper.model';
|
|
2
|
-
/**
|
|
3
|
-
* Abstract class representing a response entity mapper.
|
|
4
|
-
*
|
|
5
|
-
* @template Entity - A type that extends BaseEntity.
|
|
6
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
7
|
-
* @extends {BaseEntityMapper<SV>}
|
|
8
|
-
*/
|
|
9
|
-
export class ResponseEntityMapper extends BaseEntityMapper {
|
|
10
|
-
/**
|
|
11
|
-
* The entity type.
|
|
12
|
-
* @type {Entity}
|
|
13
|
-
* @protected
|
|
14
|
-
*/
|
|
15
|
-
_Entity;
|
|
16
|
-
/**
|
|
17
|
-
* Converts the underlying DTO to a JSON object.
|
|
18
|
-
*
|
|
19
|
-
* @returns {this['_dto']} - The JSON object.
|
|
20
|
-
* @throws {Error} - Throws an error if the DTO is invalid.
|
|
21
|
-
*/
|
|
22
|
-
toJson() {
|
|
23
|
-
if (!this.schemaValidator.validate(this.schemaValidator.schemify(this.schema), this.dto)) {
|
|
24
|
-
throw new Error('Invalid DTO');
|
|
25
|
-
}
|
|
26
|
-
return this.dto;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Serializes an entity to a JSON object.
|
|
30
|
-
*
|
|
31
|
-
* @param {Entity} entity - The entity to serialize.
|
|
32
|
-
* @returns {this['_dto']} - The JSON object.
|
|
33
|
-
* @throws {Error} - Throws an error if the DTO is invalid.
|
|
34
|
-
*/
|
|
35
|
-
serializeEntityToJson(entity) {
|
|
36
|
-
return this.fromEntity(entity).toJson();
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Populates entity mapper with DTO from an entity.
|
|
40
|
-
*
|
|
41
|
-
* @template T - A type that extends ResponseEntityMapper.
|
|
42
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
43
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
44
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
45
|
-
* @param {T['_Entity']} entity - The entity to convert.
|
|
46
|
-
* @returns {T} - An instance of the T.
|
|
47
|
-
*/
|
|
48
|
-
static fromEntity(schemaValidator, entity) {
|
|
49
|
-
return construct(this, schemaValidator).fromEntity(entity);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Serializes an entity to a JSON object.
|
|
53
|
-
*
|
|
54
|
-
* @template T - A type that extends ResponseEntityMapper.
|
|
55
|
-
* @template SV - A type that extends AnySchemaValidator.
|
|
56
|
-
* @param {EntityMapperConstructor<T, SV>} this - The constructor of the T.
|
|
57
|
-
* @param {SV} schemaValidator - The schema provider.
|
|
58
|
-
* @param {T['_Entity']} entity - The entity to serialize.
|
|
59
|
-
* @returns {T['_dto']} - The JSON object.
|
|
60
|
-
* @throws {Error} - Throws an error if the DTO is invalid.
|
|
61
|
-
*/
|
|
62
|
-
static serializeEntityToJson(schemaValidator, entity) {
|
|
63
|
-
return construct(this, schemaValidator).serializeEntityToJson(entity);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entityMapper.types.d.ts","sourceRoot":"","sources":["../../../../dist/entityMapper/types/entityMapper.types.js"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isHttpContractDetails.d.ts","sourceRoot":"","sources":["../../../../dist/http/guards/isHttpContractDetails.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,qEAEC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"isResponseShape.d.ts","sourceRoot":"","sources":["../../../../dist/http/guards/isResponseShape.js"],"names":[],"mappings":"AAAA,wDAMC"}
|
package/lib/dist/http/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../dist/http/index.js"],"names":[],"mappings":""}
|
package/lib/dist/http/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export class ForklaunchExpressLikeApplication {
|
|
2
|
-
/**
|
|
3
|
-
* Creates an instance of the Application class.
|
|
4
|
-
*
|
|
5
|
-
* @param {SV} schemaValidator - The schema validator.
|
|
6
|
-
*/
|
|
7
|
-
constructor(schemaValidator: SV, internal: any);
|
|
8
|
-
schemaValidator: SV;
|
|
9
|
-
internal: any;
|
|
10
|
-
routers: any[];
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=expressLikeApplication.interface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"expressLikeApplication.interface.d.ts","sourceRoot":"","sources":["../../../../dist/http/interfaces/expressLikeApplication.interface.js"],"names":[],"mappings":"AAAA;IAII;;;;OAIG;IACH,6BAFW,EAAE,iBAKZ;IAXD,oBAAgB;IAChB,cAAS;IACT,eAAa;CAUhB"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export class ForklaunchExpressLikeApplication {
|
|
2
|
-
schemaValidator;
|
|
3
|
-
internal;
|
|
4
|
-
routers = [];
|
|
5
|
-
/**
|
|
6
|
-
* Creates an instance of the Application class.
|
|
7
|
-
*
|
|
8
|
-
* @param {SV} schemaValidator - The schema validator.
|
|
9
|
-
*/
|
|
10
|
-
constructor(schemaValidator, internal) {
|
|
11
|
-
this.schemaValidator = schemaValidator;
|
|
12
|
-
this.internal = internal;
|
|
13
|
-
}
|
|
14
|
-
}
|