@dssp/supervision 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (501) hide show
  1. package/dist-client/bootstrap.d.ts +1 -0
  2. package/dist-client/bootstrap.js +2 -0
  3. package/dist-client/bootstrap.js.map +1 -0
  4. package/dist-client/graphql/building-inspection.d.ts +1 -0
  5. package/dist-client/graphql/building-inspection.js +102 -0
  6. package/dist-client/graphql/building-inspection.js.map +1 -0
  7. package/dist-client/index.d.ts +0 -0
  8. package/dist-client/index.js +2 -0
  9. package/dist-client/index.js.map +1 -0
  10. package/dist-client/pages/action-plan/action-plan-importer.d.ts +10 -0
  11. package/dist-client/pages/action-plan/action-plan-importer.js +101 -0
  12. package/dist-client/pages/action-plan/action-plan-importer.js.map +1 -0
  13. package/dist-client/pages/action-plan/action-plan-list-page.d.ts +62 -0
  14. package/dist-client/pages/action-plan/action-plan-list-page.js +322 -0
  15. package/dist-client/pages/action-plan/action-plan-list-page.js.map +1 -0
  16. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.d.ts +22 -0
  17. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +171 -0
  18. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +1 -0
  19. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +71 -0
  20. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +1407 -0
  21. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +1 -0
  22. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.d.ts +59 -0
  23. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js +868 -0
  24. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement_old_ai.js.map +1 -0
  25. package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +27 -0
  26. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +342 -0
  27. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +1 -0
  28. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +31 -0
  29. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +332 -0
  30. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +1 -0
  31. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +36 -0
  32. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +369 -0
  33. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +1 -0
  34. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +98 -0
  35. package/dist-client/pages/building-inspection/building-inspection-list.js +914 -0
  36. package/dist-client/pages/building-inspection/building-inspection-list.js.map +1 -0
  37. package/dist-client/pages/building-inspection/building-inspection-management.d.ts +82 -0
  38. package/dist-client/pages/building-inspection/building-inspection-management.js +1527 -0
  39. package/dist-client/pages/building-inspection/building-inspection-management.js.map +1 -0
  40. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +1 -0
  41. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +178 -0
  42. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +1 -0
  43. package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +27 -0
  44. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +542 -0
  45. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +1 -0
  46. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.d.ts +18 -0
  47. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js +630 -0
  48. package/dist-client/pages/building-inspection/component/field-document/field-document-constants.js.map +1 -0
  49. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.d.ts +10 -0
  50. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js +219 -0
  51. package/dist-client/pages/building-inspection/component/field-document/field-document-detail-popup.js.map +1 -0
  52. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.d.ts +25 -0
  53. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js +546 -0
  54. package/dist-client/pages/building-inspection/component/field-document/field-document-list-panel.js.map +1 -0
  55. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.d.ts +42 -0
  56. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js +738 -0
  57. package/dist-client/pages/building-inspection/component/field-document/field-document-popup.js.map +1 -0
  58. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +15 -0
  59. package/dist-client/pages/building-inspection/component/image-preview-popup.js +348 -0
  60. package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +1 -0
  61. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +25 -0
  62. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +491 -0
  63. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +1 -0
  64. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +31 -0
  65. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +485 -0
  66. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +1 -0
  67. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +27 -0
  68. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +416 -0
  69. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +1 -0
  70. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +9 -0
  71. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +190 -0
  72. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +1 -0
  73. package/dist-client/pages/building-inspection/inspection-create-popup.d.ts +3 -0
  74. package/dist-client/pages/building-inspection/inspection-create-popup.js +841 -0
  75. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +1 -0
  76. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.d.ts +4 -0
  77. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js +844 -0
  78. package/dist-client/pages/building-inspection/inspection-with-checklist-create-popup.js.map +1 -0
  79. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +60 -0
  80. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +1135 -0
  81. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +1 -0
  82. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.d.ts +2 -0
  83. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +740 -0
  84. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +1 -0
  85. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.d.ts +19 -0
  86. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +205 -0
  87. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +1 -0
  88. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.d.ts +1 -0
  89. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js +304 -0
  90. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js.map +1 -0
  91. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +15 -0
  92. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +430 -0
  93. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +1 -0
  94. package/dist-client/pages/checklist/attachment-list-popup.d.ts +3 -0
  95. package/dist-client/pages/checklist/attachment-list-popup.js +492 -0
  96. package/dist-client/pages/checklist/attachment-list-popup.js.map +1 -0
  97. package/dist-client/pages/checklist/checklist-view.d.ts +16 -0
  98. package/dist-client/pages/checklist/checklist-view.js +926 -0
  99. package/dist-client/pages/checklist/checklist-view.js.map +1 -0
  100. package/dist-client/pages/checklist/comment-list-popup.d.ts +1 -0
  101. package/dist-client/pages/checklist/comment-list-popup.js +367 -0
  102. package/dist-client/pages/checklist/comment-list-popup.js.map +1 -0
  103. package/dist-client/pages/checklist/file-preview-popup.d.ts +1 -0
  104. package/dist-client/pages/checklist/file-preview-popup.js +77 -0
  105. package/dist-client/pages/checklist/file-preview-popup.js.map +1 -0
  106. package/dist-client/pages/checklist/inspection-info-popup.d.ts +49 -0
  107. package/dist-client/pages/checklist/inspection-info-popup.js +683 -0
  108. package/dist-client/pages/checklist/inspection-info-popup.js.map +1 -0
  109. package/dist-client/pages/checklist/inspection-tab-popup.d.ts +18 -0
  110. package/dist-client/pages/checklist/inspection-tab-popup.js +196 -0
  111. package/dist-client/pages/checklist/inspection-tab-popup.js.map +1 -0
  112. package/dist-client/pages/checklist/kcs-criteria-popup.d.ts +16 -0
  113. package/dist-client/pages/checklist/kcs-criteria-popup.js +179 -0
  114. package/dist-client/pages/checklist/kcs-criteria-popup.js.map +1 -0
  115. package/dist-client/pages/checklist-database/checklist-database.d.ts +35 -0
  116. package/dist-client/pages/checklist-database/checklist-database.js +540 -0
  117. package/dist-client/pages/checklist-database/checklist-database.js.map +1 -0
  118. package/dist-client/pages/checklist-template/checklist-template-item.d.ts +2 -0
  119. package/dist-client/pages/checklist-template/checklist-template-item.js +278 -0
  120. package/dist-client/pages/checklist-template/checklist-template-item.js.map +1 -0
  121. package/dist-client/pages/checklist-template/checklist-template-list.d.ts +53 -0
  122. package/dist-client/pages/checklist-template/checklist-template-list.js +350 -0
  123. package/dist-client/pages/checklist-template/checklist-template-list.js.map +1 -0
  124. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +55 -0
  125. package/dist-client/pages/checklist-template/checklist-type-management.js +250 -0
  126. package/dist-client/pages/checklist-template/checklist-type-management.js.map +1 -0
  127. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.d.ts +2 -0
  128. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js +223 -0
  129. package/dist-client/pages/checklist-template/construction-checklist-template-item-popup.js.map +1 -0
  130. package/dist-client/pages/checklist-template/construction-checklist-template-list.d.ts +55 -0
  131. package/dist-client/pages/checklist-template/construction-checklist-template-list.js +404 -0
  132. package/dist-client/pages/checklist-template/construction-checklist-template-list.js.map +1 -0
  133. package/dist-client/pages/issue/issue-importer.d.ts +10 -0
  134. package/dist-client/pages/issue/issue-importer.js +101 -0
  135. package/dist-client/pages/issue/issue-importer.js.map +1 -0
  136. package/dist-client/pages/issue/issue-list-page.d.ts +62 -0
  137. package/dist-client/pages/issue/issue-list-page.js +322 -0
  138. package/dist-client/pages/issue/issue-list-page.js.map +1 -0
  139. package/dist-client/pages/project-checklist/project-checklist-management.d.ts +62 -0
  140. package/dist-client/pages/project-checklist/project-checklist-management.js +1145 -0
  141. package/dist-client/pages/project-checklist/project-checklist-management.js.map +1 -0
  142. package/dist-client/pages/project-report/project-report-importer.d.ts +10 -0
  143. package/dist-client/pages/project-report/project-report-importer.js +101 -0
  144. package/dist-client/pages/project-report/project-report-importer.js.map +1 -0
  145. package/dist-client/pages/project-report/project-report-list-page.d.ts +62 -0
  146. package/dist-client/pages/project-report/project-report-list-page.js +322 -0
  147. package/dist-client/pages/project-report/project-report-list-page.js.map +1 -0
  148. package/dist-client/pages/supervisor/supervisor-importer.d.ts +10 -0
  149. package/dist-client/pages/supervisor/supervisor-importer.js +101 -0
  150. package/dist-client/pages/supervisor/supervisor-importer.js.map +1 -0
  151. package/dist-client/pages/supervisor/supervisor-list-page.d.ts +62 -0
  152. package/dist-client/pages/supervisor/supervisor-list-page.js +322 -0
  153. package/dist-client/pages/supervisor/supervisor-list-page.js.map +1 -0
  154. package/dist-client/route.d.ts +1 -0
  155. package/dist-client/route.js +44 -0
  156. package/dist-client/route.js.map +1 -0
  157. package/dist-client/stt/speech-to-text.d.ts +41 -0
  158. package/dist-client/stt/speech-to-text.js +331 -0
  159. package/dist-client/stt/speech-to-text.js.map +1 -0
  160. package/dist-client/stt/stt-utils.d.ts +28 -0
  161. package/dist-client/stt/stt-utils.js +146 -0
  162. package/dist-client/stt/stt-utils.js.map +1 -0
  163. package/dist-client/tsconfig.tsbuildinfo +1 -0
  164. package/dist-server/controllers/index.d.ts +0 -0
  165. package/dist-server/controllers/index.js +1 -0
  166. package/dist-server/controllers/index.js.map +1 -0
  167. package/dist-server/index.d.ts +3 -0
  168. package/dist-server/index.js +7 -0
  169. package/dist-server/index.js.map +1 -0
  170. package/dist-server/middlewares/index.d.ts +1 -0
  171. package/dist-server/middlewares/index.js +7 -0
  172. package/dist-server/middlewares/index.js.map +1 -0
  173. package/dist-server/migrations/index.d.ts +1 -0
  174. package/dist-server/migrations/index.js +12 -0
  175. package/dist-server/migrations/index.js.map +1 -0
  176. package/dist-server/routes.d.ts +0 -0
  177. package/dist-server/routes.js +25 -0
  178. package/dist-server/routes.js.map +1 -0
  179. package/dist-server/service/action-plan/action-plan-mutation.d.ts +10 -0
  180. package/dist-server/service/action-plan/action-plan-mutation.js +167 -0
  181. package/dist-server/service/action-plan/action-plan-mutation.js.map +1 -0
  182. package/dist-server/service/action-plan/action-plan-query.d.ts +12 -0
  183. package/dist-server/service/action-plan/action-plan-query.js +91 -0
  184. package/dist-server/service/action-plan/action-plan-query.js.map +1 -0
  185. package/dist-server/service/action-plan/action-plan-type.d.ts +23 -0
  186. package/dist-server/service/action-plan/action-plan-type.js +86 -0
  187. package/dist-server/service/action-plan/action-plan-type.js.map +1 -0
  188. package/dist-server/service/action-plan/action-plan.d.ts +27 -0
  189. package/dist-server/service/action-plan/action-plan.js +116 -0
  190. package/dist-server/service/action-plan/action-plan.js.map +1 -0
  191. package/dist-server/service/action-plan/index.d.ts +5 -0
  192. package/dist-server/service/action-plan/index.js +9 -0
  193. package/dist-server/service/action-plan/index.js.map +1 -0
  194. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +9 -0
  195. package/dist-server/service/building-inspection/building-inspection-mutation.js +404 -0
  196. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +1 -0
  197. package/dist-server/service/building-inspection/building-inspection-query.d.ts +24 -0
  198. package/dist-server/service/building-inspection/building-inspection-query.js +406 -0
  199. package/dist-server/service/building-inspection/building-inspection-query.js.map +1 -0
  200. package/dist-server/service/building-inspection/building-inspection-type.d.ts +89 -0
  201. package/dist-server/service/building-inspection/building-inspection-type.js +330 -0
  202. package/dist-server/service/building-inspection/building-inspection-type.js.map +1 -0
  203. package/dist-server/service/building-inspection/building-inspection.d.ts +42 -0
  204. package/dist-server/service/building-inspection/building-inspection.js +186 -0
  205. package/dist-server/service/building-inspection/building-inspection.js.map +1 -0
  206. package/dist-server/service/building-inspection/index.d.ts +7 -0
  207. package/dist-server/service/building-inspection/index.js +19 -0
  208. package/dist-server/service/building-inspection/index.js.map +1 -0
  209. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +6 -0
  210. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +66 -0
  211. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +1 -0
  212. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +16 -0
  213. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +171 -0
  214. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +1 -0
  215. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +23 -0
  216. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +90 -0
  217. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +1 -0
  218. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +33 -0
  219. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +132 -0
  220. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +1 -0
  221. package/dist-server/service/building-inspection-daily-worklog/index.d.ts +5 -0
  222. package/dist-server/service/building-inspection-daily-worklog/index.js +9 -0
  223. package/dist-server/service/building-inspection-daily-worklog/index.js.map +1 -0
  224. package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +16 -0
  225. package/dist-server/service/building-inspection-history/building-inspection-history-query.js +120 -0
  226. package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +1 -0
  227. package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +5 -0
  228. package/dist-server/service/building-inspection-history/building-inspection-history-type.js +21 -0
  229. package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +1 -0
  230. package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +35 -0
  231. package/dist-server/service/building-inspection-history/building-inspection-history.js +162 -0
  232. package/dist-server/service/building-inspection-history/building-inspection-history.js.map +1 -0
  233. package/dist-server/service/building-inspection-history/event-subscriber.d.ts +7 -0
  234. package/dist-server/service/building-inspection-history/event-subscriber.js +21 -0
  235. package/dist-server/service/building-inspection-history/event-subscriber.js.map +1 -0
  236. package/dist-server/service/building-inspection-history/index.d.ts +6 -0
  237. package/dist-server/service/building-inspection-history/index.js +10 -0
  238. package/dist-server/service/building-inspection-history/index.js.map +1 -0
  239. package/dist-server/service/checklist/checklist-mutation.d.ts +3 -0
  240. package/dist-server/service/checklist/checklist-mutation.js +30 -0
  241. package/dist-server/service/checklist/checklist-mutation.js.map +1 -0
  242. package/dist-server/service/checklist/checklist-query.d.ts +21 -0
  243. package/dist-server/service/checklist/checklist-query.js +177 -0
  244. package/dist-server/service/checklist/checklist-query.js.map +1 -0
  245. package/dist-server/service/checklist/checklist-type.d.ts +5 -0
  246. package/dist-server/service/checklist/checklist-type.js +21 -0
  247. package/dist-server/service/checklist/checklist-type.js.map +1 -0
  248. package/dist-server/service/checklist/checklist.d.ts +66 -0
  249. package/dist-server/service/checklist/checklist.js +259 -0
  250. package/dist-server/service/checklist/checklist.js.map +1 -0
  251. package/dist-server/service/checklist/event-subscriber.d.ts +7 -0
  252. package/dist-server/service/checklist/event-subscriber.js +21 -0
  253. package/dist-server/service/checklist/event-subscriber.js.map +1 -0
  254. package/dist-server/service/checklist/index.d.ts +5 -0
  255. package/dist-server/service/checklist/index.js +9 -0
  256. package/dist-server/service/checklist/index.js.map +1 -0
  257. package/dist-server/service/checklist-history/checklist-history-query.d.ts +11 -0
  258. package/dist-server/service/checklist-history/checklist-history-query.js +77 -0
  259. package/dist-server/service/checklist-history/checklist-history-query.js.map +1 -0
  260. package/dist-server/service/checklist-history/checklist-history-type.d.ts +5 -0
  261. package/dist-server/service/checklist-history/checklist-history-type.js +21 -0
  262. package/dist-server/service/checklist-history/checklist-history-type.js.map +1 -0
  263. package/dist-server/service/checklist-history/checklist-history.d.ts +50 -0
  264. package/dist-server/service/checklist-history/checklist-history.js +239 -0
  265. package/dist-server/service/checklist-history/checklist-history.js.map +1 -0
  266. package/dist-server/service/checklist-history/event-subscriber.d.ts +7 -0
  267. package/dist-server/service/checklist-history/event-subscriber.js +21 -0
  268. package/dist-server/service/checklist-history/event-subscriber.js.map +1 -0
  269. package/dist-server/service/checklist-history/index.d.ts +6 -0
  270. package/dist-server/service/checklist-history/index.js +10 -0
  271. package/dist-server/service/checklist-history/index.js.map +1 -0
  272. package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +4 -0
  273. package/dist-server/service/checklist-item/checklist-item-mutation.js +39 -0
  274. package/dist-server/service/checklist-item/checklist-item-mutation.js.map +1 -0
  275. package/dist-server/service/checklist-item/checklist-item-query.d.ts +18 -0
  276. package/dist-server/service/checklist-item/checklist-item-query.js +138 -0
  277. package/dist-server/service/checklist-item/checklist-item-query.js.map +1 -0
  278. package/dist-server/service/checklist-item/checklist-item-type.d.ts +9 -0
  279. package/dist-server/service/checklist-item/checklist-item-type.js +35 -0
  280. package/dist-server/service/checklist-item/checklist-item-type.js.map +1 -0
  281. package/dist-server/service/checklist-item/checklist-item.d.ts +29 -0
  282. package/dist-server/service/checklist-item/checklist-item.js +124 -0
  283. package/dist-server/service/checklist-item/checklist-item.js.map +1 -0
  284. package/dist-server/service/checklist-item/index.d.ts +5 -0
  285. package/dist-server/service/checklist-item/index.js +9 -0
  286. package/dist-server/service/checklist-item/index.js.map +1 -0
  287. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.d.ts +16 -0
  288. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +83 -0
  289. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +1 -0
  290. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +8 -0
  291. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +114 -0
  292. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +1 -0
  293. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.d.ts +7 -0
  294. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +49 -0
  295. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +1 -0
  296. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.d.ts +14 -0
  297. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +53 -0
  298. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +1 -0
  299. package/dist-server/service/checklist-item-comment/checklist-item-comment.d.ts +12 -0
  300. package/dist-server/service/checklist-item-comment/checklist-item-comment.js +57 -0
  301. package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +1 -0
  302. package/dist-server/service/checklist-item-comment/index.d.ts +5 -0
  303. package/dist-server/service/checklist-item-comment/index.js +10 -0
  304. package/dist-server/service/checklist-item-comment/index.js.map +1 -0
  305. package/dist-server/service/checklist-item-history/checklist-item-history-query.d.ts +16 -0
  306. package/dist-server/service/checklist-item-history/checklist-item-history-query.js +123 -0
  307. package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +1 -0
  308. package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +5 -0
  309. package/dist-server/service/checklist-item-history/checklist-item-history-type.js +21 -0
  310. package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +1 -0
  311. package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +27 -0
  312. package/dist-server/service/checklist-item-history/checklist-item-history.js +133 -0
  313. package/dist-server/service/checklist-item-history/checklist-item-history.js.map +1 -0
  314. package/dist-server/service/checklist-item-history/event-subscriber.d.ts +7 -0
  315. package/dist-server/service/checklist-item-history/event-subscriber.js +21 -0
  316. package/dist-server/service/checklist-item-history/event-subscriber.js.map +1 -0
  317. package/dist-server/service/checklist-item-history/index.d.ts +6 -0
  318. package/dist-server/service/checklist-item-history/index.js +10 -0
  319. package/dist-server/service/checklist-item-history/index.js.map +1 -0
  320. package/dist-server/service/checklist-template/checklist-template-mutation.d.ts +6 -0
  321. package/dist-server/service/checklist-template/checklist-template-mutation.js +64 -0
  322. package/dist-server/service/checklist-template/checklist-template-mutation.js.map +1 -0
  323. package/dist-server/service/checklist-template/checklist-template-query.d.ts +10 -0
  324. package/dist-server/service/checklist-template/checklist-template-query.js +62 -0
  325. package/dist-server/service/checklist-template/checklist-template-query.js.map +1 -0
  326. package/dist-server/service/checklist-template/checklist-template-type.d.ts +10 -0
  327. package/dist-server/service/checklist-template/checklist-template-type.js +39 -0
  328. package/dist-server/service/checklist-template/checklist-template-type.js.map +1 -0
  329. package/dist-server/service/checklist-template/checklist-template.d.ts +17 -0
  330. package/dist-server/service/checklist-template/checklist-template.js +78 -0
  331. package/dist-server/service/checklist-template/checklist-template.js.map +1 -0
  332. package/dist-server/service/checklist-template/index.d.ts +5 -0
  333. package/dist-server/service/checklist-template/index.js +9 -0
  334. package/dist-server/service/checklist-template/index.js.map +1 -0
  335. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.d.ts +7 -0
  336. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +80 -0
  337. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +1 -0
  338. package/dist-server/service/checklist-template-item/checklist-template-item-query.d.ts +11 -0
  339. package/dist-server/service/checklist-template-item/checklist-template-item-query.js +78 -0
  340. package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +1 -0
  341. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +19 -0
  342. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +69 -0
  343. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +1 -0
  344. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +26 -0
  345. package/dist-server/service/checklist-template-item/checklist-template-item.js +106 -0
  346. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +1 -0
  347. package/dist-server/service/checklist-template-item/index.d.ts +5 -0
  348. package/dist-server/service/checklist-template-item/index.js +9 -0
  349. package/dist-server/service/checklist-template-item/index.js.map +1 -0
  350. package/dist-server/service/checklist-template-item/spec-matching-service.d.ts +2 -0
  351. package/dist-server/service/checklist-template-item/spec-matching-service.js +51 -0
  352. package/dist-server/service/checklist-template-item/spec-matching-service.js.map +1 -0
  353. package/dist-server/service/checklist-type/checklist-type-mutation.d.ts +6 -0
  354. package/dist-server/service/checklist-type/checklist-type-mutation.js +64 -0
  355. package/dist-server/service/checklist-type/checklist-type-mutation.js.map +1 -0
  356. package/dist-server/service/checklist-type/checklist-type-query.d.ts +10 -0
  357. package/dist-server/service/checklist-type/checklist-type-query.js +62 -0
  358. package/dist-server/service/checklist-type/checklist-type-query.js.map +1 -0
  359. package/dist-server/service/checklist-type/checklist-type-type.d.ts +11 -0
  360. package/dist-server/service/checklist-type/checklist-type-type.js +43 -0
  361. package/dist-server/service/checklist-type/checklist-type-type.js.map +1 -0
  362. package/dist-server/service/checklist-type/checklist-type.d.ts +19 -0
  363. package/dist-server/service/checklist-type/checklist-type.js +78 -0
  364. package/dist-server/service/checklist-type/checklist-type.js.map +1 -0
  365. package/dist-server/service/checklist-type/index.d.ts +5 -0
  366. package/dist-server/service/checklist-type/index.js +9 -0
  367. package/dist-server/service/checklist-type/index.js.map +1 -0
  368. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.d.ts +7 -0
  369. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js +107 -0
  370. package/dist-server/service/construction-checklist-template/construction-checklist-template-mutation.js.map +1 -0
  371. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.d.ts +10 -0
  372. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js +62 -0
  373. package/dist-server/service/construction-checklist-template/construction-checklist-template-query.js.map +1 -0
  374. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.d.ts +11 -0
  375. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js +43 -0
  376. package/dist-server/service/construction-checklist-template/construction-checklist-template-type.js.map +1 -0
  377. package/dist-server/service/construction-checklist-template/construction-checklist-template.d.ts +18 -0
  378. package/dist-server/service/construction-checklist-template/construction-checklist-template.js +80 -0
  379. package/dist-server/service/construction-checklist-template/construction-checklist-template.js.map +1 -0
  380. package/dist-server/service/construction-checklist-template/index.d.ts +5 -0
  381. package/dist-server/service/construction-checklist-template/index.js +9 -0
  382. package/dist-server/service/construction-checklist-template/index.js.map +1 -0
  383. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.d.ts +6 -0
  384. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js +56 -0
  385. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-mutation.js.map +1 -0
  386. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.d.ts +9 -0
  387. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js +53 -0
  388. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-query.js.map +1 -0
  389. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.d.ts +17 -0
  390. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js +67 -0
  391. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item-type.js.map +1 -0
  392. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.d.ts +24 -0
  393. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js +113 -0
  394. package/dist-server/service/construction-checklist-template-item/construction-checklist-template-item.js.map +1 -0
  395. package/dist-server/service/construction-checklist-template-item/index.d.ts +5 -0
  396. package/dist-server/service/construction-checklist-template-item/index.js +9 -0
  397. package/dist-server/service/construction-checklist-template-item/index.js.map +1 -0
  398. package/dist-server/service/field-document/field-document-auto-file.d.ts +21 -0
  399. package/dist-server/service/field-document/field-document-auto-file.js +47 -0
  400. package/dist-server/service/field-document/field-document-auto-file.js.map +1 -0
  401. package/dist-server/service/field-document/field-document-mutation.d.ts +9 -0
  402. package/dist-server/service/field-document/field-document-mutation.js +139 -0
  403. package/dist-server/service/field-document/field-document-mutation.js.map +1 -0
  404. package/dist-server/service/field-document/field-document-query.d.ts +14 -0
  405. package/dist-server/service/field-document/field-document-query.js +120 -0
  406. package/dist-server/service/field-document/field-document-query.js.map +1 -0
  407. package/dist-server/service/field-document/field-document-summary-service.d.ts +10 -0
  408. package/dist-server/service/field-document/field-document-summary-service.js +79 -0
  409. package/dist-server/service/field-document/field-document-summary-service.js.map +1 -0
  410. package/dist-server/service/field-document/field-document-type.d.ts +24 -0
  411. package/dist-server/service/field-document/field-document-type.js +88 -0
  412. package/dist-server/service/field-document/field-document-type.js.map +1 -0
  413. package/dist-server/service/field-document/field-document.d.ts +29 -0
  414. package/dist-server/service/field-document/field-document.js +127 -0
  415. package/dist-server/service/field-document/field-document.js.map +1 -0
  416. package/dist-server/service/field-document/index.d.ts +5 -0
  417. package/dist-server/service/field-document/index.js +9 -0
  418. package/dist-server/service/field-document/index.js.map +1 -0
  419. package/dist-server/service/index.d.ts +23 -0
  420. package/dist-server/service/index.js +98 -0
  421. package/dist-server/service/index.js.map +1 -0
  422. package/dist-server/service/issue/index.d.ts +5 -0
  423. package/dist-server/service/issue/index.js +9 -0
  424. package/dist-server/service/issue/index.js.map +1 -0
  425. package/dist-server/service/issue/issue-mutation.d.ts +10 -0
  426. package/dist-server/service/issue/issue-mutation.js +167 -0
  427. package/dist-server/service/issue/issue-mutation.js.map +1 -0
  428. package/dist-server/service/issue/issue-query.d.ts +12 -0
  429. package/dist-server/service/issue/issue-query.js +91 -0
  430. package/dist-server/service/issue/issue-query.js.map +1 -0
  431. package/dist-server/service/issue/issue-type.d.ts +23 -0
  432. package/dist-server/service/issue/issue-type.js +86 -0
  433. package/dist-server/service/issue/issue-type.js.map +1 -0
  434. package/dist-server/service/issue/issue.d.ts +26 -0
  435. package/dist-server/service/issue/issue.js +111 -0
  436. package/dist-server/service/issue/issue.js.map +1 -0
  437. package/dist-server/service/project-checklist/index.d.ts +5 -0
  438. package/dist-server/service/project-checklist/index.js +9 -0
  439. package/dist-server/service/project-checklist/index.js.map +1 -0
  440. package/dist-server/service/project-checklist/project-checklist-mutation.d.ts +7 -0
  441. package/dist-server/service/project-checklist/project-checklist-mutation.js +118 -0
  442. package/dist-server/service/project-checklist/project-checklist-mutation.js.map +1 -0
  443. package/dist-server/service/project-checklist/project-checklist-query.d.ts +12 -0
  444. package/dist-server/service/project-checklist/project-checklist-query.js +76 -0
  445. package/dist-server/service/project-checklist/project-checklist-query.js.map +1 -0
  446. package/dist-server/service/project-checklist/project-checklist-type.d.ts +18 -0
  447. package/dist-server/service/project-checklist/project-checklist-type.js +69 -0
  448. package/dist-server/service/project-checklist/project-checklist-type.js.map +1 -0
  449. package/dist-server/service/project-checklist/project-checklist.d.ts +20 -0
  450. package/dist-server/service/project-checklist/project-checklist.js +90 -0
  451. package/dist-server/service/project-checklist/project-checklist.js.map +1 -0
  452. package/dist-server/service/project-checklist/spec-matching-service.d.ts +17 -0
  453. package/dist-server/service/project-checklist/spec-matching-service.js +140 -0
  454. package/dist-server/service/project-checklist/spec-matching-service.js.map +1 -0
  455. package/dist-server/service/project-checklist-item/index.d.ts +4 -0
  456. package/dist-server/service/project-checklist-item/index.js +9 -0
  457. package/dist-server/service/project-checklist-item/index.js.map +1 -0
  458. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.d.ts +2 -0
  459. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js +13 -0
  460. package/dist-server/service/project-checklist-item/project-checklist-item-mutation.js.map +1 -0
  461. package/dist-server/service/project-checklist-item/project-checklist-item-query.d.ts +5 -0
  462. package/dist-server/service/project-checklist-item/project-checklist-item-query.js +34 -0
  463. package/dist-server/service/project-checklist-item/project-checklist-item-query.js.map +1 -0
  464. package/dist-server/service/project-checklist-item/project-checklist-item-type.d.ts +5 -0
  465. package/dist-server/service/project-checklist-item/project-checklist-item-type.js +21 -0
  466. package/dist-server/service/project-checklist-item/project-checklist-item-type.js.map +1 -0
  467. package/dist-server/service/project-checklist-item/project-checklist-item.d.ts +19 -0
  468. package/dist-server/service/project-checklist-item/project-checklist-item.js +92 -0
  469. package/dist-server/service/project-checklist-item/project-checklist-item.js.map +1 -0
  470. package/dist-server/service/project-report/index.d.ts +5 -0
  471. package/dist-server/service/project-report/index.js +9 -0
  472. package/dist-server/service/project-report/index.js.map +1 -0
  473. package/dist-server/service/project-report/project-report-mutation.d.ts +10 -0
  474. package/dist-server/service/project-report/project-report-mutation.js +167 -0
  475. package/dist-server/service/project-report/project-report-mutation.js.map +1 -0
  476. package/dist-server/service/project-report/project-report-query.d.ts +12 -0
  477. package/dist-server/service/project-report/project-report-query.js +91 -0
  478. package/dist-server/service/project-report/project-report-query.js.map +1 -0
  479. package/dist-server/service/project-report/project-report-type.d.ts +23 -0
  480. package/dist-server/service/project-report/project-report-type.js +86 -0
  481. package/dist-server/service/project-report/project-report-type.js.map +1 -0
  482. package/dist-server/service/project-report/project-report.d.ts +28 -0
  483. package/dist-server/service/project-report/project-report.js +121 -0
  484. package/dist-server/service/project-report/project-report.js.map +1 -0
  485. package/dist-server/service/supervisor/index.d.ts +5 -0
  486. package/dist-server/service/supervisor/index.js +9 -0
  487. package/dist-server/service/supervisor/index.js.map +1 -0
  488. package/dist-server/service/supervisor/supervisor-mutation.d.ts +10 -0
  489. package/dist-server/service/supervisor/supervisor-mutation.js +167 -0
  490. package/dist-server/service/supervisor/supervisor-mutation.js.map +1 -0
  491. package/dist-server/service/supervisor/supervisor-query.d.ts +12 -0
  492. package/dist-server/service/supervisor/supervisor-query.js +91 -0
  493. package/dist-server/service/supervisor/supervisor-query.js.map +1 -0
  494. package/dist-server/service/supervisor/supervisor-type.d.ts +23 -0
  495. package/dist-server/service/supervisor/supervisor-type.js +86 -0
  496. package/dist-server/service/supervisor/supervisor-type.js.map +1 -0
  497. package/dist-server/service/supervisor/supervisor.d.ts +28 -0
  498. package/dist-server/service/supervisor/supervisor.js +121 -0
  499. package/dist-server/service/supervisor/supervisor.js.map +1 -0
  500. package/dist-server/tsconfig.tsbuildinfo +1 -0
  501. package/package.json +4 -4
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IssueQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const attachment_base_1 = require("@things-factory/attachment-base");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const auth_base_1 = require("@things-factory/auth-base");
9
+ const issue_1 = require("./issue");
10
+ const issue_type_1 = require("./issue-type");
11
+ let IssueQuery = class IssueQuery {
12
+ async issue(id) {
13
+ return await (0, shell_1.getRepository)(issue_1.Issue).findOne({
14
+ where: { id }
15
+ });
16
+ }
17
+ async issues(params) {
18
+ const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
19
+ params,
20
+ repository: await (0, shell_1.getRepository)(issue_1.Issue),
21
+ searchables: ['name', 'description']
22
+ });
23
+ const [items, total] = await queryBuilder.getManyAndCount();
24
+ return { items, total };
25
+ }
26
+ async thumbnail(issue) {
27
+ const attachment = await (0, shell_1.getRepository)(attachment_base_1.Attachment).findOne({
28
+ where: {
29
+ refType: issue_1.Issue.name,
30
+ refBy: issue.id
31
+ }
32
+ });
33
+ return attachment === null || attachment === void 0 ? void 0 : attachment.fullpath;
34
+ }
35
+ async domain(issue) {
36
+ return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: issue.domainId });
37
+ }
38
+ async updater(issue) {
39
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: issue.updaterId });
40
+ }
41
+ async creator(issue) {
42
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: issue.creatorId });
43
+ }
44
+ };
45
+ exports.IssueQuery = IssueQuery;
46
+ tslib_1.__decorate([
47
+ (0, type_graphql_1.Query)(returns => issue_1.Issue, { nullable: true, description: 'To fetch a Issue' }),
48
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
49
+ tslib_1.__metadata("design:type", Function),
50
+ tslib_1.__metadata("design:paramtypes", [String]),
51
+ tslib_1.__metadata("design:returntype", Promise)
52
+ ], IssueQuery.prototype, "issue", null);
53
+ tslib_1.__decorate([
54
+ (0, type_graphql_1.Query)(returns => issue_type_1.IssueList, { description: 'To fetch multiple Issues' }),
55
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
56
+ tslib_1.__metadata("design:type", Function),
57
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam]),
58
+ tslib_1.__metadata("design:returntype", Promise)
59
+ ], IssueQuery.prototype, "issues", null);
60
+ tslib_1.__decorate([
61
+ (0, type_graphql_1.FieldResolver)(type => String),
62
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
63
+ tslib_1.__metadata("design:type", Function),
64
+ tslib_1.__metadata("design:paramtypes", [issue_1.Issue]),
65
+ tslib_1.__metadata("design:returntype", Promise)
66
+ ], IssueQuery.prototype, "thumbnail", null);
67
+ tslib_1.__decorate([
68
+ (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
69
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
70
+ tslib_1.__metadata("design:type", Function),
71
+ tslib_1.__metadata("design:paramtypes", [issue_1.Issue]),
72
+ tslib_1.__metadata("design:returntype", Promise)
73
+ ], IssueQuery.prototype, "domain", null);
74
+ tslib_1.__decorate([
75
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
76
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
77
+ tslib_1.__metadata("design:type", Function),
78
+ tslib_1.__metadata("design:paramtypes", [issue_1.Issue]),
79
+ tslib_1.__metadata("design:returntype", Promise)
80
+ ], IssueQuery.prototype, "updater", null);
81
+ tslib_1.__decorate([
82
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
83
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
84
+ tslib_1.__metadata("design:type", Function),
85
+ tslib_1.__metadata("design:paramtypes", [issue_1.Issue]),
86
+ tslib_1.__metadata("design:returntype", Promise)
87
+ ], IssueQuery.prototype, "creator", null);
88
+ exports.IssueQuery = IssueQuery = tslib_1.__decorate([
89
+ (0, type_graphql_1.Resolver)(issue_1.Issue)
90
+ ], IssueQuery);
91
+ //# sourceMappingURL=issue-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-query.js","sourceRoot":"","sources":["../../../server/service/issue/issue-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,qEAA4D;AAC5D,iDAAuG;AACvG,yDAAgD;AAChD,mCAA+B;AAC/B,6CAAwC;AAGjC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAEf,AAAN,KAAK,CAAC,KAAK,CAAY,EAAU;QAC/B,OAAO,MAAM,IAAA,qBAAa,EAAC,aAAK,CAAC,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,EAAE,EAAE,EAAE;SACd,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,MAAiB;QACpC,MAAM,YAAY,GAAG,IAAA,qCAA6B,EAAC;YACjD,MAAM;YACN,UAAU,EAAE,MAAM,IAAA,qBAAa,EAAC,aAAK,CAAC;YACtC,WAAW,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC;SACrC,CAAC,CAAA;QAEF,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,YAAY,CAAC,eAAe,EAAE,CAAA;QAE3D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CAAS,KAAY;QAClC,MAAM,UAAU,GAAe,MAAM,IAAA,qBAAa,EAAC,4BAAU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,CAAA;;6CAAQ,aAAK;;2CASnC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;wCAEhC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;yCAEjC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;yCAEjC;qBA9CU,UAAU;IADtB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,UAAU,CA+CtB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Attachment } from '@things-factory/attachment-base'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Issue } from './issue'\nimport { IssueList } from './issue-type'\n\n@Resolver(Issue)\nexport class IssueQuery {\n @Query(returns => Issue!, { nullable: true, description: 'To fetch a Issue' })\n async issue(@Arg('id') id: string): Promise<Issue> {\n return await getRepository(Issue).findOne({\n where: { id }\n })\n }\n\n @Query(returns => IssueList, { description: 'To fetch multiple Issues' })\n async issues(@Args() params: ListParam): Promise<IssueList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(Issue),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => String)\n async thumbnail(@Root() issue: Issue): Promise<string | undefined> {\n const attachment: Attachment = await getRepository(Attachment).findOne({\n where: {\n refType: Issue.name,\n refBy: issue.id\n }\n })\n\n return attachment?.fullpath\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() issue: Issue): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: issue.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() issue: Issue): Promise<User> {\n return await getRepository(User).findOneBy({ id: issue.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() issue: Issue): Promise<User> {\n return await getRepository(User).findOneBy({ id: issue.creatorId })\n }\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import type { FileUpload } from 'graphql-upload/GraphQLUpload.js';
2
+ import { Issue, IssueStatus } from './issue';
3
+ export declare class NewIssue {
4
+ name: string;
5
+ description?: string;
6
+ state?: IssueStatus;
7
+ active?: boolean;
8
+ params?: string;
9
+ thumbnail?: FileUpload;
10
+ }
11
+ export declare class IssuePatch {
12
+ id?: string;
13
+ name?: string;
14
+ description?: string;
15
+ state?: IssueStatus;
16
+ active?: boolean;
17
+ thumbnail?: FileUpload;
18
+ cuFlag?: string;
19
+ }
20
+ export declare class IssueList {
21
+ items: Issue[];
22
+ total: number;
23
+ }
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IssueList = exports.IssuePatch = exports.NewIssue = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const GraphQLUpload_js_1 = tslib_1.__importDefault(require("graphql-upload/GraphQLUpload.js"));
6
+ const type_graphql_1 = require("type-graphql");
7
+ const issue_1 = require("./issue");
8
+ let NewIssue = class NewIssue {
9
+ };
10
+ exports.NewIssue = NewIssue;
11
+ tslib_1.__decorate([
12
+ (0, type_graphql_1.Field)(),
13
+ tslib_1.__metadata("design:type", String)
14
+ ], NewIssue.prototype, "name", void 0);
15
+ tslib_1.__decorate([
16
+ (0, type_graphql_1.Field)({ nullable: true }),
17
+ tslib_1.__metadata("design:type", String)
18
+ ], NewIssue.prototype, "description", void 0);
19
+ tslib_1.__decorate([
20
+ (0, type_graphql_1.Field)(type => issue_1.IssueStatus, { nullable: true }),
21
+ tslib_1.__metadata("design:type", String)
22
+ ], NewIssue.prototype, "state", void 0);
23
+ tslib_1.__decorate([
24
+ (0, type_graphql_1.Field)({ nullable: true }),
25
+ tslib_1.__metadata("design:type", Boolean)
26
+ ], NewIssue.prototype, "active", void 0);
27
+ tslib_1.__decorate([
28
+ (0, type_graphql_1.Field)({ nullable: true }),
29
+ tslib_1.__metadata("design:type", String)
30
+ ], NewIssue.prototype, "params", void 0);
31
+ tslib_1.__decorate([
32
+ (0, type_graphql_1.Field)(type => GraphQLUpload_js_1.default, { nullable: true }),
33
+ tslib_1.__metadata("design:type", Object)
34
+ ], NewIssue.prototype, "thumbnail", void 0);
35
+ exports.NewIssue = NewIssue = tslib_1.__decorate([
36
+ (0, type_graphql_1.InputType)()
37
+ ], NewIssue);
38
+ let IssuePatch = class IssuePatch {
39
+ };
40
+ exports.IssuePatch = IssuePatch;
41
+ tslib_1.__decorate([
42
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
43
+ tslib_1.__metadata("design:type", String)
44
+ ], IssuePatch.prototype, "id", void 0);
45
+ tslib_1.__decorate([
46
+ (0, type_graphql_1.Field)({ nullable: true }),
47
+ tslib_1.__metadata("design:type", String)
48
+ ], IssuePatch.prototype, "name", void 0);
49
+ tslib_1.__decorate([
50
+ (0, type_graphql_1.Field)({ nullable: true }),
51
+ tslib_1.__metadata("design:type", String)
52
+ ], IssuePatch.prototype, "description", void 0);
53
+ tslib_1.__decorate([
54
+ (0, type_graphql_1.Field)(type => issue_1.IssueStatus, { nullable: true }),
55
+ tslib_1.__metadata("design:type", String)
56
+ ], IssuePatch.prototype, "state", void 0);
57
+ tslib_1.__decorate([
58
+ (0, type_graphql_1.Field)({ nullable: true }),
59
+ tslib_1.__metadata("design:type", Boolean)
60
+ ], IssuePatch.prototype, "active", void 0);
61
+ tslib_1.__decorate([
62
+ (0, type_graphql_1.Field)(type => GraphQLUpload_js_1.default, { nullable: true }),
63
+ tslib_1.__metadata("design:type", Object)
64
+ ], IssuePatch.prototype, "thumbnail", void 0);
65
+ tslib_1.__decorate([
66
+ (0, type_graphql_1.Field)({ nullable: true }),
67
+ tslib_1.__metadata("design:type", String)
68
+ ], IssuePatch.prototype, "cuFlag", void 0);
69
+ exports.IssuePatch = IssuePatch = tslib_1.__decorate([
70
+ (0, type_graphql_1.InputType)()
71
+ ], IssuePatch);
72
+ let IssueList = class IssueList {
73
+ };
74
+ exports.IssueList = IssueList;
75
+ tslib_1.__decorate([
76
+ (0, type_graphql_1.Field)(type => [issue_1.Issue]),
77
+ tslib_1.__metadata("design:type", Array)
78
+ ], IssueList.prototype, "items", void 0);
79
+ tslib_1.__decorate([
80
+ (0, type_graphql_1.Field)(type => type_graphql_1.Int),
81
+ tslib_1.__metadata("design:type", Number)
82
+ ], IssueList.prototype, "total", void 0);
83
+ exports.IssueList = IssueList = tslib_1.__decorate([
84
+ (0, type_graphql_1.ObjectType)()
85
+ ], IssueList);
86
+ //# sourceMappingURL=issue-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue-type.js","sourceRoot":"","sources":["../../../server/service/issue/issue-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAsF;AAItF,mCAA4C;AAGrC,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAkBpB,CAAA;AAlBY,4BAAQ;AAEnB;IADC,IAAA,oBAAK,GAAE;;sCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACN;AAGpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,mBAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCAC5B;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACV;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACX;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,0BAAa,EAAE,EAAE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load.js'\nimport { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\n\nimport { Issue, IssueStatus } from './issue'\n\n@InputType()\nexport class NewIssue {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => IssueStatus, { nullable: true })\n state?: IssueStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({ nullable: true })\n params?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n}\n\n@InputType()\nexport class IssuePatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field(type => IssueStatus, { nullable: true })\n state?: IssueStatus\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class IssueList {\n @Field(type => [Issue])\n items: Issue[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -0,0 +1,26 @@
1
+ import { Domain } from '@things-factory/shell';
2
+ import { User } from '@things-factory/auth-base';
3
+ import { ActionPlan } from '../action-plan/action-plan';
4
+ export declare enum IssueStatus {
5
+ STATUS_A = "STATUS_A",
6
+ STATUS_B = "STATUS_B"
7
+ }
8
+ export declare class Issue {
9
+ readonly id: string;
10
+ domain?: Domain;
11
+ domainId?: string;
12
+ name?: string;
13
+ description?: string;
14
+ active?: boolean;
15
+ state?: IssueStatus;
16
+ params?: string;
17
+ actionPlans: ActionPlan[];
18
+ createdAt?: Date;
19
+ updatedAt?: Date;
20
+ deletedAt?: Date;
21
+ creator?: User;
22
+ creatorId?: string;
23
+ updater?: User;
24
+ updaterId?: string;
25
+ thumbnail?: string;
26
+ }
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Issue = exports.IssueStatus = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const type_graphql_1 = require("type-graphql");
7
+ const shell_1 = require("@things-factory/shell");
8
+ const auth_base_1 = require("@things-factory/auth-base");
9
+ const action_plan_1 = require("../action-plan/action-plan");
10
+ var IssueStatus;
11
+ (function (IssueStatus) {
12
+ IssueStatus["STATUS_A"] = "STATUS_A";
13
+ IssueStatus["STATUS_B"] = "STATUS_B";
14
+ })(IssueStatus || (exports.IssueStatus = IssueStatus = {}));
15
+ (0, type_graphql_1.registerEnumType)(IssueStatus, {
16
+ name: 'IssueStatus',
17
+ description: 'state enumeration of a issue'
18
+ });
19
+ let Issue = class Issue {
20
+ };
21
+ exports.Issue = Issue;
22
+ tslib_1.__decorate([
23
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
24
+ (0, type_graphql_1.Field)(type => type_graphql_1.ID),
25
+ tslib_1.__metadata("design:type", String)
26
+ ], Issue.prototype, "id", void 0);
27
+ tslib_1.__decorate([
28
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
29
+ (0, type_graphql_1.Field)({ nullable: true }),
30
+ tslib_1.__metadata("design:type", shell_1.Domain)
31
+ ], Issue.prototype, "domain", void 0);
32
+ tslib_1.__decorate([
33
+ (0, typeorm_1.RelationId)((issue) => issue.domain),
34
+ tslib_1.__metadata("design:type", String)
35
+ ], Issue.prototype, "domainId", void 0);
36
+ tslib_1.__decorate([
37
+ (0, typeorm_1.Column)(),
38
+ (0, type_graphql_1.Field)({ nullable: true }),
39
+ tslib_1.__metadata("design:type", String)
40
+ ], Issue.prototype, "name", void 0);
41
+ tslib_1.__decorate([
42
+ (0, typeorm_1.Column)({ nullable: true }),
43
+ (0, type_graphql_1.Field)({ nullable: true }),
44
+ tslib_1.__metadata("design:type", String)
45
+ ], Issue.prototype, "description", void 0);
46
+ tslib_1.__decorate([
47
+ (0, typeorm_1.Column)({ nullable: true }),
48
+ (0, type_graphql_1.Field)({ nullable: true }),
49
+ tslib_1.__metadata("design:type", Boolean)
50
+ ], Issue.prototype, "active", void 0);
51
+ tslib_1.__decorate([
52
+ (0, typeorm_1.Column)({ nullable: true }),
53
+ (0, type_graphql_1.Field)({ nullable: true }),
54
+ tslib_1.__metadata("design:type", String)
55
+ ], Issue.prototype, "state", void 0);
56
+ tslib_1.__decorate([
57
+ (0, typeorm_1.Column)({ nullable: true }),
58
+ (0, type_graphql_1.Field)({ nullable: true }),
59
+ tslib_1.__metadata("design:type", String)
60
+ ], Issue.prototype, "params", void 0);
61
+ tslib_1.__decorate([
62
+ (0, type_graphql_1.Field)(() => [action_plan_1.ActionPlan]),
63
+ (0, typeorm_1.OneToMany)(() => action_plan_1.ActionPlan, actionPlan => actionPlan.issue),
64
+ tslib_1.__metadata("design:type", Array)
65
+ ], Issue.prototype, "actionPlans", void 0);
66
+ tslib_1.__decorate([
67
+ (0, typeorm_1.CreateDateColumn)(),
68
+ (0, type_graphql_1.Field)({ nullable: true }),
69
+ tslib_1.__metadata("design:type", Date)
70
+ ], Issue.prototype, "createdAt", void 0);
71
+ tslib_1.__decorate([
72
+ (0, typeorm_1.UpdateDateColumn)(),
73
+ (0, type_graphql_1.Field)({ nullable: true }),
74
+ tslib_1.__metadata("design:type", Date)
75
+ ], Issue.prototype, "updatedAt", void 0);
76
+ tslib_1.__decorate([
77
+ (0, typeorm_1.DeleteDateColumn)(),
78
+ (0, type_graphql_1.Field)({ nullable: true }),
79
+ tslib_1.__metadata("design:type", Date)
80
+ ], Issue.prototype, "deletedAt", void 0);
81
+ tslib_1.__decorate([
82
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
83
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
84
+ tslib_1.__metadata("design:type", auth_base_1.User)
85
+ ], Issue.prototype, "creator", void 0);
86
+ tslib_1.__decorate([
87
+ (0, typeorm_1.RelationId)((issue) => issue.creator),
88
+ tslib_1.__metadata("design:type", String)
89
+ ], Issue.prototype, "creatorId", void 0);
90
+ tslib_1.__decorate([
91
+ (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
92
+ (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
93
+ tslib_1.__metadata("design:type", auth_base_1.User)
94
+ ], Issue.prototype, "updater", void 0);
95
+ tslib_1.__decorate([
96
+ (0, typeorm_1.RelationId)((issue) => issue.updater),
97
+ tslib_1.__metadata("design:type", String)
98
+ ], Issue.prototype, "updaterId", void 0);
99
+ tslib_1.__decorate([
100
+ (0, type_graphql_1.Field)(type => String, { nullable: true }),
101
+ tslib_1.__metadata("design:type", String)
102
+ ], Issue.prototype, "thumbnail", void 0);
103
+ exports.Issue = Issue = tslib_1.__decorate([
104
+ (0, typeorm_1.Entity)(),
105
+ (0, typeorm_1.Index)('ix_issue_0', (issue) => [issue.domain, issue.name], {
106
+ unique: true,
107
+ where: '"deleted_at" IS NULL'
108
+ }),
109
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for Issue' })
110
+ ], Issue);
111
+ //# sourceMappingURL=issue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issue.js","sourceRoot":"","sources":["../../../server/service/issue/issue.ts"],"names":[],"mappings":";;;;AAAA,qCAYgB;AAChB,+CAA2E;AAE3E,iDAA8C;AAC9C,yDAAgD;AAChD,4DAAuD;AAEvD,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,oCAAqB,CAAA;AACvB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAA,+BAAgB,EAAC,WAAW,EAAE;IAC5B,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,8BAA8B;CAC5C,CAAC,CAAA;AAQK,IAAM,KAAK,GAAX,MAAM,KAAK;CAgEjB,CAAA;AAhEY,sBAAK;AAGP;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;iCACC;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AW,EAAE,kBAAkB,EAAE,CAAC;GACnC,KAAK,CAgEjB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n VersionColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ActionPlan } from '../action-plan/action-plan'\n\nexport enum IssueStatus {\n STATUS_A = 'STATUS_A',\n STATUS_B = 'STATUS_B'\n}\n\nregisterEnumType(IssueStatus, {\n name: 'IssueStatus',\n description: 'state enumeration of a issue'\n})\n\n@Entity()\n@Index('ix_issue_0', (issue: Issue) => [issue.domain, issue.name], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({ description: 'Entity for Issue' })\nexport class Issue {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((issue: Issue) => issue.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n state?: IssueStatus\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n params?: string\n\n @Field(() => [ActionPlan])\n @OneToMany(() => ActionPlan, actionPlan => actionPlan.issue)\n actionPlans: ActionPlan[]\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((issue: Issue) => issue.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((issue: Issue) => issue.updater)\n updaterId?: string\n\n @Field(type => String, { nullable: true })\n thumbnail?: string\n}\n"]}
@@ -0,0 +1,5 @@
1
+ import { ProjectChecklist } from './project-checklist';
2
+ import { ProjectChecklistQuery } from './project-checklist-query';
3
+ import { ProjectChecklistMutation } from './project-checklist-mutation';
4
+ export declare const entities: (typeof ProjectChecklist)[];
5
+ export declare const resolvers: (typeof ProjectChecklistQuery | typeof ProjectChecklistMutation)[];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = exports.entities = void 0;
4
+ const project_checklist_1 = require("./project-checklist");
5
+ const project_checklist_query_1 = require("./project-checklist-query");
6
+ const project_checklist_mutation_1 = require("./project-checklist-mutation");
7
+ exports.entities = [project_checklist_1.ProjectChecklist];
8
+ exports.resolvers = [project_checklist_query_1.ProjectChecklistQuery, project_checklist_mutation_1.ProjectChecklistMutation];
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/project-checklist/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AACtD,uEAAiE;AACjE,6EAAuE;AAE1D,QAAA,QAAQ,GAAG,CAAC,oCAAgB,CAAC,CAAA;AAC7B,QAAA,SAAS,GAAG,CAAC,+CAAqB,EAAE,qDAAwB,CAAC,CAAA","sourcesContent":["import { ProjectChecklist } from './project-checklist'\nimport { ProjectChecklistQuery } from './project-checklist-query'\nimport { ProjectChecklistMutation } from './project-checklist-mutation'\n\nexport const entities = [ProjectChecklist]\nexport const resolvers = [ProjectChecklistQuery, ProjectChecklistMutation]\n"]}
@@ -0,0 +1,7 @@
1
+ import { ProjectChecklist } from './project-checklist';
2
+ import { ProjectChecklistItemInput } from './project-checklist-type';
3
+ export declare class ProjectChecklistMutation {
4
+ createProjectChecklist(projectId: string, constructionTypeId: string, constructionDetailTypeId: string, name: string, items: ProjectChecklistItemInput[], siteSpecPdfUrl: string, context: ResolverContext): Promise<ProjectChecklist>;
5
+ updateProjectChecklist(id: string, name: string, items: ProjectChecklistItemInput[], siteSpecPdfUrl: string, context: ResolverContext): Promise<ProjectChecklist>;
6
+ deleteProjectChecklists(ids: string[], context: ResolverContext): Promise<boolean>;
7
+ }
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectChecklistMutation = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const typeorm_1 = require("typeorm");
7
+ const project_checklist_1 = require("./project-checklist");
8
+ const project_checklist_type_1 = require("./project-checklist-type");
9
+ const project_checklist_item_1 = require("../project-checklist-item/project-checklist-item");
10
+ const spec_matching_service_1 = require("./spec-matching-service");
11
+ let ProjectChecklistMutation = class ProjectChecklistMutation {
12
+ async createProjectChecklist(projectId, constructionTypeId, constructionDetailTypeId, name, items, siteSpecPdfUrl, context) {
13
+ const { domain, user, tx } = context.state;
14
+ const checklistRepo = tx.getRepository(project_checklist_1.ProjectChecklist);
15
+ const itemRepo = tx.getRepository(project_checklist_item_1.ProjectChecklistItem);
16
+ const checklist = await checklistRepo.save({
17
+ domain,
18
+ projectId,
19
+ constructionTypeId,
20
+ constructionDetailTypeId,
21
+ name,
22
+ creator: user,
23
+ updater: user
24
+ });
25
+ const savedItems = [];
26
+ for (let i = 0; i < items.length; i++) {
27
+ const item = items[i];
28
+ const saved = await itemRepo.save({
29
+ projectChecklist: checklist,
30
+ mainType: item.mainType || null,
31
+ name: item.name,
32
+ sequence: i,
33
+ creator: user,
34
+ updater: user
35
+ });
36
+ savedItems.push(saved);
37
+ }
38
+ // 검사항목별 KCS 표준 / 현장 시방서 기준 매칭을 백그라운드(비동기)로 트리거
39
+ (0, spec_matching_service_1.queueUpdateProjectChecklistCriteria)(savedItems.map(v => v.id), siteSpecPdfUrl);
40
+ return checklist;
41
+ }
42
+ async updateProjectChecklist(id, name, items, siteSpecPdfUrl, context) {
43
+ const { user, tx } = context.state;
44
+ const checklistRepo = tx.getRepository(project_checklist_1.ProjectChecklist);
45
+ const itemRepo = tx.getRepository(project_checklist_item_1.ProjectChecklistItem);
46
+ const checklist = await checklistRepo.findOneBy({ id });
47
+ // 이름 수정
48
+ checklist.name = name;
49
+ checklist.updater = user;
50
+ await checklistRepo.save(checklist);
51
+ // 기존 아이템 삭제 후 재삽입
52
+ await itemRepo.delete({ projectChecklist: { id } });
53
+ const savedItems = [];
54
+ for (let i = 0; i < items.length; i++) {
55
+ const item = items[i];
56
+ const saved = await itemRepo.save({
57
+ projectChecklist: checklist,
58
+ mainType: item.mainType || null,
59
+ name: item.name,
60
+ sequence: i,
61
+ creator: user,
62
+ updater: user
63
+ });
64
+ savedItems.push(saved);
65
+ }
66
+ // 검사항목별 KCS 표준 / 현장 시방서 기준 매칭을 백그라운드(비동기)로 트리거
67
+ (0, spec_matching_service_1.queueUpdateProjectChecklistCriteria)(savedItems.map(v => v.id), siteSpecPdfUrl);
68
+ return checklist;
69
+ }
70
+ async deleteProjectChecklists(ids, context) {
71
+ const { domain, tx } = context.state;
72
+ await tx.getRepository(project_checklist_1.ProjectChecklist).softDelete({
73
+ domain: { id: domain.id },
74
+ id: (0, typeorm_1.In)(ids)
75
+ });
76
+ return true;
77
+ }
78
+ };
79
+ exports.ProjectChecklistMutation = ProjectChecklistMutation;
80
+ tslib_1.__decorate([
81
+ (0, type_graphql_1.Directive)('@transaction'),
82
+ (0, type_graphql_1.Mutation)(returns => project_checklist_1.ProjectChecklist, { description: '프로젝트 체크리스트 생성' }),
83
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('projectId')),
84
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('constructionTypeId')),
85
+ tslib_1.__param(2, (0, type_graphql_1.Arg)('constructionDetailTypeId')),
86
+ tslib_1.__param(3, (0, type_graphql_1.Arg)('name')),
87
+ tslib_1.__param(4, (0, type_graphql_1.Arg)('items', type => [project_checklist_type_1.ProjectChecklistItemInput])),
88
+ tslib_1.__param(5, (0, type_graphql_1.Arg)('siteSpecPdfUrl', { nullable: true })),
89
+ tslib_1.__param(6, (0, type_graphql_1.Ctx)()),
90
+ tslib_1.__metadata("design:type", Function),
91
+ tslib_1.__metadata("design:paramtypes", [String, String, String, String, Array, String, Object]),
92
+ tslib_1.__metadata("design:returntype", Promise)
93
+ ], ProjectChecklistMutation.prototype, "createProjectChecklist", null);
94
+ tslib_1.__decorate([
95
+ (0, type_graphql_1.Directive)('@transaction'),
96
+ (0, type_graphql_1.Mutation)(returns => project_checklist_1.ProjectChecklist, { description: '프로젝트 체크리스트 수정' }),
97
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
98
+ tslib_1.__param(1, (0, type_graphql_1.Arg)('name')),
99
+ tslib_1.__param(2, (0, type_graphql_1.Arg)('items', type => [project_checklist_type_1.ProjectChecklistItemInput])),
100
+ tslib_1.__param(3, (0, type_graphql_1.Arg)('siteSpecPdfUrl', { nullable: true })),
101
+ tslib_1.__param(4, (0, type_graphql_1.Ctx)()),
102
+ tslib_1.__metadata("design:type", Function),
103
+ tslib_1.__metadata("design:paramtypes", [String, String, Array, String, Object]),
104
+ tslib_1.__metadata("design:returntype", Promise)
105
+ ], ProjectChecklistMutation.prototype, "updateProjectChecklist", null);
106
+ tslib_1.__decorate([
107
+ (0, type_graphql_1.Directive)('@transaction'),
108
+ (0, type_graphql_1.Mutation)(returns => Boolean, { description: '프로젝트 체크리스트 삭제' }),
109
+ tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
110
+ tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
111
+ tslib_1.__metadata("design:type", Function),
112
+ tslib_1.__metadata("design:paramtypes", [Array, Object]),
113
+ tslib_1.__metadata("design:returntype", Promise)
114
+ ], ProjectChecklistMutation.prototype, "deleteProjectChecklists", null);
115
+ exports.ProjectChecklistMutation = ProjectChecklistMutation = tslib_1.__decorate([
116
+ (0, type_graphql_1.Resolver)(project_checklist_1.ProjectChecklist)
117
+ ], ProjectChecklistMutation);
118
+ //# sourceMappingURL=project-checklist-mutation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-checklist-mutation.js","sourceRoot":"","sources":["../../../server/service/project-checklist/project-checklist-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAC5B,2DAAsD;AACtD,qEAAoE;AACpE,6FAAuF;AACvF,mEAA6E;AAGtE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAG7B,AAAN,KAAK,CAAC,sBAAsB,CACR,SAAiB,EACR,kBAA0B,EACpB,wBAAgC,EACpD,IAAY,EAC0B,KAAkC,EAC1C,cAAsB,EAC1D,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,aAAa,GAAG,EAAE,CAAC,aAAa,CAAC,oCAAgB,CAAC,CAAA;QACxD,MAAM,QAAQ,GAAG,EAAE,CAAC,aAAa,CAAC,6CAAoB,CAAC,CAAA;QAEvD,MAAM,SAAS,GAAG,MAAM,aAAa,CAAC,IAAI,CAAC;YACzC,MAAM;YACN,SAAS;YACT,kBAAkB;YAClB,wBAAwB;YACxB,IAAI;YACJ,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;SACd,CAAC,CAAA;QAEF,MAAM,UAAU,GAAG,EAAE,CAAA;QACrB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAA;YACrB,MAAM,KAAK,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC;gBAChC,gBAAgB,EAAE,SAAS;gBAC3B,QAAQ,EAAE,IAAI,CAAC,QAAQ,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ACX,mBAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,kDAAyB,CAAC,CAAC,CAAA;IACjD,mBAAA,IAAA,kBAAG,EAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IACzC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sEAmCP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,oCAAgB,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;IAErE,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IACT,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,kDAAyB,CAAC,CAAC,CAAA;IACjD,mBAAA,IAAA,kBAAG,EAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IACzC,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sEAmCP;AAIK;IAFL,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;IAE5D,mBAAA,IAAA,kBAAG,EAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC5B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uEAUP;mCAzGU,wBAAwB;IADpC,IAAA,uBAAQ,EAAC,oCAAgB,CAAC;GACd,wBAAwB,CA0GpC","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\nimport { ProjectChecklist } from './project-checklist'\nimport { ProjectChecklistItemInput } from './project-checklist-type'\nimport { ProjectChecklistItem } from '../project-checklist-item/project-checklist-item'\nimport { queueUpdateProjectChecklistCriteria } from './spec-matching-service'\n\n@Resolver(ProjectChecklist)\nexport class ProjectChecklistMutation {\n @Directive('@transaction')\n @Mutation(returns => ProjectChecklist, { description: '프로젝트 체크리스트 생성' })\n async createProjectChecklist(\n @Arg('projectId') projectId: string,\n @Arg('constructionTypeId') constructionTypeId: string,\n @Arg('constructionDetailTypeId') constructionDetailTypeId: string,\n @Arg('name') name: string,\n @Arg('items', type => [ProjectChecklistItemInput]) items: ProjectChecklistItemInput[],\n @Arg('siteSpecPdfUrl', { nullable: true }) siteSpecPdfUrl: string,\n @Ctx() context: ResolverContext\n ): Promise<ProjectChecklist> {\n const { domain, user, tx } = context.state\n\n const checklistRepo = tx.getRepository(ProjectChecklist)\n const itemRepo = tx.getRepository(ProjectChecklistItem)\n\n const checklist = await checklistRepo.save({\n domain,\n projectId,\n constructionTypeId,\n constructionDetailTypeId,\n name,\n creator: user,\n updater: user\n })\n\n const savedItems = []\n for (let i = 0; i < items.length; i++) {\n const item = items[i]\n const saved = await itemRepo.save({\n projectChecklist: checklist,\n mainType: item.mainType || null,\n name: item.name,\n sequence: i,\n creator: user,\n updater: user\n })\n savedItems.push(saved)\n }\n\n // 검사항목별 KCS 표준 / 현장 시방서 기준 매칭을 백그라운드(비동기)로 트리거\n queueUpdateProjectChecklistCriteria(savedItems.map(v => v.id), siteSpecPdfUrl)\n\n return checklist\n }\n\n @Directive('@transaction')\n @Mutation(returns => ProjectChecklist, { description: '프로젝트 체크리스트 수정' })\n async updateProjectChecklist(\n @Arg('id') id: string,\n @Arg('name') name: string,\n @Arg('items', type => [ProjectChecklistItemInput]) items: ProjectChecklistItemInput[],\n @Arg('siteSpecPdfUrl', { nullable: true }) siteSpecPdfUrl: string,\n @Ctx() context: ResolverContext\n ): Promise<ProjectChecklist> {\n const { user, tx } = context.state\n\n const checklistRepo = tx.getRepository(ProjectChecklist)\n const itemRepo = tx.getRepository(ProjectChecklistItem)\n\n const checklist = await checklistRepo.findOneBy({ id })\n\n // 이름 수정\n checklist.name = name\n checklist.updater = user\n await checklistRepo.save(checklist)\n\n // 기존 아이템 삭제 후 재삽입\n await itemRepo.delete({ projectChecklist: { id } })\n\n const savedItems = []\n for (let i = 0; i < items.length; i++) {\n const item = items[i]\n const saved = await itemRepo.save({\n projectChecklist: checklist,\n mainType: item.mainType || null,\n name: item.name,\n sequence: i,\n creator: user,\n updater: user\n })\n savedItems.push(saved)\n }\n\n // 검사항목별 KCS 표준 / 현장 시방서 기준 매칭을 백그라운드(비동기)로 트리거\n queueUpdateProjectChecklistCriteria(savedItems.map(v => v.id), siteSpecPdfUrl)\n\n return checklist\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: '프로젝트 체크리스트 삭제' })\n async deleteProjectChecklists(\n @Arg('ids', type => [String]) ids: string[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(ProjectChecklist).softDelete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n return true\n }\n}\n"]}
@@ -0,0 +1,12 @@
1
+ import { Domain, ListParam } from '@things-factory/shell';
2
+ import { User } from '@things-factory/auth-base';
3
+ import { ProjectChecklist } from './project-checklist';
4
+ import { ProjectChecklistList } from './project-checklist-type';
5
+ import { ProjectChecklistItem } from '../project-checklist-item/project-checklist-item';
6
+ export declare class ProjectChecklistQuery {
7
+ projectChecklists(params: ListParam): Promise<ProjectChecklistList>;
8
+ domain(t: ProjectChecklist): Promise<Domain>;
9
+ updater(t: ProjectChecklist): Promise<User>;
10
+ creator(t: ProjectChecklist): Promise<User>;
11
+ projectChecklistItems(t: ProjectChecklist): Promise<ProjectChecklistItem[]>;
12
+ }
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectChecklistQuery = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ const shell_1 = require("@things-factory/shell");
7
+ const auth_base_1 = require("@things-factory/auth-base");
8
+ const project_checklist_1 = require("./project-checklist");
9
+ const project_checklist_type_1 = require("./project-checklist-type");
10
+ const project_checklist_item_1 = require("../project-checklist-item/project-checklist-item");
11
+ let ProjectChecklistQuery = class ProjectChecklistQuery {
12
+ async projectChecklists(params) {
13
+ const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
14
+ params,
15
+ repository: await (0, shell_1.getRepository)(project_checklist_1.ProjectChecklist),
16
+ searchables: ['name']
17
+ });
18
+ const [items, total] = await queryBuilder.getManyAndCount();
19
+ return { items, total };
20
+ }
21
+ async domain(t) {
22
+ return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: t.domainId });
23
+ }
24
+ async updater(t) {
25
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: t.updaterId });
26
+ }
27
+ async creator(t) {
28
+ return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: t.creatorId });
29
+ }
30
+ async projectChecklistItems(t) {
31
+ return await (0, shell_1.getRepository)(project_checklist_item_1.ProjectChecklistItem).find({
32
+ where: { projectChecklist: { id: t.id } },
33
+ order: { sequence: 'ASC' }
34
+ });
35
+ }
36
+ };
37
+ exports.ProjectChecklistQuery = ProjectChecklistQuery;
38
+ tslib_1.__decorate([
39
+ (0, type_graphql_1.Query)(returns => project_checklist_type_1.ProjectChecklistList, { description: '프로젝트 체크리스트 목록' }),
40
+ tslib_1.__param(0, (0, type_graphql_1.Args)()),
41
+ tslib_1.__metadata("design:type", Function),
42
+ tslib_1.__metadata("design:paramtypes", [shell_1.ListParam]),
43
+ tslib_1.__metadata("design:returntype", Promise)
44
+ ], ProjectChecklistQuery.prototype, "projectChecklists", null);
45
+ tslib_1.__decorate([
46
+ (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
47
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
48
+ tslib_1.__metadata("design:type", Function),
49
+ tslib_1.__metadata("design:paramtypes", [project_checklist_1.ProjectChecklist]),
50
+ tslib_1.__metadata("design:returntype", Promise)
51
+ ], ProjectChecklistQuery.prototype, "domain", null);
52
+ tslib_1.__decorate([
53
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
54
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
55
+ tslib_1.__metadata("design:type", Function),
56
+ tslib_1.__metadata("design:paramtypes", [project_checklist_1.ProjectChecklist]),
57
+ tslib_1.__metadata("design:returntype", Promise)
58
+ ], ProjectChecklistQuery.prototype, "updater", null);
59
+ tslib_1.__decorate([
60
+ (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
61
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
62
+ tslib_1.__metadata("design:type", Function),
63
+ tslib_1.__metadata("design:paramtypes", [project_checklist_1.ProjectChecklist]),
64
+ tslib_1.__metadata("design:returntype", Promise)
65
+ ], ProjectChecklistQuery.prototype, "creator", null);
66
+ tslib_1.__decorate([
67
+ (0, type_graphql_1.FieldResolver)(type => [project_checklist_item_1.ProjectChecklistItem]),
68
+ tslib_1.__param(0, (0, type_graphql_1.Root)()),
69
+ tslib_1.__metadata("design:type", Function),
70
+ tslib_1.__metadata("design:paramtypes", [project_checklist_1.ProjectChecklist]),
71
+ tslib_1.__metadata("design:returntype", Promise)
72
+ ], ProjectChecklistQuery.prototype, "projectChecklistItems", null);
73
+ exports.ProjectChecklistQuery = ProjectChecklistQuery = tslib_1.__decorate([
74
+ (0, type_graphql_1.Resolver)(project_checklist_1.ProjectChecklist)
75
+ ], ProjectChecklistQuery);
76
+ //# sourceMappingURL=project-checklist-query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-checklist-query.js","sourceRoot":"","sources":["../../../server/service/project-checklist/project-checklist-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8E;AAC9E,iDAAuG;AACvG,yDAAgD;AAChD,2DAAsD;AACtD,qEAA+D;AAC/D,6FAAuF;AAGhF,IAAM,qBAAqB,GAA3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IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,6CAAoB,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;IAChD,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAS,iBAAS;;8DAUhD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAI,oCAAgB;;mDAEvC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAI,oCAAgB;;oDAExC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAI,oCAAgB;;oDAExC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,6CAAoB,CAAC,CAAC;IACjB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAI,oCAAgB;;kEAKtD;gCAnCU,qBAAqB;IADjC,IAAA,uBAAQ,EAAC,oCAAgB,CAAC;GACd,qBAAqB,CAoCjC","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Ctx } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { ProjectChecklist } from './project-checklist'\nimport { ProjectChecklistList } from './project-checklist-type'\nimport { ProjectChecklistItem } from '../project-checklist-item/project-checklist-item'\n\n@Resolver(ProjectChecklist)\nexport class ProjectChecklistQuery {\n @Query(returns => ProjectChecklistList, { description: '프로젝트 체크리스트 목록' })\n async projectChecklists(@Args() params: ListParam): Promise<ProjectChecklistList> {\n const queryBuilder = getQueryBuilderFromListParams({\n params,\n repository: await getRepository(ProjectChecklist),\n searchables: ['name']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() t: ProjectChecklist): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: t.domainId })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() t: ProjectChecklist): Promise<User> {\n return await getRepository(User).findOneBy({ id: t.updaterId })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() t: ProjectChecklist): Promise<User> {\n return await getRepository(User).findOneBy({ id: t.creatorId })\n }\n\n @FieldResolver(type => [ProjectChecklistItem])\n async projectChecklistItems(@Root() t: ProjectChecklist): Promise<ProjectChecklistItem[]> {\n return await getRepository(ProjectChecklistItem).find({\n where: { projectChecklist: { id: t.id } },\n order: { sequence: 'ASC' }\n })\n }\n}\n"]}