eh-commons 0.0.1-testing.97 → 0.0.2-testing.78

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 (280) hide show
  1. package/.prettierrc +2 -1
  2. package/dist/clients/index.d.ts +3 -0
  3. package/dist/clients/index.js +20 -0
  4. package/dist/clients/index.js.map +1 -0
  5. package/dist/clients/rest.client.d.ts +18 -0
  6. package/dist/clients/rest.client.js +101 -0
  7. package/dist/clients/rest.client.js.map +1 -0
  8. package/dist/clients/session.client.d.ts +3 -4
  9. package/dist/clients/session.client.js +4 -4
  10. package/dist/clients/session.client.js.map +1 -1
  11. package/dist/index.d.ts +22 -35
  12. package/dist/index.js +29 -55
  13. package/dist/index.js.map +1 -1
  14. package/dist/models/commons/interfaces/base.interface.d.ts +2 -2
  15. package/dist/models/interfaces/session/session.interface.d.ts +2 -2
  16. package/dist/models/rewards/embedded/origin.embedded.schema.d.ts +2 -2
  17. package/dist/models/rewards/embedded/rewards.embedded.d.ts +2 -2
  18. package/dist/models/s3/embedded/file-log.embedded.d.ts +2 -2
  19. package/dist/models/s3/embedded/file-meta.embedded.d.ts +2 -2
  20. package/dist/models/s3/embedded/file-record.embedded.d.ts +2 -2
  21. package/dist/models/s3/embedded/file-state.embedded.d.ts +2 -2
  22. package/dist/models/s3/embedded/file.embedded.d.ts +2 -2
  23. package/dist/models/s3/embedded/initiator.embedded.d.ts +2 -2
  24. package/dist/models/s3/embedded/s3.embedded.d.ts +2 -2
  25. package/dist/models/session/interfaces/session-client-data.interface.d.ts +2 -2
  26. package/dist/models/util/embedded/address.embedded.d.ts +2 -2
  27. package/dist/models/util/embedded/author.embedded.d.ts +2 -2
  28. package/dist/models/util/embedded/contact.embedded.d.ts +2 -2
  29. package/dist/models/util/embedded/geo-location.embedded.d.ts +2 -2
  30. package/dist/models/util/embedded/i18n.embedded.d.ts +2 -2
  31. package/dist/models/util/embedded/record.embedded.d.ts +2 -2
  32. package/dist/models/util/interfaces/person.interface.d.ts +0 -7
  33. package/dist/models/util/interfaces/person.interface.js +0 -2
  34. package/dist/models/wrappers/rest-wrapper.class.js +1 -4
  35. package/dist/models/wrappers/rest-wrapper.class.js.map +1 -1
  36. package/dist/modules/core/index.d.ts +6 -0
  37. package/dist/modules/core/index.js +23 -0
  38. package/dist/modules/core/index.js.map +1 -0
  39. package/dist/modules/core/models/enums/feed-type.enum.d.ts +6 -0
  40. package/dist/modules/core/models/enums/feed-type.enum.js +11 -0
  41. package/dist/modules/core/models/enums/feed-type.enum.js.map +1 -0
  42. package/dist/modules/core/models/interfaces/feed-thin.interface.d.ts +9 -0
  43. package/dist/modules/core/models/interfaces/feed-thin.interface.js +3 -0
  44. package/dist/modules/core/models/interfaces/feed-thin.interface.js.map +1 -0
  45. package/dist/modules/core/models/interfaces/index.d.ts +4 -0
  46. package/dist/modules/core/models/interfaces/index.js +21 -0
  47. package/dist/modules/core/models/interfaces/index.js.map +1 -0
  48. package/dist/modules/core/models/interfaces/range.interface.d.ts +4 -0
  49. package/dist/modules/core/models/interfaces/range.interface.js +3 -0
  50. package/dist/modules/core/models/interfaces/range.interface.js.map +1 -0
  51. package/dist/modules/core/models/interfaces/ref.interface.d.ts +6 -0
  52. package/dist/modules/core/models/interfaces/ref.interface.js +3 -0
  53. package/dist/modules/core/models/interfaces/ref.interface.js.map +1 -0
  54. package/dist/modules/core/models/interfaces/scope.interface.d.ts +14 -0
  55. package/dist/modules/core/models/interfaces/scope.interface.js +3 -0
  56. package/dist/modules/core/models/interfaces/scope.interface.js.map +1 -0
  57. package/dist/modules/core/models/schemas/index.d.ts +2 -0
  58. package/dist/modules/core/models/schemas/index.js +19 -0
  59. package/dist/modules/core/models/schemas/index.js.map +1 -0
  60. package/dist/modules/core/models/schemas/range.embedded.d.ts +14 -0
  61. package/dist/modules/core/models/schemas/range.embedded.js +29 -0
  62. package/dist/modules/core/models/schemas/range.embedded.js.map +1 -0
  63. package/dist/modules/core/models/schemas/scope.embedded.d.ts +25 -0
  64. package/dist/modules/core/models/schemas/scope.embedded.js +63 -0
  65. package/dist/modules/core/models/schemas/scope.embedded.js.map +1 -0
  66. package/dist/modules/dictionary/index.d.ts +5 -0
  67. package/dist/modules/dictionary/index.js +22 -0
  68. package/dist/modules/dictionary/index.js.map +1 -0
  69. package/dist/modules/dictionary/models/dtos/dictionary-list.dto.d.ts +10 -0
  70. package/dist/modules/dictionary/models/dtos/dictionary-list.dto.js +59 -0
  71. package/dist/modules/dictionary/models/dtos/dictionary-list.dto.js.map +1 -0
  72. package/dist/modules/dictionary/models/interfaces/index.d.ts +27 -0
  73. package/dist/modules/dictionary/models/interfaces/index.js +3 -0
  74. package/dist/modules/dictionary/models/interfaces/index.js.map +1 -0
  75. package/dist/modules/dictionary/models/schemas/index.d.ts +21 -0
  76. package/dist/modules/dictionary/models/schemas/index.js +47 -0
  77. package/dist/modules/dictionary/models/schemas/index.js.map +1 -0
  78. package/dist/modules/dictionary/services/dictionary.service.d.ts +13 -14
  79. package/dist/modules/dictionary/services/dictionary.service.js +43 -96
  80. package/dist/modules/dictionary/services/dictionary.service.js.map +1 -1
  81. package/dist/modules/dmm/dmm.module.d.ts +2 -0
  82. package/dist/modules/dmm/dmm.module.js +26 -0
  83. package/dist/modules/dmm/dmm.module.js.map +1 -0
  84. package/dist/modules/dmm/index.d.ts +4 -0
  85. package/dist/modules/dmm/index.js +21 -0
  86. package/dist/modules/dmm/index.js.map +1 -0
  87. package/dist/modules/dmm/models/interfaces/index.d.ts +12 -0
  88. package/dist/modules/dmm/models/interfaces/index.js +3 -0
  89. package/dist/modules/dmm/models/interfaces/index.js.map +1 -0
  90. package/dist/modules/dmm/models/schemas/index.d.ts +23 -0
  91. package/dist/modules/dmm/models/schemas/index.js +58 -0
  92. package/dist/modules/dmm/models/schemas/index.js.map +1 -0
  93. package/dist/modules/dmm/services/dmm.service.d.ts +26 -0
  94. package/dist/modules/dmm/services/dmm.service.js +40 -0
  95. package/dist/modules/dmm/services/dmm.service.js.map +1 -0
  96. package/dist/modules/emis/emis.module.d.ts +2 -0
  97. package/dist/modules/emis/emis.module.js +24 -0
  98. package/dist/modules/emis/emis.module.js.map +1 -0
  99. package/dist/modules/emis/index.d.ts +3 -0
  100. package/dist/modules/emis/index.js +20 -0
  101. package/dist/modules/emis/index.js.map +1 -0
  102. package/dist/modules/emis/models/interfaces/emis.interface.d.ts +34 -0
  103. package/dist/modules/emis/models/interfaces/emis.interface.js +3 -0
  104. package/dist/modules/emis/models/interfaces/emis.interface.js.map +1 -0
  105. package/dist/modules/emis/services/emis.service.d.ts +8 -0
  106. package/dist/modules/emis/services/emis.service.js +37 -0
  107. package/dist/modules/emis/services/emis.service.js.map +1 -0
  108. package/dist/modules/iam/iam.module.d.ts +2 -0
  109. package/dist/modules/iam/iam.module.js +24 -0
  110. package/dist/modules/iam/iam.module.js.map +1 -0
  111. package/dist/modules/iam/index.d.ts +5 -0
  112. package/dist/modules/iam/index.js +22 -0
  113. package/dist/modules/iam/index.js.map +1 -0
  114. package/dist/modules/iam/models/enums/index.d.ts +6 -0
  115. package/dist/modules/iam/models/enums/index.js +11 -0
  116. package/dist/modules/iam/models/enums/index.js.map +1 -0
  117. package/dist/modules/iam/models/interfaces/index.d.ts +101 -0
  118. package/dist/modules/iam/models/interfaces/index.js +3 -0
  119. package/dist/modules/iam/models/interfaces/index.js.map +1 -0
  120. package/dist/modules/iam/models/schemas/embedded/person.embedded.d.ts +19 -0
  121. package/dist/modules/iam/models/schemas/embedded/person.embedded.js +41 -0
  122. package/dist/modules/iam/models/schemas/embedded/person.embedded.js.map +1 -0
  123. package/dist/modules/iam/models/schemas/embedded/user-person-info.embedded.d.ts +17 -0
  124. package/dist/modules/iam/models/schemas/embedded/user-person-info.embedded.js +31 -0
  125. package/dist/modules/iam/models/schemas/embedded/user-person-info.embedded.js.map +1 -0
  126. package/dist/modules/iam/models/schemas/index.d.ts +2 -0
  127. package/dist/modules/iam/models/schemas/index.js +19 -0
  128. package/dist/modules/iam/models/schemas/index.js.map +1 -0
  129. package/dist/modules/iam/services/iam.service.d.ts +9 -0
  130. package/dist/modules/iam/services/iam.service.js +40 -0
  131. package/dist/modules/iam/services/iam.service.js.map +1 -0
  132. package/dist/modules/otp/index.d.ts +3 -0
  133. package/dist/modules/otp/index.js +20 -0
  134. package/dist/modules/otp/index.js.map +1 -0
  135. package/dist/modules/otp/models/interfaces/index.d.ts +18 -0
  136. package/dist/modules/otp/models/interfaces/index.js +3 -0
  137. package/dist/modules/otp/models/interfaces/index.js.map +1 -0
  138. package/dist/modules/otp/otp.module.d.ts +2 -0
  139. package/dist/modules/otp/otp.module.js +24 -0
  140. package/dist/modules/otp/otp.module.js.map +1 -0
  141. package/dist/modules/otp/services/otp.service.d.ts +11 -0
  142. package/dist/modules/otp/services/otp.service.js +48 -0
  143. package/dist/modules/otp/services/otp.service.js.map +1 -0
  144. package/dist/modules/session/functions/index.d.ts +5 -0
  145. package/dist/modules/session/functions/index.js +28 -0
  146. package/dist/modules/session/functions/index.js.map +1 -0
  147. package/dist/modules/session/guards/permission.guard.d.ts +15 -0
  148. package/dist/modules/session/guards/permission.guard.js +118 -0
  149. package/dist/modules/session/guards/permission.guard.js.map +1 -0
  150. package/dist/modules/session/guards/user.guard.d.ts +12 -0
  151. package/dist/modules/session/guards/user.guard.js +88 -0
  152. package/dist/modules/session/guards/user.guard.js.map +1 -0
  153. package/dist/modules/session/index.d.ts +9 -0
  154. package/dist/modules/session/index.js +26 -0
  155. package/dist/modules/session/index.js.map +1 -0
  156. package/dist/modules/session/models/classes/index.d.ts +3 -0
  157. package/dist/modules/session/models/classes/index.js +7 -0
  158. package/dist/modules/session/models/classes/index.js.map +1 -0
  159. package/dist/modules/session/models/interfaces/index.d.ts +54 -0
  160. package/dist/modules/session/models/interfaces/index.js +7 -0
  161. package/dist/modules/session/models/interfaces/index.js.map +1 -0
  162. package/dist/modules/session/reflectors/permission.reflector.d.ts +2 -0
  163. package/dist/modules/session/reflectors/permission.reflector.js +6 -0
  164. package/dist/modules/session/reflectors/permission.reflector.js.map +1 -0
  165. package/dist/modules/session/services/redis.service.d.ts +16 -0
  166. package/dist/modules/session/services/redis.service.js +94 -0
  167. package/dist/modules/session/services/redis.service.js.map +1 -0
  168. package/dist/modules/session/services/session-v1.service.d.ts +12 -0
  169. package/dist/modules/session/services/session-v1.service.js +36 -0
  170. package/dist/modules/session/services/session-v1.service.js.map +1 -0
  171. package/dist/modules/session/services/session-v2.service.d.ts +17 -0
  172. package/dist/modules/session/services/session-v2.service.js +102 -0
  173. package/dist/modules/session/services/session-v2.service.js.map +1 -0
  174. package/dist/modules/session/session.module.d.ts +2 -0
  175. package/dist/modules/session/session.module.js +27 -0
  176. package/dist/modules/session/session.module.js.map +1 -0
  177. package/dist/modules/storage/index.d.ts +4 -0
  178. package/dist/modules/storage/index.js +21 -0
  179. package/dist/modules/storage/index.js.map +1 -0
  180. package/dist/modules/storage/models/inerfaces/index.d.ts +7 -0
  181. package/dist/modules/storage/models/inerfaces/index.js +3 -0
  182. package/dist/modules/storage/models/inerfaces/index.js.map +1 -0
  183. package/dist/modules/storage/models/schemas/index.d.ts +36 -0
  184. package/dist/modules/storage/models/schemas/index.js +62 -0
  185. package/dist/modules/storage/models/schemas/index.js.map +1 -0
  186. package/dist/modules/storage/services/storage.service.d.ts +9 -0
  187. package/dist/modules/storage/services/storage.service.js +35 -0
  188. package/dist/modules/storage/services/storage.service.js.map +1 -0
  189. package/dist/modules/storage/storage.module.d.ts +2 -0
  190. package/dist/modules/storage/storage.module.js +24 -0
  191. package/dist/modules/storage/storage.module.js.map +1 -0
  192. package/dist/pipes/index.d.ts +13 -0
  193. package/dist/pipes/index.js +64 -0
  194. package/dist/pipes/index.js.map +1 -0
  195. package/dist/pipes/validate-mongo-id.pipe.js.map +1 -1
  196. package/dist/tsconfig.tsbuildinfo +1 -1
  197. package/package.json +16 -18
  198. package/src/clients/index.ts +3 -0
  199. package/src/clients/rest.client.ts +112 -0
  200. package/src/clients/session.client.ts +10 -20
  201. package/src/index.ts +36 -164
  202. package/src/models/commons/interfaces/base.interface.ts +2 -2
  203. package/src/models/interfaces/session/session.interface.ts +6 -6
  204. package/src/models/session/interfaces/session-client-data.interface.ts +2 -2
  205. package/src/models/util/interfaces/person.interface.ts +1 -7
  206. package/src/models/wrappers/rest-wrapper.class.ts +1 -4
  207. package/src/modules/core/index.ts +6 -0
  208. package/src/modules/core/models/enums/feed-type.enum.ts +6 -0
  209. package/src/modules/core/models/interfaces/feed-thin.interface.ts +10 -0
  210. package/src/modules/core/models/interfaces/index.ts +4 -0
  211. package/src/modules/core/models/interfaces/range.interface.ts +4 -0
  212. package/src/modules/core/models/interfaces/ref.interface.ts +7 -0
  213. package/src/modules/core/models/interfaces/scope.interface.ts +15 -0
  214. package/src/modules/core/models/schemas/index.ts +2 -0
  215. package/src/modules/core/models/schemas/range.embedded.ts +13 -0
  216. package/src/modules/core/models/schemas/scope.embedded.ts +41 -0
  217. package/src/modules/dictionary/index.ts +5 -0
  218. package/src/modules/dictionary/{dtos → models/dtos}/dictionary-list.dto.ts +9 -16
  219. package/src/modules/dictionary/models/interfaces/index.ts +31 -0
  220. package/src/modules/dictionary/models/schemas/index.ts +28 -0
  221. package/src/modules/dictionary/services/dictionary.service.ts +55 -149
  222. package/src/modules/dmm/dmm.module.ts +13 -0
  223. package/src/modules/dmm/index.ts +4 -0
  224. package/src/modules/dmm/models/interfaces/index.ts +13 -0
  225. package/src/modules/dmm/models/schemas/index.ts +36 -0
  226. package/src/modules/dmm/services/dmm.service.ts +33 -0
  227. package/src/modules/emis/emis.module.ts +11 -0
  228. package/src/modules/emis/index.ts +3 -0
  229. package/src/modules/emis/models/interfaces/emis.interface.ts +37 -0
  230. package/src/modules/emis/services/emis.service.ts +30 -0
  231. package/src/modules/iam/iam.module.ts +11 -0
  232. package/src/modules/iam/index.ts +5 -0
  233. package/src/modules/iam/models/enums/index.ts +6 -0
  234. package/src/modules/iam/models/interfaces/index.ts +114 -0
  235. package/src/{models/util → modules/iam/models/schemas}/embedded/person.embedded.ts +5 -1
  236. package/src/modules/iam/models/schemas/embedded/user-person-info.embedded.ts +16 -0
  237. package/src/modules/iam/models/schemas/index.ts +2 -0
  238. package/src/modules/iam/services/iam.service.ts +35 -0
  239. package/src/modules/otp/index.ts +3 -0
  240. package/src/modules/otp/models/interfaces/index.ts +20 -0
  241. package/src/modules/otp/otp.module.ts +11 -0
  242. package/src/modules/otp/services/otp.service.ts +48 -0
  243. package/src/modules/session/functions/index.ts +24 -0
  244. package/src/modules/session/guards/permission.guard.ts +122 -0
  245. package/src/modules/session/guards/user.guard.ts +88 -0
  246. package/src/modules/session/index.ts +9 -0
  247. package/src/modules/session/models/classes/index.ts +3 -0
  248. package/src/modules/session/models/interfaces/index.ts +57 -0
  249. package/src/modules/{cache/reflector → session/reflectors}/permission.reflector.ts +1 -1
  250. package/src/modules/{cache → session}/services/redis.service.ts +23 -20
  251. package/src/modules/session/services/session-v1.service.ts +30 -0
  252. package/src/modules/session/services/session-v2.service.ts +113 -0
  253. package/src/modules/session/session.module.ts +14 -0
  254. package/src/modules/storage/index.ts +4 -0
  255. package/src/modules/storage/models/inerfaces/index.ts +8 -0
  256. package/src/modules/storage/models/schemas/index.ts +42 -0
  257. package/src/modules/storage/services/storage.service.ts +29 -0
  258. package/src/modules/storage/storage.module.ts +11 -0
  259. package/src/pipes/index.ts +49 -0
  260. package/src/pipes/validate-mongo-id.pipe.ts +1 -3
  261. package/src/functions/session/keyword.function.ts +0 -14
  262. package/src/models/dictionary/embedded/dictionary.embedded.ts +0 -31
  263. package/src/models/dictionary/interfaces/dictionary-embedded.interface.ts +0 -12
  264. package/src/models/dictionary/interfaces/dictionary-event.interface.ts +0 -6
  265. package/src/models/dictionary/interfaces/dictionary-setting.interface.ts +0 -5
  266. package/src/models/dictionary/interfaces/dictionary.interface.ts +0 -13
  267. package/src/models/session/interfaces/session-user-data.interface.ts +0 -16
  268. package/src/models/um/enums/client-type.enum.ts +0 -6
  269. package/src/models/um/enums/permission-include-strategy.enum.ts +0 -5
  270. package/src/models/um/interfaces/client.interface.ts +0 -23
  271. package/src/models/um/interfaces/credentials.interface.ts +0 -4
  272. package/src/models/um/interfaces/permission.interface.ts +0 -11
  273. package/src/models/um/interfaces/prof-info.interface.ts +0 -5
  274. package/src/models/um/interfaces/role.interface.ts +0 -14
  275. package/src/models/um/interfaces/user-client.interface.ts +0 -10
  276. package/src/models/um/interfaces/user.interface.ts +0 -20
  277. package/src/models/wrappers/permission-guard-config.wrapper.ts +0 -5
  278. package/src/modules/cache/cache.module.ts +0 -13
  279. package/src/modules/cache/guards/permission.guard.ts +0 -109
  280. package/src/modules/cache/services/session.service.ts +0 -23
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scope.embedded.js","sourceRoot":"","sources":["../../../../../src/modules/core/models/schemas/scope.embedded.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAE/D,qDAAkD;AAElD,oDAAmF;AAG5E,IAAM,KAAK,GAAX,MAAM,KAAK;CA8BjB,CAAA;AA9BY,sBAAK;AAEhB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,+BAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;uCAC3C;AAGpB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;sCACrC;AAGlB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,qCAAwB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;wCACzC;AAGhC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,qCAAwB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;4CACrC;AAGpC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,qCAAwB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;0CACvC;AAGlC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,qCAAwB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;8CACnC;AAGtC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,qCAAwB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;uCAC1C;AAG/B;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,qCAAwB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qCAC5C;AAG7B;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;uCACtC;AAGlB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,qCAAwB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;mCAC9C;gBA7BhB,KAAK;IADjB,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,KAAK,CA8BjB;AAEY,QAAA,WAAW,GAAG,wBAAa,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './models/dtos/dictionary-list.dto';
2
+ export * from './services/dictionary.service';
3
+ export * from './models/interfaces';
4
+ export * from './models/schemas';
5
+ export * from './dictionary.module';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./models/dtos/dictionary-list.dto"), exports);
18
+ __exportStar(require("./services/dictionary.service"), exports);
19
+ __exportStar(require("./models/interfaces"), exports);
20
+ __exportStar(require("./models/schemas"), exports);
21
+ __exportStar(require("./dictionary.module"), exports);
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/dictionary/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAClD,gEAA8C;AAC9C,sDAAoC;AACpC,mDAAiC;AACjC,sDAAoC"}
@@ -0,0 +1,10 @@
1
+ import { RecordState } from '../../../../models/util/enums/record-state.enum';
2
+ export declare class DictionaryListDTO {
3
+ rootOnly?: boolean;
4
+ keyword?: string;
5
+ title?: string;
6
+ parentId?: string;
7
+ originId?: string;
8
+ recordStates?: RecordState[];
9
+ ids?: string[];
10
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DictionaryListDTO = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const record_state_enum_1 = require("../../../../models/util/enums/record-state.enum");
16
+ const toStringArray = (value) => {
17
+ return typeof value === 'string' ? [value] : value;
18
+ };
19
+ class DictionaryListDTO {
20
+ }
21
+ exports.DictionaryListDTO = DictionaryListDTO;
22
+ __decorate([
23
+ (0, class_validator_1.IsOptional)(),
24
+ (0, class_validator_1.IsBoolean)(),
25
+ __metadata("design:type", Boolean)
26
+ ], DictionaryListDTO.prototype, "rootOnly", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsOptional)(),
29
+ (0, class_validator_1.IsString)(),
30
+ __metadata("design:type", String)
31
+ ], DictionaryListDTO.prototype, "keyword", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsOptional)(),
34
+ (0, class_validator_1.IsString)(),
35
+ __metadata("design:type", String)
36
+ ], DictionaryListDTO.prototype, "title", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsOptional)(),
39
+ (0, class_validator_1.IsMongoId)(),
40
+ __metadata("design:type", String)
41
+ ], DictionaryListDTO.prototype, "parentId", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsOptional)(),
44
+ (0, class_validator_1.IsMongoId)(),
45
+ __metadata("design:type", String)
46
+ ], DictionaryListDTO.prototype, "originId", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsOptional)(),
49
+ (0, class_validator_1.ArrayUnique)(),
50
+ (0, class_validator_1.IsEnum)(record_state_enum_1.RecordState, { each: true }),
51
+ (0, class_transformer_1.Transform)(({ value }) => toStringArray(value)),
52
+ __metadata("design:type", Array)
53
+ ], DictionaryListDTO.prototype, "recordStates", void 0);
54
+ __decorate([
55
+ (0, class_validator_1.IsOptional)(),
56
+ (0, class_validator_1.IsMongoId)({ each: true }),
57
+ __metadata("design:type", Array)
58
+ ], DictionaryListDTO.prototype, "ids", void 0);
59
+ //# sourceMappingURL=dictionary-list.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dictionary-list.dto.js","sourceRoot":"","sources":["../../../../../src/modules/dictionary/models/dtos/dictionary-list.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yDAA8C;AAC9C,qDAAkG;AAClG,uFAA8E;AAE9E,MAAM,aAAa,GAAG,CAAC,KAAwB,EAAE,EAAE;IACjD,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACrD,CAAC,CAAC;AAEF,MAAa,iBAAiB;CA8B7B;AA9BD,8CA8BC;AA3BC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;mDACO;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;kDACM;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;gDACI;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;mDACM;AAIlB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,GAAE;;mDACM;AAMlB;IAJC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAW,GAAE;IACb,IAAA,wBAAM,EAAC,+BAAW,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACnC,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;;uDAClB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;8CACX"}
@@ -0,0 +1,27 @@
1
+ import { IBase } from '../../../../models/commons/interfaces/base.interface';
2
+ import { ResourceType } from '../../../../models/emis/enums/resource-type.enum';
3
+ import { II18n } from '../../../../models/util/interfaces/i18n.interface';
4
+ import { Types } from 'mongoose';
5
+ export interface IDictionaryEvent {
6
+ event: 'create' | 'update' | 'delete';
7
+ data: IDictionary;
8
+ }
9
+ export interface IDictionarySetting {
10
+ allowedTypes: ResourceType[];
11
+ }
12
+ export interface IDictionary extends IBase {
13
+ keyword: string;
14
+ originIds: Types.ObjectId[] | string[];
15
+ parentIds: Types.ObjectId[] | string[] | IDictionary[];
16
+ title: II18n;
17
+ settings: IDictionarySetting;
18
+ metas: Map<string, string>;
19
+ }
20
+ export interface IDictionaryEmbedded {
21
+ id: Types.ObjectId | string;
22
+ keyword: string;
23
+ originIds: Types.ObjectId[] | string[];
24
+ parentIds: Types.ObjectId[] | string[] | IDictionaryEmbedded[];
25
+ title: II18n;
26
+ metas: Map<string, string>;
27
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dictionary/models/interfaces/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,21 @@
1
+ import { HydratedDocument, Types } from 'mongoose';
2
+ import { I18n } from '../../../../models/util/embedded/i18n.embedded';
3
+ import { IDictionaryEmbedded } from '../interfaces';
4
+ export declare class DictionaryEmbedded implements IDictionaryEmbedded {
5
+ id: Types.ObjectId | string;
6
+ originIds: Types.ObjectId[] | string[];
7
+ parentIds: Types.ObjectId[] | string[];
8
+ title: I18n;
9
+ metas: Map<string, string>;
10
+ keyword: string;
11
+ }
12
+ export declare const DictionaryEmbeddedSchema: import("mongoose").Schema<DictionaryEmbedded, import("mongoose").Model<DictionaryEmbedded, any, any, any, import("mongoose").Document<unknown, any, DictionaryEmbedded, any, {}> & DictionaryEmbedded & {
13
+ _id: Types.ObjectId;
14
+ } & {
15
+ __v: number;
16
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DictionaryEmbedded, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<DictionaryEmbedded>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<DictionaryEmbedded> & {
17
+ _id: Types.ObjectId;
18
+ } & {
19
+ __v: number;
20
+ }>;
21
+ export type DictionaryEmbeddedDocument = HydratedDocument<DictionaryEmbedded>;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DictionaryEmbeddedSchema = exports.DictionaryEmbedded = void 0;
13
+ const mongoose_1 = require("@nestjs/mongoose");
14
+ const mongoose_2 = require("mongoose");
15
+ const i18n_embedded_1 = require("../../../../models/util/embedded/i18n.embedded");
16
+ let DictionaryEmbedded = class DictionaryEmbedded {
17
+ };
18
+ exports.DictionaryEmbedded = DictionaryEmbedded;
19
+ __decorate([
20
+ (0, mongoose_1.Prop)({ type: mongoose_2.SchemaTypes.ObjectId, required: false, default: null }),
21
+ __metadata("design:type", Object)
22
+ ], DictionaryEmbedded.prototype, "id", void 0);
23
+ __decorate([
24
+ (0, mongoose_1.Prop)({ type: [mongoose_2.SchemaTypes.ObjectId], required: true, default: [] }),
25
+ __metadata("design:type", Array)
26
+ ], DictionaryEmbedded.prototype, "originIds", void 0);
27
+ __decorate([
28
+ (0, mongoose_1.Prop)({ type: [mongoose_2.SchemaTypes.ObjectId], required: false, default: [] }),
29
+ __metadata("design:type", Array)
30
+ ], DictionaryEmbedded.prototype, "parentIds", void 0);
31
+ __decorate([
32
+ (0, mongoose_1.Prop)({ type: i18n_embedded_1.I18nSchema, required: true }),
33
+ __metadata("design:type", i18n_embedded_1.I18n)
34
+ ], DictionaryEmbedded.prototype, "title", void 0);
35
+ __decorate([
36
+ (0, mongoose_1.Prop)({ type: Map, of: String, default: new Map() }),
37
+ __metadata("design:type", Map)
38
+ ], DictionaryEmbedded.prototype, "metas", void 0);
39
+ __decorate([
40
+ (0, mongoose_1.Prop)({ type: String, required: false, default: null }),
41
+ __metadata("design:type", String)
42
+ ], DictionaryEmbedded.prototype, "keyword", void 0);
43
+ exports.DictionaryEmbedded = DictionaryEmbedded = __decorate([
44
+ (0, mongoose_1.Schema)({ _id: false })
45
+ ], DictionaryEmbedded);
46
+ exports.DictionaryEmbeddedSchema = mongoose_1.SchemaFactory.createForClass(DictionaryEmbedded);
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dictionary/models/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAgE;AAChE,kFAAkF;AAI3E,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAkB9B,CAAA;AAlBY,gDAAkB;AAE7B;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,sBAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;8CACzC;AAG5B;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,sBAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qDAC7B;AAGvC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,sBAAW,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qDAC9B;AAGvC;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,0BAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACpC,oBAAI;iDAAC;AAGZ;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;8BAC7C,GAAG;iDAAiB;AAG3B;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;mDACvC;6BAjBL,kBAAkB;IAD9B,IAAA,iBAAM,EAAC,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;GACV,kBAAkB,CAkB9B;AAEY,QAAA,wBAAwB,GAAG,wBAAa,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC"}
@@ -1,18 +1,17 @@
1
- import { OnModuleInit } from '@nestjs/common';
2
1
  import { ConfigService } from '@nestjs/config';
3
- import { IDictionary } from '../../../models/dictionary/interfaces/dictionary.interface';
2
+ import { IDictionary, IDictionaryEmbedded } from '../models/interfaces';
4
3
  import { ObjectId } from 'mongoose';
5
- import { DictionaryListDTO } from '../dtos/dictionary-list.dto';
6
- export declare class DictionaryService implements OnModuleInit {
7
- private _configService;
8
- private dctUrl;
9
- private _instance;
4
+ import { DictionaryListDTO } from '../models/dtos/dictionary-list.dto';
5
+ export declare class DictionaryService {
6
+ private readonly _configService;
7
+ private readonly _client;
10
8
  constructor(_configService: ConfigService);
11
- validateRequest: () => void;
12
- onModuleInit(): void;
13
- findById(id: string | ObjectId): Promise<IDictionary>;
14
- getEmbededDictionary(dictionary: any): any;
15
- getEmbededDictionaries(dictionaries: any): any;
16
- findByIds(ids: string[] | ObjectId[], embedded: true): Promise<any>;
17
- list(filters: DictionaryListDTO, embedded: true): Promise<any>;
9
+ fetchActiveById(id: string | ObjectId): Promise<IDictionary>;
10
+ fetchActivesByIds(ids: string[] | ObjectId[]): Promise<IDictionary[]>;
11
+ fetchActiveByKeyword(keyword: string): Promise<IDictionary>;
12
+ fetchActiveByOriginId(originId: string): Promise<IDictionary>;
13
+ fetchList(filters: DictionaryListDTO): Promise<IDictionary[]>;
14
+ toEmbedded(dictionary: IDictionary): IDictionaryEmbedded;
15
+ private _validateListDTO;
16
+ private _extractParentIds;
18
17
  }
@@ -12,117 +12,64 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.DictionaryService = void 0;
13
13
  const common_1 = require("@nestjs/common");
14
14
  const config_1 = require("@nestjs/config");
15
- const rest_wrapper_class_1 = require("../../../models/wrappers/rest-wrapper.class");
15
+ const mongoose_1 = require("mongoose");
16
16
  const qs = require("qs");
17
- const axios_1 = require("axios");
18
- const dictionary_list_dto_1 = require("../dtos/dictionary-list.dto");
17
+ const dictionary_list_dto_1 = require("../models/dtos/dictionary-list.dto");
19
18
  const class_transformer_1 = require("class-transformer");
20
19
  const class_validator_1 = require("class-validator");
21
- const BASE_URL = 'EH_DICTIONARIES__REST__BASE_URL';
20
+ const clients_1 = require("../../../clients");
22
21
  let DictionaryService = class DictionaryService {
23
22
  constructor(_configService) {
24
23
  this._configService = _configService;
25
- this.validateRequest = () => {
26
- if (!this.dctUrl) {
27
- throw new Error(`${BASE_URL} is not defined in the configuration`);
28
- }
29
- };
30
- this._instance = axios_1.default.create({
31
- baseURL: this._configService.get(BASE_URL),
32
- timeout: 60000,
24
+ this._client = new clients_1.RestClient({
25
+ name: 'DICTIONARY_SERVICE',
26
+ baseUrl: this._configService.get('EH_DICTIONARIES__REST__BASE_URL', ''),
27
+ timeout: 30000,
28
+ accessToken: this._configService.get('EH_DICTIONARIES__REST__ACCESS_TOKEN', ''),
33
29
  });
34
30
  }
35
- onModuleInit() {
36
- this.dctUrl = this._configService.get(BASE_URL);
31
+ async fetchActiveById(id) {
32
+ return this._client.get(`/internals/v1/dictionaries/${id}`);
37
33
  }
38
- async findById(id) {
39
- this.validateRequest();
40
- try {
41
- const response = await this._instance.get(`${this.dctUrl}/externals/v1/dictionaries/${id}`);
42
- if (response.data.errors) {
43
- if (response.data.errors.length === 0) {
44
- throw new Error('UNKNOWN_ERROR');
45
- }
46
- throw new Error(response.data.errors[0].keyword);
47
- }
48
- return response.data.result.data;
49
- }
50
- catch (error) {
51
- if (error instanceof rest_wrapper_class_1.RESTError) {
52
- throw new Error(`DICTIONARY__API_ERROR. keyword: ${error.keyword}. statusCode: ${error.statusCode}`);
53
- }
54
- throw new Error(`DICTIONARY__API_ERROR: ${error.message}`);
55
- }
34
+ async fetchActivesByIds(ids) {
35
+ const requestBody = { data: { ids } };
36
+ return this._client.post(`/internals/v1/dictionaries/by-ids`, requestBody);
56
37
  }
57
- getEmbededDictionary(dictionary) {
58
- return this.getEmbededDictionaries([dictionary])[0];
38
+ async fetchActiveByKeyword(keyword) {
39
+ return this._client.get(`/internals/v1/dictionaries/by-keyword/${keyword}`);
59
40
  }
60
- getEmbededDictionaries(dictionaries) {
61
- return dictionaries.map((v) => {
62
- return {
63
- originId: null,
64
- dictionaryId: v._id,
65
- title: v.title,
66
- keyword: v.keyword,
67
- record: v.record.state,
68
- };
69
- });
41
+ async fetchActiveByOriginId(originId) {
42
+ return this._client.get(`/internals/v1/dictionaries/by-origin/${originId}`);
70
43
  }
71
- async findByIds(ids, embedded) {
72
- this.validateRequest();
73
- const query = qs.stringify({
74
- ids,
75
- });
76
- try {
77
- const response = await this._instance.get(`/externals/v1/dictionaries?${query}`);
78
- if (response.data.errors) {
79
- if (response.data.errors.length === 0) {
80
- throw new Error('UNKNOWN_ERROR');
81
- }
82
- throw new Error(response.data.errors[0].keyword);
83
- }
84
- if (embedded) {
85
- return this.getEmbededDictionaries(response.data.result.data);
86
- }
87
- return response.data.result.data;
88
- }
89
- catch (error) {
90
- if (error instanceof rest_wrapper_class_1.RESTError) {
91
- throw new Error(`DICTIONARY__API_ERROR. keyword: ${error.keyword}. statusCode: ${error.statusCode}`);
92
- }
93
- if (error.data && error.data.errors) {
94
- throw new Error(`DICTIONARY__API_ERROR. keyword: ${error.data.errors[0].keyword}. statusCode: ${error.statusCode}`);
95
- }
96
- throw new Error(`DICTIONARY__API_ERROR: ${error.message}`);
97
- }
44
+ async fetchList(filters) {
45
+ const query = qs.stringify(filters);
46
+ await this._validateListDTO(filters);
47
+ return this._client.get(`/internals/v1/dictionaries?${query}`);
98
48
  }
99
- async list(filters, embedded) {
100
- this.validateRequest();
49
+ toEmbedded(dictionary) {
50
+ return {
51
+ id: dictionary._id,
52
+ originIds: dictionary.originIds,
53
+ parentIds: this._extractParentIds(dictionary.parentIds),
54
+ title: dictionary.title,
55
+ metas: dictionary.metas,
56
+ keyword: dictionary.keyword,
57
+ };
58
+ }
59
+ async _validateListDTO(filters) {
101
60
  const filtersInstance = (0, class_transformer_1.plainToInstance)(dictionary_list_dto_1.DictionaryListDTO, filters);
102
61
  await (0, class_validator_1.validateOrReject)(filtersInstance);
103
- const query = qs.stringify(filters);
104
- try {
105
- const response = await this._instance.get(`/externals/v1/dictionaries?${query}`);
106
- if (response.data.errors) {
107
- if (response.data.errors.length === 0) {
108
- throw new Error('UNKNOWN_ERROR');
109
- }
110
- throw new Error(response.data.errors[0].keyword);
111
- }
112
- if (embedded) {
113
- return this.getEmbededDictionaries(response.data.result.data);
114
- }
115
- return response.data.result.data;
116
- }
117
- catch (error) {
118
- if (error instanceof rest_wrapper_class_1.RESTError) {
119
- throw new Error(`DICTIONARY__API_ERROR. keyword: ${error.keyword}. statusCode: ${error.statusCode}`);
120
- }
121
- if (error.data && error.data.errors) {
122
- throw new Error(`DICTIONARY__API_ERROR. keyword: ${error.data.errors[0].keyword}. statusCode: ${error.statusCode}`);
123
- }
124
- throw new Error(`DICTIONARY__API_ERROR: ${error.message}`);
125
- }
62
+ }
63
+ _extractParentIds(parentIds) {
64
+ if (!parentIds || !parentIds.length)
65
+ return [];
66
+ return parentIds.map((item) => {
67
+ if (typeof item === 'string')
68
+ return item;
69
+ if (item instanceof mongoose_1.Types.ObjectId)
70
+ return item.toString();
71
+ return item._id.toString();
72
+ });
126
73
  }
127
74
  };
128
75
  exports.DictionaryService = DictionaryService;
@@ -1 +1 @@
1
- {"version":3,"file":"dictionary.service.js","sourceRoot":"","sources":["../../../../src/modules/dictionary/services/dictionary.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0D;AAC1D,2CAA+C;AAE/C,oFAGqD;AAGrD,yBAAyB;AACzB,iCAA6C;AAE7C,qEAAgE;AAChE,yDAAoD;AACpD,qDAAmD;AAEnD,MAAM,QAAQ,GAAG,iCAAiC,CAAC;AAE5C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAI5B,YAAoB,cAA6B;QAA7B,mBAAc,GAAd,cAAc,CAAe;QAOjD,oBAAe,GAAG,GAAG,EAAE;YACrB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACjB,MAAM,IAAI,KAAK,CAAC,GAAG,QAAQ,sCAAsC,CAAC,CAAC;YACrE,CAAC;QACH,CAAC,CAAC;QAVA,IAAI,CAAC,SAAS,GAAG,eAAK,CAAC,MAAM,CAAC;YAC5B,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC;YAC1C,OAAO,EAAE,KAAK;SACf,CAAC,CAAC;IACL,CAAC;IAQD,YAAY;QACV,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;IAOM,KAAK,CAAC,QAAQ,CAAC,EAAqB;QACzC,IAAI,CAAC,eAAe,EAAE,CAAC;QAEvB,IAAI,CAAC;YAC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C,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBACpC,MAAM,IAAI,KAAK,CACb,mCAAmC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,iBAAiB,KAAK,CAAC,UAAU,EAAE,CACnG,CAAC;YACJ,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,0BAA0B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;CACF,CAAA;AA1JY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAKyB,sBAAa;GAJtC,iBAAiB,CA0J7B"}
1
+ {"version":3,"file":"dictionary.service.js","sourceRoot":"","sources":["../../../../src/modules/dictionary/services/dictionary.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAE/C,uCAA2C;AAC3C,yBAAyB;AACzB,4EAAuE;AACvE,yDAAoD;AACpD,qDAAmD;AACnD,8CAA8C;AAGvC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAM5B,YAA6B,cAA6B;QAA7B,mBAAc,GAAd,cAAc,CAAe;QACxD,IAAI,CAAC,OAAO,GAAG,IAAI,oBAAU,CAAC;YAC5B,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,iCAAiC,EAAE,EAAE,CAAC;YACvE,OAAO,EAAE,KAAK;YACd,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,qCAAqC,EAAE,EAAE,CAAC;SAChF,CAAC,CAAC;IACL,CAAC;IAIM,KAAK,CAAC,eAAe,CAAC,EAAqB;QAChD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAc,8BAA8B,EAAE,EAAE,CAAC,CAAC;IAC3E,CAAC;IAEM,KAAK,CAAC,iBAAiB,CAAC,GAA0B;QACvD,MAAM,WAAW,GAAG,EAAE,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M;YAAE,OAAO,EAAE,CAAC;QAC/C,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,IAA2C,EAAE,EAAE;YACnE,IAAI,OAAO,IAAI,KAAK,QAAQ;gBAAE,OAAO,IAAI,CAAC;YAC1C,IAAI,IAAI,YAAY,gBAAK,CAAC,QAAQ;gBAAE,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;YAC3D,OAAQ,IAAoB,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC;CAEF,CAAA;AAnEY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAOkC,sBAAa;GAN/C,iBAAiB,CAmE7B"}
@@ -0,0 +1,2 @@
1
+ export declare class DMMModule {
2
+ }
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DMMModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const mongoose_1 = require("@nestjs/mongoose");
12
+ const dmm_service_1 = require("./services/dmm.service");
13
+ const schemas_1 = require("./models/schemas");
14
+ let DMMModule = class DMMModule {
15
+ };
16
+ exports.DMMModule = DMMModule;
17
+ exports.DMMModule = DMMModule = __decorate([
18
+ (0, common_1.Module)({
19
+ imports: [
20
+ mongoose_1.MongooseModule.forFeature([{ name: schemas_1.DeadMessage.name, schema: schemas_1.DeadMessageSchema }]),
21
+ ],
22
+ providers: [dmm_service_1.DMMService],
23
+ exports: [dmm_service_1.DMMService],
24
+ })
25
+ ], DMMModule);
26
+ //# sourceMappingURL=dmm.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dmm.module.js","sourceRoot":"","sources":["../../../src/modules/dmm/dmm.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,+CAAkD;AAClD,wDAAoD;AACpD,8CAAkE;AAS3D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAPrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc,CAAC,UAAU,CAAC,CAAC,EAAE,IAAI,EAAE,qBAAW,CAAC,IAAI,EAAE,MAAM,EAAE,2BAAiB,EAAE,CAAC,CAAC;SACnF;QACD,SAAS,EAAE,CAAC,wBAAU,CAAC;QACvB,OAAO,EAAE,CAAC,wBAAU,CAAC;KACtB,CAAC;GACW,SAAS,CAAG"}
@@ -0,0 +1,4 @@
1
+ export * from './services/dmm.service';
2
+ export * from './models/interfaces';
3
+ export * from './models/schemas';
4
+ export * from './dmm.module';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./services/dmm.service"), exports);
18
+ __exportStar(require("./models/interfaces"), exports);
19
+ __exportStar(require("./models/schemas"), exports);
20
+ __exportStar(require("./dmm.module"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/dmm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,sDAAoC;AACpC,mDAAiC;AACjC,+CAA6B"}
@@ -0,0 +1,12 @@
1
+ import { Types } from 'mongoose';
2
+ export interface IDeadMessage {
3
+ _id?: Types.ObjectId | string;
4
+ topic: string;
5
+ key?: string;
6
+ headers?: Map<string, string>;
7
+ message?: string;
8
+ ex?: string;
9
+ resolved: boolean;
10
+ createdAt: Date;
11
+ resolvedAt?: Date;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dmm/models/interfaces/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import { HydratedDocument, Types } from 'mongoose';
2
+ import { IDeadMessage } from '../interfaces';
3
+ export declare class DeadMessage implements IDeadMessage {
4
+ _id: Types.ObjectId | string;
5
+ topic: string;
6
+ key: string;
7
+ headers: Map<string, string>;
8
+ message: string;
9
+ ex?: string;
10
+ resolved: boolean;
11
+ createdAt: Date;
12
+ resolvedAt: Date;
13
+ }
14
+ export declare const DeadMessageSchema: import("mongoose").Schema<DeadMessage, import("mongoose").Model<DeadMessage, any, any, any, import("mongoose").Document<unknown, any, DeadMessage, any, {}> & DeadMessage & Required<{
15
+ _id: string | Types.ObjectId;
16
+ }> & {
17
+ __v: number;
18
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DeadMessage, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<DeadMessage>, {}, import("mongoose").DefaultSchemaOptions> & import("mongoose").FlatRecord<DeadMessage> & Required<{
19
+ _id: string | Types.ObjectId;
20
+ }> & {
21
+ __v: number;
22
+ }>;
23
+ export type DeadMessageDocument = HydratedDocument<DeadMessage>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DeadMessageSchema = exports.DeadMessage = void 0;
13
+ const mongoose_1 = require("@nestjs/mongoose");
14
+ const mongoose_2 = require("mongoose");
15
+ let DeadMessage = class DeadMessage {
16
+ };
17
+ exports.DeadMessage = DeadMessage;
18
+ __decorate([
19
+ (0, mongoose_1.Prop)({ type: mongoose_2.SchemaTypes.ObjectId, required: false, default: null }),
20
+ __metadata("design:type", Object)
21
+ ], DeadMessage.prototype, "_id", void 0);
22
+ __decorate([
23
+ (0, mongoose_1.Prop)({ type: String, required: true, default: null }),
24
+ __metadata("design:type", String)
25
+ ], DeadMessage.prototype, "topic", void 0);
26
+ __decorate([
27
+ (0, mongoose_1.Prop)({ type: String, required: false, default: null }),
28
+ __metadata("design:type", String)
29
+ ], DeadMessage.prototype, "key", void 0);
30
+ __decorate([
31
+ (0, mongoose_1.Prop)({ type: Map, of: String, default: new Map() }),
32
+ __metadata("design:type", Map)
33
+ ], DeadMessage.prototype, "headers", void 0);
34
+ __decorate([
35
+ (0, mongoose_1.Prop)({ type: String, required: false, default: null }),
36
+ __metadata("design:type", String)
37
+ ], DeadMessage.prototype, "message", void 0);
38
+ __decorate([
39
+ (0, mongoose_1.Prop)({ type: String, required: false, default: null }),
40
+ __metadata("design:type", String)
41
+ ], DeadMessage.prototype, "ex", void 0);
42
+ __decorate([
43
+ (0, mongoose_1.Prop)({ type: Boolean, required: false, default: null }),
44
+ __metadata("design:type", Boolean)
45
+ ], DeadMessage.prototype, "resolved", void 0);
46
+ __decorate([
47
+ (0, mongoose_1.Prop)({ type: Date, required: true, default: null }),
48
+ __metadata("design:type", Date)
49
+ ], DeadMessage.prototype, "createdAt", void 0);
50
+ __decorate([
51
+ (0, mongoose_1.Prop)({ type: Date, required: false, default: null }),
52
+ __metadata("design:type", Date)
53
+ ], DeadMessage.prototype, "resolvedAt", void 0);
54
+ exports.DeadMessage = DeadMessage = __decorate([
55
+ (0, mongoose_1.Schema)({ collection: 'dead-messages' })
56
+ ], DeadMessage);
57
+ exports.DeadMessageSchema = mongoose_1.SchemaFactory.createForClass(DeadMessage);
58
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/dmm/models/schemas/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAAgE;AAIzD,IAAM,WAAW,GAAjB,MAAM,WAAW;CA2BvB,CAAA;AA3BY,kCAAW;AAEtB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,sBAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;wCACxC;AAG7B;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;0CACxC;AAGd;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAA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