taon 21.0.44 → 21.0.45

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 (405) hide show
  1. package/bin/start.js +8 -211
  2. package/bin/taon +1 -2
  3. package/bin/taon-debug +1 -1
  4. package/bin/taon-debug-brk +1 -2
  5. package/browser/package.json +1 -1
  6. package/browser/types/taon-browser.d.ts +3 -3
  7. package/browser-prod/package.json +1 -1
  8. package/browser-prod/types/taon-browser.d.ts +3 -3
  9. package/lib/build-info._auto-generated_.d.ts +1 -1
  10. package/lib/build-info._auto-generated_.js +1 -1
  11. package/lib/package.json +1 -1
  12. package/lib/ui/index.js +2 -2
  13. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  14. package/lib-prod/base-classes/base-abstract-entity.ts +34 -0
  15. package/lib-prod/base-classes/base-angular-service.ts +107 -0
  16. package/lib-prod/base-classes/base-class.ts +46 -0
  17. package/lib-prod/base-classes/base-context.ts +21 -0
  18. package/lib-prod/base-classes/base-controller.ts +240 -0
  19. package/lib-prod/base-classes/base-crud-controller.ts +298 -0
  20. package/lib-prod/base-classes/base-custom-repository.ts +10 -0
  21. package/lib-prod/base-classes/{base-electron-service.js → base-electron-service.ts} +12 -2
  22. package/lib-prod/base-classes/base-entity.ts +28 -0
  23. package/lib-prod/base-classes/base-file-upload.middleware.ts +92 -0
  24. package/lib-prod/base-classes/base-injector.ts +278 -0
  25. package/lib-prod/base-classes/base-middleware.ts +71 -0
  26. package/lib-prod/base-classes/base-migration.ts +26 -0
  27. package/lib-prod/base-classes/{base-provider.d.ts → base-provider.ts} +2 -2
  28. package/lib-prod/base-classes/base-repository.ts +942 -0
  29. package/lib-prod/base-classes/base-subscriber-for-entity.ts +196 -0
  30. package/lib-prod/base-classes/{base.js → base.ts} +15 -4
  31. package/lib-prod/{build-info._auto-generated_.d.ts → build-info._auto-generated_.ts} +9 -6
  32. package/lib-prod/config/controller-config.ts +58 -0
  33. package/lib-prod/config/controller-options.ts +19 -0
  34. package/lib-prod/config/method-config.ts +55 -0
  35. package/lib-prod/config/param-config.ts +16 -0
  36. package/lib-prod/constants.ts +63 -0
  37. package/lib-prod/context-db-migrations.ts +488 -0
  38. package/lib-prod/create-context.ts +345 -0
  39. package/lib-prod/decorators/classes/controller-decorator.ts +25 -0
  40. package/lib-prod/decorators/classes/entity-decorator.ts +57 -0
  41. package/lib-prod/decorators/classes/middleware-decorator.ts +29 -0
  42. package/lib-prod/decorators/classes/migration-decorator.ts +27 -0
  43. package/lib-prod/decorators/classes/provider-decorator.ts +28 -0
  44. package/lib-prod/decorators/classes/repository-decorator.ts +26 -0
  45. package/lib-prod/decorators/classes/subscriber-decorator.ts +28 -0
  46. package/lib-prod/decorators/decorator-abstract-opt.ts +4 -0
  47. package/lib-prod/decorators/http/http-decorators.ts +26 -0
  48. package/lib-prod/decorators/http/http-methods-decorators.ts +275 -0
  49. package/lib-prod/decorators/http/http-params-decorators.ts +105 -0
  50. package/lib-prod/dependency-injection/di-container.ts +39 -0
  51. package/lib-prod/endpoint-context-storage.ts +47 -0
  52. package/lib-prod/endpoint-context.ts +3100 -0
  53. package/lib-prod/entity-process.ts +283 -0
  54. package/lib-prod/env/env.angular-node-app.ts +66 -0
  55. package/lib-prod/env/env.docs-webapp.ts +66 -0
  56. package/lib-prod/env/env.electron-app.ts +66 -0
  57. package/lib-prod/env/env.mobile-app.ts +66 -0
  58. package/lib-prod/env/env.npm-lib-and-cli-tool.ts +66 -0
  59. package/lib-prod/env/env.vscode-plugin.ts +66 -0
  60. package/lib-prod/express-types.ts +4 -0
  61. package/lib-prod/formly/formly.models.ts +7 -0
  62. package/lib-prod/formly/fromly.ts +261 -0
  63. package/lib-prod/formly/type-from-entity.ts +80 -0
  64. package/lib-prod/get-response-value.ts +30 -0
  65. package/lib-prod/global-state/taon-global-state/{index.d.ts → index.ts} +2 -1
  66. package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.ts +21 -0
  67. package/lib-prod/global-state/taon-global-state/taon-global-state.constants.ts +9 -0
  68. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.ts +44 -0
  69. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.ts +40 -0
  70. package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.ts +12 -0
  71. package/lib-prod/global-state/taon-global-state/taon-global-state.models.ts +48 -0
  72. package/lib-prod/global-state/taon-global-state/taon-global-state.provider.ts +16 -0
  73. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.ts +47 -0
  74. package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.ts +18 -0
  75. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.ts +21 -0
  76. package/lib-prod/global-state/taon-transaction-registry/{index.d.ts → index.ts} +2 -1
  77. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.ts +23 -0
  78. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.ts +7 -0
  79. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.ts +38 -0
  80. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.ts +54 -0
  81. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.ts +12 -0
  82. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.ts +6 -0
  83. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.ts +16 -0
  84. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.ts +29 -0
  85. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.ts +20 -0
  86. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.ts +9 -0
  87. package/lib-prod/helpers/class-helpers.ts +315 -0
  88. package/lib-prod/helpers/clone-obj.ts +24 -0
  89. package/lib-prod/helpers/taon-helpers.ts +181 -0
  90. package/lib-prod/{index._auto-generated_.js → index._auto-generated_.ts} +0 -1
  91. package/lib-prod/index.ts +323 -0
  92. package/lib-prod/{inject.js → inject.ts} +57 -40
  93. package/lib-prod/lib-info.md +8 -0
  94. package/lib-prod/migrations/index.ts +2 -0
  95. package/lib-prod/migrations/migrations-info.md +6 -0
  96. package/lib-prod/migrations/{migrations_index._auto-generated_.js → migrations_index._auto-generated_.ts} +2 -1
  97. package/lib-prod/models.ts +427 -0
  98. package/lib-prod/orm/columns.ts +121 -0
  99. package/lib-prod/orm/index.ts +62 -0
  100. package/lib-prod/package.json +1 -1
  101. package/lib-prod/realtime/realtime-client.ts +288 -0
  102. package/lib-prod/realtime/realtime-core.ts +134 -0
  103. package/lib-prod/realtime/realtime-server.ts +398 -0
  104. package/lib-prod/realtime/realtime-strategy/{index.d.ts → index.ts} +1 -1
  105. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.ts +344 -0
  106. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.ts +349 -0
  107. package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.ts +30 -0
  108. package/lib-prod/realtime/realtime-strategy/realtime-strategy.ts +21 -0
  109. package/lib-prod/realtime/realtime-subs-manager.ts +127 -0
  110. package/lib-prod/realtime/{realtime.models.d.ts → realtime.models.ts} +13 -5
  111. package/lib-prod/symbols.ts +136 -0
  112. package/lib-prod/ui/index.ts +1 -0
  113. package/lib-prod/ui/taon-admin-mode-configuration/index.ts +1 -0
  114. package/lib-prod/validators.ts +103 -0
  115. package/package.json +1 -1
  116. package/websql/package.json +1 -1
  117. package/websql/types/taon-websql.d.ts +3 -3
  118. package/websql-prod/package.json +1 -1
  119. package/websql-prod/types/taon-websql.d.ts +3 -3
  120. package/lib-prod/base-classes/base-abstract-entity.d.ts +0 -7
  121. package/lib-prod/base-classes/base-abstract-entity.js +0 -42
  122. package/lib-prod/base-classes/base-abstract-entity.js.map +0 -1
  123. package/lib-prod/base-classes/base-angular-service.d.ts +0 -27
  124. package/lib-prod/base-classes/base-angular-service.js +0 -89
  125. package/lib-prod/base-classes/base-angular-service.js.map +0 -1
  126. package/lib-prod/base-classes/base-class.d.ts +0 -15
  127. package/lib-prod/base-classes/base-class.js +0 -40
  128. package/lib-prod/base-classes/base-class.js.map +0 -1
  129. package/lib-prod/base-classes/base-context.d.ts +0 -20
  130. package/lib-prod/base-classes/base-context.js +0 -23
  131. package/lib-prod/base-classes/base-context.js.map +0 -1
  132. package/lib-prod/base-classes/base-controller.d.ts +0 -84
  133. package/lib-prod/base-classes/base-controller.js +0 -173
  134. package/lib-prod/base-classes/base-controller.js.map +0 -1
  135. package/lib-prod/base-classes/base-crud-controller.d.ts +0 -28
  136. package/lib-prod/base-classes/base-crud-controller.js +0 -318
  137. package/lib-prod/base-classes/base-crud-controller.js.map +0 -1
  138. package/lib-prod/base-classes/base-custom-repository.d.ts +0 -3
  139. package/lib-prod/base-classes/base-custom-repository.js +0 -19
  140. package/lib-prod/base-classes/base-custom-repository.js.map +0 -1
  141. package/lib-prod/base-classes/base-electron-service.d.ts +0 -0
  142. package/lib-prod/base-classes/base-electron-service.js.map +0 -1
  143. package/lib-prod/base-classes/base-entity.d.ts +0 -16
  144. package/lib-prod/base-classes/base-entity.js +0 -32
  145. package/lib-prod/base-classes/base-entity.js.map +0 -1
  146. package/lib-prod/base-classes/base-file-upload.middleware.d.ts +0 -14
  147. package/lib-prod/base-classes/base-file-upload.middleware.js +0 -85
  148. package/lib-prod/base-classes/base-file-upload.middleware.js.map +0 -1
  149. package/lib-prod/base-classes/base-injector.d.ts +0 -67
  150. package/lib-prod/base-classes/base-injector.js +0 -198
  151. package/lib-prod/base-classes/base-injector.js.map +0 -1
  152. package/lib-prod/base-classes/base-middleware.d.ts +0 -38
  153. package/lib-prod/base-classes/base-middleware.js +0 -14
  154. package/lib-prod/base-classes/base-middleware.js.map +0 -1
  155. package/lib-prod/base-classes/base-migration.d.ts +0 -11
  156. package/lib-prod/base-classes/base-migration.js +0 -25
  157. package/lib-prod/base-classes/base-migration.js.map +0 -1
  158. package/lib-prod/base-classes/base-provider.js +0 -13
  159. package/lib-prod/base-classes/base-provider.js.map +0 -1
  160. package/lib-prod/base-classes/base-repository.d.ts +0 -272
  161. package/lib-prod/base-classes/base-repository.js +0 -634
  162. package/lib-prod/base-classes/base-repository.js.map +0 -1
  163. package/lib-prod/base-classes/base-subscriber-for-entity.d.ts +0 -81
  164. package/lib-prod/base-classes/base-subscriber-for-entity.js +0 -155
  165. package/lib-prod/base-classes/base-subscriber-for-entity.js.map +0 -1
  166. package/lib-prod/base-classes/base.d.ts +0 -1
  167. package/lib-prod/base-classes/base.js.map +0 -1
  168. package/lib-prod/build-info._auto-generated_.js +0 -30
  169. package/lib-prod/build-info._auto-generated_.js.map +0 -1
  170. package/lib-prod/config/controller-config.d.ts +0 -21
  171. package/lib-prod/config/controller-config.js +0 -34
  172. package/lib-prod/config/controller-config.js.map +0 -1
  173. package/lib-prod/config/controller-options.d.ts +0 -16
  174. package/lib-prod/config/controller-options.js +0 -8
  175. package/lib-prod/config/controller-options.js.map +0 -1
  176. package/lib-prod/config/method-config.d.ts +0 -39
  177. package/lib-prod/config/method-config.js +0 -12
  178. package/lib-prod/config/method-config.js.map +0 -1
  179. package/lib-prod/config/param-config.d.ts +0 -8
  180. package/lib-prod/config/param-config.js +0 -8
  181. package/lib-prod/config/param-config.js.map +0 -1
  182. package/lib-prod/constants.d.ts +0 -9
  183. package/lib-prod/constants.js +0 -32
  184. package/lib-prod/constants.js.map +0 -1
  185. package/lib-prod/context-db-migrations.d.ts +0 -17
  186. package/lib-prod/context-db-migrations.js +0 -349
  187. package/lib-prod/context-db-migrations.js.map +0 -1
  188. package/lib-prod/create-context.d.ts +0 -78
  189. package/lib-prod/create-context.js +0 -223
  190. package/lib-prod/create-context.js.map +0 -1
  191. package/lib-prod/decorators/classes/controller-decorator.d.ts +0 -5
  192. package/lib-prod/decorators/classes/controller-decorator.js +0 -21
  193. package/lib-prod/decorators/classes/controller-decorator.js.map +0 -1
  194. package/lib-prod/decorators/classes/entity-decorator.d.ts +0 -19
  195. package/lib-prod/decorators/classes/entity-decorator.js +0 -43
  196. package/lib-prod/decorators/classes/entity-decorator.js.map +0 -1
  197. package/lib-prod/decorators/classes/middleware-decorator.d.ts +0 -8
  198. package/lib-prod/decorators/classes/middleware-decorator.js +0 -22
  199. package/lib-prod/decorators/classes/middleware-decorator.js.map +0 -1
  200. package/lib-prod/decorators/classes/migration-decorator.d.ts +0 -7
  201. package/lib-prod/decorators/classes/migration-decorator.js +0 -21
  202. package/lib-prod/decorators/classes/migration-decorator.js.map +0 -1
  203. package/lib-prod/decorators/classes/provider-decorator.d.ts +0 -7
  204. package/lib-prod/decorators/classes/provider-decorator.js +0 -21
  205. package/lib-prod/decorators/classes/provider-decorator.js.map +0 -1
  206. package/lib-prod/decorators/classes/repository-decorator.d.ts +0 -7
  207. package/lib-prod/decorators/classes/repository-decorator.js +0 -21
  208. package/lib-prod/decorators/classes/repository-decorator.js.map +0 -1
  209. package/lib-prod/decorators/classes/subscriber-decorator.d.ts +0 -8
  210. package/lib-prod/decorators/classes/subscriber-decorator.js +0 -22
  211. package/lib-prod/decorators/classes/subscriber-decorator.js.map +0 -1
  212. package/lib-prod/decorators/decorator-abstract-opt.d.ts +0 -3
  213. package/lib-prod/decorators/decorator-abstract-opt.js +0 -7
  214. package/lib-prod/decorators/decorator-abstract-opt.js.map +0 -1
  215. package/lib-prod/decorators/http/http-decorators.d.ts +0 -3
  216. package/lib-prod/decorators/http/http-decorators.js +0 -24
  217. package/lib-prod/decorators/http/http-decorators.js.map +0 -1
  218. package/lib-prod/decorators/http/http-methods-decorators.d.ts +0 -70
  219. package/lib-prod/decorators/http/http-methods-decorators.js +0 -112
  220. package/lib-prod/decorators/http/http-methods-decorators.js.map +0 -1
  221. package/lib-prod/decorators/http/http-params-decorators.d.ts +0 -8
  222. package/lib-prod/decorators/http/http-params-decorators.js +0 -50
  223. package/lib-prod/decorators/http/http-params-decorators.js.map +0 -1
  224. package/lib-prod/dependency-injection/di-container.d.ts +0 -5
  225. package/lib-prod/dependency-injection/di-container.js +0 -35
  226. package/lib-prod/dependency-injection/di-container.js.map +0 -1
  227. package/lib-prod/endpoint-context-storage.d.ts +0 -11
  228. package/lib-prod/endpoint-context-storage.js +0 -38
  229. package/lib-prod/endpoint-context-storage.js.map +0 -1
  230. package/lib-prod/endpoint-context.d.ts +0 -197
  231. package/lib-prod/endpoint-context.js +0 -2416
  232. package/lib-prod/endpoint-context.js.map +0 -1
  233. package/lib-prod/entity-process.d.ts +0 -39
  234. package/lib-prod/entity-process.js +0 -242
  235. package/lib-prod/entity-process.js.map +0 -1
  236. package/lib-prod/env/env.angular-node-app.d.ts +0 -64
  237. package/lib-prod/env/env.angular-node-app.js +0 -71
  238. package/lib-prod/env/env.angular-node-app.js.map +0 -1
  239. package/lib-prod/env/env.docs-webapp.d.ts +0 -64
  240. package/lib-prod/env/env.docs-webapp.js +0 -71
  241. package/lib-prod/env/env.docs-webapp.js.map +0 -1
  242. package/lib-prod/env/env.electron-app.d.ts +0 -64
  243. package/lib-prod/env/env.electron-app.js +0 -71
  244. package/lib-prod/env/env.electron-app.js.map +0 -1
  245. package/lib-prod/env/env.mobile-app.d.ts +0 -64
  246. package/lib-prod/env/env.mobile-app.js +0 -71
  247. package/lib-prod/env/env.mobile-app.js.map +0 -1
  248. package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +0 -64
  249. package/lib-prod/env/env.npm-lib-and-cli-tool.js +0 -71
  250. package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +0 -1
  251. package/lib-prod/env/env.vscode-plugin.d.ts +0 -64
  252. package/lib-prod/env/env.vscode-plugin.js +0 -71
  253. package/lib-prod/env/env.vscode-plugin.js.map +0 -1
  254. package/lib-prod/env/index.js +0 -23
  255. package/lib-prod/env/index.js.map +0 -1
  256. package/lib-prod/express-types.d.ts +0 -1
  257. package/lib-prod/express-types.js +0 -3
  258. package/lib-prod/express-types.js.map +0 -1
  259. package/lib-prod/formly/formly.models.d.ts +0 -1
  260. package/lib-prod/formly/formly.models.js +0 -3
  261. package/lib-prod/formly/formly.models.js.map +0 -1
  262. package/lib-prod/formly/fromly.d.ts +0 -16
  263. package/lib-prod/formly/fromly.js +0 -209
  264. package/lib-prod/formly/fromly.js.map +0 -1
  265. package/lib-prod/formly/type-from-entity.d.ts +0 -20
  266. package/lib-prod/formly/type-from-entity.js +0 -60
  267. package/lib-prod/formly/type-from-entity.js.map +0 -1
  268. package/lib-prod/get-response-value.d.ts +0 -6
  269. package/lib-prod/get-response-value.js +0 -27
  270. package/lib-prod/get-response-value.js.map +0 -1
  271. package/lib-prod/global-state/taon-global-state/index.js +0 -23
  272. package/lib-prod/global-state/taon-global-state/index.js.map +0 -1
  273. package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.d.ts +0 -19
  274. package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.js +0 -23
  275. package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.js.map +0 -1
  276. package/lib-prod/global-state/taon-global-state/taon-global-state.constants.d.ts +0 -2
  277. package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js +0 -11
  278. package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js.map +0 -1
  279. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.d.ts +0 -11
  280. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +0 -61
  281. package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js.map +0 -1
  282. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.d.ts +0 -7
  283. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +0 -64
  284. package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js.map +0 -1
  285. package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.d.ts +0 -3
  286. package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js +0 -22
  287. package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js.map +0 -1
  288. package/lib-prod/global-state/taon-global-state/taon-global-state.models.d.ts +0 -28
  289. package/lib-prod/global-state/taon-global-state/taon-global-state.models.js +0 -48
  290. package/lib-prod/global-state/taon-global-state/taon-global-state.models.js.map +0 -1
  291. package/lib-prod/global-state/taon-global-state/taon-global-state.provider.d.ts +0 -3
  292. package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js +0 -22
  293. package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js.map +0 -1
  294. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.d.ts +0 -9
  295. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +0 -53
  296. package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js.map +0 -1
  297. package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.d.ts +0 -7
  298. package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js +0 -29
  299. package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js.map +0 -1
  300. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.d.ts +0 -2
  301. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +0 -16
  302. package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js.map +0 -1
  303. package/lib-prod/global-state/taon-transaction-registry/index.js +0 -28
  304. package/lib-prod/global-state/taon-transaction-registry/index.js.map +0 -1
  305. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.d.ts +0 -19
  306. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.js +0 -25
  307. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.js.map +0 -1
  308. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.d.ts +0 -2
  309. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js +0 -9
  310. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js.map +0 -1
  311. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.d.ts +0 -9
  312. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +0 -51
  313. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js.map +0 -1
  314. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.d.ts +0 -12
  315. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js +0 -77
  316. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js.map +0 -1
  317. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.d.ts +0 -3
  318. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js +0 -22
  319. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js.map +0 -1
  320. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.d.ts +0 -6
  321. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js +0 -11
  322. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js.map +0 -1
  323. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.d.ts +0 -3
  324. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js +0 -22
  325. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js.map +0 -1
  326. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.d.ts +0 -9
  327. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js +0 -38
  328. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js.map +0 -1
  329. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.d.ts +0 -7
  330. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js +0 -29
  331. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js.map +0 -1
  332. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.d.ts +0 -2
  333. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +0 -9
  334. package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js.map +0 -1
  335. package/lib-prod/helpers/class-helpers.d.ts +0 -22
  336. package/lib-prod/helpers/class-helpers.js +0 -246
  337. package/lib-prod/helpers/class-helpers.js.map +0 -1
  338. package/lib-prod/helpers/clone-obj.d.ts +0 -1
  339. package/lib-prod/helpers/clone-obj.js +0 -22
  340. package/lib-prod/helpers/clone-obj.js.map +0 -1
  341. package/lib-prod/helpers/taon-helpers.d.ts +0 -16
  342. package/lib-prod/helpers/taon-helpers.js +0 -162
  343. package/lib-prod/helpers/taon-helpers.js.map +0 -1
  344. package/lib-prod/index._auto-generated_.d.ts +0 -0
  345. package/lib-prod/index._auto-generated_.js.map +0 -1
  346. package/lib-prod/index.d.ts +0 -230
  347. package/lib-prod/index.js +0 -273
  348. package/lib-prod/index.js.map +0 -1
  349. package/lib-prod/inject.d.ts +0 -4
  350. package/lib-prod/inject.js.map +0 -1
  351. package/lib-prod/migrations/index.d.ts +0 -1
  352. package/lib-prod/migrations/index.js +0 -19
  353. package/lib-prod/migrations/index.js.map +0 -1
  354. package/lib-prod/migrations/migrations_index._auto-generated_.d.ts +0 -0
  355. package/lib-prod/migrations/migrations_index._auto-generated_.js.map +0 -1
  356. package/lib-prod/models.d.ts +0 -255
  357. package/lib-prod/models.js +0 -117
  358. package/lib-prod/models.js.map +0 -1
  359. package/lib-prod/orm/columns.d.ts +0 -32
  360. package/lib-prod/orm/columns.js +0 -112
  361. package/lib-prod/orm/columns.js.map +0 -1
  362. package/lib-prod/orm/index.d.ts +0 -1
  363. package/lib-prod/orm/index.js +0 -73
  364. package/lib-prod/orm/index.js.map +0 -1
  365. package/lib-prod/realtime/realtime-client.d.ts +0 -41
  366. package/lib-prod/realtime/realtime-client.js +0 -204
  367. package/lib-prod/realtime/realtime-client.js.map +0 -1
  368. package/lib-prod/realtime/realtime-core.d.ts +0 -40
  369. package/lib-prod/realtime/realtime-core.js +0 -106
  370. package/lib-prod/realtime/realtime-core.js.map +0 -1
  371. package/lib-prod/realtime/realtime-server.d.ts +0 -43
  372. package/lib-prod/realtime/realtime-server.js +0 -243
  373. package/lib-prod/realtime/realtime-server.js.map +0 -1
  374. package/lib-prod/realtime/realtime-strategy/index.js +0 -21
  375. package/lib-prod/realtime/realtime-strategy/index.js.map +0 -1
  376. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.d.ts +0 -80
  377. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +0 -297
  378. package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js.map +0 -1
  379. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.d.ts +0 -14
  380. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +0 -303
  381. package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js.map +0 -1
  382. package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.d.ts +0 -16
  383. package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js +0 -33
  384. package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +0 -1
  385. package/lib-prod/realtime/realtime-strategy/realtime-strategy.d.ts +0 -11
  386. package/lib-prod/realtime/realtime-strategy/realtime-strategy.js +0 -17
  387. package/lib-prod/realtime/realtime-strategy/realtime-strategy.js.map +0 -1
  388. package/lib-prod/realtime/realtime-subs-manager.d.ts +0 -14
  389. package/lib-prod/realtime/realtime-subs-manager.js +0 -94
  390. package/lib-prod/realtime/realtime-subs-manager.js.map +0 -1
  391. package/lib-prod/realtime/realtime.models.js +0 -4
  392. package/lib-prod/realtime/realtime.models.js.map +0 -1
  393. package/lib-prod/symbols.d.ts +0 -63
  394. package/lib-prod/symbols.js +0 -109
  395. package/lib-prod/symbols.js.map +0 -1
  396. package/lib-prod/ui/index.d.ts +0 -1
  397. package/lib-prod/ui/index.js +0 -5
  398. package/lib-prod/ui/index.js.map +0 -1
  399. package/lib-prod/ui/taon-admin-mode-configuration/index.d.ts +0 -1
  400. package/lib-prod/ui/taon-admin-mode-configuration/index.js +0 -5
  401. package/lib-prod/ui/taon-admin-mode-configuration/index.js.map +0 -1
  402. package/lib-prod/validators.d.ts +0 -5
  403. package/lib-prod/validators.js +0 -88
  404. package/lib-prod/validators.js.map +0 -1
  405. /package/lib-prod/env/{index.d.ts → index.ts} +0 -0
@@ -1,198 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaonBaseInjector = void 0;
4
- const class_helpers_1 = require("../helpers/class-helpers");
5
- const symbols_1 = require("../symbols");
6
- //#endregion
7
- class TaonBaseInjector {
8
- //#region proxy dummy function
9
- /**
10
- * for proxy purposes
11
- */
12
- getOriginalPrototype;
13
- /**
14
- * for proxy purposes
15
- */
16
- getOriginalConstructor;
17
- //#endregion
18
- //#region class initialization hook
19
- /**
20
- * class initialization hook
21
- * taon after class instace creation
22
- */
23
- async _() { }
24
- //#endregion
25
- //#region context
26
- /**
27
- * @deprecated use ctx instead
28
- * Current endpoint context
29
- */
30
- get __endpoint_context__() {
31
- return this[symbols_1.Symbols__NS__ctxInClassOrClassObj];
32
- }
33
- /**
34
- * get current endpoint context
35
- */
36
- get ctx() {
37
- return this.__endpoint_context__;
38
- }
39
- //#endregion
40
- //#region inject
41
- //#region inject / repo for entity
42
- /**
43
- * inject crud repo for entity
44
- */
45
- injectRepo(entityForCrud) {
46
- const repoProxy = this.__inject(void 0, {
47
- localInstance: true,
48
- resolveClassFromContext: 'TaonBaseRepository',
49
- locaInstanceConstructorArgs: [() => entityForCrud],
50
- });
51
- return repoProxy;
52
- }
53
- //#endregion
54
- //#region inject / custom repository
55
- injectCustomRepository(cutomRepositoryClass) {
56
- const repoProxy = this.__inject(cutomRepositoryClass, {
57
- localInstance: true,
58
- locaInstanceConstructorArgs: [
59
- () => {
60
- const classToProcess = this.ctx.allClassesInstances[(0, class_helpers_1.ClassHelpers__NS__getName)(cutomRepositoryClass)];
61
- return classToProcess.entityClassResolveFn();
62
- },
63
- ],
64
- });
65
- return repoProxy;
66
- }
67
- //#endregion
68
- //#region inject / custom repo
69
- /**
70
- * aliast to this.injectRepository()
71
- */
72
- injectCustomRepo(cutomRepositoryClass) {
73
- const repoProxy = this.injectCustomRepository(cutomRepositoryClass);
74
- return repoProxy;
75
- }
76
- //#endregion
77
- //#region inject / controller
78
- /**
79
- * example usage:
80
- * ...
81
- * exampleController = this.injectController(ExampleController);
82
- * ...
83
- */
84
- injectController(ctor) {
85
- return this.__inject(ctor, { localInstance: false });
86
- }
87
- //#endregion
88
- //#region inject / ctrl
89
- /**
90
- * example usage:
91
- * ...
92
- * exampleSubscriber = this.injectSubscriber(ExampleSubscriber)
93
- * ...
94
- */
95
- injectSubscriber(ctor) {
96
- return this.__inject(ctor, { localInstance: false });
97
- }
98
- //#endregion
99
- //#region inject / ctrl
100
- /**
101
- * aliast to .injectController()
102
- */
103
- injectCtrl(ctor) {
104
- return this.injectController(ctor);
105
- }
106
- //#endregion
107
- //#region inject / global provider
108
- /**
109
- * inject middleware for context
110
- */
111
- injectMiddleware(ctor) {
112
- return this.__inject(ctor, { localInstance: false });
113
- }
114
- //#endregion
115
- //#region inject / context provider
116
- /**
117
- * inject provider for context
118
- */
119
- injectProvider(ctor) {
120
- return this.__inject(ctor, { localInstance: false });
121
- }
122
- //#endregion
123
- //#region inject / __ inject
124
- /**
125
- * Inject: Controllers, Providers, Repositories, Services, etc.
126
- * TODO addd nest js injecting
127
- */
128
- __inject(ctor, options) {
129
- if (!options) {
130
- options = {};
131
- }
132
- const contextClassInstance = this;
133
- return new Proxy({}, {
134
- get: (__, propName) => {
135
- const contextFromClass = ctor && ctor[symbols_1.Symbols__NS__ctxInClassOrClassObj];
136
- const resultContext = contextFromClass
137
- ? contextFromClass
138
- : this.__endpoint_context__;
139
- if (options.resolveClassFromContext) {
140
- const resolvedClass = resultContext.getClassFunByClassName(options.resolveClassFromContext);
141
- ctor = resolvedClass;
142
- }
143
- if (resultContext) {
144
- var instance = resultContext.inject(ctor, {
145
- ...options,
146
- contextClassInstance,
147
- parentInstanceThatWillGetInjectedStuff: this,
148
- });
149
- if (!instance) {
150
- throw new Error(`Not able to inject "${(0, class_helpers_1.ClassHelpers__NS__getName)(ctor) || ctor.name}" inside ` +
151
- `property "${propName?.toString()}" on class "${(0, class_helpers_1.ClassHelpers__NS__getName)(this)}".
152
-
153
- Please add "${(0, class_helpers_1.ClassHelpers__NS__getName)(ctor) || ctor.name}" to (entites or contorllers or providers or repositories or middlewares)
154
-
155
- `);
156
- }
157
- const result = typeof instance[propName] === 'function'
158
- ? instance[propName].bind(instance)
159
- : instance[propName];
160
- // console.log(`Accessing injected "${propName?.toString()}" from "${ClassHelpers__NS__getName(ctor) || ctor.name}"`,result)
161
- return result;
162
- }
163
- /* */
164
- /* */
165
- },
166
- set: (__, propName, value) => {
167
- const contextFromClass = ctor && ctor[symbols_1.Symbols__NS__ctxInClassOrClassObj];
168
- const resultContext = contextFromClass
169
- ? contextFromClass
170
- : this.__endpoint_context__;
171
- if (options.resolveClassFromContext) {
172
- const resolvedClass = resultContext.getClassFunByClassName(options.resolveClassFromContext);
173
- ctor = resolvedClass;
174
- }
175
- if (resultContext) {
176
- var instance = resultContext.inject(ctor, {
177
- ...options,
178
- contextClassInstance,
179
- parentInstanceThatWillGetInjectedStuff: this,
180
- });
181
- if (!instance) {
182
- const classNameNotResolved = (0, class_helpers_1.ClassHelpers__NS__getName)(ctor) || ctor.name;
183
- throw new Error(`Not able to inject "${classNameNotResolved}" inside ` +
184
- `property "${propName?.toString()}" on class "${(0, class_helpers_1.ClassHelpers__NS__getName)(this)}".
185
-
186
- Please add "${(0, class_helpers_1.ClassHelpers__NS__getName)(ctor) || ctor.name}" to (entites or contorllers or providers or repositories or middlewares)
187
-
188
- `);
189
- }
190
- instance[propName] = value;
191
- }
192
- return true;
193
- },
194
- });
195
- }
196
- }
197
- exports.TaonBaseInjector = TaonBaseInjector;
198
- //# sourceMappingURL=base-injector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-injector.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAIA,4DAA4hB;AAC5hB,wCAA8S;AAI9S,YAAY;AAEZ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;oBACrD,CAAC,CAAC,gBAAgB;oBAClB,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC;gBAE9B,IAAI,OAAO,CAAC,uBAAuB,EAAE,CAAC;oBACpC,MAAM,aAAa,GAAG,aAAa,CAAC,sBAAsB,CACxD,OAAO,CAAC,uBAAuB,CAChC,CAAC;oBACF,IAAI,GAAG,aAAoB,CAAC;gBAC9B,CAAC;gBAED,IAAI,aAAa,EAAE,CAAC;oBAClB,IAAI,QAAQ,GAAM,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE;wBAC3C,GAAG,OAAO;wBACV,oBAAoB;wBACpB,sCAAsC,EAAE,IAAI;qBAC7C,CAAC,CAAC;oBACH,IAAI,CAAC,QAAQ,EAAE,CAAC;wBACd,MAAM,oBAAoB,GACxB,IAAA,yCAAyB,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC;wBAC/C,MAAM,IAAI,KAAK,CACb,uBAAuB,oBAAoB,WAAW;4BACpD,aAAa,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,IAAA,yCAAyB,EACxE,IAAI,CACL;;4BAGH,IAAA,yCAAyB,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAC1C;;eAEC,CACA,CAAC;oBACJ,CAAC;oBACD,QAAQ,CAAC,QAAQ,CAAC,GAAG,KAAK,CAAC;gBAC7B,CAAC;gBACD,OAAO,IAAI,CAAC;YACd,CAAC;SACF,CACG,CAAC;IACT,CAAC;CAIF;AA1QD,4CA0QC"}
@@ -1,38 +0,0 @@
1
- import type { AxiosResponse } from 'axios';
2
- import { TaonClientMiddlewareInterceptOptions, TaonServerMiddlewareInterceptOptions } from 'ng2-rest/lib-prod';
3
- import { Observable } from 'rxjs';
4
- import { CoreModels__NS__HttpMethod } from 'tnp-core/lib-prod';
5
- import { TaonBaseInjector } from './base-injector';
6
- /**
7
- * TODO
8
- * - global provider available in all contexts
9
- * - provider available in own context
10
- */
11
- export declare abstract class TaonBaseMiddleware extends TaonBaseInjector {
12
- }
13
- export interface TaonAdditionalMiddlewareMethodInfo {
14
- methodName: string;
15
- expressPath: string;
16
- httpRequestType: CoreModels__NS__HttpMethod;
17
- }
18
- export interface TaonBaseMiddleware {
19
- /**
20
- * Global interceptor for whole context
21
- * backend request
22
- */
23
- interceptServer({ req, res, next, }: TaonServerMiddlewareInterceptOptions): Promise<void> | void;
24
- /**
25
- * Global interceptor for whole context
26
- * client requests
27
- */
28
- interceptClient({ req, next, }: TaonClientMiddlewareInterceptOptions): Observable<AxiosResponse<any>>;
29
- /**
30
- * Specyfic controller method interceptor
31
- */
32
- interceptServerMethod({ req, res, next }: TaonServerMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType, }: TaonAdditionalMiddlewareMethodInfo): Promise<void> | void;
33
- /**
34
- * Controller method frontned interceptor
35
- * TODO not needed ?
36
- */
37
- interceptClientMethod({ req, next }: TaonClientMiddlewareInterceptOptions, { methodName, expressPath, httpRequestType, }: TaonAdditionalMiddlewareMethodInfo): Observable<AxiosResponse<any>>;
38
- }
@@ -1,14 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaonBaseMiddleware = void 0;
4
- const base_injector_1 = require("./base-injector");
5
- //#endregion
6
- /**
7
- * TODO
8
- * - global provider available in all contexts
9
- * - provider available in own context
10
- */
11
- class TaonBaseMiddleware extends base_injector_1.TaonBaseInjector {
12
- }
13
- exports.TaonBaseMiddleware = TaonBaseMiddleware;
14
- //# sourceMappingURL=base-middleware.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-middleware.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAUA,mDAAmD;AACnD,YAAY;AAEZ;;;;GAIG;AACH,MAAsB,kBAAmB,SAAQ,gCAAgB;CAAG;AAApE,gDAAoE"}
@@ -1,11 +0,0 @@
1
- import { MigrationInterface, QueryRunner } from 'taon-typeorm/lib-prod';
2
- import { TaonBaseInjector } from './base-injector';
3
- export declare class TaonBaseMigration extends TaonBaseInjector implements MigrationInterface {
4
- /**
5
- * by default is READY to run
6
- */
7
- isReadyToRun(): boolean;
8
- getDescription(): string;
9
- up(queryRunner: QueryRunner): Promise<any>;
10
- down(queryRunner: QueryRunner): Promise<any>;
11
- }
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaonBaseMigration = void 0;
4
- const lib_prod_1 = require("tnp-core/lib-prod");
5
- const class_helpers_1 = require("../helpers/class-helpers");
6
- const base_injector_1 = require("./base-injector");
7
- class TaonBaseMigration extends base_injector_1.TaonBaseInjector {
8
- /**
9
- * by default is READY to run
10
- */
11
- isReadyToRun() {
12
- return true;
13
- }
14
- getDescription() {
15
- return (0, lib_prod_1.___NS__startCase)((0, class_helpers_1.ClassHelpers__NS__getName)(this));
16
- }
17
- async up(queryRunner) {
18
- console.log(`[TaonBaseMigration] Running migration UP "${(0, class_helpers_1.ClassHelpers__NS__getName)(this)}"`);
19
- }
20
- async down(queryRunner) {
21
- console.log(`[TaonBaseMigration] Running migration DOWN "${(0, class_helpers_1.ClassHelpers__NS__getName)(this)}"`);
22
- }
23
- }
24
- exports.TaonBaseMigration = TaonBaseMigration;
25
- //# sourceMappingURL=base-migration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-migration.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AACA,gDAAo8J;AAEp8J,4DAA4hB;AAE5hB,mDAAmD;AAEnD,MAAa,iBAAkB,SAAQ,gCAAgB;IACrD;;OAEG;IACI,YAAY;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc;QACZ,OAAO,IAAA,2BAAgB,EAAC,IAAA,yCAAyB,EAAC,IAAI,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,OAAO,CAAC,GAAG,CAAC,6CAA6C,IAAA,yCAAyB,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/F,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,OAAO,CAAC,GAAG,CAAC,+CAA+C,IAAA,yCAAyB,EAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACjG,CAAC;CACF;AAlBD,8CAkBC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TaonBaseProvider = void 0;
4
- const base_injector_1 = require("./base-injector");
5
- /**
6
- * TODO
7
- * - global provider available in all contexts
8
- * - provider available in own context
9
- */
10
- class TaonBaseProvider extends base_injector_1.TaonBaseInjector {
11
- }
12
- exports.TaonBaseProvider = TaonBaseProvider;
13
- //# sourceMappingURL=base-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-provider.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAAA,mDAAmD;AAEnD;;;;GAIG;AACH,MAAa,gBAAiB,SAAQ,gCAAgB;CAAG;AAAzD,4CAAyD"}
@@ -1,272 +0,0 @@
1
- import { MySqlQuerySource } from 'taon-type-sql/lib-prod';
2
- import { type DeepPartial, type FindManyOptions, type FindOneOptions, type FindOptionsWhere, type InsertResult, type Repository, type SaveOptions, type UpdateResult } from 'taon-typeorm/lib-prod';
3
- import type { QueryDeepPartialEntity } from 'taon-typeorm/lib-prod';
4
- import type { UpsertOptions } from 'taon-typeorm/lib-prod';
5
- import type { DataSource as DataSourceType, QueryRunner, SelectQueryBuilder } from 'taon-typeorm/lib-prod';
6
- import { TaonBaseCustomRepository } from './base-custom-repository';
7
- export declare abstract class TaonBaseRepository<Entity extends {
8
- id?: any;
9
- }> extends TaonBaseCustomRepository {
10
- private REPOS_CACHE_KEY;
11
- abstract entityClassResolveFn: () => any;
12
- constructor(__entityClassResolveFn: () => any);
13
- private __dbQuery;
14
- get dbQuery(): MySqlQuerySource;
15
- get connection(): DataSourceType;
16
- protected get repository(): Repository<Entity>;
17
- /**
18
- * target for repository
19
- */
20
- get target(): Function;
21
- /**
22
- * alias to repository
23
- */
24
- protected get repo(): Repository<Entity>;
25
- get repositoryExists(): boolean;
26
- /**
27
- * Checks if entity has an id.
28
- * If entity composite compose ids, it will check them all.
29
- */
30
- hasId(entity: Entity): boolean;
31
- /**
32
- * Gets entity mixed id.
33
- */
34
- getId(entity: Entity): any;
35
- /**
36
- Saves a given entity in the database.
37
- * If entity does not exist in the database then inserts, otherwise updates.
38
- */
39
- save(item: Entity, options?: SaveOptions & {
40
- reload: false;
41
- }): Promise<Entity>;
42
- /**
43
- * alias to save
44
- * -> it will actuall create new entity in db
45
- * in oposite to typeorm create method
46
- */
47
- /**
48
- * Creates a new entity instance.
49
- */
50
- create(): Entity;
51
- /**
52
- * Creates new entities and copies all entity properties from given objects into their new entities.
53
- * Note that it copies only properties that are present in entity schema.
54
- */
55
- create(entityLikeArray: DeepPartial<Entity>[]): Entity[];
56
- /**
57
- * Creates a new entity instance and copies all entity properties from this object into a new entity.
58
- * Note that it copies only properties that are present in entity schema.
59
- */
60
- create(entityLike: DeepPartial<Entity>): Entity;
61
- bulkSave(items: Entity[], options?: SaveOptions & {
62
- reload: false;
63
- }): Promise<Entity[]>;
64
- /**
65
- * @deprecated use bulkSave instead
66
- */
67
- bulkCreate(items: Entity[], options?: SaveOptions & {
68
- reload: false;
69
- }): Promise<Entity[]>;
70
- /**
71
- * Saves all given entities in the database.
72
- * If entities do not exist in the database then inserts, otherwise updates.
73
- */
74
- /**
75
- * Merges multiple entities (or entity-like objects) into a given entity.
76
- */
77
- merge(mergeIntoEntity: Entity, ...entityLikes: Entity[]): Entity;
78
- /**
79
- * Creates a new entity from the given plain javascript object. If entity already exist in the database, then
80
- * it loads it (and everything related to it), replaces all values with the new ones from the given object
81
- * and returns this new entity. This new entity is actually a loaded from the db entity with all properties
82
- * replaced from the new object.
83
- *
84
- * Note that given entity-like object must have an entity id / primary key to find entity by.
85
- * Returns undefined if entity with given id was not found.
86
- */
87
- preload(entityLike: Entity): Promise<Entity | undefined>;
88
- /**
89
- * Removes a given entities from the database.
90
- */
91
- remove(idOrEntity: number | string | Entity): Promise<Entity>;
92
- /**
93
- * alias to remove
94
- */
95
- delete(idOrEntity: number | string | Partial<Entity>): Promise<Entity>;
96
- /**
97
- * alias to removeById
98
- */
99
- deleteById(id: number | string): Promise<Entity>;
100
- bulkRemove(idsOrEntities: (number | string | Entity)[]): Promise<Entity[]>;
101
- bulkDelete(ids: (number | string | Entity)[]): Promise<Entity[]>;
102
- /**
103
- * Records the delete date of all given entities.
104
- */
105
- softRemove<T extends Entity>(entities: T[], options: SaveOptions & {
106
- reload: false;
107
- }): Promise<T[]>;
108
- /**
109
- * Records the delete date of all given entities.
110
- */
111
- softRemove<T extends Entity>(entities: T[], options?: SaveOptions): Promise<(T & Entity)[]>;
112
- /**
113
- * Records the delete date of a given entity.
114
- */
115
- softRemove<T extends Entity>(entity: T, options: SaveOptions & {
116
- reload: false;
117
- }): Promise<T>;
118
- /**
119
- * Recovers all given entities in the database.
120
- */
121
- recover<T extends Entity>(entities: T[], options: SaveOptions & {
122
- reload: false;
123
- }): Promise<T[]>;
124
- /**
125
- * Recovers all given entities in the database.
126
- */
127
- recover<T extends Entity>(entities: T[], options?: SaveOptions): Promise<(T & Entity)[]>;
128
- /**
129
- * Recovers a given entity in the database.
130
- */
131
- recover<T extends Entity>(entity: T, options: SaveOptions & {
132
- reload: false;
133
- }): Promise<T>;
134
- /**
135
- * Inserts a given entity into the database.
136
- * Unlike save method executes a primitive operation without cascades, relations and other operations included.
137
- * Executes fast and efficient INSERT query.
138
- * Does not check if entity exist in the database, so query will fail if duplicate entity is being inserted.
139
- */
140
- insert(entity: QueryDeepPartialEntity<Entity> | QueryDeepPartialEntity<Entity>[]): Promise<InsertResult>;
141
- update(item: Entity): Promise<Entity>;
142
- private allowedTypesToUpdate;
143
- updateById<ENTITY = Entity>(id: number | string, item: Entity): Promise<ENTITY>;
144
- bulkUpdate(items: Entity[]): Promise<{
145
- models: any[];
146
- }>;
147
- /**
148
- * Inserts a given entity into the database, unless a unique constraint conflicts then updates the entity
149
- * Unlike save method executes a primitive operation without cascades, relations and other operations included.
150
- * Executes fast and efficient INSERT ... ON CONFLICT DO UPDATE/ON DUPLICATE KEY UPDATE query.
151
- */
152
- upsert(entityOrEntities: QueryDeepPartialEntity<Entity> | QueryDeepPartialEntity<Entity>[], conflictPathsOrOptions: string[] | UpsertOptions<Entity>): Promise<InsertResult>;
153
- /**
154
- * Records the delete date of entities by a given criteria.
155
- * Unlike save method executes a primitive operation without cascades, relations and other operations included.
156
- * Executes fast and efficient SOFT-DELETE query.
157
- * Does not check if entity exist in the database.
158
- */
159
- softDelete(criteria: string | string[] | number | number[] | Date | Date[] | FindOptionsWhere<Entity>): Promise<UpdateResult>;
160
- /**
161
- * Restores entities by a given criteria.
162
- * Unlike save method executes a primitive operation without cascades, relations and other operations included.
163
- * Executes fast and efficient SOFT-DELETE query.
164
- * Does not check if entity exist in the database.
165
- */
166
- restore(criteria: string | string[] | number | number[] | Date | Date[] | FindOptionsWhere<Entity>): Promise<UpdateResult>;
167
- /**
168
- * Counts entities that match given options.
169
- * Useful for pagination.
170
- */
171
- count(options?: FindManyOptions<Entity>): Promise<number>;
172
- /**
173
- * Counts entities that match given conditions.
174
- * Useful for pagination.
175
- */
176
- countBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<number>;
177
- /**
178
- * Finds entities that match given find options.
179
- */
180
- find(options?: FindManyOptions<Entity>): Promise<Entity[]>;
181
- /**
182
- * Finds entities that match given find options.
183
- */
184
- findBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<Entity[]>;
185
- /**
186
- * Finds entities that match given find options.
187
- * Also counts all entities that match given conditions,
188
- * but ignores pagination settings (from and take options).
189
- */
190
- findAndCount(options?: FindManyOptions<Entity>): Promise<[Entity[], number]>;
191
- /**
192
- * Finds entities that match given WHERE conditions.
193
- * Also counts all entities that match given conditions,
194
- * but ignores pagination settings (from and take options).
195
- */
196
- findAndCountBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<[Entity[], number]>;
197
- /**
198
- * Finds entities with ids.
199
- * Optionally find options or conditions can be applied.
200
- *
201
- * @deprecated use `findBy` method instead in conjunction with `In` operator, for example:
202
- *
203
- * .findBy({
204
- * id: In([1, 2, 3])
205
- * })
206
- */
207
- findByIds(ids: any[]): Promise<Entity[]>;
208
- /**
209
- * Finds first entity by a given find options.
210
- * If entity was not found in the database - returns null.
211
- */
212
- findOne(options: FindOneOptions<Entity>): Promise<Entity | null>;
213
- /**
214
- * Finds first entity that matches given where condition.
215
- * If entity was not found in the database - returns null.
216
- */
217
- findOneBy(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<Entity | null>;
218
- /**
219
- * Finds first entity that matches given id.
220
- * If entity was not found in the database - returns null.
221
- *
222
- * @deprecated use `findOneBy` method instead in conjunction with `In` operator, for example:
223
- *
224
- * .findOneBy({
225
- * id: 1 // where "id" is your primary column name
226
- * })
227
- */
228
- findOneById(id: number | string | Date): Promise<Entity | null>;
229
- /**
230
- * Finds first entity by a given find options.
231
- * If entity was not found in the database - rejects with error.
232
- */
233
- findOneOrFail(options: FindOneOptions<Entity>): Promise<Entity>;
234
- /**
235
- * Finds first entity that matches given where condition.
236
- * If entity was not found in the database - rejects with error.
237
- */
238
- findOneByOrFail(where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[]): Promise<Entity>;
239
- /**
240
- * Executes a raw SQL query and returns a raw database results.
241
- * Raw query execution is supported only by relational databases (MongoDB is not supported).
242
- */
243
- query(query: string, parameters?: any[]): Promise<any>;
244
- /**
245
- * Executes a raw SQL query and returns a raw database results.
246
- * Raw query execution is supported only by relational databases (MongoDB is not supported).
247
- */
248
- createQueryBuilder(alias?: string, queryRunner?: QueryRunner): SelectQueryBuilder<Entity>;
249
- /**
250
- * Clears all the data from the given table/collection (truncates/drops it).
251
- *
252
- * Note: this method uses TRUNCATE and may not work as you expect in transactions on some platforms.
253
- * @see https://stackoverflow.com/a/5972738/925151
254
- */
255
- clear(): Promise<void>;
256
- /**
257
- * Increments some column by provided value of the entities matched given conditions.
258
- */
259
- increment(conditions: FindOptionsWhere<Entity>, propertyPath: string, value: number | string): Promise<UpdateResult>;
260
- /**
261
- * Decrements some column by provided value of the entities matched given conditions.
262
- */
263
- decrement(conditions: FindOptionsWhere<Entity>, propertyPath: string, value: number | string): Promise<UpdateResult>;
264
- /**
265
- * @deprecated use findAndCount instead
266
- */
267
- getAll(): Promise<{
268
- models: Entity[];
269
- totalCount: number;
270
- }>;
271
- getBy(id: number | string): Promise<Entity>;
272
- }