@decaf-ts/core 0.24.0 → 0.25.1

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 (340) hide show
  1. package/lib/cjs/index.cjs +1 -1
  2. package/lib/esm/index.js +1 -1
  3. package/lib/types/auth/decorators.d.cts +2 -2
  4. package/lib/types/auth/decorators.d.mts +2 -2
  5. package/lib/types/auth/index.d.cts +2 -2
  6. package/lib/types/auth/index.d.mts +2 -2
  7. package/lib/types/fs/FilesystemAdapter.d.cts +5 -5
  8. package/lib/types/fs/FilesystemAdapter.d.mts +5 -5
  9. package/lib/types/fs/FsDispatch.d.cts +4 -4
  10. package/lib/types/fs/FsDispatch.d.mts +4 -4
  11. package/lib/types/fs/index.d.cts +4 -4
  12. package/lib/types/fs/index.d.mts +4 -4
  13. package/lib/types/fs/indexStore.d.cts +2 -2
  14. package/lib/types/fs/indexStore.d.mts +2 -2
  15. package/lib/types/fs/types.d.cts +2 -2
  16. package/lib/types/fs/types.d.mts +2 -2
  17. package/lib/types/identity/decorators.d.cts +3 -3
  18. package/lib/types/identity/decorators.d.mts +3 -3
  19. package/lib/types/identity/index.d.cts +1 -1
  20. package/lib/types/identity/index.d.mts +1 -1
  21. package/lib/types/index.d.cts +13 -13
  22. package/lib/types/index.d.mts +13 -13
  23. package/lib/types/interfaces/ContextuallyLogged.d.cts +2 -2
  24. package/lib/types/interfaces/ContextuallyLogged.d.mts +2 -2
  25. package/lib/types/interfaces/Observable.d.cts +1 -1
  26. package/lib/types/interfaces/Observable.d.mts +1 -1
  27. package/lib/types/interfaces/Paginatable.d.cts +1 -1
  28. package/lib/types/interfaces/Paginatable.d.mts +1 -1
  29. package/lib/types/interfaces/Queriable.d.cts +2 -2
  30. package/lib/types/interfaces/Queriable.d.mts +2 -2
  31. package/lib/types/interfaces/RawExecutor.d.cts +1 -1
  32. package/lib/types/interfaces/RawExecutor.d.mts +1 -1
  33. package/lib/types/interfaces/index.d.cts +7 -7
  34. package/lib/types/interfaces/index.d.mts +7 -7
  35. package/lib/types/migrations/Migration.d.cts +4 -4
  36. package/lib/types/migrations/Migration.d.mts +4 -4
  37. package/lib/types/migrations/MigrationService.d.cts +7 -7
  38. package/lib/types/migrations/MigrationService.d.mts +7 -7
  39. package/lib/types/migrations/MigrationTaskBuilder.d.cts +3 -3
  40. package/lib/types/migrations/MigrationTaskBuilder.d.mts +3 -3
  41. package/lib/types/migrations/MigrationTasks.d.cts +2 -2
  42. package/lib/types/migrations/MigrationTasks.d.mts +2 -2
  43. package/lib/types/migrations/SemverMigrationVersioning.d.cts +1 -1
  44. package/lib/types/migrations/SemverMigrationVersioning.d.mts +1 -1
  45. package/lib/types/migrations/StandardMigrationVersioning.d.cts +1 -1
  46. package/lib/types/migrations/StandardMigrationVersioning.d.mts +1 -1
  47. package/lib/types/migrations/constants.d.cts +1 -1
  48. package/lib/types/migrations/constants.d.mts +1 -1
  49. package/lib/types/migrations/decorators.d.cts +1 -1
  50. package/lib/types/migrations/decorators.d.mts +1 -1
  51. package/lib/types/migrations/index.d.cts +9 -9
  52. package/lib/types/migrations/index.d.mts +9 -9
  53. package/lib/types/migrations/types.d.cts +5 -5
  54. package/lib/types/migrations/types.d.mts +5 -5
  55. package/lib/types/model/SequenceModel.d.cts +1 -1
  56. package/lib/types/model/SequenceModel.d.mts +1 -1
  57. package/lib/types/model/construction.d.cts +4 -4
  58. package/lib/types/model/construction.d.mts +4 -4
  59. package/lib/types/model/decorators.d.cts +4 -4
  60. package/lib/types/model/decorators.d.mts +4 -4
  61. package/lib/types/model/index.d.cts +6 -6
  62. package/lib/types/model/index.d.mts +6 -6
  63. package/lib/types/model/indexing.d.cts +1 -1
  64. package/lib/types/model/indexing.d.mts +1 -1
  65. package/lib/types/model/types.d.cts +2 -2
  66. package/lib/types/model/types.d.mts +2 -2
  67. package/lib/types/overrides/Metadata.d.cts +6 -6
  68. package/lib/types/overrides/Metadata.d.mts +6 -6
  69. package/lib/types/overrides/Model.d.cts +3 -3
  70. package/lib/types/overrides/Model.d.mts +3 -3
  71. package/lib/types/overrides/index.d.cts +5 -5
  72. package/lib/types/overrides/index.d.mts +5 -5
  73. package/lib/types/overrides/injectables.d.cts +2 -2
  74. package/lib/types/overrides/injectables.d.mts +2 -2
  75. package/lib/types/persistence/Adapter.d.cts +15 -15
  76. package/lib/types/persistence/Adapter.d.mts +15 -15
  77. package/lib/types/persistence/Context.d.cts +1 -1
  78. package/lib/types/persistence/Context.d.mts +1 -1
  79. package/lib/types/persistence/ContextLock.d.cts +1 -1
  80. package/lib/types/persistence/ContextLock.d.mts +1 -1
  81. package/lib/types/persistence/Dispatch.d.cts +4 -4
  82. package/lib/types/persistence/Dispatch.d.mts +4 -4
  83. package/lib/types/persistence/ObserverHandler.d.cts +4 -4
  84. package/lib/types/persistence/ObserverHandler.d.mts +4 -4
  85. package/lib/types/persistence/Sequence.d.cts +7 -7
  86. package/lib/types/persistence/Sequence.d.mts +7 -7
  87. package/lib/types/persistence/constants.d.cts +2 -2
  88. package/lib/types/persistence/constants.d.mts +2 -2
  89. package/lib/types/persistence/decorators.d.cts +3 -3
  90. package/lib/types/persistence/decorators.d.mts +3 -3
  91. package/lib/types/persistence/event-filters.d.cts +2 -2
  92. package/lib/types/persistence/event-filters.d.mts +2 -2
  93. package/lib/types/persistence/index.d.cts +13 -13
  94. package/lib/types/persistence/index.d.mts +13 -13
  95. package/lib/types/persistence/transactions.d.cts +2 -2
  96. package/lib/types/persistence/transactions.d.mts +2 -2
  97. package/lib/types/persistence/types.d.cts +8 -8
  98. package/lib/types/persistence/types.d.mts +8 -8
  99. package/lib/types/query/Condition.d.cts +2 -2
  100. package/lib/types/query/Condition.d.mts +2 -2
  101. package/lib/types/query/MethodQueryBuilder.d.cts +1 -1
  102. package/lib/types/query/MethodQueryBuilder.d.mts +1 -1
  103. package/lib/types/query/Paginator.d.cts +3 -3
  104. package/lib/types/query/Paginator.d.mts +3 -3
  105. package/lib/types/query/Statement.d.cts +11 -11
  106. package/lib/types/query/Statement.d.mts +11 -11
  107. package/lib/types/query/decorators.d.cts +3 -3
  108. package/lib/types/query/decorators.d.mts +3 -3
  109. package/lib/types/query/index.d.cts +11 -11
  110. package/lib/types/query/index.d.mts +11 -11
  111. package/lib/types/query/options.d.cts +4 -4
  112. package/lib/types/query/options.d.mts +4 -4
  113. package/lib/types/query/selectors.d.cts +1 -1
  114. package/lib/types/query/selectors.d.mts +1 -1
  115. package/lib/types/query/types.d.cts +3 -3
  116. package/lib/types/query/types.d.mts +3 -3
  117. package/lib/types/query/utils.d.cts +1 -1
  118. package/lib/types/query/utils.d.mts +1 -1
  119. package/lib/types/ram/RamAdapter.d.cts +7 -7
  120. package/lib/types/ram/RamAdapter.d.mts +7 -7
  121. package/lib/types/ram/RamPaginator.d.cts +4 -4
  122. package/lib/types/ram/RamPaginator.d.mts +4 -4
  123. package/lib/types/ram/RamStatement.d.cts +5 -5
  124. package/lib/types/ram/RamStatement.d.mts +5 -5
  125. package/lib/types/ram/handlers.d.cts +3 -3
  126. package/lib/types/ram/handlers.d.mts +3 -3
  127. package/lib/types/ram/index.d.cts +6 -6
  128. package/lib/types/ram/index.d.mts +6 -6
  129. package/lib/types/ram/types.d.cts +3 -3
  130. package/lib/types/ram/types.d.mts +3 -3
  131. package/lib/types/repository/Repository.d.cts +14 -14
  132. package/lib/types/repository/Repository.d.mts +14 -14
  133. package/lib/types/repository/constants.d.cts +1 -1
  134. package/lib/types/repository/constants.d.mts +1 -1
  135. package/lib/types/repository/index.d.cts +7 -7
  136. package/lib/types/repository/index.d.mts +7 -7
  137. package/lib/types/repository/types.d.cts +1 -1
  138. package/lib/types/repository/types.d.mts +1 -1
  139. package/lib/types/services/ModelService.d.cts +8 -8
  140. package/lib/types/services/ModelService.d.mts +8 -8
  141. package/lib/types/services/PersistenceService.d.cts +4 -4
  142. package/lib/types/services/PersistenceService.d.mts +4 -4
  143. package/lib/types/services/index.d.cts +3 -3
  144. package/lib/types/services/index.d.mts +3 -3
  145. package/lib/types/services/services.d.cts +5 -5
  146. package/lib/types/services/services.d.mts +5 -5
  147. package/lib/types/tasks/CleanUpTask.d.cts +5 -5
  148. package/lib/types/tasks/CleanUpTask.d.mts +5 -5
  149. package/lib/types/tasks/TaskContext.d.cts +7 -7
  150. package/lib/types/tasks/TaskContext.d.mts +7 -7
  151. package/lib/types/tasks/TaskEngine.d.cts +18 -18
  152. package/lib/types/tasks/TaskEngine.d.mts +18 -18
  153. package/lib/types/tasks/TaskErrors.d.cts +2 -2
  154. package/lib/types/tasks/TaskErrors.d.mts +2 -2
  155. package/lib/types/tasks/TaskEventBus.d.cts +7 -7
  156. package/lib/types/tasks/TaskEventBus.d.mts +7 -7
  157. package/lib/types/tasks/TaskEventService.d.cts +3 -3
  158. package/lib/types/tasks/TaskEventService.d.mts +3 -3
  159. package/lib/types/tasks/TaskHandler.d.cts +3 -3
  160. package/lib/types/tasks/TaskHandler.d.mts +3 -3
  161. package/lib/types/tasks/TaskHandlerRegistry.d.cts +1 -1
  162. package/lib/types/tasks/TaskHandlerRegistry.d.mts +1 -1
  163. package/lib/types/tasks/TaskService.d.cts +15 -15
  164. package/lib/types/tasks/TaskService.d.mts +15 -15
  165. package/lib/types/tasks/TaskStateChangeError.d.cts +2 -2
  166. package/lib/types/tasks/TaskStateChangeError.d.mts +2 -2
  167. package/lib/types/tasks/TaskTracker.d.cts +8 -8
  168. package/lib/types/tasks/TaskTracker.d.mts +8 -8
  169. package/lib/types/tasks/builder.d.cts +4 -4
  170. package/lib/types/tasks/builder.d.mts +4 -4
  171. package/lib/types/tasks/constants.d.cts +1 -1
  172. package/lib/types/tasks/constants.d.mts +1 -1
  173. package/lib/types/tasks/index.d.cts +17 -17
  174. package/lib/types/tasks/index.d.mts +17 -17
  175. package/lib/types/tasks/logging.d.cts +1 -1
  176. package/lib/types/tasks/logging.d.mts +1 -1
  177. package/lib/types/tasks/models/TaskBackoffModel.d.cts +1 -1
  178. package/lib/types/tasks/models/TaskBackoffModel.d.mts +1 -1
  179. package/lib/types/tasks/models/TaskEventModel.d.cts +1 -1
  180. package/lib/types/tasks/models/TaskEventModel.d.mts +1 -1
  181. package/lib/types/tasks/models/TaskModel.d.cts +6 -6
  182. package/lib/types/tasks/models/TaskModel.d.mts +6 -6
  183. package/lib/types/tasks/models/TaskStepResultModel.d.cts +2 -2
  184. package/lib/types/tasks/models/TaskStepResultModel.d.mts +2 -2
  185. package/lib/types/tasks/models/index.d.cts +8 -8
  186. package/lib/types/tasks/models/index.d.mts +8 -8
  187. package/lib/types/tasks/types.d.cts +10 -10
  188. package/lib/types/tasks/types.d.mts +10 -10
  189. package/lib/types/tasks/utils.d.cts +2 -2
  190. package/lib/types/tasks/utils.d.mts +2 -2
  191. package/lib/types/utils/ContextualLoggedClass.d.cts +4 -4
  192. package/lib/types/utils/ContextualLoggedClass.d.mts +4 -4
  193. package/lib/types/utils/decorators.d.cts +1 -1
  194. package/lib/types/utils/decorators.d.mts +1 -1
  195. package/lib/types/utils/index.d.cts +6 -6
  196. package/lib/types/utils/index.d.mts +6 -6
  197. package/lib/types/workers/TaskEngine.d.cts +6 -6
  198. package/lib/types/workers/TaskEngine.d.mts +6 -6
  199. package/lib/types/workers/WorkThreadEnvironment.d.cts +1 -1
  200. package/lib/types/workers/WorkThreadEnvironment.d.mts +1 -1
  201. package/lib/types/workers/index.d.cts +4 -4
  202. package/lib/types/workers/index.d.mts +4 -4
  203. package/lib/types/workers/messages.d.cts +1 -1
  204. package/lib/types/workers/messages.d.mts +1 -1
  205. package/lib/types/workers/types.d.cts +3 -3
  206. package/lib/types/workers/types.d.mts +3 -3
  207. package/package.json +1 -1
  208. package/lib/types/auth/constants.d.ts +0 -5
  209. package/lib/types/auth/decorators.d.ts +0 -5
  210. package/lib/types/auth/index.d.ts +0 -2
  211. package/lib/types/fs/FilesystemAdapter.d.ts +0 -70
  212. package/lib/types/fs/FsDispatch.d.ts +0 -7
  213. package/lib/types/fs/helpers.d.ts +0 -17
  214. package/lib/types/fs/index.d.ts +0 -4
  215. package/lib/types/fs/indexStore.d.ts +0 -28
  216. package/lib/types/fs/locks/FilesystemLock.d.ts +0 -13
  217. package/lib/types/fs/locks/FilesystemMultiLock.d.ts +0 -8
  218. package/lib/types/fs/types.d.ts +0 -40
  219. package/lib/types/identity/decorators.d.ts +0 -72
  220. package/lib/types/identity/index.d.ts +0 -6
  221. package/lib/types/index.d.ts +0 -34
  222. package/lib/types/interfaces/ContextuallyLogged.d.ts +0 -8
  223. package/lib/types/interfaces/ErrorParser.d.ts +0 -16
  224. package/lib/types/interfaces/Executor.d.ts +0 -16
  225. package/lib/types/interfaces/Observable.d.ts +0 -33
  226. package/lib/types/interfaces/Observer.d.ts +0 -15
  227. package/lib/types/interfaces/Paginatable.d.ts +0 -20
  228. package/lib/types/interfaces/Queriable.d.ts +0 -47
  229. package/lib/types/interfaces/RawExecutor.d.ts +0 -28
  230. package/lib/types/interfaces/SequenceOptions.d.ts +0 -79
  231. package/lib/types/interfaces/index.d.ts +0 -12
  232. package/lib/types/migrations/Migration.d.ts +0 -19
  233. package/lib/types/migrations/MigrationService.d.ts +0 -63
  234. package/lib/types/migrations/MigrationTaskBuilder.d.ts +0 -10
  235. package/lib/types/migrations/MigrationTasks.d.ts +0 -9
  236. package/lib/types/migrations/MigrationVersioning.d.ts +0 -7
  237. package/lib/types/migrations/SemverMigrationVersioning.d.ts +0 -10
  238. package/lib/types/migrations/StandardMigrationVersioning.d.ts +0 -12
  239. package/lib/types/migrations/constants.d.ts +0 -2
  240. package/lib/types/migrations/decorators.d.ts +0 -12
  241. package/lib/types/migrations/index.d.ts +0 -15
  242. package/lib/types/migrations/types.d.ts +0 -46
  243. package/lib/types/model/BaseModel.d.ts +0 -37
  244. package/lib/types/model/SequenceModel.d.ts +0 -32
  245. package/lib/types/model/construction.d.ts +0 -455
  246. package/lib/types/model/decorators.d.ts +0 -237
  247. package/lib/types/model/index.d.ts +0 -11
  248. package/lib/types/model/indexing.d.ts +0 -20
  249. package/lib/types/model/types.d.ts +0 -60
  250. package/lib/types/overrides/Metadata.d.ts +0 -22
  251. package/lib/types/overrides/Model.d.ts +0 -94
  252. package/lib/types/overrides/ModelBuilder.d.ts +0 -31
  253. package/lib/types/overrides/index.d.ts +0 -11
  254. package/lib/types/overrides/injectables.d.ts +0 -10
  255. package/lib/types/overrides/overrides.d.ts +0 -1
  256. package/lib/types/persistence/Adapter.d.ts +0 -469
  257. package/lib/types/persistence/Context.d.ts +0 -16
  258. package/lib/types/persistence/ContextLock.d.ts +0 -18
  259. package/lib/types/persistence/Dispatch.d.ts +0 -128
  260. package/lib/types/persistence/ObserverHandler.d.ts +0 -111
  261. package/lib/types/persistence/Sequence.d.ts +0 -126
  262. package/lib/types/persistence/constants.d.ts +0 -74
  263. package/lib/types/persistence/decorators.d.ts +0 -28
  264. package/lib/types/persistence/errors.d.ts +0 -33
  265. package/lib/types/persistence/event-filters.d.ts +0 -20
  266. package/lib/types/persistence/generators.d.ts +0 -14
  267. package/lib/types/persistence/index.d.ts +0 -18
  268. package/lib/types/persistence/transactions.d.ts +0 -4
  269. package/lib/types/persistence/types.d.ts +0 -86
  270. package/lib/types/query/Condition.d.ts +0 -131
  271. package/lib/types/query/MethodQueryBuilder.d.ts +0 -185
  272. package/lib/types/query/Paginator.d.ts +0 -105
  273. package/lib/types/query/Statement.d.ts +0 -136
  274. package/lib/types/query/constants.d.ts +0 -69
  275. package/lib/types/query/decorators.d.ts +0 -8
  276. package/lib/types/query/errors.d.ts +0 -21
  277. package/lib/types/query/index.d.ts +0 -16
  278. package/lib/types/query/options.d.ts +0 -393
  279. package/lib/types/query/selectors.d.ts +0 -39
  280. package/lib/types/query/types.d.ts +0 -158
  281. package/lib/types/query/utils.d.ts +0 -40
  282. package/lib/types/ram/RamAdapter.d.ts +0 -341
  283. package/lib/types/ram/RamPaginator.d.ts +0 -54
  284. package/lib/types/ram/RamStatement.d.ts +0 -92
  285. package/lib/types/ram/constants.d.ts +0 -8
  286. package/lib/types/ram/handlers.d.ts +0 -24
  287. package/lib/types/ram/index.d.ts +0 -12
  288. package/lib/types/ram/types.d.ts +0 -50
  289. package/lib/types/repository/Repository.d.ts +0 -501
  290. package/lib/types/repository/constants.d.ts +0 -36
  291. package/lib/types/repository/decorators.d.ts +0 -30
  292. package/lib/types/repository/errors.d.ts +0 -19
  293. package/lib/types/repository/index.d.ts +0 -12
  294. package/lib/types/repository/injectables.d.ts +0 -95
  295. package/lib/types/repository/types.d.ts +0 -28
  296. package/lib/types/repository/utils.d.ts +0 -36
  297. package/lib/types/services/ModelService.d.ts +0 -45
  298. package/lib/types/services/PersistenceService.d.ts +0 -17
  299. package/lib/types/services/index.d.ts +0 -8
  300. package/lib/types/services/services.d.ts +0 -96
  301. package/lib/types/tasks/CleanUpTask.d.ts +0 -15
  302. package/lib/types/tasks/TaskContext.d.ts +0 -30
  303. package/lib/types/tasks/TaskEngine.d.ts +0 -97
  304. package/lib/types/tasks/TaskErrors.d.ts +0 -65
  305. package/lib/types/tasks/TaskEventBus.d.ts +0 -17
  306. package/lib/types/tasks/TaskEventService.d.ts +0 -7
  307. package/lib/types/tasks/TaskHandler.d.ts +0 -12
  308. package/lib/types/tasks/TaskHandlerRegistry.d.ts +0 -8
  309. package/lib/types/tasks/TaskService.d.ts +0 -65
  310. package/lib/types/tasks/TaskStateChangeError.d.ts +0 -11
  311. package/lib/types/tasks/TaskTracker.d.ts +0 -47
  312. package/lib/types/tasks/builder.d.ts +0 -72
  313. package/lib/types/tasks/constants.d.ts +0 -31
  314. package/lib/types/tasks/decorators.d.ts +0 -4
  315. package/lib/types/tasks/index.d.ts +0 -23
  316. package/lib/types/tasks/logging.d.ts +0 -31
  317. package/lib/types/tasks/models/TaskBackoffModel.d.ts +0 -9
  318. package/lib/types/tasks/models/TaskErrorModel.d.ts +0 -8
  319. package/lib/types/tasks/models/TaskEventModel.d.ts +0 -11
  320. package/lib/types/tasks/models/TaskIOSerializer.d.ts +0 -33
  321. package/lib/types/tasks/models/TaskLogEntryModel.d.ts +0 -10
  322. package/lib/types/tasks/models/TaskModel.d.ts +0 -43
  323. package/lib/types/tasks/models/TaskStepResultModel.d.ts +0 -9
  324. package/lib/types/tasks/models/TaskStepSpecModel.d.ts +0 -9
  325. package/lib/types/tasks/models/index.d.ts +0 -8
  326. package/lib/types/tasks/types.d.ts +0 -71
  327. package/lib/types/tasks/utils.d.ts +0 -5
  328. package/lib/types/utils/ContextualLoggedClass.d.ts +0 -37
  329. package/lib/types/utils/decorators.d.ts +0 -27
  330. package/lib/types/utils/errors.d.ts +0 -56
  331. package/lib/types/utils/index.d.ts +0 -11
  332. package/lib/types/utils/throttling.d.ts +0 -9
  333. package/lib/types/utils/types.d.ts +0 -23
  334. package/lib/types/utils/utils.d.ts +0 -22
  335. package/lib/types/workers/TaskEngine.d.ts +0 -40
  336. package/lib/types/workers/WorkThreadEnvironment.d.ts +0 -35
  337. package/lib/types/workers/index.d.ts +0 -5
  338. package/lib/types/workers/messages.d.ts +0 -69
  339. package/lib/types/workers/types.d.ts +0 -41
  340. package/lib/types/workers/workerThread.d.ts +0 -1
@@ -1,28 +0,0 @@
1
- import { RawResult } from "../persistence/types";
2
- /**
3
- * @description Interface for executing raw queries
4
- * @summary Defines a contract for objects that can execute raw queries of a specific type and return results
5
- * @template Q - The query type that this executor can process
6
- * @interface RawExecutor
7
- * @memberOf module:core
8
- */
9
- export interface RawExecutor<Q> {
10
- /**
11
- * @description Executes a raw query
12
- * @summary Processes a raw query input and returns a promise that resolves to the result
13
- * @template R - The result type that will be returned
14
- * @param {Q} rawInput - The raw query to execute
15
- * @return {Promise<R>} A promise that resolves to the result of type R
16
- */
17
- raw<R>(rawInput: Q, ...args: any[]): Promise<R>;
18
- }
19
- export interface RawPagedExecutor<Q> {
20
- /**
21
- * @description Executes a raw query
22
- * @summary Processes a raw query input and returns a promise that resolves to the result
23
- * @template R - The result type that will be returned
24
- * @param {Q} rawInput - The raw query to execute
25
- * @return {Promise<R>} A promise that resolves to the result of type R
26
- */
27
- raw<R, D extends boolean>(rawInput: Q, docsOnly: D, ...args: any[]): Promise<RawResult<R, D>>;
28
- }
@@ -1,79 +0,0 @@
1
- /**
2
- * @description Type of the sequence configuration options type property
3
- * @summary Type of the sequence configuration options type property
4
- * @interface SequenceOptionsType
5
- * @memberOf module:core
6
- */
7
- export type SequenceOptionsType = "Number" | "BigInt" | "String" | string | "serial" | "uuid" | StringConstructor | NumberConstructor | BigIntConstructor | undefined;
8
- /**
9
- * @description Interface for sequence configuration options
10
- * @summary Defines the configuration options for creating and managing sequences
11
- * @interface SequenceOptions
12
- * @memberOf module:core
13
- */
14
- export interface SequenceOptions<TYPE = SequenceOptionsType> {
15
- /**
16
- * @description Optional name for the sequence
17
- * @summary A unique identifier for the sequence
18
- */
19
- name?: string;
20
- generated?: boolean;
21
- /**
22
- * @description The data type of the sequence
23
- * @summary Specifies whether the sequence generates Number or BigInt values
24
- */
25
- type: TYPE;
26
- /**
27
- * @description The initial value of the sequence
28
- * @summary The value that the sequence starts with
29
- */
30
- startWith: number;
31
- /**
32
- * @description The increment value for each step in the sequence
33
- * @summary The amount by which the sequence increases with each call
34
- */
35
- incrementBy: number;
36
- /**
37
- * @description Optional minimum value for the sequence
38
- * @summary The lowest value that the sequence can generate
39
- */
40
- minValue?: number;
41
- /**
42
- * @description Optional maximum value for the sequence
43
- * @summary The highest value that the sequence can generate
44
- */
45
- maxValue?: number;
46
- /**
47
- * @description Whether the sequence should cycle when reaching its limits
48
- * @summary If true, the sequence will restart from minValue when reaching maxValue
49
- */
50
- cycle: boolean;
51
- }
52
- /**
53
- * @description Default options for sequences
54
- * @summary Provides a standard configuration for number sequences starting at 0 and incrementing by 1
55
- * @const NoneSequenceOptions
56
- * @memberOf module:core
57
- */
58
- export declare const NoneSequenceOptions: SequenceOptions;
59
- /**
60
- * @description Default options for sequences
61
- * @summary Provides a standard configuration for number sequences starting at 0 and incrementing by 1
62
- * @const DefaultSequenceOptions
63
- * @memberOf module:core
64
- */
65
- export declare const DefaultSequenceOptions: SequenceOptions;
66
- /**
67
- * @description Predefined options for numeric sequences
68
- * @summary Configuration for standard number sequences starting at 0 and incrementing by 1
69
- * @const NumericSequence
70
- * @memberOf module:core
71
- */
72
- export declare const NumericSequence: SequenceOptions;
73
- /**
74
- * @description Predefined options for BigInt sequences
75
- * @summary Configuration for BigInt sequences starting at 0 and incrementing by 1
76
- * @const BigIntSequence
77
- * @memberOf module:core
78
- */
79
- export declare const BigIntSequence: SequenceOptions;
@@ -1,12 +0,0 @@
1
- /**
2
- * @description Exports for the interfaces module.
3
- * @summary This file exports all the necessary components for the interfaces functionality, including ErrorParser, Executor, and more.
4
- * @module core/interfaces
5
- */
6
- export * from "./ErrorParser";
7
- export * from "./Executor";
8
- export * from "./Observable";
9
- export * from "./Observer";
10
- export * from "./Queriable";
11
- export * from "./RawExecutor";
12
- export * from "./SequenceOptions";
@@ -1,19 +0,0 @@
1
- import { ConnectionForAdapter, Migration } from "./types";
2
- import { AbsContextual, ContextualArgs } from "../utils/ContextualLoggedClass";
3
- import { Adapter } from "../persistence/Adapter";
4
- import { ContextOf } from "../persistence/types";
5
- export declare abstract class AbsMigration<A extends Adapter<any, any, any, any>, R = void> extends AbsContextual<ContextOf<A>> implements Migration<A, R> {
6
- private _reference?;
7
- private _precedence?;
8
- transaction: boolean;
9
- get reference(): string;
10
- get precedence(): string | Migration<any, any>;
11
- protected constructor();
12
- protected get adapter(): A;
13
- protected abstract getQueryRunner(conn: ConnectionForAdapter<A>): ConnectionForAdapter<A>;
14
- private enforceRules;
15
- private prefix;
16
- abstract down(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<void>;
17
- abstract migrate(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<R>;
18
- abstract up(qr: ConnectionForAdapter<A>, adapter: A, ctx: ContextOf<A>): Promise<void>;
19
- }
@@ -1,63 +0,0 @@
1
- import { Migration, MigrationConfig, PersistenceMigrationConfig } from "./types";
2
- import { ClientBasedService } from "../services/services";
3
- import { Adapter } from "../persistence/Adapter";
4
- import { ContextOf } from "../persistence/types";
5
- import { ContextualArgs, MaybeContextualArg } from "../utils/ContextualLoggedClass";
6
- import { TaskModel } from "../tasks/models/TaskModel";
7
- import { MigrationVersioning } from "./MigrationVersioning";
8
- type ResolvedMigration = {
9
- migration: Migration<any, any>;
10
- flavour: string;
11
- reference: string;
12
- version: string;
13
- };
14
- type VersionTask = {
15
- version: string;
16
- task: TaskModel;
17
- };
18
- export declare class MigrationService<PERSIST extends boolean, A extends Adapter<any, any, any, any> = any, R = void> extends ClientBasedService<PERSIST extends boolean ? A : void, MigrationConfig<PERSIST>> implements Migration<A, R> {
19
- protected versioning: MigrationVersioning;
20
- protected queuedTaskChain: Array<{
21
- id: string;
22
- version: string;
23
- }>;
24
- flavour?: string;
25
- readonly reference: string;
26
- readonly precedence: Migration<any, any> | Migration<any, any>[] | null;
27
- transaction: boolean;
28
- constructor();
29
- static migrateAdapters<AD extends Adapter<any, any, any, any> = Adapter<any, any, any, any>>(adapters: AD[], cfg?: PersistenceMigrationConfig<AD>, ...args: MaybeContextualArg<ContextOf<AD>>): Promise<MigrationService<true, AD>[]>;
30
- initialize(...args: MaybeContextualArg<ContextOf<A>>): Promise<{
31
- config: MigrationConfig<PERSIST>;
32
- client: PERSIST extends boolean ? A : void;
33
- }>;
34
- down(qr: any, adapter: any, ...args: ContextualArgs<ContextOf<any>>): Promise<void>;
35
- protected normalizeVersion(raw: string, precedenceHint?: string): string;
36
- protected extractPrecedenceTokens(migration: Migration<any, any>): string[];
37
- protected referencesMigration(candidate: Migration<any, any>, target: ResolvedMigration): boolean;
38
- protected precedenceHint(migration: Migration<any, any>): string | undefined;
39
- protected compareByPrecedence(migration1: ResolvedMigration, migration2: ResolvedMigration): number;
40
- protected sort(migrations: ResolvedMigration[]): ResolvedMigration[];
41
- protected resolveMigration(migration: Migration<any, any>): ResolvedMigration;
42
- protected shouldIncludeMigration(migration: ResolvedMigration, targetFlavour?: string, includeGeneric?: boolean): boolean;
43
- protected collectMigrations(targetFlavour?: string, includeGeneric?: boolean): ResolvedMigration[];
44
- protected buildExecutionPlan(options?: {
45
- fromVersion?: string;
46
- toVersion?: string;
47
- targetFlavour?: string;
48
- includeGeneric?: boolean;
49
- }): ResolvedMigration[];
50
- protected executeMigration(migration: ResolvedMigration, ...args: ContextualArgs<ContextOf<any>>): Promise<void>;
51
- protected buildMigrationTaskForPlan(plan: ResolvedMigration[], ...args: ContextualArgs<ContextOf<any>>): TaskModel;
52
- protected buildMigrationTasksForPlan(plan: ResolvedMigration[], ...args: ContextualArgs<ContextOf<any>>): VersionTask[];
53
- createMigrationTask(targetVersion?: string, fromVersion?: string, ...args: ContextualArgs<ContextOf<any>>): TaskModel;
54
- createMigrationTasks(targetVersion?: string, fromVersion?: string, ...args: ContextualArgs<ContextOf<any>>): VersionTask[];
55
- protected migrationTaskIdsFromContext(taskKey: string, args: ContextualArgs<ContextOf<any>>): string[];
56
- migrate(qr?: any, adapter?: any, ...args: MaybeContextualArg<ContextOf<any>>): Promise<R>;
57
- migrateNormally(qr?: any, adapter?: any, ...args: MaybeContextualArg<ContextOf<any>>): Promise<R>;
58
- migrateViaTasks(qr?: any, adapter?: any, ...args: MaybeContextualArg<ContextOf<any>>): Promise<R>;
59
- track(taskIds?: string[] | string, ...args: MaybeContextualArg<ContextOf<any>>): Promise<void>;
60
- retry(taskIds?: string[] | string, ...args: MaybeContextualArg<ContextOf<any>>): Promise<void>;
61
- up(qr: any, adapter: any, ...args: ContextualArgs<ContextOf<any>>): Promise<void>;
62
- }
63
- export {};
@@ -1,10 +0,0 @@
1
- import { CompositeTaskBuilder } from "../tasks/builder";
2
- import { TaskModel } from "../tasks/models/TaskModel";
3
- import { MigrationStepInput } from "./MigrationTasks";
4
- export declare class MigrationTaskBuilder {
5
- protected readonly builder: CompositeTaskBuilder;
6
- constructor(name?: string);
7
- addMigrationStep(step: MigrationStepInput): this;
8
- addStep(classification: string, input?: any): this;
9
- build(): TaskModel;
10
- }
@@ -1,9 +0,0 @@
1
- import { TaskHandler } from "../tasks/TaskHandler";
2
- import { TaskContext } from "../tasks/TaskContext";
3
- export interface MigrationStepInput {
4
- reference: string;
5
- args?: any[];
6
- }
7
- export declare class MigrationTask extends TaskHandler<MigrationStepInput, void> {
8
- run(input: MigrationStepInput, ctx: TaskContext): Promise<void>;
9
- }
@@ -1,7 +0,0 @@
1
- export interface MigrationVersioning {
2
- isVersionHint(value: string): boolean;
3
- normalize(reference: string, precedenceHint?: string): string;
4
- compare(a: string, b: string): number;
5
- gt(a: string, b: string): boolean;
6
- lte(a: string, b: string): boolean;
7
- }
@@ -1,10 +0,0 @@
1
- import { MigrationVersioning } from "./MigrationVersioning";
2
- export declare class SemverMigrationVersioning implements MigrationVersioning {
3
- private coerce;
4
- private slug;
5
- isVersionHint(value: string): boolean;
6
- normalize(reference: string, precedenceHint?: string): string;
7
- compare(a: string, b: string): number;
8
- gt(a: string, b: string): boolean;
9
- lte(a: string, b: string): boolean;
10
- }
@@ -1,12 +0,0 @@
1
- import { MigrationVersioning } from "./MigrationVersioning";
2
- /**
3
- * Legacy non-semver migration ordering strategy.
4
- * Keeps references as-is and compares using lexical order.
5
- */
6
- export declare class StandardMigrationVersioning implements MigrationVersioning {
7
- isVersionHint(value: string): boolean;
8
- normalize(reference: string, precedenceHint?: string): string;
9
- compare(a: string, b: string): number;
10
- gt(a: string, b: string): boolean;
11
- lte(a: string, b: string): boolean;
12
- }
@@ -1,2 +0,0 @@
1
- import { MigrationConfig } from "./types";
2
- export declare const DefaultMigrationConfig: MigrationConfig<true>;
@@ -1,12 +0,0 @@
1
- import { Constructor } from "@decaf-ts/decoration";
2
- import { Migration, MigrationRule } from "./types";
3
- export declare function migration(reference: string): (target: object) => any;
4
- export declare function migration(reference: string, precedence: Constructor<Migration<any, any>> | null): (target: object) => any;
5
- export declare function migration(reference: string, flavour: string, rules?: MigrationRule[]): (target: object) => any;
6
- export declare function migration(reference: string, precedence: Constructor<Migration<any, any>>, flavour: string): (target: object) => any;
7
- export declare function migration(reference: string, precedence?: Constructor<Migration<any, any>> | string | null, flavour?: string | MigrationRule[], rules?: MigrationRule[]): (target: object) => any;
8
- export declare function migration(reference: string, opts?: {
9
- precedence?: Constructor<Migration<any, any>> | string | null;
10
- flavour?: string;
11
- rules?: MigrationRule[];
12
- }): (target: object) => any;
@@ -1,15 +0,0 @@
1
- /**
2
- * @description Exports for the migrations module.
3
- * @summary This file exports all the necessary components for the migrations functionality, including constants, decorators, and more.
4
- * @module core/migrations
5
- */
6
- import "../overrides";
7
- export * from "./constants";
8
- export * from "./decorators";
9
- export * from "./Migration";
10
- export * from "./MigrationService";
11
- export * from "./MigrationTaskBuilder";
12
- export * from "./MigrationTasks";
13
- export * from "./StandardMigrationVersioning";
14
- export * from "./MigrationVersioning";
15
- export * from "./types";
@@ -1,46 +0,0 @@
1
- import { Adapter } from "../persistence/Adapter";
2
- import { AdapterFlags, ContextOf } from "../persistence/types";
3
- import { ContextualArgs } from "../utils/ContextualLoggedClass";
4
- import { TaskService } from "../tasks/TaskService";
5
- import type { MigrationVersioning } from "./MigrationVersioning";
6
- export interface Migration<A extends Adapter<any, any, any, any>, R = void> {
7
- flavour?: string;
8
- precedence: Migration<any, any> | Migration<any, any>[] | string | null;
9
- reference: string;
10
- transaction: boolean;
11
- up(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<void>;
12
- migrate(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<R>;
13
- down(qr: ConnectionForAdapter<A>, adapter: A, ...args: ContextualArgs<ContextOf<A>>): Promise<void>;
14
- }
15
- export type ConnectionForAdapter<A extends Adapter<any, any, any, any>> = A extends Adapter<any, any, infer CONN, any> ? CONN : never;
16
- export type MigrationRule<A extends Adapter<any, any, any, any> = any, QUERYRUNNER = ConnectionForAdapter<A>> = (qr: QUERYRUNNER, adapter: A, ctx: ContextOf<A>) => Promise<boolean>;
17
- export type MigrationMetadata = {
18
- precedence?: Migration<any, any> | string;
19
- flavour: string;
20
- rules?: MigrationRule[];
21
- };
22
- export type RetrieveLastVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (adapter: A, ...args: ContextualArgs<ContextOf<A>>) => Promise<string | undefined | null>;
23
- export type SetCurrentVersionHandler<A extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = (version: string, adapter: A, ...args: ContextualArgs<ContextOf<A>>) => Promise<void>;
24
- export type AdapterMigrationHandlers<AD extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = {
25
- retrieveLastVersion?: RetrieveLastVersionHandler<AD>;
26
- setCurrentVersion?: SetCurrentVersionHandler<AD>;
27
- };
28
- export type PersistenceMigrationConfig<AD extends Adapter<any, any, any, any> = Adapter<any, any, any, any>> = {
29
- toVersion?: string;
30
- taskMode?: boolean;
31
- dryRun?: boolean;
32
- flavours?: string[];
33
- taskService?: TaskService<any>;
34
- handlers?: Partial<Record<string, AdapterMigrationHandlers<AD>>>;
35
- };
36
- export type MigrationConfig<PERSIST extends boolean> = AdapterFlags<any> & {
37
- persistMigrationSteps: PERSIST;
38
- persistenceFlavour?: string;
39
- targetVersion?: string;
40
- taskMode?: boolean;
41
- includeGenericInTaskMode?: boolean;
42
- retrieveLastVersion?: RetrieveLastVersionHandler;
43
- setCurrentVersion?: SetCurrentVersionHandler;
44
- taskService?: TaskService<any>;
45
- versioning?: MigrationVersioning;
46
- };
@@ -1,37 +0,0 @@
1
- import { ModelArg, Model } from "@decaf-ts/decorator-validation";
2
- /**
3
- * @description Base model class for all domain models
4
- * @summary An abstract base class that extends the Model class from decorator-validation and adds timestamp functionality.
5
- * All domain models in the application should extend this class to inherit common properties and behaviors.
6
- * @param {ModelArg<BaseModel>} arg - Optional initialization data for the model
7
- * @class BaseModel
8
- * @example
9
- * ```typescript
10
- * class User extends BaseModel {
11
- * @required()
12
- * username!: string;
13
- *
14
- * @email()
15
- * email!: string;
16
- *
17
- * constructor(data?: ModelArg<User>) {
18
- * super(data);
19
- * }
20
- * }
21
- *
22
- * const user = new User({ username: 'john', email: 'john@example.com' });
23
- * ```
24
- */
25
- export declare abstract class BaseModel extends Model {
26
- /**
27
- * @description Creation timestamp for the model
28
- * @summary Automatically set to the current date and time when the model is created
29
- */
30
- createdAt: Date;
31
- /**
32
- * @description Last update timestamp for the model
33
- * @summary Automatically updated to the current date and time whenever the model is modified
34
- */
35
- updatedAt: Date;
36
- protected constructor(arg?: ModelArg<BaseModel>);
37
- }
@@ -1,32 +0,0 @@
1
- import type { ModelArg } from "@decaf-ts/decorator-validation";
2
- import { BaseModel } from "./BaseModel";
3
- /**
4
- * @description RAM sequence model for auto-incrementing values
5
- * @summary A model class that represents a sequence in the RAM adapter. It stores the current value
6
- * of a sequence that can be used for generating sequential identifiers for entities.
7
- * The sequence is identified by its ID and maintains the current value.
8
- * @param {ModelArg<Sequence>} seq - Initial sequence data
9
- * @class Sequence
10
- * @category Ram
11
- * @example
12
- * ```typescript
13
- * // Create a new sequence
14
- * const orderSequence = new Sequence({ id: 'order_seq', current: 1 });
15
- *
16
- * // Use the sequence to get the next value
17
- * const nextOrderId = parseInt(orderSequence.current.toString()) + 1;
18
- * orderSequence.current = nextOrderId;
19
- * ```
20
- */
21
- export declare class SequenceModel extends BaseModel {
22
- /**
23
- * @description Primary key identifier for the sequence
24
- */
25
- id: string;
26
- /**
27
- * @description Current value of the sequence
28
- * Used to generate the next sequential value
29
- */
30
- current: string | number;
31
- constructor(seq?: ModelArg<SequenceModel>);
32
- }