@revisium/core 0.9.2 → 0.9.4

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 (385) hide show
  1. package/dist/package.json +5 -2
  2. package/dist/prisma/schema.prisma +1 -1
  3. package/dist/src/__tests__/utils/createMocks.d.ts +5 -5
  4. package/dist/src/__tests__/utils/implementIdService.d.ts +1 -1
  5. package/dist/src/__tests__/utils/rowMocks.d.ts +1 -1
  6. package/dist/src/__tests__/utils/schema/schema.mocks.d.ts +2 -2
  7. package/dist/src/admin/admin-module.options.d.ts +3 -0
  8. package/dist/src/admin/admin-module.options.js +3 -0
  9. package/dist/src/admin/admin-module.options.js.map +1 -0
  10. package/dist/src/admin/admin.module.d.ts +6 -0
  11. package/dist/src/admin/admin.module.js +46 -0
  12. package/dist/src/admin/admin.module.js.map +1 -0
  13. package/dist/src/admin/envjs.controller.d.ts +6 -0
  14. package/dist/src/admin/envjs.controller.js +40 -0
  15. package/dist/src/admin/envjs.controller.js.map +1 -0
  16. package/dist/src/admin/index.d.ts +0 -0
  17. package/dist/src/admin/index.js +1 -0
  18. package/dist/src/admin/index.js.map +1 -0
  19. package/dist/src/app.module.js +2 -1
  20. package/dist/src/app.module.js.map +1 -1
  21. package/dist/src/auth/auth.service.d.ts +1 -1
  22. package/dist/src/auth/casl-ability.factory.d.ts +2 -2
  23. package/dist/src/auth/commands/handlers/check-organization-permission.handler.d.ts +3 -3
  24. package/dist/src/auth/commands/handlers/check-project-permission.handler.d.ts +3 -3
  25. package/dist/src/auth/commands/handlers/check-system-permission.handler.d.ts +3 -3
  26. package/dist/src/auth/commands/handlers/confirm-email-code.handler.d.ts +1 -1
  27. package/dist/src/auth/commands/handlers/create-user.handler.d.ts +4 -4
  28. package/dist/src/auth/commands/handlers/login-github.handler.d.ts +4 -4
  29. package/dist/src/auth/commands/handlers/login-google.handler.d.ts +4 -4
  30. package/dist/src/auth/commands/handlers/login.handler.d.ts +3 -3
  31. package/dist/src/auth/commands/handlers/sign-up.handler.d.ts +1 -1
  32. package/dist/src/auth/commands/impl/check-organization-permission.command.d.ts +1 -1
  33. package/dist/src/auth/commands/impl/check-project-permission.command.d.ts +1 -1
  34. package/dist/src/auth/commands/impl/check-system-permission.command.d.ts +1 -1
  35. package/dist/src/auth/commands/impl/create-user.command.d.ts +1 -1
  36. package/dist/src/auth/commands/index.d.ts +1 -1
  37. package/dist/src/auth/guards/base-persmission.guard.d.ts +2 -2
  38. package/dist/src/auth/guards/organization.guard.d.ts +3 -3
  39. package/dist/src/auth/guards/permission-params.d.ts +1 -1
  40. package/dist/src/auth/guards/project.guard.d.ts +3 -3
  41. package/dist/src/auth/guards/system.guard.d.ts +3 -3
  42. package/dist/src/auth/strategy/jwt.strategy.d.ts +2 -2
  43. package/dist/src/auth/utils.d.ts +1 -1
  44. package/dist/src/branch/commands/handlers/api-create-branch-by-revision-id.handler.d.ts +1 -1
  45. package/dist/src/branch/commands/handlers/create-branch-by-revision-id.handler.d.ts +3 -3
  46. package/dist/src/branch/commands/handlers/index.d.ts +2 -2
  47. package/dist/src/branch/quieries/handlers/get-branch-by-id.handler.d.ts +3 -3
  48. package/dist/src/branch/quieries/handlers/get-branch.handler.d.ts +4 -4
  49. package/dist/src/branch/quieries/handlers/get-branches.handler.d.ts +3 -3
  50. package/dist/src/branch/quieries/handlers/get-draft-revision.handler.d.ts +3 -3
  51. package/dist/src/branch/quieries/handlers/get-head-revision.handler.d.ts +3 -3
  52. package/dist/src/branch/quieries/handlers/get-project-by-branch.handler.d.ts +2 -2
  53. package/dist/src/branch/quieries/handlers/get-revisions-by-branch-id.handler.d.ts +2 -2
  54. package/dist/src/branch/quieries/handlers/get-start-revision.handler.d.ts +3 -3
  55. package/dist/src/branch/quieries/handlers/get-touched-by-branch-id.handler.d.ts +3 -3
  56. package/dist/src/branch/quieries/handlers/index.d.ts +10 -10
  57. package/dist/src/branch/quieries/handlers/resolve-parent-branch-by-branch.handler.d.ts +2 -2
  58. package/dist/src/clean/commands/handlers/clean-rows.handler.d.ts +2 -2
  59. package/dist/src/clean/commands/handlers/clean-tables.handler.d.ts +2 -2
  60. package/dist/src/clean/commands/handlers/index.d.ts +2 -2
  61. package/dist/src/configuration/queries/handlers/get-configuration.handler.d.ts +4 -4
  62. package/dist/src/configuration/queries/index.d.ts +1 -1
  63. package/dist/src/core/core.module.js +2 -0
  64. package/dist/src/core/core.module.js.map +1 -1
  65. package/dist/src/database/transaction-prisma.service.d.ts +2 -2
  66. package/dist/src/draft/commands/handlers/api-create-revision.handler.d.ts +3 -3
  67. package/dist/src/draft/commands/handlers/api-create-row.handler.d.ts +4 -4
  68. package/dist/src/draft/commands/handlers/api-create-table.handler.d.ts +4 -4
  69. package/dist/src/draft/commands/handlers/api-remove-row.handler.d.ts +4 -4
  70. package/dist/src/draft/commands/handlers/api-remove-table.handler.d.ts +4 -4
  71. package/dist/src/draft/commands/handlers/api-revert-changes.handler.d.ts +3 -3
  72. package/dist/src/draft/commands/handlers/api-update-row.handler.d.ts +4 -4
  73. package/dist/src/draft/commands/handlers/api-update-table.handler.d.ts +4 -4
  74. package/dist/src/draft/commands/handlers/create-revision.handler.d.ts +8 -8
  75. package/dist/src/draft/commands/handlers/create-row.handler.d.ts +12 -12
  76. package/dist/src/draft/commands/handlers/create-table.handler.d.ts +11 -11
  77. package/dist/src/draft/commands/handlers/index.d.ts +24 -24
  78. package/dist/src/draft/commands/handlers/remove-row.handler.d.ts +12 -12
  79. package/dist/src/draft/commands/handlers/remove-table.handler.d.ts +11 -11
  80. package/dist/src/draft/commands/handlers/revert-changes.handler.d.ts +6 -6
  81. package/dist/src/draft/commands/handlers/transactional/get-or-create-draft-row.handler.d.ts +8 -8
  82. package/dist/src/draft/commands/handlers/transactional/get-or-create-draft-rows.handler.d.ts +8 -8
  83. package/dist/src/draft/commands/handlers/transactional/get-or-create-draft-table.handler.d.ts +7 -7
  84. package/dist/src/draft/commands/handlers/transactional/resolve-draft-revision.handler.d.ts +3 -3
  85. package/dist/src/draft/commands/handlers/transactional/validate-data.handler.d.ts +4 -4
  86. package/dist/src/draft/commands/handlers/transactional/validate-not-system-table.handler.d.ts +3 -3
  87. package/dist/src/draft/commands/handlers/transactional/validate-schema.handler.d.ts +4 -4
  88. package/dist/src/draft/commands/handlers/update-row.handler.d.ts +8 -8
  89. package/dist/src/draft/commands/handlers/update-rows.handler.d.ts +7 -7
  90. package/dist/src/draft/commands/handlers/update-table.handler.d.ts +9 -9
  91. package/dist/src/draft/commands/impl/api-update-table.command.d.ts +1 -1
  92. package/dist/src/draft/commands/impl/transactional/validate-data.command.d.ts +1 -1
  93. package/dist/src/draft/commands/impl/update-rows.command.d.ts +1 -1
  94. package/dist/src/draft/commands/impl/update-table.command.d.ts +1 -1
  95. package/dist/src/draft/commands/types/api-create-row.handler.types.d.ts +2 -2
  96. package/dist/src/draft/commands/types/api-remove-row.handler.types.d.ts +2 -2
  97. package/dist/src/draft/commands/types/api-remove-table.handler.types.d.ts +1 -1
  98. package/dist/src/draft/commands/types/api-update-row.handler.types.d.ts +2 -2
  99. package/dist/src/draft/commands/types/api-update-table.handler.types.d.ts +1 -1
  100. package/dist/src/draft/draft-request-dto/draft-revision-request.dto.d.ts +1 -1
  101. package/dist/src/draft/draft-request-dto/index.d.ts +4 -4
  102. package/dist/src/draft/draft-request-dto/row-request.dto.d.ts +1 -1
  103. package/dist/src/draft/draft-request-dto/rows-request.dto.d.ts +1 -1
  104. package/dist/src/draft/draft-request-dto/table-request.dto.d.ts +1 -1
  105. package/dist/src/draft/draft.handler.d.ts +2 -2
  106. package/dist/src/draft/draft.transactional.commands.d.ts +1 -1
  107. package/dist/src/draft/session-changelog.service.d.ts +4 -4
  108. package/dist/src/email/email.service.d.ts +2 -2
  109. package/dist/src/endpoint/commands/handlers/api-create-endpoint.handler.d.ts +1 -1
  110. package/dist/src/endpoint/commands/handlers/create-endpoint.handler.d.ts +3 -3
  111. package/dist/src/endpoint/commands/handlers/delete-endpoint.handler.d.ts +3 -3
  112. package/dist/src/endpoint/commands/handlers/index.d.ts +3 -3
  113. package/dist/src/endpoint/queries/handlers/get-created-endpoint.handler.d.ts +2 -2
  114. package/dist/src/endpoint/queries/handlers/get-revision-by-endpoint-id.handler.d.ts +2 -2
  115. package/dist/src/endpoint/queries/handlers/index.d.ts +2 -2
  116. package/dist/src/endpoint/queries/impl/index.d.ts +1 -1
  117. package/dist/src/graphql-api/auth/auth.resolver.d.ts +2 -2
  118. package/dist/src/graphql-api/auth/inputs/create-user.input.d.ts +1 -1
  119. package/dist/src/graphql-api/branch/branch.resolver.d.ts +6 -6
  120. package/dist/src/graphql-api/branch/inputs/index.d.ts +5 -5
  121. package/dist/src/graphql-api/branch/model/branch.model.d.ts +3 -3
  122. package/dist/src/graphql-api/branch/model/parent-branch.model.d.ts +2 -2
  123. package/dist/src/graphql-api/branch/parent-branch.resolver.d.ts +1 -1
  124. package/dist/src/graphql-api/configuration/configuration.resolver.d.ts +1 -1
  125. package/dist/src/graphql-api/draft/draft.resolver.d.ts +2 -2
  126. package/dist/src/graphql-api/draft/input/create-row.input.d.ts +1 -1
  127. package/dist/src/graphql-api/draft/input/index.d.ts +5 -5
  128. package/dist/src/graphql-api/draft/input/remove-row.input.d.ts +1 -1
  129. package/dist/src/graphql-api/draft/input/update-row.input.d.ts +1 -1
  130. package/dist/src/graphql-api/draft/input/update-table.input.d.ts +1 -1
  131. package/dist/src/graphql-api/draft/model/create-row-result.model.d.ts +2 -2
  132. package/dist/src/graphql-api/draft/model/create-table-result.model.d.ts +2 -2
  133. package/dist/src/graphql-api/draft/model/remove-row-result.model.d.ts +2 -2
  134. package/dist/src/graphql-api/draft/model/remove-table-result.model.d.ts +1 -1
  135. package/dist/src/graphql-api/draft/model/update-row-result.model.d.ts +2 -2
  136. package/dist/src/graphql-api/draft/model/update-table-result.model.d.ts +1 -1
  137. package/dist/src/graphql-api/endpoint/endpoint.resolver.d.ts +2 -2
  138. package/dist/src/graphql-api/endpoint/inputs/create-endpoint.input.d.ts +1 -1
  139. package/dist/src/graphql-api/endpoint/inputs/index.d.ts +3 -3
  140. package/dist/src/graphql-api/endpoint/model/endpoint.model.d.ts +1 -1
  141. package/dist/src/graphql-api/endpoint/model/index.d.ts +1 -1
  142. package/dist/src/graphql-api/graphql-api.module.js +19 -9
  143. package/dist/src/graphql-api/graphql-api.module.js.map +1 -1
  144. package/dist/src/graphql-api/organization/inputs/add-user-to-organization.input.d.ts +1 -1
  145. package/dist/src/graphql-api/organization/model/users-organization.connection.d.ts +1 -1
  146. package/dist/src/graphql-api/organization/model/users-organization.model.d.ts +2 -2
  147. package/dist/src/graphql-api/organization/organization.resolver.d.ts +4 -4
  148. package/dist/src/graphql-api/project/inputs/add-user-to-project.input.d.ts +1 -1
  149. package/dist/src/graphql-api/project/inputs/index.d.ts +7 -7
  150. package/dist/src/graphql-api/project/model/index.d.ts +1 -1
  151. package/dist/src/graphql-api/project/model/project.model.d.ts +1 -1
  152. package/dist/src/graphql-api/project/model/projects.connection.d.ts +1 -1
  153. package/dist/src/graphql-api/project/model/users-project.connection.d.ts +1 -1
  154. package/dist/src/graphql-api/project/model/users-project.model.d.ts +2 -2
  155. package/dist/src/graphql-api/project/project.resolver.d.ts +3 -3
  156. package/dist/src/graphql-api/revision/child-branch.resolver.d.ts +1 -1
  157. package/dist/src/graphql-api/revision/model/child-branch.model.d.ts +2 -2
  158. package/dist/src/graphql-api/revision/model/revision.model.d.ts +4 -4
  159. package/dist/src/graphql-api/revision/revision.resolver.d.ts +4 -4
  160. package/dist/src/graphql-api/row/inputs/index.d.ts +3 -3
  161. package/dist/src/graphql-api/row/model/row-reference.model.d.ts +2 -2
  162. package/dist/src/graphql-api/row/model/row-references-connection.model.d.ts +1 -1
  163. package/dist/src/graphql-api/row/model/row.model.d.ts +1 -1
  164. package/dist/src/graphql-api/row/model/rows-connection.model.d.ts +1 -1
  165. package/dist/src/graphql-api/row/row.resolver.d.ts +5 -5
  166. package/dist/src/graphql-api/share/model/paginated.model.d.ts +1 -1
  167. package/dist/src/graphql-api/table/model/table-connection.model.d.ts +1 -1
  168. package/dist/src/graphql-api/table/model/table.model.d.ts +2 -2
  169. package/dist/src/graphql-api/table/table.resolver.d.ts +6 -6
  170. package/dist/src/graphql-api/user/user.resolver.d.ts +4 -4
  171. package/dist/src/health/health.controller.js +1 -0
  172. package/dist/src/health/health.controller.js.map +1 -1
  173. package/dist/src/index.d.ts +5 -2
  174. package/dist/src/index.js +7 -3
  175. package/dist/src/index.js.map +1 -1
  176. package/dist/src/metrics/graphql/constants.d.ts +3 -0
  177. package/dist/src/metrics/graphql/constants.js +7 -0
  178. package/dist/src/metrics/graphql/constants.js.map +1 -0
  179. package/dist/src/metrics/graphql/graphql-metrics.plugin.d.ts +7 -0
  180. package/dist/src/metrics/graphql/graphql-metrics.plugin.js +55 -0
  181. package/dist/src/metrics/graphql/graphql-metrics.plugin.js.map +1 -0
  182. package/dist/src/metrics/graphql/graphql-metrics.service.d.ts +16 -0
  183. package/dist/src/metrics/graphql/graphql-metrics.service.js +49 -0
  184. package/dist/src/metrics/graphql/graphql-metrics.service.js.map +1 -0
  185. package/dist/src/metrics/metrics.module.d.ts +2 -0
  186. package/dist/src/metrics/metrics.module.js +32 -0
  187. package/dist/src/metrics/metrics.module.js.map +1 -0
  188. package/dist/src/metrics/rest/constants.d.ts +3 -0
  189. package/dist/src/metrics/rest/constants.js +7 -0
  190. package/dist/src/metrics/rest/constants.js.map +1 -0
  191. package/dist/src/metrics/rest/rest-metrics.interceptor.d.ts +9 -0
  192. package/dist/src/metrics/rest/rest-metrics.interceptor.js +53 -0
  193. package/dist/src/metrics/rest/rest-metrics.interceptor.js.map +1 -0
  194. package/dist/src/metrics/rest/rest-metrics.service.d.ts +15 -0
  195. package/dist/src/metrics/rest/rest-metrics.service.js +49 -0
  196. package/dist/src/metrics/rest/rest-metrics.service.js.map +1 -0
  197. package/dist/src/metrics/utils.d.ts +1 -0
  198. package/dist/src/metrics/utils.js +8 -0
  199. package/dist/src/metrics/utils.js.map +1 -0
  200. package/dist/src/metrics-api/metrics-api.module.d.ts +4 -0
  201. package/dist/src/metrics-api/metrics-api.module.js +29 -0
  202. package/dist/src/metrics-api/metrics-api.module.js.map +1 -0
  203. package/dist/src/metrics-api/metrics-enabled.guard.d.ts +7 -0
  204. package/dist/src/metrics-api/metrics-enabled.guard.js +28 -0
  205. package/dist/src/metrics-api/metrics-enabled.guard.js.map +1 -0
  206. package/dist/src/metrics-api/metrics.controller.d.ts +7 -0
  207. package/dist/src/metrics-api/metrics.controller.js +49 -0
  208. package/dist/src/metrics-api/metrics.controller.js.map +1 -0
  209. package/dist/src/notification/in-memory-server.d.ts +6 -0
  210. package/dist/src/notification/in-memory-server.js +19 -0
  211. package/dist/src/notification/in-memory-server.js.map +1 -0
  212. package/dist/src/organization/commands/handlers/add-user-to-organization.handler.d.ts +3 -3
  213. package/dist/src/organization/commands/handlers/remove-user-from-organization.handler.d.ts +2 -2
  214. package/dist/src/organization/commands/impl/add-user-to-organization.command.d.ts +1 -1
  215. package/dist/src/organization/commands/index.d.ts +1 -1
  216. package/dist/src/organization/queries/handlers/get-projects-by-organization-id.handler.d.ts +2 -2
  217. package/dist/src/organization/queries/handlers/get-users-organization.handler.d.ts +2 -2
  218. package/dist/src/organization/queries/handlers/index.d.ts +1 -1
  219. package/dist/src/organization/queries/impl/get-projects-by-organization-id.query.d.ts +1 -1
  220. package/dist/src/organization/queries/impl/get-users-organization.query.d.ts +1 -1
  221. package/dist/src/organization/queries/impl/index.d.ts +1 -1
  222. package/dist/src/organization/queries/index.d.ts +2 -2
  223. package/dist/src/project/commands/handlers/add-user-to-project.handler.d.ts +3 -3
  224. package/dist/src/project/commands/handlers/api-create-project.handler.d.ts +1 -1
  225. package/dist/src/project/commands/handlers/create-project.handler.d.ts +3 -3
  226. package/dist/src/project/commands/handlers/delete-project.handler.d.ts +4 -4
  227. package/dist/src/project/commands/handlers/index.d.ts +6 -6
  228. package/dist/src/project/commands/handlers/remove-user-from-project.handler.d.ts +2 -2
  229. package/dist/src/project/commands/handlers/update-project.handler.d.ts +3 -3
  230. package/dist/src/project/commands/impl/add-user-to-project.command.d.ts +1 -1
  231. package/dist/src/project/queries/handlers/get-all-branches-by-project.handler.d.ts +2 -2
  232. package/dist/src/project/queries/handlers/get-project-by-id.handler.d.ts +2 -2
  233. package/dist/src/project/queries/handlers/get-project.handler.d.ts +3 -3
  234. package/dist/src/project/queries/handlers/get-root-branch-by-project.handler.d.ts +2 -2
  235. package/dist/src/project/queries/handlers/get-users-project.handler.d.ts +2 -2
  236. package/dist/src/project/queries/handlers/index.d.ts +5 -5
  237. package/dist/src/project/queries/impl/get-users-project.query.d.ts +1 -1
  238. package/dist/src/rest-api/auth/auth.controller.d.ts +3 -3
  239. package/dist/src/rest-api/auth/auth.controller.js +2 -0
  240. package/dist/src/rest-api/auth/auth.controller.js.map +1 -1
  241. package/dist/src/rest-api/auth/dto/create-user.dto.d.ts +1 -1
  242. package/dist/src/rest-api/branch/branch-by-name.controller.d.ts +3 -3
  243. package/dist/src/rest-api/branch/branch-by-name.controller.js +2 -0
  244. package/dist/src/rest-api/branch/branch-by-name.controller.js.map +1 -1
  245. package/dist/src/rest-api/configuration/configuration.controller.d.ts +1 -1
  246. package/dist/src/rest-api/configuration/configuration.controller.js +2 -0
  247. package/dist/src/rest-api/configuration/configuration.controller.js.map +1 -1
  248. package/dist/src/rest-api/endpoint/endpointByIdController.js +2 -0
  249. package/dist/src/rest-api/endpoint/endpointByIdController.js.map +1 -1
  250. package/dist/src/rest-api/organization/dto/add-user-to-organization.dto.d.ts +1 -1
  251. package/dist/src/rest-api/organization/dto/index.d.ts +5 -5
  252. package/dist/src/rest-api/organization/model/users-organization.model.d.ts +2 -2
  253. package/dist/src/rest-api/organization/organization.controller.d.ts +4 -4
  254. package/dist/src/rest-api/organization/organization.controller.js +2 -0
  255. package/dist/src/rest-api/organization/organization.controller.js.map +1 -1
  256. package/dist/src/rest-api/project/dto/add-user-to-project.dto.d.ts +1 -1
  257. package/dist/src/rest-api/project/model/users-project.model.d.ts +2 -2
  258. package/dist/src/rest-api/project/project.controller.d.ts +6 -6
  259. package/dist/src/rest-api/project/project.controller.js +2 -0
  260. package/dist/src/rest-api/project/project.controller.js.map +1 -1
  261. package/dist/src/rest-api/rest-api.module.js +2 -1
  262. package/dist/src/rest-api/rest-api.module.js.map +1 -1
  263. package/dist/src/rest-api/revision/dto/index.d.ts +3 -3
  264. package/dist/src/rest-api/revision/model/create-table.response.d.ts +2 -2
  265. package/dist/src/rest-api/revision/revision-by-id.controller.d.ts +7 -7
  266. package/dist/src/rest-api/revision/revision-by-id.controller.js +2 -0
  267. package/dist/src/rest-api/revision/revision-by-id.controller.js.map +1 -1
  268. package/dist/src/rest-api/row/model/remove-row.response.d.ts +2 -2
  269. package/dist/src/rest-api/row/model/update-row.response.d.ts +2 -2
  270. package/dist/src/rest-api/row/row-by-id.controller.d.ts +3 -3
  271. package/dist/src/rest-api/row/row-by-id.controller.js +2 -0
  272. package/dist/src/rest-api/row/row-by-id.controller.js.map +1 -1
  273. package/dist/src/rest-api/share/utils/transformFromPrismaToBranchModel.d.ts +1 -1
  274. package/dist/src/rest-api/share/utils/transformFromPrismaToEndpointsModel.d.ts +1 -1
  275. package/dist/src/rest-api/share/utils/transformFromPrismaToRevisionModel.d.ts +2 -2
  276. package/dist/src/rest-api/share/utils/transformFromPrismaToRowModel.d.ts +2 -2
  277. package/dist/src/rest-api/share/utils/transformFromPrismaToTableModel.d.ts +2 -2
  278. package/dist/src/rest-api/share/utils/transformFromPrismaToUserOrganizationModel.d.ts +3 -3
  279. package/dist/src/rest-api/share/utils/transformFromPrismaToUserProjectModel.d.ts +3 -3
  280. package/dist/src/rest-api/table/dto/update-table.dto.d.ts +1 -1
  281. package/dist/src/rest-api/table/model/create-row.response.d.ts +1 -1
  282. package/dist/src/rest-api/table/model/update-table.response.d.ts +1 -1
  283. package/dist/src/rest-api/table/table-by-id.controller.d.ts +6 -6
  284. package/dist/src/rest-api/table/table-by-id.controller.js +2 -0
  285. package/dist/src/rest-api/table/table-by-id.controller.js.map +1 -1
  286. package/dist/src/rest-api/user/user.controller.d.ts +2 -2
  287. package/dist/src/rest-api/user/user.controller.js +2 -0
  288. package/dist/src/rest-api/user/user.controller.js.map +1 -1
  289. package/dist/src/revision/queries/commands/get-children-by-revision.handler.d.ts +2 -2
  290. package/dist/src/revision/queries/commands/get-endpoints-by-revision-id.handler.d.ts +3 -3
  291. package/dist/src/revision/queries/commands/get-revision.handler.d.ts +2 -2
  292. package/dist/src/revision/queries/commands/get-tables-by-revision-id.handler.d.ts +3 -3
  293. package/dist/src/revision/queries/commands/index.d.ts +8 -8
  294. package/dist/src/revision/queries/commands/resolve-branch-by-revision.handler.d.ts +2 -2
  295. package/dist/src/revision/queries/commands/resolve-child-branches-by-revision.handler.d.ts +2 -2
  296. package/dist/src/revision/queries/commands/resolve-child-by-revision.handler.d.ts +2 -2
  297. package/dist/src/revision/queries/commands/resolve-parent-by-revision.handler.d.ts +2 -2
  298. package/dist/src/revision/queries/types/get-revision-tables.types.d.ts +2 -2
  299. package/dist/src/revision/queries/types/index.d.ts +1 -1
  300. package/dist/src/row/queries/handlers/get-row-by-id.handler.d.ts +3 -3
  301. package/dist/src/row/queries/handlers/get-row.handler.d.ts +4 -4
  302. package/dist/src/row/queries/handlers/get-rows.handler.d.ts +4 -4
  303. package/dist/src/row/queries/handlers/index.d.ts +7 -7
  304. package/dist/src/row/queries/handlers/resolve-row-count-references-by.handler.d.ts +5 -5
  305. package/dist/src/row/queries/handlers/resolve-row-count-references-to.handler.d.ts +3 -3
  306. package/dist/src/row/queries/handlers/resolve-row-references-by.handler.d.ts +5 -5
  307. package/dist/src/row/queries/handlers/resolve-row-references-to.handler.d.ts +5 -5
  308. package/dist/src/row/queries/impl/index.d.ts +4 -4
  309. package/dist/src/row/queries/types/get-row-by-id.types.d.ts +1 -1
  310. package/dist/src/row/queries/types/get-row.types.d.ts +1 -1
  311. package/dist/src/row/queries/types/get-rows.types.d.ts +2 -2
  312. package/dist/src/row/queries/types/resolve-row-references-by.types.d.ts +2 -2
  313. package/dist/src/row/queries/types/resolve-row-references-to.types.d.ts +2 -2
  314. package/dist/src/share/commands/handlers/index.d.ts +1 -1
  315. package/dist/src/share/commands/handlers/notify-endpoints.handler.d.ts +3 -3
  316. package/dist/src/share/commands/handlers/transactional/move-endpoints.handler.d.ts +2 -2
  317. package/dist/src/share/commands/utils/getOffsetPagination.d.ts +1 -1
  318. package/dist/src/share/commands/utils/getRevisionCursorPagination.d.ts +1 -1
  319. package/dist/src/share/const.d.ts +1 -1
  320. package/dist/src/share/queries/handlers/index.d.ts +3 -3
  321. package/dist/src/share/queries/handlers/transactional/find-branch-in-project-or-throw.handler.d.ts +3 -3
  322. package/dist/src/share/queries/handlers/transactional/find-draft-revision-in-branch-or-throw.handler.d.ts +3 -3
  323. package/dist/src/share/queries/handlers/transactional/find-head-revision-in-branch-or-throw.handler.d.ts +3 -3
  324. package/dist/src/share/queries/handlers/transactional/find-project-in-organization-or-throw.handler.d.ts +3 -3
  325. package/dist/src/share/queries/handlers/transactional/find-row-in-table-or-throw.handler.d.ts +3 -3
  326. package/dist/src/share/queries/handlers/transactional/find-rows-in-table-or-throw.handler.d.ts +3 -3
  327. package/dist/src/share/queries/handlers/transactional/find-table-in-revision-or-throw.handler.d.ts +3 -3
  328. package/dist/src/share/queries/handlers/transactional/get-table-schema.handler.d.ts +3 -3
  329. package/dist/src/share/queries/types/index.d.ts +7 -7
  330. package/dist/src/share/references.service.d.ts +1 -1
  331. package/dist/src/share/share.transactional.queries.d.ts +2 -2
  332. package/dist/src/share/utils/schema/lib/applyPatches.d.ts +2 -2
  333. package/dist/src/share/utils/schema/lib/createJsonSchemaStore.d.ts +3 -3
  334. package/dist/src/share/utils/schema/lib/createJsonValueStore.d.ts +7 -7
  335. package/dist/src/share/utils/schema/lib/getJsonSchemaStoreByPath.d.ts +1 -1
  336. package/dist/src/share/utils/schema/lib/getPathByStore.d.ts +1 -1
  337. package/dist/src/share/utils/schema/lib/getReferencesFromSchema.d.ts +1 -1
  338. package/dist/src/share/utils/schema/lib/getReferencesFromValue.d.ts +1 -1
  339. package/dist/src/share/utils/schema/lib/getValuePathByStore.d.ts +1 -1
  340. package/dist/src/share/utils/schema/lib/schema-table.d.ts +3 -3
  341. package/dist/src/share/utils/schema/lib/traverseStore.d.ts +1 -1
  342. package/dist/src/share/utils/schema/lib/traverseValue.d.ts +1 -1
  343. package/dist/src/share/utils/schema/model/schema/json-array.store.d.ts +4 -4
  344. package/dist/src/share/utils/schema/model/schema/json-boolean.store.d.ts +3 -3
  345. package/dist/src/share/utils/schema/model/schema/json-number.store.d.ts +3 -3
  346. package/dist/src/share/utils/schema/model/schema/json-object.store.d.ts +4 -4
  347. package/dist/src/share/utils/schema/model/schema/json-schema.store.d.ts +5 -5
  348. package/dist/src/share/utils/schema/model/schema/json-string.store.d.ts +3 -3
  349. package/dist/src/share/utils/schema/model/value/json-array-value.store.d.ts +4 -4
  350. package/dist/src/share/utils/schema/model/value/json-boolean-value.store.d.ts +2 -2
  351. package/dist/src/share/utils/schema/model/value/json-number-value.store.d.ts +2 -2
  352. package/dist/src/share/utils/schema/model/value/json-object-value.store.d.ts +4 -4
  353. package/dist/src/share/utils/schema/model/value/json-string-value.store.d.ts +2 -2
  354. package/dist/src/share/utils/schema/model/value/json-value.store.d.ts +5 -5
  355. package/dist/src/share/utils/schema/model/value/value-transformation.d.ts +1 -1
  356. package/dist/src/share/utils/schema/types/json-patch.types.d.ts +1 -1
  357. package/dist/src/table/queries/handlers/get-count-rows-in-table.handler.d.ts +2 -2
  358. package/dist/src/table/queries/handlers/get-rows-by-table.handler.d.ts +3 -3
  359. package/dist/src/table/queries/handlers/get-table-by-id.handler.d.ts +3 -3
  360. package/dist/src/table/queries/handlers/get-table.handler.d.ts +4 -4
  361. package/dist/src/table/queries/handlers/get-tables.handler.d.ts +3 -3
  362. package/dist/src/table/queries/handlers/index.d.ts +10 -10
  363. package/dist/src/table/queries/handlers/resolve-table-count-references-by.handler.d.ts +4 -4
  364. package/dist/src/table/queries/handlers/resolve-table-count-references-to.handler.d.ts +3 -3
  365. package/dist/src/table/queries/handlers/resolve-table-references-by.handler.d.ts +5 -5
  366. package/dist/src/table/queries/handlers/resolve-table-references-to.handler.d.ts +4 -4
  367. package/dist/src/table/queries/handlers/resolve-table-schema.handler.d.ts +3 -3
  368. package/dist/src/table/queries/types/get-table-by-id.types.d.ts +1 -1
  369. package/dist/src/table/queries/types/get-table-rows.types.d.ts +2 -2
  370. package/dist/src/table/queries/types/get-table.types.d.ts +1 -1
  371. package/dist/src/table/queries/types/get-tables.types.d.ts +2 -2
  372. package/dist/src/table/queries/types/index.d.ts +6 -6
  373. package/dist/src/table/queries/types/resolve-table-references-by.types.d.ts +2 -2
  374. package/dist/src/table/queries/types/resolve-table-references-to.types.d.ts +2 -2
  375. package/dist/src/user/commands/handlers/set-username.handler.d.ts +3 -3
  376. package/dist/src/user/commands/handlers/update-password.handler.d.ts +3 -3
  377. package/dist/src/user/commands/index.d.ts +1 -1
  378. package/dist/src/user/queries/handlers/get-projects-by-user-id.handler.d.ts +2 -2
  379. package/dist/src/user/queries/handlers/get-user-organization.handler.d.ts +2 -2
  380. package/dist/src/user/queries/handlers/get-user.handler.d.ts +2 -2
  381. package/dist/src/user/queries/impl/get-projects-by-user-id.query.d.ts +1 -1
  382. package/dist/src/user/queries/impl/index.d.ts +1 -1
  383. package/dist/src/user/queries/index.d.ts +1 -1
  384. package/dist/tsconfig.build.tsbuildinfo +1 -1
  385. package/package.json +5 -2
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revisium/core",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
4
4
  "description": "Revisium is a tool (UI/API) inspired by JSON (JSON Schema) and Git, designed to provide a flexible and low-level headless CMS solution.",
5
5
  "private": false,
6
6
  "homepage": "https://revisium.io",
@@ -23,7 +23,7 @@
23
23
  "generate:seed:load": "ts-node prisma/seed/loadFromSeedApi.ts",
24
24
  "seed": "ts-node prisma/seed.ts",
25
25
  "seed:prod": "node dist/prisma/seed.js",
26
- "build": "nest build",
26
+ "build": "nest build && tsc-alias -p tsconfig.build.json",
27
27
  "prepublishOnly": "npm run build",
28
28
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
29
29
  "start": "nest start",
@@ -55,6 +55,7 @@
55
55
  "@nestjs/passport": "^10.0.3",
56
56
  "@nestjs/platform-express": "^10.3.3",
57
57
  "@nestjs/schedule": "^4.0.1",
58
+ "@nestjs/serve-static": "^4.0.2",
58
59
  "@nestjs/swagger": "^7.4.2",
59
60
  "@prisma/client": "^5.22.0",
60
61
  "ajv": "^8.16.0",
@@ -71,6 +72,7 @@
71
72
  "object-hash": "^3.0.0",
72
73
  "passport": "^0.7.0",
73
74
  "passport-jwt": "^4.0.1",
75
+ "prom-client": "^15.1.3",
74
76
  "reflect-metadata": "^0.2.1",
75
77
  "rxjs": "^7.8.1"
76
78
  },
@@ -101,6 +103,7 @@
101
103
  "ts-jest": "^29.1.2",
102
104
  "ts-loader": "^9.5.1",
103
105
  "ts-node": "^10.9.2",
106
+ "tsc-alias": "^1.8.10",
104
107
  "tsconfig-paths": "^4.2.0",
105
108
  "typescript": "^5.4.2"
106
109
  },
@@ -3,7 +3,7 @@
3
3
 
4
4
  generator client {
5
5
  provider = "prisma-client-js"
6
- previewFeatures = ["fullTextSearch"]
6
+ previewFeatures = ["fullTextSearch", "metrics"]
7
7
  binaryTargets = ["linux-arm64-openssl-1.1.x", "linux-arm64-openssl-3.0.x", "debian-openssl-1.1.x", "debian-openssl-3.0.x", "native", "darwin", "darwin-arm64", "windows"]
8
8
  engineType = "binary"
9
9
  }
@@ -1,11 +1,11 @@
1
1
  import { CommandBus } from '@nestjs/cqrs';
2
2
  import { AsyncLocalStorage } from 'async_hooks';
3
3
  import { DeepMockProxy } from 'jest-mock-extended';
4
- import { IdService } from 'src/database/id.service';
5
- import { PrismaService } from 'src/database/prisma.service';
6
- import { TransactionPrismaService } from 'src/database/transaction-prisma.service';
7
- import { ShareTransactionalCommands } from 'src/share/share.transactional.commands';
8
- import { ShareTransactionalQueries } from 'src/share/share.transactional.queries';
4
+ import { IdService } from '../../database/id.service';
5
+ import { PrismaService } from '../../database/prisma.service';
6
+ import { TransactionPrismaService } from '../../database/transaction-prisma.service';
7
+ import { ShareTransactionalCommands } from '../../share/share.transactional.commands';
8
+ import { ShareTransactionalQueries } from '../../share/share.transactional.queries';
9
9
  export declare const createMocks: ({ asyncLocalStorageStore, }?: {
10
10
  asyncLocalStorageStore?: any;
11
11
  }) => {
@@ -1,3 +1,3 @@
1
1
  import { DeepMockProxy } from 'jest-mock-extended';
2
- import { IdService } from 'src/database/id.service';
2
+ import { IdService } from '../../database/id.service';
3
3
  export declare const implementIdService: (idService: DeepMockProxy<IdService>, sequenceGeneratedId: string[]) => void;
@@ -1,5 +1,5 @@
1
1
  import { DeepMockProxy } from 'jest-mock-extended';
2
- import { DraftTransactionalCommands } from 'src/draft/draft.transactional.commands';
2
+ import { DraftTransactionalCommands } from '../../draft/draft.transactional.commands';
3
3
  export declare const createRowMocks: () => {
4
4
  rowTransactionalCommands: DeepMockProxy<DraftTransactionalCommands>;
5
5
  };
@@ -1,5 +1,5 @@
1
- import { JsonPatchAdd, JsonPatchMove, JsonPatchRemove, JsonPatchReplace } from 'src/share/utils/schema/types/json-patch.types';
2
- import { JsonArraySchema, JsonBooleanSchema, JsonNumberSchema, JsonObjectSchema, JsonSchema, JsonStringSchema } from 'src/share/utils/schema/types/schema.types';
1
+ import { JsonPatchAdd, JsonPatchMove, JsonPatchRemove, JsonPatchReplace } from '../../../share/utils/schema/types/json-patch.types';
2
+ import { JsonArraySchema, JsonBooleanSchema, JsonNumberSchema, JsonObjectSchema, JsonSchema, JsonStringSchema } from '../../../share/utils/schema/types/schema.types';
3
3
  export declare const getReplacePatch: ({ path, value, }: {
4
4
  path: string;
5
5
  value: JsonSchema;
@@ -0,0 +1,3 @@
1
+ export interface AdminModuleOptions {
2
+ rootPath: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=admin-module.options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin-module.options.js","sourceRoot":"","sources":["../../../src/admin/admin-module.options.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { DynamicModule, MiddlewareConsumer, NestModule } from '@nestjs/common';
2
+ import { AdminModuleOptions } from '../admin/admin-module.options';
3
+ export declare class AdminModule implements NestModule {
4
+ static forRoot(options: AdminModuleOptions): DynamicModule;
5
+ configure(consumer: MiddlewareConsumer): void;
6
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var AdminModule_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.AdminModule = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const config_1 = require("@nestjs/config");
13
+ const serve_static_1 = require("@nestjs/serve-static");
14
+ const envjs_controller_1 = require("./envjs.controller");
15
+ let AdminModule = AdminModule_1 = class AdminModule {
16
+ static forRoot(options) {
17
+ const serveStaticOptions = {
18
+ rootPath: options.rootPath,
19
+ serveStaticOptions: {
20
+ cacheControl: true,
21
+ },
22
+ };
23
+ return {
24
+ module: AdminModule_1,
25
+ imports: [config_1.ConfigModule, serve_static_1.ServeStaticModule.forRoot(serveStaticOptions)],
26
+ };
27
+ }
28
+ configure(consumer) {
29
+ consumer
30
+ .apply((req, res, next) => {
31
+ const excludedExtensions = /\.(js|css|svg|png|jpg|jpeg)$/;
32
+ if (!excludedExtensions.test(req.baseUrl)) {
33
+ res.setHeader('Cache-Control', 'no-store');
34
+ }
35
+ next();
36
+ })
37
+ .forRoutes('*');
38
+ }
39
+ };
40
+ exports.AdminModule = AdminModule;
41
+ exports.AdminModule = AdminModule = AdminModule_1 = __decorate([
42
+ (0, common_1.Module)({
43
+ controllers: [envjs_controller_1.EnvJsController],
44
+ })
45
+ ], AdminModule);
46
+ //# sourceMappingURL=admin.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.module.js","sourceRoot":"","sources":["../../../src/admin/admin.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAKwB;AACxB,2CAA8C;AAC9C,uDAG8B;AAG9B,yDAA6D;AAKtD,IAAM,WAAW,mBAAjB,MAAM,WAAW;IACtB,MAAM,CAAC,OAAO,CAAC,OAA2B;QACxC,MAAM,kBAAkB,GAA6B;YACnD,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,kBAAkB,EAAE;gBAClB,YAAY,EAAE,IAAI;aACnB;SACF,CAAC;QAEF,OAAO;YACL,MAAM,EAAE,aAAW;YACnB,OAAO,EAAE,CAAC,qBAAY,EAAE,gCAAiB,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;SACvE,CAAC;IACJ,CAAC;IAED,SAAS,CAAC,QAA4B;QACpC,QAAQ;aACL,KAAK,CAAC,CAAC,GAAY,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;YACzD,MAAM,kBAAkB,GAAG,8BAA8B,CAAC;YAE1D,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC1C,GAAG,CAAC,SAAS,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;YAC7C,CAAC;YAED,IAAI,EAAE,CAAC;QACT,CAAC,CAAC;aACD,SAAS,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;CACF,CAAA;AA5BY,kCAAW;sBAAX,WAAW;IAHvB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,kCAAe,CAAC;KAC/B,CAAC;GACW,WAAW,CA4BvB"}
@@ -0,0 +1,6 @@
1
+ import { ConfigService } from '@nestjs/config';
2
+ export declare class EnvJsController {
3
+ private configService;
4
+ constructor(configService: ConfigService);
5
+ envJs(): string;
6
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.EnvJsController = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const config_1 = require("@nestjs/config");
15
+ const swagger_1 = require("@nestjs/swagger");
16
+ let EnvJsController = class EnvJsController {
17
+ constructor(configService) {
18
+ this.configService = configService;
19
+ }
20
+ envJs() {
21
+ const envs = {
22
+ REACT_APP_ENDPOINT_HOST: this.configService.get('REACT_APP_ENDPOINT_HOST'),
23
+ REACT_APP_ENDPOINT_PORT: this.configService.get('REACT_APP_ENDPOINT_PORT'),
24
+ };
25
+ return `window.__env__ = ${JSON.stringify(envs)}`;
26
+ }
27
+ };
28
+ exports.EnvJsController = EnvJsController;
29
+ __decorate([
30
+ (0, common_1.Get)('env.js'),
31
+ __metadata("design:type", Function),
32
+ __metadata("design:paramtypes", []),
33
+ __metadata("design:returntype", void 0)
34
+ ], EnvJsController.prototype, "envJs", null);
35
+ exports.EnvJsController = EnvJsController = __decorate([
36
+ (0, swagger_1.ApiExcludeController)(),
37
+ (0, common_1.Controller)(),
38
+ __metadata("design:paramtypes", [config_1.ConfigService])
39
+ ], EnvJsController);
40
+ //# sourceMappingURL=envjs.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"envjs.controller.js","sourceRoot":"","sources":["../../../src/admin/envjs.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,2CAA+C;AAC/C,6CAAuD;AAIhD,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAAoB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAGpD,KAAK;QACH,MAAM,IAAI,GAAG;YACX,uBAAuB,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAC7C,yBAAyB,CAC1B;YACD,uBAAuB,EAAE,IAAI,CAAC,aAAa,CAAC,GAAG,CAC7C,yBAAyB,CAC1B;SACF,CAAC;QAEF,OAAO,oBAAoB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;IACpD,CAAC;CACF,CAAA;AAhBY,0CAAe;AAI1B;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;;;;4CAYb;0BAfU,eAAe;IAF3B,IAAA,8BAAoB,GAAE;IACtB,IAAA,mBAAU,GAAE;qCAEwB,sBAAa;GADrC,eAAe,CAgB3B"}
File without changes
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/admin/index.ts"],"names":[],"mappings":""}
@@ -10,12 +10,13 @@ exports.AppModule = void 0;
10
10
  const common_1 = require("@nestjs/common");
11
11
  const config_1 = require("@nestjs/config");
12
12
  const core_module_1 = require("./core/core.module");
13
+ const metrics_api_module_1 = require("./metrics-api/metrics-api.module");
13
14
  let AppModule = class AppModule {
14
15
  };
15
16
  exports.AppModule = AppModule;
16
17
  exports.AppModule = AppModule = __decorate([
17
18
  (0, common_1.Module)({
18
- imports: [config_1.ConfigModule.forRoot(), core_module_1.CoreModule],
19
+ imports: [config_1.ConfigModule.forRoot(), core_module_1.CoreModule, metrics_api_module_1.MetricsApiModule],
19
20
  })
20
21
  ], AppModule);
21
22
  //# sourceMappingURL=app.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,oDAAkD;AAK3C,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAHrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,qBAAY,CAAC,OAAO,EAAE,EAAE,wBAAU,CAAC;KAC9C,CAAC;GACW,SAAS,CAAG"}
1
+ {"version":3,"file":"app.module.js","sourceRoot":"","sources":["../../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,oDAAkD;AAClD,yEAAsE;AAK/D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IAHrB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,qBAAY,CAAC,OAAO,EAAE,EAAE,wBAAU,EAAE,qCAAgB,CAAC;KAChE,CAAC;GACW,SAAS,CAAG"}
@@ -1,5 +1,5 @@
1
1
  import { JwtService } from '@nestjs/jwt';
2
- import { JwtSecretService } from 'src/auth/jwt-secret.service';
2
+ import { JwtSecretService } from '../auth/jwt-secret.service';
3
3
  export declare class AuthService {
4
4
  private readonly jwtService;
5
5
  private readonly jwtSecret;
@@ -1,8 +1,8 @@
1
1
  import { PureAbility } from '@casl/ability';
2
2
  import { PrismaQuery, Subjects } from '@casl/prisma';
3
3
  import { Organization, Project, Branch, Revision, Table, Row, Endpoint, User } from '@prisma/client';
4
- import { PermissionAction, UserRole } from 'src/auth/consts';
5
- import { PrismaService } from 'src/database/prisma.service';
4
+ import { PermissionAction, UserRole } from '../auth/consts';
5
+ import { PrismaService } from '../database/prisma.service';
6
6
  export type AppSubjects = Subjects<{
7
7
  Organization: Organization;
8
8
  Project: Project;
@@ -1,7 +1,7 @@
1
1
  import { ICommandHandler } from '@nestjs/cqrs';
2
- import { CaslAbilityFactory } from 'src/auth/casl-ability.factory';
3
- import { CheckOrganizationPermissionCommand } from 'src/auth/commands/impl/check-organization-permission.command';
4
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { CaslAbilityFactory } from '../../../auth/casl-ability.factory';
3
+ import { CheckOrganizationPermissionCommand } from '../../../auth/commands/impl/check-organization-permission.command';
4
+ import { PrismaService } from '../../../database/prisma.service';
5
5
  export declare class CheckOrganizationPermissionHandler implements ICommandHandler<CheckOrganizationPermissionCommand, true> {
6
6
  private readonly prisma;
7
7
  private readonly casl;
@@ -1,7 +1,7 @@
1
1
  import { ICommandHandler } from '@nestjs/cqrs';
2
- import { CaslAbilityFactory } from 'src/auth/casl-ability.factory';
3
- import { CheckProjectPermissionCommand } from 'src/auth/commands/impl';
4
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { CaslAbilityFactory } from '../../../auth/casl-ability.factory';
3
+ import { CheckProjectPermissionCommand } from '../../../auth/commands/impl';
4
+ import { PrismaService } from '../../../database/prisma.service';
5
5
  export declare class CheckProjectPermissionHandler implements ICommandHandler<CheckProjectPermissionCommand, true> {
6
6
  private readonly prisma;
7
7
  private readonly casl;
@@ -1,7 +1,7 @@
1
1
  import { ICommandHandler } from '@nestjs/cqrs';
2
- import { CaslAbilityFactory } from 'src/auth/casl-ability.factory';
3
- import { CheckSystemPermissionCommand, CheckSystemPermissionCommandReturnType } from 'src/auth/commands/impl';
4
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { CaslAbilityFactory } from '../../../auth/casl-ability.factory';
3
+ import { CheckSystemPermissionCommand, CheckSystemPermissionCommandReturnType } from '../../../auth/commands/impl';
4
+ import { PrismaService } from '../../../database/prisma.service';
5
5
  export declare class CheckSystemPermissionHandler implements ICommandHandler<CheckSystemPermissionCommand, CheckSystemPermissionCommandReturnType> {
6
6
  private readonly prisma;
7
7
  private readonly casl;
@@ -1,5 +1,5 @@
1
1
  import { ICommandHandler } from '@nestjs/cqrs';
2
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { PrismaService } from '../../../database/prisma.service';
3
3
  import { AuthService } from '../../auth.service';
4
4
  import { ConfirmEmailCodeCommand, ConfirmEmailCodeCommandReturnType } from '../impl';
5
5
  export declare class ConfirmEmailCodeHandler implements ICommandHandler<ConfirmEmailCodeCommand, ConfirmEmailCodeCommandReturnType> {
@@ -1,8 +1,8 @@
1
1
  import { ICommandHandler } from '@nestjs/cqrs';
2
- import { AuthService } from 'src/auth/auth.service';
3
- import { CreateUserCommand, CreateUserCommandReturnType } from 'src/auth/commands/impl';
4
- import { IdService } from 'src/database/id.service';
5
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { AuthService } from '../../../auth/auth.service';
3
+ import { CreateUserCommand, CreateUserCommandReturnType } from '../../../auth/commands/impl';
4
+ import { IdService } from '../../../database/id.service';
5
+ import { PrismaService } from '../../../database/prisma.service';
6
6
  export declare class CreateUserHandler implements ICommandHandler<CreateUserCommand, CreateUserCommandReturnType> {
7
7
  private readonly prisma;
8
8
  private readonly idService;
@@ -1,8 +1,8 @@
1
1
  import { CommandBus, ICommandHandler } from '@nestjs/cqrs';
2
- import { AuthService } from 'src/auth/auth.service';
3
- import { LoginGithubCommand, LoginGithubCommandReturnType } from 'src/auth/commands/impl';
4
- import { GitHubAuthService } from 'src/auth/github-oauth.service';
5
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { AuthService } from '../../../auth/auth.service';
3
+ import { LoginGithubCommand, LoginGithubCommandReturnType } from '../../../auth/commands/impl';
4
+ import { GitHubAuthService } from '../../../auth/github-oauth.service';
5
+ import { PrismaService } from '../../../database/prisma.service';
6
6
  export declare class LoginGithubHandler implements ICommandHandler<LoginGithubCommand, LoginGithubCommandReturnType> {
7
7
  private readonly commandBus;
8
8
  private readonly prisma;
@@ -1,8 +1,8 @@
1
1
  import { CommandBus, ICommandHandler } from '@nestjs/cqrs';
2
- import { AuthService } from 'src/auth/auth.service';
3
- import { LoginGoogleCommand, LoginGoogleCommandReturnType } from 'src/auth/commands/impl';
4
- import { GoogleOauthService } from 'src/auth/google-oauth.service';
5
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { AuthService } from '../../../auth/auth.service';
3
+ import { LoginGoogleCommand, LoginGoogleCommandReturnType } from '../../../auth/commands/impl';
4
+ import { GoogleOauthService } from '../../../auth/google-oauth.service';
5
+ import { PrismaService } from '../../../database/prisma.service';
6
6
  export declare class LoginGoogleHandler implements ICommandHandler<LoginGoogleCommand, LoginGoogleCommandReturnType> {
7
7
  private readonly commandBus;
8
8
  private readonly prisma;
@@ -1,7 +1,7 @@
1
1
  import { ICommandHandler } from '@nestjs/cqrs';
2
- import { AuthService } from 'src/auth/auth.service';
3
- import { LoginCommand, LoginCommandReturnType } from 'src/auth/commands/impl';
4
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { AuthService } from '../../../auth/auth.service';
3
+ import { LoginCommand, LoginCommandReturnType } from '../../../auth/commands/impl';
4
+ import { PrismaService } from '../../../database/prisma.service';
5
5
  export declare class LoginHandler implements ICommandHandler<LoginCommand, LoginCommandReturnType> {
6
6
  private readonly prisma;
7
7
  private readonly authService;
@@ -1,5 +1,5 @@
1
1
  import { CommandBus, ICommandHandler } from '@nestjs/cqrs';
2
- import { EmailService } from 'src/email/email.service';
2
+ import { EmailService } from '../../../email/email.service';
3
3
  import { AuthService } from '../../auth.service';
4
4
  import { SignUpCommand, SignUpCommandReturnType } from '../impl';
5
5
  export declare class SignUpHandler implements ICommandHandler<SignUpCommand, SignUpCommandReturnType> {
@@ -1,4 +1,4 @@
1
- import { IPermissionParams } from 'src/auth/guards/permission-params';
1
+ import { IPermissionParams } from '../../../auth/guards/permission-params';
2
2
  export declare class CheckOrganizationPermissionCommand {
3
3
  readonly data: {
4
4
  readonly permissions: IPermissionParams[];
@@ -1,4 +1,4 @@
1
- import { IPermissionParams } from 'src/auth/guards/permission-params';
1
+ import { IPermissionParams } from '../../../auth/guards/permission-params';
2
2
  export declare class CheckProjectPermissionCommand {
3
3
  readonly data: {
4
4
  readonly permissions: IPermissionParams[];
@@ -1,4 +1,4 @@
1
- import { IPermissionParams } from 'src/auth/guards/permission-params';
1
+ import { IPermissionParams } from '../../../auth/guards/permission-params';
2
2
  export declare class CheckSystemPermissionCommand {
3
3
  readonly data: {
4
4
  readonly permissions: IPermissionParams[];
@@ -1,4 +1,4 @@
1
- import { UserSystemRoles } from 'src/auth/consts';
1
+ import { UserSystemRoles } from '../../../auth/consts';
2
2
  export declare class CreateUserCommand {
3
3
  readonly data: {
4
4
  readonly username?: string;
@@ -1,2 +1,2 @@
1
- import { CheckOrganizationPermissionHandler, CheckProjectPermissionHandler, CheckSystemPermissionHandler, ConfirmEmailCodeHandler, CreateUserHandler, LoginGithubHandler, LoginGoogleHandler, LoginHandler, SignUpHandler } from 'src/auth/commands/handlers';
1
+ import { CheckOrganizationPermissionHandler, CheckProjectPermissionHandler, CheckSystemPermissionHandler, ConfirmEmailCodeHandler, CreateUserHandler, LoginGithubHandler, LoginGoogleHandler, LoginHandler, SignUpHandler } from '../../auth/commands/handlers';
2
2
  export declare const AUTH_COMMANDS: (typeof LoginHandler | typeof CreateUserHandler | typeof CheckSystemPermissionHandler | typeof CheckOrganizationPermissionHandler | typeof CheckProjectPermissionHandler | typeof SignUpHandler | typeof LoginGoogleHandler | typeof LoginGithubHandler | typeof ConfirmEmailCodeHandler)[];
@@ -1,8 +1,8 @@
1
1
  import { CanActivate, ExecutionContext } from '@nestjs/common';
2
2
  import { Reflector } from '@nestjs/core';
3
3
  import { CommandBus } from '@nestjs/cqrs';
4
- import { IPermissionParams } from 'src/auth/guards/permission-params';
5
- import { IOptionalAuthUser } from 'src/auth/types';
4
+ import { IPermissionParams } from '../../auth/guards/permission-params';
5
+ import { IOptionalAuthUser } from '../../auth/types';
6
6
  export declare abstract class BasePermissionGuard<T = Record<string, never>> implements CanActivate {
7
7
  protected reflector: Reflector;
8
8
  protected commandBus: CommandBus;
@@ -1,7 +1,7 @@
1
1
  import { ExecutionContext } from '@nestjs/common';
2
- import { CheckOrganizationPermissionCommand } from 'src/auth/commands/impl/check-organization-permission.command';
3
- import { BasePermissionGuard } from 'src/auth/guards/base-persmission.guard';
4
- import { IPermissionParams } from 'src/auth/guards/permission-params';
2
+ import { CheckOrganizationPermissionCommand } from '../../auth/commands/impl/check-organization-permission.command';
3
+ import { BasePermissionGuard } from '../../auth/guards/base-persmission.guard';
4
+ import { IPermissionParams } from '../../auth/guards/permission-params';
5
5
  interface Params {
6
6
  organizationId?: string;
7
7
  }
@@ -1,4 +1,4 @@
1
- import { PermissionAction, PermissionSubject } from 'src/auth/consts';
1
+ import { PermissionAction, PermissionSubject } from '../../auth/consts';
2
2
  export type IPermissionParams = {
3
3
  action: PermissionAction;
4
4
  subject: PermissionSubject;
@@ -1,7 +1,7 @@
1
1
  import { ExecutionContext } from '@nestjs/common';
2
- import { CheckProjectPermissionCommand } from 'src/auth/commands/impl';
3
- import { BasePermissionGuard } from 'src/auth/guards/base-persmission.guard';
4
- import { IPermissionParams } from 'src/auth/guards/permission-params';
2
+ import { CheckProjectPermissionCommand } from '../../auth/commands/impl';
3
+ import { BasePermissionGuard } from '../../auth/guards/base-persmission.guard';
4
+ import { IPermissionParams } from '../../auth/guards/permission-params';
5
5
  interface Params {
6
6
  organizationId?: string;
7
7
  projectName?: string;
@@ -1,7 +1,7 @@
1
1
  import { ExecutionContext } from '@nestjs/common';
2
- import { CheckSystemPermissionCommand } from 'src/auth/commands/impl';
3
- import { BasePermissionGuard } from 'src/auth/guards/base-persmission.guard';
4
- import { IPermissionParams } from 'src/auth/guards/permission-params';
2
+ import { CheckSystemPermissionCommand } from '../../auth/commands/impl';
3
+ import { BasePermissionGuard } from '../../auth/guards/base-persmission.guard';
4
+ import { IPermissionParams } from '../../auth/guards/permission-params';
5
5
  declare abstract class SystemGuard extends BasePermissionGuard {
6
6
  protected getCommand(_: Record<string, never>, permissions: IPermissionParams[], userId?: string): CheckSystemPermissionCommand;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { Strategy } from 'passport-jwt';
2
- import { JwtSecretService } from 'src/auth/jwt-secret.service';
3
- import { IAuthUser } from 'src/auth/types';
2
+ import { JwtSecretService } from '../../auth/jwt-secret.service';
3
+ import { IAuthUser } from '../../auth/types';
4
4
  declare const JwtStrategy_base: new (...args: any[]) => Strategy;
5
5
  export declare class JwtStrategy extends JwtStrategy_base {
6
6
  constructor(jwtSecret: JwtSecretService);
@@ -1,2 +1,2 @@
1
- import { UserRole } from 'src/auth/consts';
1
+ import { UserRole } from '../auth/consts';
2
2
  export declare function getUserRole(roleId: string | undefined): UserRole;
@@ -1,5 +1,5 @@
1
1
  import { CommandBus, ICommandHandler, QueryBus } from '@nestjs/cqrs';
2
- import { ApiCreateBranchByRevisionIdCommand } from 'src/branch/commands/impl';
2
+ import { ApiCreateBranchByRevisionIdCommand } from '../../../branch/commands/impl';
3
3
  export declare class ApiCreateBranchByRevisionIdHandler implements ICommandHandler<ApiCreateBranchByRevisionIdCommand> {
4
4
  private readonly commandBus;
5
5
  private readonly queryBus;
@@ -1,8 +1,8 @@
1
1
  import { ICommandHandler } from '@nestjs/cqrs';
2
2
  import { Prisma } from '@prisma/client';
3
- import { CreateBranchByRevisionIdCommand } from 'src/branch/commands/impl';
4
- import { IdService } from 'src/database/id.service';
5
- import { TransactionPrismaService } from 'src/database/transaction-prisma.service';
3
+ import { CreateBranchByRevisionIdCommand } from '../../../branch/commands/impl';
4
+ import { IdService } from '../../../database/id.service';
5
+ import { TransactionPrismaService } from '../../../database/transaction-prisma.service';
6
6
  export declare class CreateBranchByRevisionIdHandler implements ICommandHandler<CreateBranchByRevisionIdCommand> {
7
7
  private transactionService;
8
8
  private idService;
@@ -1,3 +1,3 @@
1
- import { ApiCreateBranchByRevisionIdHandler } from 'src/branch/commands/handlers/api-create-branch-by-revision-id.handler';
2
- import { CreateBranchByRevisionIdHandler } from 'src/branch/commands/handlers/create-branch-by-revision-id.handler';
1
+ import { ApiCreateBranchByRevisionIdHandler } from '../../../branch/commands/handlers/api-create-branch-by-revision-id.handler';
2
+ import { CreateBranchByRevisionIdHandler } from '../../../branch/commands/handlers/create-branch-by-revision-id.handler';
3
3
  export declare const BRANCH_COMMANDS_HANDLERS: (typeof ApiCreateBranchByRevisionIdHandler | typeof CreateBranchByRevisionIdHandler)[];
@@ -1,7 +1,7 @@
1
1
  import { IQueryHandler } from '@nestjs/cqrs';
2
- import { GetBranchByIdQuery } from 'src/branch/quieries/impl/get-branch-by-id.query';
3
- import { GetBranchByIdReturnType } from 'src/branch/quieries/types/get-branch-by-id.types';
4
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { GetBranchByIdQuery } from '../../../branch/quieries/impl/get-branch-by-id.query';
3
+ import { GetBranchByIdReturnType } from '../../../branch/quieries/types/get-branch-by-id.types';
4
+ import { PrismaService } from '../../../database/prisma.service';
5
5
  export declare class GetBranchByIdHandler implements IQueryHandler<GetBranchByIdQuery, GetBranchByIdReturnType> {
6
6
  private prisma;
7
7
  constructor(prisma: PrismaService);
@@ -1,8 +1,8 @@
1
1
  import { IQueryHandler } from '@nestjs/cqrs';
2
- import { GetBranchQuery } from 'src/branch/quieries/impl/get-branch.query';
3
- import { GetBranchReturnType } from 'src/branch/quieries/types';
4
- import { TransactionPrismaService } from 'src/database/transaction-prisma.service';
5
- import { ShareTransactionalQueries } from 'src/share/share.transactional.queries';
2
+ import { GetBranchQuery } from '../../../branch/quieries/impl/get-branch.query';
3
+ import { GetBranchReturnType } from '../../../branch/quieries/types';
4
+ import { TransactionPrismaService } from '../../../database/transaction-prisma.service';
5
+ import { ShareTransactionalQueries } from '../../../share/share.transactional.queries';
6
6
  export declare class GetBranchHandler implements IQueryHandler<GetBranchQuery> {
7
7
  private transactionPrisma;
8
8
  private shareTransactionalQueries;
@@ -1,8 +1,8 @@
1
1
  import { IQueryHandler } from '@nestjs/cqrs';
2
2
  import { Prisma } from '@prisma/client';
3
- import { GetBranchesQuery } from 'src/branch/quieries/impl/get-branches.query';
4
- import { TransactionPrismaService } from 'src/database/transaction-prisma.service';
5
- import { ShareTransactionalQueries } from 'src/share/share.transactional.queries';
3
+ import { GetBranchesQuery } from '../../../branch/quieries/impl/get-branches.query';
4
+ import { TransactionPrismaService } from '../../../database/transaction-prisma.service';
5
+ import { ShareTransactionalQueries } from '../../../share/share.transactional.queries';
6
6
  export declare class GetBranchesHandler implements IQueryHandler<GetBranchesQuery> {
7
7
  private transactionPrisma;
8
8
  private shareTransactionalQueries;
@@ -1,7 +1,7 @@
1
1
  import { IQueryHandler } from '@nestjs/cqrs';
2
- import { GetDraftRevisionQuery } from 'src/branch/quieries/impl';
3
- import { GetDraftRevisionTypes } from 'src/branch/quieries/types';
4
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { GetDraftRevisionQuery } from '../../../branch/quieries/impl';
3
+ import { GetDraftRevisionTypes } from '../../../branch/quieries/types';
4
+ import { PrismaService } from '../../../database/prisma.service';
5
5
  export declare class GetDraftRevisionHandler implements IQueryHandler<GetDraftRevisionQuery> {
6
6
  private prisma;
7
7
  constructor(prisma: PrismaService);
@@ -1,7 +1,7 @@
1
1
  import { IQueryHandler } from '@nestjs/cqrs';
2
- import { GetHeadRevisionQuery } from 'src/branch/quieries/impl';
3
- import { GetHeadRevisionReturnType } from 'src/branch/quieries/types';
4
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { GetHeadRevisionQuery } from '../../../branch/quieries/impl';
3
+ import { GetHeadRevisionReturnType } from '../../../branch/quieries/types';
4
+ import { PrismaService } from '../../../database/prisma.service';
5
5
  export declare class GetHeadRevisionHandler implements IQueryHandler<GetHeadRevisionQuery> {
6
6
  private prisma;
7
7
  constructor(prisma: PrismaService);
@@ -1,6 +1,6 @@
1
1
  import { IQueryHandler } from '@nestjs/cqrs';
2
- import { GetProjectByBranchQuery } from 'src/branch/quieries/impl';
3
- import { PrismaService } from 'src/database/prisma.service';
2
+ import { GetProjectByBranchQuery } from '../../../branch/quieries/impl';
3
+ import { PrismaService } from '../../../database/prisma.service';
4
4
  export declare class GetProjectByBranchHandler implements IQueryHandler<GetProjectByBranchQuery> {
5
5
  private prisma;
6
6
  constructor(prisma: PrismaService);