@futdevpro/nts-dynamo 1.15.154 → 1.15.156

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 (775) hide show
  1. package/README.md +26 -22
  2. package/__documentations/2026-08-22-bfr-ctm-018-content-free-endpoint-errors.md +54 -0
  3. package/__documentations/2026-08-22-content-free-process-error-boundary.md +105 -85
  4. package/build/_collections/app-version-header.util.d.ts +41 -41
  5. package/build/_collections/app-version-header.util.js +66 -66
  6. package/build/_collections/archive-service-registry.const.d.ts +15 -15
  7. package/build/_collections/archive-service-registry.const.js +14 -14
  8. package/build/_collections/archive.util.d.ts +12 -12
  9. package/build/_collections/archive.util.js +18 -18
  10. package/build/_collections/atlas-default-db-options.const.d.ts +2 -2
  11. package/build/_collections/atlas-default-db-options.const.js +9 -9
  12. package/build/_collections/client-safe-error.util.d.ts +38 -38
  13. package/build/_collections/client-safe-error.util.js +96 -96
  14. package/build/_collections/default-fallback-cache-max-age.const.d.ts +2 -2
  15. package/build/_collections/default-fallback-cache-max-age.const.js +5 -5
  16. package/build/_collections/default-not-found-page.const.d.ts +5 -5
  17. package/build/_collections/default-not-found-page.const.js +24 -24
  18. package/build/_collections/default-socket-path.const.d.ts +2 -2
  19. package/build/_collections/default-socket-path.const.js +5 -5
  20. package/build/_collections/field-encryption.util.d.ts +85 -85
  21. package/build/_collections/field-encryption.util.js +192 -192
  22. package/build/_collections/get-environment-settings.util.d.ts +2 -2
  23. package/build/_collections/get-environment-settings.util.js +43 -43
  24. package/build/_collections/global-settings.const.d.ts +6 -6
  25. package/build/_collections/global-settings.const.js +104 -104
  26. package/build/_collections/load-shed.util.d.ts +15 -15
  27. package/build/_collections/load-shed.util.js +42 -42
  28. package/build/_collections/mongo-reconnect-guard.util.d.ts +73 -73
  29. package/build/_collections/mongo-reconnect-guard.util.js +110 -110
  30. package/build/_collections/npm-token-check.util.d.ts +138 -138
  31. package/build/_collections/npm-token-check.util.js +301 -301
  32. package/build/_collections/security-headers.util.d.ts +16 -16
  33. package/build/_collections/security-headers.util.js +77 -77
  34. package/build/_collections/signed-url.util.d.ts +84 -84
  35. package/build/_collections/signed-url.util.js +145 -145
  36. package/build/_collections/star.controller.d.ts +7 -7
  37. package/build/_collections/star.controller.js +97 -97
  38. package/build/_collections/static-cache-control.util.d.ts +17 -17
  39. package/build/_collections/static-cache-control.util.js +23 -23
  40. package/build/_enums/data-model-type.enum.d.ts +13 -13
  41. package/build/_enums/data-model-type.enum.js +17 -17
  42. package/build/_enums/data-service-function.enum.d.ts +18 -18
  43. package/build/_enums/data-service-function.enum.js +24 -24
  44. package/build/_enums/predefined-data-types.enum.d.ts +15 -15
  45. package/build/_enums/predefined-data-types.enum.js +19 -19
  46. package/build/_enums/route-security.enum.d.ts +11 -11
  47. package/build/_enums/route-security.enum.js +15 -15
  48. package/build/_models/control-models/api-call-params.control-model.d.ts +79 -79
  49. package/build/_models/control-models/api-call-params.control-model.js +101 -101
  50. package/build/_models/control-models/app-ext-system-controls.control-model.d.ts +6 -6
  51. package/build/_models/control-models/app-ext-system-controls.control-model.js +10 -10
  52. package/build/_models/control-models/app-params.control-model.d.ts +51 -51
  53. package/build/_models/control-models/app-params.control-model.js +118 -118
  54. package/build/_models/control-models/app-system-controls.control-model.d.ts +7 -7
  55. package/build/_models/control-models/app-system-controls.control-model.js +11 -11
  56. package/build/_models/control-models/endpoint-params.control-model.d.ts +125 -119
  57. package/build/_models/control-models/endpoint-params.control-model.d.ts.map +1 -1
  58. package/build/_models/control-models/endpoint-params.control-model.js +409 -484
  59. package/build/_models/control-models/endpoint-params.control-model.js.map +1 -1
  60. package/build/_models/control-models/http-settings.control-model.d.ts +17 -17
  61. package/build/_models/control-models/http-settings.control-model.js +34 -34
  62. package/build/_models/control-models/system-control.control-model.d.ts +5 -5
  63. package/build/_models/control-models/system-control.control-model.js +11 -11
  64. package/build/_models/data-models/schema-migration.data-model.d.ts +28 -28
  65. package/build/_models/data-models/schema-migration.data-model.js +46 -46
  66. package/build/_models/interfaces/app-version-header-settings.interface.d.ts +16 -16
  67. package/build/_models/interfaces/app-version-header-settings.interface.js +2 -2
  68. package/build/_models/interfaces/certification-settings.interface.d.ts +5 -5
  69. package/build/_models/interfaces/certification-settings.interface.js +2 -2
  70. package/build/_models/interfaces/compare-data-options.interface.d.ts +26 -26
  71. package/build/_models/interfaces/compare-data-options.interface.js +2 -2
  72. package/build/_models/interfaces/compare-data-result.interface.d.ts +12 -12
  73. package/build/_models/interfaces/compare-data-result.interface.js +2 -2
  74. package/build/_models/interfaces/cors-settings.interface.d.ts +51 -51
  75. package/build/_models/interfaces/cors-settings.interface.js +2 -2
  76. package/build/_models/interfaces/db-query-options.interface.d.ts +32 -32
  77. package/build/_models/interfaces/db-query-options.interface.js +2 -2
  78. package/build/_models/interfaces/environment-settings.interface.d.ts +34 -34
  79. package/build/_models/interfaces/environment-settings.interface.js +2 -2
  80. package/build/_models/interfaces/global-log-settings.interface.d.ts +145 -145
  81. package/build/_models/interfaces/global-log-settings.interface.js +2 -2
  82. package/build/_models/interfaces/global-service-settings.interface.d.ts +30 -30
  83. package/build/_models/interfaces/global-service-settings.interface.js +2 -2
  84. package/build/_models/interfaces/global-settings.interface.d.ts +265 -265
  85. package/build/_models/interfaces/global-settings.interface.js +2 -2
  86. package/build/_models/interfaces/migration-entry.interface.d.ts +19 -19
  87. package/build/_models/interfaces/migration-entry.interface.js +2 -2
  88. package/build/_models/interfaces/mongo-transaction-settings.interface.d.ts +8 -8
  89. package/build/_models/interfaces/mongo-transaction-settings.interface.js +2 -2
  90. package/build/_models/interfaces/routing-module-settings.interface.d.ts +19 -19
  91. package/build/_models/interfaces/routing-module-settings.interface.js +2 -2
  92. package/build/_models/interfaces/security-headers-settings.interface.d.ts +41 -41
  93. package/build/_models/interfaces/security-headers-settings.interface.js +2 -2
  94. package/build/_models/interfaces/signed-url-verify-result.interface.d.ts +13 -13
  95. package/build/_models/interfaces/signed-url-verify-result.interface.js +2 -2
  96. package/build/_models/interfaces/static-client-settings.interface.d.ts +36 -36
  97. package/build/_models/interfaces/static-client-settings.interface.js +2 -2
  98. package/build/_models/types/db-update.type.d.ts +129 -129
  99. package/build/_models/types/db-update.type.js +2 -2
  100. package/build/_modules/account-security/_enums/account-challenge-purpose.type-enum.d.ts +5 -5
  101. package/build/_modules/account-security/_enums/account-challenge-purpose.type-enum.js +9 -9
  102. package/build/_modules/account-security/_enums/account-refresh-token-state.type-enum.d.ts +6 -6
  103. package/build/_modules/account-security/_enums/account-refresh-token-state.type-enum.js +10 -10
  104. package/build/_modules/account-security/_enums/account-session-state.type-enum.d.ts +6 -6
  105. package/build/_modules/account-security/_enums/account-session-state.type-enum.js +10 -10
  106. package/build/_modules/account-security/_models/account-challenge-adapter.interface.d.ts +8 -8
  107. package/build/_modules/account-security/_models/account-challenge-adapter.interface.js +2 -2
  108. package/build/_modules/account-security/_models/account-challenge-issued.interface.d.ts +6 -6
  109. package/build/_modules/account-security/_models/account-challenge-issued.interface.js +2 -2
  110. package/build/_modules/account-security/_models/account-challenge-record.interface.d.ts +12 -12
  111. package/build/_modules/account-security/_models/account-challenge-record.interface.js +2 -2
  112. package/build/_modules/account-security/_models/account-challenge-result.interface.d.ts +7 -7
  113. package/build/_modules/account-security/_models/account-challenge-result.interface.js +2 -2
  114. package/build/_modules/account-security/_models/account-challenge-settings.interface.d.ts +8 -8
  115. package/build/_modules/account-security/_models/account-challenge-settings.interface.js +2 -2
  116. package/build/_modules/account-security/_models/account-password-policy.interface.d.ts +11 -11
  117. package/build/_modules/account-security/_models/account-password-policy.interface.js +2 -2
  118. package/build/_modules/account-security/_models/account-password-verification.interface.d.ts +5 -5
  119. package/build/_modules/account-security/_models/account-password-verification.interface.js +2 -2
  120. package/build/_modules/account-security/_models/account-refresh-token-record.interface.d.ts +12 -12
  121. package/build/_modules/account-security/_models/account-refresh-token-record.interface.js +2 -2
  122. package/build/_modules/account-security/_models/account-session-adapter.interface.d.ts +18 -18
  123. package/build/_modules/account-security/_models/account-session-adapter.interface.js +2 -2
  124. package/build/_modules/account-security/_models/account-session-claims.interface.d.ts +7 -7
  125. package/build/_modules/account-security/_models/account-session-claims.interface.js +2 -2
  126. package/build/_modules/account-security/_models/account-session-context.interface.d.ts +6 -6
  127. package/build/_modules/account-security/_models/account-session-context.interface.js +2 -2
  128. package/build/_modules/account-security/_models/account-session-create.interface.d.ts +7 -7
  129. package/build/_modules/account-security/_models/account-session-create.interface.js +2 -2
  130. package/build/_modules/account-security/_models/account-session-record.interface.d.ts +20 -20
  131. package/build/_modules/account-security/_models/account-session-record.interface.js +2 -2
  132. package/build/_modules/account-security/_models/account-session-rotate.interface.d.ts +10 -10
  133. package/build/_modules/account-security/_models/account-session-rotate.interface.js +2 -2
  134. package/build/_modules/account-security/_models/account-session-settings.interface.d.ts +10 -10
  135. package/build/_modules/account-security/_models/account-session-settings.interface.js +2 -2
  136. package/build/_modules/account-security/_models/account-session-token-pair.interface.d.ts +8 -8
  137. package/build/_modules/account-security/_models/account-session-token-pair.interface.js +2 -2
  138. package/build/_modules/account-security/_models/account-session-view.interface.d.ts +12 -12
  139. package/build/_modules/account-security/_models/account-session-view.interface.js +2 -2
  140. package/build/_modules/account-security/account-challenge.control-service.d.ts +23 -23
  141. package/build/_modules/account-security/account-challenge.control-service.js +116 -116
  142. package/build/_modules/account-security/account-password.control-service.d.ts +23 -23
  143. package/build/_modules/account-security/account-password.control-service.js +213 -213
  144. package/build/_modules/account-security/account-session.control-service.d.ts +38 -38
  145. package/build/_modules/account-security/account-session.control-service.js +276 -276
  146. package/build/_modules/account-security/index.d.ts +23 -23
  147. package/build/_modules/account-security/index.js +15 -15
  148. package/build/_modules/admin-auth/_models/admin-api-key-config.interface.d.ts +31 -31
  149. package/build/_modules/admin-auth/_models/admin-api-key-config.interface.js +2 -2
  150. package/build/_modules/admin-auth/admin-api-key.auth-service.d.ts +89 -89
  151. package/build/_modules/admin-auth/admin-api-key.auth-service.js +194 -194
  152. package/build/_modules/admin-auth/index.d.ts +2 -2
  153. package/build/_modules/admin-auth/index.js +5 -5
  154. package/build/_modules/ai/_collections/ai-model-config-validator.util.d.ts +31 -31
  155. package/build/_modules/ai/_collections/ai-model-config-validator.util.js +94 -94
  156. package/build/_modules/ai/_collections/ai-provider-error.util.d.ts +43 -43
  157. package/build/_modules/ai/_collections/ai-provider-error.util.js +120 -120
  158. package/build/_modules/ai/_models/ai-input-interfaces.d.ts +53 -53
  159. package/build/_modules/ai/_models/ai-input-interfaces.js +5 -5
  160. package/build/_modules/ai/_models/ai-test-generation-result.interface.d.ts +16 -16
  161. package/build/_modules/ai/_models/ai-test-generation-result.interface.js +2 -2
  162. package/build/_modules/ai/_models/interfaces/dynts-ai-cost-event-callback.interface.d.ts +13 -13
  163. package/build/_modules/ai/_models/interfaces/dynts-ai-cost-event-callback.interface.js +2 -2
  164. package/build/_modules/ai/_models/interfaces/dynts-ai-cost-event.interface.d.ts +49 -49
  165. package/build/_modules/ai/_models/interfaces/dynts-ai-cost-event.interface.js +2 -2
  166. package/build/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.d.ts +16 -16
  167. package/build/_modules/ai/_models/interfaces/dynts-ai-provider-error.interface.js +2 -2
  168. package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.d.ts +22 -22
  169. package/build/_modules/ai/_modules/ai-mock/_collections/aim-default-collection.util.js +51 -51
  170. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.d.ts +33 -33
  171. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-match.util.js +55 -55
  172. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.d.ts +40 -40
  173. package/build/_modules/ai/_modules/ai-mock/_collections/aim-fixture-serializer.util.js +89 -89
  174. package/build/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.d.ts +27 -27
  175. package/build/_modules/ai/_modules/ai-mock/_enums/aim-modality.enum.js +28 -28
  176. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.d.ts +14 -14
  177. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-call-input.interface.js +2 -2
  178. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.d.ts +10 -10
  179. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-error.interface.js +2 -2
  180. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.d.ts +29 -29
  181. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-fixture.interface.js +2 -2
  182. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.d.ts +18 -18
  183. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-request.interface.js +2 -2
  184. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.d.ts +18 -18
  185. package/build/_modules/ai/_modules/ai-mock/_models/interfaces/aim-service-collection.interface.js +2 -2
  186. package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.d.ts +80 -80
  187. package/build/_modules/ai/_modules/ai-mock/_services/ai-embedding-mock.service.js +166 -166
  188. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.d.ts +47 -47
  189. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-harness.service.js +103 -103
  190. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.d.ts +34 -34
  191. package/build/_modules/ai/_modules/ai-mock/_services/aim-fixture-store.service.js +59 -59
  192. package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.d.ts +73 -73
  193. package/build/_modules/ai/_modules/ai-mock/_services/aim-mock.service.js +133 -133
  194. package/build/_modules/ai/_modules/ai-mock/fixtures/aim-text.fixtures.d.ts +8 -8
  195. package/build/_modules/ai/_modules/ai-mock/fixtures/aim-text.fixtures.js +650 -650
  196. package/build/_modules/ai/_modules/ai-mock/index.d.ts +14 -14
  197. package/build/_modules/ai/_modules/ai-mock/index.js +42 -42
  198. package/build/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.d.ts +35 -35
  199. package/build/_modules/ai/_modules/anthropic/_services/aai-user-key.control-service.js +117 -117
  200. package/build/_modules/ai/_modules/anthropic/index.d.ts +2 -2
  201. package/build/_modules/ai/_modules/anthropic/index.js +7 -7
  202. package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.d.ts +84 -84
  203. package/build/_modules/ai/_modules/document-ai/_collections/dai-chunking.util.js +467 -467
  204. package/build/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.d.ts +109 -109
  205. package/build/_modules/ai/_modules/document-ai/_collections/dai-code-chunking.util.js +418 -418
  206. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.d.ts +28 -28
  207. package/build/_modules/ai/_modules/document-ai/_collections/dai-document.util.js +73 -73
  208. package/build/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.d.ts +6 -6
  209. package/build/_modules/ai/_modules/document-ai/_enums/dai-compare-result-type.enum.js +10 -10
  210. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.d.ts +51 -51
  211. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.js +132 -132
  212. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.d.ts +47 -47
  213. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-page.data-model.js +136 -136
  214. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.d.ts +17 -17
  215. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-document.data-model.js +76 -76
  216. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-code-chunk.interface.d.ts +49 -49
  217. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-code-chunk.interface.js +2 -2
  218. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.d.ts +8 -8
  219. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-chunk-compare-result.interface.js +2 -2
  220. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.d.ts +11 -11
  221. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-doc-page-compare-result.interface.js +2 -2
  222. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.d.ts +12 -12
  223. package/build/_modules/ai/_modules/document-ai/_models/interfaces/dai-document-compare-result.interface.js +2 -2
  224. package/build/_modules/ai/_modules/document-ai/index.d.ts +12 -12
  225. package/build/_modules/ai/_modules/document-ai/index.js +27 -27
  226. package/build/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.d.ts +34 -34
  227. package/build/_modules/ai/_modules/fdp-ai/_services/fdpai-user-key.control-service.js +128 -128
  228. package/build/_modules/ai/_modules/fdp-ai/index.d.ts +2 -2
  229. package/build/_modules/ai/_modules/fdp-ai/index.js +7 -7
  230. package/build/_modules/ai/_modules/open-ai/_collections/oai-global-settings.const.d.ts +2 -2
  231. package/build/_modules/ai/_modules/open-ai/_collections/oai-global-settings.const.js +8 -8
  232. package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.d.ts +2 -2
  233. package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.js +74 -74
  234. package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.d.ts +2 -2
  235. package/build/_modules/ai/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.js +67 -67
  236. package/build/_modules/ai/_modules/open-ai/_enums/oai-gpt-message-role.enum.js +42 -42
  237. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts +5 -5
  238. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-global-settings.interface.js +2 -2
  239. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js +6 -6
  240. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.d.ts +51 -51
  241. package/build/_modules/ai/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.js +2 -2
  242. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-chunk-data.service.d.ts +21 -21
  243. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-chunk-data.service.js +187 -187
  244. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-page.data-service.d.ts +26 -26
  245. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-doc-page.data-service.js +278 -278
  246. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.d.ts +22 -22
  247. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-document.data-service.js +322 -322
  248. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.d.ts +119 -119
  249. package/build/_modules/ai/_modules/open-ai/_services/data-services/oai-vector-data.service.js +480 -480
  250. package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.d.ts +25 -25
  251. package/build/_modules/ai/_modules/open-ai/_services/oai-embedding.control-service.js +103 -103
  252. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts +169 -169
  253. package/build/_modules/ai/_modules/open-ai/_services/oai-llm-chat.service-base.js +479 -479
  254. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.d.ts +229 -229
  255. package/build/_modules/ai/_modules/open-ai/_services/oai-llm.service-base.js +617 -617
  256. package/build/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.d.ts +39 -39
  257. package/build/_modules/ai/_modules/open-ai/_services/oai-user-key.control-service.js +110 -110
  258. package/build/_modules/ai/_modules/open-ai/index.d.ts +14 -14
  259. package/build/_modules/ai/_modules/open-ai/index.js +55 -55
  260. package/build/_modules/ai/_services/ai-embedding-provider.registry.d.ts +51 -51
  261. package/build/_modules/ai/_services/ai-embedding-provider.registry.js +78 -78
  262. package/build/_modules/ai/_services/ai-embedding.service-base.d.ts +41 -41
  263. package/build/_modules/ai/_services/ai-embedding.service-base.js +11 -11
  264. package/build/_modules/ai/_services/ai-llm-chat.service-base.d.ts +39 -39
  265. package/build/_modules/ai/_services/ai-llm-chat.service-base.js +11 -11
  266. package/build/_modules/ai/_services/ai-llm.service-base.d.ts +148 -148
  267. package/build/_modules/ai/_services/ai-llm.service-base.js +378 -378
  268. package/build/_modules/ai/_services/ai-provider.service-base.d.ts +46 -46
  269. package/build/_modules/ai/_services/ai-provider.service-base.js +43 -43
  270. package/build/_modules/ai/_services/ai-user-key.service-base.d.ts +44 -44
  271. package/build/_modules/ai/_services/ai-user-key.service-base.js +14 -14
  272. package/build/_modules/ai/_services/lmstudio-embedding.control-service.d.ts +110 -110
  273. package/build/_modules/ai/_services/lmstudio-embedding.control-service.js +297 -297
  274. package/build/_modules/ai/index.d.ts +16 -16
  275. package/build/_modules/ai/index.js +30 -30
  276. package/build/_modules/artifact-compiler/_enums/artifact-compile-outcome.type-enum.d.ts +5 -5
  277. package/build/_modules/artifact-compiler/_enums/artifact-compile-outcome.type-enum.js +9 -9
  278. package/build/_modules/artifact-compiler/_enums/artifact-compile-stage.type-enum.d.ts +8 -8
  279. package/build/_modules/artifact-compiler/_enums/artifact-compile-stage.type-enum.js +12 -12
  280. package/build/_modules/artifact-compiler/_enums/artifact-retry-class.type-enum.d.ts +6 -6
  281. package/build/_modules/artifact-compiler/_enums/artifact-retry-class.type-enum.js +10 -10
  282. package/build/_modules/artifact-compiler/_models/artifact-compile.interface.d.ts +32 -32
  283. package/build/_modules/artifact-compiler/_models/artifact-compile.interface.js +2 -2
  284. package/build/_modules/artifact-compiler/artifact-compiler.control-service.d.ts +36 -36
  285. package/build/_modules/artifact-compiler/artifact-compiler.control-service.js +273 -273
  286. package/build/_modules/artifact-compiler/index.d.ts +5 -5
  287. package/build/_modules/artifact-compiler/index.js +11 -11
  288. package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts +2 -2
  289. package/build/_modules/assistant/_collections/ass-global-settings.const.js +14 -14
  290. package/build/_modules/assistant/_collections/ass.util.d.ts +15 -15
  291. package/build/_modules/assistant/_collections/ass.util.js +42 -42
  292. package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts +13 -13
  293. package/build/_modules/assistant/_models/ass-global-settings.interface.js +2 -2
  294. package/build/_modules/assistant/_services/ass-io.control-service.d.ts +19 -19
  295. package/build/_modules/assistant/_services/ass-io.control-service.js +57 -57
  296. package/build/_modules/assistant/_services/ass-main.control-service.d.ts +32 -32
  297. package/build/_modules/assistant/_services/ass-main.control-service.js +65 -65
  298. package/build/_modules/assistant/index.d.ts +6 -6
  299. package/build/_modules/assistant/index.js +18 -18
  300. package/build/_modules/bot/_collections/bot-default-commands.const.d.ts +2 -2
  301. package/build/_modules/bot/_collections/bot-default-commands.const.js +13 -13
  302. package/build/_modules/bot/_collections/bot-global-settings.const.d.ts +2 -2
  303. package/build/_modules/bot/_collections/bot-global-settings.const.js +31 -31
  304. package/build/_modules/bot/_models/bot-channel-wrapper.interface.d.ts +25 -25
  305. package/build/_modules/bot/_models/bot-channel-wrapper.interface.js +38 -38
  306. package/build/_modules/bot/_models/bot-command.interface.d.ts +7 -7
  307. package/build/_modules/bot/_models/bot-command.interface.js +2 -2
  308. package/build/_modules/bot/_models/bot-global-settings.interface.d.ts +85 -85
  309. package/build/_modules/bot/_models/bot-global-settings.interface.js +2 -2
  310. package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts +6 -6
  311. package/build/_modules/bot/_models/bot-last-mention-date.interface.js +2 -2
  312. package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts +5 -5
  313. package/build/_modules/bot/_models/bot-last-message-date.interface.js +2 -2
  314. package/build/_modules/bot/_models/bot-message-wrapper.interface.d.ts +37 -37
  315. package/build/_modules/bot/_models/bot-message-wrapper.interface.js +54 -54
  316. package/build/_modules/bot/_models/bot-user-wrapper.interface.d.ts +23 -23
  317. package/build/_modules/bot/_models/bot-user-wrapper.interface.js +28 -28
  318. package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js +10 -10
  319. package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.d.ts +69 -69
  320. package/build/_modules/bot/_modules/discord-bot/_services/dib-messaging-provider.control-service.js +497 -497
  321. package/build/_modules/bot/_modules/discord-bot/index.d.ts +1 -1
  322. package/build/_modules/bot/_modules/discord-bot/index.js +12 -12
  323. package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.d.ts +16 -16
  324. package/build/_modules/bot/_modules/dynamo-bot/_collections/dyb-operations.util.js +42 -42
  325. package/build/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.d.ts +9 -9
  326. package/build/_modules/bot/_modules/dynamo-bot/_models/dyb-platform.types.js +2 -2
  327. package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.d.ts +59 -59
  328. package/build/_modules/bot/_modules/dynamo-bot/_services/dyb-messaging-provider.control-service.js +349 -349
  329. package/build/_modules/bot/_modules/dynamo-bot/index.d.ts +3 -3
  330. package/build/_modules/bot/_modules/dynamo-bot/index.js +15 -15
  331. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts +6 -6
  332. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js +2 -2
  333. package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.d.ts +56 -56
  334. package/build/_modules/bot/_modules/slack-bot/_services/slb-messaging-provider.control-service.js +137 -137
  335. package/build/_modules/bot/_modules/slack-bot/index.d.ts +2 -2
  336. package/build/_modules/bot/_modules/slack-bot/index.js +12 -12
  337. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts +6 -6
  338. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js +2 -2
  339. package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.d.ts +56 -56
  340. package/build/_modules/bot/_modules/teams-bot/_services/teb-messaging-provider.control-service.js +137 -137
  341. package/build/_modules/bot/_modules/teams-bot/index.d.ts +2 -2
  342. package/build/_modules/bot/_modules/teams-bot/index.js +12 -12
  343. package/build/_modules/bot/_services/bot-commands.control-service.d.ts +12 -12
  344. package/build/_modules/bot/_services/bot-commands.control-service.js +117 -117
  345. package/build/_modules/bot/_services/bot-io.control-service.d.ts +23 -23
  346. package/build/_modules/bot/_services/bot-io.control-service.js +226 -226
  347. package/build/_modules/bot/_services/bot-main.control-service.d.ts +35 -35
  348. package/build/_modules/bot/_services/bot-main.control-service.js +195 -195
  349. package/build/_modules/bot/_services/bot-messaging-provider.service-base.d.ts +71 -71
  350. package/build/_modules/bot/_services/bot-messaging-provider.service-base.js +15 -15
  351. package/build/_modules/bot/_services/bot-routines.control-service.d.ts +13 -13
  352. package/build/_modules/bot/_services/bot-routines.control-service.js +59 -59
  353. package/build/_modules/bot/index.d.ts +17 -17
  354. package/build/_modules/bot/index.js +36 -36
  355. package/build/_modules/custom-data/custom-data.controller.d.ts +5 -5
  356. package/build/_modules/custom-data/custom-data.controller.js +56 -56
  357. package/build/_modules/custom-data/custom-data.data-service.d.ts +5 -5
  358. package/build/_modules/custom-data/custom-data.data-service.js +11 -11
  359. package/build/_modules/custom-data/get-custom-data-routing-module.util.d.ts +3 -3
  360. package/build/_modules/custom-data/get-custom-data-routing-module.util.js +16 -16
  361. package/build/_modules/custom-data/index.d.ts +4 -4
  362. package/build/_modules/custom-data/index.js +9 -9
  363. package/build/_modules/data-readers/_collections/dynts-sqlite-reader.util.d.ts +58 -58
  364. package/build/_modules/data-readers/_collections/dynts-sqlite-reader.util.js +168 -168
  365. package/build/_modules/data-readers/_models/interfaces/dynts-sqlite-reader.interface.d.ts +31 -31
  366. package/build/_modules/data-readers/_models/interfaces/dynts-sqlite-reader.interface.js +7 -7
  367. package/build/_modules/data-readers/index.d.ts +2 -2
  368. package/build/_modules/data-readers/index.js +10 -10
  369. package/build/_modules/defaults/_collections/default-endpoints.util.d.ts +248 -248
  370. package/build/_modules/defaults/_collections/default-endpoints.util.js +386 -386
  371. package/build/_modules/defaults/_models/default-user.data-model.d.ts +19 -19
  372. package/build/_modules/defaults/_models/default-user.data-model.js +72 -72
  373. package/build/_modules/defaults/_services/default-auth.service.d.ts +50 -50
  374. package/build/_modules/defaults/_services/default-auth.service.js +158 -158
  375. package/build/_modules/defaults/_services/default-socket-events.service.d.ts +23 -23
  376. package/build/_modules/defaults/_services/default-socket-events.service.js +60 -60
  377. package/build/_modules/defaults/_services/default-user.data-service.d.ts +24 -24
  378. package/build/_modules/defaults/_services/default-user.data-service.js +87 -87
  379. package/build/_modules/defaults/index.d.ts +5 -5
  380. package/build/_modules/defaults/index.js +17 -17
  381. package/build/_modules/discord-assistant/_collections/dias-global-settings.const.d.ts +2 -2
  382. package/build/_modules/discord-assistant/_collections/dias-global-settings.const.js +16 -16
  383. package/build/_modules/discord-assistant/_collections/dias.util.d.ts +31 -31
  384. package/build/_modules/discord-assistant/_collections/dias.util.js +85 -85
  385. package/build/_modules/discord-assistant/_models/dias-global-settings.interface.d.ts +17 -17
  386. package/build/_modules/discord-assistant/_models/dias-global-settings.interface.js +2 -2
  387. package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.d.ts +8 -8
  388. package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.js +46 -46
  389. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts +17 -17
  390. package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js +123 -123
  391. package/build/_modules/discord-assistant/_services/dias-io.control-service.d.ts +10 -10
  392. package/build/_modules/discord-assistant/_services/dias-io.control-service.js +49 -49
  393. package/build/_modules/discord-assistant/_services/dias-main.control-service.d.ts +3 -3
  394. package/build/_modules/discord-assistant/_services/dias-main.control-service.js +7 -7
  395. package/build/_modules/discord-assistant/_services/dias.service-base.d.ts +18 -18
  396. package/build/_modules/discord-assistant/_services/dias.service-base.js +46 -46
  397. package/build/_modules/discord-assistant/index.d.ts +11 -11
  398. package/build/_modules/discord-assistant/index.js +24 -24
  399. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.d.ts +3 -3
  400. package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.js +7 -7
  401. package/build/_modules/discord-assistant-voiced/index.d.ts +2 -2
  402. package/build/_modules/discord-assistant-voiced/index.js +28 -28
  403. package/build/_modules/discord-bot/_collections/dibo-default-commands.const.d.ts +2 -2
  404. package/build/_modules/discord-bot/_collections/dibo-default-commands.const.js +12 -12
  405. package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.d.ts +2 -2
  406. package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.js +43 -43
  407. package/build/_modules/discord-bot/_collections/dibo-operations.util.d.ts +22 -22
  408. package/build/_modules/discord-bot/_collections/dibo-operations.util.js +275 -275
  409. package/build/_modules/discord-bot/_models/dibo-command.interface.d.ts +7 -7
  410. package/build/_modules/discord-bot/_models/dibo-command.interface.js +2 -2
  411. package/build/_modules/discord-bot/_models/dibo-global-settings.interface.d.ts +87 -87
  412. package/build/_modules/discord-bot/_models/dibo-global-settings.interface.js +2 -2
  413. package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.d.ts +6 -6
  414. package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.js +2 -2
  415. package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.d.ts +5 -5
  416. package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.js +2 -2
  417. package/build/_modules/discord-bot/_services/dibo-commands.control-service.d.ts +11 -11
  418. package/build/_modules/discord-bot/_services/dibo-commands.control-service.js +109 -109
  419. package/build/_modules/discord-bot/_services/dibo-io.control-service.d.ts +21 -21
  420. package/build/_modules/discord-bot/_services/dibo-io.control-service.js +218 -218
  421. package/build/_modules/discord-bot/_services/dibo-main.control-service.d.ts +89 -89
  422. package/build/_modules/discord-bot/_services/dibo-main.control-service.js +363 -363
  423. package/build/_modules/discord-bot/_services/dibo-routines.control-service.d.ts +13 -13
  424. package/build/_modules/discord-bot/_services/dibo-routines.control-service.js +73 -73
  425. package/build/_modules/discord-bot/index.d.ts +11 -11
  426. package/build/_modules/discord-bot/index.js +30 -30
  427. package/build/_modules/local-vector-search/_enums/lvs-search-mode.enum.d.ts +34 -34
  428. package/build/_modules/local-vector-search/_enums/lvs-search-mode.enum.js +38 -38
  429. package/build/_modules/local-vector-search/_models/data-models/lvs-vector-persist.data-model.d.ts +35 -35
  430. package/build/_modules/local-vector-search/_models/data-models/lvs-vector-persist.data-model.js +53 -53
  431. package/build/_modules/local-vector-search/_models/lvs-search-result.interface.d.ts +16 -16
  432. package/build/_modules/local-vector-search/_models/lvs-search-result.interface.js +2 -2
  433. package/build/_modules/local-vector-search/_services/lvs-bm25.util.d.ts +88 -88
  434. package/build/_modules/local-vector-search/_services/lvs-bm25.util.js +189 -189
  435. package/build/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.d.ts +26 -26
  436. package/build/_modules/local-vector-search/_services/lvs-doc-chunk-data.service.js +197 -197
  437. package/build/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.d.ts +145 -145
  438. package/build/_modules/local-vector-search/_services/lvs-local-vector-search.data-service.js +294 -294
  439. package/build/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.d.ts +74 -74
  440. package/build/_modules/local-vector-search/_services/lvs-persistent-vector-pool.control-service.js +152 -152
  441. package/build/_modules/local-vector-search/_services/lvs-vector-persist.data-service.d.ts +51 -51
  442. package/build/_modules/local-vector-search/_services/lvs-vector-persist.data-service.js +83 -83
  443. package/build/_modules/local-vector-search/_services/lvs-vector-pool.control-service.d.ts +99 -99
  444. package/build/_modules/local-vector-search/_services/lvs-vector-pool.control-service.js +276 -276
  445. package/build/_modules/local-vector-search/index.d.ts +8 -8
  446. package/build/_modules/local-vector-search/index.js +15 -15
  447. package/build/_modules/logs/_models/file-log-entry.interface.d.ts +13 -13
  448. package/build/_modules/logs/_models/file-log-entry.interface.js +2 -2
  449. package/build/_modules/logs/_models/file-log-read-result.interface.d.ts +35 -35
  450. package/build/_modules/logs/_models/file-log-read-result.interface.js +2 -2
  451. package/build/_modules/logs/file-log.service.d.ts +132 -132
  452. package/build/_modules/logs/file-log.service.js +444 -444
  453. package/build/_modules/logs/file-logs.controller.d.ts +40 -40
  454. package/build/_modules/logs/file-logs.controller.js +138 -138
  455. package/build/_modules/logs/get-file-logs-routing-module.util.d.ts +31 -31
  456. package/build/_modules/logs/get-file-logs-routing-module.util.js +37 -37
  457. package/build/_modules/logs/get-logs-routing-module.util.d.ts +18 -18
  458. package/build/_modules/logs/get-logs-routing-module.util.js +31 -31
  459. package/build/_modules/logs/index.d.ts +8 -8
  460. package/build/_modules/logs/index.js +15 -15
  461. package/build/_modules/logs/log-buffer.service.d.ts +37 -37
  462. package/build/_modules/logs/log-buffer.service.js +96 -96
  463. package/build/_modules/logs/logs.controller.d.ts +26 -26
  464. package/build/_modules/logs/logs.controller.js +89 -89
  465. package/build/_modules/logs/logs.service.d.ts +39 -39
  466. package/build/_modules/logs/logs.service.js +96 -96
  467. package/build/_modules/mcp/_models/interfaces/dynts-mcp.interface.d.ts +108 -108
  468. package/build/_modules/mcp/_models/interfaces/dynts-mcp.interface.js +13 -13
  469. package/build/_modules/mcp/_services/dynts-mcp-server.service-base.d.ts +70 -70
  470. package/build/_modules/mcp/_services/dynts-mcp-server.service-base.js +98 -98
  471. package/build/_modules/mcp/_services/dynts-mcp.adapter.d.ts +56 -56
  472. package/build/_modules/mcp/_services/dynts-mcp.adapter.js +138 -138
  473. package/build/_modules/mcp/index.d.ts +3 -3
  474. package/build/_modules/mcp/index.js +12 -12
  475. package/build/_modules/messaging/_collections/get-messaging-routing-module.util.d.ts +7 -7
  476. package/build/_modules/messaging/_collections/get-messaging-routing-module.util.js +20 -20
  477. package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts +5 -5
  478. package/build/_modules/messaging/_collections/msg-global-settings.const.js +22 -22
  479. package/build/_modules/messaging/_collections/msg.util.d.ts +24 -24
  480. package/build/_modules/messaging/_collections/msg.util.js +62 -62
  481. package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts +28 -28
  482. package/build/_modules/messaging/_models/msg-global-settings.interface.js +2 -2
  483. package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts +28 -28
  484. package/build/_modules/messaging/_services/msg-conversation.data-service.js +109 -109
  485. package/build/_modules/messaging/_services/msg-events.service.d.ts +61 -61
  486. package/build/_modules/messaging/_services/msg-events.service.js +203 -203
  487. package/build/_modules/messaging/_services/msg-integration.control-service.js +180 -180
  488. package/build/_modules/messaging/_services/msg-main.control-service.d.ts +62 -62
  489. package/build/_modules/messaging/_services/msg-main.control-service.js +428 -428
  490. package/build/_modules/messaging/_services/msg-message.data-service.d.ts +28 -28
  491. package/build/_modules/messaging/_services/msg-message.data-service.js +103 -103
  492. package/build/_modules/messaging/_services/msg.controller.d.ts +12 -12
  493. package/build/_modules/messaging/_services/msg.controller.js +256 -256
  494. package/build/_modules/messaging/index.d.ts +10 -10
  495. package/build/_modules/messaging/index.js +27 -27
  496. package/build/_modules/mock/app-extended-server.mock.d.ts +41 -41
  497. package/build/_modules/mock/app-extended-server.mock.js +169 -169
  498. package/build/_modules/mock/app-integration-test.mock.d.ts +19 -19
  499. package/build/_modules/mock/app-integration-test.mock.js +45 -45
  500. package/build/_modules/mock/app-params.mock.d.ts +2 -2
  501. package/build/_modules/mock/app-params.mock.js +9 -9
  502. package/build/_modules/mock/app-server.mock.d.ts +41 -41
  503. package/build/_modules/mock/app-server.mock.js +148 -148
  504. package/build/_modules/mock/auth-service.mock.d.ts +10 -10
  505. package/build/_modules/mock/auth-service.mock.js +19 -19
  506. package/build/_modules/mock/controller.mock.d.ts +5 -5
  507. package/build/_modules/mock/controller.mock.js +14 -14
  508. package/build/_modules/mock/data-model.mock.d.ts +26 -26
  509. package/build/_modules/mock/data-model.mock.js +72 -72
  510. package/build/_modules/mock/email-service-collection.mock.d.ts +7 -7
  511. package/build/_modules/mock/email-service-collection.mock.js +12 -12
  512. package/build/_modules/mock/email-service.mock.d.ts +4 -4
  513. package/build/_modules/mock/email-service.mock.js +20 -20
  514. package/build/_modules/mock/endpoint.mock.d.ts +8 -8
  515. package/build/_modules/mock/endpoint.mock.js +79 -79
  516. package/build/_modules/mock/socket-client.mock.d.ts +9 -9
  517. package/build/_modules/mock/socket-client.mock.js +38 -38
  518. package/build/_modules/mock/socket-server.mock.d.ts +15 -15
  519. package/build/_modules/mock/socket-server.mock.js +32 -32
  520. package/build/_modules/oauth2/_routes/oauth2.controller.d.ts +16 -16
  521. package/build/_modules/oauth2/_routes/oauth2.controller.js +96 -96
  522. package/build/_modules/oauth2/_services/oauth2.auth-service.d.ts +30 -30
  523. package/build/_modules/oauth2/_services/oauth2.auth-service.js +215 -215
  524. package/build/_modules/oauth2/_services/oauth2.control-service.d.ts +132 -132
  525. package/build/_modules/oauth2/_services/oauth2.control-service.js +576 -576
  526. package/build/_modules/oauth2/index.d.ts +3 -3
  527. package/build/_modules/oauth2/index.js +14 -14
  528. package/build/_modules/privacy-lifecycle/_enums/privacy-consent-decision.type-enum.d.ts +5 -5
  529. package/build/_modules/privacy-lifecycle/_enums/privacy-consent-decision.type-enum.js +9 -9
  530. package/build/_modules/privacy-lifecycle/_enums/privacy-contributor-action.type-enum.d.ts +10 -10
  531. package/build/_modules/privacy-lifecycle/_enums/privacy-contributor-action.type-enum.js +14 -14
  532. package/build/_modules/privacy-lifecycle/_enums/privacy-contributor-outcome.type-enum.d.ts +7 -7
  533. package/build/_modules/privacy-lifecycle/_enums/privacy-contributor-outcome.type-enum.js +11 -11
  534. package/build/_modules/privacy-lifecycle/_enums/privacy-request-state.type-enum.d.ts +15 -15
  535. package/build/_modules/privacy-lifecycle/_enums/privacy-request-state.type-enum.js +19 -19
  536. package/build/_modules/privacy-lifecycle/_enums/privacy-request.type-enum.d.ts +9 -9
  537. package/build/_modules/privacy-lifecycle/_enums/privacy-request.type-enum.js +13 -13
  538. package/build/_modules/privacy-lifecycle/_models/privacy-consent-input.interface.d.ts +11 -11
  539. package/build/_modules/privacy-lifecycle/_models/privacy-consent-input.interface.js +2 -2
  540. package/build/_modules/privacy-lifecycle/_models/privacy-consent-persistence-result.interface.d.ts +6 -6
  541. package/build/_modules/privacy-lifecycle/_models/privacy-consent-persistence-result.interface.js +2 -2
  542. package/build/_modules/privacy-lifecycle/_models/privacy-consent-record.interface.d.ts +14 -14
  543. package/build/_modules/privacy-lifecycle/_models/privacy-consent-record.interface.js +2 -2
  544. package/build/_modules/privacy-lifecycle/_models/privacy-consent-result.interface.d.ts +6 -6
  545. package/build/_modules/privacy-lifecycle/_models/privacy-consent-result.interface.js +2 -2
  546. package/build/_modules/privacy-lifecycle/_models/privacy-consent-view.interface.d.ts +12 -12
  547. package/build/_modules/privacy-lifecycle/_models/privacy-consent-view.interface.js +2 -2
  548. package/build/_modules/privacy-lifecycle/_models/privacy-contributor-context.interface.d.ts +8 -8
  549. package/build/_modules/privacy-lifecycle/_models/privacy-contributor-context.interface.js +2 -2
  550. package/build/_modules/privacy-lifecycle/_models/privacy-contributor-outcome.interface.d.ts +13 -13
  551. package/build/_modules/privacy-lifecycle/_models/privacy-contributor-outcome.interface.js +2 -2
  552. package/build/_modules/privacy-lifecycle/_models/privacy-contributor-plan.interface.d.ts +7 -7
  553. package/build/_modules/privacy-lifecycle/_models/privacy-contributor-plan.interface.js +2 -2
  554. package/build/_modules/privacy-lifecycle/_models/privacy-contributor.interface.d.ts +10 -10
  555. package/build/_modules/privacy-lifecycle/_models/privacy-contributor.interface.js +2 -2
  556. package/build/_modules/privacy-lifecycle/_models/privacy-ledger-adapter.interface.d.ts +12 -12
  557. package/build/_modules/privacy-lifecycle/_models/privacy-ledger-adapter.interface.js +2 -2
  558. package/build/_modules/privacy-lifecycle/_models/privacy-ledger-result.interface.d.ts +8 -8
  559. package/build/_modules/privacy-lifecycle/_models/privacy-ledger-result.interface.js +2 -2
  560. package/build/_modules/privacy-lifecycle/_models/privacy-ledger-settings.interface.d.ts +6 -6
  561. package/build/_modules/privacy-lifecycle/_models/privacy-ledger-settings.interface.js +2 -2
  562. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-input.interface.d.ts +10 -10
  563. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-input.interface.js +2 -2
  564. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-persistence-result.interface.d.ts +6 -6
  565. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-persistence-result.interface.js +2 -2
  566. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-result.interface.d.ts +6 -6
  567. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-result.interface.js +2 -2
  568. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-view.interface.d.ts +11 -11
  569. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance-view.interface.js +2 -2
  570. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance.interface.d.ts +13 -13
  571. package/build/_modules/privacy-lifecycle/_models/privacy-legal-acceptance.interface.js +2 -2
  572. package/build/_modules/privacy-lifecycle/_models/privacy-lifecycle-adapter.interface.d.ts +14 -14
  573. package/build/_modules/privacy-lifecycle/_models/privacy-lifecycle-adapter.interface.js +2 -2
  574. package/build/_modules/privacy-lifecycle/_models/privacy-lifecycle-settings.interface.d.ts +8 -8
  575. package/build/_modules/privacy-lifecycle/_models/privacy-lifecycle-settings.interface.js +2 -2
  576. package/build/_modules/privacy-lifecycle/_models/privacy-request-create-result.interface.d.ts +6 -6
  577. package/build/_modules/privacy-lifecycle/_models/privacy-request-create-result.interface.js +2 -2
  578. package/build/_modules/privacy-lifecycle/_models/privacy-request-open.interface.d.ts +9 -9
  579. package/build/_modules/privacy-lifecycle/_models/privacy-request-open.interface.js +2 -2
  580. package/build/_modules/privacy-lifecycle/_models/privacy-request-persistence-create-result.interface.d.ts +6 -6
  581. package/build/_modules/privacy-lifecycle/_models/privacy-request-persistence-create-result.interface.js +2 -2
  582. package/build/_modules/privacy-lifecycle/_models/privacy-request-record.interface.d.ts +20 -20
  583. package/build/_modules/privacy-lifecycle/_models/privacy-request-record.interface.js +2 -2
  584. package/build/_modules/privacy-lifecycle/_models/privacy-request-result.interface.d.ts +7 -7
  585. package/build/_modules/privacy-lifecycle/_models/privacy-request-result.interface.js +2 -2
  586. package/build/_modules/privacy-lifecycle/_models/privacy-request-view.interface.d.ts +19 -19
  587. package/build/_modules/privacy-lifecycle/_models/privacy-request-view.interface.js +2 -2
  588. package/build/_modules/privacy-lifecycle/index.d.ts +32 -32
  589. package/build/_modules/privacy-lifecycle/index.js +17 -17
  590. package/build/_modules/privacy-lifecycle/privacy-ledger.control-service.d.ts +27 -27
  591. package/build/_modules/privacy-lifecycle/privacy-ledger.control-service.js +167 -167
  592. package/build/_modules/privacy-lifecycle/privacy-lifecycle.control-service.d.ts +41 -41
  593. package/build/_modules/privacy-lifecycle/privacy-lifecycle.control-service.js +363 -363
  594. package/build/_modules/rate-limit/_enums/rate-limit-store-kind.type-enum.d.ts +5 -5
  595. package/build/_modules/rate-limit/_enums/rate-limit-store-kind.type-enum.js +9 -9
  596. package/build/_modules/rate-limit/_models/rate-limit-config.interface.d.ts +70 -70
  597. package/build/_modules/rate-limit/_models/rate-limit-config.interface.js +2 -2
  598. package/build/_modules/rate-limit/_models/rate-limit-consume-request.interface.d.ts +8 -8
  599. package/build/_modules/rate-limit/_models/rate-limit-consume-request.interface.js +2 -2
  600. package/build/_modules/rate-limit/_models/rate-limit-consume-result.interface.d.ts +6 -6
  601. package/build/_modules/rate-limit/_models/rate-limit-consume-result.interface.js +2 -2
  602. package/build/_modules/rate-limit/_models/rate-limit-policy.interface.d.ts +15 -15
  603. package/build/_modules/rate-limit/_models/rate-limit-policy.interface.js +2 -2
  604. package/build/_modules/rate-limit/_models/rate-limit-store.interface.d.ts +8 -8
  605. package/build/_modules/rate-limit/_models/rate-limit-store.interface.js +2 -2
  606. package/build/_modules/rate-limit/index.d.ts +8 -8
  607. package/build/_modules/rate-limit/index.js +9 -9
  608. package/build/_modules/rate-limit/rate-limit-in-memory.store.d.ts +18 -18
  609. package/build/_modules/rate-limit/rate-limit-in-memory.store.js +70 -70
  610. package/build/_modules/rate-limit/rate-limit.middleware.d.ts +68 -68
  611. package/build/_modules/rate-limit/rate-limit.middleware.js +378 -378
  612. package/build/_modules/scheduler/_models/scheduler-job.interface.d.ts +33 -33
  613. package/build/_modules/scheduler/_models/scheduler-job.interface.js +2 -2
  614. package/build/_modules/scheduler/get-scheduler-routing-module.util.d.ts +17 -17
  615. package/build/_modules/scheduler/get-scheduler-routing-module.util.js +30 -30
  616. package/build/_modules/scheduler/index.d.ts +4 -4
  617. package/build/_modules/scheduler/index.js +9 -9
  618. package/build/_modules/scheduler/scheduler.controller.d.ts +24 -24
  619. package/build/_modules/scheduler/scheduler.controller.js +53 -53
  620. package/build/_modules/scheduler/scheduler.service.d.ts +53 -53
  621. package/build/_modules/scheduler/scheduler.service.js +163 -163
  622. package/build/_modules/scoped-config/_enums/dynts-scoped-config-level.enum.d.ts +18 -18
  623. package/build/_modules/scoped-config/_enums/dynts-scoped-config-level.enum.js +22 -22
  624. package/build/_modules/scoped-config/_models/data-models/dynts-scoped-config.data-model.d.ts +43 -43
  625. package/build/_modules/scoped-config/_models/data-models/dynts-scoped-config.data-model.js +67 -67
  626. package/build/_modules/scoped-config/_models/interfaces/dynts-scoped-config.interface.d.ts +88 -88
  627. package/build/_modules/scoped-config/_models/interfaces/dynts-scoped-config.interface.js +11 -11
  628. package/build/_modules/scoped-config/_services/dynts-scoped-config.control-service.d.ts +83 -83
  629. package/build/_modules/scoped-config/_services/dynts-scoped-config.control-service.js +219 -219
  630. package/build/_modules/scoped-config/_services/dynts-scoped-config.data-service.d.ts +53 -53
  631. package/build/_modules/scoped-config/_services/dynts-scoped-config.data-service.js +75 -75
  632. package/build/_modules/scoped-config/index.d.ts +5 -5
  633. package/build/_modules/scoped-config/index.js +14 -14
  634. package/build/_modules/server/errors/errors.control-service.d.ts +21 -21
  635. package/build/_modules/server/errors/errors.control-service.js +10 -10
  636. package/build/_modules/server/errors/errors.controller.d.ts +144 -144
  637. package/build/_modules/server/errors/errors.controller.js +404 -404
  638. package/build/_modules/server/errors/errors.data-service.d.ts +70 -70
  639. package/build/_modules/server/errors/errors.data-service.js +677 -677
  640. package/build/_modules/server/index.d.ts +15 -15
  641. package/build/_modules/server/index.js +35 -35
  642. package/build/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.d.ts +8 -8
  643. package/build/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.js +12 -12
  644. package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.d.ts +20 -19
  645. package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.d.ts.map +1 -1
  646. package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.js +24 -23
  647. package/build/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.js.map +1 -1
  648. package/build/_modules/server/safe-diagnostic/safe-diagnostic.control-service.d.ts +18 -18
  649. package/build/_modules/server/safe-diagnostic/safe-diagnostic.control-service.js +82 -82
  650. package/build/_modules/server/safe-diagnostic/safe-diagnostic.interface.d.ts +18 -18
  651. package/build/_modules/server/safe-diagnostic/safe-diagnostic.interface.js +2 -2
  652. package/build/_modules/server/server-status/db-readiness-probe-code.type-enum.d.ts +13 -13
  653. package/build/_modules/server/server-status/db-readiness-probe-code.type-enum.js +17 -17
  654. package/build/_modules/server/server-status/db-readiness-probe-stage.type-enum.d.ts +7 -7
  655. package/build/_modules/server/server-status/db-readiness-probe-stage.type-enum.js +11 -11
  656. package/build/_modules/server/server-status/db-readiness-probe.control-service.d.ts +13 -13
  657. package/build/_modules/server/server-status/db-readiness-probe.control-service.js +125 -125
  658. package/build/_modules/server/server-status/db-readiness-probe.interface.d.ts +17 -17
  659. package/build/_modules/server/server-status/db-readiness-probe.interface.js +2 -2
  660. package/build/_modules/server/server-status/server-status-snapshot.control-service.d.ts +4 -4
  661. package/build/_modules/server/server-status/server-status-snapshot.control-service.js +7 -7
  662. package/build/_modules/server/server-status/server-status-snapshot.data-service.d.ts +6 -6
  663. package/build/_modules/server/server-status/server-status-snapshot.data-service.js +22 -22
  664. package/build/_modules/server/server-status/server-status.control-service.d.ts +111 -111
  665. package/build/_modules/server/server-status/server-status.control-service.js +302 -302
  666. package/build/_modules/server/server-status/server-status.controller.d.ts +92 -92
  667. package/build/_modules/server/server-status/server-status.controller.js +253 -253
  668. package/build/_modules/socket/_enums/socket-security.enum.d.ts +10 -10
  669. package/build/_modules/socket/_enums/socket-security.enum.js +14 -14
  670. package/build/_modules/socket/_models/socket-client-service-params.control-model.d.ts +8 -8
  671. package/build/_modules/socket/_models/socket-client-service-params.control-model.js +16 -16
  672. package/build/_modules/socket/_models/socket-presence.control-model.d.ts +25 -25
  673. package/build/_modules/socket/_models/socket-presence.control-model.js +140 -140
  674. package/build/_modules/socket/_models/socket-server-service-params.control-model.d.ts +22 -22
  675. package/build/_modules/socket/_models/socket-server-service-params.control-model.js +31 -31
  676. package/build/_modules/socket/_services/socket-client.service.d.ts +37 -37
  677. package/build/_modules/socket/_services/socket-client.service.js +196 -196
  678. package/build/_modules/socket/_services/socket-server.service.d.ts +98 -98
  679. package/build/_modules/socket/_services/socket-server.service.js +673 -673
  680. package/build/_modules/socket/app-extended.server.d.ts +145 -145
  681. package/build/_modules/socket/app-extended.server.js +521 -521
  682. package/build/_modules/socket/index.d.ts +8 -8
  683. package/build/_modules/socket/index.js +35 -35
  684. package/build/_modules/test/get-test-routing-module.util.d.ts +3 -3
  685. package/build/_modules/test/get-test-routing-module.util.js +16 -16
  686. package/build/_modules/test/index.d.ts +3 -3
  687. package/build/_modules/test/index.js +11 -11
  688. package/build/_modules/test/test.controller.d.ts +5 -5
  689. package/build/_modules/test/test.controller.js +103 -103
  690. package/build/_modules/test-email-sink/_collections/test-email-pattern.const.d.ts +10 -10
  691. package/build/_modules/test-email-sink/_collections/test-email-pattern.const.js +13 -13
  692. package/build/_modules/test-email-sink/_models/data-models/dynts-sent-test-mail.data-model.d.ts +21 -21
  693. package/build/_modules/test-email-sink/_models/data-models/dynts-sent-test-mail.data-model.js +38 -38
  694. package/build/_modules/test-email-sink/_services/dynts-test-email-sink.service.d.ts +49 -49
  695. package/build/_modules/test-email-sink/_services/dynts-test-email-sink.service.js +117 -117
  696. package/build/_modules/test-email-sink/get-sent-mail-routing-module.util.d.ts +14 -14
  697. package/build/_modules/test-email-sink/get-sent-mail-routing-module.util.js +26 -26
  698. package/build/_modules/test-email-sink/index.d.ts +11 -11
  699. package/build/_modules/test-email-sink/index.js +14 -14
  700. package/build/_modules/test-email-sink/test-email-sink.controller.d.ts +23 -23
  701. package/build/_modules/test-email-sink/test-email-sink.controller.js +66 -66
  702. package/build/_modules/usage/get-usage-routing-module.util.d.ts +3 -3
  703. package/build/_modules/usage/get-usage-routing-module.util.js +16 -16
  704. package/build/_modules/usage/index.d.ts +4 -4
  705. package/build/_modules/usage/index.js +13 -13
  706. package/build/_modules/usage/usage.controller.d.ts +6 -6
  707. package/build/_modules/usage/usage.controller.js +105 -105
  708. package/build/_modules/usage/usage.data-service.d.ts +17 -17
  709. package/build/_modules/usage/usage.data-service.js +135 -135
  710. package/build/_services/base/api.service-base.d.ts +9 -9
  711. package/build/_services/base/api.service-base.js +46 -46
  712. package/build/_services/base/archive-data.service.d.ts +25 -25
  713. package/build/_services/base/archive-data.service.js +151 -151
  714. package/build/_services/base/data.service.d.ts +402 -402
  715. package/build/_services/base/data.service.js +2131 -2131
  716. package/build/_services/base/db.service.d.ts +424 -424
  717. package/build/_services/base/db.service.js +1356 -1356
  718. package/build/_services/base/singleton.service-base.d.ts +8 -8
  719. package/build/_services/base/singleton.service-base.js +21 -21
  720. package/build/_services/base/singleton.service.d.ts +11 -11
  721. package/build/_services/base/singleton.service.js +31 -31
  722. package/build/_services/core/api.service.d.ts +45 -45
  723. package/build/_services/core/api.service.js +456 -456
  724. package/build/_services/core/auth.service.d.ts +129 -129
  725. package/build/_services/core/auth.service.js +59 -59
  726. package/build/_services/core/collection-growth-monitor.service.d.ts +76 -76
  727. package/build/_services/core/collection-growth-monitor.service.js +165 -165
  728. package/build/_services/core/db-stats.service.d.ts +33 -33
  729. package/build/_services/core/db-stats.service.js +64 -64
  730. package/build/_services/core/diagnostics.service.d.ts +42 -42
  731. package/build/_services/core/diagnostics.service.js +121 -121
  732. package/build/_services/core/email.service.d.ts +77 -77
  733. package/build/_services/core/email.service.js +503 -503
  734. package/build/_services/core/event-loop-diag.service.d.ts +49 -49
  735. package/build/_services/core/event-loop-diag.service.js +106 -106
  736. package/build/_services/core/global.service.d.ts +83 -83
  737. package/build/_services/core/global.service.js +386 -386
  738. package/build/_services/core/memory-guard.service.d.ts +166 -166
  739. package/build/_services/core/memory-guard.service.js +369 -369
  740. package/build/_services/core/migration-runner.service.d.ts +39 -39
  741. package/build/_services/core/migration-runner.service.js +74 -74
  742. package/build/_services/core/mongo-transaction.control-service.d.ts +18 -18
  743. package/build/_services/core/mongo-transaction.control-service.js +94 -94
  744. package/build/_services/core/request-hunter.service.d.ts +73 -73
  745. package/build/_services/core/request-hunter.service.js +122 -122
  746. package/build/_services/core/service-collection.service.d.ts +4 -4
  747. package/build/_services/core/service-collection.service.js +7 -7
  748. package/build/_services/route/controller.service.d.ts +124 -124
  749. package/build/_services/route/controller.service.js +95 -95
  750. package/build/_services/route/routing-module.service.d.ts +80 -80
  751. package/build/_services/route/routing-module.service.js +250 -250
  752. package/build/_services/server/app.server.d.ts +429 -429
  753. package/build/_services/server/app.server.js +1226 -1226
  754. package/build/_services/shared.static-service.d.ts +43 -36
  755. package/build/_services/shared.static-service.d.ts.map +1 -1
  756. package/build/_services/shared.static-service.js +92 -72
  757. package/build/_services/shared.static-service.js.map +1 -1
  758. package/build/index.d.ts +63 -63
  759. package/build/index.js +101 -101
  760. package/package.json +15 -9
  761. package/src/_models/control-models/app-params.control-model.spec.ts +23 -23
  762. package/src/_models/control-models/app-params.control-model.ts +10 -10
  763. package/src/_models/control-models/endpoint-params.control-model.spec.ts +102 -17
  764. package/src/_models/control-models/endpoint-params.control-model.ts +131 -220
  765. package/src/_modules/server/index.ts +8 -8
  766. package/src/_modules/server/safe-diagnostic/safe-diagnostic-cause.type-enum.ts +8 -8
  767. package/src/_modules/server/safe-diagnostic/safe-diagnostic-stage.type-enum.ts +18 -17
  768. package/src/_modules/server/safe-diagnostic/safe-diagnostic.control-service.spec.ts +124 -124
  769. package/src/_modules/server/safe-diagnostic/safe-diagnostic.control-service.ts +99 -99
  770. package/src/_modules/server/safe-diagnostic/safe-diagnostic.interface.ts +20 -20
  771. package/src/_services/core/global.service.ts +55 -55
  772. package/src/_services/server/app-safe-diagnostic.spec.ts +124 -124
  773. package/src/_services/server/app.server.ts +294 -294
  774. package/src/_services/shared.static-service.spec.ts +43 -9
  775. package/src/_services/shared.static-service.ts +37 -8
@@ -1,678 +1,678 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DyNTS_Errors_DataService = void 0;
4
- const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
5
- const global_settings_const_1 = require("../../../_collections/global-settings.const");
6
- const data_service_1 = require("../../../_services/base/data.service");
7
- class DyNTS_Errors_DataService extends data_service_1.DyNTS_DataService {
8
- /**
9
- * FR-279 — egy error-rekord max merete (byte), amely folott levagjuk az
10
- * `additionalContent`-et. A korabbi kod ezt a szamot HAROM helyen ismetelte
11
- * inline literalkent; nevesitve egy helyen all, es a szerializacio is egyszer fut.
12
- */
13
- static MAX_ERROR_RECORD_BYTES = 16793000;
14
- debugLog = false;
15
- version = global_settings_const_1.DyNTS_global_settings.systemVersion;
16
- duplicationCounter;
17
- /* constructor(
18
- set: {
19
- data?: T_Error,
20
- issuer: string,
21
- },
22
- dataParams: DyFM_DataModel_Params<T_Error>
23
- ) {
24
- super(
25
- new FDP_Errors(set?.data) as T_Error,
26
- dataParams,
27
- set.issuer
28
- );
29
- } */
30
- async recordError(errorsRecord, issuer, alwaysRecord) {
31
- try {
32
- if (issuer && !this.issuer) {
33
- this.issuer = issuer;
34
- }
35
- const errorVersion = this.data?.versions?.length ? this.data?.versions[0] : ('SERVER-' + this.version);
36
- if (!alwaysRecord &&
37
- errorVersion.includes('dev') ||
38
- errorVersion.includes('alpha') ||
39
- errorVersion.includes('beta')) {
40
- fsm_dynamo_1.DyFM_Log.warn('error not saved (dev version)');
41
- return;
42
- }
43
- if (!errorsRecord && this.data) {
44
- errorsRecord = this.data;
45
- }
46
- if (!errorsRecord) {
47
- throw new fsm_dynamo_1.DyFM_Error({
48
- ...this.getDefaultErrorSettings('recordError', new Error('error data is not defined')),
49
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RE1`,
50
- });
51
- }
52
- // FR-069 (2026-06-06): user-level errorokat IS rogzitjuk.
53
- // Korabban a user-level errorokat (pl. login: "No account found", "Wrong password",
54
- // register: "Email already taken" — auth-service `validateNRegisterLogin` chain)
55
- // eldobtak SAVE elott. Eredmeny: a login/register failures nem jelentek meg az
56
- // errors-tablaban, igy a Overseer dashboard-on nem voltak lathato-k, a fejleszto
57
- // nem latta hany failed-login-attempt volt.
58
- // Per memory [[feedback_rich_error_handling]] "EVERY error, rich descriptive,
59
- // persisted to errors table". Plusz [[feedback_error_logging_policy]] "EVERY error
60
- // from a system logs in its OWN table; sister-system-unreachable filtered at source".
61
- // A user-level errorokat is mentjuk — a dashboard-on level-szerinti filter szuri
62
- // (info-debug-warn-error-critical-user), de a rekord MEG van.
63
- if (errorsRecord.message?.includes?.('NullReferenceException')) {
64
- errorsRecord.message += '\n' + errorsRecord.exception.split('() (at <')[0];
65
- }
66
- const duplicateError = await this.findData({
67
- message: errorsRecord.message,
68
- }, true);
69
- errorsRecord.d_error = this.checkErrorIsStringifyableOrResolvable(errorsRecord.d_error, this.issuer);
70
- // ─── FR-279 (2026-08-06) — EGYSZER szerializalunk, nem haromszor ──────────
71
- //
72
- // ⚠️ MERT BUG: ez a blokk KORABBAN akar HAROM teljes `JSON.stringify(errorsRecord)`-ot
73
- // futtatott EGYETLEN error-rekordra, SZINKRON, a fo szalon — es az ELSO eredmenyet
74
- // (a "stringify-elheto-e" teszt) EL IS DOBTA. A meret-plafon 16.7 MB, tehat ezek a
75
- // rekordok tobb-MB-osak lehetnek: haromszoros koltseg, teljesen feleslegesen.
76
- //
77
- // MIERT SZAMIT (mert incidens, overseer 2026-08-06): a status-sweep ~30 rendszert
78
- // pingel; a nem elerhetok 3000 ms-os timeouttal bukanak, es MINDEN bukas egy error-
79
- // rekordot general (teljes `DyNTS_ApiCall_Params` + stack + additionalContent). A
80
- // fagyasok elotti log kizarolag ilyen sorokkal van tele:
81
- // error: "timeout of 3000ms exceeded" / project-statuses.control-services.js:147
82
- // Az event-loop kozben 10-11 masodpercre megall (elLag max 10469-11123 ms), a heap
83
- // 2 GB-ra hizik, es a runnerek `next-job` hivasa timeoutol -> a CI megall.
84
- //
85
- // A szinkron, tobb-MB-os JSON-szerializacio a fo szalon PONTOSAN ilyen blokkot ad —
86
- // es a harmadolasa ingyen van: ugyanaz a viselkedes, egy-ket szerializaciobol.
87
- let serialized;
88
- try {
89
- serialized = JSON.stringify(errorsRecord);
90
- }
91
- catch (err) {
92
- fsm_dynamo_1.DyFM_Log.error('error data is not stringifyable!');
93
- return;
94
- }
95
- if (serialized.length > DyNTS_Errors_DataService.MAX_ERROR_RECORD_BYTES) {
96
- errorsRecord.additionalContent = {
97
- message: 'error data was too big to save, removed additionalContent',
98
- };
99
- errorsRecord.error ??= {};
100
- errorsRecord.error.additionalContent = {
101
- message: 'error data was too big to save, removed additionalContent',
102
- };
103
- // Ujra-meres CSAK a levagas utan — es csak akkor, ha egyaltalan tullogtuk a plafont.
104
- serialized = JSON.stringify(errorsRecord);
105
- if (serialized.length > DyNTS_Errors_DataService.MAX_ERROR_RECORD_BYTES) {
106
- errorsRecord.error.errors = [];
107
- }
108
- }
109
- if (duplicateError &&
110
- duplicateError?.message === errorsRecord?.message) {
111
- if (!errorsRecord.__created) {
112
- errorsRecord.__created = new Date();
113
- }
114
- this.duplicationCounter = duplicateError.count + 1;
115
- const duplicateRecordUpdate = {
116
- $inc: {
117
- count: 1,
118
- priority: this.getPriorityMultiplierByLevel(errorsRecord?.level),
119
- },
120
- };
121
- // 2026-06-02 fix: a `$addToSet: { versions: { $push: errorVersion } }`
122
- // formátum a MongoDB-be LITERAL `{$push: '<version>'}`-objektumot ír be
123
- // a tömbbe, NEM a `$addToSet`-szemantikát alkalmazza. A helyes alak
124
- // egyszerűen `$addToSet: { versions: errorVersion }` — a `$addToSet`
125
- // önállóan idempotensen ad hozzá értéket a tömbhöz.
126
- errorsRecord.versions ??= [];
127
- if (!errorsRecord.versions.includes(errorVersion)) {
128
- duplicateRecordUpdate.$addToSet = {
129
- versions: errorVersion,
130
- };
131
- }
132
- // 2026-08-07 — a LEGUTOLSO elofordulas kontextusa.
133
- //
134
- // MERT BUG: ez az ag eddig CSAK `$inc`-elt, ezert az `additionalContent` AZ ELSO
135
- // elofordulasnal BEFAGYOTT. Egy hosszu eletu hibanal a diagnosztika orokre a hetekkel-
136
- // honapokkal ezelotti elso esethez tartozott, es a kesobb bevezetett gazdagabb kontextus
137
- // (origin / referer / user-agent / header-kulcsok) SOHA nem jutott el a rekordba.
138
- //
139
- // ELESBEN MERVE: az overseer `No authentication provided` rekordja 68 587 elofordulasnal
140
- // tartott, `additionalContent`-je viszont csak egy regi `endpointInfo` volt. A hivot igy
141
- // KIZAROLAG a szerver-logbol lehetett volna azonositani — az viszont ~13 percenkent forog,
142
- // egy loketszeru (~1/perc) esemenynel pedig rendszeresen elveti. A hibarekordbol NEM
143
- // lehetett megmondani, KI hivja.
144
- //
145
- // Az `additionalContent` (elso elofordulas) VALTOZATLAN marad — semmi nem vesz el; ez egy
146
- // KULON mezo a legfrissebb esetnek. Igy a "mikor kezdodott" es a "ki csinalja MOST" kerdes
147
- // egyszerre valaszolhato meg a rekordbol.
148
- if (errorsRecord.additionalContent !== undefined) {
149
- duplicateRecordUpdate.$set = {
150
- ...(duplicateRecordUpdate.$set ?? {}),
151
- lastOccurrenceContent: errorsRecord.additionalContent,
152
- lastOccurrenceAt: new Date(),
153
- };
154
- }
155
- // Regression detect — a duplicate-ag-on egy NEW occurrence érkezett.
156
- // Ha mar volt fix-attempt erre az error-ra, es a jelenlegi version
157
- // ujabb vagy egyenlo mint a fix-attempt verzioja, akkor a hipotezis
158
- // nem zarta le a problemat → flag-eljuk a dashboardnak.
159
- if (duplicateError.lastFixedInVersion &&
160
- DyNTS_Errors_DataService.isVersionAtLeast(errorVersion, duplicateError.lastFixedInVersion)) {
161
- // Auto-reactivation: a recurrence carrying a version >= the last
162
- // claimed-fix version means the fix did not hold → flip back to an
163
- // active-again state. `regressed` (not plain `active`) so the next
164
- // investigator knows a prior hypothesis already failed.
165
- duplicateRecordUpdate.$set = {
166
- ...(duplicateRecordUpdate.$set ?? {}),
167
- regressedAfterFix: true,
168
- status: fsm_dynamo_1.DyFM_ErrorStatus.regressed,
169
- };
170
- }
171
- await this.updateData({
172
- filterBy: { _id: duplicateError._id },
173
- update: duplicateRecordUpdate,
174
- });
175
- // ezt majd ha leülepedett, hogy biztos nem kellenek a deep duplication-ök
176
- // (a WB-ban kellhettek a user és pc config info-k)
177
- /* if (!duplicateError.duplications.includes(data.stackTrace)) {
178
- await this.updateData({
179
- filterBy: { _id: duplicateError._id } as DyFM_DBFilter<Error_T>,
180
- update: {
181
- $push: { duplications: DyFM_Object.clone(data) },
182
- } as DyNTS_DBUpdate<Error_T>,
183
- }).catch((pushError) => {
184
- DyFM_Log.error('pushError:', pushError);
185
- });
186
- } */
187
- fsm_dynamo_1.DyFM_Log.error('error found, not saving ("known" error), but increased count, ' +
188
- '\ncount:', duplicateError.count + 1);
189
- fsm_dynamo_1.DyFM_Log.error('ErrorMsg:', errorsRecord?.message?.replace(/\n/g, ' \n'));
190
- if (this.debugLog)
191
- fsm_dynamo_1.DyFM_Log.error('Error:', errorsRecord);
192
- }
193
- else {
194
- fsm_dynamo_1.DyFM_Log.log('error not found, saving....');
195
- fsm_dynamo_1.DyFM_Log.error('ErrorMsg:', errorsRecord?.message?.replace(/\n/g, ' \n'));
196
- if (this.debugLog)
197
- fsm_dynamo_1.DyFM_Log.error('Error:', errorsRecord);
198
- errorsRecord.priority = this.getPriorityMultiplierByLevel(errorsRecord?.level);
199
- // 2026-06-02 fix: count default — a `recordError`-t loose `any`-obj-
200
- // ektummal hivo path-ok (pl. systemUnreachable / buildFailure hook a
201
- // host-app-ban) nem inicializaltak a `count: 1`-et a DyFM_Errors class
202
- // konstruktor-default helyett. A schema-ban sincs default, igy a
203
- // Mongoose-record-on `undefined` maradt. Most explicit.
204
- errorsRecord.count ??= 1;
205
- errorsRecord.duplications ??= [];
206
- errorsRecord.duplications.push(fsm_dynamo_1.DyFM_Object.clone(errorsRecord));
207
- errorsRecord.versions ??= [];
208
- errorsRecord.versions.push(errorVersion);
209
- // New error → starts life as `active` (default on the data-model, set
210
- // explicitly here for loose-`any` record paths that bypass the ctor default).
211
- errorsRecord.status ??= fsm_dynamo_1.DyFM_ErrorStatus.active;
212
- this.duplicationCounter = 1;
213
- // FR-027 (2026-05-24) — Pass `errorsRecord` explicitly. Korabban
214
- // `saveData()` no-arg fallback `ensureData()`-on keresztul `this.data`-t
215
- // hasznalt, ami a controller-szinten csak a `{issuer}` constructor
216
- // wrapper, NEM az actual req.body adat. Eredmenykent minden client-
217
- // forwarded error EMPTY rekordkent landolt: csak `issuer` mezo,
218
- // semmilyen message/source/stackTrace/error/level/additionalContent
219
- // mezo NEM kerult MongoDB-be. (Overseer-en 14454 ilyen empty record
220
- // halmozodott fel — debug-level details elveszve.)
221
- await this.saveData(errorsRecord);
222
- fsm_dynamo_1.DyFM_Log.warn('error saved');
223
- }
224
- }
225
- catch (error) {
226
- fsm_dynamo_1.DyFM_Error.logSimple('recordError error', error);
227
- /* if (error instanceof DyFM_Error) {
228
- error.logSimple('recordError error');
229
- } else {
230
- DyFM_Log.error('recordError error:', error);
231
- } */
232
- /* throw new DyFM_Error({
233
- ...this.getDefaultErrorSettings(
234
- 'recordError',
235
- error
236
- ),
237
-
238
- errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RE0`,
239
- }); */
240
- }
241
- }
242
- async createErrorRecord(error, issuer) {
243
- try {
244
- if (error?.flag?.includes(fsm_dynamo_1.DyFM_errorFlag)) {
245
- return new fsm_dynamo_1.DyFM_Errors({
246
- issuer: this.issuer,
247
- versions: ['SERVER-' + this.version],
248
- source: 'INTERNAL-SERVER-ERROR: ' + error?.___issuerService,
249
- stackTrace: error?._errorCodes,
250
- error: error?.getErrorSimplified?.(),
251
- level: error?.level ?? fsm_dynamo_1.DyFM_ErrorLevel.error,
252
- message: error?._message,
253
- exceptionObj: error?.errors?.map((e) => e?.getErrorSimplified?.() ?? ''),
254
- additionalContent: error?.additionalContent,
255
- });
256
- }
257
- else {
258
- return new fsm_dynamo_1.DyFM_Errors({
259
- issuer: this.issuer,
260
- versions: ['SERVER-' + this.version],
261
- source: 'UNEXPECTED-SERVER-ERROR',
262
- stackTrace: error?.stack?.split?.('\n'),
263
- error: error,
264
- level: fsm_dynamo_1.DyFM_ErrorLevel.critical,
265
- message: error?.message,
266
- exceptionObj: error?.stack?.split?.('\n'),
267
- });
268
- }
269
- }
270
- catch (error) {
271
- throw new fsm_dynamo_1.DyFM_Error({
272
- ...this.getDefaultErrorSettings('createErrorRecord', error),
273
- });
274
- }
275
- }
276
- async handleExternalError(error, issuer, alwaysRecord) {
277
- try {
278
- if (this.debugLog)
279
- fsm_dynamo_1.DyFM_Log.log('handleExternalError');
280
- if (issuer && !this.issuer) {
281
- this.issuer = issuer;
282
- }
283
- const errorsRecord = await this.createErrorRecord(error, this.issuer);
284
- await this.recordError(errorsRecord, this.issuer, alwaysRecord);
285
- }
286
- catch (error) {
287
- throw new fsm_dynamo_1.DyFM_Error({
288
- ...this.getDefaultErrorSettings('handleExternalError', error),
289
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-HE0`,
290
- });
291
- }
292
- }
293
- async handleInternalError(error, issuer, alwaysRecord) {
294
- try {
295
- if (this.debugLog)
296
- fsm_dynamo_1.DyFM_Log.log('handleInternalError');
297
- if (issuer && !this.issuer) {
298
- this.issuer = issuer;
299
- }
300
- const errorsRecord = await this.createErrorRecord(error, this.issuer);
301
- /* if (!(error as FDP_Errors)?.flag?.includes('WB-ERROR-OBJECT')) {
302
- DyFM_Log.H_error('__ERROR__:', error);
303
- } */
304
- await this.recordError(errorsRecord, this.issuer, alwaysRecord);
305
- fsm_dynamo_1.DyFM_Error.logSimple(`DyNTS_Error_DataService handling InternalError...`, error);
306
- /* if (
307
- DyNTS_global_settings.log_settings.highDetailedLogs ||
308
- !(error instanceof DyFM_Error)
309
- ) {
310
- DyFM_Log.H_error(
311
- `DyNTS_Error_DataService handling InternalError...`,
312
- `\n ERROR:`, error
313
- );
314
- } else {
315
- error.logSimple(
316
- `DyNTS_Error_DataService handling InternalError...`
317
- );
318
- } */
319
- }
320
- catch (error) {
321
- fsm_dynamo_1.DyFM_Error.logSimple('handleInternalError error', error);
322
- /* if (error instanceof DyFM_Error) {
323
- error.logSimple('handleInternalError error');
324
- } else {
325
- DyFM_Log.error('handleInternalError error:', error);
326
- } */
327
- }
328
- }
329
- checkErrorIsStringifyableOrResolvable(error, issuer) {
330
- try {
331
- if (issuer && !this.issuer) {
332
- this.issuer = issuer;
333
- }
334
- JSON.stringify(error);
335
- }
336
- catch (err) {
337
- fsm_dynamo_1.DyFM_Error.logSimple('checkErrorIsStringifyableOrResolvable error', err);
338
- /* if (err instanceof DyFM_Error) {
339
- err.logSimple('checkErrorIsStringifyableOrResolvable error');
340
- } else {
341
- DyFM_Log.error('checkErrorIsStringifyableOrResolvable error:', err);
342
- } */
343
- error = fsm_dynamo_1.DyFM_Object.resolveCirculation(error);
344
- try {
345
- JSON.stringify(error);
346
- }
347
- catch (err) {
348
- delete error.additionalContent;
349
- try {
350
- JSON.stringify(error);
351
- }
352
- catch (errr) {
353
- fsm_dynamo_1.DyFM_Error.logSimple('checkErrorIsStringifyableOrResolvable error', errr);
354
- /* if (err instanceof DyFM_Error) {
355
- err.logSimple('error data is not stringifyable! resolution failed! will not save!');
356
- } else {
357
- DyFM_Log.error('error data is not stringifyable! resolution failed! will not save!', err);
358
- } */
359
- return 'UNRESOLVABLE';
360
- }
361
- fsm_dynamo_1.DyFM_Log.error('error data was too big to save, removed additionalContent');
362
- }
363
- }
364
- return error;
365
- }
366
- getPriorityMultiplierByLevel(level) {
367
- switch (level) {
368
- case fsm_dynamo_1.DyFM_ErrorLevel.critical:
369
- case fsm_dynamo_1.DyFM_ErrorLevel.fatal:
370
- return 1000;
371
- case fsm_dynamo_1.DyFM_ErrorLevel.error:
372
- case fsm_dynamo_1.DyFM_ErrorLevel.serious:
373
- return 100;
374
- case fsm_dynamo_1.DyFM_ErrorLevel.buildFailure:
375
- return 50;
376
- case fsm_dynamo_1.DyFM_ErrorLevel.systemUnreachable:
377
- return 20;
378
- case fsm_dynamo_1.DyFM_ErrorLevel.warning:
379
- return 10;
380
- case fsm_dynamo_1.DyFM_ErrorLevel.info:
381
- case fsm_dynamo_1.DyFM_ErrorLevel.debug:
382
- case fsm_dynamo_1.DyFM_ErrorLevel.known:
383
- return 0.01;
384
- case fsm_dynamo_1.DyFM_ErrorLevel.user:
385
- default:
386
- return 0;
387
- }
388
- }
389
- async getErrorsFromDate(date, issuer) {
390
- try {
391
- if (issuer && !this.issuer) {
392
- this.issuer = issuer;
393
- }
394
- const errors = await this.findDataList({ __created: { $gte: date } });
395
- return fsm_dynamo_1.DyFM_Array.paged(errors, 0, 100);
396
- }
397
- catch (error) {
398
- throw new fsm_dynamo_1.DyFM_Error({
399
- ...this.getDefaultErrorSettings('getErrorsFromDate', error),
400
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GED0`,
401
- });
402
- }
403
- }
404
- async deleteError(errorId, issuer, alwaysDelete) {
405
- try {
406
- if (issuer && !this.issuer) {
407
- this.issuer = issuer;
408
- }
409
- await this.deleteData(errorId, alwaysDelete);
410
- }
411
- catch (error) {
412
- throw new fsm_dynamo_1.DyFM_Error({
413
- ...this.getDefaultErrorSettings('deleteError', error),
414
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-DE0`,
415
- });
416
- }
417
- }
418
- async deleteAllErrors(issuer, alwaysDelete) {
419
- try {
420
- if (issuer && !this.issuer) {
421
- this.issuer = issuer;
422
- }
423
- await this.deleteAllData(alwaysDelete);
424
- }
425
- catch (error) {
426
- throw new fsm_dynamo_1.DyFM_Error({
427
- ...this.getDefaultErrorSettings('deleteAllErrors', error),
428
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-DAE0`,
429
- });
430
- }
431
- }
432
- /**
433
- * Record a "we think this is fixed" claim on an existing error.
434
- *
435
- * Append-only: every call pushes a new `DyFM_Errors_FixAttempt` to
436
- * `fixAttempts[]` and updates the `last*` aliases for quick reads.
437
- * Also clears `regressedAfterFix` so the dashboard treats the error as
438
- * freshly-claimed-fixed; if a new occurrence arrives with a version
439
- * `>= version`, `recordError` will flip the flag back on.
440
- */
441
- async recordFixAttempt(errorId, version, hypothesis, issuer, notes) {
442
- try {
443
- if (issuer && !this.issuer) {
444
- this.issuer = issuer;
445
- }
446
- const existing = await this.findData({ _id: errorId });
447
- if (!existing) {
448
- throw new fsm_dynamo_1.DyFM_Error({
449
- ...this.getDefaultErrorSettings('recordFixAttempt', new Error(`error not found: ${errorId}`)),
450
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RFA0`,
451
- });
452
- }
453
- const attempt = {
454
- at: new Date(),
455
- by: issuer,
456
- version: version,
457
- hypothesis: hypothesis,
458
- ...(notes ? { notes: notes } : {}),
459
- };
460
- const nextAttempts = [
461
- ...(existing.fixAttempts ?? []),
462
- attempt,
463
- ];
464
- await this.updateData({
465
- filterBy: { _id: errorId },
466
- update: {
467
- $set: {
468
- fixAttempts: nextAttempts,
469
- lastFixedAt: attempt.at,
470
- lastFixedBy: attempt.by,
471
- lastFixedInVersion: attempt.version,
472
- lastFixHypothesis: attempt.hypothesis,
473
- regressedAfterFix: false,
474
- status: fsm_dynamo_1.DyFM_ErrorStatus.fixed,
475
- },
476
- },
477
- });
478
- return attempt;
479
- }
480
- catch (error) {
481
- throw new fsm_dynamo_1.DyFM_Error({
482
- ...this.getDefaultErrorSettings('recordFixAttempt', error),
483
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RFA1`,
484
- });
485
- }
486
- }
487
- /**
488
- * Soft-resolve an error: set `status = fixed` and KEEP the record (unlike
489
- * `deleteError` / `markErrorDone` which hard-delete). Keeping the record is
490
- * what enables auto-reactivation — a later recurrence (`recordError`) with a
491
- * version >= the last claimed-fix version flips it to `regressed`.
492
- *
493
- * Optional `notes` are stored on `resolutionNotes`. Clears `regressedAfterFix`.
494
- * Does NOT append a `fixAttempt` (use `recordFixAttempt` when there is a
495
- * version + hypothesis to log); this is the lightweight "mark as handled" path.
496
- */
497
- async resolveError(errorId, issuer, notes) {
498
- try {
499
- if (issuer && !this.issuer) {
500
- this.issuer = issuer;
501
- }
502
- const existing = await this.findData({ _id: errorId });
503
- if (!existing) {
504
- throw new fsm_dynamo_1.DyFM_Error({
505
- ...this.getDefaultErrorSettings('resolveError', new Error(`error not found: ${errorId}`)),
506
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RES0`,
507
- });
508
- }
509
- await this.updateData({
510
- filterBy: { _id: errorId },
511
- update: {
512
- $set: {
513
- status: fsm_dynamo_1.DyFM_ErrorStatus.fixed,
514
- regressedAfterFix: false,
515
- ...(notes ? { resolutionNotes: notes } : {}),
516
- },
517
- },
518
- });
519
- }
520
- catch (error) {
521
- throw new fsm_dynamo_1.DyFM_Error({
522
- ...this.getDefaultErrorSettings('resolveError', error),
523
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RES1`,
524
- });
525
- }
526
- }
527
- /**
528
- * Paged errors filtered by lifecycle `status` (active / investigating / fixed
529
- * / regressed). An empty or `'all'` status returns everything (same semantics
530
- * as `getErrorsPaged`). Mirrors `getErrorsByCategoryPaged`.
531
- */
532
- async getErrorsByStatusPaged(status, range, pageSize, pageIndex, issuer) {
533
- try {
534
- if (issuer && !this.issuer) {
535
- this.issuer = issuer;
536
- }
537
- const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
538
- const filter = { __lastModified: { $gte: fromDate } };
539
- if (status && status !== 'all') {
540
- filter.status = status;
541
- }
542
- let errors = await this.findDataList(filter);
543
- errors = errors.sort((a, b) => b.priority - a.priority);
544
- return fsm_dynamo_1.DyFM_Array.paged(errors, pageIndex, pageSize);
545
- }
546
- catch (error) {
547
- throw new fsm_dynamo_1.DyFM_Error({
548
- ...this.getDefaultErrorSettings('getErrorsByStatusPaged', error),
549
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GBSP0`,
550
- });
551
- }
552
- }
553
- /**
554
- * Loose numeric compare of two version strings of shape `MAJOR.MINOR.PATCH`
555
- * (`01.15.117`). Pads missing segments with 0. Non-numeric segments are
556
- * treated as 0 — version strings carrying prefixes like `SERVER-` from
557
- * `recordError` are caller-stripped before this is invoked.
558
- *
559
- * Returns true when `a >= b`.
560
- */
561
- static isVersionAtLeast(a, b) {
562
- if (!a || !b) {
563
- return false;
564
- }
565
- const strip = (v) => v.replace(/^[^0-9]+/, '');
566
- const parse = (v) => strip(v).split('.').map(s => Number(s) || 0);
567
- const aParts = parse(a);
568
- const bParts = parse(b);
569
- const len = Math.max(aParts.length, bParts.length);
570
- for (let i = 0; i < len; i++) {
571
- const av = aParts[i] ?? 0;
572
- const bv = bParts[i] ?? 0;
573
- if (av > bv) {
574
- return true;
575
- }
576
- if (av < bv) {
577
- return false;
578
- }
579
- }
580
- return true;
581
- }
582
- async getErrorsInRange(range, issuer) {
583
- try {
584
- if (issuer && !this.issuer) {
585
- this.issuer = issuer;
586
- }
587
- const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
588
- let errors = await this.findDataList({ __lastModified: { $gte: fromDate } });
589
- errors = errors.sort((a, b) => b.priority - a.priority);
590
- return fsm_dynamo_1.DyFM_Array.paged(errors, 0, 10);
591
- }
592
- catch (error) {
593
- throw new fsm_dynamo_1.DyFM_Error({
594
- ...this.getDefaultErrorSettings('getErrorsInRange', error),
595
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GIR0`,
596
- });
597
- }
598
- }
599
- async getErrorsPaged(range, pageSize, pageIndex, issuer) {
600
- try {
601
- if (issuer && !this.issuer) {
602
- this.issuer = issuer;
603
- }
604
- const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
605
- let errors = await this.findDataList({ __lastModified: { $gte: fromDate } });
606
- errors = errors.sort((a, b) => b.priority - a.priority);
607
- return fsm_dynamo_1.DyFM_Array.paged(errors, pageIndex, pageSize);
608
- }
609
- catch (error) {
610
- throw new fsm_dynamo_1.DyFM_Error({
611
- ...this.getDefaultErrorSettings('getErrorsPaged', error),
612
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GIP0`,
613
- });
614
- }
615
- }
616
- /**
617
- * Paged-eredmenyek a `category` mezo szerint. A frontend "Errors" page tab-jai
618
- * (Application / System Unreachable / Build Failure) ezt hivjak. Egy ures-
619
- * vagy `'all'` kategoria mindent visszaad (azonos szemantikaval mint a
620
- * `getErrorsPaged`-tel).
621
- */
622
- async getErrorsByCategoryPaged(category, range, pageSize, pageIndex, issuer) {
623
- try {
624
- if (issuer && !this.issuer) {
625
- this.issuer = issuer;
626
- }
627
- const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
628
- const filter = { __lastModified: { $gte: fromDate } };
629
- if (category && category !== 'all') {
630
- filter.category = category;
631
- }
632
- let errors = await this.findDataList(filter);
633
- errors = errors.sort((a, b) => b.priority - a.priority);
634
- return fsm_dynamo_1.DyFM_Array.paged(errors, pageIndex, pageSize);
635
- }
636
- catch (error) {
637
- throw new fsm_dynamo_1.DyFM_Error({
638
- ...this.getDefaultErrorSettings('getErrorsByCategoryPaged', error),
639
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GBCP0`,
640
- });
641
- }
642
- }
643
- async getLastErrors(range, pageSize, pageIndex, issuer) {
644
- try {
645
- if (issuer && !this.issuer) {
646
- this.issuer = issuer;
647
- }
648
- const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
649
- let errors = await this.findDataList({
650
- __lastModified: { $gte: fromDate }
651
- });
652
- errors = errors.sort((a, b) => +b.__lastModified - +a.__lastModified);
653
- return fsm_dynamo_1.DyFM_Array.paged(errors, pageIndex, pageSize);
654
- }
655
- catch (error) {
656
- throw new fsm_dynamo_1.DyFM_Error({
657
- ...this.getDefaultErrorSettings('getLastErrors', error),
658
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GLE0`,
659
- });
660
- }
661
- }
662
- async searchErrors(searchQuery, issuer) {
663
- try {
664
- if (issuer && !this.issuer) {
665
- this.issuer = issuer;
666
- }
667
- return await this.searchData(searchQuery);
668
- }
669
- catch (error) {
670
- throw new fsm_dynamo_1.DyFM_Error({
671
- ...this.getDefaultErrorSettings('searchErrors', error),
672
- errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-SE0`,
673
- });
674
- }
675
- }
676
- }
677
- exports.DyNTS_Errors_DataService = DyNTS_Errors_DataService;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_Errors_DataService = void 0;
4
+ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
5
+ const global_settings_const_1 = require("../../../_collections/global-settings.const");
6
+ const data_service_1 = require("../../../_services/base/data.service");
7
+ class DyNTS_Errors_DataService extends data_service_1.DyNTS_DataService {
8
+ /**
9
+ * FR-279 — egy error-rekord max merete (byte), amely folott levagjuk az
10
+ * `additionalContent`-et. A korabbi kod ezt a szamot HAROM helyen ismetelte
11
+ * inline literalkent; nevesitve egy helyen all, es a szerializacio is egyszer fut.
12
+ */
13
+ static MAX_ERROR_RECORD_BYTES = 16793000;
14
+ debugLog = false;
15
+ version = global_settings_const_1.DyNTS_global_settings.systemVersion;
16
+ duplicationCounter;
17
+ /* constructor(
18
+ set: {
19
+ data?: T_Error,
20
+ issuer: string,
21
+ },
22
+ dataParams: DyFM_DataModel_Params<T_Error>
23
+ ) {
24
+ super(
25
+ new FDP_Errors(set?.data) as T_Error,
26
+ dataParams,
27
+ set.issuer
28
+ );
29
+ } */
30
+ async recordError(errorsRecord, issuer, alwaysRecord) {
31
+ try {
32
+ if (issuer && !this.issuer) {
33
+ this.issuer = issuer;
34
+ }
35
+ const errorVersion = this.data?.versions?.length ? this.data?.versions[0] : ('SERVER-' + this.version);
36
+ if (!alwaysRecord &&
37
+ errorVersion.includes('dev') ||
38
+ errorVersion.includes('alpha') ||
39
+ errorVersion.includes('beta')) {
40
+ fsm_dynamo_1.DyFM_Log.warn('error not saved (dev version)');
41
+ return;
42
+ }
43
+ if (!errorsRecord && this.data) {
44
+ errorsRecord = this.data;
45
+ }
46
+ if (!errorsRecord) {
47
+ throw new fsm_dynamo_1.DyFM_Error({
48
+ ...this.getDefaultErrorSettings('recordError', new Error('error data is not defined')),
49
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RE1`,
50
+ });
51
+ }
52
+ // FR-069 (2026-06-06): user-level errorokat IS rogzitjuk.
53
+ // Korabban a user-level errorokat (pl. login: "No account found", "Wrong password",
54
+ // register: "Email already taken" — auth-service `validateNRegisterLogin` chain)
55
+ // eldobtak SAVE elott. Eredmeny: a login/register failures nem jelentek meg az
56
+ // errors-tablaban, igy a Overseer dashboard-on nem voltak lathato-k, a fejleszto
57
+ // nem latta hany failed-login-attempt volt.
58
+ // Per memory [[feedback_rich_error_handling]] "EVERY error, rich descriptive,
59
+ // persisted to errors table". Plusz [[feedback_error_logging_policy]] "EVERY error
60
+ // from a system logs in its OWN table; sister-system-unreachable filtered at source".
61
+ // A user-level errorokat is mentjuk — a dashboard-on level-szerinti filter szuri
62
+ // (info-debug-warn-error-critical-user), de a rekord MEG van.
63
+ if (errorsRecord.message?.includes?.('NullReferenceException')) {
64
+ errorsRecord.message += '\n' + errorsRecord.exception.split('() (at <')[0];
65
+ }
66
+ const duplicateError = await this.findData({
67
+ message: errorsRecord.message,
68
+ }, true);
69
+ errorsRecord.d_error = this.checkErrorIsStringifyableOrResolvable(errorsRecord.d_error, this.issuer);
70
+ // ─── FR-279 (2026-08-06) — EGYSZER szerializalunk, nem haromszor ──────────
71
+ //
72
+ // ⚠️ MERT BUG: ez a blokk KORABBAN akar HAROM teljes `JSON.stringify(errorsRecord)`-ot
73
+ // futtatott EGYETLEN error-rekordra, SZINKRON, a fo szalon — es az ELSO eredmenyet
74
+ // (a "stringify-elheto-e" teszt) EL IS DOBTA. A meret-plafon 16.7 MB, tehat ezek a
75
+ // rekordok tobb-MB-osak lehetnek: haromszoros koltseg, teljesen feleslegesen.
76
+ //
77
+ // MIERT SZAMIT (mert incidens, overseer 2026-08-06): a status-sweep ~30 rendszert
78
+ // pingel; a nem elerhetok 3000 ms-os timeouttal bukanak, es MINDEN bukas egy error-
79
+ // rekordot general (teljes `DyNTS_ApiCall_Params` + stack + additionalContent). A
80
+ // fagyasok elotti log kizarolag ilyen sorokkal van tele:
81
+ // error: "timeout of 3000ms exceeded" / project-statuses.control-services.js:147
82
+ // Az event-loop kozben 10-11 masodpercre megall (elLag max 10469-11123 ms), a heap
83
+ // 2 GB-ra hizik, es a runnerek `next-job` hivasa timeoutol -> a CI megall.
84
+ //
85
+ // A szinkron, tobb-MB-os JSON-szerializacio a fo szalon PONTOSAN ilyen blokkot ad —
86
+ // es a harmadolasa ingyen van: ugyanaz a viselkedes, egy-ket szerializaciobol.
87
+ let serialized;
88
+ try {
89
+ serialized = JSON.stringify(errorsRecord);
90
+ }
91
+ catch (err) {
92
+ fsm_dynamo_1.DyFM_Log.error('error data is not stringifyable!');
93
+ return;
94
+ }
95
+ if (serialized.length > DyNTS_Errors_DataService.MAX_ERROR_RECORD_BYTES) {
96
+ errorsRecord.additionalContent = {
97
+ message: 'error data was too big to save, removed additionalContent',
98
+ };
99
+ errorsRecord.error ??= {};
100
+ errorsRecord.error.additionalContent = {
101
+ message: 'error data was too big to save, removed additionalContent',
102
+ };
103
+ // Ujra-meres CSAK a levagas utan — es csak akkor, ha egyaltalan tullogtuk a plafont.
104
+ serialized = JSON.stringify(errorsRecord);
105
+ if (serialized.length > DyNTS_Errors_DataService.MAX_ERROR_RECORD_BYTES) {
106
+ errorsRecord.error.errors = [];
107
+ }
108
+ }
109
+ if (duplicateError &&
110
+ duplicateError?.message === errorsRecord?.message) {
111
+ if (!errorsRecord.__created) {
112
+ errorsRecord.__created = new Date();
113
+ }
114
+ this.duplicationCounter = duplicateError.count + 1;
115
+ const duplicateRecordUpdate = {
116
+ $inc: {
117
+ count: 1,
118
+ priority: this.getPriorityMultiplierByLevel(errorsRecord?.level),
119
+ },
120
+ };
121
+ // 2026-06-02 fix: a `$addToSet: { versions: { $push: errorVersion } }`
122
+ // formátum a MongoDB-be LITERAL `{$push: '<version>'}`-objektumot ír be
123
+ // a tömbbe, NEM a `$addToSet`-szemantikát alkalmazza. A helyes alak
124
+ // egyszerűen `$addToSet: { versions: errorVersion }` — a `$addToSet`
125
+ // önállóan idempotensen ad hozzá értéket a tömbhöz.
126
+ errorsRecord.versions ??= [];
127
+ if (!errorsRecord.versions.includes(errorVersion)) {
128
+ duplicateRecordUpdate.$addToSet = {
129
+ versions: errorVersion,
130
+ };
131
+ }
132
+ // 2026-08-07 — a LEGUTOLSO elofordulas kontextusa.
133
+ //
134
+ // MERT BUG: ez az ag eddig CSAK `$inc`-elt, ezert az `additionalContent` AZ ELSO
135
+ // elofordulasnal BEFAGYOTT. Egy hosszu eletu hibanal a diagnosztika orokre a hetekkel-
136
+ // honapokkal ezelotti elso esethez tartozott, es a kesobb bevezetett gazdagabb kontextus
137
+ // (origin / referer / user-agent / header-kulcsok) SOHA nem jutott el a rekordba.
138
+ //
139
+ // ELESBEN MERVE: az overseer `No authentication provided` rekordja 68 587 elofordulasnal
140
+ // tartott, `additionalContent`-je viszont csak egy regi `endpointInfo` volt. A hivot igy
141
+ // KIZAROLAG a szerver-logbol lehetett volna azonositani — az viszont ~13 percenkent forog,
142
+ // egy loketszeru (~1/perc) esemenynel pedig rendszeresen elveti. A hibarekordbol NEM
143
+ // lehetett megmondani, KI hivja.
144
+ //
145
+ // Az `additionalContent` (elso elofordulas) VALTOZATLAN marad — semmi nem vesz el; ez egy
146
+ // KULON mezo a legfrissebb esetnek. Igy a "mikor kezdodott" es a "ki csinalja MOST" kerdes
147
+ // egyszerre valaszolhato meg a rekordbol.
148
+ if (errorsRecord.additionalContent !== undefined) {
149
+ duplicateRecordUpdate.$set = {
150
+ ...(duplicateRecordUpdate.$set ?? {}),
151
+ lastOccurrenceContent: errorsRecord.additionalContent,
152
+ lastOccurrenceAt: new Date(),
153
+ };
154
+ }
155
+ // Regression detect — a duplicate-ag-on egy NEW occurrence érkezett.
156
+ // Ha mar volt fix-attempt erre az error-ra, es a jelenlegi version
157
+ // ujabb vagy egyenlo mint a fix-attempt verzioja, akkor a hipotezis
158
+ // nem zarta le a problemat → flag-eljuk a dashboardnak.
159
+ if (duplicateError.lastFixedInVersion &&
160
+ DyNTS_Errors_DataService.isVersionAtLeast(errorVersion, duplicateError.lastFixedInVersion)) {
161
+ // Auto-reactivation: a recurrence carrying a version >= the last
162
+ // claimed-fix version means the fix did not hold → flip back to an
163
+ // active-again state. `regressed` (not plain `active`) so the next
164
+ // investigator knows a prior hypothesis already failed.
165
+ duplicateRecordUpdate.$set = {
166
+ ...(duplicateRecordUpdate.$set ?? {}),
167
+ regressedAfterFix: true,
168
+ status: fsm_dynamo_1.DyFM_ErrorStatus.regressed,
169
+ };
170
+ }
171
+ await this.updateData({
172
+ filterBy: { _id: duplicateError._id },
173
+ update: duplicateRecordUpdate,
174
+ });
175
+ // ezt majd ha leülepedett, hogy biztos nem kellenek a deep duplication-ök
176
+ // (a WB-ban kellhettek a user és pc config info-k)
177
+ /* if (!duplicateError.duplications.includes(data.stackTrace)) {
178
+ await this.updateData({
179
+ filterBy: { _id: duplicateError._id } as DyFM_DBFilter<Error_T>,
180
+ update: {
181
+ $push: { duplications: DyFM_Object.clone(data) },
182
+ } as DyNTS_DBUpdate<Error_T>,
183
+ }).catch((pushError) => {
184
+ DyFM_Log.error('pushError:', pushError);
185
+ });
186
+ } */
187
+ fsm_dynamo_1.DyFM_Log.error('error found, not saving ("known" error), but increased count, ' +
188
+ '\ncount:', duplicateError.count + 1);
189
+ fsm_dynamo_1.DyFM_Log.error('ErrorMsg:', errorsRecord?.message?.replace(/\n/g, ' \n'));
190
+ if (this.debugLog)
191
+ fsm_dynamo_1.DyFM_Log.error('Error:', errorsRecord);
192
+ }
193
+ else {
194
+ fsm_dynamo_1.DyFM_Log.log('error not found, saving....');
195
+ fsm_dynamo_1.DyFM_Log.error('ErrorMsg:', errorsRecord?.message?.replace(/\n/g, ' \n'));
196
+ if (this.debugLog)
197
+ fsm_dynamo_1.DyFM_Log.error('Error:', errorsRecord);
198
+ errorsRecord.priority = this.getPriorityMultiplierByLevel(errorsRecord?.level);
199
+ // 2026-06-02 fix: count default — a `recordError`-t loose `any`-obj-
200
+ // ektummal hivo path-ok (pl. systemUnreachable / buildFailure hook a
201
+ // host-app-ban) nem inicializaltak a `count: 1`-et a DyFM_Errors class
202
+ // konstruktor-default helyett. A schema-ban sincs default, igy a
203
+ // Mongoose-record-on `undefined` maradt. Most explicit.
204
+ errorsRecord.count ??= 1;
205
+ errorsRecord.duplications ??= [];
206
+ errorsRecord.duplications.push(fsm_dynamo_1.DyFM_Object.clone(errorsRecord));
207
+ errorsRecord.versions ??= [];
208
+ errorsRecord.versions.push(errorVersion);
209
+ // New error → starts life as `active` (default on the data-model, set
210
+ // explicitly here for loose-`any` record paths that bypass the ctor default).
211
+ errorsRecord.status ??= fsm_dynamo_1.DyFM_ErrorStatus.active;
212
+ this.duplicationCounter = 1;
213
+ // FR-027 (2026-05-24) — Pass `errorsRecord` explicitly. Korabban
214
+ // `saveData()` no-arg fallback `ensureData()`-on keresztul `this.data`-t
215
+ // hasznalt, ami a controller-szinten csak a `{issuer}` constructor
216
+ // wrapper, NEM az actual req.body adat. Eredmenykent minden client-
217
+ // forwarded error EMPTY rekordkent landolt: csak `issuer` mezo,
218
+ // semmilyen message/source/stackTrace/error/level/additionalContent
219
+ // mezo NEM kerult MongoDB-be. (Overseer-en 14454 ilyen empty record
220
+ // halmozodott fel — debug-level details elveszve.)
221
+ await this.saveData(errorsRecord);
222
+ fsm_dynamo_1.DyFM_Log.warn('error saved');
223
+ }
224
+ }
225
+ catch (error) {
226
+ fsm_dynamo_1.DyFM_Error.logSimple('recordError error', error);
227
+ /* if (error instanceof DyFM_Error) {
228
+ error.logSimple('recordError error');
229
+ } else {
230
+ DyFM_Log.error('recordError error:', error);
231
+ } */
232
+ /* throw new DyFM_Error({
233
+ ...this.getDefaultErrorSettings(
234
+ 'recordError',
235
+ error
236
+ ),
237
+
238
+ errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RE0`,
239
+ }); */
240
+ }
241
+ }
242
+ async createErrorRecord(error, issuer) {
243
+ try {
244
+ if (error?.flag?.includes(fsm_dynamo_1.DyFM_errorFlag)) {
245
+ return new fsm_dynamo_1.DyFM_Errors({
246
+ issuer: this.issuer,
247
+ versions: ['SERVER-' + this.version],
248
+ source: 'INTERNAL-SERVER-ERROR: ' + error?.___issuerService,
249
+ stackTrace: error?._errorCodes,
250
+ error: error?.getErrorSimplified?.(),
251
+ level: error?.level ?? fsm_dynamo_1.DyFM_ErrorLevel.error,
252
+ message: error?._message,
253
+ exceptionObj: error?.errors?.map((e) => e?.getErrorSimplified?.() ?? ''),
254
+ additionalContent: error?.additionalContent,
255
+ });
256
+ }
257
+ else {
258
+ return new fsm_dynamo_1.DyFM_Errors({
259
+ issuer: this.issuer,
260
+ versions: ['SERVER-' + this.version],
261
+ source: 'UNEXPECTED-SERVER-ERROR',
262
+ stackTrace: error?.stack?.split?.('\n'),
263
+ error: error,
264
+ level: fsm_dynamo_1.DyFM_ErrorLevel.critical,
265
+ message: error?.message,
266
+ exceptionObj: error?.stack?.split?.('\n'),
267
+ });
268
+ }
269
+ }
270
+ catch (error) {
271
+ throw new fsm_dynamo_1.DyFM_Error({
272
+ ...this.getDefaultErrorSettings('createErrorRecord', error),
273
+ });
274
+ }
275
+ }
276
+ async handleExternalError(error, issuer, alwaysRecord) {
277
+ try {
278
+ if (this.debugLog)
279
+ fsm_dynamo_1.DyFM_Log.log('handleExternalError');
280
+ if (issuer && !this.issuer) {
281
+ this.issuer = issuer;
282
+ }
283
+ const errorsRecord = await this.createErrorRecord(error, this.issuer);
284
+ await this.recordError(errorsRecord, this.issuer, alwaysRecord);
285
+ }
286
+ catch (error) {
287
+ throw new fsm_dynamo_1.DyFM_Error({
288
+ ...this.getDefaultErrorSettings('handleExternalError', error),
289
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-HE0`,
290
+ });
291
+ }
292
+ }
293
+ async handleInternalError(error, issuer, alwaysRecord) {
294
+ try {
295
+ if (this.debugLog)
296
+ fsm_dynamo_1.DyFM_Log.log('handleInternalError');
297
+ if (issuer && !this.issuer) {
298
+ this.issuer = issuer;
299
+ }
300
+ const errorsRecord = await this.createErrorRecord(error, this.issuer);
301
+ /* if (!(error as FDP_Errors)?.flag?.includes('WB-ERROR-OBJECT')) {
302
+ DyFM_Log.H_error('__ERROR__:', error);
303
+ } */
304
+ await this.recordError(errorsRecord, this.issuer, alwaysRecord);
305
+ fsm_dynamo_1.DyFM_Error.logSimple(`DyNTS_Error_DataService handling InternalError...`, error);
306
+ /* if (
307
+ DyNTS_global_settings.log_settings.highDetailedLogs ||
308
+ !(error instanceof DyFM_Error)
309
+ ) {
310
+ DyFM_Log.H_error(
311
+ `DyNTS_Error_DataService handling InternalError...`,
312
+ `\n ERROR:`, error
313
+ );
314
+ } else {
315
+ error.logSimple(
316
+ `DyNTS_Error_DataService handling InternalError...`
317
+ );
318
+ } */
319
+ }
320
+ catch (error) {
321
+ fsm_dynamo_1.DyFM_Error.logSimple('handleInternalError error', error);
322
+ /* if (error instanceof DyFM_Error) {
323
+ error.logSimple('handleInternalError error');
324
+ } else {
325
+ DyFM_Log.error('handleInternalError error:', error);
326
+ } */
327
+ }
328
+ }
329
+ checkErrorIsStringifyableOrResolvable(error, issuer) {
330
+ try {
331
+ if (issuer && !this.issuer) {
332
+ this.issuer = issuer;
333
+ }
334
+ JSON.stringify(error);
335
+ }
336
+ catch (err) {
337
+ fsm_dynamo_1.DyFM_Error.logSimple('checkErrorIsStringifyableOrResolvable error', err);
338
+ /* if (err instanceof DyFM_Error) {
339
+ err.logSimple('checkErrorIsStringifyableOrResolvable error');
340
+ } else {
341
+ DyFM_Log.error('checkErrorIsStringifyableOrResolvable error:', err);
342
+ } */
343
+ error = fsm_dynamo_1.DyFM_Object.resolveCirculation(error);
344
+ try {
345
+ JSON.stringify(error);
346
+ }
347
+ catch (err) {
348
+ delete error.additionalContent;
349
+ try {
350
+ JSON.stringify(error);
351
+ }
352
+ catch (errr) {
353
+ fsm_dynamo_1.DyFM_Error.logSimple('checkErrorIsStringifyableOrResolvable error', errr);
354
+ /* if (err instanceof DyFM_Error) {
355
+ err.logSimple('error data is not stringifyable! resolution failed! will not save!');
356
+ } else {
357
+ DyFM_Log.error('error data is not stringifyable! resolution failed! will not save!', err);
358
+ } */
359
+ return 'UNRESOLVABLE';
360
+ }
361
+ fsm_dynamo_1.DyFM_Log.error('error data was too big to save, removed additionalContent');
362
+ }
363
+ }
364
+ return error;
365
+ }
366
+ getPriorityMultiplierByLevel(level) {
367
+ switch (level) {
368
+ case fsm_dynamo_1.DyFM_ErrorLevel.critical:
369
+ case fsm_dynamo_1.DyFM_ErrorLevel.fatal:
370
+ return 1000;
371
+ case fsm_dynamo_1.DyFM_ErrorLevel.error:
372
+ case fsm_dynamo_1.DyFM_ErrorLevel.serious:
373
+ return 100;
374
+ case fsm_dynamo_1.DyFM_ErrorLevel.buildFailure:
375
+ return 50;
376
+ case fsm_dynamo_1.DyFM_ErrorLevel.systemUnreachable:
377
+ return 20;
378
+ case fsm_dynamo_1.DyFM_ErrorLevel.warning:
379
+ return 10;
380
+ case fsm_dynamo_1.DyFM_ErrorLevel.info:
381
+ case fsm_dynamo_1.DyFM_ErrorLevel.debug:
382
+ case fsm_dynamo_1.DyFM_ErrorLevel.known:
383
+ return 0.01;
384
+ case fsm_dynamo_1.DyFM_ErrorLevel.user:
385
+ default:
386
+ return 0;
387
+ }
388
+ }
389
+ async getErrorsFromDate(date, issuer) {
390
+ try {
391
+ if (issuer && !this.issuer) {
392
+ this.issuer = issuer;
393
+ }
394
+ const errors = await this.findDataList({ __created: { $gte: date } });
395
+ return fsm_dynamo_1.DyFM_Array.paged(errors, 0, 100);
396
+ }
397
+ catch (error) {
398
+ throw new fsm_dynamo_1.DyFM_Error({
399
+ ...this.getDefaultErrorSettings('getErrorsFromDate', error),
400
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GED0`,
401
+ });
402
+ }
403
+ }
404
+ async deleteError(errorId, issuer, alwaysDelete) {
405
+ try {
406
+ if (issuer && !this.issuer) {
407
+ this.issuer = issuer;
408
+ }
409
+ await this.deleteData(errorId, alwaysDelete);
410
+ }
411
+ catch (error) {
412
+ throw new fsm_dynamo_1.DyFM_Error({
413
+ ...this.getDefaultErrorSettings('deleteError', error),
414
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-DE0`,
415
+ });
416
+ }
417
+ }
418
+ async deleteAllErrors(issuer, alwaysDelete) {
419
+ try {
420
+ if (issuer && !this.issuer) {
421
+ this.issuer = issuer;
422
+ }
423
+ await this.deleteAllData(alwaysDelete);
424
+ }
425
+ catch (error) {
426
+ throw new fsm_dynamo_1.DyFM_Error({
427
+ ...this.getDefaultErrorSettings('deleteAllErrors', error),
428
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-DAE0`,
429
+ });
430
+ }
431
+ }
432
+ /**
433
+ * Record a "we think this is fixed" claim on an existing error.
434
+ *
435
+ * Append-only: every call pushes a new `DyFM_Errors_FixAttempt` to
436
+ * `fixAttempts[]` and updates the `last*` aliases for quick reads.
437
+ * Also clears `regressedAfterFix` so the dashboard treats the error as
438
+ * freshly-claimed-fixed; if a new occurrence arrives with a version
439
+ * `>= version`, `recordError` will flip the flag back on.
440
+ */
441
+ async recordFixAttempt(errorId, version, hypothesis, issuer, notes) {
442
+ try {
443
+ if (issuer && !this.issuer) {
444
+ this.issuer = issuer;
445
+ }
446
+ const existing = await this.findData({ _id: errorId });
447
+ if (!existing) {
448
+ throw new fsm_dynamo_1.DyFM_Error({
449
+ ...this.getDefaultErrorSettings('recordFixAttempt', new Error(`error not found: ${errorId}`)),
450
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RFA0`,
451
+ });
452
+ }
453
+ const attempt = {
454
+ at: new Date(),
455
+ by: issuer,
456
+ version: version,
457
+ hypothesis: hypothesis,
458
+ ...(notes ? { notes: notes } : {}),
459
+ };
460
+ const nextAttempts = [
461
+ ...(existing.fixAttempts ?? []),
462
+ attempt,
463
+ ];
464
+ await this.updateData({
465
+ filterBy: { _id: errorId },
466
+ update: {
467
+ $set: {
468
+ fixAttempts: nextAttempts,
469
+ lastFixedAt: attempt.at,
470
+ lastFixedBy: attempt.by,
471
+ lastFixedInVersion: attempt.version,
472
+ lastFixHypothesis: attempt.hypothesis,
473
+ regressedAfterFix: false,
474
+ status: fsm_dynamo_1.DyFM_ErrorStatus.fixed,
475
+ },
476
+ },
477
+ });
478
+ return attempt;
479
+ }
480
+ catch (error) {
481
+ throw new fsm_dynamo_1.DyFM_Error({
482
+ ...this.getDefaultErrorSettings('recordFixAttempt', error),
483
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RFA1`,
484
+ });
485
+ }
486
+ }
487
+ /**
488
+ * Soft-resolve an error: set `status = fixed` and KEEP the record (unlike
489
+ * `deleteError` / `markErrorDone` which hard-delete). Keeping the record is
490
+ * what enables auto-reactivation — a later recurrence (`recordError`) with a
491
+ * version >= the last claimed-fix version flips it to `regressed`.
492
+ *
493
+ * Optional `notes` are stored on `resolutionNotes`. Clears `regressedAfterFix`.
494
+ * Does NOT append a `fixAttempt` (use `recordFixAttempt` when there is a
495
+ * version + hypothesis to log); this is the lightweight "mark as handled" path.
496
+ */
497
+ async resolveError(errorId, issuer, notes) {
498
+ try {
499
+ if (issuer && !this.issuer) {
500
+ this.issuer = issuer;
501
+ }
502
+ const existing = await this.findData({ _id: errorId });
503
+ if (!existing) {
504
+ throw new fsm_dynamo_1.DyFM_Error({
505
+ ...this.getDefaultErrorSettings('resolveError', new Error(`error not found: ${errorId}`)),
506
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RES0`,
507
+ });
508
+ }
509
+ await this.updateData({
510
+ filterBy: { _id: errorId },
511
+ update: {
512
+ $set: {
513
+ status: fsm_dynamo_1.DyFM_ErrorStatus.fixed,
514
+ regressedAfterFix: false,
515
+ ...(notes ? { resolutionNotes: notes } : {}),
516
+ },
517
+ },
518
+ });
519
+ }
520
+ catch (error) {
521
+ throw new fsm_dynamo_1.DyFM_Error({
522
+ ...this.getDefaultErrorSettings('resolveError', error),
523
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-RES1`,
524
+ });
525
+ }
526
+ }
527
+ /**
528
+ * Paged errors filtered by lifecycle `status` (active / investigating / fixed
529
+ * / regressed). An empty or `'all'` status returns everything (same semantics
530
+ * as `getErrorsPaged`). Mirrors `getErrorsByCategoryPaged`.
531
+ */
532
+ async getErrorsByStatusPaged(status, range, pageSize, pageIndex, issuer) {
533
+ try {
534
+ if (issuer && !this.issuer) {
535
+ this.issuer = issuer;
536
+ }
537
+ const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
538
+ const filter = { __lastModified: { $gte: fromDate } };
539
+ if (status && status !== 'all') {
540
+ filter.status = status;
541
+ }
542
+ let errors = await this.findDataList(filter);
543
+ errors = errors.sort((a, b) => b.priority - a.priority);
544
+ return fsm_dynamo_1.DyFM_Array.paged(errors, pageIndex, pageSize);
545
+ }
546
+ catch (error) {
547
+ throw new fsm_dynamo_1.DyFM_Error({
548
+ ...this.getDefaultErrorSettings('getErrorsByStatusPaged', error),
549
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GBSP0`,
550
+ });
551
+ }
552
+ }
553
+ /**
554
+ * Loose numeric compare of two version strings of shape `MAJOR.MINOR.PATCH`
555
+ * (`01.15.117`). Pads missing segments with 0. Non-numeric segments are
556
+ * treated as 0 — version strings carrying prefixes like `SERVER-` from
557
+ * `recordError` are caller-stripped before this is invoked.
558
+ *
559
+ * Returns true when `a >= b`.
560
+ */
561
+ static isVersionAtLeast(a, b) {
562
+ if (!a || !b) {
563
+ return false;
564
+ }
565
+ const strip = (v) => v.replace(/^[^0-9]+/, '');
566
+ const parse = (v) => strip(v).split('.').map(s => Number(s) || 0);
567
+ const aParts = parse(a);
568
+ const bParts = parse(b);
569
+ const len = Math.max(aParts.length, bParts.length);
570
+ for (let i = 0; i < len; i++) {
571
+ const av = aParts[i] ?? 0;
572
+ const bv = bParts[i] ?? 0;
573
+ if (av > bv) {
574
+ return true;
575
+ }
576
+ if (av < bv) {
577
+ return false;
578
+ }
579
+ }
580
+ return true;
581
+ }
582
+ async getErrorsInRange(range, issuer) {
583
+ try {
584
+ if (issuer && !this.issuer) {
585
+ this.issuer = issuer;
586
+ }
587
+ const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
588
+ let errors = await this.findDataList({ __lastModified: { $gte: fromDate } });
589
+ errors = errors.sort((a, b) => b.priority - a.priority);
590
+ return fsm_dynamo_1.DyFM_Array.paged(errors, 0, 10);
591
+ }
592
+ catch (error) {
593
+ throw new fsm_dynamo_1.DyFM_Error({
594
+ ...this.getDefaultErrorSettings('getErrorsInRange', error),
595
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GIR0`,
596
+ });
597
+ }
598
+ }
599
+ async getErrorsPaged(range, pageSize, pageIndex, issuer) {
600
+ try {
601
+ if (issuer && !this.issuer) {
602
+ this.issuer = issuer;
603
+ }
604
+ const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
605
+ let errors = await this.findDataList({ __lastModified: { $gte: fromDate } });
606
+ errors = errors.sort((a, b) => b.priority - a.priority);
607
+ return fsm_dynamo_1.DyFM_Array.paged(errors, pageIndex, pageSize);
608
+ }
609
+ catch (error) {
610
+ throw new fsm_dynamo_1.DyFM_Error({
611
+ ...this.getDefaultErrorSettings('getErrorsPaged', error),
612
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GIP0`,
613
+ });
614
+ }
615
+ }
616
+ /**
617
+ * Paged-eredmenyek a `category` mezo szerint. A frontend "Errors" page tab-jai
618
+ * (Application / System Unreachable / Build Failure) ezt hivjak. Egy ures-
619
+ * vagy `'all'` kategoria mindent visszaad (azonos szemantikaval mint a
620
+ * `getErrorsPaged`-tel).
621
+ */
622
+ async getErrorsByCategoryPaged(category, range, pageSize, pageIndex, issuer) {
623
+ try {
624
+ if (issuer && !this.issuer) {
625
+ this.issuer = issuer;
626
+ }
627
+ const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
628
+ const filter = { __lastModified: { $gte: fromDate } };
629
+ if (category && category !== 'all') {
630
+ filter.category = category;
631
+ }
632
+ let errors = await this.findDataList(filter);
633
+ errors = errors.sort((a, b) => b.priority - a.priority);
634
+ return fsm_dynamo_1.DyFM_Array.paged(errors, pageIndex, pageSize);
635
+ }
636
+ catch (error) {
637
+ throw new fsm_dynamo_1.DyFM_Error({
638
+ ...this.getDefaultErrorSettings('getErrorsByCategoryPaged', error),
639
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GBCP0`,
640
+ });
641
+ }
642
+ }
643
+ async getLastErrors(range, pageSize, pageIndex, issuer) {
644
+ try {
645
+ if (issuer && !this.issuer) {
646
+ this.issuer = issuer;
647
+ }
648
+ const fromDate = fsm_dynamo_1.DyFM_Time.getDateByRelativeDate(range);
649
+ let errors = await this.findDataList({
650
+ __lastModified: { $gte: fromDate }
651
+ });
652
+ errors = errors.sort((a, b) => +b.__lastModified - +a.__lastModified);
653
+ return fsm_dynamo_1.DyFM_Array.paged(errors, pageIndex, pageSize);
654
+ }
655
+ catch (error) {
656
+ throw new fsm_dynamo_1.DyFM_Error({
657
+ ...this.getDefaultErrorSettings('getLastErrors', error),
658
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-GLE0`,
659
+ });
660
+ }
661
+ }
662
+ async searchErrors(searchQuery, issuer) {
663
+ try {
664
+ if (issuer && !this.issuer) {
665
+ this.issuer = issuer;
666
+ }
667
+ return await this.searchData(searchQuery);
668
+ }
669
+ catch (error) {
670
+ throw new fsm_dynamo_1.DyFM_Error({
671
+ ...this.getDefaultErrorSettings('searchErrors', error),
672
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-EDS-SE0`,
673
+ });
674
+ }
675
+ }
676
+ }
677
+ exports.DyNTS_Errors_DataService = DyNTS_Errors_DataService;
678
678
  //# sourceMappingURL=errors.data-service.js.map