@dssp/supervision 1.0.0-y.0 → 1.0.0

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 (382) hide show
  1. package/package.json +14 -12
  2. package/things-factory.config.js +7 -1
  3. package/dist-client/bootstrap.d.ts +0 -1
  4. package/dist-client/bootstrap.js +0 -2
  5. package/dist-client/bootstrap.js.map +0 -1
  6. package/dist-client/graphql/building-inspection.d.ts +0 -1
  7. package/dist-client/graphql/building-inspection.js +0 -100
  8. package/dist-client/graphql/building-inspection.js.map +0 -1
  9. package/dist-client/index.d.ts +0 -0
  10. package/dist-client/index.js +0 -2
  11. package/dist-client/index.js.map +0 -1
  12. package/dist-client/pages/action-plan/action-plan-importer.d.ts +0 -10
  13. package/dist-client/pages/action-plan/action-plan-importer.js +0 -101
  14. package/dist-client/pages/action-plan/action-plan-importer.js.map +0 -1
  15. package/dist-client/pages/action-plan/action-plan-list-page.d.ts +0 -63
  16. package/dist-client/pages/action-plan/action-plan-list-page.js +0 -323
  17. package/dist-client/pages/action-plan/action-plan-list-page.js.map +0 -1
  18. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.d.ts +0 -22
  19. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js +0 -169
  20. package/dist-client/pages/building-inspection/building-inspection-detail-ai-defect.js.map +0 -1
  21. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.d.ts +0 -57
  22. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js +0 -825
  23. package/dist-client/pages/building-inspection/building-inspection-detail-ai-measurement.js.map +0 -1
  24. package/dist-client/pages/building-inspection/building-inspection-detail-camera.d.ts +0 -27
  25. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js +0 -341
  26. package/dist-client/pages/building-inspection/building-inspection-detail-camera.js.map +0 -1
  27. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.d.ts +0 -29
  28. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js +0 -315
  29. package/dist-client/pages/building-inspection/building-inspection-detail-checklist.js.map +0 -1
  30. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.d.ts +0 -36
  31. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js +0 -368
  32. package/dist-client/pages/building-inspection/building-inspection-detail-drawing.js.map +0 -1
  33. package/dist-client/pages/building-inspection/building-inspection-list.d.ts +0 -90
  34. package/dist-client/pages/building-inspection/building-inspection-list.js +0 -904
  35. package/dist-client/pages/building-inspection/building-inspection-list.js.map +0 -1
  36. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.d.ts +0 -4
  37. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js +0 -233
  38. package/dist-client/pages/building-inspection/component/building-inspection-detail-header.js.map +0 -1
  39. package/dist-client/pages/building-inspection/component/daily-worklog-popup.d.ts +0 -27
  40. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js +0 -542
  41. package/dist-client/pages/building-inspection/component/daily-worklog-popup.js.map +0 -1
  42. package/dist-client/pages/building-inspection/component/image-preview-popup.d.ts +0 -15
  43. package/dist-client/pages/building-inspection/component/image-preview-popup.js +0 -351
  44. package/dist-client/pages/building-inspection/component/image-preview-popup.js.map +0 -1
  45. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.d.ts +0 -20
  46. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js +0 -432
  47. package/dist-client/pages/building-inspection/component/inspection-document/inspection-request-document.js.map +0 -1
  48. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.d.ts +0 -30
  49. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js +0 -479
  50. package/dist-client/pages/building-inspection/component/inspection-document/inspection-result-notification.js.map +0 -1
  51. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.d.ts +0 -27
  52. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js +0 -416
  53. package/dist-client/pages/building-inspection/component/inspection-document/photo-album-popup.js.map +0 -1
  54. package/dist-client/pages/building-inspection/component/inspection-event-provider.d.ts +0 -8
  55. package/dist-client/pages/building-inspection/component/inspection-event-provider.js +0 -93
  56. package/dist-client/pages/building-inspection/component/inspection-event-provider.js.map +0 -1
  57. package/dist-client/pages/building-inspection/inspection-create-popup.d.ts +0 -3
  58. package/dist-client/pages/building-inspection/inspection-create-popup.js +0 -840
  59. package/dist-client/pages/building-inspection/inspection-create-popup.js.map +0 -1
  60. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.d.ts +0 -60
  61. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js +0 -1132
  62. package/dist-client/pages/building-inspection-grid/building-inspection-grid-detail.js.map +0 -1
  63. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.d.ts +0 -2
  64. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js +0 -740
  65. package/dist-client/pages/building-inspection-grid/component/grid-inspection-create-popup.js.map +0 -1
  66. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.d.ts +0 -19
  67. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js +0 -205
  68. package/dist-client/pages/building-inspection-grid/component/grid-inspection-list-layer.js.map +0 -1
  69. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.d.ts +0 -1
  70. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js +0 -304
  71. package/dist-client/pages/building-inspection-grid/component/notice-comment-popup.js.map +0 -1
  72. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.d.ts +0 -15
  73. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js +0 -430
  74. package/dist-client/pages/building-inspection-grid/component/plan-preview-popup.js.map +0 -1
  75. package/dist-client/pages/checklist/attachment-list-popup.d.ts +0 -3
  76. package/dist-client/pages/checklist/attachment-list-popup.js +0 -493
  77. package/dist-client/pages/checklist/attachment-list-popup.js.map +0 -1
  78. package/dist-client/pages/checklist/checklist-view.d.ts +0 -15
  79. package/dist-client/pages/checklist/checklist-view.js +0 -738
  80. package/dist-client/pages/checklist/checklist-view.js.map +0 -1
  81. package/dist-client/pages/checklist/comment-list-popup.d.ts +0 -1
  82. package/dist-client/pages/checklist/comment-list-popup.js +0 -368
  83. package/dist-client/pages/checklist/comment-list-popup.js.map +0 -1
  84. package/dist-client/pages/checklist/file-preview-popup.d.ts +0 -1
  85. package/dist-client/pages/checklist/file-preview-popup.js +0 -77
  86. package/dist-client/pages/checklist/file-preview-popup.js.map +0 -1
  87. package/dist-client/pages/checklist/inspection-info-popup.d.ts +0 -50
  88. package/dist-client/pages/checklist/inspection-info-popup.js +0 -684
  89. package/dist-client/pages/checklist/inspection-info-popup.js.map +0 -1
  90. package/dist-client/pages/checklist/inspection-tab-popup.d.ts +0 -18
  91. package/dist-client/pages/checklist/inspection-tab-popup.js +0 -196
  92. package/dist-client/pages/checklist/inspection-tab-popup.js.map +0 -1
  93. package/dist-client/pages/checklist-template/checklist-template-item.d.ts +0 -2
  94. package/dist-client/pages/checklist-template/checklist-template-item.js +0 -253
  95. package/dist-client/pages/checklist-template/checklist-template-item.js.map +0 -1
  96. package/dist-client/pages/checklist-template/checklist-template-list.d.ts +0 -53
  97. package/dist-client/pages/checklist-template/checklist-template-list.js +0 -349
  98. package/dist-client/pages/checklist-template/checklist-template-list.js.map +0 -1
  99. package/dist-client/pages/checklist-template/checklist-type-management.d.ts +0 -55
  100. package/dist-client/pages/checklist-template/checklist-type-management.js +0 -250
  101. package/dist-client/pages/checklist-template/checklist-type-management.js.map +0 -1
  102. package/dist-client/pages/issue/issue-importer.d.ts +0 -10
  103. package/dist-client/pages/issue/issue-importer.js +0 -101
  104. package/dist-client/pages/issue/issue-importer.js.map +0 -1
  105. package/dist-client/pages/issue/issue-list-page.d.ts +0 -63
  106. package/dist-client/pages/issue/issue-list-page.js +0 -323
  107. package/dist-client/pages/issue/issue-list-page.js.map +0 -1
  108. package/dist-client/pages/project-report/project-report-importer.d.ts +0 -10
  109. package/dist-client/pages/project-report/project-report-importer.js +0 -101
  110. package/dist-client/pages/project-report/project-report-importer.js.map +0 -1
  111. package/dist-client/pages/project-report/project-report-list-page.d.ts +0 -63
  112. package/dist-client/pages/project-report/project-report-list-page.js +0 -323
  113. package/dist-client/pages/project-report/project-report-list-page.js.map +0 -1
  114. package/dist-client/pages/supervisor/supervisor-importer.d.ts +0 -10
  115. package/dist-client/pages/supervisor/supervisor-importer.js +0 -101
  116. package/dist-client/pages/supervisor/supervisor-importer.js.map +0 -1
  117. package/dist-client/pages/supervisor/supervisor-list-page.d.ts +0 -63
  118. package/dist-client/pages/supervisor/supervisor-list-page.js +0 -323
  119. package/dist-client/pages/supervisor/supervisor-list-page.js.map +0 -1
  120. package/dist-client/route.d.ts +0 -1
  121. package/dist-client/route.js +0 -32
  122. package/dist-client/route.js.map +0 -1
  123. package/dist-client/stt/speech-to-text.d.ts +0 -36
  124. package/dist-client/stt/speech-to-text.js +0 -89
  125. package/dist-client/stt/speech-to-text.js.map +0 -1
  126. package/dist-client/stt/stt-utils.d.ts +0 -28
  127. package/dist-client/stt/stt-utils.js +0 -146
  128. package/dist-client/stt/stt-utils.js.map +0 -1
  129. package/dist-client/tsconfig.tsbuildinfo +0 -1
  130. package/dist-server/controllers/index.d.ts +0 -0
  131. package/dist-server/controllers/index.js +0 -1
  132. package/dist-server/controllers/index.js.map +0 -1
  133. package/dist-server/index.d.ts +0 -3
  134. package/dist-server/index.js +0 -7
  135. package/dist-server/index.js.map +0 -1
  136. package/dist-server/middlewares/index.d.ts +0 -1
  137. package/dist-server/middlewares/index.js +0 -7
  138. package/dist-server/middlewares/index.js.map +0 -1
  139. package/dist-server/migrations/index.d.ts +0 -1
  140. package/dist-server/migrations/index.js +0 -12
  141. package/dist-server/migrations/index.js.map +0 -1
  142. package/dist-server/routes.d.ts +0 -0
  143. package/dist-server/routes.js +0 -25
  144. package/dist-server/routes.js.map +0 -1
  145. package/dist-server/service/action-plan/action-plan-mutation.d.ts +0 -10
  146. package/dist-server/service/action-plan/action-plan-mutation.js +0 -168
  147. package/dist-server/service/action-plan/action-plan-mutation.js.map +0 -1
  148. package/dist-server/service/action-plan/action-plan-query.d.ts +0 -12
  149. package/dist-server/service/action-plan/action-plan-query.js +0 -97
  150. package/dist-server/service/action-plan/action-plan-query.js.map +0 -1
  151. package/dist-server/service/action-plan/action-plan-type.d.ts +0 -23
  152. package/dist-server/service/action-plan/action-plan-type.js +0 -86
  153. package/dist-server/service/action-plan/action-plan-type.js.map +0 -1
  154. package/dist-server/service/action-plan/action-plan.d.ts +0 -27
  155. package/dist-server/service/action-plan/action-plan.js +0 -116
  156. package/dist-server/service/action-plan/action-plan.js.map +0 -1
  157. package/dist-server/service/action-plan/index.d.ts +0 -5
  158. package/dist-server/service/action-plan/index.js +0 -9
  159. package/dist-server/service/action-plan/index.js.map +0 -1
  160. package/dist-server/service/building-inspection/building-inspection-mutation.d.ts +0 -9
  161. package/dist-server/service/building-inspection/building-inspection-mutation.js +0 -370
  162. package/dist-server/service/building-inspection/building-inspection-mutation.js.map +0 -1
  163. package/dist-server/service/building-inspection/building-inspection-query.d.ts +0 -20
  164. package/dist-server/service/building-inspection/building-inspection-query.js +0 -277
  165. package/dist-server/service/building-inspection/building-inspection-query.js.map +0 -1
  166. package/dist-server/service/building-inspection/building-inspection-type.d.ts +0 -80
  167. package/dist-server/service/building-inspection/building-inspection-type.js +0 -296
  168. package/dist-server/service/building-inspection/building-inspection-type.js.map +0 -1
  169. package/dist-server/service/building-inspection/building-inspection.d.ts +0 -41
  170. package/dist-server/service/building-inspection/building-inspection.js +0 -168
  171. package/dist-server/service/building-inspection/building-inspection.js.map +0 -1
  172. package/dist-server/service/building-inspection/index.d.ts +0 -7
  173. package/dist-server/service/building-inspection/index.js +0 -19
  174. package/dist-server/service/building-inspection/index.js.map +0 -1
  175. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.d.ts +0 -6
  176. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js +0 -56
  177. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-mutation.js.map +0 -1
  178. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.d.ts +0 -16
  179. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js +0 -171
  180. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-query.js.map +0 -1
  181. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.d.ts +0 -23
  182. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js +0 -90
  183. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog-type.js.map +0 -1
  184. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.d.ts +0 -33
  185. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js +0 -132
  186. package/dist-server/service/building-inspection-daily-worklog/building-inspection-daily-worklog.js.map +0 -1
  187. package/dist-server/service/building-inspection-daily-worklog/index.d.ts +0 -5
  188. package/dist-server/service/building-inspection-daily-worklog/index.js +0 -9
  189. package/dist-server/service/building-inspection-daily-worklog/index.js.map +0 -1
  190. package/dist-server/service/building-inspection-history/building-inspection-history-query.d.ts +0 -16
  191. package/dist-server/service/building-inspection-history/building-inspection-history-query.js +0 -120
  192. package/dist-server/service/building-inspection-history/building-inspection-history-query.js.map +0 -1
  193. package/dist-server/service/building-inspection-history/building-inspection-history-type.d.ts +0 -5
  194. package/dist-server/service/building-inspection-history/building-inspection-history-type.js +0 -21
  195. package/dist-server/service/building-inspection-history/building-inspection-history-type.js.map +0 -1
  196. package/dist-server/service/building-inspection-history/building-inspection-history.d.ts +0 -34
  197. package/dist-server/service/building-inspection-history/building-inspection-history.js +0 -157
  198. package/dist-server/service/building-inspection-history/building-inspection-history.js.map +0 -1
  199. package/dist-server/service/building-inspection-history/event-subscriber.d.ts +0 -7
  200. package/dist-server/service/building-inspection-history/event-subscriber.js +0 -21
  201. package/dist-server/service/building-inspection-history/event-subscriber.js.map +0 -1
  202. package/dist-server/service/building-inspection-history/index.d.ts +0 -6
  203. package/dist-server/service/building-inspection-history/index.js +0 -10
  204. package/dist-server/service/building-inspection-history/index.js.map +0 -1
  205. package/dist-server/service/checklist/checklist-mutation.d.ts +0 -3
  206. package/dist-server/service/checklist/checklist-mutation.js +0 -30
  207. package/dist-server/service/checklist/checklist-mutation.js.map +0 -1
  208. package/dist-server/service/checklist/checklist-query.d.ts +0 -21
  209. package/dist-server/service/checklist/checklist-query.js +0 -177
  210. package/dist-server/service/checklist/checklist-query.js.map +0 -1
  211. package/dist-server/service/checklist/checklist-type.d.ts +0 -5
  212. package/dist-server/service/checklist/checklist-type.js +0 -21
  213. package/dist-server/service/checklist/checklist-type.js.map +0 -1
  214. package/dist-server/service/checklist/checklist.d.ts +0 -66
  215. package/dist-server/service/checklist/checklist.js +0 -259
  216. package/dist-server/service/checklist/checklist.js.map +0 -1
  217. package/dist-server/service/checklist/event-subscriber.d.ts +0 -7
  218. package/dist-server/service/checklist/event-subscriber.js +0 -21
  219. package/dist-server/service/checklist/event-subscriber.js.map +0 -1
  220. package/dist-server/service/checklist/index.d.ts +0 -5
  221. package/dist-server/service/checklist/index.js +0 -9
  222. package/dist-server/service/checklist/index.js.map +0 -1
  223. package/dist-server/service/checklist-history/checklist-history-query.d.ts +0 -11
  224. package/dist-server/service/checklist-history/checklist-history-query.js +0 -77
  225. package/dist-server/service/checklist-history/checklist-history-query.js.map +0 -1
  226. package/dist-server/service/checklist-history/checklist-history-type.d.ts +0 -5
  227. package/dist-server/service/checklist-history/checklist-history-type.js +0 -21
  228. package/dist-server/service/checklist-history/checklist-history-type.js.map +0 -1
  229. package/dist-server/service/checklist-history/checklist-history.d.ts +0 -50
  230. package/dist-server/service/checklist-history/checklist-history.js +0 -239
  231. package/dist-server/service/checklist-history/checklist-history.js.map +0 -1
  232. package/dist-server/service/checklist-history/event-subscriber.d.ts +0 -7
  233. package/dist-server/service/checklist-history/event-subscriber.js +0 -21
  234. package/dist-server/service/checklist-history/event-subscriber.js.map +0 -1
  235. package/dist-server/service/checklist-history/index.d.ts +0 -6
  236. package/dist-server/service/checklist-history/index.js +0 -10
  237. package/dist-server/service/checklist-history/index.js.map +0 -1
  238. package/dist-server/service/checklist-item/checklist-item-mutation.d.ts +0 -2
  239. package/dist-server/service/checklist-item/checklist-item-mutation.js +0 -13
  240. package/dist-server/service/checklist-item/checklist-item-mutation.js.map +0 -1
  241. package/dist-server/service/checklist-item/checklist-item-query.d.ts +0 -18
  242. package/dist-server/service/checklist-item/checklist-item-query.js +0 -138
  243. package/dist-server/service/checklist-item/checklist-item-query.js.map +0 -1
  244. package/dist-server/service/checklist-item/checklist-item-type.d.ts +0 -5
  245. package/dist-server/service/checklist-item/checklist-item-type.js +0 -21
  246. package/dist-server/service/checklist-item/checklist-item-type.js.map +0 -1
  247. package/dist-server/service/checklist-item/checklist-item.d.ts +0 -27
  248. package/dist-server/service/checklist-item/checklist-item.js +0 -114
  249. package/dist-server/service/checklist-item/checklist-item.js.map +0 -1
  250. package/dist-server/service/checklist-item/index.d.ts +0 -4
  251. package/dist-server/service/checklist-item/index.js +0 -9
  252. package/dist-server/service/checklist-item/index.js.map +0 -1
  253. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.d.ts +0 -16
  254. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js +0 -83
  255. package/dist-server/service/checklist-item-comment/checklist-item-comment-history.js.map +0 -1
  256. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.d.ts +0 -8
  257. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js +0 -114
  258. package/dist-server/service/checklist-item-comment/checklist-item-comment-mutation.js.map +0 -1
  259. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.d.ts +0 -7
  260. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js +0 -49
  261. package/dist-server/service/checklist-item-comment/checklist-item-comment-query.js.map +0 -1
  262. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.d.ts +0 -14
  263. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js +0 -53
  264. package/dist-server/service/checklist-item-comment/checklist-item-comment-type.js.map +0 -1
  265. package/dist-server/service/checklist-item-comment/checklist-item-comment.d.ts +0 -12
  266. package/dist-server/service/checklist-item-comment/checklist-item-comment.js +0 -57
  267. package/dist-server/service/checklist-item-comment/checklist-item-comment.js.map +0 -1
  268. package/dist-server/service/checklist-item-comment/index.d.ts +0 -5
  269. package/dist-server/service/checklist-item-comment/index.js +0 -10
  270. package/dist-server/service/checklist-item-comment/index.js.map +0 -1
  271. package/dist-server/service/checklist-item-history/checklist-item-history-query.d.ts +0 -16
  272. package/dist-server/service/checklist-item-history/checklist-item-history-query.js +0 -123
  273. package/dist-server/service/checklist-item-history/checklist-item-history-query.js.map +0 -1
  274. package/dist-server/service/checklist-item-history/checklist-item-history-type.d.ts +0 -5
  275. package/dist-server/service/checklist-item-history/checklist-item-history-type.js +0 -21
  276. package/dist-server/service/checklist-item-history/checklist-item-history-type.js.map +0 -1
  277. package/dist-server/service/checklist-item-history/checklist-item-history.d.ts +0 -25
  278. package/dist-server/service/checklist-item-history/checklist-item-history.js +0 -123
  279. package/dist-server/service/checklist-item-history/checklist-item-history.js.map +0 -1
  280. package/dist-server/service/checklist-item-history/event-subscriber.d.ts +0 -7
  281. package/dist-server/service/checklist-item-history/event-subscriber.js +0 -21
  282. package/dist-server/service/checklist-item-history/event-subscriber.js.map +0 -1
  283. package/dist-server/service/checklist-item-history/index.d.ts +0 -6
  284. package/dist-server/service/checklist-item-history/index.js +0 -10
  285. package/dist-server/service/checklist-item-history/index.js.map +0 -1
  286. package/dist-server/service/checklist-template/checklist-template-mutation.d.ts +0 -6
  287. package/dist-server/service/checklist-template/checklist-template-mutation.js +0 -64
  288. package/dist-server/service/checklist-template/checklist-template-mutation.js.map +0 -1
  289. package/dist-server/service/checklist-template/checklist-template-query.d.ts +0 -10
  290. package/dist-server/service/checklist-template/checklist-template-query.js +0 -65
  291. package/dist-server/service/checklist-template/checklist-template-query.js.map +0 -1
  292. package/dist-server/service/checklist-template/checklist-template-type.d.ts +0 -10
  293. package/dist-server/service/checklist-template/checklist-template-type.js +0 -39
  294. package/dist-server/service/checklist-template/checklist-template-type.js.map +0 -1
  295. package/dist-server/service/checklist-template/checklist-template.d.ts +0 -17
  296. package/dist-server/service/checklist-template/checklist-template.js +0 -78
  297. package/dist-server/service/checklist-template/checklist-template.js.map +0 -1
  298. package/dist-server/service/checklist-template/index.d.ts +0 -5
  299. package/dist-server/service/checklist-template/index.js +0 -9
  300. package/dist-server/service/checklist-template/index.js.map +0 -1
  301. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.d.ts +0 -7
  302. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js +0 -71
  303. package/dist-server/service/checklist-template-item/checklist-template-item-mutation.js.map +0 -1
  304. package/dist-server/service/checklist-template-item/checklist-template-item-query.d.ts +0 -11
  305. package/dist-server/service/checklist-template-item/checklist-template-item-query.js +0 -78
  306. package/dist-server/service/checklist-template-item/checklist-template-item-query.js.map +0 -1
  307. package/dist-server/service/checklist-template-item/checklist-template-item-type.d.ts +0 -18
  308. package/dist-server/service/checklist-template-item/checklist-template-item-type.js +0 -65
  309. package/dist-server/service/checklist-template-item/checklist-template-item-type.js.map +0 -1
  310. package/dist-server/service/checklist-template-item/checklist-template-item.d.ts +0 -25
  311. package/dist-server/service/checklist-template-item/checklist-template-item.js +0 -101
  312. package/dist-server/service/checklist-template-item/checklist-template-item.js.map +0 -1
  313. package/dist-server/service/checklist-template-item/index.d.ts +0 -5
  314. package/dist-server/service/checklist-template-item/index.js +0 -9
  315. package/dist-server/service/checklist-template-item/index.js.map +0 -1
  316. package/dist-server/service/checklist-template-item/spec-matching-service.d.ts +0 -2
  317. package/dist-server/service/checklist-template-item/spec-matching-service.js +0 -50
  318. package/dist-server/service/checklist-template-item/spec-matching-service.js.map +0 -1
  319. package/dist-server/service/checklist-type/checklist-type-mutation.d.ts +0 -6
  320. package/dist-server/service/checklist-type/checklist-type-mutation.js +0 -64
  321. package/dist-server/service/checklist-type/checklist-type-mutation.js.map +0 -1
  322. package/dist-server/service/checklist-type/checklist-type-query.d.ts +0 -10
  323. package/dist-server/service/checklist-type/checklist-type-query.js +0 -65
  324. package/dist-server/service/checklist-type/checklist-type-query.js.map +0 -1
  325. package/dist-server/service/checklist-type/checklist-type-type.d.ts +0 -11
  326. package/dist-server/service/checklist-type/checklist-type-type.js +0 -43
  327. package/dist-server/service/checklist-type/checklist-type-type.js.map +0 -1
  328. package/dist-server/service/checklist-type/checklist-type.d.ts +0 -19
  329. package/dist-server/service/checklist-type/checklist-type.js +0 -78
  330. package/dist-server/service/checklist-type/checklist-type.js.map +0 -1
  331. package/dist-server/service/checklist-type/index.d.ts +0 -5
  332. package/dist-server/service/checklist-type/index.js +0 -9
  333. package/dist-server/service/checklist-type/index.js.map +0 -1
  334. package/dist-server/service/index.d.ts +0 -18
  335. package/dist-server/service/index.js +0 -78
  336. package/dist-server/service/index.js.map +0 -1
  337. package/dist-server/service/issue/index.d.ts +0 -5
  338. package/dist-server/service/issue/index.js +0 -9
  339. package/dist-server/service/issue/index.js.map +0 -1
  340. package/dist-server/service/issue/issue-mutation.d.ts +0 -10
  341. package/dist-server/service/issue/issue-mutation.js +0 -168
  342. package/dist-server/service/issue/issue-mutation.js.map +0 -1
  343. package/dist-server/service/issue/issue-query.d.ts +0 -12
  344. package/dist-server/service/issue/issue-query.js +0 -97
  345. package/dist-server/service/issue/issue-query.js.map +0 -1
  346. package/dist-server/service/issue/issue-type.d.ts +0 -23
  347. package/dist-server/service/issue/issue-type.js +0 -86
  348. package/dist-server/service/issue/issue-type.js.map +0 -1
  349. package/dist-server/service/issue/issue.d.ts +0 -26
  350. package/dist-server/service/issue/issue.js +0 -111
  351. package/dist-server/service/issue/issue.js.map +0 -1
  352. package/dist-server/service/project-report/index.d.ts +0 -5
  353. package/dist-server/service/project-report/index.js +0 -9
  354. package/dist-server/service/project-report/index.js.map +0 -1
  355. package/dist-server/service/project-report/project-report-mutation.d.ts +0 -10
  356. package/dist-server/service/project-report/project-report-mutation.js +0 -168
  357. package/dist-server/service/project-report/project-report-mutation.js.map +0 -1
  358. package/dist-server/service/project-report/project-report-query.d.ts +0 -12
  359. package/dist-server/service/project-report/project-report-query.js +0 -97
  360. package/dist-server/service/project-report/project-report-query.js.map +0 -1
  361. package/dist-server/service/project-report/project-report-type.d.ts +0 -23
  362. package/dist-server/service/project-report/project-report-type.js +0 -86
  363. package/dist-server/service/project-report/project-report-type.js.map +0 -1
  364. package/dist-server/service/project-report/project-report.d.ts +0 -28
  365. package/dist-server/service/project-report/project-report.js +0 -121
  366. package/dist-server/service/project-report/project-report.js.map +0 -1
  367. package/dist-server/service/supervisor/index.d.ts +0 -5
  368. package/dist-server/service/supervisor/index.js +0 -9
  369. package/dist-server/service/supervisor/index.js.map +0 -1
  370. package/dist-server/service/supervisor/supervisor-mutation.d.ts +0 -10
  371. package/dist-server/service/supervisor/supervisor-mutation.js +0 -168
  372. package/dist-server/service/supervisor/supervisor-mutation.js.map +0 -1
  373. package/dist-server/service/supervisor/supervisor-query.d.ts +0 -12
  374. package/dist-server/service/supervisor/supervisor-query.js +0 -97
  375. package/dist-server/service/supervisor/supervisor-query.js.map +0 -1
  376. package/dist-server/service/supervisor/supervisor-type.d.ts +0 -23
  377. package/dist-server/service/supervisor/supervisor-type.js +0 -86
  378. package/dist-server/service/supervisor/supervisor-type.js.map +0 -1
  379. package/dist-server/service/supervisor/supervisor.d.ts +0 -28
  380. package/dist-server/service/supervisor/supervisor.js +0 -121
  381. package/dist-server/service/supervisor/supervisor.js.map +0 -1
  382. package/dist-server/tsconfig.tsbuildinfo +0 -1
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChecklistType = exports.ChecklistTypeMainType = 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
- var ChecklistTypeMainType;
10
- (function (ChecklistTypeMainType) {
11
- ChecklistTypeMainType["BASIC"] = "10";
12
- ChecklistTypeMainType["NON_BASIC"] = "20";
13
- })(ChecklistTypeMainType || (exports.ChecklistTypeMainType = ChecklistTypeMainType = {}));
14
- (0, type_graphql_1.registerEnumType)(ChecklistTypeMainType, {
15
- name: 'ChecklistTypeMainType',
16
- description: '체크리스트 구분 메인 구분'
17
- });
18
- let ChecklistType = class ChecklistType {
19
- };
20
- exports.ChecklistType = ChecklistType;
21
- tslib_1.__decorate([
22
- (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
23
- (0, type_graphql_1.Field)(type => type_graphql_1.ID),
24
- tslib_1.__metadata("design:type", String)
25
- ], ChecklistType.prototype, "id", void 0);
26
- tslib_1.__decorate([
27
- (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
28
- (0, type_graphql_1.Field)({ nullable: true }),
29
- tslib_1.__metadata("design:type", shell_1.Domain)
30
- ], ChecklistType.prototype, "domain", void 0);
31
- tslib_1.__decorate([
32
- (0, typeorm_1.RelationId)((checklistType) => checklistType.domain),
33
- tslib_1.__metadata("design:type", String)
34
- ], ChecklistType.prototype, "domainId", void 0);
35
- tslib_1.__decorate([
36
- (0, typeorm_1.Column)({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' }),
37
- (0, type_graphql_1.Field)({ nullable: false }),
38
- tslib_1.__metadata("design:type", String)
39
- ], ChecklistType.prototype, "mainType", void 0);
40
- tslib_1.__decorate([
41
- (0, typeorm_1.Column)({ nullable: false, comment: '상세 구분' }),
42
- (0, type_graphql_1.Field)({ nullable: false }),
43
- tslib_1.__metadata("design:type", String)
44
- ], ChecklistType.prototype, "detailType", void 0);
45
- tslib_1.__decorate([
46
- (0, typeorm_1.CreateDateColumn)(),
47
- (0, type_graphql_1.Field)({ nullable: true }),
48
- tslib_1.__metadata("design:type", Date)
49
- ], ChecklistType.prototype, "createdAt", void 0);
50
- tslib_1.__decorate([
51
- (0, typeorm_1.UpdateDateColumn)(),
52
- (0, type_graphql_1.Field)({ nullable: true }),
53
- tslib_1.__metadata("design:type", Date)
54
- ], ChecklistType.prototype, "updatedAt", void 0);
55
- tslib_1.__decorate([
56
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
57
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
58
- tslib_1.__metadata("design:type", auth_base_1.User)
59
- ], ChecklistType.prototype, "creator", void 0);
60
- tslib_1.__decorate([
61
- (0, typeorm_1.RelationId)((checklistType) => checklistType.creator),
62
- tslib_1.__metadata("design:type", String)
63
- ], ChecklistType.prototype, "creatorId", void 0);
64
- tslib_1.__decorate([
65
- (0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
66
- (0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
67
- tslib_1.__metadata("design:type", auth_base_1.User)
68
- ], ChecklistType.prototype, "updater", void 0);
69
- tslib_1.__decorate([
70
- (0, typeorm_1.RelationId)((checklistType) => checklistType.updater),
71
- tslib_1.__metadata("design:type", String)
72
- ], ChecklistType.prototype, "updaterId", void 0);
73
- exports.ChecklistType = ChecklistType = tslib_1.__decorate([
74
- (0, typeorm_1.Entity)({ comment: '체크리스트 구분' }),
75
- (0, typeorm_1.Index)('ix_checklist_type_0', (checklistType) => [checklistType.domain, checklistType.mainType, checklistType.detailType], { unique: true }),
76
- (0, type_graphql_1.ObjectType)()
77
- ], ChecklistType);
78
- //# sourceMappingURL=checklist-type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checklist-type.js","sourceRoot":"","sources":["../../../server/service/checklist-type/checklist-type.ts"],"names":[],"mappings":";;;;AAAA,qCAAkI;AAClI,+CAAsE;AACtE,iDAA8C;AAC9C,yDAAgD;AAEhD,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAC/B,qCAAY,C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BAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;8CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDAClD;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;8CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDAClD;wBAxCP,aAAa;IAPzB,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;IAC/B,IAAA,eAAK,EACJ,qBAAqB,EACrB,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,EAC1G,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,GAAE;GACA,aAAa,CAyCzB","sourcesContent":["import { CreateDateColumn, UpdateDateColumn, Entity, Index, Column, RelationId, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'\nimport { ObjectType, Field, ID, registerEnumType } from 'type-graphql'\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport enum ChecklistTypeMainType {\n BASIC = '10',\n NON_BASIC = '20'\n}\n\nregisterEnumType(ChecklistTypeMainType, {\n name: 'ChecklistTypeMainType',\n description: '체크리스트 구분 메인 구분'\n})\n\n@Entity({ comment: '체크리스트 구분' })\n@Index(\n 'ix_checklist_type_0',\n (checklistType: ChecklistType) => [checklistType.domain, checklistType.mainType, checklistType.detailType],\n { unique: true }\n)\n@ObjectType()\nexport class ChecklistType {\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((checklistType: ChecklistType) => checklistType.domain)\n domainId?: string\n\n @Column({ nullable: false, comment: '메인 구분 (10: 기본 업무, 20: 기본 외 업무)' })\n @Field({ nullable: false })\n mainType: ChecklistTypeMainType\n\n @Column({ nullable: false, comment: '상세 구분' })\n @Field({ nullable: false })\n detailType: string\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((checklistType: ChecklistType) => checklistType.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((checklistType: ChecklistType) => checklistType.updater)\n updaterId?: string\n}\n"]}
@@ -1,5 +0,0 @@
1
- import { ChecklistType } from './checklist-type';
2
- import { ChecklistTypeQuery } from './checklist-type-query';
3
- import { ChecklistTypeMutation } from './checklist-type-mutation';
4
- export declare const entities: (typeof ChecklistType)[];
5
- export declare const resolvers: (typeof ChecklistTypeQuery | typeof ChecklistTypeMutation)[];
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolvers = exports.entities = void 0;
4
- const checklist_type_1 = require("./checklist-type");
5
- const checklist_type_query_1 = require("./checklist-type-query");
6
- const checklist_type_mutation_1 = require("./checklist-type-mutation");
7
- exports.entities = [checklist_type_1.ChecklistType];
8
- exports.resolvers = [checklist_type_query_1.ChecklistTypeQuery, checklist_type_mutation_1.ChecklistTypeMutation];
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/checklist-type/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAChD,iEAA2D;AAC3D,uEAAiE;AAEpD,QAAA,QAAQ,GAAG,CAAC,8BAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,CAAC,yCAAkB,EAAE,+CAAqB,CAAC,CAAA","sourcesContent":["import { ChecklistType } from './checklist-type'\nimport { ChecklistTypeQuery } from './checklist-type-query'\nimport { ChecklistTypeMutation } from './checklist-type-mutation'\n\nexport const entities = [ChecklistType]\nexport const resolvers = [ChecklistTypeQuery, ChecklistTypeMutation]\n"]}
@@ -1,18 +0,0 @@
1
- export * from './action-plan/action-plan';
2
- export * from './issue/issue';
3
- export * from './project-report/project-report';
4
- export * from './supervisor/supervisor';
5
- export * from './checklist-type/checklist-type';
6
- export * from './checklist/checklist';
7
- export * from './checklist-item/checklist-item';
8
- export * from './checklist-item-comment/checklist-item-comment';
9
- export * from './checklist-template/checklist-template';
10
- export * from './checklist-template-item/checklist-template-item';
11
- export * from './building-inspection/building-inspection';
12
- export * from './building-inspection/building-inspection-type';
13
- export * from './building-inspection-daily-worklog/building-inspection-daily-worklog';
14
- export declare const entities: (typeof import("./issue/issue").Issue | typeof import("./action-plan/action-plan").ActionPlan | typeof import("./supervisor/supervisor").Supervisor | typeof import("./project-report/project-report").ProjectReport | typeof import("./checklist-type/checklist-type").ChecklistType | typeof import("./checklist-item-comment/checklist-item-comment").ChecklistItemComment | typeof import("./checklist-item/checklist-item").ChecklistItem | typeof import("./checklist/checklist").Checklist | typeof import("./building-inspection/building-inspection").BuildingInspection | typeof import("./building-inspection-daily-worklog/building-inspection-daily-worklog").BuildingInspectionDailyWorklog | typeof import("./checklist-template-item/checklist-template-item").ChecklistTemplateItem | typeof import("./checklist-template/checklist-template").ChecklistTemplate | typeof import("./building-inspection-history/building-inspection-history").BuildingInspectionHistory | typeof import("./checklist-history/checklist-history").ChecklistHistory | typeof import("./checklist-item-history/checklist-item-history").ChecklistItemHistory)[];
15
- export declare const schema: {
16
- resolverClasses: typeof import("./checklist-item/checklist-item-mutation").ChecklistItemMutation[];
17
- };
18
- export declare const subscribers: (typeof import("./checklist-history/event-subscriber").ChecklistHistoryEntitySubscriber | typeof import("./checklist-item-history/event-subscriber").ChecklistItemHistoryEntitySubscriber | typeof import("./building-inspection-history/event-subscriber").BuildingInspectionHistoryEntitySubscriber)[];
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.subscribers = exports.schema = exports.entities = void 0;
4
- const tslib_1 = require("tslib");
5
- /* EXPORT ENTITY TYPES */
6
- tslib_1.__exportStar(require("./action-plan/action-plan"), exports);
7
- tslib_1.__exportStar(require("./issue/issue"), exports);
8
- tslib_1.__exportStar(require("./project-report/project-report"), exports);
9
- tslib_1.__exportStar(require("./supervisor/supervisor"), exports);
10
- tslib_1.__exportStar(require("./checklist-type/checklist-type"), exports);
11
- tslib_1.__exportStar(require("./checklist/checklist"), exports);
12
- tslib_1.__exportStar(require("./checklist-item/checklist-item"), exports);
13
- tslib_1.__exportStar(require("./checklist-item-comment/checklist-item-comment"), exports);
14
- tslib_1.__exportStar(require("./checklist-template/checklist-template"), exports);
15
- tslib_1.__exportStar(require("./checklist-template-item/checklist-template-item"), exports);
16
- tslib_1.__exportStar(require("./building-inspection/building-inspection"), exports);
17
- tslib_1.__exportStar(require("./building-inspection/building-inspection-type"), exports);
18
- tslib_1.__exportStar(require("./building-inspection-daily-worklog/building-inspection-daily-worklog"), exports);
19
- /* IMPORT ENTITIES AND RESOLVERS */
20
- const action_plan_1 = require("./action-plan");
21
- const issue_1 = require("./issue");
22
- const project_report_1 = require("./project-report");
23
- const supervisor_1 = require("./supervisor");
24
- const checklist_1 = require("./checklist");
25
- const checklist_history_1 = require("./checklist-history");
26
- const checklist_item_1 = require("./checklist-item");
27
- const checklist_item_history_1 = require("./checklist-item-history");
28
- const checklist_item_comment_1 = require("./checklist-item-comment");
29
- const checklist_type_1 = require("./checklist-type");
30
- const checklist_template_1 = require("./checklist-template");
31
- const checklist_template_item_1 = require("./checklist-template-item");
32
- const building_inspection_1 = require("./building-inspection");
33
- const building_inspection_history_1 = require("./building-inspection-history");
34
- const building_inspection_daily_worklog_1 = require("./building-inspection-daily-worklog");
35
- exports.entities = [
36
- /* ENTITIES */
37
- ...action_plan_1.entities,
38
- ...issue_1.entities,
39
- ...project_report_1.entities,
40
- ...supervisor_1.entities,
41
- ...checklist_1.entities,
42
- ...checklist_history_1.entities,
43
- ...checklist_item_1.entities,
44
- ...checklist_item_history_1.entities,
45
- ...checklist_item_comment_1.entities,
46
- ...checklist_type_1.entities,
47
- ...checklist_template_item_1.entities,
48
- ...checklist_template_1.entities,
49
- ...building_inspection_1.entities,
50
- ...building_inspection_history_1.entities,
51
- ...building_inspection_daily_worklog_1.entities
52
- ];
53
- exports.schema = {
54
- resolverClasses: [
55
- /* RESOLVER CLASSES */
56
- ...action_plan_1.resolvers,
57
- ...issue_1.resolvers,
58
- ...project_report_1.resolvers,
59
- ...supervisor_1.resolvers,
60
- ...checklist_1.resolvers,
61
- ...checklist_history_1.resolvers,
62
- ...checklist_item_1.resolvers,
63
- ...checklist_item_history_1.resolvers,
64
- ...checklist_item_comment_1.resolvers,
65
- ...checklist_type_1.resolvers,
66
- ...checklist_template_item_1.resolvers,
67
- ...checklist_template_1.resolvers,
68
- ...building_inspection_1.resolvers,
69
- ...building_inspection_history_1.resolvers,
70
- ...building_inspection_daily_worklog_1.resolvers
71
- ]
72
- };
73
- exports.subscribers = [
74
- ...checklist_history_1.subscribers,
75
- ...checklist_item_history_1.subscribers,
76
- ...building_inspection_history_1.subscribers
77
- ];
78
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,oEAAyC;AACz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AG,yCAAoC;CACxC,CAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './action-plan/action-plan'\nexport * from './issue/issue'\nexport * from './project-report/project-report'\nexport * from './supervisor/supervisor'\nexport * from './checklist-type/checklist-type'\nexport * from './checklist/checklist'\nexport * from './checklist-item/checklist-item'\nexport * from './checklist-item-comment/checklist-item-comment'\nexport * from './checklist-template/checklist-template'\nexport * from './checklist-template-item/checklist-template-item'\nexport * from './building-inspection/building-inspection'\nexport * from './building-inspection/building-inspection-type'\nexport * from './building-inspection-daily-worklog/building-inspection-daily-worklog'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as ActionPlanEntities, resolvers as ActionPlanResolvers } from './action-plan'\nimport { entities as IssueEntities, resolvers as IssueResolvers } from './issue'\nimport { entities as ProjectReportEntities, resolvers as ProjectReportResolvers } from './project-report'\nimport { entities as SupervisorEntities, resolvers as SupervisorResolvers } from './supervisor'\nimport { entities as ChecklistEntities, resolvers as ChecklistResolvers } from './checklist'\nimport {\n entities as ChecklistHistoryEntities,\n resolvers as ChecklistHistoryResolvers,\n subscribers as ChecklistHistorySubscribers\n} from './checklist-history'\nimport { entities as ChecklistItemEntities, resolvers as ChecklistItemResolvers } from './checklist-item'\nimport {\n entities as ChecklistItemHistoryEntities,\n resolvers as ChecklistItemHistoryResolvers,\n subscribers as ChecklistItemHistorySubscribers\n} from './checklist-item-history'\nimport { entities as ChecklistItemCommentEntities, resolvers as ChecklistItemCommentResolvers } from './checklist-item-comment'\nimport { entities as ChecklistTypeEntities, resolvers as ChecklistTypeResolvers } from './checklist-type'\nimport { entities as ChecklistTemplateEntities, resolvers as ChecklistTemplateResolvers } from './checklist-template'\nimport { entities as ChecklistTemplateItemEntities, resolvers as ChecklistTemplateItemResolvers } from './checklist-template-item'\nimport { entities as BuildingInspectionEntities, resolvers as BuildingInspectionResolvers } from './building-inspection'\nimport {\n entities as BuildingInspectionHistoryEntities,\n resolvers as BuildingInspectionHistoryResolvers,\n subscribers as BuildingInspectionHistorySubscribers\n} from './building-inspection-history'\nimport {\n entities as BuildingInspectionDailyWorklogEntities,\n resolvers as BuildingInspectionDailyWorklogResolvers\n} from './building-inspection-daily-worklog'\n\nexport const entities = [\n /* ENTITIES */\n ...ActionPlanEntities,\n ...IssueEntities,\n ...ProjectReportEntities,\n ...SupervisorEntities,\n ...ChecklistEntities,\n ...ChecklistHistoryEntities,\n ...ChecklistItemEntities,\n ...ChecklistItemHistoryEntities,\n ...ChecklistItemCommentEntities,\n ...ChecklistTypeEntities,\n ...ChecklistTemplateItemEntities,\n ...ChecklistTemplateEntities,\n ...BuildingInspectionEntities,\n ...BuildingInspectionHistoryEntities,\n ...BuildingInspectionDailyWorklogEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n ...ActionPlanResolvers,\n ...IssueResolvers,\n ...ProjectReportResolvers,\n ...SupervisorResolvers,\n ...ChecklistResolvers,\n ...ChecklistHistoryResolvers,\n ...ChecklistItemResolvers,\n ...ChecklistItemHistoryResolvers,\n ...ChecklistItemCommentResolvers,\n ...ChecklistTypeResolvers,\n ...ChecklistTemplateItemResolvers,\n ...ChecklistTemplateResolvers,\n ...BuildingInspectionResolvers,\n ...BuildingInspectionHistoryResolvers,\n ...BuildingInspectionDailyWorklogResolvers\n ]\n}\n\nexport const subscribers = [\n ...ChecklistHistorySubscribers,\n ...ChecklistItemHistorySubscribers,\n ...BuildingInspectionHistorySubscribers\n]\n"]}
@@ -1,5 +0,0 @@
1
- import { Issue } from './issue';
2
- import { IssueQuery } from './issue-query';
3
- import { IssueMutation } from './issue-mutation';
4
- export declare const entities: (typeof Issue)[];
5
- export declare const resolvers: (typeof IssueQuery | typeof IssueMutation)[];
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolvers = exports.entities = void 0;
4
- const issue_1 = require("./issue");
5
- const issue_query_1 = require("./issue-query");
6
- const issue_mutation_1 = require("./issue-mutation");
7
- exports.entities = [issue_1.Issue];
8
- exports.resolvers = [issue_query_1.IssueQuery, issue_mutation_1.IssueMutation];
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/issue/index.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAC/B,+CAA0C;AAC1C,qDAAgD;AAEnC,QAAA,QAAQ,GAAG,CAAC,aAAK,CAAC,CAAA;AAClB,QAAA,SAAS,GAAG,CAAC,wBAAU,EAAE,8BAAa,CAAC,CAAA","sourcesContent":["import { Issue } from './issue'\nimport { IssueQuery } from './issue-query'\nimport { IssueMutation } from './issue-mutation'\n\nexport const entities = [Issue]\nexport const resolvers = [IssueQuery, IssueMutation]\n"]}
@@ -1,10 +0,0 @@
1
- import { Issue } from './issue';
2
- import { NewIssue, IssuePatch } from './issue-type';
3
- export declare class IssueMutation {
4
- createIssue(issue: NewIssue, context: ResolverContext): Promise<Issue>;
5
- updateIssue(id: string, patch: IssuePatch, context: ResolverContext): Promise<Issue>;
6
- updateMultipleIssue(patches: IssuePatch[], context: ResolverContext): Promise<Issue[]>;
7
- deleteIssue(id: string, context: ResolverContext): Promise<boolean>;
8
- deleteIssues(ids: string[], context: ResolverContext): Promise<boolean>;
9
- importIssues(issues: IssuePatch[], context: ResolverContext): Promise<boolean>;
10
- }
@@ -1,168 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IssueMutation = void 0;
4
- const tslib_1 = require("tslib");
5
- const type_graphql_1 = require("type-graphql");
6
- const typeorm_1 = require("typeorm");
7
- const attachment_base_1 = require("@things-factory/attachment-base");
8
- const issue_1 = require("./issue");
9
- const issue_type_1 = require("./issue-type");
10
- let IssueMutation = class IssueMutation {
11
- async createIssue(issue, context) {
12
- const { domain, user, tx } = context.state;
13
- const result = await tx.getRepository(issue_1.Issue).save(Object.assign(Object.assign({}, issue), { domain, creator: user, updater: user }));
14
- if (issue.thumbnail) {
15
- await (0, attachment_base_1.createAttachment)(null, {
16
- attachment: {
17
- file: issue.thumbnail,
18
- refType: issue_1.Issue.name,
19
- refBy: result.id
20
- }
21
- }, context);
22
- }
23
- return result;
24
- }
25
- async updateIssue(id, patch, context) {
26
- const { domain, user, tx } = context.state;
27
- const repository = tx.getRepository(issue_1.Issue);
28
- const issue = await repository.findOne({
29
- where: { domain: { id: domain.id }, id }
30
- });
31
- const result = await repository.save(Object.assign(Object.assign(Object.assign({}, issue), patch), { updater: user }));
32
- if (patch.thumbnail) {
33
- await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: [result.id] }, context);
34
- await (0, attachment_base_1.createAttachment)(null, {
35
- attachment: {
36
- file: patch.thumbnail,
37
- refType: issue_1.Issue.name,
38
- refBy: result.id
39
- }
40
- }, context);
41
- }
42
- return result;
43
- }
44
- async updateMultipleIssue(patches, context) {
45
- const { domain, user, tx } = context.state;
46
- let results = [];
47
- const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
48
- const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
49
- const issueRepo = tx.getRepository(issue_1.Issue);
50
- if (_createRecords.length > 0) {
51
- for (let i = 0; i < _createRecords.length; i++) {
52
- const newRecord = _createRecords[i];
53
- const result = await issueRepo.save(Object.assign(Object.assign({}, newRecord), { domain, creator: user, updater: user }));
54
- if (newRecord.thumbnail) {
55
- await (0, attachment_base_1.createAttachment)(null, {
56
- attachment: {
57
- file: newRecord.thumbnail,
58
- refType: issue_1.Issue.name,
59
- refBy: result.id
60
- }
61
- }, context);
62
- }
63
- results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
64
- }
65
- }
66
- if (_updateRecords.length > 0) {
67
- for (let i = 0; i < _updateRecords.length; i++) {
68
- const updateRecord = _updateRecords[i];
69
- const issue = await issueRepo.findOneBy({ id: updateRecord.id });
70
- const result = await issueRepo.save(Object.assign(Object.assign(Object.assign({}, issue), updateRecord), { updater: user }));
71
- if (updateRecord.thumbnail) {
72
- await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: [result.id] }, context);
73
- await (0, attachment_base_1.createAttachment)(null, {
74
- attachment: {
75
- file: updateRecord.thumbnail,
76
- refType: issue_1.Issue.name,
77
- refBy: result.id
78
- }
79
- }, context);
80
- }
81
- results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
82
- }
83
- }
84
- return results;
85
- }
86
- async deleteIssue(id, context) {
87
- const { domain, tx } = context.state;
88
- await tx.getRepository(issue_1.Issue).delete({ domain: { id: domain.id }, id });
89
- await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: [id] }, context);
90
- return true;
91
- }
92
- async deleteIssues(ids, context) {
93
- const { domain, tx } = context.state;
94
- await tx.getRepository(issue_1.Issue).delete({
95
- domain: { id: domain.id },
96
- id: (0, typeorm_1.In)(ids)
97
- });
98
- await (0, attachment_base_1.deleteAttachmentsByRef)(null, { refBys: ids }, context);
99
- return true;
100
- }
101
- async importIssues(issues, context) {
102
- const { domain, tx } = context.state;
103
- await Promise.all(issues.map(async (issue) => {
104
- const createdIssue = await tx.getRepository(issue_1.Issue).save(Object.assign({ domain }, issue));
105
- }));
106
- return true;
107
- }
108
- };
109
- exports.IssueMutation = IssueMutation;
110
- tslib_1.__decorate([
111
- (0, type_graphql_1.Directive)('@transaction'),
112
- (0, type_graphql_1.Mutation)(returns => issue_1.Issue, { description: 'To create new Issue' }),
113
- tslib_1.__param(0, (0, type_graphql_1.Arg)('issue')),
114
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
115
- tslib_1.__metadata("design:type", Function),
116
- tslib_1.__metadata("design:paramtypes", [issue_type_1.NewIssue, Object]),
117
- tslib_1.__metadata("design:returntype", Promise)
118
- ], IssueMutation.prototype, "createIssue", null);
119
- tslib_1.__decorate([
120
- (0, type_graphql_1.Directive)('@transaction'),
121
- (0, type_graphql_1.Mutation)(returns => issue_1.Issue, { description: 'To modify Issue information' }),
122
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
123
- tslib_1.__param(1, (0, type_graphql_1.Arg)('patch')),
124
- tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
125
- tslib_1.__metadata("design:type", Function),
126
- tslib_1.__metadata("design:paramtypes", [String, issue_type_1.IssuePatch, Object]),
127
- tslib_1.__metadata("design:returntype", Promise)
128
- ], IssueMutation.prototype, "updateIssue", null);
129
- tslib_1.__decorate([
130
- (0, type_graphql_1.Directive)('@transaction'),
131
- (0, type_graphql_1.Mutation)(returns => [issue_1.Issue], { description: "To modify multiple Issues' information" }),
132
- tslib_1.__param(0, (0, type_graphql_1.Arg)('patches', type => [issue_type_1.IssuePatch])),
133
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
134
- tslib_1.__metadata("design:type", Function),
135
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
136
- tslib_1.__metadata("design:returntype", Promise)
137
- ], IssueMutation.prototype, "updateMultipleIssue", null);
138
- tslib_1.__decorate([
139
- (0, type_graphql_1.Directive)('@transaction'),
140
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete Issue' }),
141
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
142
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
143
- tslib_1.__metadata("design:type", Function),
144
- tslib_1.__metadata("design:paramtypes", [String, Object]),
145
- tslib_1.__metadata("design:returntype", Promise)
146
- ], IssueMutation.prototype, "deleteIssue", null);
147
- tslib_1.__decorate([
148
- (0, type_graphql_1.Directive)('@transaction'),
149
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To delete multiple Issues' }),
150
- tslib_1.__param(0, (0, type_graphql_1.Arg)('ids', type => [String])),
151
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
152
- tslib_1.__metadata("design:type", Function),
153
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
154
- tslib_1.__metadata("design:returntype", Promise)
155
- ], IssueMutation.prototype, "deleteIssues", null);
156
- tslib_1.__decorate([
157
- (0, type_graphql_1.Directive)('@transaction'),
158
- (0, type_graphql_1.Mutation)(returns => Boolean, { description: 'To import multiple Issues' }),
159
- tslib_1.__param(0, (0, type_graphql_1.Arg)('issues', type => [issue_type_1.IssuePatch])),
160
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
161
- tslib_1.__metadata("design:type", Function),
162
- tslib_1.__metadata("design:paramtypes", [Array, Object]),
163
- tslib_1.__metadata("design:returntype", Promise)
164
- ], IssueMutation.prototype, "importIssues", null);
165
- exports.IssueMutation = IssueMutation = tslib_1.__decorate([
166
- (0, type_graphql_1.Resolver)(issue_1.Issue)
167
- ], IssueMutation);
168
- //# sourceMappingURL=issue-mutation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"issue-mutation.js","sourceRoot":"","sources":["../../../server/service/issue/issue-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,qEAA0F;AAE1F,mCAA+B;AAC/B,6CAAmD;AAG5C,IAAM,aAAa,GAAnB,MAAM,aAAa;IAGlB,AAAN,KAAK,CAAC,WAAW,CAAe,KAAe,EAAS,OAAwB;QAC9E,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,aAAK,CAAC,CAAC,IAAI,iCAC5C,KAAK,KACR,MAAM,EACN,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,IACb,CAAA;QAEF,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,IAAA,kCAAgB,EACpB,IAAI,EACJ;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,KAAK,CAAC,SAAS;oBACrB,OAAO,EAAE,aAAK,CAAC,IAAI;oBACnB,KAAK,EAAE,MAAM,CAAC,EAAE;iBACjB;aACF,EACD,OAAO,CACR,CAAA;QACH,CAAC;QAED,OAAO,MAAM,CAAA;IAC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AA,uBAAQ,EAAC,aAAK,CAAC;GACH,aAAa,CA4LzB","sourcesContent":["import { Resolver, Mutation, Arg, Ctx, Directive } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { createAttachment, deleteAttachmentsByRef } from '@things-factory/attachment-base'\n\nimport { Issue } from './issue'\nimport { NewIssue, IssuePatch } from './issue-type'\n\n@Resolver(Issue)\nexport class IssueMutation {\n @Directive('@transaction')\n @Mutation(returns => Issue, { description: 'To create new Issue' })\n async createIssue(@Arg('issue') issue: NewIssue, @Ctx() context: ResolverContext): Promise<Issue> {\n const { domain, user, tx } = context.state\n\n const result = await tx.getRepository(Issue).save({\n ...issue,\n domain,\n creator: user,\n updater: user\n })\n\n if (issue.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: issue.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => Issue, { description: 'To modify Issue information' })\n async updateIssue(\n @Arg('id') id: string,\n @Arg('patch') patch: IssuePatch,\n @Ctx() context: ResolverContext\n ): Promise<Issue> {\n const { domain, user, tx } = context.state\n\n const repository = tx.getRepository(Issue)\n const issue = await repository.findOne({\n where: { domain: { id: domain.id }, id }\n })\n\n const result = await repository.save({\n ...issue,\n ...patch,\n updater: user\n })\n\n if (patch.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: patch.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n return result\n }\n\n @Directive('@transaction')\n @Mutation(returns => [Issue], { description: \"To modify multiple Issues' information\" })\n async updateMultipleIssue(\n @Arg('patches', type => [IssuePatch]) patches: IssuePatch[],\n @Ctx() context: ResolverContext\n ): Promise<Issue[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === '+')\n const _updateRecords = patches.filter((patch: any) => patch.cuFlag.toUpperCase() === 'M')\n const issueRepo = tx.getRepository(Issue)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n\n const result = await issueRepo.save({\n ...newRecord,\n domain,\n creator: user,\n updater: user\n })\n\n if (newRecord.thumbnail) {\n await createAttachment(\n null,\n {\n attachment: {\n file: newRecord.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n results.push({ ...result, cuFlag: '+' })\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const updateRecord = _updateRecords[i]\n const issue = await issueRepo.findOneBy({ id: updateRecord.id })\n\n const result = await issueRepo.save({\n ...issue,\n ...updateRecord,\n updater: user\n })\n\n if (updateRecord.thumbnail) {\n await deleteAttachmentsByRef(null, { refBys: [result.id] }, context)\n await createAttachment(\n null,\n {\n attachment: {\n file: updateRecord.thumbnail,\n refType: Issue.name,\n refBy: result.id\n }\n },\n context\n )\n }\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete Issue' })\n async deleteIssue(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<boolean> {\n const { domain, tx } = context.state\n\n await tx.getRepository(Issue).delete({ domain: { id: domain.id }, id })\n await deleteAttachmentsByRef(null, { refBys: [id] }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To delete multiple Issues' })\n async deleteIssues(\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(Issue).delete({\n domain: { id: domain.id },\n id: In(ids)\n })\n\n await deleteAttachmentsByRef(null, { refBys: ids }, context)\n\n return true\n }\n\n @Directive('@transaction')\n @Mutation(returns => Boolean, { description: 'To import multiple Issues' })\n async importIssues(\n @Arg('issues', type => [IssuePatch]) issues: IssuePatch[],\n @Ctx() context: ResolverContext\n ): Promise<boolean> {\n const { domain, tx } = context.state\n\n await Promise.all(\n issues.map(async (issue: IssuePatch) => {\n const createdIssue: Issue = await tx.getRepository(Issue).save({ domain, ...issue })\n })\n )\n\n return true\n }\n}\n"]}
@@ -1,12 +0,0 @@
1
- import { Domain, ListParam } from '@things-factory/shell';
2
- import { User } from '@things-factory/auth-base';
3
- import { Issue } from './issue';
4
- import { IssueList } from './issue-type';
5
- export declare class IssueQuery {
6
- issue(id: string, context: ResolverContext): Promise<Issue>;
7
- issues(params: ListParam, context: ResolverContext): Promise<IssueList>;
8
- thumbnail(issue: Issue): Promise<string | undefined>;
9
- domain(issue: Issue): Promise<Domain>;
10
- updater(issue: Issue): Promise<User>;
11
- creator(issue: Issue): Promise<User>;
12
- }
@@ -1,97 +0,0 @@
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, context) {
13
- const { domain } = context.state;
14
- return await (0, shell_1.getRepository)(issue_1.Issue).findOne({
15
- where: { domain: { id: domain.id }, id }
16
- });
17
- }
18
- async issues(params, context) {
19
- const { domain } = context.state;
20
- const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
21
- domain,
22
- params,
23
- repository: await (0, shell_1.getRepository)(issue_1.Issue),
24
- searchables: ['name', 'description']
25
- });
26
- const [items, total] = await queryBuilder.getManyAndCount();
27
- return { items, total };
28
- }
29
- async thumbnail(issue) {
30
- const attachment = await (0, shell_1.getRepository)(attachment_base_1.Attachment).findOne({
31
- where: {
32
- domain: { id: issue.domainId },
33
- refType: issue_1.Issue.name,
34
- refBy: issue.id
35
- }
36
- });
37
- return attachment === null || attachment === void 0 ? void 0 : attachment.fullpath;
38
- }
39
- async domain(issue) {
40
- return await (0, shell_1.getRepository)(shell_1.Domain).findOneBy({ id: issue.domainId });
41
- }
42
- async updater(issue) {
43
- return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: issue.updaterId });
44
- }
45
- async creator(issue) {
46
- return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: issue.creatorId });
47
- }
48
- };
49
- exports.IssueQuery = IssueQuery;
50
- tslib_1.__decorate([
51
- (0, type_graphql_1.Query)(returns => issue_1.Issue, { nullable: true, description: 'To fetch a Issue' }),
52
- tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
53
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
54
- tslib_1.__metadata("design:type", Function),
55
- tslib_1.__metadata("design:paramtypes", [String, Object]),
56
- tslib_1.__metadata("design:returntype", Promise)
57
- ], IssueQuery.prototype, "issue", null);
58
- tslib_1.__decorate([
59
- (0, type_graphql_1.Query)(returns => issue_type_1.IssueList, { description: 'To fetch multiple Issues' }),
60
- tslib_1.__param(0, (0, type_graphql_1.Args)()),
61
- tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
62
- tslib_1.__metadata("design:type", Function),
63
- tslib_1.__metadata("design:paramtypes", [shell_1.ListParam, Object]),
64
- tslib_1.__metadata("design:returntype", Promise)
65
- ], IssueQuery.prototype, "issues", null);
66
- tslib_1.__decorate([
67
- (0, type_graphql_1.FieldResolver)(type => String),
68
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
69
- tslib_1.__metadata("design:type", Function),
70
- tslib_1.__metadata("design:paramtypes", [issue_1.Issue]),
71
- tslib_1.__metadata("design:returntype", Promise)
72
- ], IssueQuery.prototype, "thumbnail", null);
73
- tslib_1.__decorate([
74
- (0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
75
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
76
- tslib_1.__metadata("design:type", Function),
77
- tslib_1.__metadata("design:paramtypes", [issue_1.Issue]),
78
- tslib_1.__metadata("design:returntype", Promise)
79
- ], IssueQuery.prototype, "domain", null);
80
- tslib_1.__decorate([
81
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
82
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
83
- tslib_1.__metadata("design:type", Function),
84
- tslib_1.__metadata("design:paramtypes", [issue_1.Issue]),
85
- tslib_1.__metadata("design:returntype", Promise)
86
- ], IssueQuery.prototype, "updater", null);
87
- tslib_1.__decorate([
88
- (0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
89
- tslib_1.__param(0, (0, type_graphql_1.Root)()),
90
- tslib_1.__metadata("design:type", Function),
91
- tslib_1.__metadata("design:paramtypes", [issue_1.Issue]),
92
- tslib_1.__metadata("design:returntype", Promise)
93
- ], IssueQuery.prototype, "creator", null);
94
- exports.IssueQuery = IssueQuery = tslib_1.__decorate([
95
- (0, type_graphql_1.Resolver)(issue_1.Issue)
96
- ], IssueQuery);
97
- //# sourceMappingURL=issue-query.js.map
@@ -1 +0,0 @@
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,EAAS,OAAwB;QAChE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,aAAK,CAAC,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE;SACzC,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,MAAiB,E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AAC,SAAS,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAA;IACrE,CAAC;CACF,CAAA;AArDY,gCAAU;AAEf;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,aAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;IACjE,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uCAMxC;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,sBAAS,EAAE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;IAC3D,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;wCAarC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,aAAK;;2CAUnC;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;qBApDU,UAAU;IADtB,IAAA,uBAAQ,EAAC,aAAK,CAAC;GACH,UAAU,CAqDtB","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, @Ctx() context: ResolverContext): Promise<Issue> {\n const { domain } = context.state\n\n return await getRepository(Issue).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => IssueList, { description: 'To fetch multiple Issues' })\n async issues(@Args() params: ListParam, @Ctx() context: ResolverContext): Promise<IssueList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\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 domain: { id: issue.domainId },\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"]}
@@ -1,23 +0,0 @@
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
- }