@decaf-ts/core 0.18.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (668) hide show
  1. package/lib/cjs/auth/constants.cjs +2 -2
  2. package/lib/cjs/auth/constants.cjs.map +1 -0
  3. package/lib/cjs/auth/decorators.cjs +1 -0
  4. package/lib/cjs/auth/decorators.cjs.map +1 -0
  5. package/lib/cjs/auth/index.cjs +1 -0
  6. package/lib/cjs/auth/index.cjs.map +1 -0
  7. package/lib/cjs/fs/FilesystemAdapter.cjs +40 -39
  8. package/lib/cjs/fs/FilesystemAdapter.cjs.map +1 -0
  9. package/lib/cjs/fs/FsDispatch.cjs +3 -2
  10. package/lib/cjs/fs/FsDispatch.cjs.map +1 -0
  11. package/lib/cjs/fs/helpers.cjs +1 -0
  12. package/lib/cjs/fs/helpers.cjs.map +1 -0
  13. package/lib/cjs/fs/index.cjs +1 -0
  14. package/lib/cjs/fs/index.cjs.map +1 -0
  15. package/lib/cjs/fs/indexStore.cjs +8 -7
  16. package/lib/cjs/fs/indexStore.cjs.map +1 -0
  17. package/lib/cjs/fs/locks/FilesystemLock.cjs +3 -2
  18. package/lib/cjs/fs/locks/FilesystemLock.cjs.map +1 -0
  19. package/lib/cjs/fs/locks/FilesystemMultiLock.cjs +5 -4
  20. package/lib/cjs/fs/locks/FilesystemMultiLock.cjs.map +1 -0
  21. package/lib/cjs/fs/types.cjs +1 -0
  22. package/lib/cjs/fs/types.cjs.map +1 -0
  23. package/lib/cjs/identity/decorators.cjs +11 -10
  24. package/lib/cjs/identity/decorators.cjs.map +1 -0
  25. package/lib/cjs/identity/index.cjs +1 -0
  26. package/lib/cjs/identity/index.cjs.map +1 -0
  27. package/lib/cjs/index.cjs +4 -3
  28. package/lib/cjs/index.cjs.map +1 -0
  29. package/lib/cjs/interfaces/ContextuallyLogged.cjs +1 -0
  30. package/lib/cjs/interfaces/ContextuallyLogged.cjs.map +1 -0
  31. package/lib/cjs/interfaces/ErrorParser.cjs +1 -0
  32. package/lib/cjs/interfaces/ErrorParser.cjs.map +1 -0
  33. package/lib/cjs/interfaces/Executor.cjs +1 -0
  34. package/lib/cjs/interfaces/Executor.cjs.map +1 -0
  35. package/lib/cjs/interfaces/Observable.cjs +1 -0
  36. package/lib/cjs/interfaces/Observable.cjs.map +1 -0
  37. package/lib/cjs/interfaces/Observer.cjs +1 -0
  38. package/lib/cjs/interfaces/Observer.cjs.map +1 -0
  39. package/lib/cjs/interfaces/Paginatable.cjs +1 -0
  40. package/lib/cjs/interfaces/Paginatable.cjs.map +1 -0
  41. package/lib/cjs/interfaces/Queriable.cjs +1 -0
  42. package/lib/cjs/interfaces/Queriable.cjs.map +1 -0
  43. package/lib/cjs/interfaces/RawExecutor.cjs +1 -0
  44. package/lib/cjs/interfaces/RawExecutor.cjs.map +1 -0
  45. package/lib/cjs/interfaces/SequenceOptions.cjs +1 -0
  46. package/lib/cjs/interfaces/SequenceOptions.cjs.map +1 -0
  47. package/lib/cjs/interfaces/index.cjs +1 -0
  48. package/lib/cjs/interfaces/index.cjs.map +1 -0
  49. package/lib/cjs/migrations/Migration.cjs +16 -15
  50. package/lib/cjs/migrations/Migration.cjs.map +1 -0
  51. package/lib/cjs/migrations/MigrationService.cjs +38 -37
  52. package/lib/cjs/migrations/MigrationService.cjs.map +1 -0
  53. package/lib/cjs/migrations/MigrationTaskBuilder.cjs +3 -2
  54. package/lib/cjs/migrations/MigrationTaskBuilder.cjs.map +1 -0
  55. package/lib/cjs/migrations/MigrationTasks.cjs +22 -17
  56. package/lib/cjs/migrations/MigrationTasks.cjs.map +1 -0
  57. package/lib/cjs/migrations/MigrationVersioning.cjs +1 -0
  58. package/lib/cjs/migrations/MigrationVersioning.cjs.map +1 -0
  59. package/lib/cjs/migrations/SemverMigrationVersioning.cjs +1 -0
  60. package/lib/cjs/migrations/SemverMigrationVersioning.cjs.map +1 -0
  61. package/lib/cjs/migrations/StandardMigrationVersioning.cjs +1 -0
  62. package/lib/cjs/migrations/StandardMigrationVersioning.cjs.map +1 -0
  63. package/lib/cjs/migrations/constants.cjs +3 -2
  64. package/lib/cjs/migrations/constants.cjs.map +1 -0
  65. package/lib/cjs/migrations/decorators.cjs +10 -9
  66. package/lib/cjs/migrations/decorators.cjs.map +1 -0
  67. package/lib/cjs/migrations/index.cjs +6 -5
  68. package/lib/cjs/migrations/index.cjs.map +1 -0
  69. package/lib/cjs/migrations/types.cjs +1 -0
  70. package/lib/cjs/migrations/types.cjs.map +1 -0
  71. package/lib/cjs/model/BaseModel.cjs +14 -8
  72. package/lib/cjs/model/BaseModel.cjs.map +1 -0
  73. package/lib/cjs/model/SequenceModel.cjs +19 -13
  74. package/lib/cjs/model/SequenceModel.cjs.map +1 -0
  75. package/lib/cjs/model/construction.cjs +27 -26
  76. package/lib/cjs/model/construction.cjs.map +1 -0
  77. package/lib/cjs/model/decorators.cjs +48 -47
  78. package/lib/cjs/model/decorators.cjs.map +1 -0
  79. package/lib/cjs/model/index.cjs +1 -0
  80. package/lib/cjs/model/index.cjs.map +1 -0
  81. package/lib/cjs/model/indexing.cjs +6 -5
  82. package/lib/cjs/model/indexing.cjs.map +1 -0
  83. package/lib/cjs/model/types.cjs +1 -0
  84. package/lib/cjs/model/types.cjs.map +1 -0
  85. package/lib/cjs/overrides/Metadata.cjs +1 -0
  86. package/lib/cjs/overrides/Metadata.cjs.map +1 -0
  87. package/lib/cjs/overrides/Model.cjs +1 -0
  88. package/lib/cjs/overrides/Model.cjs.map +1 -0
  89. package/lib/cjs/overrides/ModelBuilder.cjs +1 -0
  90. package/lib/cjs/overrides/ModelBuilder.cjs.map +1 -0
  91. package/lib/cjs/overrides/index.cjs +1 -0
  92. package/lib/cjs/overrides/index.cjs.map +1 -0
  93. package/lib/cjs/overrides/injectables.cjs +1 -0
  94. package/lib/cjs/overrides/injectables.cjs.map +1 -0
  95. package/lib/cjs/overrides/overrides.cjs +22 -21
  96. package/lib/cjs/overrides/overrides.cjs.map +1 -0
  97. package/lib/cjs/persistence/Adapter.cjs +47 -41
  98. package/lib/cjs/persistence/Adapter.cjs.map +1 -0
  99. package/lib/cjs/persistence/Context.cjs +10 -7
  100. package/lib/cjs/persistence/Context.cjs.map +1 -0
  101. package/lib/cjs/persistence/ContextLock.cjs +1 -0
  102. package/lib/cjs/persistence/ContextLock.cjs.map +1 -0
  103. package/lib/cjs/persistence/Dispatch.cjs +15 -14
  104. package/lib/cjs/persistence/Dispatch.cjs.map +1 -0
  105. package/lib/cjs/persistence/ObserverHandler.cjs +3 -2
  106. package/lib/cjs/persistence/ObserverHandler.cjs.map +1 -0
  107. package/lib/cjs/persistence/Sequence.cjs +19 -18
  108. package/lib/cjs/persistence/Sequence.cjs.map +1 -0
  109. package/lib/cjs/persistence/constants.cjs +14 -21
  110. package/lib/cjs/persistence/constants.cjs.map +1 -0
  111. package/lib/cjs/persistence/decorators.cjs +6 -5
  112. package/lib/cjs/persistence/decorators.cjs.map +1 -0
  113. package/lib/cjs/persistence/errors.cjs +1 -0
  114. package/lib/cjs/persistence/errors.cjs.map +1 -0
  115. package/lib/cjs/persistence/event-filters.cjs +5 -4
  116. package/lib/cjs/persistence/event-filters.cjs.map +1 -0
  117. package/lib/cjs/persistence/generators.cjs +1 -0
  118. package/lib/cjs/persistence/generators.cjs.map +1 -0
  119. package/lib/cjs/persistence/index.cjs +1 -0
  120. package/lib/cjs/persistence/index.cjs.map +1 -0
  121. package/lib/cjs/persistence/transactions.cjs +9 -8
  122. package/lib/cjs/persistence/transactions.cjs.map +1 -0
  123. package/lib/cjs/persistence/types.cjs +1 -0
  124. package/lib/cjs/persistence/types.cjs.map +1 -0
  125. package/lib/cjs/query/Condition.cjs +173 -165
  126. package/lib/cjs/query/Condition.cjs.map +1 -0
  127. package/lib/cjs/query/MethodQueryBuilder.cjs +37 -34
  128. package/lib/cjs/query/MethodQueryBuilder.cjs.map +1 -0
  129. package/lib/cjs/query/Paginator.cjs +28 -27
  130. package/lib/cjs/query/Paginator.cjs.map +1 -0
  131. package/lib/cjs/query/Statement.cjs +90 -84
  132. package/lib/cjs/query/Statement.cjs.map +1 -0
  133. package/lib/cjs/query/constants.cjs +5 -21
  134. package/lib/cjs/query/constants.cjs.map +1 -0
  135. package/lib/cjs/query/decorators.cjs +16 -15
  136. package/lib/cjs/query/decorators.cjs.map +1 -0
  137. package/lib/cjs/query/errors.cjs +1 -0
  138. package/lib/cjs/query/errors.cjs.map +1 -0
  139. package/lib/cjs/query/index.cjs +1 -0
  140. package/lib/cjs/query/index.cjs.map +1 -0
  141. package/lib/cjs/query/options.cjs +1 -0
  142. package/lib/cjs/query/options.cjs.map +1 -0
  143. package/lib/cjs/query/selectors.cjs +1 -0
  144. package/lib/cjs/query/selectors.cjs.map +1 -0
  145. package/lib/cjs/query/types.cjs +2 -13
  146. package/lib/cjs/query/types.cjs.map +1 -0
  147. package/lib/cjs/query/utils.cjs +10 -9
  148. package/lib/cjs/query/utils.cjs.map +1 -0
  149. package/lib/cjs/ram/RamAdapter.cjs +21 -20
  150. package/lib/cjs/ram/RamAdapter.cjs.map +1 -0
  151. package/lib/cjs/ram/RamPaginator.cjs +3 -2
  152. package/lib/cjs/ram/RamPaginator.cjs.map +1 -0
  153. package/lib/cjs/ram/RamStatement.cjs +38 -37
  154. package/lib/cjs/ram/RamStatement.cjs.map +1 -0
  155. package/lib/cjs/ram/constants.cjs +1 -0
  156. package/lib/cjs/ram/constants.cjs.map +1 -0
  157. package/lib/cjs/ram/handlers.cjs +3 -2
  158. package/lib/cjs/ram/handlers.cjs.map +1 -0
  159. package/lib/cjs/ram/index.cjs +8 -7
  160. package/lib/cjs/ram/index.cjs.map +1 -0
  161. package/lib/cjs/ram/types.cjs +1 -0
  162. package/lib/cjs/ram/types.cjs.map +1 -0
  163. package/lib/cjs/repository/Repository.cjs +85 -79
  164. package/lib/cjs/repository/Repository.cjs.map +1 -0
  165. package/lib/cjs/repository/constants.cjs +5 -20
  166. package/lib/cjs/repository/constants.cjs.map +1 -0
  167. package/lib/cjs/repository/decorators.cjs +7 -6
  168. package/lib/cjs/repository/decorators.cjs.map +1 -0
  169. package/lib/cjs/repository/errors.cjs +1 -0
  170. package/lib/cjs/repository/errors.cjs.map +1 -0
  171. package/lib/cjs/repository/index.cjs +1 -0
  172. package/lib/cjs/repository/index.cjs.map +1 -0
  173. package/lib/cjs/repository/injectables.cjs +14 -13
  174. package/lib/cjs/repository/injectables.cjs.map +1 -0
  175. package/lib/cjs/repository/types.cjs +1 -0
  176. package/lib/cjs/repository/types.cjs.map +1 -0
  177. package/lib/cjs/repository/utils.cjs +3 -2
  178. package/lib/cjs/repository/utils.cjs.map +1 -0
  179. package/lib/cjs/services/ModelService.cjs +36 -30
  180. package/lib/cjs/services/ModelService.cjs.map +1 -0
  181. package/lib/cjs/services/PersistenceService.cjs +9 -8
  182. package/lib/cjs/services/PersistenceService.cjs.map +1 -0
  183. package/lib/cjs/services/index.cjs +1 -0
  184. package/lib/cjs/services/index.cjs.map +1 -0
  185. package/lib/cjs/services/services.cjs +37 -31
  186. package/lib/cjs/services/services.cjs.map +1 -0
  187. package/lib/cjs/tasks/CleanUpTask.cjs +30 -24
  188. package/lib/cjs/tasks/CleanUpTask.cjs.map +1 -0
  189. package/lib/cjs/tasks/TaskContext.cjs +16 -15
  190. package/lib/cjs/tasks/TaskContext.cjs.map +1 -0
  191. package/lib/cjs/tasks/TaskEngine.cjs +112 -111
  192. package/lib/cjs/tasks/TaskEngine.cjs.map +1 -0
  193. package/lib/cjs/tasks/TaskErrors.cjs +1 -0
  194. package/lib/cjs/tasks/TaskErrors.cjs.map +1 -0
  195. package/lib/cjs/tasks/TaskEventBus.cjs +7 -6
  196. package/lib/cjs/tasks/TaskEventBus.cjs.map +1 -0
  197. package/lib/cjs/tasks/TaskEventService.cjs +8 -7
  198. package/lib/cjs/tasks/TaskEventService.cjs.map +1 -0
  199. package/lib/cjs/tasks/TaskHandler.cjs +5 -4
  200. package/lib/cjs/tasks/TaskHandler.cjs.map +1 -0
  201. package/lib/cjs/tasks/TaskHandlerRegistry.cjs +1 -0
  202. package/lib/cjs/tasks/TaskHandlerRegistry.cjs.map +1 -0
  203. package/lib/cjs/tasks/TaskService.cjs +43 -37
  204. package/lib/cjs/tasks/TaskService.cjs.map +1 -0
  205. package/lib/cjs/tasks/TaskStateChangeError.cjs +1 -0
  206. package/lib/cjs/tasks/TaskStateChangeError.cjs.map +1 -0
  207. package/lib/cjs/tasks/TaskTracker.cjs +62 -61
  208. package/lib/cjs/tasks/TaskTracker.cjs.map +1 -0
  209. package/lib/cjs/tasks/builder.cjs +30 -24
  210. package/lib/cjs/tasks/builder.cjs.map +1 -0
  211. package/lib/cjs/tasks/constants.cjs +6 -10
  212. package/lib/cjs/tasks/constants.cjs.map +1 -0
  213. package/lib/cjs/tasks/decorators.cjs +5 -4
  214. package/lib/cjs/tasks/decorators.cjs.map +1 -0
  215. package/lib/cjs/tasks/index.cjs +6 -5
  216. package/lib/cjs/tasks/index.cjs.map +1 -0
  217. package/lib/cjs/tasks/logging.cjs +12 -11
  218. package/lib/cjs/tasks/logging.cjs.map +1 -0
  219. package/lib/cjs/tasks/models/TaskBackoffModel.cjs +16 -10
  220. package/lib/cjs/tasks/models/TaskBackoffModel.cjs.map +1 -0
  221. package/lib/cjs/tasks/models/TaskErrorModel.cjs +11 -5
  222. package/lib/cjs/tasks/models/TaskErrorModel.cjs.map +1 -0
  223. package/lib/cjs/tasks/models/TaskEventModel.cjs +29 -23
  224. package/lib/cjs/tasks/models/TaskEventModel.cjs.map +1 -0
  225. package/lib/cjs/tasks/models/TaskIOSerializer.cjs +4 -3
  226. package/lib/cjs/tasks/models/TaskIOSerializer.cjs.map +1 -0
  227. package/lib/cjs/tasks/models/TaskLogEntryModel.cjs +11 -5
  228. package/lib/cjs/tasks/models/TaskLogEntryModel.cjs.map +1 -0
  229. package/lib/cjs/tasks/models/TaskModel.cjs +72 -66
  230. package/lib/cjs/tasks/models/TaskModel.cjs.map +1 -0
  231. package/lib/cjs/tasks/models/TaskStepResultModel.cjs +14 -8
  232. package/lib/cjs/tasks/models/TaskStepResultModel.cjs.map +1 -0
  233. package/lib/cjs/tasks/models/TaskStepSpecModel.cjs +11 -5
  234. package/lib/cjs/tasks/models/TaskStepSpecModel.cjs.map +1 -0
  235. package/lib/cjs/tasks/models/index.cjs +1 -0
  236. package/lib/cjs/tasks/models/index.cjs.map +1 -0
  237. package/lib/cjs/tasks/types.cjs +1 -0
  238. package/lib/cjs/tasks/types.cjs.map +1 -0
  239. package/lib/cjs/tasks/utils.cjs +6 -5
  240. package/lib/cjs/tasks/utils.cjs.map +1 -0
  241. package/lib/cjs/utils/ContextualLoggedClass.cjs +5 -4
  242. package/lib/cjs/utils/ContextualLoggedClass.cjs.map +1 -0
  243. package/lib/cjs/utils/decorators.cjs +9 -8
  244. package/lib/cjs/utils/decorators.cjs.map +1 -0
  245. package/lib/cjs/utils/errors.cjs +1 -0
  246. package/lib/cjs/utils/errors.cjs.map +1 -0
  247. package/lib/cjs/utils/index.cjs +1 -0
  248. package/lib/cjs/utils/index.cjs.map +1 -0
  249. package/lib/cjs/utils/throttling.cjs +4 -3
  250. package/lib/cjs/utils/throttling.cjs.map +1 -0
  251. package/lib/cjs/utils/types.cjs +1 -0
  252. package/lib/cjs/utils/types.cjs.map +1 -0
  253. package/lib/cjs/utils/utils.cjs +3 -2
  254. package/lib/cjs/utils/utils.cjs.map +1 -0
  255. package/lib/cjs/workers/TaskEngine.cjs +30 -29
  256. package/lib/cjs/workers/TaskEngine.cjs.map +1 -0
  257. package/lib/cjs/workers/WorkThreadEnvironment.cjs +1 -0
  258. package/lib/cjs/workers/WorkThreadEnvironment.cjs.map +1 -0
  259. package/lib/cjs/workers/index.cjs +1 -0
  260. package/lib/cjs/workers/index.cjs.map +1 -0
  261. package/lib/cjs/workers/messages.cjs +1 -0
  262. package/lib/cjs/workers/messages.cjs.map +1 -0
  263. package/lib/cjs/workers/types.cjs +1 -0
  264. package/lib/cjs/workers/types.cjs.map +1 -0
  265. package/lib/cjs/workers/workerThread.cjs +18 -17
  266. package/lib/cjs/workers/workerThread.cjs.map +1 -0
  267. package/lib/esm/index.js +1 -1
  268. package/lib/types/auth/constants.d.cts +5 -0
  269. package/lib/types/auth/constants.d.mts +5 -0
  270. package/lib/types/auth/decorators.d.cts +5 -0
  271. package/lib/types/auth/decorators.d.mts +5 -0
  272. package/lib/types/auth/index.d.cts +2 -0
  273. package/lib/types/auth/index.d.mts +2 -0
  274. package/lib/types/fs/FilesystemAdapter.d.cts +70 -0
  275. package/lib/types/fs/FilesystemAdapter.d.mts +70 -0
  276. package/lib/types/fs/FsDispatch.d.cts +7 -0
  277. package/lib/types/fs/FsDispatch.d.mts +7 -0
  278. package/lib/types/fs/helpers.d.cts +17 -0
  279. package/lib/types/fs/helpers.d.mts +17 -0
  280. package/lib/types/fs/index.d.cts +4 -0
  281. package/lib/types/fs/index.d.mts +4 -0
  282. package/lib/types/fs/indexStore.d.cts +28 -0
  283. package/lib/types/fs/indexStore.d.mts +28 -0
  284. package/lib/types/fs/locks/FilesystemLock.d.cts +13 -0
  285. package/lib/types/fs/locks/FilesystemLock.d.mts +13 -0
  286. package/lib/types/fs/locks/FilesystemMultiLock.d.cts +8 -0
  287. package/lib/types/fs/locks/FilesystemMultiLock.d.mts +8 -0
  288. package/lib/types/fs/types.d.cts +40 -0
  289. package/lib/types/fs/types.d.mts +40 -0
  290. package/lib/types/identity/decorators.d.cts +72 -0
  291. package/lib/types/identity/decorators.d.mts +72 -0
  292. package/lib/types/identity/index.d.cts +6 -0
  293. package/lib/types/identity/index.d.mts +6 -0
  294. package/lib/types/index.d.cts +34 -0
  295. package/lib/types/index.d.mts +34 -0
  296. package/lib/types/index.d.ts +1 -1
  297. package/lib/types/interfaces/ContextuallyLogged.d.cts +8 -0
  298. package/lib/types/interfaces/ContextuallyLogged.d.mts +8 -0
  299. package/lib/types/interfaces/ErrorParser.d.cts +16 -0
  300. package/lib/types/interfaces/ErrorParser.d.mts +16 -0
  301. package/lib/types/interfaces/Executor.d.cts +16 -0
  302. package/lib/types/interfaces/Executor.d.mts +16 -0
  303. package/lib/types/interfaces/Observable.d.cts +33 -0
  304. package/lib/types/interfaces/Observable.d.mts +33 -0
  305. package/lib/types/interfaces/Observer.d.cts +15 -0
  306. package/lib/types/interfaces/Observer.d.mts +15 -0
  307. package/lib/types/interfaces/Paginatable.d.cts +20 -0
  308. package/lib/types/interfaces/Paginatable.d.mts +20 -0
  309. package/lib/types/interfaces/Queriable.d.cts +47 -0
  310. package/lib/types/interfaces/Queriable.d.mts +47 -0
  311. package/lib/types/interfaces/RawExecutor.d.cts +28 -0
  312. package/lib/types/interfaces/RawExecutor.d.mts +28 -0
  313. package/lib/types/interfaces/SequenceOptions.d.cts +79 -0
  314. package/lib/types/interfaces/SequenceOptions.d.mts +79 -0
  315. package/lib/types/interfaces/index.d.cts +12 -0
  316. package/lib/types/interfaces/index.d.mts +12 -0
  317. package/lib/types/migrations/Migration.d.cts +19 -0
  318. package/lib/types/migrations/Migration.d.mts +19 -0
  319. package/lib/types/migrations/MigrationService.d.cts +63 -0
  320. package/lib/types/migrations/MigrationService.d.mts +63 -0
  321. package/lib/types/migrations/MigrationTaskBuilder.d.cts +10 -0
  322. package/lib/types/migrations/MigrationTaskBuilder.d.mts +10 -0
  323. package/lib/types/migrations/MigrationTasks.d.cts +9 -0
  324. package/lib/types/migrations/MigrationTasks.d.mts +9 -0
  325. package/lib/types/migrations/MigrationVersioning.d.cts +7 -0
  326. package/lib/types/migrations/MigrationVersioning.d.mts +7 -0
  327. package/lib/types/migrations/SemverMigrationVersioning.d.cts +10 -0
  328. package/lib/types/migrations/SemverMigrationVersioning.d.mts +10 -0
  329. package/lib/types/migrations/StandardMigrationVersioning.d.cts +12 -0
  330. package/lib/types/migrations/StandardMigrationVersioning.d.mts +12 -0
  331. package/lib/types/migrations/constants.d.cts +2 -0
  332. package/lib/types/migrations/constants.d.mts +2 -0
  333. package/lib/types/migrations/decorators.d.cts +12 -0
  334. package/lib/types/migrations/decorators.d.mts +12 -0
  335. package/lib/types/migrations/index.d.cts +15 -0
  336. package/lib/types/migrations/index.d.mts +15 -0
  337. package/lib/types/migrations/types.d.cts +46 -0
  338. package/lib/types/migrations/types.d.mts +46 -0
  339. package/lib/types/model/BaseModel.d.cts +37 -0
  340. package/lib/types/model/BaseModel.d.mts +37 -0
  341. package/lib/types/model/SequenceModel.d.cts +32 -0
  342. package/lib/types/model/SequenceModel.d.mts +32 -0
  343. package/lib/types/model/construction.d.cts +455 -0
  344. package/lib/types/model/construction.d.mts +455 -0
  345. package/lib/types/model/decorators.d.cts +237 -0
  346. package/lib/types/model/decorators.d.mts +237 -0
  347. package/lib/types/model/index.d.cts +11 -0
  348. package/lib/types/model/index.d.mts +11 -0
  349. package/lib/types/model/indexing.d.cts +20 -0
  350. package/lib/types/model/indexing.d.mts +20 -0
  351. package/lib/types/model/types.d.cts +60 -0
  352. package/lib/types/model/types.d.mts +60 -0
  353. package/lib/types/overrides/Metadata.d.cts +22 -0
  354. package/lib/types/overrides/Metadata.d.mts +22 -0
  355. package/lib/types/overrides/Model.d.cts +94 -0
  356. package/lib/types/overrides/Model.d.mts +94 -0
  357. package/lib/types/overrides/ModelBuilder.d.cts +31 -0
  358. package/lib/types/overrides/ModelBuilder.d.mts +31 -0
  359. package/lib/types/overrides/index.d.cts +11 -0
  360. package/lib/types/overrides/index.d.mts +11 -0
  361. package/lib/types/overrides/injectables.d.cts +10 -0
  362. package/lib/types/overrides/injectables.d.mts +10 -0
  363. package/lib/types/overrides/overrides.d.cts +1 -0
  364. package/lib/types/overrides/overrides.d.mts +1 -0
  365. package/lib/types/persistence/Adapter.d.cts +469 -0
  366. package/lib/types/persistence/Adapter.d.mts +469 -0
  367. package/lib/types/persistence/Context.d.cts +16 -0
  368. package/lib/types/persistence/Context.d.mts +16 -0
  369. package/lib/types/persistence/ContextLock.d.cts +18 -0
  370. package/lib/types/persistence/ContextLock.d.mts +18 -0
  371. package/lib/types/persistence/Dispatch.d.cts +128 -0
  372. package/lib/types/persistence/Dispatch.d.mts +128 -0
  373. package/lib/types/persistence/ObserverHandler.d.cts +111 -0
  374. package/lib/types/persistence/ObserverHandler.d.mts +111 -0
  375. package/lib/types/persistence/Sequence.d.cts +126 -0
  376. package/lib/types/persistence/Sequence.d.mts +126 -0
  377. package/lib/types/persistence/constants.d.cts +74 -0
  378. package/lib/types/persistence/constants.d.mts +74 -0
  379. package/lib/types/persistence/decorators.d.cts +28 -0
  380. package/lib/types/persistence/decorators.d.mts +28 -0
  381. package/lib/types/persistence/errors.d.cts +33 -0
  382. package/lib/types/persistence/errors.d.mts +33 -0
  383. package/lib/types/persistence/event-filters.d.cts +20 -0
  384. package/lib/types/persistence/event-filters.d.mts +20 -0
  385. package/lib/types/persistence/generators.d.cts +14 -0
  386. package/lib/types/persistence/generators.d.mts +14 -0
  387. package/lib/types/persistence/index.d.cts +18 -0
  388. package/lib/types/persistence/index.d.mts +18 -0
  389. package/lib/types/persistence/transactions.d.cts +4 -0
  390. package/lib/types/persistence/transactions.d.mts +4 -0
  391. package/lib/types/persistence/types.d.cts +86 -0
  392. package/lib/types/persistence/types.d.mts +86 -0
  393. package/lib/types/query/Condition.d.cts +131 -0
  394. package/lib/types/query/Condition.d.mts +131 -0
  395. package/lib/types/query/MethodQueryBuilder.d.cts +185 -0
  396. package/lib/types/query/MethodQueryBuilder.d.mts +185 -0
  397. package/lib/types/query/Paginator.d.cts +105 -0
  398. package/lib/types/query/Paginator.d.mts +105 -0
  399. package/lib/types/query/Statement.d.cts +136 -0
  400. package/lib/types/query/Statement.d.mts +136 -0
  401. package/lib/types/query/constants.d.cts +69 -0
  402. package/lib/types/query/constants.d.mts +69 -0
  403. package/lib/types/query/decorators.d.cts +8 -0
  404. package/lib/types/query/decorators.d.mts +8 -0
  405. package/lib/types/query/errors.d.cts +21 -0
  406. package/lib/types/query/errors.d.mts +21 -0
  407. package/lib/types/query/index.d.cts +16 -0
  408. package/lib/types/query/index.d.mts +16 -0
  409. package/lib/types/query/options.d.cts +393 -0
  410. package/lib/types/query/options.d.mts +393 -0
  411. package/lib/types/query/selectors.d.cts +39 -0
  412. package/lib/types/query/selectors.d.mts +39 -0
  413. package/lib/types/query/types.d.cts +158 -0
  414. package/lib/types/query/types.d.mts +158 -0
  415. package/lib/types/query/utils.d.cts +40 -0
  416. package/lib/types/query/utils.d.mts +40 -0
  417. package/lib/types/ram/RamAdapter.d.cts +341 -0
  418. package/lib/types/ram/RamAdapter.d.mts +341 -0
  419. package/lib/types/ram/RamPaginator.d.cts +54 -0
  420. package/lib/types/ram/RamPaginator.d.mts +54 -0
  421. package/lib/types/ram/RamStatement.d.cts +92 -0
  422. package/lib/types/ram/RamStatement.d.mts +92 -0
  423. package/lib/types/ram/constants.d.cts +8 -0
  424. package/lib/types/ram/constants.d.mts +8 -0
  425. package/lib/types/ram/handlers.d.cts +24 -0
  426. package/lib/types/ram/handlers.d.mts +24 -0
  427. package/lib/types/ram/index.d.cts +12 -0
  428. package/lib/types/ram/index.d.mts +12 -0
  429. package/lib/types/ram/types.d.cts +50 -0
  430. package/lib/types/ram/types.d.mts +50 -0
  431. package/lib/types/repository/Repository.d.cts +501 -0
  432. package/lib/types/repository/Repository.d.mts +501 -0
  433. package/lib/types/repository/constants.d.cts +36 -0
  434. package/lib/types/repository/constants.d.mts +36 -0
  435. package/lib/types/repository/decorators.d.cts +30 -0
  436. package/lib/types/repository/decorators.d.mts +30 -0
  437. package/lib/types/repository/errors.d.cts +19 -0
  438. package/lib/types/repository/errors.d.mts +19 -0
  439. package/lib/types/repository/index.d.cts +12 -0
  440. package/lib/types/repository/index.d.mts +12 -0
  441. package/lib/types/repository/injectables.d.cts +95 -0
  442. package/lib/types/repository/injectables.d.mts +95 -0
  443. package/lib/types/repository/types.d.cts +28 -0
  444. package/lib/types/repository/types.d.mts +28 -0
  445. package/lib/types/repository/utils.d.cts +36 -0
  446. package/lib/types/repository/utils.d.mts +36 -0
  447. package/lib/types/services/ModelService.d.cts +45 -0
  448. package/lib/types/services/ModelService.d.mts +45 -0
  449. package/lib/types/services/PersistenceService.d.cts +17 -0
  450. package/lib/types/services/PersistenceService.d.mts +17 -0
  451. package/lib/types/services/index.d.cts +8 -0
  452. package/lib/types/services/index.d.mts +8 -0
  453. package/lib/types/services/services.d.cts +96 -0
  454. package/lib/types/services/services.d.mts +96 -0
  455. package/lib/types/tasks/CleanUpTask.d.cts +15 -0
  456. package/lib/types/tasks/CleanUpTask.d.mts +15 -0
  457. package/lib/types/tasks/TaskContext.d.cts +30 -0
  458. package/lib/types/tasks/TaskContext.d.mts +30 -0
  459. package/lib/types/tasks/TaskEngine.d.cts +97 -0
  460. package/lib/types/tasks/TaskEngine.d.mts +97 -0
  461. package/lib/types/tasks/TaskErrors.d.cts +65 -0
  462. package/lib/types/tasks/TaskErrors.d.mts +65 -0
  463. package/lib/types/tasks/TaskEventBus.d.cts +17 -0
  464. package/lib/types/tasks/TaskEventBus.d.mts +17 -0
  465. package/lib/types/tasks/TaskEventService.d.cts +7 -0
  466. package/lib/types/tasks/TaskEventService.d.mts +7 -0
  467. package/lib/types/tasks/TaskHandler.d.cts +12 -0
  468. package/lib/types/tasks/TaskHandler.d.mts +12 -0
  469. package/lib/types/tasks/TaskHandlerRegistry.d.cts +8 -0
  470. package/lib/types/tasks/TaskHandlerRegistry.d.mts +8 -0
  471. package/lib/types/tasks/TaskService.d.cts +65 -0
  472. package/lib/types/tasks/TaskService.d.mts +65 -0
  473. package/lib/types/tasks/TaskStateChangeError.d.cts +11 -0
  474. package/lib/types/tasks/TaskStateChangeError.d.mts +11 -0
  475. package/lib/types/tasks/TaskTracker.d.cts +47 -0
  476. package/lib/types/tasks/TaskTracker.d.mts +47 -0
  477. package/lib/types/tasks/builder.d.cts +72 -0
  478. package/lib/types/tasks/builder.d.mts +72 -0
  479. package/lib/types/tasks/constants.d.cts +31 -0
  480. package/lib/types/tasks/constants.d.mts +31 -0
  481. package/lib/types/tasks/decorators.d.cts +4 -0
  482. package/lib/types/tasks/decorators.d.mts +4 -0
  483. package/lib/types/tasks/index.d.cts +23 -0
  484. package/lib/types/tasks/index.d.mts +23 -0
  485. package/lib/types/tasks/logging.d.cts +31 -0
  486. package/lib/types/tasks/logging.d.mts +31 -0
  487. package/lib/types/tasks/models/TaskBackoffModel.d.cts +9 -0
  488. package/lib/types/tasks/models/TaskBackoffModel.d.mts +9 -0
  489. package/lib/types/tasks/models/TaskErrorModel.d.cts +8 -0
  490. package/lib/types/tasks/models/TaskErrorModel.d.mts +8 -0
  491. package/lib/types/tasks/models/TaskEventModel.d.cts +11 -0
  492. package/lib/types/tasks/models/TaskEventModel.d.mts +11 -0
  493. package/lib/types/tasks/models/TaskIOSerializer.d.cts +33 -0
  494. package/lib/types/tasks/models/TaskIOSerializer.d.mts +33 -0
  495. package/lib/types/tasks/models/TaskLogEntryModel.d.cts +10 -0
  496. package/lib/types/tasks/models/TaskLogEntryModel.d.mts +10 -0
  497. package/lib/types/tasks/models/TaskModel.d.cts +43 -0
  498. package/lib/types/tasks/models/TaskModel.d.mts +43 -0
  499. package/lib/types/tasks/models/TaskStepResultModel.d.cts +9 -0
  500. package/lib/types/tasks/models/TaskStepResultModel.d.mts +9 -0
  501. package/lib/types/tasks/models/TaskStepSpecModel.d.cts +9 -0
  502. package/lib/types/tasks/models/TaskStepSpecModel.d.mts +9 -0
  503. package/lib/types/tasks/models/index.d.cts +8 -0
  504. package/lib/types/tasks/models/index.d.mts +8 -0
  505. package/lib/types/tasks/types.d.cts +71 -0
  506. package/lib/types/tasks/types.d.mts +71 -0
  507. package/lib/types/tasks/utils.d.cts +5 -0
  508. package/lib/types/tasks/utils.d.mts +5 -0
  509. package/lib/types/utils/ContextualLoggedClass.d.cts +37 -0
  510. package/lib/types/utils/ContextualLoggedClass.d.mts +37 -0
  511. package/lib/types/utils/decorators.d.cts +27 -0
  512. package/lib/types/utils/decorators.d.mts +27 -0
  513. package/lib/types/utils/errors.d.cts +56 -0
  514. package/lib/types/utils/errors.d.mts +56 -0
  515. package/lib/types/utils/index.d.cts +11 -0
  516. package/lib/types/utils/index.d.mts +11 -0
  517. package/lib/types/utils/throttling.d.cts +9 -0
  518. package/lib/types/utils/throttling.d.mts +9 -0
  519. package/lib/types/utils/types.d.cts +23 -0
  520. package/lib/types/utils/types.d.mts +23 -0
  521. package/lib/types/utils/utils.d.cts +22 -0
  522. package/lib/types/utils/utils.d.mts +22 -0
  523. package/lib/types/workers/TaskEngine.d.cts +40 -0
  524. package/lib/types/workers/TaskEngine.d.mts +40 -0
  525. package/lib/types/workers/WorkThreadEnvironment.d.cts +35 -0
  526. package/lib/types/workers/WorkThreadEnvironment.d.mts +35 -0
  527. package/lib/types/workers/index.d.cts +5 -0
  528. package/lib/types/workers/index.d.mts +5 -0
  529. package/lib/types/workers/messages.d.cts +69 -0
  530. package/lib/types/workers/messages.d.mts +69 -0
  531. package/lib/types/workers/types.d.cts +41 -0
  532. package/lib/types/workers/types.d.mts +41 -0
  533. package/lib/types/workers/workerThread.d.cts +1 -0
  534. package/lib/types/workers/workerThread.d.mts +1 -0
  535. package/package.json +4 -4
  536. package/lib/cjs/auth/constants.js.map +0 -1
  537. package/lib/cjs/auth/decorators.js.map +0 -1
  538. package/lib/cjs/auth/index.js.map +0 -1
  539. package/lib/cjs/fs/FilesystemAdapter.js.map +0 -1
  540. package/lib/cjs/fs/FsDispatch.js.map +0 -1
  541. package/lib/cjs/fs/helpers.js.map +0 -1
  542. package/lib/cjs/fs/index.js.map +0 -1
  543. package/lib/cjs/fs/indexStore.js.map +0 -1
  544. package/lib/cjs/fs/locks/FilesystemLock.js.map +0 -1
  545. package/lib/cjs/fs/locks/FilesystemMultiLock.js.map +0 -1
  546. package/lib/cjs/fs/types.js.map +0 -1
  547. package/lib/cjs/identity/decorators.js.map +0 -1
  548. package/lib/cjs/identity/index.js.map +0 -1
  549. package/lib/cjs/index.js.map +0 -1
  550. package/lib/cjs/interfaces/ContextuallyLogged.js.map +0 -1
  551. package/lib/cjs/interfaces/ErrorParser.js.map +0 -1
  552. package/lib/cjs/interfaces/Executor.js.map +0 -1
  553. package/lib/cjs/interfaces/Observable.js.map +0 -1
  554. package/lib/cjs/interfaces/Observer.js.map +0 -1
  555. package/lib/cjs/interfaces/Paginatable.js.map +0 -1
  556. package/lib/cjs/interfaces/Queriable.js.map +0 -1
  557. package/lib/cjs/interfaces/RawExecutor.js.map +0 -1
  558. package/lib/cjs/interfaces/SequenceOptions.js.map +0 -1
  559. package/lib/cjs/interfaces/index.js.map +0 -1
  560. package/lib/cjs/migrations/Migration.js.map +0 -1
  561. package/lib/cjs/migrations/MigrationService.js.map +0 -1
  562. package/lib/cjs/migrations/MigrationTaskBuilder.js.map +0 -1
  563. package/lib/cjs/migrations/MigrationTasks.js.map +0 -1
  564. package/lib/cjs/migrations/MigrationVersioning.js.map +0 -1
  565. package/lib/cjs/migrations/SemverMigrationVersioning.js.map +0 -1
  566. package/lib/cjs/migrations/StandardMigrationVersioning.js.map +0 -1
  567. package/lib/cjs/migrations/constants.js.map +0 -1
  568. package/lib/cjs/migrations/decorators.js.map +0 -1
  569. package/lib/cjs/migrations/index.js.map +0 -1
  570. package/lib/cjs/migrations/types.js.map +0 -1
  571. package/lib/cjs/model/BaseModel.js.map +0 -1
  572. package/lib/cjs/model/SequenceModel.js.map +0 -1
  573. package/lib/cjs/model/construction.js.map +0 -1
  574. package/lib/cjs/model/decorators.js.map +0 -1
  575. package/lib/cjs/model/index.js.map +0 -1
  576. package/lib/cjs/model/indexing.js.map +0 -1
  577. package/lib/cjs/model/types.js.map +0 -1
  578. package/lib/cjs/overrides/Metadata.js.map +0 -1
  579. package/lib/cjs/overrides/Model.js.map +0 -1
  580. package/lib/cjs/overrides/ModelBuilder.js.map +0 -1
  581. package/lib/cjs/overrides/index.js.map +0 -1
  582. package/lib/cjs/overrides/injectables.js.map +0 -1
  583. package/lib/cjs/overrides/overrides.js.map +0 -1
  584. package/lib/cjs/persistence/Adapter.js.map +0 -1
  585. package/lib/cjs/persistence/Context.js.map +0 -1
  586. package/lib/cjs/persistence/ContextLock.js.map +0 -1
  587. package/lib/cjs/persistence/Dispatch.js.map +0 -1
  588. package/lib/cjs/persistence/ObserverHandler.js.map +0 -1
  589. package/lib/cjs/persistence/Sequence.js.map +0 -1
  590. package/lib/cjs/persistence/constants.js.map +0 -1
  591. package/lib/cjs/persistence/decorators.js.map +0 -1
  592. package/lib/cjs/persistence/errors.js.map +0 -1
  593. package/lib/cjs/persistence/event-filters.js.map +0 -1
  594. package/lib/cjs/persistence/generators.js.map +0 -1
  595. package/lib/cjs/persistence/index.js.map +0 -1
  596. package/lib/cjs/persistence/transactions.js.map +0 -1
  597. package/lib/cjs/persistence/types.js.map +0 -1
  598. package/lib/cjs/query/Condition.js.map +0 -1
  599. package/lib/cjs/query/MethodQueryBuilder.js.map +0 -1
  600. package/lib/cjs/query/Paginator.js.map +0 -1
  601. package/lib/cjs/query/Statement.js.map +0 -1
  602. package/lib/cjs/query/constants.js.map +0 -1
  603. package/lib/cjs/query/decorators.js.map +0 -1
  604. package/lib/cjs/query/errors.js.map +0 -1
  605. package/lib/cjs/query/index.js.map +0 -1
  606. package/lib/cjs/query/options.js.map +0 -1
  607. package/lib/cjs/query/selectors.js.map +0 -1
  608. package/lib/cjs/query/types.js.map +0 -1
  609. package/lib/cjs/query/utils.js.map +0 -1
  610. package/lib/cjs/ram/RamAdapter.js.map +0 -1
  611. package/lib/cjs/ram/RamPaginator.js.map +0 -1
  612. package/lib/cjs/ram/RamStatement.js.map +0 -1
  613. package/lib/cjs/ram/constants.js.map +0 -1
  614. package/lib/cjs/ram/handlers.js.map +0 -1
  615. package/lib/cjs/ram/index.js.map +0 -1
  616. package/lib/cjs/ram/types.js.map +0 -1
  617. package/lib/cjs/repository/Repository.js.map +0 -1
  618. package/lib/cjs/repository/constants.js.map +0 -1
  619. package/lib/cjs/repository/decorators.js.map +0 -1
  620. package/lib/cjs/repository/errors.js.map +0 -1
  621. package/lib/cjs/repository/index.js.map +0 -1
  622. package/lib/cjs/repository/injectables.js.map +0 -1
  623. package/lib/cjs/repository/types.js.map +0 -1
  624. package/lib/cjs/repository/utils.js.map +0 -1
  625. package/lib/cjs/services/ModelService.js.map +0 -1
  626. package/lib/cjs/services/PersistenceService.js.map +0 -1
  627. package/lib/cjs/services/index.js.map +0 -1
  628. package/lib/cjs/services/services.js.map +0 -1
  629. package/lib/cjs/tasks/CleanUpTask.js.map +0 -1
  630. package/lib/cjs/tasks/TaskContext.js.map +0 -1
  631. package/lib/cjs/tasks/TaskEngine.js.map +0 -1
  632. package/lib/cjs/tasks/TaskErrors.js.map +0 -1
  633. package/lib/cjs/tasks/TaskEventBus.js.map +0 -1
  634. package/lib/cjs/tasks/TaskEventService.js.map +0 -1
  635. package/lib/cjs/tasks/TaskHandler.js.map +0 -1
  636. package/lib/cjs/tasks/TaskHandlerRegistry.js.map +0 -1
  637. package/lib/cjs/tasks/TaskService.js.map +0 -1
  638. package/lib/cjs/tasks/TaskStateChangeError.js.map +0 -1
  639. package/lib/cjs/tasks/TaskTracker.js.map +0 -1
  640. package/lib/cjs/tasks/builder.js.map +0 -1
  641. package/lib/cjs/tasks/constants.js.map +0 -1
  642. package/lib/cjs/tasks/decorators.js.map +0 -1
  643. package/lib/cjs/tasks/index.js.map +0 -1
  644. package/lib/cjs/tasks/logging.js.map +0 -1
  645. package/lib/cjs/tasks/models/TaskBackoffModel.js.map +0 -1
  646. package/lib/cjs/tasks/models/TaskErrorModel.js.map +0 -1
  647. package/lib/cjs/tasks/models/TaskEventModel.js.map +0 -1
  648. package/lib/cjs/tasks/models/TaskIOSerializer.js.map +0 -1
  649. package/lib/cjs/tasks/models/TaskLogEntryModel.js.map +0 -1
  650. package/lib/cjs/tasks/models/TaskModel.js.map +0 -1
  651. package/lib/cjs/tasks/models/TaskStepResultModel.js.map +0 -1
  652. package/lib/cjs/tasks/models/TaskStepSpecModel.js.map +0 -1
  653. package/lib/cjs/tasks/models/index.js.map +0 -1
  654. package/lib/cjs/tasks/types.js.map +0 -1
  655. package/lib/cjs/tasks/utils.js.map +0 -1
  656. package/lib/cjs/utils/ContextualLoggedClass.js.map +0 -1
  657. package/lib/cjs/utils/decorators.js.map +0 -1
  658. package/lib/cjs/utils/errors.js.map +0 -1
  659. package/lib/cjs/utils/index.js.map +0 -1
  660. package/lib/cjs/utils/throttling.js.map +0 -1
  661. package/lib/cjs/utils/types.js.map +0 -1
  662. package/lib/cjs/utils/utils.js.map +0 -1
  663. package/lib/cjs/workers/TaskEngine.js.map +0 -1
  664. package/lib/cjs/workers/WorkThreadEnvironment.js.map +0 -1
  665. package/lib/cjs/workers/index.js.map +0 -1
  666. package/lib/cjs/workers/messages.js.map +0 -1
  667. package/lib/cjs/workers/types.js.map +0 -1
  668. package/lib/cjs/workers/workerThread.js.map +0 -1
@@ -0,0 +1,86 @@
1
+ import { BulkCrudOperationKeys, LoggerOfFlags, OperationKeys, RepositoryFlags, ContextFlags as CtxFlags } from "@decaf-ts/db-decorators";
2
+ import { Adapter } from "./Adapter.js";
3
+ import { Observable, type Observer } from "../interfaces/index.js";
4
+ import { Logger } from "@decaf-ts/logging";
5
+ import { Constructor } from "@decaf-ts/decoration";
6
+ import { Model } from "@decaf-ts/decorator-validation";
7
+ import { ContextualArgs, ContextualLoggedClass } from "../utils/ContextualLoggedClass.js";
8
+ import { Context } from "./Context.js";
9
+ import { Repository } from "../repository/Repository.js";
10
+ import { PersistenceKeys } from "./constants.js";
11
+ import { PreparedStatementKeys } from "../query/constants.js";
12
+ import { ContextLock } from "./ContextLock.js";
13
+ export type FlagsOfContext<C extends Context<any>> = C extends Context<infer F> ? F : never;
14
+ export type LoggerOfContext<C extends Context<any>> = LoggerOfFlags<FlagsOfContext<C>>;
15
+ export type ContextOfRepository<R extends Repository<any, any>> = R extends Repository<any, infer A> ? ContextOf<A> : never;
16
+ export type FlagsOfRepository<R extends Repository<any, any>> = FlagsOfContext<ContextOfRepository<R>>;
17
+ export type LoggerOfRepository<R extends Repository<any, any>> = LoggerOfContext<ContextOfRepository<R>>;
18
+ export type ContextOf<OBJ extends Repository<any, any> | Adapter<any, any, any, any> | ContextualLoggedClass<any>> = OBJ extends Adapter<any, any, any, infer C> ? C : OBJ extends Repository<any, any> ? ContextOfRepository<OBJ> : OBJ extends ContextualLoggedClass<infer C> ? C : never;
19
+ export type ConfigOf<OBJ extends Adapter<any, any, any, any>> = OBJ extends Adapter<infer C, any, any, any> ? C : never;
20
+ export type LoggerOfAdapter<A extends Adapter<any, any, any, any>> = A extends Adapter<any, any, any, infer C> ? LoggerOfContext<C> : never;
21
+ export type FlagsOfAdapter<A extends Adapter<any, any, any, any>> = A extends Adapter<any, any, any, infer C> ? FlagsOfContext<C> : never;
22
+ export type LoggerOf<OBJ extends AdapterFlags<any> | Context<any> | Adapter<any, any, any> | Repository<any, any>> = OBJ extends AdapterFlags<any> ? LoggerOfFlags<OBJ> : OBJ extends Context<any> ? LoggerOfContext<OBJ> : OBJ extends Repository<any, any> ? LoggerOfRepository<OBJ> : OBJ extends Adapter<any, any, any> ? LoggerOfAdapter<OBJ> : Logger;
23
+ export type ConfOf<A extends Adapter<any, any, any, any>> = A extends Adapter<infer C, any, any> ? C : never;
24
+ export type FlagsOf<OBJ extends Repository<any, any> | Adapter<any, any, any, any> | Context<any>> = OBJ extends Context<any> ? FlagsOfContext<OBJ> : OBJ extends Repository<any, any> ? FlagsOfRepository<OBJ> : OBJ extends Adapter<any, any, any, any> ? FlagsOfAdapter<OBJ> : never;
25
+ export type PersistenceObservable<CONTEXT extends Context<any>> = Observable<[
26
+ Observer,
27
+ ObserverFilter?
28
+ ], [
29
+ Constructor | string,
30
+ OperationKeys | BulkCrudOperationKeys | string,
31
+ EventIds,
32
+ ...ContextualArgs<CONTEXT>
33
+ ]>;
34
+ export type PersistenceObserver<CONTEXT extends Context<any>> = Observer<[
35
+ Constructor | string,
36
+ OperationKeys | BulkCrudOperationKeys | string,
37
+ EventIds,
38
+ ...ContextualArgs<CONTEXT>
39
+ ]>;
40
+ /**
41
+ * @description Type representing possible ID formats for database events
42
+ * @summary A union type that defines the possible formats for event identifiers in the persistence layer.
43
+ * These can be single values (string, number, bigint) or arrays of these types.
44
+ * @typedef {(string|number|bigint|string[]|number[]|bigint[])} EventIds
45
+ * @memberOf module:core
46
+ */
47
+ export type EventIds = string | number | bigint | string[] | number[] | bigint[];
48
+ export type ObserverFilter = (table: Constructor | string, event: AllOperationKeys, id: EventIds, ...args: ContextualArgs<any>) => boolean;
49
+ export type InferredAdapterConfig<A> = A extends Adapter<infer CONF, any, any> ? CONF : never;
50
+ export interface AdapterDispatch<A extends Adapter<any, any, any, any>> extends PersistenceObservable<ContextOf<A>> {
51
+ close(...args: ContextualArgs<ContextOf<A>>): Promise<void>;
52
+ updateObservers<M extends Model>(table: Constructor<M> | string, event: OperationKeys | BulkCrudOperationKeys | string, id: EventIds, ...args: ContextualArgs<ContextOf<A>>): Promise<void>;
53
+ }
54
+ export type RepositoryFor<A extends Adapter<any, any, any, any>> = A extends Adapter<any, any, any, any> ? ReturnType<A["repository"]> : never;
55
+ export type PreparedModel = {
56
+ record: Record<string, any>;
57
+ id: string;
58
+ transient?: Record<string, any>;
59
+ };
60
+ export type ContextFlags<LOG extends Logger> = CtxFlags<LOG> & Pick<RepositoryFlags<LOG>, "operation" | "correlationId" | "ignoreDevSafeGuards" | "parentContext" | "childContexts"> & {
61
+ pending?: Record<string, string[]>;
62
+ transactionLock?: ContextLock;
63
+ };
64
+ export type AdapterFlags<LOG extends Logger = Logger> = RepositoryFlags<LOG> & ContextFlags<LOG> & {
65
+ allowGenerationOverride: boolean;
66
+ afterQueryHandlers: boolean;
67
+ enforceUpdateValidation: boolean;
68
+ allowRawStatements: boolean;
69
+ forcePrepareSimpleQueries: boolean;
70
+ forcePrepareComplexQueries: boolean;
71
+ cacheForPopulate: Record<string, any>;
72
+ preferFromCache: boolean;
73
+ noEmit: boolean;
74
+ noEmitSingle: boolean;
75
+ noEmitBulk: boolean;
76
+ breakOnSingleFailureInBulk: boolean;
77
+ observeFullResult: boolean;
78
+ paginateByBookmark: boolean;
79
+ dryRun: boolean;
80
+ lock?: ContextLock;
81
+ };
82
+ export type RawResult<R, D extends boolean> = D extends true ? R : {
83
+ data: R;
84
+ count?: number;
85
+ };
86
+ export type AllOperationKeys = OperationKeys | BulkCrudOperationKeys | PersistenceKeys | PreparedStatementKeys | string;
@@ -0,0 +1,131 @@
1
+ import { AttributeOption, ConditionBuilderOption } from "./options.cjs";
2
+ import { ConditionalAsync, Model, ModelArg, ModelErrorDefinition } from "@decaf-ts/decorator-validation";
3
+ import { GroupOperator, Operator } from "./constants.cjs";
4
+ type InferAsync<M> = M extends Model<infer A> ? A : false;
5
+ /**
6
+ * @description Represents a logical condition for database queries
7
+ * @summary A class that encapsulates query conditions with support for complex logical operations.
8
+ * This class allows for building and combining query conditions using logical operators (AND, OR, NOT)
9
+ * and comparison operators (equals, not equals, greater than, etc.).
10
+ * @template M - The model type this condition operates on
11
+ * @param {string | Condition<M>} attr1 - The attribute name or a nested condition
12
+ * @param {Operator | GroupOperator} operator - The operator to use for the condition
13
+ * @param {any} comparison - The value to compare against or another condition
14
+ * @class Condition
15
+ * @example
16
+ * // Create a simple condition
17
+ * const nameCondition = Condition.attribute("name").eq("John");
18
+ *
19
+ * // Create a complex condition
20
+ * const complexCondition = Condition.attribute("age").gt(18)
21
+ * .and(Condition.attribute("status").eq("active"));
22
+ *
23
+ * // Use the builder pattern
24
+ * const userQuery = Condition.builder()
25
+ * .attribute("email").regexp(".*@example.com")
26
+ * .and(Condition.attribute("lastLogin").gt(new Date("2023-01-01")));
27
+ * @mermaid
28
+ * sequenceDiagram
29
+ * participant Dev
30
+ * participant Condition
31
+ * Dev->>Condition: builder().attribute("age").gt(18)
32
+ * Condition-->>Dev: Condition(age > 18)
33
+ * Dev->>Condition: .and(attribute("status").eq("active"))
34
+ * Condition-->>Dev: Condition((age > 18) AND (status = "active"))
35
+ */
36
+ export declare class Condition<M extends Model<any>> extends Model<InferAsync<M>> {
37
+ protected attr1?: string | Condition<M>;
38
+ protected operator?: Operator | GroupOperator;
39
+ protected comparison?: any;
40
+ private constructor();
41
+ private constructor();
42
+ /**
43
+ * @description Combines this condition with another using logical AND
44
+ * @summary Joins two conditions with an AND operator, requiring both to be true
45
+ * @param {Condition<M>} condition - The condition to combine with this one
46
+ * @return {Condition<M>} A new condition representing the AND operation
47
+ */
48
+ and(condition: Condition<M>): Condition<M>;
49
+ /**
50
+ * @description Combines this condition with another using logical OR
51
+ * @summary Joins two conditions with an OR operator, requiring at least one to be true
52
+ * @param {Condition<M>} condition - The condition to combine with this one
53
+ * @return {Condition<M>} A new condition representing the OR operation
54
+ */
55
+ or(condition: Condition<M>): Condition<M>;
56
+ /**
57
+ * @description Creates a negation condition
58
+ * @summary Excludes a value from the result by applying a NOT operator
59
+ * @param {any} val - The value to negate
60
+ * @return {Condition<M>} A new condition representing the NOT operation
61
+ */
62
+ not(val: any): Condition<M>;
63
+ /**
64
+ * @description Validates the condition and checks for errors
65
+ * @summary Extends the base validation to ensure the condition is properly formed
66
+ * @param {...string[]} exceptions - Fields to exclude from validation
67
+ * @return {ModelErrorDefinition | undefined} Error definition if validation fails, undefined otherwise
68
+ */
69
+ hasErrors(...exceptions: string[]): ConditionalAsync<InferAsync<M>, ModelErrorDefinition | undefined>;
70
+ /**
71
+ * @description Creates a new condition that combines two conditions with logical AND
72
+ * @summary Static method that joins two conditions with an AND operator, requiring both to be true
73
+ * @template M - The model type this condition operates on
74
+ * @param {Condition<M>} condition1 - The first condition
75
+ * @param {Condition<M>} condition2 - The second condition
76
+ * @return {Condition<M>} A new condition representing the AND operation
77
+ */
78
+ static and<M extends Model>(condition1: Condition<M>, condition2: Condition<M>): Condition<M>;
79
+ /**
80
+ * @description Creates a new condition that combines two conditions with logical OR
81
+ * @summary Static method that joins two conditions with an OR operator, requiring at least one to be true
82
+ * @template M - The model type this condition operates on
83
+ * @param {Condition<M>} condition1 - The first condition
84
+ * @param {Condition<M>} condition2 - The second condition
85
+ * @return {Condition<M>} A new condition representing the OR operation
86
+ */
87
+ static or<M extends Model>(condition1: Condition<M>, condition2: Condition<M>): Condition<M>;
88
+ /**
89
+ * @description Creates a new condition that groups two conditions with a specified operator
90
+ * @summary Private static method that combines two conditions using the specified group operator
91
+ * @template M - The model type this condition operates on
92
+ * @param {Condition<M>} condition1 - The first condition
93
+ * @param {GroupOperator} operator - The group operator to use (AND, OR)
94
+ * @param {Condition<M>} condition2 - The second condition
95
+ * @return {Condition<M>} A new condition representing the grouped operation
96
+ */
97
+ private static group;
98
+ /**
99
+ * @description Creates a condition builder for a specific model attribute
100
+ * @summary Static method that initializes a condition builder with the specified attribute
101
+ * @template M - The model type this condition operates on
102
+ * @param attr - The model attribute to build a condition for
103
+ * @return {AttributeOption<M>} A condition builder initialized with the attribute
104
+ */
105
+ static attribute<M extends Model>(attr: keyof M): AttributeOption<M>;
106
+ /**
107
+ * @description Alias for the attribute method
108
+ * @summary Shorthand method that initializes a condition builder with the specified attribute
109
+ * @template M - The model type this condition operates on
110
+ * @param attr - The model attribute to build a condition for
111
+ * @return {AttributeOption<M>} A condition builder initialized with the attribute
112
+ */
113
+ static attr<M extends Model>(attr: keyof M): AttributeOption<M>;
114
+ /**
115
+ * @description Provides a fluent API to build query conditions
116
+ * @summary A builder class that simplifies the creation of database query conditions
117
+ * with a chainable interface for setting attributes and operators
118
+ * @template M - The model type this condition builder operates on
119
+ * @class ConditionBuilder
120
+ */
121
+ private static Builder;
122
+ /**
123
+ * @description Creates a new condition builder
124
+ * @summary Factory method that returns a new instance of the condition builder
125
+ * @template M - The model type this condition builder will operate on
126
+ * @return {ConditionBuilderOption<M>} A new condition builder instance
127
+ */
128
+ static builder<M extends Model>(): ConditionBuilderOption<M>;
129
+ static from(obj: ModelArg<Condition<any>>): Condition<Model<any>>;
130
+ }
131
+ export {};
@@ -0,0 +1,131 @@
1
+ import { AttributeOption, ConditionBuilderOption } from "./options.js";
2
+ import { ConditionalAsync, Model, ModelArg, ModelErrorDefinition } from "@decaf-ts/decorator-validation";
3
+ import { GroupOperator, Operator } from "./constants.js";
4
+ type InferAsync<M> = M extends Model<infer A> ? A : false;
5
+ /**
6
+ * @description Represents a logical condition for database queries
7
+ * @summary A class that encapsulates query conditions with support for complex logical operations.
8
+ * This class allows for building and combining query conditions using logical operators (AND, OR, NOT)
9
+ * and comparison operators (equals, not equals, greater than, etc.).
10
+ * @template M - The model type this condition operates on
11
+ * @param {string | Condition<M>} attr1 - The attribute name or a nested condition
12
+ * @param {Operator | GroupOperator} operator - The operator to use for the condition
13
+ * @param {any} comparison - The value to compare against or another condition
14
+ * @class Condition
15
+ * @example
16
+ * // Create a simple condition
17
+ * const nameCondition = Condition.attribute("name").eq("John");
18
+ *
19
+ * // Create a complex condition
20
+ * const complexCondition = Condition.attribute("age").gt(18)
21
+ * .and(Condition.attribute("status").eq("active"));
22
+ *
23
+ * // Use the builder pattern
24
+ * const userQuery = Condition.builder()
25
+ * .attribute("email").regexp(".*@example.com")
26
+ * .and(Condition.attribute("lastLogin").gt(new Date("2023-01-01")));
27
+ * @mermaid
28
+ * sequenceDiagram
29
+ * participant Dev
30
+ * participant Condition
31
+ * Dev->>Condition: builder().attribute("age").gt(18)
32
+ * Condition-->>Dev: Condition(age > 18)
33
+ * Dev->>Condition: .and(attribute("status").eq("active"))
34
+ * Condition-->>Dev: Condition((age > 18) AND (status = "active"))
35
+ */
36
+ export declare class Condition<M extends Model<any>> extends Model<InferAsync<M>> {
37
+ protected attr1?: string | Condition<M>;
38
+ protected operator?: Operator | GroupOperator;
39
+ protected comparison?: any;
40
+ private constructor();
41
+ private constructor();
42
+ /**
43
+ * @description Combines this condition with another using logical AND
44
+ * @summary Joins two conditions with an AND operator, requiring both to be true
45
+ * @param {Condition<M>} condition - The condition to combine with this one
46
+ * @return {Condition<M>} A new condition representing the AND operation
47
+ */
48
+ and(condition: Condition<M>): Condition<M>;
49
+ /**
50
+ * @description Combines this condition with another using logical OR
51
+ * @summary Joins two conditions with an OR operator, requiring at least one to be true
52
+ * @param {Condition<M>} condition - The condition to combine with this one
53
+ * @return {Condition<M>} A new condition representing the OR operation
54
+ */
55
+ or(condition: Condition<M>): Condition<M>;
56
+ /**
57
+ * @description Creates a negation condition
58
+ * @summary Excludes a value from the result by applying a NOT operator
59
+ * @param {any} val - The value to negate
60
+ * @return {Condition<M>} A new condition representing the NOT operation
61
+ */
62
+ not(val: any): Condition<M>;
63
+ /**
64
+ * @description Validates the condition and checks for errors
65
+ * @summary Extends the base validation to ensure the condition is properly formed
66
+ * @param {...string[]} exceptions - Fields to exclude from validation
67
+ * @return {ModelErrorDefinition | undefined} Error definition if validation fails, undefined otherwise
68
+ */
69
+ hasErrors(...exceptions: string[]): ConditionalAsync<InferAsync<M>, ModelErrorDefinition | undefined>;
70
+ /**
71
+ * @description Creates a new condition that combines two conditions with logical AND
72
+ * @summary Static method that joins two conditions with an AND operator, requiring both to be true
73
+ * @template M - The model type this condition operates on
74
+ * @param {Condition<M>} condition1 - The first condition
75
+ * @param {Condition<M>} condition2 - The second condition
76
+ * @return {Condition<M>} A new condition representing the AND operation
77
+ */
78
+ static and<M extends Model>(condition1: Condition<M>, condition2: Condition<M>): Condition<M>;
79
+ /**
80
+ * @description Creates a new condition that combines two conditions with logical OR
81
+ * @summary Static method that joins two conditions with an OR operator, requiring at least one to be true
82
+ * @template M - The model type this condition operates on
83
+ * @param {Condition<M>} condition1 - The first condition
84
+ * @param {Condition<M>} condition2 - The second condition
85
+ * @return {Condition<M>} A new condition representing the OR operation
86
+ */
87
+ static or<M extends Model>(condition1: Condition<M>, condition2: Condition<M>): Condition<M>;
88
+ /**
89
+ * @description Creates a new condition that groups two conditions with a specified operator
90
+ * @summary Private static method that combines two conditions using the specified group operator
91
+ * @template M - The model type this condition operates on
92
+ * @param {Condition<M>} condition1 - The first condition
93
+ * @param {GroupOperator} operator - The group operator to use (AND, OR)
94
+ * @param {Condition<M>} condition2 - The second condition
95
+ * @return {Condition<M>} A new condition representing the grouped operation
96
+ */
97
+ private static group;
98
+ /**
99
+ * @description Creates a condition builder for a specific model attribute
100
+ * @summary Static method that initializes a condition builder with the specified attribute
101
+ * @template M - The model type this condition operates on
102
+ * @param attr - The model attribute to build a condition for
103
+ * @return {AttributeOption<M>} A condition builder initialized with the attribute
104
+ */
105
+ static attribute<M extends Model>(attr: keyof M): AttributeOption<M>;
106
+ /**
107
+ * @description Alias for the attribute method
108
+ * @summary Shorthand method that initializes a condition builder with the specified attribute
109
+ * @template M - The model type this condition operates on
110
+ * @param attr - The model attribute to build a condition for
111
+ * @return {AttributeOption<M>} A condition builder initialized with the attribute
112
+ */
113
+ static attr<M extends Model>(attr: keyof M): AttributeOption<M>;
114
+ /**
115
+ * @description Provides a fluent API to build query conditions
116
+ * @summary A builder class that simplifies the creation of database query conditions
117
+ * with a chainable interface for setting attributes and operators
118
+ * @template M - The model type this condition builder operates on
119
+ * @class ConditionBuilder
120
+ */
121
+ private static Builder;
122
+ /**
123
+ * @description Creates a new condition builder
124
+ * @summary Factory method that returns a new instance of the condition builder
125
+ * @template M - The model type this condition builder will operate on
126
+ * @return {ConditionBuilderOption<M>} A new condition builder instance
127
+ */
128
+ static builder<M extends Model>(): ConditionBuilderOption<M>;
129
+ static from(obj: ModelArg<Condition<any>>): Condition<Model<any>>;
130
+ }
131
+ export {};
@@ -0,0 +1,185 @@
1
+ import { QueryAction, QueryAssist } from "./types.cjs";
2
+ import { LoggedClass, Logger } from "@decaf-ts/logging";
3
+ export type QueryActionPrefix = {
4
+ action: QueryAction;
5
+ prefix: string;
6
+ };
7
+ /**
8
+ * @description
9
+ * Utility class to build query objects from repository method names.
10
+ *
11
+ * @summary
12
+ * The `MethodQueryBuilder` class parses method names that follow a specific naming convention
13
+ * (e.g., `findByNameAndAgeOrderByCountryAsc`) and converts them into structured query objects
14
+ * (`QueryAssist`). It extracts clauses such as `select`, `where`, `groupBy`, `orderBy`, `limit`,
15
+ * and `offset`, ensuring that developers can declare repository queries using expressive method names.
16
+ *
17
+ * @param methodName {string} - The repository method name to parse and convert into a query.
18
+ * @param values {any[]} - The values corresponding to method parameters used for query conditions.
19
+ *
20
+ * @return {QueryAssist} A structured query object describing the parsed action, select, where,
21
+ * groupBy, orderBy, limit, and offset clauses.
22
+ *
23
+ * @class
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const query = MethodQueryBuilder.build(
28
+ * "findByNameAndAgeOrderByCountryAsc",
29
+ * "John",
30
+ * 25,
31
+ * [["country", "ASC"]]
32
+ * );
33
+ *
34
+ * console.log(query);
35
+ * // {
36
+ * // action: "find",
37
+ * // select: undefined,
38
+ * // where: { ... },
39
+ * // groupBy: undefined,
40
+ * // orderBy: [["country", "ASC"]],
41
+ * // limit: undefined,
42
+ * // offset: undefined
43
+ * // }
44
+ * ```
45
+ *
46
+ * @mermaid
47
+ * sequenceDiagram
48
+ * participant Repo as Repository Method
49
+ * participant MQB as MethodQueryBuilder
50
+ * participant Query as QueryAssist
51
+ *
52
+ * Repo->>MQB: build(methodName, ...values)
53
+ * MQB->>MQB: extractCore(methodName)
54
+ * MQB->>MQB: extractSelect(methodName)
55
+ * MQB->>MQB: extractGroupBy(methodName)
56
+ * MQB->>MQB: buildWhere(core, values)
57
+ * MQB->>MQB: extractOrderLimitOffset(core, values)
58
+ * MQB->>Query: return structured QueryAssist object
59
+ */
60
+ export declare class MethodQueryBuilder extends LoggedClass {
61
+ private static _logger;
62
+ protected static get log(): Logger;
63
+ /**
64
+ * @description
65
+ * Map of query prefixes to their corresponding actions.
66
+ */
67
+ private static readonly prefixMap;
68
+ /**
69
+ * @description
70
+ * Determines the action and prefix length from a method name.
71
+ *
72
+ * @param methodName {string} - The repository method name.
73
+ * @return {QueryActionPrefix} | undefined} The action and prefix if found.
74
+ */
75
+ private static getActionFromMethodName;
76
+ /**
77
+ * @description
78
+ * Builds a `QueryAssist` object by parsing a repository method name and values.
79
+ *
80
+ * @summary
81
+ * The method validates the method name, extracts clauses (core, select, groupBy, where,
82
+ * orderBy, limit, and offset), and assembles them into a structured query object
83
+ * that can be executed against a data source.
84
+ *
85
+ * @param methodName {string} - The repository method name that encodes query information.
86
+ * @param values {any[]} - The values corresponding to conditions and extra clauses.
87
+ *
88
+ * @return {QueryAssist} A structured query object representing the parsed query.
89
+ */
90
+ static build(methodName: string, ...values: any[]): QueryAssist;
91
+ /**
92
+ * @description
93
+ * Extracts the aggregation selector field from method names like countByAge, sumByPrice.
94
+ *
95
+ * @param methodName {string} - The method name.
96
+ * @param prefix {string} - The prefix to remove.
97
+ * @return {string | undefined} The selector field name.
98
+ */
99
+ private static extractAggregationSelector;
100
+ /**
101
+ * @description
102
+ * Extracts the core part of the method name after the prefix and before any special clauses.
103
+ *
104
+ * @summary
105
+ * Removes prefixes and detects delimiters (`Then`, `OrderBy`, `GroupBy`, `Limit`, `Offset`)
106
+ * to isolate the main conditional part of the query.
107
+ *
108
+ * @param methodName {string} - The method name to parse.
109
+ * @param prefix {string} - The prefix to remove (e.g., "findBy", "countBy").
110
+ *
111
+ * @return {string} The extracted core string used for building conditions.
112
+ */
113
+ private static extractCore;
114
+ static getFieldsFromMethodName(methodName: string): Array<string>;
115
+ /**
116
+ * @description
117
+ * Extracts the select clause from a method name.
118
+ *
119
+ * @summary
120
+ * Detects the `Select` keyword in the method name, isolates the fields following it,
121
+ * and returns them as an array of lowercase-first strings.
122
+ *
123
+ * @param methodName {string} - The method name to parse.
124
+ *
125
+ * @return {string[] | undefined} An array of selected fields or `undefined` if no select clause exists.
126
+ */
127
+ private static extractSelect;
128
+ /**
129
+ * @description
130
+ * Extracts the group by clause from a method name.
131
+ *
132
+ * @summary
133
+ * Detects the `GroupBy` keyword in the method name, isolates the fields following it,
134
+ * and returns them as an array of lowercase-first strings.
135
+ *
136
+ * @param methodName {string} - The method name to parse.
137
+ *
138
+ * @return {string[] | undefined} An array of group by fields or `undefined` if no group by clause exists.
139
+ */
140
+ private static extractGroupBy;
141
+ /**
142
+ * @description
143
+ * Builds the `where` condition object based on the parsed core string and parameter values.
144
+ *
145
+ * @summary
146
+ * Splits the core string by logical operators (`And`, `Or`), parses each token into a field
147
+ * and operator, and combines them into a `Condition` object using the provided values.
148
+ *
149
+ * @param core {string} - The extracted core string from the method name.
150
+ * @param values {any[]} - The values corresponding to the conditions.
151
+ *
152
+ * @return {Condition<any>} A structured condition object representing the query's where clause.
153
+ */
154
+ private static buildWhere;
155
+ /**
156
+ * @description
157
+ * Parses a field name and operator from a string token.
158
+ *
159
+ * @summary
160
+ * Identifies the operator suffix (if present) and returns a descriptor containing the field
161
+ * name in lowercase-first format along with the operator.
162
+ *
163
+ * @param str {string} - The token string to parse.
164
+ *
165
+ * @return {FilterDescriptor} An object containing the field name and operator.
166
+ */
167
+ private static parseFieldAndOperator;
168
+ private static extractOrderByField;
169
+ private static getProperlyOrderByOrThrow;
170
+ /**
171
+ * @description
172
+ * Extracts `orderBy`, `limit`, and `offset` clauses from method arguments.
173
+ *
174
+ * @summary
175
+ * Determines the number of condition arguments, then checks the remaining arguments
176
+ * to resolve sorting, limiting, and pagination.
177
+ *
178
+ * @param methodName {string} - The method name.
179
+ * @param values {any[]} - The values corresponding to method arguments, including conditions and extras.
180
+ * @param core {string} - The pre-extracted core string.
181
+ *
182
+ * @return {OrderLimitOffsetExtract} An object containing orderBy, limit, and offset values if present.
183
+ */
184
+ private static extractOrderLimitOffset;
185
+ }