@forklaunch/core 0.2.36 → 0.3.0

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.
Files changed (222) hide show
  1. package/lib/{src/database/mikro/models/entities/base.entity.d.ts → base.entity-DNfmMOgd.d.mts} +3 -2
  2. package/lib/base.entity-DNfmMOgd.d.ts +27 -0
  3. package/lib/{src/cache/redisTtlCache.d.ts → cache/index.d.mts} +67 -4
  4. package/lib/cache/index.d.ts +130 -0
  5. package/lib/cache/index.js +133 -0
  6. package/lib/cache/index.mjs +105 -0
  7. package/lib/controllers/index.d.mts +5 -0
  8. package/lib/controllers/index.d.ts +5 -0
  9. package/lib/controllers/index.js +18 -0
  10. package/lib/controllers/index.mjs +0 -0
  11. package/lib/database/index.d.mts +37 -0
  12. package/lib/{src/database/mikro/models/entities/mongo.base.entity.d.ts → database/index.d.ts} +5 -2
  13. package/lib/database/index.js +78 -0
  14. package/lib/database/index.mjs +53 -0
  15. package/lib/dtoMapper/index.d.mts +215 -0
  16. package/lib/dtoMapper/index.d.ts +215 -0
  17. package/lib/dtoMapper/index.js +230 -0
  18. package/lib/dtoMapper/index.mjs +202 -0
  19. package/lib/http/index.d.mts +910 -0
  20. package/lib/http/index.d.ts +910 -0
  21. package/lib/http/index.js +2181 -0
  22. package/lib/http/index.mjs +2122 -0
  23. package/lib/services/index.d.mts +64 -0
  24. package/lib/services/index.d.ts +64 -0
  25. package/lib/services/index.js +159 -0
  26. package/lib/services/index.mjs +131 -0
  27. package/package.json +39 -26
  28. package/lib/src/cache/index.d.ts +0 -5
  29. package/lib/src/cache/index.d.ts.map +0 -1
  30. package/lib/src/cache/index.js +0 -4
  31. package/lib/src/cache/interfaces/ttlCache.interface.d.ts +0 -48
  32. package/lib/src/cache/interfaces/ttlCache.interface.d.ts.map +0 -1
  33. package/lib/src/cache/interfaces/ttlCache.interface.js +0 -1
  34. package/lib/src/cache/redisTtlCache.d.ts.map +0 -1
  35. package/lib/src/cache/redisTtlCache.js +0 -98
  36. package/lib/src/cache/types/ttlCacheRecord.types.d.ts +0 -14
  37. package/lib/src/cache/types/ttlCacheRecord.types.d.ts.map +0 -1
  38. package/lib/src/cache/types/ttlCacheRecord.types.js +0 -1
  39. package/lib/src/cache/utils/cacheKey.d.ts +0 -2
  40. package/lib/src/cache/utils/cacheKey.d.ts.map +0 -1
  41. package/lib/src/cache/utils/cacheKey.js +0 -3
  42. package/lib/src/controllers/index.d.ts +0 -2
  43. package/lib/src/controllers/index.d.ts.map +0 -1
  44. package/lib/src/controllers/index.js +0 -1
  45. package/lib/src/controllers/interfaces/controller.interface.d.ts +0 -4
  46. package/lib/src/controllers/interfaces/controller.interface.d.ts.map +0 -1
  47. package/lib/src/controllers/interfaces/controller.interface.js +0 -1
  48. package/lib/src/database/index.d.ts +0 -3
  49. package/lib/src/database/index.d.ts.map +0 -1
  50. package/lib/src/database/index.js +0 -2
  51. package/lib/src/database/mikro/models/entities/base.entity.d.ts.map +0 -1
  52. package/lib/src/database/mikro/models/entities/base.entity.js +0 -42
  53. package/lib/src/database/mikro/models/entities/mongo.base.entity.d.ts.map +0 -1
  54. package/lib/src/database/mikro/models/entities/mongo.base.entity.js +0 -51
  55. package/lib/src/dtoMapper/index.d.ts +0 -3
  56. package/lib/src/dtoMapper/index.d.ts.map +0 -1
  57. package/lib/src/dtoMapper/index.js +0 -2
  58. package/lib/src/dtoMapper/interfaces/dtoMapper.interface.d.ts +0 -18
  59. package/lib/src/dtoMapper/interfaces/dtoMapper.interface.d.ts.map +0 -1
  60. package/lib/src/dtoMapper/interfaces/dtoMapper.interface.js +0 -1
  61. package/lib/src/dtoMapper/models/baseDtoMapper.model.d.ts +0 -72
  62. package/lib/src/dtoMapper/models/baseDtoMapper.model.d.ts.map +0 -1
  63. package/lib/src/dtoMapper/models/baseDtoMapper.model.js +0 -76
  64. package/lib/src/dtoMapper/models/requestDtoMapper.model.d.ts +0 -68
  65. package/lib/src/dtoMapper/models/requestDtoMapper.model.d.ts.map +0 -1
  66. package/lib/src/dtoMapper/models/requestDtoMapper.model.js +0 -71
  67. package/lib/src/dtoMapper/models/responseDtoMapper.model.d.ts +0 -67
  68. package/lib/src/dtoMapper/models/responseDtoMapper.model.d.ts.map +0 -1
  69. package/lib/src/dtoMapper/models/responseDtoMapper.model.js +0 -68
  70. package/lib/src/dtoMapper/types/dtoMapper.types.d.ts +0 -9
  71. package/lib/src/dtoMapper/types/dtoMapper.types.d.ts.map +0 -1
  72. package/lib/src/dtoMapper/types/dtoMapper.types.js +0 -1
  73. package/lib/src/http/application/expressLikeApplication.d.ts +0 -21
  74. package/lib/src/http/application/expressLikeApplication.d.ts.map +0 -1
  75. package/lib/src/http/application/expressLikeApplication.js +0 -21
  76. package/lib/src/http/guards/isConstrainedForklaunchRouter.d.ts +0 -4
  77. package/lib/src/http/guards/isConstrainedForklaunchRouter.d.ts.map +0 -1
  78. package/lib/src/http/guards/isConstrainedForklaunchRouter.js +0 -5
  79. package/lib/src/http/guards/isExpressLikeSchemaHandler.d.ts +0 -5
  80. package/lib/src/http/guards/isExpressLikeSchemaHandler.d.ts.map +0 -1
  81. package/lib/src/http/guards/isExpressLikeSchemaHandler.js +0 -6
  82. package/lib/src/http/guards/isForklaunchExpressLikeRouter.d.ts +0 -5
  83. package/lib/src/http/guards/isForklaunchExpressLikeRouter.d.ts.map +0 -1
  84. package/lib/src/http/guards/isForklaunchExpressLikeRouter.js +0 -6
  85. package/lib/src/http/guards/isForklaunchRouter.d.ts +0 -4
  86. package/lib/src/http/guards/isForklaunchRouter.d.ts.map +0 -1
  87. package/lib/src/http/guards/isForklaunchRouter.js +0 -7
  88. package/lib/src/http/guards/isHttpContractDetails.d.ts +0 -7
  89. package/lib/src/http/guards/isHttpContractDetails.d.ts.map +0 -1
  90. package/lib/src/http/guards/isHttpContractDetails.js +0 -9
  91. package/lib/src/http/guards/isPathParamContractDetails.d.ts +0 -4
  92. package/lib/src/http/guards/isPathParamContractDetails.d.ts.map +0 -1
  93. package/lib/src/http/guards/isPathParamContractDetails.js +0 -10
  94. package/lib/src/http/guards/isResponseShape.d.ts +0 -3
  95. package/lib/src/http/guards/isResponseShape.d.ts.map +0 -1
  96. package/lib/src/http/guards/isResponseShape.js +0 -7
  97. package/lib/src/http/guards/isTypedHandler.d.ts +0 -5
  98. package/lib/src/http/guards/isTypedHandler.d.ts.map +0 -1
  99. package/lib/src/http/guards/isTypedHandler.js +0 -6
  100. package/lib/src/http/handlers/delete.d.ts +0 -9
  101. package/lib/src/http/handlers/delete.d.ts.map +0 -1
  102. package/lib/src/http/handlers/delete.js +0 -4
  103. package/lib/src/http/handlers/get.d.ts +0 -9
  104. package/lib/src/http/handlers/get.d.ts.map +0 -1
  105. package/lib/src/http/handlers/get.js +0 -4
  106. package/lib/src/http/handlers/head.d.ts +0 -9
  107. package/lib/src/http/handlers/head.d.ts.map +0 -1
  108. package/lib/src/http/handlers/head.js +0 -4
  109. package/lib/src/http/handlers/middleware.d.ts +0 -9
  110. package/lib/src/http/handlers/middleware.d.ts.map +0 -1
  111. package/lib/src/http/handlers/middleware.js +0 -4
  112. package/lib/src/http/handlers/options.d.ts +0 -9
  113. package/lib/src/http/handlers/options.d.ts.map +0 -1
  114. package/lib/src/http/handlers/options.js +0 -4
  115. package/lib/src/http/handlers/patch.d.ts +0 -9
  116. package/lib/src/http/handlers/patch.d.ts.map +0 -1
  117. package/lib/src/http/handlers/patch.js +0 -4
  118. package/lib/src/http/handlers/post.d.ts +0 -9
  119. package/lib/src/http/handlers/post.d.ts.map +0 -1
  120. package/lib/src/http/handlers/post.js +0 -4
  121. package/lib/src/http/handlers/put.d.ts +0 -9
  122. package/lib/src/http/handlers/put.d.ts.map +0 -1
  123. package/lib/src/http/handlers/put.js +0 -4
  124. package/lib/src/http/handlers/trace.d.ts +0 -9
  125. package/lib/src/http/handlers/trace.d.ts.map +0 -1
  126. package/lib/src/http/handlers/trace.js +0 -4
  127. package/lib/src/http/handlers/typedAuthHandler.d.ts +0 -5
  128. package/lib/src/http/handlers/typedAuthHandler.d.ts.map +0 -1
  129. package/lib/src/http/handlers/typedAuthHandler.js +0 -3
  130. package/lib/src/http/handlers/typedHandler.d.ts +0 -21
  131. package/lib/src/http/handlers/typedHandler.d.ts.map +0 -1
  132. package/lib/src/http/handlers/typedHandler.js +0 -30
  133. package/lib/src/http/index.d.ts +0 -23
  134. package/lib/src/http/index.d.ts.map +0 -1
  135. package/lib/src/http/index.js +0 -22
  136. package/lib/src/http/interfaces/expressLikeRouter.interface.d.ts +0 -24
  137. package/lib/src/http/interfaces/expressLikeRouter.interface.d.ts.map +0 -1
  138. package/lib/src/http/interfaces/expressLikeRouter.interface.js +0 -1
  139. package/lib/src/http/middleware/request/auth.middleware.d.ts +0 -16
  140. package/lib/src/http/middleware/request/auth.middleware.d.ts.map +0 -1
  141. package/lib/src/http/middleware/request/auth.middleware.js +0 -143
  142. package/lib/src/http/middleware/request/cors.middleware.d.ts +0 -13
  143. package/lib/src/http/middleware/request/cors.middleware.d.ts.map +0 -1
  144. package/lib/src/http/middleware/request/cors.middleware.js +0 -15
  145. package/lib/src/http/middleware/request/createContext.middleware.d.ts +0 -15
  146. package/lib/src/http/middleware/request/createContext.middleware.d.ts.map +0 -1
  147. package/lib/src/http/middleware/request/createContext.middleware.js +0 -26
  148. package/lib/src/http/middleware/request/enrichDetails.middleware.d.ts +0 -15
  149. package/lib/src/http/middleware/request/enrichDetails.middleware.d.ts.map +0 -1
  150. package/lib/src/http/middleware/request/enrichDetails.middleware.js +0 -19
  151. package/lib/src/http/middleware/request/parse.middleware.d.ts +0 -17
  152. package/lib/src/http/middleware/request/parse.middleware.d.ts.map +0 -1
  153. package/lib/src/http/middleware/request/parse.middleware.js +0 -43
  154. package/lib/src/http/middleware/response/parse.middleware.d.ts +0 -31
  155. package/lib/src/http/middleware/response/parse.middleware.d.ts.map +0 -1
  156. package/lib/src/http/middleware/response/parse.middleware.js +0 -52
  157. package/lib/src/http/openApiV3Generator/openApiV3Generator.d.ts +0 -14
  158. package/lib/src/http/openApiV3Generator/openApiV3Generator.d.ts.map +0 -1
  159. package/lib/src/http/openApiV3Generator/openApiV3Generator.js +0 -169
  160. package/lib/src/http/router/expressLikeRouter.d.ts +0 -138
  161. package/lib/src/http/router/expressLikeRouter.d.ts.map +0 -1
  162. package/lib/src/http/router/expressLikeRouter.js +0 -483
  163. package/lib/src/http/types/apiDefinition.types.d.ts +0 -260
  164. package/lib/src/http/types/apiDefinition.types.d.ts.map +0 -1
  165. package/lib/src/http/types/apiDefinition.types.js +0 -1
  166. package/lib/src/http/types/contractDetails.types.d.ts +0 -211
  167. package/lib/src/http/types/contractDetails.types.d.ts.map +0 -1
  168. package/lib/src/http/types/contractDetails.types.js +0 -1
  169. package/lib/src/http/types/expressLikeRouter.types.d.ts +0 -51
  170. package/lib/src/http/types/expressLikeRouter.types.d.ts.map +0 -1
  171. package/lib/src/http/types/expressLikeRouter.types.js +0 -1
  172. package/lib/src/http/types/router.types.d.ts +0 -32
  173. package/lib/src/http/types/router.types.d.ts.map +0 -1
  174. package/lib/src/http/types/router.types.js +0 -1
  175. package/lib/src/http/types/typedHandler.types.d.ts +0 -10
  176. package/lib/src/http/types/typedHandler.types.d.ts.map +0 -1
  177. package/lib/src/http/types/typedHandler.types.js +0 -1
  178. package/lib/src/http/utils/enrichExpressLikeSend.d.ts +0 -32
  179. package/lib/src/http/utils/enrichExpressLikeSend.d.ts.map +0 -1
  180. package/lib/src/http/utils/enrichExpressLikeSend.js +0 -50
  181. package/lib/src/http/utils/httpStatusCodes.d.ts +0 -75
  182. package/lib/src/http/utils/httpStatusCodes.d.ts.map +0 -1
  183. package/lib/src/http/utils/httpStatusCodes.js +0 -1039
  184. package/lib/src/services/configInjector.d.ts +0 -21
  185. package/lib/src/services/configInjector.d.ts.map +0 -1
  186. package/lib/src/services/configInjector.js +0 -90
  187. package/lib/src/services/index.d.ts +0 -5
  188. package/lib/src/services/index.d.ts.map +0 -1
  189. package/lib/src/services/index.js +0 -4
  190. package/lib/src/services/interfaces/baseService.d.ts +0 -15
  191. package/lib/src/services/interfaces/baseService.d.ts.map +0 -1
  192. package/lib/src/services/interfaces/baseService.js +0 -1
  193. package/lib/src/services/types/configInjector.types.d.ts +0 -25
  194. package/lib/src/services/types/configInjector.types.d.ts.map +0 -1
  195. package/lib/src/services/types/configInjector.types.js +0 -6
  196. package/lib/src/services/types/entityManager.types.d.ts +0 -4
  197. package/lib/src/services/types/entityManager.types.d.ts.map +0 -1
  198. package/lib/src/services/types/entityManager.types.js +0 -1
  199. package/lib/tests/configInjector.test.d.ts +0 -2
  200. package/lib/tests/configInjector.test.d.ts.map +0 -1
  201. package/lib/tests/configInjector.test.js +0 -105
  202. package/lib/tests/dtoMapper.test.d.ts +0 -2
  203. package/lib/tests/dtoMapper.test.d.ts.map +0 -1
  204. package/lib/tests/dtoMapper.test.js +0 -170
  205. package/lib/tests/expressLikeRouterInstantiation.test.d.ts +0 -2
  206. package/lib/tests/expressLikeRouterInstantiation.test.d.ts.map +0 -1
  207. package/lib/tests/expressLikeRouterInstantiation.test.js +0 -118
  208. package/lib/tests/http.middleware.test.d.ts +0 -2
  209. package/lib/tests/http.middleware.test.d.ts.map +0 -1
  210. package/lib/tests/http.middleware.test.js +0 -102
  211. package/lib/tests/openApiV3Generator.test.d.ts +0 -2
  212. package/lib/tests/openApiV3Generator.test.d.ts.map +0 -1
  213. package/lib/tests/openApiV3Generator.test.js +0 -66
  214. package/lib/tests/redisTtlCache.test.d.ts +0 -2
  215. package/lib/tests/redisTtlCache.test.d.ts.map +0 -1
  216. package/lib/tests/redisTtlCache.test.js +0 -49
  217. package/lib/tests/typedHandler.test.d.ts +0 -2
  218. package/lib/tests/typedHandler.test.d.ts.map +0 -1
  219. package/lib/tests/typedHandler.test.js +0 -3
  220. package/lib/vitest.config.d.ts +0 -3
  221. package/lib/vitest.config.d.ts.map +0 -1
  222. package/lib/vitest.config.js +0 -7
@@ -1,98 +0,0 @@
1
- import { createClient } from 'redis';
2
- /**
3
- * Class representing a Redis-based TTL (Time-To-Live) cache.
4
- * Implements the TtlCache interface.
5
- */
6
- export class RedisTtlCache {
7
- ttlMilliseconds;
8
- client;
9
- /**
10
- * Creates an instance of RedisTtlCache.
11
- *
12
- * @param {number} ttlMilliseconds - The default TTL in milliseconds.
13
- * @param {RedisClientOptions} [hostingOptions] - The Redis client options.
14
- */
15
- constructor(ttlMilliseconds, hostingOptions) {
16
- this.ttlMilliseconds = ttlMilliseconds;
17
- // Connects to localhost:6379 by default
18
- // url usage: redis[s]://[[username][:password]@][host][:port][/db-number]
19
- this.client = createClient(hostingOptions);
20
- this.client.on('error', (err) => console.error('Redis Client Error', err));
21
- this.client.connect().catch(console.error);
22
- }
23
- /**
24
- * Puts a record into the Redis cache.
25
- *
26
- * @param {TtlCacheRecord} param0 - The cache record to put into the cache.
27
- * @returns {Promise<void>} - A promise that resolves when the record is put into the cache.
28
- */
29
- async putRecord({ key, value, ttlMilliseconds = this.ttlMilliseconds }) {
30
- await this.client.set(key, JSON.stringify(value), {
31
- PX: ttlMilliseconds
32
- });
33
- }
34
- /**
35
- * Deletes a record from the Redis cache.
36
- *
37
- * @param {string} cacheRecordKey - The key of the cache record to delete.
38
- * @returns {Promise<void>} - A promise that resolves when the record is deleted from the cache.
39
- */
40
- async deleteRecord(cacheRecordKey) {
41
- await this.client.del(cacheRecordKey);
42
- }
43
- /**
44
- * Reads a record from the Redis cache.
45
- *
46
- * @param {string} cacheRecordKey - The key of the cache record to read.
47
- * @returns {Promise<TtlCacheRecord>} - A promise that resolves with the cache record.
48
- * @throws {Error} - Throws an error if the record is not found.
49
- */
50
- async readRecord(cacheRecordKey) {
51
- const value = await this.client.get(cacheRecordKey);
52
- if (value === null) {
53
- throw new Error(`Record not found for key: ${cacheRecordKey}`);
54
- }
55
- const ttl = await this.client.ttl(cacheRecordKey); // Fetch TTL from Redis
56
- return {
57
- key: cacheRecordKey,
58
- value: JSON.parse(value),
59
- ttlMilliseconds: ttl * 1000
60
- };
61
- }
62
- /**
63
- * Lists the keys in the Redis cache that match a pattern prefix.
64
- *
65
- * @param {string} pattern_prefix - The pattern prefix to match.
66
- * @returns {Promise<string[]>} - A promise that resolves with an array of keys matching the pattern prefix.
67
- */
68
- async listKeys(pattern_prefix) {
69
- const keys = await this.client.keys(pattern_prefix + '*');
70
- return keys;
71
- }
72
- /**
73
- * Peeks at a record in the Redis cache to check if it exists.
74
- *
75
- * @param {string} cacheRecordKey - The key of the cache record to peek at.
76
- * @returns {Promise<boolean>} - A promise that resolves with a boolean indicating if the record exists.
77
- */
78
- async peekRecord(cacheRecordKey) {
79
- const result = await this.client.exists(cacheRecordKey);
80
- return result === 1;
81
- }
82
- /**
83
- * Disconnects the Redis client.
84
- *
85
- * @returns {Promise<void>} - A promise that resolves when the client is disconnected.
86
- */
87
- async disconnect() {
88
- await this.client.quit();
89
- }
90
- /**
91
- * Gets the default TTL (Time-To-Live) in milliseconds.
92
- *
93
- * @returns {number} - The TTL in milliseconds.
94
- */
95
- getTtlMilliseconds() {
96
- return this.ttlMilliseconds;
97
- }
98
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Type representing a TTL (Time-To-Live) cache record.
3
- *
4
- * @typedef {Object} TtlCacheRecord
5
- * @property {string} key - The key of the cache record.
6
- * @property {any} value - The value of the cache record.
7
- * @property {number} ttlMilliseconds - The time-to-live of the cache record in milliseconds.
8
- */
9
- export type TtlCacheRecord<T> = {
10
- key: string;
11
- value: T;
12
- ttlMilliseconds: number;
13
- };
14
- //# sourceMappingURL=ttlCacheRecord.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ttlCacheRecord.types.d.ts","sourceRoot":"","sources":["../../../../src/cache/types/ttlCacheRecord.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,CAAC;IACT,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- export declare const createCacheKey: (cacheKeyPrefix: string) => (id: string) => string;
2
- //# sourceMappingURL=cacheKey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cacheKey.d.ts","sourceRoot":"","sources":["../../../../src/cache/utils/cacheKey.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,mBAAoB,MAAM,UAAU,MAAM,WAEpE,CAAC"}
@@ -1,3 +0,0 @@
1
- export const createCacheKey = (cacheKeyPrefix) => (id) => {
2
- return `${cacheKeyPrefix}:${id}`;
3
- };
@@ -1,2 +0,0 @@
1
- export * from './interfaces/controller.interface';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC"}
@@ -1 +0,0 @@
1
- export * from './interfaces/controller.interface';
@@ -1,4 +0,0 @@
1
- export type Controller<Service> = {
2
- [K in keyof Service]: unknown;
3
- };
4
- //# sourceMappingURL=controller.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"controller.interface.d.ts","sourceRoot":"","sources":["../../../../src/controllers/interfaces/controller.interface.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,CAAC,OAAO,IAAI;KAC/B,CAAC,IAAI,MAAM,OAAO,GAAG,OAAO;CAC9B,CAAC"}
@@ -1,3 +0,0 @@
1
- export * from './mikro/models/entities/base.entity';
2
- export * from './mikro/models/entities/mongo.base.entity';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/database/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,2CAA2C,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './mikro/models/entities/base.entity';
2
- export * from './mikro/models/entities/mongo.base.entity';
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.entity.d.ts","sourceRoot":"","sources":["../../../../../../src/database/mikro/models/entities/base.entity.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,8BAAsB,UAAU;IAC9B;;;;;OAKG;IAEH,EAAE,EAAE,MAAM,CAAQ;IAElB;;;;OAIG;IAEH,SAAS,EAAE,IAAI,CAAc;IAE7B;;;;;OAKG;IAEH,SAAS,EAAE,IAAI,CAAc;CAC9B"}
@@ -1,42 +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") r = Reflect.decorate(decorators, target, key, desc);
4
- 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;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { v4 } from 'uuid';
8
- import { PrimaryKey, Property } from '@mikro-orm/core';
9
- /**
10
- * Abstract class representing a base entity.
11
- */
12
- export class BaseEntity {
13
- /**
14
- * The unique identifier for the entity.
15
- *
16
- * @type {string}
17
- * @readonly
18
- */
19
- id = v4();
20
- /**
21
- * The date when the entity was created.
22
- *
23
- * @type {Date}
24
- */
25
- createdAt = new Date();
26
- /**
27
- * The date when the entity was last updated.
28
- *
29
- * @type {Date}
30
- * @readonly
31
- */
32
- updatedAt = new Date();
33
- }
34
- __decorate([
35
- PrimaryKey({ type: 'uuid' })
36
- ], BaseEntity.prototype, "id", void 0);
37
- __decorate([
38
- Property()
39
- ], BaseEntity.prototype, "createdAt", void 0);
40
- __decorate([
41
- Property({ onUpdate: () => new Date() })
42
- ], BaseEntity.prototype, "updatedAt", void 0);
@@ -1 +0,0 @@
1
- {"version":3,"file":"mongo.base.entity.d.ts","sourceRoot":"","sources":["../../../../../../src/database/mikro/models/entities/mongo.base.entity.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C;;GAEG;AACH,8BAAsB,eAAe;IACnC;;;;;OAKG;IAEH,GAAG,EAAG,QAAQ,CAAC;IAEf;;;;;OAKG;IAEH,EAAE,EAAG,MAAM,CAAC;IAEZ;;;;OAIG;IAEH,SAAS,EAAE,IAAI,CAAc;IAE7B;;;;;OAKG;IAEH,SAAS,EAAE,IAAI,CAAc;CAC9B"}
@@ -1,51 +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") r = Reflect.decorate(decorators, target, key, desc);
4
- 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;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { PrimaryKey, Property, SerializedPrimaryKey } from '@mikro-orm/core';
8
- /**
9
- * Abstract class representing a base entity.
10
- */
11
- export class MongoBaseEntity {
12
- /**
13
- * The serialized unique identifier for the entity.
14
- *
15
- * @type {string}
16
- * @readonly
17
- */
18
- _id;
19
- /**
20
- * The unique identifier for the entity.
21
- *
22
- * @type {string}
23
- * @readonly
24
- */
25
- id;
26
- /**
27
- * The date when the entity was created.
28
- *
29
- * @type {Date}
30
- */
31
- createdAt = new Date();
32
- /**
33
- * The date when the entity was last updated.
34
- *
35
- * @type {Date}
36
- * @readonly
37
- */
38
- updatedAt = new Date();
39
- }
40
- __decorate([
41
- PrimaryKey({ type: 'uuid' })
42
- ], MongoBaseEntity.prototype, "_id", void 0);
43
- __decorate([
44
- SerializedPrimaryKey()
45
- ], MongoBaseEntity.prototype, "id", void 0);
46
- __decorate([
47
- Property()
48
- ], MongoBaseEntity.prototype, "createdAt", void 0);
49
- __decorate([
50
- Property({ onUpdate: () => new Date() })
51
- ], MongoBaseEntity.prototype, "updatedAt", void 0);
@@ -1,3 +0,0 @@
1
- export * from './models/requestDtoMapper.model';
2
- export * from './models/responseDtoMapper.model';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dtoMapper/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './models/requestDtoMapper.model';
2
- export * from './models/responseDtoMapper.model';
@@ -1,18 +0,0 @@
1
- import { AnySchemaValidator } from '@forklaunch/validator';
2
- /**
3
- * Interface representing a constructor for an entity mapper.
4
- *
5
- * @template T - The type of the entity mapper.
6
- * @template SV - The type of the schema validator.
7
- * @interface DtoMapperConstructor
8
- */
9
- export interface DtoMapperConstructor<T, SV extends AnySchemaValidator> {
10
- /**
11
- * Creates a new instance of the entity mapper.
12
- *
13
- * @param {AnySchemaValidator} schemaValidator - The arguments to pass to the constructor.
14
- * @returns {T} - A new instance of the entity mapper.
15
- */
16
- new (schemaValidator: SV): T;
17
- }
18
- //# sourceMappingURL=dtoMapper.interface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dtoMapper.interface.d.ts","sourceRoot":"","sources":["../../../../src/dtoMapper/interfaces/dtoMapper.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,EAAE,EAAE,SAAS,kBAAkB;IACpE;;;;;OAKG;IACH,KAAK,eAAe,EAAE,EAAE,GAAG,CAAC,CAAC;CAC9B"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,72 +0,0 @@
1
- import { AnySchemaValidator, Schema, SchemaValidator } from '@forklaunch/validator';
2
- import { DtoMapperConstructor } from '../interfaces/dtoMapper.interface';
3
- import { DtoMapperSchemaValidatorObject } from '../types/dtoMapper.types';
4
- /**
5
- * Constructs an instance of a T.
6
- *
7
- * @template T - A type that extends BaseDtoMapper.
8
- * @template SV - A type that extends AnySchemaValidator.
9
- * @param {DtoMapperConstructor<T, SV>} self - The constructor of the T.
10
- * @param {SV} [schemaValidator] - The optional schema validator.
11
- * @returns {T} - An instance of the T.
12
- */
13
- export declare function construct<T, SV extends AnySchemaValidator>(self: DtoMapperConstructor<T, SV>, schemaValidator?: SV): T;
14
- /**
15
- * Abstract class representing a base entity mapper.
16
- *
17
- * @template SV - A type that extends AnySchemaValidator.
18
- */
19
- export declare abstract class BaseDtoMapper<SV extends AnySchemaValidator> {
20
- /**
21
- * The schema validator exact type.
22
- * @type {SV}
23
- * @protected
24
- */
25
- _SV: SV;
26
- /**
27
- * The schema validator as a general type.
28
- * @type {SchemaValidator}
29
- * @protected
30
- */
31
- protected schemaValidator: SchemaValidator;
32
- /**
33
- * The schema definition.
34
- * @type {DtoMapperSchemaValidatorObject<SV>}
35
- * @abstract
36
- */
37
- abstract schema: DtoMapperSchemaValidatorObject<SV>;
38
- /**
39
- * The Data Transfer Object (DTO).
40
- * @type {Schema<this['schema'], SV>}
41
- */
42
- _dto: Schema<this['schema'], SV>;
43
- /**
44
- * Creates an instance of BaseDtoMapper.
45
- *
46
- * @param {SV} schemaValidator - The schema provider.
47
- */
48
- constructor(schemaValidator: 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
- * Gets the schema of a T.
64
- *
65
- * @template T - A type that extends BaseDtoMapper.
66
- * @template SV - A type that extends AnySchemaValidator.
67
- * @param {DtoMapperConstructor<T, SV>} this - The constructor of the T.
68
- * @returns {T['schema']} - The schema of the T.
69
- */
70
- static schema<T extends BaseDtoMapper<SV>, SV extends AnySchemaValidator>(this: DtoMapperConstructor<T, SV>): T['schema'];
71
- }
72
- //# sourceMappingURL=baseDtoMapper.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"baseDtoMapper.model.d.ts","sourceRoot":"","sources":["../../../../src/dtoMapper/models/baseDtoMapper.model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,MAAM,EACN,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,8BAA8B,EAAE,MAAM,0BAA0B,CAAC;AAE1E;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,EAAE,SAAS,kBAAkB,EACxD,IAAI,EAAE,oBAAoB,CAAC,CAAC,EAAE,EAAE,CAAC,EACjC,eAAe,CAAC,EAAE,EAAE,GACnB,CAAC,CAEH;AAED;;;;GAIG;AACH,8BAAsB,aAAa,CAAC,EAAE,SAAS,kBAAkB;IAC/D;;;;OAIG;IACH,GAAG,EAAG,EAAE,CAAC;IAET;;;;OAIG;IACH,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAE3C;;;;OAIG;IACH,QAAQ,CAAC,MAAM,EAAE,8BAA8B,CAAC,EAAE,CAAC,CAAC;IAEpD;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,CAG9B;IAEF;;;;OAIG;gBACS,eAAe,EAAE,EAAE;IAI/B;;;;;OAKG;IACH,IAAI,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,EASzB;IAED;;;;OAIG;IACH,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,CAEtB;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,SAAS,kBAAkB,EACtE,IAAI,EAAE,oBAAoB,CAAC,CAAC,EAAE,EAAE,CAAC,GAChC,CAAC,CAAC,QAAQ,CAAC;CAGf"}
@@ -1,76 +0,0 @@
1
- /**
2
- * Constructs an instance of a T.
3
- *
4
- * @template T - A type that extends BaseDtoMapper.
5
- * @template SV - A type that extends AnySchemaValidator.
6
- * @param {DtoMapperConstructor<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 BaseDtoMapper {
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 BaseDtoMapper.
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
- const parsedSchema = this.schemaValidator.parse(this.schemaValidator.schemify(this.schema), _dto);
52
- if (!parsedSchema.ok) {
53
- throw new Error(`Invalid DTO: ${parsedSchema.error}`);
54
- }
55
- this._dto = _dto;
56
- }
57
- /**
58
- * Validates and gets the Data Transfer Object (DTO).
59
- *
60
- * @returns {this['_dto']} - The Data Transfer Object (DTO).
61
- */
62
- get dto() {
63
- return this._dto;
64
- }
65
- /**
66
- * Gets the schema of a T.
67
- *
68
- * @template T - A type that extends BaseDtoMapper.
69
- * @template SV - A type that extends AnySchemaValidator.
70
- * @param {DtoMapperConstructor<T, SV>} this - The constructor of the T.
71
- * @returns {T['schema']} - The schema of the T.
72
- */
73
- static schema() {
74
- return construct(this).schema;
75
- }
76
- }
@@ -1,68 +0,0 @@
1
- import { AnySchemaValidator } from '@forklaunch/validator';
2
- import { BaseEntity } from '../../database/mikro/models/entities/base.entity';
3
- import { DtoMapperConstructor } from '../interfaces/dtoMapper.interface';
4
- import { BaseDtoMapper } from './baseDtoMapper.model';
5
- /**
6
- * Abstract class representing a request entity mapper.
7
- *
8
- * @template Entity - A type that extends BaseEntity.
9
- * @template SV - A type that extends AnySchemaValidator.
10
- * @extends {BaseDtoMapper<SV>}
11
- */
12
- export declare abstract class RequestDtoMapper<Entity extends BaseEntity, SV extends AnySchemaValidator> extends BaseDtoMapper<SV> {
13
- /**
14
- * The entity type.
15
- * @type {Entity}
16
- * @protected
17
- */
18
- _Entity: Entity;
19
- /**
20
- * Converts the underlying DTO to an entity.
21
- *
22
- * @abstract
23
- * @param {...unknown[]} additionalArgs - Additional arguments.
24
- * @returns {Entity} - The entity.
25
- */
26
- abstract toEntity(...additionalArgs: unknown[]): Entity;
27
- /**
28
- * Populates the DTO with data from a JSON object.
29
- *
30
- * @param {this['_dto']} json - The JSON object.
31
- * @returns {this} - The instance of the RequestDtoMapper.
32
- */
33
- fromDto(json: this['_dto']): this;
34
- /**
35
- * Deserializes a JSON object to an entity.
36
- *
37
- * @param {this['_dto']} json - The JSON object.
38
- * @param {...unknown[]} additionalArgs - Additional arguments.
39
- * @returns {Entity} - The entity.
40
- */
41
- deserializeDtoToEntity(json: this['_dto'], ...additionalArgs: Parameters<this['toEntity']>): Entity;
42
- /**
43
- * Creates an instance of a RequestDtoMapper from a JSON object.
44
- *
45
- * @template T - A type that extends RequestDtoMapper.
46
- * @template SV - A type that extends AnySchemaValidator.
47
- * @template JsonType - The type of the JSON object.
48
- * @param {DtoMapperConstructor<T, SV>} this - The constructor of the T.
49
- * @param {SV} schemaValidator - The schema provider.
50
- * @param {JsonType} json - The JSON object.
51
- * @returns {T} - An instance of the T.
52
- */
53
- static fromDto<T extends RequestDtoMapper<BaseEntity, SV>, SV extends AnySchemaValidator, JsonType extends T['_dto']>(this: DtoMapperConstructor<T, SV>, schemaValidator: SV, json: JsonType): T;
54
- /**
55
- * Deserializes a JSON object to an entity.
56
- *
57
- * @template T - A type that extends RequestDtoMapper.
58
- * @template SV - A type that extends AnySchemaValidator.
59
- * @template JsonType - The type of the JSON object.
60
- * @param {DtoMapperConstructor<T, SV>} this - The constructor of the T.
61
- * @param {SV} schemaValidator - The schema provider.
62
- * @param {JsonType} json - The JSON object.
63
- * @param {...unknown[]} additionalArgs - Additional arguments.
64
- * @returns {T['_Entity']} - The entity.
65
- */
66
- static deserializeDtoToEntity<T extends RequestDtoMapper<BaseEntity, SV>, SV extends AnySchemaValidator, JsonType extends T['_dto']>(this: DtoMapperConstructor<T, SV>, schemaValidator: SV, json: JsonType, ...additionalArgs: Parameters<T['toEntity']>): T['_Entity'];
67
- }
68
- //# sourceMappingURL=requestDtoMapper.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"requestDtoMapper.model.d.ts","sourceRoot":"","sources":["../../../../src/dtoMapper/models/requestDtoMapper.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAa,MAAM,uBAAuB,CAAC;AAEjE;;;;;;GAMG;AACH,8BAAsB,gBAAgB,CACpC,MAAM,SAAS,UAAU,EACzB,EAAE,SAAS,kBAAkB,CAC7B,SAAQ,aAAa,CAAC,EAAE,CAAC;IACzB;;;;OAIG;IACH,OAAO,EAAG,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,QAAQ,CAAC,QAAQ,CAAC,GAAG,cAAc,EAAE,OAAO,EAAE,GAAG,MAAM;IAEvD;;;;;OAKG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI;IAYjC;;;;;;OAMG;IACH,sBAAsB,CACpB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,EAClB,GAAG,cAAc,EAAE,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAC9C,MAAM;IAIT;;;;;;;;;;OAUG;IACH,MAAM,CAAC,OAAO,CACZ,CAAC,SAAS,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAC,EAC1C,EAAE,SAAS,kBAAkB,EAC7B,QAAQ,SAAS,CAAC,CAAC,MAAM,CAAC,EAC1B,IAAI,EAAE,oBAAoB,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,GAAG,CAAC;IAI5E;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,sBAAsB,CAC3B,CAAC,SAAS,gBAAgB,CAAC,UAAU,EAAE,EAAE,CAAC,EAC1C,EAAE,SAAS,kBAAkB,EAC7B,QAAQ,SAAS,CAAC,CAAC,MAAM,CAAC,EAE1B,IAAI,EAAE,oBAAoB,CAAC,CAAC,EAAE,EAAE,CAAC,EACjC,eAAe,EAAE,EAAE,EACnB,IAAI,EAAE,QAAQ,EACd,GAAG,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,GAC3C,CAAC,CAAC,SAAS,CAAC;CAKhB"}
@@ -1,71 +0,0 @@
1
- import { BaseDtoMapper, construct } from './baseDtoMapper.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 {BaseDtoMapper<SV>}
8
- */
9
- export class RequestDtoMapper extends BaseDtoMapper {
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 RequestDtoMapper.
21
- */
22
- fromDto(json) {
23
- const parsedSchema = this.schemaValidator.parse(this.schemaValidator.schemify(this.schema), json);
24
- if (!parsedSchema.ok) {
25
- throw new Error(`Invalid DTO: ${parsedSchema.error}`);
26
- }
27
- this.dto = json;
28
- return this;
29
- }
30
- /**
31
- * Deserializes a JSON object to an entity.
32
- *
33
- * @param {this['_dto']} json - The JSON object.
34
- * @param {...unknown[]} additionalArgs - Additional arguments.
35
- * @returns {Entity} - The entity.
36
- */
37
- deserializeDtoToEntity(json, ...additionalArgs) {
38
- return this.fromDto(json).toEntity(...additionalArgs);
39
- }
40
- /**
41
- * Creates an instance of a RequestDtoMapper from a JSON object.
42
- *
43
- * @template T - A type that extends RequestDtoMapper.
44
- * @template SV - A type that extends AnySchemaValidator.
45
- * @template JsonType - The type of the JSON object.
46
- * @param {DtoMapperConstructor<T, SV>} this - The constructor of the T.
47
- * @param {SV} schemaValidator - The schema provider.
48
- * @param {JsonType} json - The JSON object.
49
- * @returns {T} - An instance of the T.
50
- */
51
- static fromDto(schemaValidator, json) {
52
- return construct(this, schemaValidator).fromDto(json);
53
- }
54
- /**
55
- * Deserializes a JSON object to an entity.
56
- *
57
- * @template T - A type that extends RequestDtoMapper.
58
- * @template SV - A type that extends AnySchemaValidator.
59
- * @template JsonType - The type of the JSON object.
60
- * @param {DtoMapperConstructor<T, SV>} this - The constructor of the T.
61
- * @param {SV} schemaValidator - The schema provider.
62
- * @param {JsonType} json - The JSON object.
63
- * @param {...unknown[]} additionalArgs - Additional arguments.
64
- * @returns {T['_Entity']} - The entity.
65
- */
66
- static deserializeDtoToEntity(schemaValidator, json, ...additionalArgs) {
67
- return construct(this, schemaValidator)
68
- .fromDto(json)
69
- .toEntity(...additionalArgs);
70
- }
71
- }