@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
@@ -29,22 +29,32 @@ const revision_resolver_1 = require("./revision/revision.resolver");
29
29
  const row_resolver_1 = require("./row/row.resolver");
30
30
  const table_resolver_1 = require("./table/table.resolver");
31
31
  const user_resolver_1 = require("./user/user.resolver");
32
+ const graphql_metrics_plugin_1 = require("../metrics/graphql/graphql-metrics.plugin");
33
+ const metrics_module_1 = require("../metrics/metrics.module");
32
34
  let GraphqlApiModule = class GraphqlApiModule {
33
35
  };
34
36
  exports.GraphqlApiModule = GraphqlApiModule;
35
37
  exports.GraphqlApiModule = GraphqlApiModule = __decorate([
36
38
  (0, common_1.Module)({
37
39
  imports: [
38
- graphql_1.GraphQLModule.forRoot({
39
- context: ({ res }) => ({ res }),
40
- path: '/-/graphql',
41
- resolvers: { JSON: graphql_type_json_1.default },
40
+ metrics_module_1.MetricsModule,
41
+ graphql_1.GraphQLModule.forRootAsync({
42
+ imports: [metrics_module_1.MetricsModule],
42
43
  driver: apollo_1.ApolloDriver,
43
- playground: false,
44
- autoSchemaFile: (0, path_1.join)(process.cwd(), 'src/schema.gql'),
45
- sortSchema: true,
46
- introspection: true,
47
- plugins: [(0, default_1.ApolloServerPluginLandingPageLocalDefault)()],
44
+ inject: [graphql_metrics_plugin_1.GraphqlMetricsPlugin],
45
+ useFactory: (graphqlMetricsPlugin) => ({
46
+ context: ({ res }) => ({ res }),
47
+ path: '/-/graphql',
48
+ resolvers: { JSON: graphql_type_json_1.default },
49
+ playground: false,
50
+ autoSchemaFile: (0, path_1.join)(process.cwd(), 'src/schema.gql'),
51
+ sortSchema: true,
52
+ introspection: true,
53
+ plugins: [
54
+ (0, default_1.ApolloServerPluginLandingPageLocalDefault)(),
55
+ graphqlMetricsPlugin,
56
+ ],
57
+ }),
48
58
  }),
49
59
  cqrs_1.CqrsModule,
50
60
  auth_module_1.AuthModule,
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-api.module.js","sourceRoot":"","sources":["../../../src/graphql-api/graphql-api.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uEAAsG;AACtG,2CAAkE;AAClE,2CAAwC;AACxC,uCAA0C;AAC1C,6CAAgD;AAChD,yDAA4C;AAC5C,+BAA4B;AAC5B,qDAAkD;AAClD,wDAAkE;AAClE,8DAAwE;AACxE,4EAAqF;AACrF,mFAA6F;AAC7F,2DAAqE;AACrE,oEAA8E;AAC9E,gFAA0F;AAC1F,iEAA2E;AAC3E,iEAA4E;AAC5E,4EAAqF;AACrF,oEAA8E;AAC9E,qDAA+D;AAC/D,2DAAqE;AACrE,wDAAkE;AAkC3D,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAhC5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,uBAAa,CAAC,OAAO,CAAqB;gBACxC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;gBAC7C,IAAI,EAAE,YAAY;gBAClB,SAAS,EAAE,EAAE,IAAI,EAAE,2BAAW,EAAE;gBAChC,MAAM,EAAE,qBAAY;gBACpB,UAAU,EAAE,KAAK;gBACjB,cAAc,EAAE,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC;gBACrD,UAAU,EAAE,IAAI;gBAChB,aAAa,EAAE,IAAI;gBACnB,OAAO,EAAE,CAAC,IAAA,mDAAyC,GAAE,CAAC;aACvD,CAAC;YACF,iBAAU;YACV,wBAAU;SACX;QACD,SAAS,EAAE;YACT,8CAAqB;YACrB,4BAAY;YACZ,4BAAY;YACZ,4CAAoB;YACpB,kCAAe;YACf,gCAAc;YACd,6CAAoB;YACpB,2CAAmB;YACnB,8BAAa;YACb,oCAAgB;YAChB,oCAAgB;YAChB,0BAAW;YACX,8BAAa;SACd;KACF,CAAC;GACW,gBAAgB,CAAG;AAEhC,IAAA,2CAAoB,GAAE,CAAC"}
1
+ {"version":3,"file":"graphql-api.module.js","sourceRoot":"","sources":["../../../src/graphql-api/graphql-api.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,uEAAsG;AACtG,2CAAkE;AAClE,2CAAwC;AACxC,uCAA0C;AAC1C,6CAAgD;AAChD,yDAA4C;AAC5C,+BAA4B;AAC5B,qDAAkD;AAClD,wDAAkE;AAClE,8DAAwE;AACxE,4EAAqF;AACrF,mFAA6F;AAC7F,2DAAqE;AACrE,oEAA8E;AAC9E,gFAA0F;AAC1F,iEAA2E;AAC3E,iEAA4E;AAC5E,4EAAqF;AACrF,oEAA8E;AAC9E,qDAA+D;AAC/D,2DAAqE;AACrE,wDAAkE;AAClE,sFAAkF;AAClF,8DAA2D;AA0CpD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,4CAAgB;2BAAhB,gBAAgB;IAxC5B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,8BAAa;YACb,uBAAa,CAAC,YAAY,CAAqB;gBAC7C,OAAO,EAAE,CAAC,8BAAa,CAAC;gBACxB,MAAM,EAAE,qBAAY;gBACpB,MAAM,EAAE,CAAC,6CAAoB,CAAC;gBAC9B,UAAU,EAAE,CAAC,oBAA0C,EAAE,EAAE,CAAC,CAAC;oBAC3D,OAAO,EAAE,CAAC,EAAE,GAAG,EAAgB,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;oBAC7C,IAAI,EAAE,YAAY;oBAClB,SAAS,EAAE,EAAE,IAAI,EAAE,2BAAW,EAAE;oBAChC,UAAU,EAAE,KAAK;oBACjB,cAAc,EAAE,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,gBAAgB,CAAC;oBACrD,UAAU,EAAE,IAAI;oBAChB,aAAa,EAAE,IAAI;oBACnB,OAAO,EAAE;wBACP,IAAA,mDAAyC,GAAE;wBAC3C,oBAAoB;qBACrB;iBACF,CAAC;aACH,CAAC;YACF,iBAAU;YACV,wBAAU;SACX;QACD,SAAS,EAAE;YACT,8CAAqB;YACrB,4BAAY;YACZ,4BAAY;YACZ,4CAAoB;YACpB,kCAAe;YACf,gCAAc;YACd,6CAAoB;YACpB,2CAAmB;YACnB,8BAAa;YACb,oCAAgB;YAChB,oCAAgB;YAChB,0BAAW;YACX,8BAAa;SACd;KACF,CAAC;GACW,gBAAgB,CAAG;AAEhC,IAAA,2CAAoB,GAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { UserOrganizationRoles } from 'src/auth/consts';
1
+ import { UserOrganizationRoles } from '../../../auth/consts';
2
2
  export declare class AddUserToOrganizationInput {
3
3
  organizationId: string;
4
4
  userId: string;
@@ -1,4 +1,4 @@
1
- import { UsersOrganizationModel } from 'src/graphql-api/organization/model/users-organization.model';
1
+ import { UsersOrganizationModel } from '../../../graphql-api/organization/model/users-organization.model';
2
2
  declare const UsersOrganizationConnection_base: import("@nestjs/common").Type<import("../../../share/pagination.interface").IPaginatedType<UsersOrganizationModel>>;
3
3
  export declare class UsersOrganizationConnection extends UsersOrganizationConnection_base {
4
4
  }
@@ -1,5 +1,5 @@
1
- import { RoleModel } from 'src/graphql-api/role/model/role.model';
2
- import { UserModel } from 'src/graphql-api/user/model/user.model';
1
+ import { RoleModel } from '../../../graphql-api/role/model/role.model';
2
+ import { UserModel } from '../../../graphql-api/user/model/user.model';
3
3
  export declare class UsersOrganizationModel {
4
4
  id: string;
5
5
  user: UserModel;
@@ -1,8 +1,8 @@
1
1
  import { CommandBus, QueryBus } from '@nestjs/cqrs';
2
- import { IOptionalAuthUser } from 'src/auth/types';
3
- import { AddUserToOrganizationInput, GetUsersOrganizationInput, RemoveUserFromOrganizationInput } from 'src/graphql-api/organization/inputs';
4
- import { CreateProjectInput } from 'src/graphql-api/project/inputs';
5
- import { GetProjectsInput } from 'src/graphql-api/project/inputs/get-projects.input';
2
+ import { IOptionalAuthUser } from '../../auth/types';
3
+ import { AddUserToOrganizationInput, GetUsersOrganizationInput, RemoveUserFromOrganizationInput } from '../../graphql-api/organization/inputs';
4
+ import { CreateProjectInput } from '../../graphql-api/project/inputs';
5
+ import { GetProjectsInput } from '../../graphql-api/project/inputs/get-projects.input';
6
6
  export declare class OrganizationResolver {
7
7
  private queryBus;
8
8
  private commandBus;
@@ -1,4 +1,4 @@
1
- import { UserProjectRoles } from 'src/auth/consts';
1
+ import { UserProjectRoles } from '../../../auth/consts';
2
2
  export declare class AddUserToProjectInput {
3
3
  organizationId: string;
4
4
  projectName: string;
@@ -1,7 +1,7 @@
1
- export * from 'src/graphql-api/project/inputs/create-project.input';
2
- export * from 'src/graphql-api/project/inputs/get-project.input';
3
- export * from 'src/graphql-api/project/inputs/delete-project.input';
4
- export * from 'src/graphql-api/project/inputs/add-user-to-project.input';
5
- export * from 'src/graphql-api/project/inputs/remove-user-from-project.input';
6
- export * from 'src/graphql-api/project/inputs/get-users-project.input';
7
- export * from 'src/graphql-api/project/inputs/update-project.input';
1
+ export * from '../../../graphql-api/project/inputs/create-project.input';
2
+ export * from '../../../graphql-api/project/inputs/get-project.input';
3
+ export * from '../../../graphql-api/project/inputs/delete-project.input';
4
+ export * from '../../../graphql-api/project/inputs/add-user-to-project.input';
5
+ export * from '../../../graphql-api/project/inputs/remove-user-from-project.input';
6
+ export * from '../../../graphql-api/project/inputs/get-users-project.input';
7
+ export * from '../../../graphql-api/project/inputs/update-project.input';
@@ -1 +1 @@
1
- export * from 'src/graphql-api/project/model/project.model';
1
+ export * from '../../../graphql-api/project/model/project.model';
@@ -1,4 +1,4 @@
1
- import { BranchesConnection, BranchModel } from 'src/graphql-api/branch/model/branch.model';
1
+ import { BranchesConnection, BranchModel } from '../../../graphql-api/branch/model/branch.model';
2
2
  export declare class ProjectModel {
3
3
  id: string;
4
4
  organizationId: string;
@@ -1,4 +1,4 @@
1
- import { ProjectModel } from 'src/graphql-api/project/model/project.model';
1
+ import { ProjectModel } from '../../../graphql-api/project/model/project.model';
2
2
  declare const ProjectsConnection_base: import("@nestjs/common").Type<import("../../../share/pagination.interface").IPaginatedType<ProjectModel>>;
3
3
  export declare class ProjectsConnection extends ProjectsConnection_base {
4
4
  }
@@ -1,4 +1,4 @@
1
- import { UsersProjectModel } from 'src/graphql-api/project/model/users-project.model';
1
+ import { UsersProjectModel } from '../../../graphql-api/project/model/users-project.model';
2
2
  declare const UsersProjectConnection_base: import("@nestjs/common").Type<import("../../../share/pagination.interface").IPaginatedType<UsersProjectModel>>;
3
3
  export declare class UsersProjectConnection extends UsersProjectConnection_base {
4
4
  }
@@ -1,5 +1,5 @@
1
- import { RoleModel } from 'src/graphql-api/role/model/role.model';
2
- import { UserModel } from 'src/graphql-api/user/model/user.model';
1
+ import { RoleModel } from '../../../graphql-api/role/model/role.model';
2
+ import { UserModel } from '../../../graphql-api/user/model/user.model';
3
3
  export declare class UsersProjectModel {
4
4
  id: string;
5
5
  user: UserModel;
@@ -1,7 +1,7 @@
1
1
  import { CommandBus, QueryBus } from '@nestjs/cqrs';
2
- import { AddUserToProjectInput, DeleteProjectInput, GetProjectInput, GetUsersProjectInput, RemoveUserFromProjectInput, UpdateProjectInput } from 'src/graphql-api/project/inputs';
3
- import { GetProjectBranchesInput } from 'src/graphql-api/project/inputs/get-project-branches.input';
4
- import { ProjectModel } from 'src/graphql-api/project/model';
2
+ import { AddUserToProjectInput, DeleteProjectInput, GetProjectInput, GetUsersProjectInput, RemoveUserFromProjectInput, UpdateProjectInput } from '../../graphql-api/project/inputs';
3
+ import { GetProjectBranchesInput } from '../../graphql-api/project/inputs/get-project-branches.input';
4
+ import { ProjectModel } from '../../graphql-api/project/model';
5
5
  export declare class ProjectResolver {
6
6
  private queryBus;
7
7
  private commandBus;
@@ -1,5 +1,5 @@
1
1
  import { QueryBus } from '@nestjs/cqrs';
2
- import { ChildBranchModel } from 'src/graphql-api/revision/model/child-branch.model';
2
+ import { ChildBranchModel } from '../../graphql-api/revision/model/child-branch.model';
3
3
  export declare class ChildBranchResolver {
4
4
  private readonly queryBus;
5
5
  constructor(queryBus: QueryBus);
@@ -1,5 +1,5 @@
1
- import { BranchModel } from 'src/graphql-api/branch/model/branch.model';
2
- import { RevisionModel } from 'src/graphql-api/revision/model/revision.model';
1
+ import { BranchModel } from '../../../graphql-api/branch/model/branch.model';
2
+ import { RevisionModel } from '../../../graphql-api/revision/model/revision.model';
3
3
  export declare class ChildBranchModel {
4
4
  branch: BranchModel;
5
5
  revision: RevisionModel;
@@ -1,7 +1,7 @@
1
- import { BranchModel } from 'src/graphql-api/branch/model/branch.model';
2
- import { EndpointModel } from 'src/graphql-api/endpoint/model';
3
- import { ChildBranchModel } from 'src/graphql-api/revision/model/child-branch.model';
4
- import { TablesConnection } from 'src/graphql-api/table/model/table-connection.model';
1
+ import { BranchModel } from '../../../graphql-api/branch/model/branch.model';
2
+ import { EndpointModel } from '../../../graphql-api/endpoint/model';
3
+ import { ChildBranchModel } from '../../../graphql-api/revision/model/child-branch.model';
4
+ import { TablesConnection } from '../../../graphql-api/table/model/table-connection.model';
5
5
  export declare class RevisionModel {
6
6
  id: string;
7
7
  sequence: number;
@@ -1,8 +1,8 @@
1
1
  import { CommandBus, QueryBus } from '@nestjs/cqrs';
2
- import { CreateRevisionInput } from 'src/graphql-api/revision/inputs/create-revision.input';
3
- import { GetRevisionTablesInput } from 'src/graphql-api/revision/inputs/get-revision-tables.input';
4
- import { GetRevisionInput } from 'src/graphql-api/revision/inputs/get-revision.input';
5
- import { RevisionModel } from 'src/graphql-api/revision/model/revision.model';
2
+ import { CreateRevisionInput } from '../../graphql-api/revision/inputs/create-revision.input';
3
+ import { GetRevisionTablesInput } from '../../graphql-api/revision/inputs/get-revision-tables.input';
4
+ import { GetRevisionInput } from '../../graphql-api/revision/inputs/get-revision.input';
5
+ import { RevisionModel } from '../../graphql-api/revision/model/revision.model';
6
6
  export declare class RevisionResolver {
7
7
  private commandBus;
8
8
  private queryBus;
@@ -1,3 +1,3 @@
1
- export * from 'src/graphql-api/row/inputs/get-row.input';
2
- export * from 'src/graphql-api/row/inputs/get-rows.input';
3
- export * from 'src/graphql-api/row/inputs/get-row-count-references-by.input';
1
+ export * from '../../../graphql-api/row/inputs/get-row.input';
2
+ export * from '../../../graphql-api/row/inputs/get-rows.input';
3
+ export * from '../../../graphql-api/row/inputs/get-row-count-references-by.input';
@@ -1,5 +1,5 @@
1
- import { RowModel } from 'src/graphql-api/row/model/row.model';
2
- import { TableModel } from 'src/graphql-api/table/model/table.model';
1
+ import { RowModel } from '../../../graphql-api/row/model/row.model';
2
+ import { TableModel } from '../../../graphql-api/table/model/table.model';
3
3
  export declare class RowReferenceModel {
4
4
  table: TableModel;
5
5
  row: RowModel;
@@ -1,4 +1,4 @@
1
- import { RowReferenceModel } from 'src/graphql-api/row/model/row-reference.model';
1
+ import { RowReferenceModel } from '../../../graphql-api/row/model/row-reference.model';
2
2
  declare const RowReferencesConnectionModel_base: import("@nestjs/common").Type<import("../../../share/pagination.interface").IPaginatedType<RowReferenceModel>>;
3
3
  export declare class RowReferencesConnectionModel extends RowReferencesConnectionModel_base {
4
4
  }
@@ -1,5 +1,5 @@
1
1
  import { Prisma } from '@prisma/client';
2
- import { RowsConnection } from 'src/graphql-api/row/model/rows-connection.model';
2
+ import { RowsConnection } from '../../../graphql-api/row/model/rows-connection.model';
3
3
  export type RowModelContext = {
4
4
  revisionId: string;
5
5
  tableId: string;
@@ -1,4 +1,4 @@
1
- import { RowModel } from 'src/graphql-api/row/model/row.model';
1
+ import { RowModel } from '../../../graphql-api/row/model/row.model';
2
2
  declare const RowsConnection_base: import("@nestjs/common").Type<import("../../../share/pagination.interface").IPaginatedType<RowModel>>;
3
3
  export declare class RowsConnection extends RowsConnection_base {
4
4
  }
@@ -1,9 +1,9 @@
1
1
  import { QueryBus } from '@nestjs/cqrs';
2
- import { GetRowCountReferencesByInput, GetRowInput, GetRowsInput } from 'src/graphql-api/row/inputs';
3
- import { GetRowReferencesInput } from 'src/graphql-api/row/inputs/get-row-references.input';
4
- import { RowModel } from 'src/graphql-api/row/model/row.model';
5
- import { GetRowReturnType } from 'src/row/queries/types';
6
- import { GetRowsReturnType } from 'src/row/queries/types/get-rows.types';
2
+ import { GetRowCountReferencesByInput, GetRowInput, GetRowsInput } from '../../graphql-api/row/inputs';
3
+ import { GetRowReferencesInput } from '../../graphql-api/row/inputs/get-row-references.input';
4
+ import { RowModel } from '../../graphql-api/row/model/row.model';
5
+ import { GetRowReturnType } from '../../row/queries/types';
6
+ import { GetRowsReturnType } from '../../row/queries/types/get-rows.types';
7
7
  export declare class RowResolver {
8
8
  private queryBus;
9
9
  constructor(queryBus: QueryBus);
@@ -1,5 +1,5 @@
1
1
  import { Type } from '@nestjs/common';
2
- import { IPageInfo, IPaginatedType } from 'src/share/pagination.interface';
2
+ import { IPageInfo, IPaginatedType } from '../../../share/pagination.interface';
3
3
  export declare class PageInfo implements IPageInfo {
4
4
  endCursor?: string;
5
5
  hasNextPage: boolean;
@@ -1,4 +1,4 @@
1
- import { TableModel } from 'src/graphql-api/table/model/table.model';
1
+ import { TableModel } from '../../../graphql-api/table/model/table.model';
2
2
  declare const TablesConnection_base: import("@nestjs/common").Type<import("../../../share/pagination.interface").IPaginatedType<TableModel>>;
3
3
  export declare class TablesConnection extends TablesConnection_base {
4
4
  }
@@ -1,6 +1,6 @@
1
1
  import { Prisma } from '@prisma/client';
2
- import { RowsConnection } from 'src/graphql-api/row/model/rows-connection.model';
3
- import { TablesConnection } from 'src/graphql-api/table/model/table-connection.model';
2
+ import { RowsConnection } from '../../../graphql-api/row/model/rows-connection.model';
3
+ import { TablesConnection } from '../../../graphql-api/table/model/table-connection.model';
4
4
  export type TableModelContext = {
5
5
  revisionId: string;
6
6
  };
@@ -1,10 +1,10 @@
1
1
  import { QueryBus } from '@nestjs/cqrs';
2
- import { GetTableReferencesInput } from 'src/graphql-api/table/inputs/get-table-references.input';
3
- import { GetTableRowsInput } from 'src/graphql-api/table/inputs/get-table-rows.input';
4
- import { GetTableInput } from 'src/graphql-api/table/inputs/get-table.input';
5
- import { GetTablesInput } from 'src/graphql-api/table/inputs/get-tables.input';
6
- import { TableModel } from 'src/graphql-api/table/model/table.model';
7
- import { GetTableReturnType, GetTableRowsReturnType, GetTablesReturnType } from 'src/table/queries/types';
2
+ import { GetTableReferencesInput } from '../../graphql-api/table/inputs/get-table-references.input';
3
+ import { GetTableRowsInput } from '../../graphql-api/table/inputs/get-table-rows.input';
4
+ import { GetTableInput } from '../../graphql-api/table/inputs/get-table.input';
5
+ import { GetTablesInput } from '../../graphql-api/table/inputs/get-tables.input';
6
+ import { TableModel } from '../../graphql-api/table/model/table.model';
7
+ import { GetTableReturnType, GetTableRowsReturnType, GetTablesReturnType } from '../../table/queries/types';
8
8
  export declare class TableResolver {
9
9
  private queryBus;
10
10
  constructor(queryBus: QueryBus);
@@ -1,8 +1,8 @@
1
1
  import { CommandBus, QueryBus } from '@nestjs/cqrs';
2
- import { IAuthUser } from 'src/auth/types';
3
- import { GetMeProjectsInput, SetUsernameInput, UpdatePasswordInput } from 'src/graphql-api/user/inputs';
4
- import { UserModel } from 'src/graphql-api/user/model/user.model';
5
- import { GetProjectsByUserIdQueryReturnType, GetUserOrganizationQueryReturnType, GetUserQueryReturnType } from 'src/user/queries/impl';
2
+ import { IAuthUser } from '../../auth/types';
3
+ import { GetMeProjectsInput, SetUsernameInput, UpdatePasswordInput } from '../../graphql-api/user/inputs';
4
+ import { UserModel } from '../../graphql-api/user/model/user.model';
5
+ import { GetProjectsByUserIdQueryReturnType, GetUserOrganizationQueryReturnType, GetUserQueryReturnType } from '../../user/queries/impl';
6
6
  export declare class UserResolver {
7
7
  private readonly queryBus;
8
8
  private readonly commandBus;
@@ -25,6 +25,7 @@ __decorate([
25
25
  __metadata("design:returntype", void 0)
26
26
  ], HealthController.prototype, "get", null);
27
27
  exports.HealthController = HealthController = __decorate([
28
+ (0, swagger_1.ApiExcludeController)(),
28
29
  (0, swagger_1.ApiTags)('health'),
29
30
  (0, common_1.Controller)('health')
30
31
  ], HealthController);
@@ -1 +1 @@
1
- {"version":3,"file":"health.controller.js","sourceRoot":"","sources":["../../../src/health/health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,6CAA0C;AAInC,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAE3B,GAAG;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AALY,4CAAgB;AAE3B;IADC,IAAA,YAAG,GAAE;;;;2CAGL;2BAJU,gBAAgB;IAF5B,IAAA,iBAAO,EAAC,QAAQ,CAAC;IACjB,IAAA,mBAAU,EAAC,QAAQ,CAAC;GACR,gBAAgB,CAK5B"}
1
+ {"version":3,"file":"health.controller.js","sourceRoot":"","sources":["../../../src/health/health.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAiD;AACjD,6CAAgE;AAKzD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAE3B,GAAG;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AALY,4CAAgB;AAE3B;IADC,IAAA,YAAG,GAAE;;;;2CAGL;2BAJU,gBAAgB;IAH5B,IAAA,8BAAoB,GAAE;IACtB,IAAA,iBAAO,EAAC,QAAQ,CAAC;IACjB,IAAA,mBAAU,EAAC,QAAQ,CAAC;GACR,gBAAgB,CAK5B"}
@@ -1,2 +1,5 @@
1
- export { CoreModule } from 'src/core/core.module';
2
- export { notificationEventEmitter } from 'src/notification/notification-event-emitter';
1
+ export { CoreModule } from './core/core.module';
2
+ export { MetricsApiModule } from './metrics-api/metrics-api.module';
3
+ export { AdminModule } from './admin/admin.module';
4
+ export { AdminModuleOptions } from './admin/admin-module.options';
5
+ export { InMemoryServer } from './notification/in-memory-server';
package/dist/src/index.js CHANGED
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.notificationEventEmitter = exports.CoreModule = void 0;
3
+ exports.InMemoryServer = exports.AdminModule = exports.MetricsApiModule = exports.CoreModule = void 0;
4
4
  var core_module_1 = require("./core/core.module");
5
5
  Object.defineProperty(exports, "CoreModule", { enumerable: true, get: function () { return core_module_1.CoreModule; } });
6
- var notification_event_emitter_1 = require("./notification/notification-event-emitter");
7
- Object.defineProperty(exports, "notificationEventEmitter", { enumerable: true, get: function () { return notification_event_emitter_1.notificationEventEmitter; } });
6
+ var metrics_api_module_1 = require("./metrics-api/metrics-api.module");
7
+ Object.defineProperty(exports, "MetricsApiModule", { enumerable: true, get: function () { return metrics_api_module_1.MetricsApiModule; } });
8
+ var admin_module_1 = require("./admin/admin.module");
9
+ Object.defineProperty(exports, "AdminModule", { enumerable: true, get: function () { return admin_module_1.AdminModule; } });
10
+ var in_memory_server_1 = require("./notification/in-memory-server");
11
+ Object.defineProperty(exports, "InMemoryServer", { enumerable: true, get: function () { return in_memory_server_1.InMemoryServer; } });
8
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAAzC,yGAAA,UAAU,OAAA;AACnB,wFAAuF;AAA9E,sIAAA,wBAAwB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,kDAAkD;AAAzC,yGAAA,UAAU,OAAA;AACnB,uEAAsE;AAA7D,sHAAA,gBAAgB,OAAA;AACzB,qDAAqD;AAA5C,2GAAA,WAAW,OAAA;AAEpB,oEAAmE;AAA1D,kHAAA,cAAc,OAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const GRAPHQL_REQUEST_DURATION_SECONDS = "graphql_request_duration_seconds";
2
+ export declare const GRAPHQL_DID_RESOLVE_OPERATION_TOTAL = "graphql_did_resolve_operation_total";
3
+ export declare const GRAPHQL_DID_ENCOUNTER_ERRORS_TOTAL = "graphql_did_encounter_errors_total";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GRAPHQL_DID_ENCOUNTER_ERRORS_TOTAL = exports.GRAPHQL_DID_RESOLVE_OPERATION_TOTAL = exports.GRAPHQL_REQUEST_DURATION_SECONDS = void 0;
4
+ exports.GRAPHQL_REQUEST_DURATION_SECONDS = 'graphql_request_duration_seconds';
5
+ exports.GRAPHQL_DID_RESOLVE_OPERATION_TOTAL = 'graphql_did_resolve_operation_total';
6
+ exports.GRAPHQL_DID_ENCOUNTER_ERRORS_TOTAL = 'graphql_did_encounter_errors_total';
7
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/metrics/graphql/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gCAAgC,GAC3C,kCAAkC,CAAC;AAExB,QAAA,mCAAmC,GAC9C,qCAAqC,CAAC;AAE3B,QAAA,kCAAkC,GAC7C,oCAAoC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ApolloServerPlugin, BaseContext, GraphQLRequestListener } from '@apollo/server';
2
+ import { GraphqlMetricsService } from '../../metrics/graphql/graphql-metrics.service';
3
+ export declare class GraphqlMetricsPlugin implements ApolloServerPlugin {
4
+ private readonly graphqlMetrics;
5
+ constructor(graphqlMetrics: GraphqlMetricsService);
6
+ requestDidStart(): Promise<GraphQLRequestListener<BaseContext>>;
7
+ }
@@ -0,0 +1,55 @@
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.GraphqlMetricsPlugin = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const process = require("node:process");
15
+ const graphql_metrics_service_1 = require("./graphql-metrics.service");
16
+ const utils_1 = require("../utils");
17
+ let GraphqlMetricsPlugin = class GraphqlMetricsPlugin {
18
+ constructor(graphqlMetrics) {
19
+ this.graphqlMetrics = graphqlMetrics;
20
+ }
21
+ async requestDidStart() {
22
+ const startAt = process.hrtime();
23
+ return {
24
+ didResolveOperation: async (requestContext) => {
25
+ this.graphqlMetrics.didResolveOperation(getLabels(requestContext));
26
+ },
27
+ willSendResponse: async (requestContext) => {
28
+ this.graphqlMetrics.requestDurationSeconds({
29
+ ...getLabels(requestContext),
30
+ result: 'true',
31
+ }, (0, utils_1.getDurationInSeconds)(startAt));
32
+ },
33
+ didEncounterErrors: async (requestContext) => {
34
+ const labels = getLabels(requestContext);
35
+ this.graphqlMetrics.didEncounterErrors(labels);
36
+ this.graphqlMetrics.requestDurationSeconds({
37
+ ...labels,
38
+ result: 'false',
39
+ }, (0, utils_1.getDurationInSeconds)(startAt));
40
+ },
41
+ };
42
+ }
43
+ };
44
+ exports.GraphqlMetricsPlugin = GraphqlMetricsPlugin;
45
+ exports.GraphqlMetricsPlugin = GraphqlMetricsPlugin = __decorate([
46
+ (0, common_1.Injectable)(),
47
+ __metadata("design:paramtypes", [graphql_metrics_service_1.GraphqlMetricsService])
48
+ ], GraphqlMetricsPlugin);
49
+ function getLabels(context) {
50
+ return {
51
+ operationName: context.request.operationName,
52
+ operation: context.operation?.operation,
53
+ };
54
+ }
55
+ //# sourceMappingURL=graphql-metrics.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-metrics.plugin.js","sourceRoot":"","sources":["../../../../src/metrics/graphql/graphql-metrics.plugin.ts"],"names":[],"mappings":";;;;;;;;;;;;AAKA,2CAA4C;AAC5C,wCAAwC;AACxC,uEAAoF;AACpF,oCAAyD;AAGlD,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;IAC/B,YAA6B,cAAqC;QAArC,mBAAc,GAAd,cAAc,CAAuB;IAAG,CAAC;IAEtE,KAAK,CAAC,eAAe;QACnB,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjC,OAAO;YACL,mBAAmB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;gBAC5C,IAAI,CAAC,cAAc,CAAC,mBAAmB,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;YACrE,CAAC;YAED,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;gBACzC,IAAI,CAAC,cAAc,CAAC,sBAAsB,CACxC;oBACE,GAAG,SAAS,CAAC,cAAc,CAAC;oBAC5B,MAAM,EAAE,MAAM;iBACf,EACD,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAC9B,CAAC;YACJ,CAAC;YAED,kBAAkB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;gBAC3C,MAAM,MAAM,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;gBAEzC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAE/C,IAAI,CAAC,cAAc,CAAC,sBAAsB,CACxC;oBACE,GAAG,MAAM;oBACT,MAAM,EAAE,OAAO;iBAChB,EACD,IAAA,4BAAoB,EAAC,OAAO,CAAC,CAC9B,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAA;AApCY,oDAAoB;+BAApB,oBAAoB;IADhC,IAAA,mBAAU,GAAE;qCAEkC,+CAAqB;GADvD,oBAAoB,CAoChC;AAED,SAAS,SAAS,CAAC,OAGlB;IACC,OAAO;QACL,aAAa,EAAE,OAAO,CAAC,OAAO,CAAC,aAAa;QAC5C,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,SAAS;KACxC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ type Labels = {
2
+ operationName?: string;
3
+ operation?: string;
4
+ };
5
+ export declare class GraphqlMetricsService {
6
+ private readonly requestDurationSecondsHistogram;
7
+ private readonly didResolveOperationTotalCounter;
8
+ private readonly didEncounterErrorsTotalCounter;
9
+ constructor();
10
+ requestDurationSeconds(labels: Labels & {
11
+ result?: 'true' | 'false';
12
+ }, durationInSeconds: number): void;
13
+ didResolveOperation(labels: Labels): void;
14
+ didEncounterErrors(labels: Labels): void;
15
+ }
16
+ export {};
@@ -0,0 +1,49 @@
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.GraphqlMetricsService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const constants_1 = require("./constants");
15
+ const client = require("prom-client");
16
+ let GraphqlMetricsService = class GraphqlMetricsService {
17
+ constructor() {
18
+ this.requestDurationSecondsHistogram = new client.Histogram({
19
+ name: constants_1.GRAPHQL_REQUEST_DURATION_SECONDS,
20
+ help: 'Duration of GraphQL requests in seconds',
21
+ labelNames: ['operationName', 'operation', 'result'],
22
+ });
23
+ this.didResolveOperationTotalCounter = new client.Counter({
24
+ name: constants_1.GRAPHQL_DID_RESOLVE_OPERATION_TOTAL,
25
+ help: 'Total number of successfully resolved GraphQL operations',
26
+ labelNames: ['operationName', 'operation'],
27
+ });
28
+ this.didEncounterErrorsTotalCounter = new client.Counter({
29
+ name: constants_1.GRAPHQL_DID_ENCOUNTER_ERRORS_TOTAL,
30
+ help: 'Total number of errors encountered during GraphQL request processing',
31
+ labelNames: ['operationName', 'operation'],
32
+ });
33
+ }
34
+ requestDurationSeconds(labels, durationInSeconds) {
35
+ this.requestDurationSecondsHistogram.observe(labels, durationInSeconds);
36
+ }
37
+ didResolveOperation(labels) {
38
+ this.didResolveOperationTotalCounter.inc(labels);
39
+ }
40
+ didEncounterErrors(labels) {
41
+ this.didEncounterErrorsTotalCounter.inc(labels);
42
+ }
43
+ };
44
+ exports.GraphqlMetricsService = GraphqlMetricsService;
45
+ exports.GraphqlMetricsService = GraphqlMetricsService = __decorate([
46
+ (0, common_1.Injectable)(),
47
+ __metadata("design:paramtypes", [])
48
+ ], GraphqlMetricsService);
49
+ //# sourceMappingURL=graphql-metrics.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-metrics.service.js","sourceRoot":"","sources":["../../../../src/metrics/graphql/graphql-metrics.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAIuC;AACvC,sCAAsC;AAQ/B,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAmBhC;QAlBiB,oCAA+B,GAAG,IAAI,MAAM,CAAC,SAAS,CAAC;YACtE,IAAI,EAAE,4CAAgC;YACtC,IAAI,EAAE,yCAAyC;YAC/C,UAAU,EAAE,CAAC,eAAe,EAAE,WAAW,EAAE,QAAQ,CAAC;SACrD,CAAC,CAAC;QAEc,oCAA+B,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC;YACpE,IAAI,EAAE,+CAAmC;YACzC,IAAI,EAAE,0DAA0D;YAChE,UAAU,EAAE,CAAC,eAAe,EAAE,WAAW,CAAC;SAC3C,CAAC,CAAC;QAEc,mCAA8B,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC;YACnE,IAAI,EAAE,8CAAkC;YACxC,IAAI,EAAE,sEAAsE;YAC5E,UAAU,EAAE,CAAC,eAAe,EAAE,WAAW,CAAC;SAC3C,CAAC,CAAC;IAEY,CAAC;IAET,sBAAsB,CAC3B,MAEC,EACD,iBAAyB;QAEzB,IAAI,CAAC,+BAA+B,CAAC,OAAO,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAEM,mBAAmB,CAAC,MAAc;QACvC,IAAI,CAAC,+BAA+B,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAEM,kBAAkB,CAAC,MAAc;QACtC,IAAI,CAAC,8BAA8B,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;CACF,CAAA;AArCY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;;GACA,qBAAqB,CAqCjC"}
@@ -0,0 +1,2 @@
1
+ export declare class MetricsModule {
2
+ }
@@ -0,0 +1,32 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.MetricsModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const config_1 = require("@nestjs/config");
12
+ const database_module_1 = require("../database/database.module");
13
+ const graphql_metrics_plugin_1 = require("./graphql/graphql-metrics.plugin");
14
+ const graphql_metrics_service_1 = require("./graphql/graphql-metrics.service");
15
+ const rest_metrics_interceptor_1 = require("./rest/rest-metrics.interceptor");
16
+ const rest_metrics_service_1 = require("./rest/rest-metrics.service");
17
+ let MetricsModule = class MetricsModule {
18
+ };
19
+ exports.MetricsModule = MetricsModule;
20
+ exports.MetricsModule = MetricsModule = __decorate([
21
+ (0, common_1.Module)({
22
+ imports: [database_module_1.DatabaseModule, config_1.ConfigModule],
23
+ providers: [
24
+ graphql_metrics_service_1.GraphqlMetricsService,
25
+ graphql_metrics_plugin_1.GraphqlMetricsPlugin,
26
+ rest_metrics_service_1.RestMetricsService,
27
+ rest_metrics_interceptor_1.RestMetricsInterceptor,
28
+ ],
29
+ exports: [graphql_metrics_plugin_1.GraphqlMetricsPlugin, rest_metrics_service_1.RestMetricsService, rest_metrics_interceptor_1.RestMetricsInterceptor],
30
+ })
31
+ ], MetricsModule);
32
+ //# sourceMappingURL=metrics.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.module.js","sourceRoot":"","sources":["../../../src/metrics/metrics.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2CAA8C;AAC9C,iEAA8D;AAC9D,6EAAkF;AAClF,+EAAoF;AACpF,8EAAmF;AACnF,sEAA2E;AAYpE,IAAM,aAAa,GAAnB,MAAM,aAAa;CAAG,CAAA;AAAhB,sCAAa;wBAAb,aAAa;IAVzB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,gCAAc,EAAE,qBAAY,CAAC;QACvC,SAAS,EAAE;YACT,+CAAqB;YACrB,6CAAoB;YACpB,yCAAkB;YAClB,iDAAsB;SACvB;QACD,OAAO,EAAE,CAAC,6CAAoB,EAAE,yCAAkB,EAAE,iDAAsB,CAAC;KAC5E,CAAC;GACW,aAAa,CAAG"}
@@ -0,0 +1,3 @@
1
+ export declare const REST_REQUEST_DURATION_SECONDS = "rest_request_duration_seconds";
2
+ export declare const REST_REQUESTS_TOTAL = "rest_requests_total";
3
+ export declare const REST_REQUEST_ERRORS_TOTAL = "rest_requests_errors_total";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REST_REQUEST_ERRORS_TOTAL = exports.REST_REQUESTS_TOTAL = exports.REST_REQUEST_DURATION_SECONDS = void 0;
4
+ exports.REST_REQUEST_DURATION_SECONDS = 'rest_request_duration_seconds';
5
+ exports.REST_REQUESTS_TOTAL = 'rest_requests_total';
6
+ exports.REST_REQUEST_ERRORS_TOTAL = 'rest_requests_errors_total';
7
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/metrics/rest/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG,+BAA+B,CAAC;AAEhE,QAAA,mBAAmB,GAAG,qBAAqB,CAAC;AAE5C,QAAA,yBAAyB,GAAG,4BAA4B,CAAC"}