@revisium/core 2.5.0-alpha.7 → 2.5.0-alpha.8

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 (602) hide show
  1. package/dist/package.json +4 -1
  2. package/dist/src/__tests__/e2e/shared/graphql-helpers.d.ts +29 -0
  3. package/dist/src/__tests__/e2e/shared/graphql-helpers.js +61 -0
  4. package/dist/src/__tests__/e2e/shared/graphql-helpers.js.map +1 -0
  5. package/dist/src/__tests__/e2e/shared/helpers.d.ts +16 -0
  6. package/dist/src/__tests__/e2e/shared/helpers.js +64 -0
  7. package/dist/src/__tests__/e2e/shared/helpers.js.map +1 -0
  8. package/dist/src/__tests__/e2e/shared/index.d.ts +4 -0
  9. package/dist/src/__tests__/e2e/shared/index.js +26 -0
  10. package/dist/src/__tests__/e2e/shared/index.js.map +1 -0
  11. package/dist/src/__tests__/e2e/shared/readonly-fixture.d.ts +5 -0
  12. package/dist/src/__tests__/e2e/shared/readonly-fixture.js +28 -0
  13. package/dist/src/__tests__/e2e/shared/readonly-fixture.js.map +1 -0
  14. package/dist/src/__tests__/e2e/shared/test-app.d.ts +6 -0
  15. package/dist/src/__tests__/e2e/shared/test-app.js +55 -0
  16. package/dist/src/__tests__/e2e/shared/test-app.js.map +1 -0
  17. package/dist/src/__tests__/utils/prepareProject.d.ts +271 -0
  18. package/dist/src/__tests__/utils/prepareProject.js +69 -13
  19. package/dist/src/__tests__/utils/prepareProject.js.map +1 -1
  20. package/dist/src/api/graphql-api/auth/auth.resolver.d.ts +3 -3
  21. package/dist/src/api/graphql-api/auth/auth.resolver.js +14 -11
  22. package/dist/src/api/graphql-api/auth/auth.resolver.js.map +1 -1
  23. package/dist/src/api/graphql-api/branch/branch.resolver.d.ts +72 -15
  24. package/dist/src/api/graphql-api/branch/branch.resolver.js +18 -23
  25. package/dist/src/api/graphql-api/branch/branch.resolver.js.map +1 -1
  26. package/dist/src/api/graphql-api/branch/parent-branch.resolver.d.ts +10 -4
  27. package/dist/src/api/graphql-api/branch/parent-branch.resolver.js +5 -6
  28. package/dist/src/api/graphql-api/branch/parent-branch.resolver.js.map +1 -1
  29. package/dist/src/api/graphql-api/configuration/configuration.resolver.d.ts +3 -3
  30. package/dist/src/api/graphql-api/configuration/configuration.resolver.js +5 -6
  31. package/dist/src/api/graphql-api/configuration/configuration.resolver.js.map +1 -1
  32. package/dist/src/api/graphql-api/draft/draft.resolver.d.ts +14 -13
  33. package/dist/src/api/graphql-api/draft/draft.resolver.js +31 -22
  34. package/dist/src/api/graphql-api/draft/draft.resolver.js.map +1 -1
  35. package/dist/src/api/graphql-api/draft/input/index.d.ts +1 -0
  36. package/dist/src/api/graphql-api/draft/input/index.js +1 -0
  37. package/dist/src/api/graphql-api/draft/input/index.js.map +1 -1
  38. package/dist/src/api/graphql-api/draft/input/remove-rows.input.d.ts +5 -0
  39. package/dist/src/api/graphql-api/draft/input/remove-rows.input.js +36 -0
  40. package/dist/src/api/graphql-api/draft/input/remove-rows.input.js.map +1 -0
  41. package/dist/src/api/graphql-api/draft/model/remove-rows-result.model.d.ts +7 -0
  42. package/dist/src/api/graphql-api/draft/model/remove-rows-result.model.js +34 -0
  43. package/dist/src/api/graphql-api/draft/model/remove-rows-result.model.js.map +1 -0
  44. package/dist/src/api/graphql-api/endpoint/endpoint.resolver.d.ts +13 -7
  45. package/dist/src/api/graphql-api/endpoint/endpoint.resolver.js +8 -12
  46. package/dist/src/api/graphql-api/endpoint/endpoint.resolver.js.map +1 -1
  47. package/dist/src/api/graphql-api/filters/graphql-validation-exception.filter.d.ts +6 -0
  48. package/dist/src/api/graphql-api/filters/graphql-validation-exception.filter.js +40 -0
  49. package/dist/src/api/graphql-api/filters/graphql-validation-exception.filter.js.map +1 -0
  50. package/dist/src/api/graphql-api/graphql-api.module.js +23 -3
  51. package/dist/src/api/graphql-api/graphql-api.module.js.map +1 -1
  52. package/dist/src/api/graphql-api/organization/organization.resolver.d.ts +15 -7
  53. package/dist/src/api/graphql-api/organization/organization.resolver.js +15 -14
  54. package/dist/src/api/graphql-api/organization/organization.resolver.js.map +1 -1
  55. package/dist/src/api/graphql-api/organization/users-organization.resolver.d.ts +10 -4
  56. package/dist/src/api/graphql-api/organization/users-organization.resolver.js +5 -6
  57. package/dist/src/api/graphql-api/organization/users-organization.resolver.js.map +1 -1
  58. package/dist/src/api/graphql-api/project/project.resolver.d.ts +20 -8
  59. package/dist/src/api/graphql-api/project/project.resolver.js +16 -17
  60. package/dist/src/api/graphql-api/project/project.resolver.js.map +1 -1
  61. package/dist/src/api/graphql-api/project/users-project.resolver.d.ts +10 -4
  62. package/dist/src/api/graphql-api/project/users-project.resolver.js +5 -6
  63. package/dist/src/api/graphql-api/project/users-project.resolver.js.map +1 -1
  64. package/dist/src/api/graphql-api/revision/child-branch.resolver.d.ts +10 -4
  65. package/dist/src/api/graphql-api/revision/child-branch.resolver.js +5 -6
  66. package/dist/src/api/graphql-api/revision/child-branch.resolver.js.map +1 -1
  67. package/dist/src/api/graphql-api/revision/revision.resolver.d.ts +28 -12
  68. package/dist/src/api/graphql-api/revision/revision.resolver.js +17 -23
  69. package/dist/src/api/graphql-api/revision/revision.resolver.js.map +1 -1
  70. package/dist/src/api/graphql-api/revision-changes/model/index.d.ts +1 -0
  71. package/dist/src/api/graphql-api/revision-changes/model/index.js +1 -0
  72. package/dist/src/api/graphql-api/revision-changes/model/index.js.map +1 -1
  73. package/dist/src/api/graphql-api/revision-changes/model/table-change.model.d.ts +2 -0
  74. package/dist/src/api/graphql-api/revision-changes/model/table-change.model.js +5 -0
  75. package/dist/src/api/graphql-api/revision-changes/model/table-change.model.js.map +1 -1
  76. package/dist/src/api/graphql-api/revision-changes/model/views-change.model.d.ts +15 -0
  77. package/dist/src/api/graphql-api/revision-changes/model/views-change.model.js +67 -0
  78. package/dist/src/api/graphql-api/revision-changes/model/views-change.model.js.map +1 -0
  79. package/dist/src/api/graphql-api/role/role.resolver.d.ts +4 -4
  80. package/dist/src/api/graphql-api/role/role.resolver.js +5 -6
  81. package/dist/src/api/graphql-api/role/role.resolver.js.map +1 -1
  82. package/dist/src/api/graphql-api/row/inputs/get-rows.input.d.ts +1 -0
  83. package/dist/src/api/graphql-api/row/inputs/get-rows.input.js +1 -0
  84. package/dist/src/api/graphql-api/row/inputs/get-rows.input.js.map +1 -1
  85. package/dist/src/api/graphql-api/row/resolver/search-rows.resolver.d.ts +4 -5
  86. package/dist/src/api/graphql-api/row/resolver/search-rows.resolver.js +6 -7
  87. package/dist/src/api/graphql-api/row/resolver/search-rows.resolver.js.map +1 -1
  88. package/dist/src/api/graphql-api/table/model/table.model.d.ts +2 -0
  89. package/dist/src/api/graphql-api/table/model/table.model.js +5 -0
  90. package/dist/src/api/graphql-api/table/model/table.model.js.map +1 -1
  91. package/dist/src/api/graphql-api/table/table.resolver.d.ts +22 -12
  92. package/dist/src/api/graphql-api/table/table.resolver.js +40 -24
  93. package/dist/src/api/graphql-api/table/table.resolver.js.map +1 -1
  94. package/dist/src/api/graphql-api/user/user.resolver.d.ts +13 -9
  95. package/dist/src/api/graphql-api/user/user.resolver.js +14 -19
  96. package/dist/src/api/graphql-api/user/user.resolver.js.map +1 -1
  97. package/dist/src/api/graphql-api/views/input/get-table-views.input.d.ts +4 -0
  98. package/dist/src/api/graphql-api/views/input/get-table-views.input.js +28 -0
  99. package/dist/src/api/graphql-api/views/input/get-table-views.input.js.map +1 -0
  100. package/dist/src/api/graphql-api/views/input/index.d.ts +2 -0
  101. package/dist/src/api/graphql-api/views/input/index.js +19 -0
  102. package/dist/src/api/graphql-api/views/input/index.js.map +1 -0
  103. package/dist/src/api/graphql-api/views/input/update-table-views.input.d.ts +28 -0
  104. package/dist/src/api/graphql-api/views/input/update-table-views.input.js +114 -0
  105. package/dist/src/api/graphql-api/views/input/update-table-views.input.js.map +1 -0
  106. package/dist/src/api/graphql-api/views/model/index.d.ts +4 -0
  107. package/dist/src/api/graphql-api/views/model/index.js +21 -0
  108. package/dist/src/api/graphql-api/views/model/index.js.map +1 -0
  109. package/dist/src/api/graphql-api/views/model/table-views-data.model.d.ts +6 -0
  110. package/dist/src/api/graphql-api/views/model/table-views-data.model.js +33 -0
  111. package/dist/src/api/graphql-api/views/model/table-views-data.model.js.map +1 -0
  112. package/dist/src/api/graphql-api/views/model/view-column.model.d.ts +4 -0
  113. package/dist/src/api/graphql-api/views/model/view-column.model.js +28 -0
  114. package/dist/src/api/graphql-api/views/model/view-column.model.js.map +1 -0
  115. package/dist/src/api/graphql-api/views/model/view-sort.model.d.ts +4 -0
  116. package/dist/src/api/graphql-api/views/model/view-sort.model.js +28 -0
  117. package/dist/src/api/graphql-api/views/model/view-sort.model.js.map +1 -0
  118. package/dist/src/api/graphql-api/views/model/view.model.d.ts +11 -0
  119. package/dist/src/api/graphql-api/views/model/view.model.js +51 -0
  120. package/dist/src/api/graphql-api/views/model/view.model.js.map +1 -0
  121. package/dist/src/api/graphql-api/views/views.resolver.d.ts +10 -0
  122. package/dist/src/api/graphql-api/views/views.resolver.js +77 -0
  123. package/dist/src/api/graphql-api/views/views.resolver.js.map +1 -0
  124. package/dist/src/api/mcp-api/mcp-server.service.d.ts +55 -0
  125. package/dist/src/api/mcp-api/mcp-server.service.js +202 -0
  126. package/dist/src/api/mcp-api/mcp-server.service.js.map +1 -0
  127. package/dist/src/api/mcp-api/mcp-session.service.d.ts +19 -0
  128. package/dist/src/api/mcp-api/mcp-session.service.js +57 -0
  129. package/dist/src/api/mcp-api/mcp-session.service.js.map +1 -0
  130. package/dist/src/api/mcp-api/mcp.controller.d.ts +10 -0
  131. package/dist/src/api/mcp-api/mcp.controller.js +130 -0
  132. package/dist/src/api/mcp-api/mcp.controller.js.map +1 -0
  133. package/dist/src/api/mcp-api/mcp.module.d.ts +2 -0
  134. package/dist/src/api/mcp-api/mcp.module.js +51 -0
  135. package/dist/src/api/mcp-api/mcp.module.js.map +1 -0
  136. package/dist/src/api/mcp-api/resources/file.resource.d.ts +8 -0
  137. package/dist/src/api/mcp-api/resources/file.resource.js +561 -0
  138. package/dist/src/api/mcp-api/resources/file.resource.js.map +1 -0
  139. package/dist/src/api/mcp-api/resources/index.d.ts +4 -0
  140. package/dist/src/api/mcp-api/resources/index.js +12 -0
  141. package/dist/src/api/mcp-api/resources/index.js.map +1 -0
  142. package/dist/src/api/mcp-api/resources/migration.resource.d.ts +6 -0
  143. package/dist/src/api/mcp-api/resources/migration.resource.js +165 -0
  144. package/dist/src/api/mcp-api/resources/migration.resource.js.map +1 -0
  145. package/dist/src/api/mcp-api/resources/query.resource.d.ts +6 -0
  146. package/dist/src/api/mcp-api/resources/query.resource.js +739 -0
  147. package/dist/src/api/mcp-api/resources/query.resource.js.map +1 -0
  148. package/dist/src/api/mcp-api/resources/schema.resource.d.ts +8 -0
  149. package/dist/src/api/mcp-api/resources/schema.resource.js +547 -0
  150. package/dist/src/api/mcp-api/resources/schema.resource.js.map +1 -0
  151. package/dist/src/api/mcp-api/tools/auth.tools.d.ts +12 -0
  152. package/dist/src/api/mcp-api/tools/auth.tools.js +182 -0
  153. package/dist/src/api/mcp-api/tools/auth.tools.js.map +1 -0
  154. package/dist/src/api/mcp-api/tools/branch.tools.d.ts +8 -0
  155. package/dist/src/api/mcp-api/tools/branch.tools.js +108 -0
  156. package/dist/src/api/mcp-api/tools/branch.tools.js.map +1 -0
  157. package/dist/src/api/mcp-api/tools/endpoint.tools.d.ts +14 -0
  158. package/dist/src/api/mcp-api/tools/endpoint.tools.js +354 -0
  159. package/dist/src/api/mcp-api/tools/endpoint.tools.js.map +1 -0
  160. package/dist/src/api/mcp-api/tools/file.tools.d.ts +8 -0
  161. package/dist/src/api/mcp-api/tools/file.tools.js +75 -0
  162. package/dist/src/api/mcp-api/tools/file.tools.js.map +1 -0
  163. package/dist/src/api/mcp-api/tools/index.d.ts +12 -0
  164. package/dist/src/api/mcp-api/tools/index.js +28 -0
  165. package/dist/src/api/mcp-api/tools/index.js.map +1 -0
  166. package/dist/src/api/mcp-api/tools/migration.tools.d.ts +10 -0
  167. package/dist/src/api/mcp-api/tools/migration.tools.js +67 -0
  168. package/dist/src/api/mcp-api/tools/migration.tools.js.map +1 -0
  169. package/dist/src/api/mcp-api/tools/organization.tools.d.ts +8 -0
  170. package/dist/src/api/mcp-api/tools/organization.tools.js +65 -0
  171. package/dist/src/api/mcp-api/tools/organization.tools.js.map +1 -0
  172. package/dist/src/api/mcp-api/tools/project.tools.d.ts +10 -0
  173. package/dist/src/api/mcp-api/tools/project.tools.js +121 -0
  174. package/dist/src/api/mcp-api/tools/project.tools.js.map +1 -0
  175. package/dist/src/api/mcp-api/tools/revision-changes.tools.d.ts +8 -0
  176. package/dist/src/api/mcp-api/tools/revision-changes.tools.js +114 -0
  177. package/dist/src/api/mcp-api/tools/revision-changes.tools.js.map +1 -0
  178. package/dist/src/api/mcp-api/tools/revision.tools.d.ts +10 -0
  179. package/dist/src/api/mcp-api/tools/revision.tools.js +65 -0
  180. package/dist/src/api/mcp-api/tools/revision.tools.js.map +1 -0
  181. package/dist/src/api/mcp-api/tools/row.tools.d.ts +10 -0
  182. package/dist/src/api/mcp-api/tools/row.tools.js +189 -0
  183. package/dist/src/api/mcp-api/tools/row.tools.js.map +1 -0
  184. package/dist/src/api/mcp-api/tools/table.tools.d.ts +10 -0
  185. package/dist/src/api/mcp-api/tools/table.tools.js +201 -0
  186. package/dist/src/api/mcp-api/tools/table.tools.js.map +1 -0
  187. package/dist/src/api/mcp-api/tools/user.tools.d.ts +8 -0
  188. package/dist/src/api/mcp-api/tools/user.tools.js +50 -0
  189. package/dist/src/api/mcp-api/tools/user.tools.js.map +1 -0
  190. package/dist/src/api/mcp-api/types.d.ts +25 -0
  191. package/dist/src/{features/draft/commands/types/remove-row.handler.types.js → api/mcp-api/types.js} +1 -1
  192. package/dist/src/api/mcp-api/types.js.map +1 -0
  193. package/dist/src/api/rest-api/auth/auth.controller.d.ts +7 -5
  194. package/dist/src/api/rest-api/auth/auth.controller.js +13 -9
  195. package/dist/src/api/rest-api/auth/auth.controller.js.map +1 -1
  196. package/dist/src/api/rest-api/auth/dto/update-password.dto.js +8 -2
  197. package/dist/src/api/rest-api/auth/dto/update-password.dto.js.map +1 -1
  198. package/dist/src/api/rest-api/branch/branch-by-name.controller.d.ts +13 -5
  199. package/dist/src/api/rest-api/branch/branch-by-name.controller.js +20 -24
  200. package/dist/src/api/rest-api/branch/branch-by-name.controller.js.map +1 -1
  201. package/dist/src/api/rest-api/configuration/configuration.controller.d.ts +3 -3
  202. package/dist/src/api/rest-api/configuration/configuration.controller.js +5 -6
  203. package/dist/src/api/rest-api/configuration/configuration.controller.js.map +1 -1
  204. package/dist/src/api/rest-api/endpoint/endpoint-by-id.controller.d.ts +1 -3
  205. package/dist/src/api/rest-api/endpoint/endpoint-by-id.controller.js +3 -7
  206. package/dist/src/api/rest-api/endpoint/endpoint-by-id.controller.js.map +1 -1
  207. package/dist/src/api/rest-api/organization/organization.controller.d.ts +6 -5
  208. package/dist/src/api/rest-api/organization/organization.controller.js +29 -21
  209. package/dist/src/api/rest-api/organization/organization.controller.js.map +1 -1
  210. package/dist/src/api/rest-api/project/project.controller.d.ts +13 -7
  211. package/dist/src/api/rest-api/project/project.controller.js +36 -22
  212. package/dist/src/api/rest-api/project/project.controller.js.map +1 -1
  213. package/dist/src/api/rest-api/rest-api.module.js +12 -2
  214. package/dist/src/api/rest-api/rest-api.module.js.map +1 -1
  215. package/dist/src/api/rest-api/revision/revision-by-id.controller.d.ts +9 -8
  216. package/dist/src/api/rest-api/revision/revision-by-id.controller.js +25 -29
  217. package/dist/src/api/rest-api/revision/revision-by-id.controller.js.map +1 -1
  218. package/dist/src/api/rest-api/row/row-by-id.controller.d.ts +3 -3
  219. package/dist/src/api/rest-api/row/row-by-id.controller.js +17 -18
  220. package/dist/src/api/rest-api/row/row-by-id.controller.js.map +1 -1
  221. package/dist/src/api/rest-api/share/utils/transformFromPrismaToRevisionModel.d.ts +2 -1
  222. package/dist/src/api/rest-api/share/utils/transformFromPrismaToRevisionModel.js +8 -5
  223. package/dist/src/api/rest-api/share/utils/transformFromPrismaToRevisionModel.js.map +1 -1
  224. package/dist/src/api/rest-api/table/dto/index.d.ts +1 -0
  225. package/dist/src/api/rest-api/table/dto/index.js +1 -0
  226. package/dist/src/api/rest-api/table/dto/index.js.map +1 -1
  227. package/dist/src/api/rest-api/table/dto/remove-rows.dto.d.ts +3 -0
  228. package/dist/src/api/rest-api/table/dto/remove-rows.dto.js +25 -0
  229. package/dist/src/api/rest-api/table/dto/remove-rows.dto.js.map +1 -0
  230. package/dist/src/api/rest-api/table/model/index.d.ts +1 -0
  231. package/dist/src/api/rest-api/table/model/index.js +1 -0
  232. package/dist/src/api/rest-api/table/model/index.js.map +1 -1
  233. package/dist/src/api/rest-api/table/model/remove-rows.response.d.ts +7 -0
  234. package/dist/src/api/rest-api/table/model/remove-rows.response.js +31 -0
  235. package/dist/src/api/rest-api/table/model/remove-rows.response.js.map +1 -0
  236. package/dist/src/api/rest-api/table/table-by-id.controller.d.ts +12 -10
  237. package/dist/src/api/rest-api/table/table-by-id.controller.js +73 -27
  238. package/dist/src/api/rest-api/table/table-by-id.controller.js.map +1 -1
  239. package/dist/src/api/rest-api/user/user.controller.d.ts +4 -5
  240. package/dist/src/api/rest-api/user/user.controller.js +5 -6
  241. package/dist/src/api/rest-api/user/user.controller.js.map +1 -1
  242. package/dist/src/core/core.module.js +2 -0
  243. package/dist/src/core/core.module.js.map +1 -1
  244. package/dist/src/features/auth/auth.module.js +7 -1
  245. package/dist/src/features/auth/auth.module.js.map +1 -1
  246. package/dist/src/features/auth/commands/auth-api.service.d.ts +7 -1
  247. package/dist/src/features/auth/commands/auth-api.service.js +18 -0
  248. package/dist/src/features/auth/commands/auth-api.service.js.map +1 -1
  249. package/dist/src/features/auth/commands/impl/confirm-email-code.command.d.ts +1 -0
  250. package/dist/src/features/auth/commands/impl/create-user.command.d.ts +1 -0
  251. package/dist/src/features/auth/commands/impl/login-github.command.d.ts +1 -0
  252. package/dist/src/features/auth/commands/impl/login-google.command.d.ts +1 -0
  253. package/dist/src/features/auth/commands/impl/login.command.d.ts +1 -0
  254. package/dist/src/features/auth/commands/impl/sign-up.command.d.ts +1 -0
  255. package/dist/src/features/auth/guards/base-persmission.guard.d.ts +1 -3
  256. package/dist/src/features/auth/guards/base-persmission.guard.js +1 -4
  257. package/dist/src/features/auth/guards/base-persmission.guard.js.map +1 -1
  258. package/dist/src/features/branch/branch-api.service.d.ts +85 -0
  259. package/dist/src/features/branch/branch-api.service.js +66 -0
  260. package/dist/src/features/branch/branch-api.service.js.map +1 -0
  261. package/dist/src/features/branch/branch.module.js +7 -1
  262. package/dist/src/features/branch/branch.module.js.map +1 -1
  263. package/dist/src/features/branch/commands/impl/api-create-branch-by-revision-id.command.d.ts +1 -0
  264. package/dist/src/features/branch/quieries/impl/get-branch-by-id.query.d.ts +3 -0
  265. package/dist/src/features/branch/quieries/impl/get-branch-by-id.query.js.map +1 -1
  266. package/dist/src/features/branch/quieries/impl/get-branch.query.d.ts +1 -0
  267. package/dist/src/features/branch/quieries/impl/get-revisions-by-branch-id.query.d.ts +3 -0
  268. package/dist/src/features/branch/quieries/impl/get-revisions-by-branch-id.query.js.map +1 -1
  269. package/dist/src/features/branch/quieries/impl/resolve-parent-branch-by-branch.query.d.ts +1 -0
  270. package/dist/src/features/draft/commands/handlers/__tests__/utils.d.ts +2 -0
  271. package/dist/src/features/draft/commands/handlers/__tests__/utils.js +7 -0
  272. package/dist/src/features/draft/commands/handlers/__tests__/utils.js.map +1 -1
  273. package/dist/src/features/draft/commands/handlers/api-create-revision.handler.js +1 -1
  274. package/dist/src/features/draft/commands/handlers/api-create-revision.handler.js.map +1 -1
  275. package/dist/src/features/draft/commands/handlers/api-create-row.handler.js +1 -1
  276. package/dist/src/features/draft/commands/handlers/api-create-row.handler.js.map +1 -1
  277. package/dist/src/features/draft/commands/handlers/api-create-table.handler.js +1 -1
  278. package/dist/src/features/draft/commands/handlers/api-create-table.handler.js.map +1 -1
  279. package/dist/src/features/draft/commands/handlers/api-patch-row.handler.js +1 -1
  280. package/dist/src/features/draft/commands/handlers/api-patch-row.handler.js.map +1 -1
  281. package/dist/src/features/draft/commands/handlers/api-remove-row.handler.js +3 -2
  282. package/dist/src/features/draft/commands/handlers/api-remove-row.handler.js.map +1 -1
  283. package/dist/src/features/draft/commands/handlers/api-remove-rows.handler.d.ts +13 -0
  284. package/dist/src/features/draft/commands/handlers/api-remove-rows.handler.js +59 -0
  285. package/dist/src/features/draft/commands/handlers/api-remove-rows.handler.js.map +1 -0
  286. package/dist/src/features/draft/commands/handlers/api-remove-table.handler.js +1 -1
  287. package/dist/src/features/draft/commands/handlers/api-remove-table.handler.js.map +1 -1
  288. package/dist/src/features/draft/commands/handlers/api-rename-row.handler.js +1 -1
  289. package/dist/src/features/draft/commands/handlers/api-rename-row.handler.js.map +1 -1
  290. package/dist/src/features/draft/commands/handlers/api-rename-table.handler.js +1 -1
  291. package/dist/src/features/draft/commands/handlers/api-rename-table.handler.js.map +1 -1
  292. package/dist/src/features/draft/commands/handlers/api-revert-changes.handler.js +1 -1
  293. package/dist/src/features/draft/commands/handlers/api-revert-changes.handler.js.map +1 -1
  294. package/dist/src/features/draft/commands/handlers/api-update-row.handler.js +1 -1
  295. package/dist/src/features/draft/commands/handlers/api-update-row.handler.js.map +1 -1
  296. package/dist/src/features/draft/commands/handlers/api-update-table.handler.js +1 -1
  297. package/dist/src/features/draft/commands/handlers/api-update-table.handler.js.map +1 -1
  298. package/dist/src/features/draft/commands/handlers/api-upload-file.handler.js +1 -1
  299. package/dist/src/features/draft/commands/handlers/api-upload-file.handler.js.map +1 -1
  300. package/dist/src/features/draft/commands/handlers/create-table.handler.d.ts +4 -1
  301. package/dist/src/features/draft/commands/handlers/create-table.handler.js +21 -2
  302. package/dist/src/features/draft/commands/handlers/create-table.handler.js.map +1 -1
  303. package/dist/src/features/draft/commands/handlers/index.d.ts +3 -2
  304. package/dist/src/features/draft/commands/handlers/index.js +4 -2
  305. package/dist/src/features/draft/commands/handlers/index.js.map +1 -1
  306. package/dist/src/features/draft/commands/handlers/patch-row.handler.js +11 -1
  307. package/dist/src/features/draft/commands/handlers/patch-row.handler.js.map +1 -1
  308. package/dist/src/features/draft/commands/handlers/{remove-row.handler.d.ts → remove-rows.handler.d.ts} +7 -9
  309. package/dist/src/features/draft/commands/handlers/{remove-row.handler.js → remove-rows.handler.js} +30 -29
  310. package/dist/src/features/draft/commands/handlers/remove-rows.handler.js.map +1 -0
  311. package/dist/src/features/draft/commands/handlers/remove-table.handler.d.ts +1 -0
  312. package/dist/src/features/draft/commands/handlers/remove-table.handler.js +16 -3
  313. package/dist/src/features/draft/commands/handlers/remove-table.handler.js.map +1 -1
  314. package/dist/src/features/draft/commands/handlers/transactional/rename-schema.handler.d.ts +1 -0
  315. package/dist/src/features/draft/commands/handlers/transactional/rename-schema.handler.js +13 -0
  316. package/dist/src/features/draft/commands/handlers/transactional/rename-schema.handler.js.map +1 -1
  317. package/dist/src/features/draft/commands/handlers/transactional/validate-data.handler.d.ts +16 -5
  318. package/dist/src/features/draft/commands/handlers/transactional/validate-data.handler.js +142 -21
  319. package/dist/src/features/draft/commands/handlers/transactional/validate-data.handler.js.map +1 -1
  320. package/dist/src/features/draft/commands/handlers/update-table.handler.d.ts +5 -1
  321. package/dist/src/features/draft/commands/handlers/update-table.handler.js +60 -2
  322. package/dist/src/features/draft/commands/handlers/update-table.handler.js.map +1 -1
  323. package/dist/src/features/draft/commands/impl/api-create-revision.command.d.ts +1 -0
  324. package/dist/src/features/draft/commands/impl/api-create-row.command.d.ts +1 -0
  325. package/dist/src/features/draft/commands/impl/api-remove-row.command.d.ts +1 -0
  326. package/dist/src/features/draft/commands/impl/api-remove-rows.command.d.ts +13 -0
  327. package/dist/src/features/draft/commands/impl/api-remove-rows.command.js +10 -0
  328. package/dist/src/features/draft/commands/impl/api-remove-rows.command.js.map +1 -0
  329. package/dist/src/features/draft/commands/impl/api-rename-row.command.d.ts +1 -0
  330. package/dist/src/features/draft/commands/impl/api-revert-changes.command.d.ts +1 -0
  331. package/dist/src/features/draft/commands/impl/api-update-row.command.d.ts +1 -0
  332. package/dist/src/features/draft/commands/impl/{remove-row.command.d.ts → remove-rows.command.d.ts} +4 -4
  333. package/dist/src/features/draft/commands/impl/remove-rows.command.js +10 -0
  334. package/dist/src/features/draft/commands/impl/remove-rows.command.js.map +1 -0
  335. package/dist/src/features/draft/commands/types/api-remove-rows.handler.types.d.ts +7 -0
  336. package/dist/src/features/draft/commands/types/api-remove-rows.handler.types.js +3 -0
  337. package/dist/src/features/draft/commands/types/api-remove-rows.handler.types.js.map +1 -0
  338. package/dist/src/features/draft/commands/types/{remove-row.handler.types.d.ts → remove-rows.handler.types.d.ts} +1 -1
  339. package/dist/src/features/draft/commands/types/remove-rows.handler.types.js +3 -0
  340. package/dist/src/features/draft/commands/types/remove-rows.handler.types.js.map +1 -0
  341. package/dist/src/features/draft/draft-api.service.d.ts +31 -0
  342. package/dist/src/features/draft/draft-api.service.js +32 -0
  343. package/dist/src/features/draft/draft-api.service.js.map +1 -1
  344. package/dist/src/features/draft/draft.module.js +1 -1
  345. package/dist/src/features/draft/draft.module.js.map +1 -1
  346. package/dist/src/features/endpoint/commands/impl/api-create-endpoint.command.d.ts +3 -1
  347. package/dist/src/features/endpoint/commands/impl/delete-endpoint.command.d.ts +1 -0
  348. package/dist/src/features/endpoint/queries/endpoint-api.service.d.ts +16 -3
  349. package/dist/src/features/endpoint/queries/endpoint-api.service.js +19 -4
  350. package/dist/src/features/endpoint/queries/endpoint-api.service.js.map +1 -1
  351. package/dist/src/features/organization/commands/impl/add-user-to-organization.command.d.ts +1 -0
  352. package/dist/src/features/organization/commands/impl/remove-user-from-organization.command.d.ts +1 -0
  353. package/dist/src/features/organization/organization-api.service.d.ts +9 -3
  354. package/dist/src/features/organization/organization-api.service.js +19 -4
  355. package/dist/src/features/organization/organization-api.service.js.map +1 -1
  356. package/dist/src/features/organization/queries/handlers/get-projects-by-organization-id.handler.js +3 -2
  357. package/dist/src/features/organization/queries/handlers/get-projects-by-organization-id.handler.js.map +1 -1
  358. package/dist/src/features/organization/queries/impl/get-users-organization.query.d.ts +1 -0
  359. package/dist/src/features/plugin/plugin.list.service.js +1 -9
  360. package/dist/src/features/plugin/plugin.list.service.js.map +1 -1
  361. package/dist/src/features/project/commands/impl/add-user-to-project.command.d.ts +1 -0
  362. package/dist/src/features/project/commands/impl/api-create-project.command.d.ts +1 -0
  363. package/dist/src/features/project/commands/impl/remove-user-from-project.command.d.ts +1 -0
  364. package/dist/src/features/project/commands/impl/update-project.command.d.ts +2 -0
  365. package/dist/src/features/project/commands/impl/update-user-project-role.command.d.ts +1 -0
  366. package/dist/src/features/project/project-api.service.d.ts +38 -0
  367. package/dist/src/features/project/project-api.service.js +59 -0
  368. package/dist/src/features/project/project-api.service.js.map +1 -0
  369. package/dist/src/features/project/project.module.js +3 -0
  370. package/dist/src/features/project/project.module.js.map +1 -1
  371. package/dist/src/features/project/queries/impl/get-all-branches-by-project.query.d.ts +4 -0
  372. package/dist/src/features/project/queries/impl/get-all-branches-by-project.query.js.map +1 -1
  373. package/dist/src/features/project/queries/impl/get-root-branch-by-project.query.d.ts +3 -0
  374. package/dist/src/features/project/queries/impl/get-root-branch-by-project.query.js.map +1 -1
  375. package/dist/src/features/project/queries/impl/get-users-project.query.d.ts +1 -0
  376. package/dist/src/features/revision/internal-revisions-api.service.d.ts +14 -1
  377. package/dist/src/features/revision/internal-revisions-api.service.js +21 -0
  378. package/dist/src/features/revision/internal-revisions-api.service.js.map +1 -1
  379. package/dist/src/features/revision/queries/impl/get-children-by-revision.query.d.ts +3 -0
  380. package/dist/src/features/revision/queries/impl/get-children-by-revision.query.js.map +1 -1
  381. package/dist/src/features/revision/queries/impl/get-endpoints-by-revision-id.query.d.ts +3 -0
  382. package/dist/src/features/revision/queries/impl/get-endpoints-by-revision-id.query.js.map +1 -1
  383. package/dist/src/features/revision/queries/impl/get-tables-by-revision-id.query.d.ts +3 -0
  384. package/dist/src/features/revision/queries/impl/get-tables-by-revision-id.query.js.map +1 -1
  385. package/dist/src/features/revision/queries/impl/index.d.ts +1 -0
  386. package/dist/src/features/revision/queries/impl/index.js +1 -0
  387. package/dist/src/features/revision/queries/impl/index.js.map +1 -1
  388. package/dist/src/features/revision/queries/impl/resolve-branch-by-revision.query.d.ts +3 -0
  389. package/dist/src/features/revision/queries/impl/resolve-branch-by-revision.query.js.map +1 -1
  390. package/dist/src/features/revision/queries/impl/resolve-child-branches-by-revision.query.d.ts +9 -0
  391. package/dist/src/features/revision/queries/impl/resolve-child-by-revision.query.d.ts +3 -0
  392. package/dist/src/features/revision/queries/impl/resolve-child-by-revision.query.js.map +1 -1
  393. package/dist/src/features/revision/queries/impl/resolve-parent-by-revision.query.d.ts +3 -0
  394. package/dist/src/features/revision/queries/impl/resolve-parent-by-revision.query.js.map +1 -1
  395. package/dist/src/features/revision/revisions-api.service.d.ts +14 -1
  396. package/dist/src/features/revision/revisions-api.service.js +21 -0
  397. package/dist/src/features/revision/revisions-api.service.js.map +1 -1
  398. package/dist/src/features/revision-changes/mappers/table-change.mapper.d.ts +2 -2
  399. package/dist/src/features/revision-changes/mappers/table-change.mapper.js +2 -1
  400. package/dist/src/features/revision-changes/mappers/table-change.mapper.js.map +1 -1
  401. package/dist/src/features/revision-changes/queries/handlers/get-row-changes.handler.d.ts +2 -1
  402. package/dist/src/features/revision-changes/queries/handlers/get-row-changes.handler.js +51 -15
  403. package/dist/src/features/revision-changes/queries/handlers/get-row-changes.handler.js.map +1 -1
  404. package/dist/src/features/revision-changes/queries/handlers/get-table-changes.handler.d.ts +3 -1
  405. package/dist/src/features/revision-changes/queries/handlers/get-table-changes.handler.js +10 -4
  406. package/dist/src/features/revision-changes/queries/handlers/get-table-changes.handler.js.map +1 -1
  407. package/dist/src/features/revision-changes/revision-changes.module.js +1 -0
  408. package/dist/src/features/revision-changes/revision-changes.module.js.map +1 -1
  409. package/dist/src/features/revision-changes/services/index.d.ts +1 -0
  410. package/dist/src/features/revision-changes/services/index.js +1 -0
  411. package/dist/src/features/revision-changes/services/index.js.map +1 -1
  412. package/dist/src/features/revision-changes/services/row-diff.service.js +1 -1
  413. package/dist/src/features/revision-changes/services/row-diff.service.js.map +1 -1
  414. package/dist/src/features/revision-changes/services/views-comparison.service.d.ts +12 -0
  415. package/dist/src/features/revision-changes/services/views-comparison.service.js +209 -0
  416. package/dist/src/features/revision-changes/services/views-comparison.service.js.map +1 -0
  417. package/dist/src/features/revision-changes/types/index.d.ts +1 -0
  418. package/dist/src/features/revision-changes/types/index.js +1 -0
  419. package/dist/src/features/revision-changes/types/index.js.map +1 -1
  420. package/dist/src/features/revision-changes/types/table-change.types.d.ts +2 -0
  421. package/dist/src/features/revision-changes/types/views-change.types.d.ts +15 -0
  422. package/dist/src/features/revision-changes/types/views-change.types.js +3 -0
  423. package/dist/src/features/revision-changes/types/views-change.types.js.map +1 -0
  424. package/dist/src/features/role/role-api.service.d.ts +8 -1
  425. package/dist/src/features/role/role-api.service.js +3 -0
  426. package/dist/src/features/role/role-api.service.js.map +1 -1
  427. package/dist/src/features/row/internal-row-api.service.d.ts +2 -1
  428. package/dist/src/features/row/internal-row-api.service.js +3 -0
  429. package/dist/src/features/row/internal-row-api.service.js.map +1 -1
  430. package/dist/src/features/row/queries/handlers/get-rows.handler.d.ts +4 -1
  431. package/dist/src/features/row/queries/handlers/get-rows.handler.js +18 -4
  432. package/dist/src/features/row/queries/handlers/get-rows.handler.js.map +1 -1
  433. package/dist/src/features/row/row-api.service.d.ts +2 -1
  434. package/dist/src/features/row/row-api.service.js +3 -0
  435. package/dist/src/features/row/row-api.service.js.map +1 -1
  436. package/dist/src/features/row/row.module.js +8 -2
  437. package/dist/src/features/row/row.module.js.map +1 -1
  438. package/dist/src/features/row/services/index.d.ts +1 -0
  439. package/dist/src/features/row/services/index.js +6 -0
  440. package/dist/src/features/row/services/index.js.map +1 -0
  441. package/dist/src/features/row/services/system-column-mapping.service.d.ts +17 -0
  442. package/dist/src/features/row/services/system-column-mapping.service.js +148 -0
  443. package/dist/src/features/row/services/system-column-mapping.service.js.map +1 -0
  444. package/dist/src/features/row/utils/extract-matches-fallback.js +4 -6
  445. package/dist/src/features/row/utils/extract-matches-fallback.js.map +1 -1
  446. package/dist/src/features/row/utils/get-rows-sql.js +2 -2
  447. package/dist/src/features/share/exceptions/index.d.ts +1 -0
  448. package/dist/src/features/share/exceptions/index.js +18 -0
  449. package/dist/src/features/share/exceptions/index.js.map +1 -0
  450. package/dist/src/features/share/exceptions/validation.exception.d.ts +46 -0
  451. package/dist/src/features/share/exceptions/validation.exception.js +100 -0
  452. package/dist/src/features/share/exceptions/validation.exception.js.map +1 -0
  453. package/dist/src/features/share/foreign-keys.service.d.ts +1 -0
  454. package/dist/src/features/share/foreign-keys.service.js +29 -0
  455. package/dist/src/features/share/foreign-keys.service.js.map +1 -1
  456. package/dist/src/features/share/queries/handlers/index.d.ts +2 -1
  457. package/dist/src/features/share/queries/handlers/index.js +2 -0
  458. package/dist/src/features/share/queries/handlers/index.js.map +1 -1
  459. package/dist/src/features/share/queries/handlers/transactional/find-rows-in-table.handler.d.ts +10 -0
  460. package/dist/src/features/share/queries/handlers/transactional/find-rows-in-table.handler.js +41 -0
  461. package/dist/src/features/share/queries/handlers/transactional/find-rows-in-table.handler.js.map +1 -0
  462. package/dist/src/features/share/queries/handlers/transactional/get-table-schema.handler.js +1 -1
  463. package/dist/src/features/share/queries/handlers/transactional/get-table-schema.handler.js.map +1 -1
  464. package/dist/src/features/share/queries/impl/index.d.ts +1 -0
  465. package/dist/src/features/share/queries/impl/index.js +1 -0
  466. package/dist/src/features/share/queries/impl/index.js.map +1 -1
  467. package/dist/src/features/share/queries/impl/transactional/find-rows-in-table.query.d.ts +10 -0
  468. package/dist/src/features/share/queries/impl/transactional/find-rows-in-table.query.js +10 -0
  469. package/dist/src/features/share/queries/impl/transactional/find-rows-in-table.query.js.map +1 -0
  470. package/dist/src/features/share/schema/table-views-schema.d.ts +2 -0
  471. package/dist/src/features/share/schema/table-views-schema.js +125 -0
  472. package/dist/src/features/share/schema/table-views-schema.js.map +1 -0
  473. package/dist/src/features/share/share.module.js +6 -0
  474. package/dist/src/features/share/share.module.js.map +1 -1
  475. package/dist/src/features/share/share.transactional.queries.d.ts +5 -0
  476. package/dist/src/features/share/share.transactional.queries.js +29 -0
  477. package/dist/src/features/share/share.transactional.queries.js.map +1 -1
  478. package/dist/src/features/share/system-tables.consts.d.ts +2 -1
  479. package/dist/src/features/share/system-tables.consts.js +6 -0
  480. package/dist/src/features/share/system-tables.consts.js.map +1 -1
  481. package/dist/src/features/share/system-tables.service.d.ts +17 -0
  482. package/dist/src/features/share/system-tables.service.js +92 -0
  483. package/dist/src/features/share/system-tables.service.js.map +1 -0
  484. package/dist/src/features/share/utils/validateUrlLikeId/validateJsonFieldName.d.ts +1 -1
  485. package/dist/src/features/share/utils/validateUrlLikeId/validateJsonFieldName.js +2 -2
  486. package/dist/src/features/share/utils/validateUrlLikeId/validateJsonFieldName.js.map +1 -1
  487. package/dist/src/features/share/views-migration.service.d.ts +47 -0
  488. package/dist/src/features/share/views-migration.service.js +222 -0
  489. package/dist/src/features/share/views-migration.service.js.map +1 -0
  490. package/dist/src/features/table/queries/impl/get-count-rows-in-table.query.d.ts +2 -0
  491. package/dist/src/features/table/queries/impl/get-table.query.d.ts +3 -0
  492. package/dist/src/features/table/queries/impl/get-table.query.js.map +1 -1
  493. package/dist/src/features/table/queries/impl/get-tables.query.d.ts +3 -0
  494. package/dist/src/features/table/queries/impl/get-tables.query.js.map +1 -1
  495. package/dist/src/features/table/queries/impl/index.d.ts +2 -0
  496. package/dist/src/features/table/queries/impl/index.js +2 -0
  497. package/dist/src/features/table/queries/impl/index.js.map +1 -1
  498. package/dist/src/features/table/queries/impl/resolve-table-count-foreign-keys-by.query.d.ts +2 -0
  499. package/dist/src/features/table/queries/impl/resolve-table-count-foreign-keys-to.query.d.ts +2 -0
  500. package/dist/src/features/table/queries/impl/resolve-table-foreign-keys-by.query.d.ts +4 -0
  501. package/dist/src/features/table/queries/impl/resolve-table-foreign-keys-by.query.js.map +1 -1
  502. package/dist/src/features/table/queries/impl/resolve-table-foreign-keys-to.query.d.ts +4 -0
  503. package/dist/src/features/table/queries/impl/resolve-table-foreign-keys-to.query.js.map +1 -1
  504. package/dist/src/features/table/queries/impl/resolve-table-schema.query.d.ts +3 -0
  505. package/dist/src/features/table/queries/impl/resolve-table-schema.query.js.map +1 -1
  506. package/dist/src/features/table/table-api.service.d.ts +22 -0
  507. package/dist/src/features/table/table-api.service.js +50 -0
  508. package/dist/src/features/table/table-api.service.js.map +1 -0
  509. package/dist/src/features/table/table.module.js +3 -1
  510. package/dist/src/features/table/table.module.js.map +1 -1
  511. package/dist/src/features/user/commands/impl/set-username.command.d.ts +1 -0
  512. package/dist/src/features/user/commands/impl/update-password.command.d.ts +1 -0
  513. package/dist/src/features/user/queries/handlers/get-projects-by-user-id.handler.js +1 -2
  514. package/dist/src/features/user/queries/handlers/get-projects-by-user-id.handler.js.map +1 -1
  515. package/dist/src/features/user/queries/impl/get-projects-by-user-id.query.d.ts +1 -0
  516. package/dist/src/features/user/queries/impl/get-user.query.d.ts +1 -0
  517. package/dist/src/features/user/queries/impl/search-users.query.d.ts +1 -0
  518. package/dist/src/features/user/user-api.service.d.ts +10 -3
  519. package/dist/src/features/user/user-api.service.js +24 -6
  520. package/dist/src/features/user/user-api.service.js.map +1 -1
  521. package/dist/src/features/views/commands/handlers/index.d.ts +3 -0
  522. package/dist/src/features/views/commands/handlers/index.js +21 -0
  523. package/dist/src/features/views/commands/handlers/index.js.map +1 -0
  524. package/dist/src/features/views/commands/handlers/update-table-views.handler.d.ts +25 -0
  525. package/dist/src/features/views/commands/handlers/update-table-views.handler.js +125 -0
  526. package/dist/src/features/views/commands/handlers/update-table-views.handler.js.map +1 -0
  527. package/dist/src/features/views/commands/impl/index.d.ts +1 -0
  528. package/dist/src/features/views/commands/impl/index.js +18 -0
  529. package/dist/src/features/views/commands/impl/index.js.map +1 -0
  530. package/dist/src/features/views/commands/impl/update-table-views.command.d.ts +11 -0
  531. package/dist/src/features/views/commands/impl/update-table-views.command.js +10 -0
  532. package/dist/src/features/views/commands/impl/update-table-views.command.js.map +1 -0
  533. package/dist/src/features/views/index.d.ts +6 -0
  534. package/dist/src/features/views/index.js +23 -0
  535. package/dist/src/features/views/index.js.map +1 -0
  536. package/dist/src/features/views/queries/handlers/get-table-views.handler.d.ts +13 -0
  537. package/dist/src/features/views/queries/handlers/get-table-views.handler.js +72 -0
  538. package/dist/src/features/views/queries/handlers/get-table-views.handler.js.map +1 -0
  539. package/dist/src/features/views/queries/handlers/index.d.ts +3 -0
  540. package/dist/src/features/views/queries/handlers/index.js +21 -0
  541. package/dist/src/features/views/queries/handlers/index.js.map +1 -0
  542. package/dist/src/features/views/queries/impl/get-table-views.query.d.ts +10 -0
  543. package/dist/src/features/views/queries/impl/get-table-views.query.js +10 -0
  544. package/dist/src/features/views/queries/impl/get-table-views.query.js.map +1 -0
  545. package/dist/src/features/views/queries/impl/index.d.ts +1 -0
  546. package/dist/src/features/views/queries/impl/index.js +18 -0
  547. package/dist/src/features/views/queries/impl/index.js.map +1 -0
  548. package/dist/src/features/views/services/index.d.ts +1 -0
  549. package/dist/src/features/views/services/index.js +18 -0
  550. package/dist/src/features/views/services/index.js.map +1 -0
  551. package/dist/src/features/views/services/view-validation.service.d.ts +13 -0
  552. package/dist/src/features/views/services/view-validation.service.js +106 -0
  553. package/dist/src/features/views/services/view-validation.service.js.map +1 -0
  554. package/dist/src/features/views/types/index.d.ts +1 -0
  555. package/dist/src/features/views/types/index.js +18 -0
  556. package/dist/src/features/views/types/index.js.map +1 -0
  557. package/dist/src/features/views/types/views.types.d.ts +34 -0
  558. package/dist/src/features/views/types/views.types.js +6 -0
  559. package/dist/src/features/views/types/views.types.js.map +1 -0
  560. package/dist/src/features/views/views-api.service.d.ts +12 -0
  561. package/dist/src/features/views/views-api.service.js +38 -0
  562. package/dist/src/features/views/views-api.service.js.map +1 -0
  563. package/dist/src/features/views/views.module.d.ts +2 -0
  564. package/dist/src/features/views/views.module.js +34 -0
  565. package/dist/src/features/views/views.module.js.map +1 -0
  566. package/dist/src/infrastructure/admin/admin.module.js +7 -2
  567. package/dist/src/infrastructure/admin/admin.module.js.map +1 -1
  568. package/dist/src/infrastructure/cache/events/index.d.ts +1 -0
  569. package/dist/src/infrastructure/cache/events/index.js +1 -0
  570. package/dist/src/infrastructure/cache/events/index.js.map +1 -1
  571. package/dist/src/infrastructure/cache/events/row/rows-deleted.event.d.ts +7 -0
  572. package/dist/src/infrastructure/cache/events/row/rows-deleted.event.js +14 -0
  573. package/dist/src/infrastructure/cache/events/row/rows-deleted.event.js.map +1 -0
  574. package/dist/src/infrastructure/cache/handlers/index.d.ts +2 -1
  575. package/dist/src/infrastructure/cache/handlers/index.js +2 -0
  576. package/dist/src/infrastructure/cache/handlers/index.js.map +1 -1
  577. package/dist/src/infrastructure/cache/handlers/row/rows-deleted.handler.d.ts +8 -0
  578. package/dist/src/infrastructure/cache/handlers/row/rows-deleted.handler.js +30 -0
  579. package/dist/src/infrastructure/cache/handlers/row/rows-deleted.handler.js.map +1 -0
  580. package/dist/src/infrastructure/cache/pg-bus/pg-bus.driver.js +1 -1
  581. package/dist/src/infrastructure/cache/pg-bus/pg-bus.driver.js.map +1 -1
  582. package/dist/src/infrastructure/cache/services/row-cache.service.d.ts +5 -0
  583. package/dist/src/infrastructure/cache/services/row-cache.service.js +5 -0
  584. package/dist/src/infrastructure/cache/services/row-cache.service.js.map +1 -1
  585. package/dist/src/infrastructure/configuration/configuration-api.service.d.ts +7 -0
  586. package/dist/src/infrastructure/configuration/configuration-api.service.js +29 -0
  587. package/dist/src/infrastructure/configuration/configuration-api.service.js.map +1 -0
  588. package/dist/src/infrastructure/configuration/configuration.module.js +5 -2
  589. package/dist/src/infrastructure/configuration/configuration.module.js.map +1 -1
  590. package/dist/src/infrastructure/database/transaction-prisma.service.d.ts +28 -7
  591. package/dist/src/infrastructure/database/transaction-prisma.service.js +169 -5
  592. package/dist/src/infrastructure/database/transaction-prisma.service.js.map +1 -1
  593. package/dist/src/infrastructure/email/templates.service.js +2 -2
  594. package/dist/src/infrastructure/email/templates.service.js.map +1 -1
  595. package/dist/src/main.js +5 -0
  596. package/dist/src/main.js.map +1 -1
  597. package/dist/tsconfig.build.tsbuildinfo +1 -1
  598. package/package.json +4 -1
  599. package/dist/src/features/draft/commands/handlers/remove-row.handler.js.map +0 -1
  600. package/dist/src/features/draft/commands/impl/remove-row.command.js +0 -10
  601. package/dist/src/features/draft/commands/impl/remove-row.command.js.map +0 -1
  602. package/dist/src/features/draft/commands/types/remove-row.handler.types.js.map +0 -1
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revisium/core",
3
- "version": "2.5.0-alpha.7",
3
+ "version": "2.5.0-alpha.8",
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",
@@ -50,6 +50,7 @@
50
50
  "@aws-sdk/client-s3": "^3.816.0",
51
51
  "@aws-sdk/s3-request-presigner": "^3.816.0",
52
52
  "@casl/ability": "^6.7.3",
53
+ "@modelcontextprotocol/sdk": "^1.24.0",
53
54
  "@nestjs/apollo": "^13.2.1",
54
55
  "@nestjs/cache-manager": "^3.0.1",
55
56
  "@nestjs/common": "^11.1.3",
@@ -76,6 +77,7 @@
76
77
  "cache-manager": "^6.4.3",
77
78
  "class-transformer": "^0.5.1",
78
79
  "class-validator": "^0.14.2",
80
+ "compression": "^1.8.1",
79
81
  "dotenv": "^17.2.3",
80
82
  "fast-json-patch": "^3.1.1",
81
83
  "graphql": "^16.12.0",
@@ -100,6 +102,7 @@
100
102
  "@nestjs/schematics": "^11.0.5",
101
103
  "@nestjs/testing": "^11.1.1",
102
104
  "@types/bcrypt": "^5.0.2",
105
+ "@types/compression": "^1.8.1",
103
106
  "@types/express": "^5.0.2",
104
107
  "@types/jest": "^29.5.14",
105
108
  "@types/multer": "^1.4.12",
@@ -0,0 +1,29 @@
1
+ import { INestApplication } from '@nestjs/common';
2
+ export interface GraphQLQueryOptions {
3
+ app: INestApplication;
4
+ query: string;
5
+ variables?: Record<string, unknown>;
6
+ token?: string;
7
+ }
8
+ export declare function gqlQuery<T = Record<string, any>>(options: GraphQLQueryOptions): Promise<T>;
9
+ export declare function gqlQueryExpectError(options: GraphQLQueryOptions, errorPattern: RegExp): Promise<void>;
10
+ export interface GraphQLErrorResponse {
11
+ errors?: Array<{
12
+ message: string;
13
+ locations?: Array<{
14
+ line: number;
15
+ column: number;
16
+ }>;
17
+ path?: string[];
18
+ extensions?: {
19
+ code?: string;
20
+ details?: unknown;
21
+ context?: unknown;
22
+ originalError?: unknown;
23
+ [key: string]: unknown;
24
+ };
25
+ }>;
26
+ data: unknown;
27
+ }
28
+ export declare function gqlQueryRaw(options: GraphQLQueryOptions): Promise<GraphQLErrorResponse>;
29
+ export declare function expectGraphQLFields(data: Record<string, unknown>, rootField: string, expectedFields: string[]): void;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.gqlQuery = gqlQuery;
7
+ exports.gqlQueryExpectError = gqlQueryExpectError;
8
+ exports.gqlQueryRaw = gqlQueryRaw;
9
+ exports.expectGraphQLFields = expectGraphQLFields;
10
+ const supertest_1 = __importDefault(require("supertest"));
11
+ const GRAPHQL_URL = '/graphql';
12
+ async function gqlQuery(options) {
13
+ const req = (0, supertest_1.default)(options.app.getHttpServer()).post(GRAPHQL_URL);
14
+ if (options.token) {
15
+ req.set('Authorization', `Bearer ${options.token}`);
16
+ }
17
+ const res = await req.send({
18
+ query: options.query,
19
+ variables: options.variables,
20
+ });
21
+ if (res.status !== 200) {
22
+ throw new Error(`GraphQL request failed with status ${res.status}: ${JSON.stringify(res.body)}`);
23
+ }
24
+ const body = res.body;
25
+ if (body.errors && body.errors.length > 0) {
26
+ throw new Error(`GraphQL Error: ${body.errors[0].message}`);
27
+ }
28
+ return body.data;
29
+ }
30
+ async function gqlQueryExpectError(options, errorPattern) {
31
+ const req = (0, supertest_1.default)(options.app.getHttpServer()).post(GRAPHQL_URL);
32
+ if (options.token) {
33
+ req.set('Authorization', `Bearer ${options.token}`);
34
+ }
35
+ await req
36
+ .send({
37
+ query: options.query,
38
+ variables: options.variables,
39
+ })
40
+ .expect(200)
41
+ .expect(errorPattern);
42
+ }
43
+ async function gqlQueryRaw(options) {
44
+ const req = (0, supertest_1.default)(options.app.getHttpServer()).post(GRAPHQL_URL);
45
+ if (options.token) {
46
+ req.set('Authorization', `Bearer ${options.token}`);
47
+ }
48
+ const res = await req.send({
49
+ query: options.query,
50
+ variables: options.variables,
51
+ });
52
+ return res.body;
53
+ }
54
+ function expectGraphQLFields(data, rootField, expectedFields) {
55
+ const root = data[rootField];
56
+ expect(root).toBeDefined();
57
+ for (const field of expectedFields) {
58
+ expect(root).toHaveProperty(field);
59
+ }
60
+ }
61
+ //# sourceMappingURL=graphql-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-helpers.js","sourceRoot":"","sources":["../../../../../src/__tests__/e2e/shared/graphql-helpers.ts"],"names":[],"mappings":";;;;;AAYA,4BA2BC;AAED,kDAiBC;AAkBD,kCAeC;AAED,kDAWC;AAvGD,0DAAgC;AAEhC,MAAM,WAAW,GAAG,UAAU,CAAC;AASxB,KAAK,UAAU,QAAQ,CAC5B,OAA4B;IAE5B,MAAM,GAAG,GAAG,IAAA,mBAAO,EAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEnE,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC;QACzB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC,CAAC;IAEH,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,sCAAsC,GAAG,CAAC,MAAM,KAAK,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAChF,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,GAAG,GAAG,CAAC,IAAyD,CAAC;IAE3E,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,kBAAkB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,OAAO,IAAI,CAAC,IAAS,CAAC;AACxB,CAAC;AAEM,KAAK,UAAU,mBAAmB,CACvC,OAA4B,EAC5B,YAAoB;IAEpB,MAAM,GAAG,GAAG,IAAA,mBAAO,EAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEnE,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,GAAG;SACN,IAAI,CAAC;QACJ,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC;SACD,MAAM,CAAC,GAAG,CAAC;SACX,MAAM,CAAC,YAAY,CAAC,CAAC;AAC1B,CAAC;AAkBM,KAAK,UAAU,WAAW,CAC/B,OAA4B;IAE5B,MAAM,GAAG,GAAG,IAAA,mBAAO,EAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEnE,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAClB,GAAG,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC;QACzB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC,IAA4B,CAAC;AAC1C,CAAC;AAED,SAAgB,mBAAmB,CACjC,IAA6B,EAC7B,SAAiB,EACjB,cAAwB;IAExB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAA4B,CAAC;IACxD,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAE3B,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;QACnC,MAAM,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACrC,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { INestApplication } from '@nestjs/common';
2
+ import request from 'supertest';
3
+ export declare function makeProjectPublic(app: INestApplication, projectId: string): Promise<void>;
4
+ export declare function authGet(app: INestApplication, url: string, token: string): request.Test;
5
+ export declare function anonGet(app: INestApplication, url: string): request.Test;
6
+ export declare function authPost(app: INestApplication, url: string, token: string, body?: object): request.Test;
7
+ export declare function anonPost(app: INestApplication, url: string, body?: object): request.Test;
8
+ export declare function authPut(app: INestApplication, url: string, token: string, body?: object): request.Test;
9
+ export declare function authDelete(app: INestApplication, url: string, token: string): request.Test;
10
+ export declare function anonDelete(app: INestApplication, url: string): request.Test;
11
+ export interface PrivateProjectTestContext {
12
+ app: INestApplication;
13
+ ownerToken: string;
14
+ anotherOwnerToken: string;
15
+ getUrl: () => string;
16
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.makeProjectPublic = makeProjectPublic;
7
+ exports.authGet = authGet;
8
+ exports.anonGet = anonGet;
9
+ exports.authPost = authPost;
10
+ exports.anonPost = anonPost;
11
+ exports.authPut = authPut;
12
+ exports.authDelete = authDelete;
13
+ exports.anonDelete = anonDelete;
14
+ const supertest_1 = __importDefault(require("supertest"));
15
+ const prisma_service_1 = require("../../../infrastructure/database/prisma.service");
16
+ async function makeProjectPublic(app, projectId) {
17
+ const prismaService = app.get(prisma_service_1.PrismaService);
18
+ await prismaService.project.update({
19
+ where: { id: projectId },
20
+ data: { isPublic: true },
21
+ });
22
+ }
23
+ function authGet(app, url, token) {
24
+ return (0, supertest_1.default)(app.getHttpServer())
25
+ .get(url)
26
+ .set('Authorization', `Bearer ${token}`);
27
+ }
28
+ function anonGet(app, url) {
29
+ return (0, supertest_1.default)(app.getHttpServer()).get(url);
30
+ }
31
+ function authPost(app, url, token, body) {
32
+ const req = (0, supertest_1.default)(app.getHttpServer())
33
+ .post(url)
34
+ .set('Authorization', `Bearer ${token}`);
35
+ if (body) {
36
+ req.send(body);
37
+ }
38
+ return req;
39
+ }
40
+ function anonPost(app, url, body) {
41
+ const req = (0, supertest_1.default)(app.getHttpServer()).post(url);
42
+ if (body) {
43
+ req.send(body);
44
+ }
45
+ return req;
46
+ }
47
+ function authPut(app, url, token, body) {
48
+ const req = (0, supertest_1.default)(app.getHttpServer())
49
+ .put(url)
50
+ .set('Authorization', `Bearer ${token}`);
51
+ if (body) {
52
+ req.send(body);
53
+ }
54
+ return req;
55
+ }
56
+ function authDelete(app, url, token) {
57
+ return (0, supertest_1.default)(app.getHttpServer())
58
+ .delete(url)
59
+ .set('Authorization', `Bearer ${token}`);
60
+ }
61
+ function anonDelete(app, url) {
62
+ return (0, supertest_1.default)(app.getHttpServer()).delete(url);
63
+ }
64
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../src/__tests__/e2e/shared/helpers.ts"],"names":[],"mappings":";;;;;AAIA,8CASC;AAED,0BAQC;AAED,0BAEC;AAED,4BAeC;AAED,4BAYC;AAED,0BAeC;AAED,gCAQC;AAED,gCAEC;AAxFD,0DAAgC;AAChC,oFAA2E;AAEpE,KAAK,UAAU,iBAAiB,CACrC,GAAqB,EACrB,SAAiB;IAEjB,MAAM,aAAa,GAAG,GAAG,CAAC,GAAG,CAAC,8BAAa,CAAC,CAAC;IAC7C,MAAM,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC;QACjC,KAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE;QACxB,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KACzB,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,OAAO,CACrB,GAAqB,EACrB,GAAW,EACX,KAAa;IAEb,OAAO,IAAA,mBAAO,EAAC,GAAG,CAAC,aAAa,EAAE,CAAC;SAChC,GAAG,CAAC,GAAG,CAAC;SACR,GAAG,CAAC,eAAe,EAAE,UAAU,KAAK,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,SAAgB,OAAO,CAAC,GAAqB,EAAE,GAAW;IACxD,OAAO,IAAA,mBAAO,EAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC/C,CAAC;AAED,SAAgB,QAAQ,CACtB,GAAqB,EACrB,GAAW,EACX,KAAa,EACb,IAAa;IAEb,MAAM,GAAG,GAAG,IAAA,mBAAO,EAAC,GAAG,CAAC,aAAa,EAAE,CAAC;SACrC,IAAI,CAAC,GAAG,CAAC;SACT,GAAG,CAAC,eAAe,EAAE,UAAU,KAAK,EAAE,CAAC,CAAC;IAE3C,IAAI,IAAI,EAAE,CAAC;QACT,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,QAAQ,CACtB,GAAqB,EACrB,GAAW,EACX,IAAa;IAEb,MAAM,GAAG,GAAG,IAAA,mBAAO,EAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEnD,IAAI,IAAI,EAAE,CAAC;QACT,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,OAAO,CACrB,GAAqB,EACrB,GAAW,EACX,KAAa,EACb,IAAa;IAEb,MAAM,GAAG,GAAG,IAAA,mBAAO,EAAC,GAAG,CAAC,aAAa,EAAE,CAAC;SACrC,GAAG,CAAC,GAAG,CAAC;SACR,GAAG,CAAC,eAAe,EAAE,UAAU,KAAK,EAAE,CAAC,CAAC;IAE3C,IAAI,IAAI,EAAE,CAAC;QACT,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAgB,UAAU,CACxB,GAAqB,EACrB,GAAW,EACX,KAAa;IAEb,OAAO,IAAA,mBAAO,EAAC,GAAG,CAAC,aAAa,EAAE,CAAC;SAChC,MAAM,CAAC,GAAG,CAAC;SACX,GAAG,CAAC,eAAe,EAAE,UAAU,KAAK,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,SAAgB,UAAU,CAAC,GAAqB,EAAE,GAAW;IAC3D,OAAO,IAAA,mBAAO,EAAC,GAAG,CAAC,aAAa,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AAClD,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { getTestApp, getPrismaService, closeTestApp, createFreshTestApp, } from './test-app';
2
+ export { getReadonlyFixture, getPublicProjectFixture, type PrepareDataReturnType, } from './readonly-fixture';
3
+ export { makeProjectPublic, authGet, anonGet, authPost, anonPost, authPut, authDelete, anonDelete, type PrivateProjectTestContext, } from './helpers';
4
+ export { gqlQuery, gqlQueryExpectError, gqlQueryRaw, expectGraphQLFields, type GraphQLQueryOptions, type GraphQLErrorResponse, } from './graphql-helpers';
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.expectGraphQLFields = exports.gqlQueryRaw = exports.gqlQueryExpectError = exports.gqlQuery = exports.anonDelete = exports.authDelete = exports.authPut = exports.anonPost = exports.authPost = exports.anonGet = exports.authGet = exports.makeProjectPublic = exports.getPublicProjectFixture = exports.getReadonlyFixture = exports.createFreshTestApp = exports.closeTestApp = exports.getPrismaService = exports.getTestApp = void 0;
4
+ var test_app_1 = require("./test-app");
5
+ Object.defineProperty(exports, "getTestApp", { enumerable: true, get: function () { return test_app_1.getTestApp; } });
6
+ Object.defineProperty(exports, "getPrismaService", { enumerable: true, get: function () { return test_app_1.getPrismaService; } });
7
+ Object.defineProperty(exports, "closeTestApp", { enumerable: true, get: function () { return test_app_1.closeTestApp; } });
8
+ Object.defineProperty(exports, "createFreshTestApp", { enumerable: true, get: function () { return test_app_1.createFreshTestApp; } });
9
+ var readonly_fixture_1 = require("./readonly-fixture");
10
+ Object.defineProperty(exports, "getReadonlyFixture", { enumerable: true, get: function () { return readonly_fixture_1.getReadonlyFixture; } });
11
+ Object.defineProperty(exports, "getPublicProjectFixture", { enumerable: true, get: function () { return readonly_fixture_1.getPublicProjectFixture; } });
12
+ var helpers_1 = require("./helpers");
13
+ Object.defineProperty(exports, "makeProjectPublic", { enumerable: true, get: function () { return helpers_1.makeProjectPublic; } });
14
+ Object.defineProperty(exports, "authGet", { enumerable: true, get: function () { return helpers_1.authGet; } });
15
+ Object.defineProperty(exports, "anonGet", { enumerable: true, get: function () { return helpers_1.anonGet; } });
16
+ Object.defineProperty(exports, "authPost", { enumerable: true, get: function () { return helpers_1.authPost; } });
17
+ Object.defineProperty(exports, "anonPost", { enumerable: true, get: function () { return helpers_1.anonPost; } });
18
+ Object.defineProperty(exports, "authPut", { enumerable: true, get: function () { return helpers_1.authPut; } });
19
+ Object.defineProperty(exports, "authDelete", { enumerable: true, get: function () { return helpers_1.authDelete; } });
20
+ Object.defineProperty(exports, "anonDelete", { enumerable: true, get: function () { return helpers_1.anonDelete; } });
21
+ var graphql_helpers_1 = require("./graphql-helpers");
22
+ Object.defineProperty(exports, "gqlQuery", { enumerable: true, get: function () { return graphql_helpers_1.gqlQuery; } });
23
+ Object.defineProperty(exports, "gqlQueryExpectError", { enumerable: true, get: function () { return graphql_helpers_1.gqlQueryExpectError; } });
24
+ Object.defineProperty(exports, "gqlQueryRaw", { enumerable: true, get: function () { return graphql_helpers_1.gqlQueryRaw; } });
25
+ Object.defineProperty(exports, "expectGraphQLFields", { enumerable: true, get: function () { return graphql_helpers_1.expectGraphQLFields; } });
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/__tests__/e2e/shared/index.ts"],"names":[],"mappings":";;;AAAA,uCAKoB;AAJlB,sGAAA,UAAU,OAAA;AACV,4GAAA,gBAAgB,OAAA;AAChB,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAGpB,uDAI4B;AAH1B,sHAAA,kBAAkB,OAAA;AAClB,2HAAA,uBAAuB,OAAA;AAIzB,qCAUmB;AATjB,4GAAA,iBAAiB,OAAA;AACjB,kGAAA,OAAO,OAAA;AACP,kGAAA,OAAO,OAAA;AACP,mGAAA,QAAQ,OAAA;AACR,mGAAA,QAAQ,OAAA;AACR,kGAAA,OAAO,OAAA;AACP,qGAAA,UAAU,OAAA;AACV,qGAAA,UAAU,OAAA;AAIZ,qDAO2B;AANzB,2GAAA,QAAQ,OAAA;AACR,sHAAA,mBAAmB,OAAA;AACnB,8GAAA,WAAW,OAAA;AACX,sHAAA,mBAAmB,OAAA"}
@@ -0,0 +1,5 @@
1
+ import { INestApplication } from '@nestjs/common';
2
+ import { PrepareDataReturnType } from '../../../__tests__/utils/prepareProject';
3
+ export declare function getReadonlyFixture(app: INestApplication): Promise<PrepareDataReturnType>;
4
+ export declare function getPublicProjectFixture(app: INestApplication): Promise<PrepareDataReturnType>;
5
+ export type { PrepareDataReturnType };
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getReadonlyFixture = getReadonlyFixture;
4
+ exports.getPublicProjectFixture = getPublicProjectFixture;
5
+ const prepareProject_1 = require("../../utils/prepareProject");
6
+ const prisma_service_1 = require("../../../infrastructure/database/prisma.service");
7
+ let cachedFixture = null;
8
+ let publicProjectFixture = null;
9
+ async function getReadonlyFixture(app) {
10
+ if (cachedFixture) {
11
+ return cachedFixture;
12
+ }
13
+ cachedFixture = await (0, prepareProject_1.prepareData)(app, { createLinkedTable: true });
14
+ return cachedFixture;
15
+ }
16
+ async function getPublicProjectFixture(app) {
17
+ if (publicProjectFixture) {
18
+ return publicProjectFixture;
19
+ }
20
+ const prismaService = app.get(prisma_service_1.PrismaService);
21
+ publicProjectFixture = await (0, prepareProject_1.prepareData)(app, { createLinkedTable: true });
22
+ await prismaService.project.update({
23
+ where: { id: publicProjectFixture.project.projectId },
24
+ data: { isPublic: true },
25
+ });
26
+ return publicProjectFixture;
27
+ }
28
+ //# sourceMappingURL=readonly-fixture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"readonly-fixture.js","sourceRoot":"","sources":["../../../../../src/__tests__/e2e/shared/readonly-fixture.ts"],"names":[],"mappings":";;AAUA,gDAUC;AAED,0DAgBC;AArCD,+DAG4C;AAC5C,oFAA2E;AAE3E,IAAI,aAAa,GAAiC,IAAI,CAAC;AACvD,IAAI,oBAAoB,GAAiC,IAAI,CAAC;AAEvD,KAAK,UAAU,kBAAkB,CACtC,GAAqB;IAErB,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,aAAa,GAAG,MAAM,IAAA,4BAAW,EAAC,GAAG,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;IAEpE,OAAO,aAAa,CAAC;AACvB,CAAC;AAEM,KAAK,UAAU,uBAAuB,CAC3C,GAAqB;IAErB,IAAI,oBAAoB,EAAE,CAAC;QACzB,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED,MAAM,aAAa,GAAG,GAAG,CAAC,GAAG,CAAC,8BAAa,CAAC,CAAC;IAC7C,oBAAoB,GAAG,MAAM,IAAA,4BAAW,EAAC,GAAG,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;IAE3E,MAAM,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC;QACjC,KAAK,EAAE,EAAE,EAAE,EAAE,oBAAoB,CAAC,OAAO,CAAC,SAAS,EAAE;QACrD,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KACzB,CAAC,CAAC;IAEH,OAAO,oBAAoB,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { INestApplication } from '@nestjs/common';
2
+ import { PrismaService } from '../../../infrastructure/database/prisma.service';
3
+ export declare function getTestApp(): Promise<INestApplication>;
4
+ export declare function getPrismaService(): PrismaService;
5
+ export declare function closeTestApp(): Promise<void>;
6
+ export declare function createFreshTestApp(): Promise<INestApplication>;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTestApp = getTestApp;
4
+ exports.getPrismaService = getPrismaService;
5
+ exports.closeTestApp = closeTestApp;
6
+ exports.createFreshTestApp = createFreshTestApp;
7
+ const common_1 = require("@nestjs/common");
8
+ const testing_1 = require("@nestjs/testing");
9
+ const core_module_1 = require("../../../core/core.module");
10
+ const registerGraphqlEnums_1 = require("../../../api/graphql-api/registerGraphqlEnums");
11
+ const prisma_service_1 = require("../../../infrastructure/database/prisma.service");
12
+ let cachedApp = null;
13
+ let cachedPrismaService = null;
14
+ async function getTestApp() {
15
+ if (cachedApp) {
16
+ return cachedApp;
17
+ }
18
+ (0, registerGraphqlEnums_1.registerGraphqlEnums)();
19
+ const moduleFixture = await testing_1.Test.createTestingModule({
20
+ imports: [core_module_1.CoreModule.forRoot({ mode: 'monolith' })],
21
+ }).compile();
22
+ cachedApp = moduleFixture.createNestApplication();
23
+ cachedApp.useGlobalPipes(new common_1.ValidationPipe({
24
+ transform: true,
25
+ }));
26
+ cachedPrismaService = cachedApp.get(prisma_service_1.PrismaService);
27
+ await cachedApp.init();
28
+ return cachedApp;
29
+ }
30
+ function getPrismaService() {
31
+ if (!cachedPrismaService) {
32
+ throw new Error('Test app not initialized. Call getTestApp() first.');
33
+ }
34
+ return cachedPrismaService;
35
+ }
36
+ async function closeTestApp() {
37
+ if (cachedApp) {
38
+ await cachedApp.close();
39
+ cachedApp = null;
40
+ cachedPrismaService = null;
41
+ }
42
+ }
43
+ async function createFreshTestApp() {
44
+ (0, registerGraphqlEnums_1.registerGraphqlEnums)();
45
+ const moduleFixture = await testing_1.Test.createTestingModule({
46
+ imports: [core_module_1.CoreModule.forRoot({ mode: 'monolith' })],
47
+ }).compile();
48
+ const app = moduleFixture.createNestApplication();
49
+ app.useGlobalPipes(new common_1.ValidationPipe({
50
+ transform: true,
51
+ }));
52
+ await app.init();
53
+ return app;
54
+ }
55
+ //# sourceMappingURL=test-app.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-app.js","sourceRoot":"","sources":["../../../../../src/__tests__/e2e/shared/test-app.ts"],"names":[],"mappings":";;AASA,gCAsBC;AAED,4CAKC;AAED,oCAMC;AAED,gDAiBC;AAjED,2CAAkE;AAClE,6CAAsD;AACtD,2DAAkD;AAClD,wFAAgF;AAChF,oFAA2E;AAE3E,IAAI,SAAS,GAA4B,IAAI,CAAC;AAC9C,IAAI,mBAAmB,GAAyB,IAAI,CAAC;AAE9C,KAAK,UAAU,UAAU;IAC9B,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAA,2CAAoB,GAAE,CAAC;IAEvB,MAAM,aAAa,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;QAClE,OAAO,EAAE,CAAC,wBAAU,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;KACpD,CAAC,CAAC,OAAO,EAAE,CAAC;IAEb,SAAS,GAAG,aAAa,CAAC,qBAAqB,EAAE,CAAC;IAClD,SAAS,CAAC,cAAc,CACtB,IAAI,uBAAc,CAAC;QACjB,SAAS,EAAE,IAAI;KAChB,CAAC,CACH,CAAC;IAEF,mBAAmB,GAAG,SAAS,CAAC,GAAG,CAAC,8BAAa,CAAC,CAAC;IACnD,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;IAEvB,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,gBAAgB;IAC9B,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;IACxE,CAAC;IACD,OAAO,mBAAmB,CAAC;AAC7B,CAAC;AAEM,KAAK,UAAU,YAAY;IAChC,IAAI,SAAS,EAAE,CAAC;QACd,MAAM,SAAS,CAAC,KAAK,EAAE,CAAC;QACxB,SAAS,GAAG,IAAI,CAAC;QACjB,mBAAmB,GAAG,IAAI,CAAC;IAC7B,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,kBAAkB;IACtC,IAAA,2CAAoB,GAAE,CAAC;IAEvB,MAAM,aAAa,GAAkB,MAAM,cAAI,CAAC,mBAAmB,CAAC;QAClE,OAAO,EAAE,CAAC,wBAAU,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;KACpD,CAAC,CAAC,OAAO,EAAE,CAAC;IAEb,MAAM,GAAG,GAAG,aAAa,CAAC,qBAAqB,EAAE,CAAC;IAClD,GAAG,CAAC,cAAc,CAChB,IAAI,uBAAc,CAAC;QACjB,SAAS,EAAE,IAAI;KAChB,CAAC,CACH,CAAC;IAEF,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;IAEjB,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { INestApplication } from '@nestjs/common';
2
+ import { UserOrganizationRoles, UserProjectRoles } from '../../features/auth/consts';
2
3
  import { JsonSchema } from '@revisium/schema-toolkit/types';
3
4
  import { PrismaService } from '../../infrastructure/database/prisma.service';
4
5
  export type PrepareDataReturnType = Awaited<ReturnType<typeof prepareData>>;
@@ -446,3 +447,273 @@ export declare const createEmptyFile: () => {
446
447
  width: number;
447
448
  height: number;
448
449
  };
450
+ export declare const prepareProjectUser: (app: INestApplication, organizationId: string, projectId: string, organizationRole: UserOrganizationRoles, projectRole: UserProjectRoles) => Promise<{
451
+ user: {
452
+ id: string;
453
+ createdAt: Date;
454
+ email: string | null;
455
+ username: string | null;
456
+ password: string;
457
+ isEmailConfirmed: boolean;
458
+ emailCode: string;
459
+ roleId: string;
460
+ };
461
+ token: string;
462
+ }>;
463
+ export type PrepareProjectUserReturnType = Awaited<ReturnType<typeof prepareProjectUser>>;
464
+ export declare const prepareDataWithRoles: (app: INestApplication, options?: {
465
+ createLinkedTable?: boolean;
466
+ }) => Promise<{
467
+ project: {
468
+ linkedTable: {
469
+ schemaRowVersionId: string;
470
+ tableId: string;
471
+ createdIdForTableInSchemaTable: string;
472
+ tableCreatedId: string;
473
+ headTableVersionId: string;
474
+ draftTableVersionId: string;
475
+ schema: JsonSchema;
476
+ } | undefined;
477
+ linkedRow: {
478
+ row: {
479
+ id: string;
480
+ createdAt: Date;
481
+ createdId: string;
482
+ versionId: string;
483
+ readonly: boolean;
484
+ updatedAt: Date;
485
+ publishedAt: Date;
486
+ data: import("@prisma/client/runtime/client").JsonValue;
487
+ meta: import("@prisma/client/runtime/client").JsonValue;
488
+ hash: string;
489
+ schemaHash: string;
490
+ };
491
+ rowDraft: {
492
+ id: string;
493
+ createdAt: Date;
494
+ createdId: string;
495
+ versionId: string;
496
+ readonly: boolean;
497
+ updatedAt: Date;
498
+ publishedAt: Date;
499
+ data: import("@prisma/client/runtime/client").JsonValue;
500
+ meta: import("@prisma/client/runtime/client").JsonValue;
501
+ hash: string;
502
+ schemaHash: string;
503
+ };
504
+ rowId: string;
505
+ rowCreatedId: string;
506
+ headRowVersionId: string;
507
+ draftRowVersionId: string;
508
+ } | undefined;
509
+ row: {
510
+ id: string;
511
+ createdAt: Date;
512
+ createdId: string;
513
+ versionId: string;
514
+ readonly: boolean;
515
+ updatedAt: Date;
516
+ publishedAt: Date;
517
+ data: import("@prisma/client/runtime/client").JsonValue;
518
+ meta: import("@prisma/client/runtime/client").JsonValue;
519
+ hash: string;
520
+ schemaHash: string;
521
+ };
522
+ rowDraft: {
523
+ id: string;
524
+ createdAt: Date;
525
+ createdId: string;
526
+ versionId: string;
527
+ readonly: boolean;
528
+ updatedAt: Date;
529
+ publishedAt: Date;
530
+ data: import("@prisma/client/runtime/client").JsonValue;
531
+ meta: import("@prisma/client/runtime/client").JsonValue;
532
+ hash: string;
533
+ schemaHash: string;
534
+ };
535
+ rowId: string;
536
+ rowCreatedId: string;
537
+ headRowVersionId: string;
538
+ draftRowVersionId: string;
539
+ schemaRowVersionId: string;
540
+ tableId: string;
541
+ createdIdForTableInSchemaTable: string;
542
+ tableCreatedId: string;
543
+ headTableVersionId: string;
544
+ draftTableVersionId: string;
545
+ schema: JsonSchema;
546
+ headEndpointId: string;
547
+ draftEndpointId: string;
548
+ organizationId: string;
549
+ projectId: string;
550
+ projectName: string;
551
+ branchId: string;
552
+ branchName: string;
553
+ headRevisionId: string;
554
+ draftRevisionId: string;
555
+ schemaTableVersionId: string;
556
+ schemaTableCreatedId: string;
557
+ migrationTableVersionId: string;
558
+ migrationTableCreatedId: string;
559
+ };
560
+ owner: {
561
+ user: {
562
+ id: string;
563
+ createdAt: Date;
564
+ email: string | null;
565
+ username: string | null;
566
+ password: string;
567
+ isEmailConfirmed: boolean;
568
+ emailCode: string;
569
+ roleId: string;
570
+ };
571
+ token: string;
572
+ };
573
+ developer: {
574
+ user: {
575
+ id: string;
576
+ createdAt: Date;
577
+ email: string | null;
578
+ username: string | null;
579
+ password: string;
580
+ isEmailConfirmed: boolean;
581
+ emailCode: string;
582
+ roleId: string;
583
+ };
584
+ token: string;
585
+ };
586
+ editor: {
587
+ user: {
588
+ id: string;
589
+ createdAt: Date;
590
+ email: string | null;
591
+ username: string | null;
592
+ password: string;
593
+ isEmailConfirmed: boolean;
594
+ emailCode: string;
595
+ roleId: string;
596
+ };
597
+ token: string;
598
+ };
599
+ reader: {
600
+ user: {
601
+ id: string;
602
+ createdAt: Date;
603
+ email: string | null;
604
+ username: string | null;
605
+ password: string;
606
+ isEmailConfirmed: boolean;
607
+ emailCode: string;
608
+ roleId: string;
609
+ };
610
+ token: string;
611
+ };
612
+ anotherProject: {
613
+ linkedTable: {
614
+ schemaRowVersionId: string;
615
+ tableId: string;
616
+ createdIdForTableInSchemaTable: string;
617
+ tableCreatedId: string;
618
+ headTableVersionId: string;
619
+ draftTableVersionId: string;
620
+ schema: JsonSchema;
621
+ } | undefined;
622
+ linkedRow: {
623
+ row: {
624
+ id: string;
625
+ createdAt: Date;
626
+ createdId: string;
627
+ versionId: string;
628
+ readonly: boolean;
629
+ updatedAt: Date;
630
+ publishedAt: Date;
631
+ data: import("@prisma/client/runtime/client").JsonValue;
632
+ meta: import("@prisma/client/runtime/client").JsonValue;
633
+ hash: string;
634
+ schemaHash: string;
635
+ };
636
+ rowDraft: {
637
+ id: string;
638
+ createdAt: Date;
639
+ createdId: string;
640
+ versionId: string;
641
+ readonly: boolean;
642
+ updatedAt: Date;
643
+ publishedAt: Date;
644
+ data: import("@prisma/client/runtime/client").JsonValue;
645
+ meta: import("@prisma/client/runtime/client").JsonValue;
646
+ hash: string;
647
+ schemaHash: string;
648
+ };
649
+ rowId: string;
650
+ rowCreatedId: string;
651
+ headRowVersionId: string;
652
+ draftRowVersionId: string;
653
+ } | undefined;
654
+ row: {
655
+ id: string;
656
+ createdAt: Date;
657
+ createdId: string;
658
+ versionId: string;
659
+ readonly: boolean;
660
+ updatedAt: Date;
661
+ publishedAt: Date;
662
+ data: import("@prisma/client/runtime/client").JsonValue;
663
+ meta: import("@prisma/client/runtime/client").JsonValue;
664
+ hash: string;
665
+ schemaHash: string;
666
+ };
667
+ rowDraft: {
668
+ id: string;
669
+ createdAt: Date;
670
+ createdId: string;
671
+ versionId: string;
672
+ readonly: boolean;
673
+ updatedAt: Date;
674
+ publishedAt: Date;
675
+ data: import("@prisma/client/runtime/client").JsonValue;
676
+ meta: import("@prisma/client/runtime/client").JsonValue;
677
+ hash: string;
678
+ schemaHash: string;
679
+ };
680
+ rowId: string;
681
+ rowCreatedId: string;
682
+ headRowVersionId: string;
683
+ draftRowVersionId: string;
684
+ schemaRowVersionId: string;
685
+ tableId: string;
686
+ createdIdForTableInSchemaTable: string;
687
+ tableCreatedId: string;
688
+ headTableVersionId: string;
689
+ draftTableVersionId: string;
690
+ schema: JsonSchema;
691
+ headEndpointId: string;
692
+ draftEndpointId: string;
693
+ organizationId: string;
694
+ projectId: string;
695
+ projectName: string;
696
+ branchId: string;
697
+ branchName: string;
698
+ headRevisionId: string;
699
+ draftRevisionId: string;
700
+ schemaTableVersionId: string;
701
+ schemaTableCreatedId: string;
702
+ migrationTableVersionId: string;
703
+ migrationTableCreatedId: string;
704
+ };
705
+ anotherOwner: {
706
+ user: {
707
+ id: string;
708
+ createdAt: Date;
709
+ email: string | null;
710
+ username: string | null;
711
+ password: string;
712
+ isEmailConfirmed: boolean;
713
+ emailCode: string;
714
+ roleId: string;
715
+ };
716
+ token: string;
717
+ };
718
+ }>;
719
+ export type PrepareDataWithRolesReturnType = Awaited<ReturnType<typeof prepareDataWithRoles>>;