@ever-gauzy/plugin-integration-plane-api 0.1.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 (743) hide show
  1. package/README.md +1 -0
  2. package/dist/config/constants.d.ts +125 -0
  3. package/dist/config/constants.js +185 -0
  4. package/dist/config/constants.js.map +1 -0
  5. package/dist/config/credentials.d.ts +30 -0
  6. package/dist/config/credentials.js +50 -0
  7. package/dist/config/credentials.js.map +1 -0
  8. package/dist/config/decorators/index.d.ts +1 -0
  9. package/dist/config/decorators/index.js +18 -0
  10. package/dist/config/decorators/index.js.map +1 -0
  11. package/dist/config/decorators/transformers/index.d.ts +1 -0
  12. package/dist/config/decorators/transformers/index.js +18 -0
  13. package/dist/config/decorators/transformers/index.js.map +1 -0
  14. package/dist/config/decorators/transformers/priority.transformer.d.ts +1 -0
  15. package/dist/config/decorators/transformers/priority.transformer.js +12 -0
  16. package/dist/config/decorators/transformers/priority.transformer.js.map +1 -0
  17. package/dist/config/index.d.ts +7 -0
  18. package/dist/config/index.js +24 -0
  19. package/dist/config/index.js.map +1 -0
  20. package/dist/config/serializers/activity/activity.serializer.d.ts +28 -0
  21. package/dist/config/serializers/activity/activity.serializer.js +288 -0
  22. package/dist/config/serializers/activity/activity.serializer.js.map +1 -0
  23. package/dist/config/serializers/activity/assignees-activities.serializer.d.ts +18 -0
  24. package/dist/config/serializers/activity/assignees-activities.serializer.js +64 -0
  25. package/dist/config/serializers/activity/assignees-activities.serializer.js.map +1 -0
  26. package/dist/config/serializers/activity/index.d.ts +7 -0
  27. package/dist/config/serializers/activity/index.js +24 -0
  28. package/dist/config/serializers/activity/index.js.map +1 -0
  29. package/dist/config/serializers/activity/labels-activities.serializer.d.ts +11 -0
  30. package/dist/config/serializers/activity/labels-activities.serializer.js +30 -0
  31. package/dist/config/serializers/activity/labels-activities.serializer.js.map +1 -0
  32. package/dist/config/serializers/activity/many-to-many-field-activity.helper.d.ts +29 -0
  33. package/dist/config/serializers/activity/many-to-many-field-activity.helper.js +45 -0
  34. package/dist/config/serializers/activity/many-to-many-field-activity.helper.js.map +1 -0
  35. package/dist/config/serializers/activity/modules-activities.serializer.d.ts +11 -0
  36. package/dist/config/serializers/activity/modules-activities.serializer.js +30 -0
  37. package/dist/config/serializers/activity/modules-activities.serializer.js.map +1 -0
  38. package/dist/config/serializers/activity/parent-activities.serializer.d.ts +14 -0
  39. package/dist/config/serializers/activity/parent-activities.serializer.js +47 -0
  40. package/dist/config/serializers/activity/parent-activities.serializer.js.map +1 -0
  41. package/dist/config/serializers/activity/status-activities.serializer.d.ts +12 -0
  42. package/dist/config/serializers/activity/status-activities.serializer.js +30 -0
  43. package/dist/config/serializers/activity/status-activities.serializer.js.map +1 -0
  44. package/dist/config/serializers/analytics/analytics.serializer.d.ts +17 -0
  45. package/dist/config/serializers/analytics/analytics.serializer.js +395 -0
  46. package/dist/config/serializers/analytics/analytics.serializer.js.map +1 -0
  47. package/dist/config/serializers/analytics/index.d.ts +1 -0
  48. package/dist/config/serializers/analytics/index.js +18 -0
  49. package/dist/config/serializers/analytics/index.js.map +1 -0
  50. package/dist/config/serializers/auth/auth.serializer.d.ts +2 -0
  51. package/dist/config/serializers/auth/auth.serializer.js +11 -0
  52. package/dist/config/serializers/auth/auth.serializer.js.map +1 -0
  53. package/dist/config/serializers/auth/index.d.ts +1 -0
  54. package/dist/config/serializers/auth/index.js +18 -0
  55. package/dist/config/serializers/auth/index.js.map +1 -0
  56. package/dist/config/serializers/comments/comment.serializer.d.ts +25 -0
  57. package/dist/config/serializers/comments/comment.serializer.js +94 -0
  58. package/dist/config/serializers/comments/comment.serializer.js.map +1 -0
  59. package/dist/config/serializers/comments/index.d.ts +1 -0
  60. package/dist/config/serializers/comments/index.js +18 -0
  61. package/dist/config/serializers/comments/index.js.map +1 -0
  62. package/dist/config/serializers/cycles/cycle.serializer.d.ts +86 -0
  63. package/dist/config/serializers/cycles/cycle.serializer.js +480 -0
  64. package/dist/config/serializers/cycles/cycle.serializer.js.map +1 -0
  65. package/dist/config/serializers/cycles/index.d.ts +1 -0
  66. package/dist/config/serializers/cycles/index.js +18 -0
  67. package/dist/config/serializers/cycles/index.js.map +1 -0
  68. package/dist/config/serializers/dashboard/dashboard.serializer.d.ts +22 -0
  69. package/dist/config/serializers/dashboard/dashboard.serializer.js +66 -0
  70. package/dist/config/serializers/dashboard/dashboard.serializer.js.map +1 -0
  71. package/dist/config/serializers/dashboard/index.d.ts +1 -0
  72. package/dist/config/serializers/dashboard/index.js +18 -0
  73. package/dist/config/serializers/dashboard/index.js.map +1 -0
  74. package/dist/config/serializers/employee-properties/employee-properties.serializer.d.ts +9 -0
  75. package/dist/config/serializers/employee-properties/employee-properties.serializer.js +57 -0
  76. package/dist/config/serializers/employee-properties/employee-properties.serializer.js.map +1 -0
  77. package/dist/config/serializers/employee-properties/index.d.ts +1 -0
  78. package/dist/config/serializers/employee-properties/index.js +18 -0
  79. package/dist/config/serializers/employee-properties/index.js.map +1 -0
  80. package/dist/config/serializers/index.d.ts +24 -0
  81. package/dist/config/serializers/index.js +41 -0
  82. package/dist/config/serializers/index.js.map +1 -0
  83. package/dist/config/serializers/invitation/index.d.ts +1 -0
  84. package/dist/config/serializers/invitation/index.js +18 -0
  85. package/dist/config/serializers/invitation/index.js.map +1 -0
  86. package/dist/config/serializers/invitation/invitation.serializer.d.ts +52 -0
  87. package/dist/config/serializers/invitation/invitation.serializer.js +140 -0
  88. package/dist/config/serializers/invitation/invitation.serializer.js.map +1 -0
  89. package/dist/config/serializers/issue-link/index.d.ts +1 -0
  90. package/dist/config/serializers/issue-link/index.js +18 -0
  91. package/dist/config/serializers/issue-link/index.js.map +1 -0
  92. package/dist/config/serializers/issue-link/issue-link.serializer.d.ts +28 -0
  93. package/dist/config/serializers/issue-link/issue-link.serializer.js +89 -0
  94. package/dist/config/serializers/issue-link/issue-link.serializer.js.map +1 -0
  95. package/dist/config/serializers/mention/index.d.ts +1 -0
  96. package/dist/config/serializers/mention/index.js +18 -0
  97. package/dist/config/serializers/mention/index.js.map +1 -0
  98. package/dist/config/serializers/mention/mention.serializer.d.ts +2 -0
  99. package/dist/config/serializers/mention/mention.serializer.js +22 -0
  100. package/dist/config/serializers/mention/mention.serializer.js.map +1 -0
  101. package/dist/config/serializers/modules/index.d.ts +1 -0
  102. package/dist/config/serializers/modules/index.js +18 -0
  103. package/dist/config/serializers/modules/index.js.map +1 -0
  104. package/dist/config/serializers/modules/module.serializer.d.ts +49 -0
  105. package/dist/config/serializers/modules/module.serializer.js +215 -0
  106. package/dist/config/serializers/modules/module.serializer.js.map +1 -0
  107. package/dist/config/serializers/notification/index.d.ts +1 -0
  108. package/dist/config/serializers/notification/index.js +18 -0
  109. package/dist/config/serializers/notification/index.js.map +1 -0
  110. package/dist/config/serializers/notification/notification.serializer.d.ts +31 -0
  111. package/dist/config/serializers/notification/notification.serializer.js +135 -0
  112. package/dist/config/serializers/notification/notification.serializer.js.map +1 -0
  113. package/dist/config/serializers/pages/index.d.ts +1 -0
  114. package/dist/config/serializers/pages/index.js +18 -0
  115. package/dist/config/serializers/pages/index.js.map +1 -0
  116. package/dist/config/serializers/pages/page.serializer.d.ts +23 -0
  117. package/dist/config/serializers/pages/page.serializer.js +106 -0
  118. package/dist/config/serializers/pages/page.serializer.js.map +1 -0
  119. package/dist/config/serializers/project-deploy-boards/index.d.ts +2 -0
  120. package/dist/config/serializers/project-deploy-boards/index.js +19 -0
  121. package/dist/config/serializers/project-deploy-boards/index.js.map +1 -0
  122. package/dist/config/serializers/project-deploy-boards/project-deploy-boards.helper.d.ts +16 -0
  123. package/dist/config/serializers/project-deploy-boards/project-deploy-boards.helper.js +169 -0
  124. package/dist/config/serializers/project-deploy-boards/project-deploy-boards.helper.js.map +1 -0
  125. package/dist/config/serializers/project-deploy-boards/project-deploy-boards.serializer.d.ts +14 -0
  126. package/dist/config/serializers/project-deploy-boards/project-deploy-boards.serializer.js +35 -0
  127. package/dist/config/serializers/project-deploy-boards/project-deploy-boards.serializer.js.map +1 -0
  128. package/dist/config/serializers/projects/index.d.ts +1 -0
  129. package/dist/config/serializers/projects/index.js +18 -0
  130. package/dist/config/serializers/projects/index.js.map +1 -0
  131. package/dist/config/serializers/projects/projects.serializer.d.ts +42 -0
  132. package/dist/config/serializers/projects/projects.serializer.js +216 -0
  133. package/dist/config/serializers/projects/projects.serializer.js.map +1 -0
  134. package/dist/config/serializers/query-params.serializers.d.ts +4 -0
  135. package/dist/config/serializers/query-params.serializers.js +10 -0
  136. package/dist/config/serializers/query-params.serializers.js.map +1 -0
  137. package/dist/config/serializers/reactions/index.d.ts +1 -0
  138. package/dist/config/serializers/reactions/index.js +18 -0
  139. package/dist/config/serializers/reactions/index.js.map +1 -0
  140. package/dist/config/serializers/reactions/reaction.serializer.d.ts +4 -0
  141. package/dist/config/serializers/reactions/reaction.serializer.js +62 -0
  142. package/dist/config/serializers/reactions/reaction.serializer.js.map +1 -0
  143. package/dist/config/serializers/recent-visits/index.d.ts +1 -0
  144. package/dist/config/serializers/recent-visits/index.js +18 -0
  145. package/dist/config/serializers/recent-visits/index.js.map +1 -0
  146. package/dist/config/serializers/recent-visits/recent-visits.serializer.d.ts +32 -0
  147. package/dist/config/serializers/recent-visits/recent-visits.serializer.js +109 -0
  148. package/dist/config/serializers/recent-visits/recent-visits.serializer.js.map +1 -0
  149. package/dist/config/serializers/subscription/index.d.ts +1 -0
  150. package/dist/config/serializers/subscription/index.js +18 -0
  151. package/dist/config/serializers/subscription/index.js.map +1 -0
  152. package/dist/config/serializers/subscription/subscription.serializer.d.ts +23 -0
  153. package/dist/config/serializers/subscription/subscription.serializer.js +68 -0
  154. package/dist/config/serializers/subscription/subscription.serializer.js.map +1 -0
  155. package/dist/config/serializers/tasks/index.d.ts +5 -0
  156. package/dist/config/serializers/tasks/index.js +22 -0
  157. package/dist/config/serializers/tasks/index.js.map +1 -0
  158. package/dist/config/serializers/tasks/intake-issue/index.d.ts +1 -0
  159. package/dist/config/serializers/tasks/intake-issue/index.js +18 -0
  160. package/dist/config/serializers/tasks/intake-issue/index.js.map +1 -0
  161. package/dist/config/serializers/tasks/intake-issue/intake-issue.serializer.d.ts +35 -0
  162. package/dist/config/serializers/tasks/intake-issue/intake-issue.serializer.js +123 -0
  163. package/dist/config/serializers/tasks/intake-issue/intake-issue.serializer.js.map +1 -0
  164. package/dist/config/serializers/tasks/issue-labels/index.d.ts +1 -0
  165. package/dist/config/serializers/tasks/issue-labels/index.js +18 -0
  166. package/dist/config/serializers/tasks/issue-labels/index.js.map +1 -0
  167. package/dist/config/serializers/tasks/issue-labels/issue-labels.serializer.d.ts +6 -0
  168. package/dist/config/serializers/tasks/issue-labels/issue-labels.serializer.js +31 -0
  169. package/dist/config/serializers/tasks/issue-labels/issue-labels.serializer.js.map +1 -0
  170. package/dist/config/serializers/tasks/issue-relations/index.d.ts +1 -0
  171. package/dist/config/serializers/tasks/issue-relations/index.js +18 -0
  172. package/dist/config/serializers/tasks/issue-relations/index.js.map +1 -0
  173. package/dist/config/serializers/tasks/issue-relations/issue-relations.serializer.d.ts +8 -0
  174. package/dist/config/serializers/tasks/issue-relations/issue-relations.serializer.js +94 -0
  175. package/dist/config/serializers/tasks/issue-relations/issue-relations.serializer.js.map +1 -0
  176. package/dist/config/serializers/tasks/statuses/index.d.ts +1 -0
  177. package/dist/config/serializers/tasks/statuses/index.js +18 -0
  178. package/dist/config/serializers/tasks/statuses/index.js.map +1 -0
  179. package/dist/config/serializers/tasks/statuses/statuses.serializer.d.ts +12 -0
  180. package/dist/config/serializers/tasks/statuses/statuses.serializer.js +100 -0
  181. package/dist/config/serializers/tasks/statuses/statuses.serializer.js.map +1 -0
  182. package/dist/config/serializers/tasks/tasks.serializer.d.ts +285 -0
  183. package/dist/config/serializers/tasks/tasks.serializer.js +1074 -0
  184. package/dist/config/serializers/tasks/tasks.serializer.js.map +1 -0
  185. package/dist/config/serializers/user/actor-details.helper.d.ts +10 -0
  186. package/dist/config/serializers/user/actor-details.helper.js +16 -0
  187. package/dist/config/serializers/user/actor-details.helper.js.map +1 -0
  188. package/dist/config/serializers/user/index.d.ts +2 -0
  189. package/dist/config/serializers/user/index.js +19 -0
  190. package/dist/config/serializers/user/index.js.map +1 -0
  191. package/dist/config/serializers/user/user.serializer.d.ts +140 -0
  192. package/dist/config/serializers/user/user.serializer.js +192 -0
  193. package/dist/config/serializers/user/user.serializer.js.map +1 -0
  194. package/dist/config/serializers/user-favorites/index.d.ts +1 -0
  195. package/dist/config/serializers/user-favorites/index.js +18 -0
  196. package/dist/config/serializers/user-favorites/index.js.map +1 -0
  197. package/dist/config/serializers/user-favorites/user-favorite.serializer.d.ts +6 -0
  198. package/dist/config/serializers/user-favorites/user-favorite.serializer.js +61 -0
  199. package/dist/config/serializers/user-favorites/user-favorite.serializer.js.map +1 -0
  200. package/dist/config/serializers/views/date-range.helper.d.ts +1 -0
  201. package/dist/config/serializers/views/date-range.helper.js +85 -0
  202. package/dist/config/serializers/views/date-range.helper.js.map +1 -0
  203. package/dist/config/serializers/views/index.d.ts +3 -0
  204. package/dist/config/serializers/views/index.js +20 -0
  205. package/dist/config/serializers/views/index.js.map +1 -0
  206. package/dist/config/serializers/views/view-id-from-referer.helper.d.ts +14 -0
  207. package/dist/config/serializers/views/view-id-from-referer.helper.js +27 -0
  208. package/dist/config/serializers/views/view-id-from-referer.helper.js.map +1 -0
  209. package/dist/config/serializers/views/view.serializer.d.ts +47 -0
  210. package/dist/config/serializers/views/view.serializer.js +187 -0
  211. package/dist/config/serializers/views/view.serializer.js.map +1 -0
  212. package/dist/config/serializers/workspace-organization/index.d.ts +2 -0
  213. package/dist/config/serializers/workspace-organization/index.js +19 -0
  214. package/dist/config/serializers/workspace-organization/index.js.map +1 -0
  215. package/dist/config/serializers/workspace-organization/organization.serializer.d.ts +92 -0
  216. package/dist/config/serializers/workspace-organization/organization.serializer.js +270 -0
  217. package/dist/config/serializers/workspace-organization/organization.serializer.js.map +1 -0
  218. package/dist/config/serializers/workspace-organization/widgets-filter.helper.d.ts +4 -0
  219. package/dist/config/serializers/workspace-organization/widgets-filter.helper.js +14 -0
  220. package/dist/config/serializers/workspace-organization/widgets-filter.helper.js.map +1 -0
  221. package/dist/config/time-zones.d.ts +8 -0
  222. package/dist/config/time-zones.js +722 -0
  223. package/dist/config/time-zones.js.map +1 -0
  224. package/dist/config/utils/index.d.ts +1 -0
  225. package/dist/config/utils/index.js +18 -0
  226. package/dist/config/utils/index.js.map +1 -0
  227. package/dist/config/utils/shared.utils.d.ts +95 -0
  228. package/dist/config/utils/shared.utils.js +256 -0
  229. package/dist/config/utils/shared.utils.js.map +1 -0
  230. package/dist/config/validators/custom-length.decorator.d.ts +28 -0
  231. package/dist/config/validators/custom-length.decorator.js +65 -0
  232. package/dist/config/validators/custom-length.decorator.js.map +1 -0
  233. package/dist/config/validators/index.d.ts +1 -0
  234. package/dist/config/validators/index.js +18 -0
  235. package/dist/config/validators/index.js.map +1 -0
  236. package/dist/dev.d.ts +1 -0
  237. package/dist/dev.js +10 -0
  238. package/dist/dev.js.map +1 -0
  239. package/dist/index.d.ts +5 -0
  240. package/dist/index.js +14 -0
  241. package/dist/index.js.map +1 -0
  242. package/dist/main.d.ts +1 -0
  243. package/dist/main.js +50 -0
  244. package/dist/main.js.map +1 -0
  245. package/dist/modules/activity/activity.module.d.ts +2 -0
  246. package/dist/modules/activity/activity.module.js +22 -0
  247. package/dist/modules/activity/activity.module.js.map +1 -0
  248. package/dist/modules/activity/activity.service.d.ts +12 -0
  249. package/dist/modules/activity/activity.service.js +45 -0
  250. package/dist/modules/activity/activity.service.js.map +1 -0
  251. package/dist/modules/advance-analytics/advance-analytics.controller.d.ts +30 -0
  252. package/dist/modules/advance-analytics/advance-analytics.controller.js +128 -0
  253. package/dist/modules/advance-analytics/advance-analytics.controller.js.map +1 -0
  254. package/dist/modules/advance-analytics/advance-analytics.module.d.ts +15 -0
  255. package/dist/modules/advance-analytics/advance-analytics.module.js +56 -0
  256. package/dist/modules/advance-analytics/advance-analytics.module.js.map +1 -0
  257. package/dist/modules/advance-analytics/advance-analytics.service.d.ts +29 -0
  258. package/dist/modules/advance-analytics/advance-analytics.service.js +143 -0
  259. package/dist/modules/advance-analytics/advance-analytics.service.js.map +1 -0
  260. package/dist/modules/advance-analytics/dto/advance-analytics-query.dto.d.ts +26 -0
  261. package/dist/modules/advance-analytics/dto/advance-analytics-query.dto.js +93 -0
  262. package/dist/modules/advance-analytics/dto/advance-analytics-query.dto.js.map +1 -0
  263. package/dist/modules/advance-analytics/dto/index.d.ts +1 -0
  264. package/dist/modules/advance-analytics/dto/index.js +18 -0
  265. package/dist/modules/advance-analytics/dto/index.js.map +1 -0
  266. package/dist/modules/advance-analytics/index.d.ts +4 -0
  267. package/dist/modules/advance-analytics/index.js +21 -0
  268. package/dist/modules/advance-analytics/index.js.map +1 -0
  269. package/dist/modules/api-fetch/api-fetch.module.d.ts +2 -0
  270. package/dist/modules/api-fetch/api-fetch.module.js +24 -0
  271. package/dist/modules/api-fetch/api-fetch.module.js.map +1 -0
  272. package/dist/modules/api-fetch/api-fetch.service.d.ts +31 -0
  273. package/dist/modules/api-fetch/api-fetch.service.js +96 -0
  274. package/dist/modules/api-fetch/api-fetch.service.js.map +1 -0
  275. package/dist/modules/api-fetch/token.helper.d.ts +22 -0
  276. package/dist/modules/api-fetch/token.helper.js +58 -0
  277. package/dist/modules/api-fetch/token.helper.js.map +1 -0
  278. package/dist/modules/api-fetch/token.middleware.d.ts +8 -0
  279. package/dist/modules/api-fetch/token.middleware.js +38 -0
  280. package/dist/modules/api-fetch/token.middleware.js.map +1 -0
  281. package/dist/modules/app.module.d.ts +7 -0
  282. package/dist/modules/app.module.js +49 -0
  283. package/dist/modules/app.module.js.map +1 -0
  284. package/dist/modules/auth/auth.controller.d.ts +32 -0
  285. package/dist/modules/auth/auth.controller.js +278 -0
  286. package/dist/modules/auth/auth.controller.js.map +1 -0
  287. package/dist/modules/auth/auth.guard.d.ts +9 -0
  288. package/dist/modules/auth/auth.guard.js +52 -0
  289. package/dist/modules/auth/auth.guard.js.map +1 -0
  290. package/dist/modules/auth/auth.module.d.ts +2 -0
  291. package/dist/modules/auth/auth.module.js +30 -0
  292. package/dist/modules/auth/auth.module.js.map +1 -0
  293. package/dist/modules/auth/auth.service.d.ts +133 -0
  294. package/dist/modules/auth/auth.service.js +362 -0
  295. package/dist/modules/auth/auth.service.js.map +1 -0
  296. package/dist/modules/auth/dto/index.d.ts +1 -0
  297. package/dist/modules/auth/dto/index.js +18 -0
  298. package/dist/modules/auth/dto/index.js.map +1 -0
  299. package/dist/modules/auth/dto/two-factor-dto.d.ts +15 -0
  300. package/dist/modules/auth/dto/two-factor-dto.js +18 -0
  301. package/dist/modules/auth/dto/two-factor-dto.js.map +1 -0
  302. package/dist/modules/comments/comments.controller.d.ts +24 -0
  303. package/dist/modules/comments/comments.controller.js +72 -0
  304. package/dist/modules/comments/comments.controller.js.map +1 -0
  305. package/dist/modules/comments/comments.module.d.ts +2 -0
  306. package/dist/modules/comments/comments.module.js +26 -0
  307. package/dist/modules/comments/comments.module.js.map +1 -0
  308. package/dist/modules/comments/comments.service.d.ts +92 -0
  309. package/dist/modules/comments/comments.service.js +235 -0
  310. package/dist/modules/comments/comments.service.js.map +1 -0
  311. package/dist/modules/cycles/cycles.controller.d.ts +106 -0
  312. package/dist/modules/cycles/cycles.controller.js +270 -0
  313. package/dist/modules/cycles/cycles.controller.js.map +1 -0
  314. package/dist/modules/cycles/cycles.module.d.ts +2 -0
  315. package/dist/modules/cycles/cycles.module.js +31 -0
  316. package/dist/modules/cycles/cycles.module.js.map +1 -0
  317. package/dist/modules/cycles/cycles.service.d.ts +169 -0
  318. package/dist/modules/cycles/cycles.service.js +477 -0
  319. package/dist/modules/cycles/cycles.service.js.map +1 -0
  320. package/dist/modules/cycles/dto/create-cycle.dto.d.ts +6 -0
  321. package/dist/modules/cycles/dto/create-cycle.dto.js +9 -0
  322. package/dist/modules/cycles/dto/create-cycle.dto.js.map +1 -0
  323. package/dist/modules/cycles/dto/cycle.dto.d.ts +18 -0
  324. package/dist/modules/cycles/dto/cycle.dto.js +112 -0
  325. package/dist/modules/cycles/dto/cycle.dto.js.map +1 -0
  326. package/dist/modules/cycles/dto/index.d.ts +3 -0
  327. package/dist/modules/cycles/dto/index.js +20 -0
  328. package/dist/modules/cycles/dto/index.js.map +1 -0
  329. package/dist/modules/cycles/dto/update-cycle.dto.d.ts +6 -0
  330. package/dist/modules/cycles/dto/update-cycle.dto.js +9 -0
  331. package/dist/modules/cycles/dto/update-cycle.dto.js.map +1 -0
  332. package/dist/modules/dashboard/dashboard.controller.d.ts +16 -0
  333. package/dist/modules/dashboard/dashboard.controller.js +59 -0
  334. package/dist/modules/dashboard/dashboard.controller.js.map +1 -0
  335. package/dist/modules/dashboard/dashboard.module.d.ts +2 -0
  336. package/dist/modules/dashboard/dashboard.module.js +30 -0
  337. package/dist/modules/dashboard/dashboard.module.js.map +1 -0
  338. package/dist/modules/dashboard/dashboard.service.d.ts +33 -0
  339. package/dist/modules/dashboard/dashboard.service.js +97 -0
  340. package/dist/modules/dashboard/dashboard.service.js.map +1 -0
  341. package/dist/modules/dashboard/widget.service.d.ts +22 -0
  342. package/dist/modules/dashboard/widget.service.js +68 -0
  343. package/dist/modules/dashboard/widget.service.js.map +1 -0
  344. package/dist/modules/employee-properties/employee-properties.module.d.ts +2 -0
  345. package/dist/modules/employee-properties/employee-properties.module.js +21 -0
  346. package/dist/modules/employee-properties/employee-properties.module.js.map +1 -0
  347. package/dist/modules/employee-properties/employee-properties.service.d.ts +30 -0
  348. package/dist/modules/employee-properties/employee-properties.service.js +95 -0
  349. package/dist/modules/employee-properties/employee-properties.service.js.map +1 -0
  350. package/dist/modules/file-assets/file-assets.controller.d.ts +120 -0
  351. package/dist/modules/file-assets/file-assets.controller.js +192 -0
  352. package/dist/modules/file-assets/file-assets.controller.js.map +1 -0
  353. package/dist/modules/file-assets/file-assets.module.d.ts +2 -0
  354. package/dist/modules/file-assets/file-assets.module.js +23 -0
  355. package/dist/modules/file-assets/file-assets.module.js.map +1 -0
  356. package/dist/modules/file-assets/file-assets.service.d.ts +47 -0
  357. package/dist/modules/file-assets/file-assets.service.js +141 -0
  358. package/dist/modules/file-assets/file-assets.service.js.map +1 -0
  359. package/dist/modules/http.module.d.ts +2 -0
  360. package/dist/modules/http.module.js +22 -0
  361. package/dist/modules/http.module.js.map +1 -0
  362. package/dist/modules/instances/instances.controller.d.ts +73 -0
  363. package/dist/modules/instances/instances.controller.js +39 -0
  364. package/dist/modules/instances/instances.controller.js.map +1 -0
  365. package/dist/modules/instances/instances.module.d.ts +2 -0
  366. package/dist/modules/instances/instances.module.js +28 -0
  367. package/dist/modules/instances/instances.module.js.map +1 -0
  368. package/dist/modules/instances/instances.service.d.ts +68 -0
  369. package/dist/modules/instances/instances.service.js +88 -0
  370. package/dist/modules/instances/instances.service.js.map +1 -0
  371. package/dist/modules/invitation/dto/create-invitation.d.ts +8 -0
  372. package/dist/modules/invitation/dto/create-invitation.js +41 -0
  373. package/dist/modules/invitation/dto/create-invitation.js.map +1 -0
  374. package/dist/modules/invitation/dto/index.d.ts +1 -0
  375. package/dist/modules/invitation/dto/index.js +18 -0
  376. package/dist/modules/invitation/dto/index.js.map +1 -0
  377. package/dist/modules/invitation/invitation.controller.d.ts +53 -0
  378. package/dist/modules/invitation/invitation.controller.js +168 -0
  379. package/dist/modules/invitation/invitation.controller.js.map +1 -0
  380. package/dist/modules/invitation/invitation.module.d.ts +2 -0
  381. package/dist/modules/invitation/invitation.module.js +29 -0
  382. package/dist/modules/invitation/invitation.module.js.map +1 -0
  383. package/dist/modules/invitation/invitation.service.d.ts +67 -0
  384. package/dist/modules/invitation/invitation.service.js +193 -0
  385. package/dist/modules/invitation/invitation.service.js.map +1 -0
  386. package/dist/modules/issue-links/issue-links.module.d.ts +2 -0
  387. package/dist/modules/issue-links/issue-links.module.js +21 -0
  388. package/dist/modules/issue-links/issue-links.module.js.map +1 -0
  389. package/dist/modules/issue-links/issue-links.service.d.ts +47 -0
  390. package/dist/modules/issue-links/issue-links.service.js +143 -0
  391. package/dist/modules/issue-links/issue-links.service.js.map +1 -0
  392. package/dist/modules/issue-relations/dto/create-issue-relation.dto.d.ts +5 -0
  393. package/dist/modules/issue-relations/dto/create-issue-relation.dto.js +31 -0
  394. package/dist/modules/issue-relations/dto/create-issue-relation.dto.js.map +1 -0
  395. package/dist/modules/issue-relations/dto/delete-issue-relation.dto.d.ts +7 -0
  396. package/dist/modules/issue-relations/dto/delete-issue-relation.dto.js +25 -0
  397. package/dist/modules/issue-relations/dto/delete-issue-relation.dto.js.map +1 -0
  398. package/dist/modules/issue-relations/dto/index.d.ts +2 -0
  399. package/dist/modules/issue-relations/dto/index.js +19 -0
  400. package/dist/modules/issue-relations/dto/index.js.map +1 -0
  401. package/dist/modules/issue-relations/issue-relations.module.d.ts +2 -0
  402. package/dist/modules/issue-relations/issue-relations.module.js +23 -0
  403. package/dist/modules/issue-relations/issue-relations.module.js.map +1 -0
  404. package/dist/modules/issue-relations/issue-relations.service.d.ts +49 -0
  405. package/dist/modules/issue-relations/issue-relations.service.js +242 -0
  406. package/dist/modules/issue-relations/issue-relations.service.js.map +1 -0
  407. package/dist/modules/issues/draft-issues/draft-issues.module.d.ts +2 -0
  408. package/dist/modules/issues/draft-issues/draft-issues.module.js +23 -0
  409. package/dist/modules/issues/draft-issues/draft-issues.module.js.map +1 -0
  410. package/dist/modules/issues/draft-issues/draft-issues.service.d.ts +34 -0
  411. package/dist/modules/issues/draft-issues/draft-issues.service.js +94 -0
  412. package/dist/modules/issues/draft-issues/draft-issues.service.js.map +1 -0
  413. package/dist/modules/issues/dto/create-issue-comment.dto.d.ts +4 -0
  414. package/dist/modules/issues/dto/create-issue-comment.dto.js +24 -0
  415. package/dist/modules/issues/dto/create-issue-comment.dto.js.map +1 -0
  416. package/dist/modules/issues/dto/create-issue-link.dto.d.ts +5 -0
  417. package/dist/modules/issues/dto/create-issue-link.dto.js +30 -0
  418. package/dist/modules/issues/dto/create-issue-link.dto.js.map +1 -0
  419. package/dist/modules/issues/dto/create-issue-reaction.dto.d.ts +4 -0
  420. package/dist/modules/issues/dto/create-issue-reaction.dto.js +24 -0
  421. package/dist/modules/issues/dto/create-issue-reaction.dto.js.map +1 -0
  422. package/dist/modules/issues/dto/create-issue.dto.d.ts +21 -0
  423. package/dist/modules/issues/dto/create-issue.dto.js +139 -0
  424. package/dist/modules/issues/dto/create-issue.dto.js.map +1 -0
  425. package/dist/modules/issues/dto/index.d.ts +5 -0
  426. package/dist/modules/issues/dto/index.js +22 -0
  427. package/dist/modules/issues/dto/index.js.map +1 -0
  428. package/dist/modules/issues/dto/update-issue.dto.d.ts +5 -0
  429. package/dist/modules/issues/dto/update-issue.dto.js +25 -0
  430. package/dist/modules/issues/dto/update-issue.dto.js.map +1 -0
  431. package/dist/modules/issues/intake-issues/intake-issues.controller.d.ts +31 -0
  432. package/dist/modules/issues/intake-issues/intake-issues.controller.js +102 -0
  433. package/dist/modules/issues/intake-issues/intake-issues.controller.js.map +1 -0
  434. package/dist/modules/issues/intake-issues/intake-issues.module.d.ts +2 -0
  435. package/dist/modules/issues/intake-issues/intake-issues.module.js +26 -0
  436. package/dist/modules/issues/intake-issues/intake-issues.module.js.map +1 -0
  437. package/dist/modules/issues/intake-issues/intake-issues.service.d.ts +54 -0
  438. package/dist/modules/issues/intake-issues/intake-issues.service.js +182 -0
  439. package/dist/modules/issues/intake-issues/intake-issues.service.js.map +1 -0
  440. package/dist/modules/issues/issue-labels/dto/create-issue-label.dto.d.ts +5 -0
  441. package/dist/modules/issues/issue-labels/dto/create-issue-label.dto.js +30 -0
  442. package/dist/modules/issues/issue-labels/dto/create-issue-label.dto.js.map +1 -0
  443. package/dist/modules/issues/issue-labels/dto/index.d.ts +2 -0
  444. package/dist/modules/issues/issue-labels/dto/index.js +19 -0
  445. package/dist/modules/issues/issue-labels/dto/index.js.map +1 -0
  446. package/dist/modules/issues/issue-labels/dto/update-issue-label.dto.d.ts +6 -0
  447. package/dist/modules/issues/issue-labels/dto/update-issue-label.dto.js +9 -0
  448. package/dist/modules/issues/issue-labels/dto/update-issue-label.dto.js.map +1 -0
  449. package/dist/modules/issues/issue-labels/issue-labels.controller.d.ts +38 -0
  450. package/dist/modules/issues/issue-labels/issue-labels.controller.js +108 -0
  451. package/dist/modules/issues/issue-labels/issue-labels.controller.js.map +1 -0
  452. package/dist/modules/issues/issue-labels/issue-labels.module.d.ts +2 -0
  453. package/dist/modules/issues/issue-labels/issue-labels.module.js +23 -0
  454. package/dist/modules/issues/issue-labels/issue-labels.module.js.map +1 -0
  455. package/dist/modules/issues/issue-labels/issue-labels.service.d.ts +36 -0
  456. package/dist/modules/issues/issue-labels/issue-labels.service.js +107 -0
  457. package/dist/modules/issues/issue-labels/issue-labels.service.js.map +1 -0
  458. package/dist/modules/issues/issues.controller.d.ts +200 -0
  459. package/dist/modules/issues/issues.controller.js +547 -0
  460. package/dist/modules/issues/issues.controller.js.map +1 -0
  461. package/dist/modules/issues/issues.module.d.ts +2 -0
  462. package/dist/modules/issues/issues.module.js +45 -0
  463. package/dist/modules/issues/issues.module.js.map +1 -0
  464. package/dist/modules/issues/issues.service.d.ts +327 -0
  465. package/dist/modules/issues/issues.service.js +1052 -0
  466. package/dist/modules/issues/issues.service.js.map +1 -0
  467. package/dist/modules/issues/search-issues/search-issues.controller.d.ts +14 -0
  468. package/dist/modules/issues/search-issues/search-issues.controller.js +49 -0
  469. package/dist/modules/issues/search-issues/search-issues.controller.js.map +1 -0
  470. package/dist/modules/issues/search-issues/search-issues.module.d.ts +2 -0
  471. package/dist/modules/issues/search-issues/search-issues.module.js +23 -0
  472. package/dist/modules/issues/search-issues/search-issues.module.js.map +1 -0
  473. package/dist/modules/issues/search-issues/search-issues.service.d.ts +13 -0
  474. package/dist/modules/issues/search-issues/search-issues.service.js +97 -0
  475. package/dist/modules/issues/search-issues/search-issues.service.js.map +1 -0
  476. package/dist/modules/logger/index.d.ts +2 -0
  477. package/dist/modules/logger/index.js +19 -0
  478. package/dist/modules/logger/index.js.map +1 -0
  479. package/dist/modules/logger/logger.module.d.ts +6 -0
  480. package/dist/modules/logger/logger.module.js +26 -0
  481. package/dist/modules/logger/logger.module.js.map +1 -0
  482. package/dist/modules/logger/logger.service.d.ts +59 -0
  483. package/dist/modules/logger/logger.service.js +99 -0
  484. package/dist/modules/logger/logger.service.js.map +1 -0
  485. package/dist/modules/mention/mention.module.d.ts +2 -0
  486. package/dist/modules/mention/mention.module.js +21 -0
  487. package/dist/modules/mention/mention.module.js.map +1 -0
  488. package/dist/modules/mention/mention.service.d.ts +6 -0
  489. package/dist/modules/mention/mention.service.js +38 -0
  490. package/dist/modules/mention/mention.service.js.map +1 -0
  491. package/dist/modules/notification/notification.module.d.ts +2 -0
  492. package/dist/modules/notification/notification.module.js +21 -0
  493. package/dist/modules/notification/notification.module.js.map +1 -0
  494. package/dist/modules/notification/notification.service.d.ts +37 -0
  495. package/dist/modules/notification/notification.service.js +113 -0
  496. package/dist/modules/notification/notification.service.js.map +1 -0
  497. package/dist/modules/pages/dto/create-page.dto.d.ts +14 -0
  498. package/dist/modules/pages/dto/create-page.dto.js +68 -0
  499. package/dist/modules/pages/dto/create-page.dto.js.map +1 -0
  500. package/dist/modules/pages/dto/index.d.ts +2 -0
  501. package/dist/modules/pages/dto/index.js +19 -0
  502. package/dist/modules/pages/dto/index.js.map +1 -0
  503. package/dist/modules/pages/dto/update-page.dto.d.ts +15 -0
  504. package/dist/modules/pages/dto/update-page.dto.js +71 -0
  505. package/dist/modules/pages/dto/update-page.dto.js.map +1 -0
  506. package/dist/modules/pages/pages.controller.d.ts +109 -0
  507. package/dist/modules/pages/pages.controller.js +387 -0
  508. package/dist/modules/pages/pages.controller.js.map +1 -0
  509. package/dist/modules/pages/pages.module.d.ts +2 -0
  510. package/dist/modules/pages/pages.module.js +23 -0
  511. package/dist/modules/pages/pages.module.js.map +1 -0
  512. package/dist/modules/pages/pages.service.d.ts +112 -0
  513. package/dist/modules/pages/pages.service.js +481 -0
  514. package/dist/modules/pages/pages.service.js.map +1 -0
  515. package/dist/modules/project/dto/create-project.dto.d.ts +15 -0
  516. package/dist/modules/project/dto/create-project.dto.js +93 -0
  517. package/dist/modules/project/dto/create-project.dto.js.map +1 -0
  518. package/dist/modules/project/dto/index.d.ts +2 -0
  519. package/dist/modules/project/dto/index.js +19 -0
  520. package/dist/modules/project/dto/index.js.map +1 -0
  521. package/dist/modules/project/dto/project-member.dto.d.ts +8 -0
  522. package/dist/modules/project/dto/project-member.dto.js +48 -0
  523. package/dist/modules/project/dto/project-member.dto.js.map +1 -0
  524. package/dist/modules/project/dto/update-project.dto.d.ts +6 -0
  525. package/dist/modules/project/dto/update-project.dto.js +9 -0
  526. package/dist/modules/project/dto/update-project.dto.js.map +1 -0
  527. package/dist/modules/project/project-deploy-boards/project-deploy-boards.service.d.ts +33 -0
  528. package/dist/modules/project/project-deploy-boards/project-deploy-boards.service.js +127 -0
  529. package/dist/modules/project/project-deploy-boards/project-deploy-boards.service.js.map +1 -0
  530. package/dist/modules/project/project-identifiers/project-identifiers.controller.d.ts +12 -0
  531. package/dist/modules/project/project-identifiers/project-identifiers.controller.js +48 -0
  532. package/dist/modules/project/project-identifiers/project-identifiers.controller.js.map +1 -0
  533. package/dist/modules/project/project-identifiers/project-identifiers.module.d.ts +2 -0
  534. package/dist/modules/project/project-identifiers/project-identifiers.module.js +29 -0
  535. package/dist/modules/project/project-identifiers/project-identifiers.module.js.map +1 -0
  536. package/dist/modules/project/project-identifiers/project-identifiers.service.d.ts +14 -0
  537. package/dist/modules/project/project-identifiers/project-identifiers.service.js +60 -0
  538. package/dist/modules/project/project-identifiers/project-identifiers.service.js.map +1 -0
  539. package/dist/modules/project/project.controller.d.ts +94 -0
  540. package/dist/modules/project/project.controller.js +338 -0
  541. package/dist/modules/project/project.controller.js.map +1 -0
  542. package/dist/modules/project/project.module.d.ts +2 -0
  543. package/dist/modules/project/project.module.js +87 -0
  544. package/dist/modules/project/project.module.js.map +1 -0
  545. package/dist/modules/project/project.service.d.ts +132 -0
  546. package/dist/modules/project/project.service.js +491 -0
  547. package/dist/modules/project/project.service.js.map +1 -0
  548. package/dist/modules/project-module/dto/create-module.dto.d.ts +12 -0
  549. package/dist/modules/project-module/dto/create-module.dto.js +76 -0
  550. package/dist/modules/project-module/dto/create-module.dto.js.map +1 -0
  551. package/dist/modules/project-module/dto/index.d.ts +2 -0
  552. package/dist/modules/project-module/dto/index.js +19 -0
  553. package/dist/modules/project-module/dto/index.js.map +1 -0
  554. package/dist/modules/project-module/dto/update-module.dto.d.ts +6 -0
  555. package/dist/modules/project-module/dto/update-module.dto.js +9 -0
  556. package/dist/modules/project-module/dto/update-module.dto.js.map +1 -0
  557. package/dist/modules/project-module/project-module.controller.d.ts +52 -0
  558. package/dist/modules/project-module/project-module.controller.js +167 -0
  559. package/dist/modules/project-module/project-module.controller.js.map +1 -0
  560. package/dist/modules/project-module/project-module.module.d.ts +2 -0
  561. package/dist/modules/project-module/project-module.module.js +26 -0
  562. package/dist/modules/project-module/project-module.module.js.map +1 -0
  563. package/dist/modules/project-module/project-module.service.d.ts +66 -0
  564. package/dist/modules/project-module/project-module.service.js +275 -0
  565. package/dist/modules/project-module/project-module.service.js.map +1 -0
  566. package/dist/modules/reactions/reactions.module.d.ts +2 -0
  567. package/dist/modules/reactions/reactions.module.js +21 -0
  568. package/dist/modules/reactions/reactions.module.js.map +1 -0
  569. package/dist/modules/reactions/reactions.service.d.ts +48 -0
  570. package/dist/modules/reactions/reactions.service.js +121 -0
  571. package/dist/modules/reactions/reactions.service.js.map +1 -0
  572. package/dist/modules/recent-visits/recent-visits.controller.d.ts +12 -0
  573. package/dist/modules/recent-visits/recent-visits.controller.js +50 -0
  574. package/dist/modules/recent-visits/recent-visits.controller.js.map +1 -0
  575. package/dist/modules/recent-visits/recent-visits.module.d.ts +2 -0
  576. package/dist/modules/recent-visits/recent-visits.module.js +23 -0
  577. package/dist/modules/recent-visits/recent-visits.module.js.map +1 -0
  578. package/dist/modules/recent-visits/recent-visits.service.d.ts +12 -0
  579. package/dist/modules/recent-visits/recent-visits.service.js +53 -0
  580. package/dist/modules/recent-visits/recent-visits.service.js.map +1 -0
  581. package/dist/modules/sidebar-preferences/sidebar-preferences.controller.d.ts +47 -0
  582. package/dist/modules/sidebar-preferences/sidebar-preferences.controller.js +38 -0
  583. package/dist/modules/sidebar-preferences/sidebar-preferences.controller.js.map +1 -0
  584. package/dist/modules/sidebar-preferences/sidebar-preferences.module.d.ts +2 -0
  585. package/dist/modules/sidebar-preferences/sidebar-preferences.module.js +23 -0
  586. package/dist/modules/sidebar-preferences/sidebar-preferences.module.js.map +1 -0
  587. package/dist/modules/sidebar-preferences/sidebar-preferences.service.d.ts +49 -0
  588. package/dist/modules/sidebar-preferences/sidebar-preferences.service.js +27 -0
  589. package/dist/modules/sidebar-preferences/sidebar-preferences.service.js.map +1 -0
  590. package/dist/modules/states/dto/create-state.dto.d.ts +7 -0
  591. package/dist/modules/states/dto/create-state.dto.js +42 -0
  592. package/dist/modules/states/dto/create-state.dto.js.map +1 -0
  593. package/dist/modules/states/dto/index.d.ts +1 -0
  594. package/dist/modules/states/dto/index.js +18 -0
  595. package/dist/modules/states/dto/index.js.map +1 -0
  596. package/dist/modules/states/states.controller.d.ts +27 -0
  597. package/dist/modules/states/states.controller.js +85 -0
  598. package/dist/modules/states/states.controller.js.map +1 -0
  599. package/dist/modules/states/states.module.d.ts +2 -0
  600. package/dist/modules/states/states.module.js +23 -0
  601. package/dist/modules/states/states.module.js.map +1 -0
  602. package/dist/modules/states/states.service.d.ts +33 -0
  603. package/dist/modules/states/states.service.js +99 -0
  604. package/dist/modules/states/states.service.js.map +1 -0
  605. package/dist/modules/subscription/subscription.module.d.ts +2 -0
  606. package/dist/modules/subscription/subscription.module.js +21 -0
  607. package/dist/modules/subscription/subscription.module.js.map +1 -0
  608. package/dist/modules/subscription/subscription.service.d.ts +32 -0
  609. package/dist/modules/subscription/subscription.service.js +98 -0
  610. package/dist/modules/subscription/subscription.service.js.map +1 -0
  611. package/dist/modules/timezones/timezones.controller.d.ts +10 -0
  612. package/dist/modules/timezones/timezones.controller.js +34 -0
  613. package/dist/modules/timezones/timezones.controller.js.map +1 -0
  614. package/dist/modules/timezones/timezones.module.d.ts +2 -0
  615. package/dist/modules/timezones/timezones.module.js +26 -0
  616. package/dist/modules/timezones/timezones.module.js.map +1 -0
  617. package/dist/modules/user/dto/check-exist-user.dto.d.ts +10 -0
  618. package/dist/modules/user/dto/check-exist-user.dto.js +13 -0
  619. package/dist/modules/user/dto/check-exist-user.dto.js.map +1 -0
  620. package/dist/modules/user/dto/include-teams.dto.d.ts +3 -0
  621. package/dist/modules/user/dto/include-teams.dto.js +24 -0
  622. package/dist/modules/user/dto/include-teams.dto.js.map +1 -0
  623. package/dist/modules/user/dto/index.d.ts +6 -0
  624. package/dist/modules/user/dto/index.js +23 -0
  625. package/dist/modules/user/dto/index.js.map +1 -0
  626. package/dist/modules/user/dto/user-code.dto.d.ts +7 -0
  627. package/dist/modules/user/dto/user-code.dto.js +28 -0
  628. package/dist/modules/user/dto/user-code.dto.js.map +1 -0
  629. package/dist/modules/user/dto/user-email.dto.d.ts +7 -0
  630. package/dist/modules/user/dto/user-email.dto.js +27 -0
  631. package/dist/modules/user/dto/user-email.dto.js.map +1 -0
  632. package/dist/modules/user/dto/user-password.dto.d.ts +7 -0
  633. package/dist/modules/user/dto/user-password.dto.js +27 -0
  634. package/dist/modules/user/dto/user-password.dto.js.map +1 -0
  635. package/dist/modules/user/dto/user-token.dto.d.ts +7 -0
  636. package/dist/modules/user/dto/user-token.dto.js +27 -0
  637. package/dist/modules/user/dto/user-token.dto.js.map +1 -0
  638. package/dist/modules/user/user.controller.d.ts +79 -0
  639. package/dist/modules/user/user.controller.js +109 -0
  640. package/dist/modules/user/user.controller.js.map +1 -0
  641. package/dist/modules/user/user.module.d.ts +2 -0
  642. package/dist/modules/user/user.module.js +29 -0
  643. package/dist/modules/user/user.module.js.map +1 -0
  644. package/dist/modules/user/user.service.d.ts +118 -0
  645. package/dist/modules/user/user.service.js +182 -0
  646. package/dist/modules/user/user.service.js.map +1 -0
  647. package/dist/modules/user-favorites/dto/create-favorite.dto.d.ts +9 -0
  648. package/dist/modules/user-favorites/dto/create-favorite.dto.js +55 -0
  649. package/dist/modules/user-favorites/dto/create-favorite.dto.js.map +1 -0
  650. package/dist/modules/user-favorites/dto/index.d.ts +1 -0
  651. package/dist/modules/user-favorites/dto/index.js +18 -0
  652. package/dist/modules/user-favorites/dto/index.js.map +1 -0
  653. package/dist/modules/user-favorites/user-favorites.controller.d.ts +27 -0
  654. package/dist/modules/user-favorites/user-favorites.controller.js +82 -0
  655. package/dist/modules/user-favorites/user-favorites.controller.js.map +1 -0
  656. package/dist/modules/user-favorites/user-favorites.module.d.ts +2 -0
  657. package/dist/modules/user-favorites/user-favorites.module.js +38 -0
  658. package/dist/modules/user-favorites/user-favorites.module.js.map +1 -0
  659. package/dist/modules/user-favorites/user-favorites.service.d.ts +36 -0
  660. package/dist/modules/user-favorites/user-favorites.service.js +174 -0
  661. package/dist/modules/user-favorites/user-favorites.service.js.map +1 -0
  662. package/dist/modules/views/dto/create-issue-view.dto.d.ts +9 -0
  663. package/dist/modules/views/dto/create-issue-view.dto.js +54 -0
  664. package/dist/modules/views/dto/create-issue-view.dto.js.map +1 -0
  665. package/dist/modules/views/dto/index.d.ts +2 -0
  666. package/dist/modules/views/dto/index.js +19 -0
  667. package/dist/modules/views/dto/index.js.map +1 -0
  668. package/dist/modules/views/dto/update-issue-view.dto.d.ts +6 -0
  669. package/dist/modules/views/dto/update-issue-view.dto.js +9 -0
  670. package/dist/modules/views/dto/update-issue-view.dto.js.map +1 -0
  671. package/dist/modules/views/view.controller.d.ts +45 -0
  672. package/dist/modules/views/view.controller.js +128 -0
  673. package/dist/modules/views/view.controller.js.map +1 -0
  674. package/dist/modules/views/view.module.d.ts +2 -0
  675. package/dist/modules/views/view.module.js +23 -0
  676. package/dist/modules/views/view.module.js.map +1 -0
  677. package/dist/modules/views/view.service.d.ts +55 -0
  678. package/dist/modules/views/view.service.js +158 -0
  679. package/dist/modules/views/view.service.js.map +1 -0
  680. package/dist/modules/views/workspace-view.controller.d.ts +42 -0
  681. package/dist/modules/views/workspace-view.controller.js +120 -0
  682. package/dist/modules/views/workspace-view.controller.js.map +1 -0
  683. package/dist/modules/views/workspace-view.module.d.ts +2 -0
  684. package/dist/modules/views/workspace-view.module.js +28 -0
  685. package/dist/modules/views/workspace-view.module.js.map +1 -0
  686. package/dist/modules/work-items/work-items.controller.d.ts +6 -0
  687. package/dist/modules/work-items/work-items.controller.js +42 -0
  688. package/dist/modules/work-items/work-items.controller.js.map +1 -0
  689. package/dist/modules/work-items/work-items.module.d.ts +2 -0
  690. package/dist/modules/work-items/work-items.module.js +23 -0
  691. package/dist/modules/work-items/work-items.module.js.map +1 -0
  692. package/dist/modules/work-items/work-items.service.d.ts +11 -0
  693. package/dist/modules/work-items/work-items.service.js +45 -0
  694. package/dist/modules/work-items/work-items.service.js.map +1 -0
  695. package/dist/modules/workspace/dto/create-workspace.dto.d.ts +13 -0
  696. package/dist/modules/workspace/dto/create-workspace.dto.js +48 -0
  697. package/dist/modules/workspace/dto/create-workspace.dto.js.map +1 -0
  698. package/dist/modules/workspace/dto/index.d.ts +0 -0
  699. package/dist/modules/workspace/dto/index.js +2 -0
  700. package/dist/modules/workspace/dto/index.js.map +1 -0
  701. package/dist/modules/workspace/workspace-context.service.d.ts +13 -0
  702. package/dist/modules/workspace/workspace-context.service.js +35 -0
  703. package/dist/modules/workspace/workspace-context.service.js.map +1 -0
  704. package/dist/modules/workspace/workspace.controller.d.ts +292 -0
  705. package/dist/modules/workspace/workspace.controller.js +758 -0
  706. package/dist/modules/workspace/workspace.controller.js.map +1 -0
  707. package/dist/modules/workspace/workspace.middleware.d.ts +5 -0
  708. package/dist/modules/workspace/workspace.middleware.js +32 -0
  709. package/dist/modules/workspace/workspace.middleware.js.map +1 -0
  710. package/dist/modules/workspace/workspace.module.d.ts +2 -0
  711. package/dist/modules/workspace/workspace.module.js +49 -0
  712. package/dist/modules/workspace/workspace.module.js.map +1 -0
  713. package/dist/modules/workspace/workspace.service.d.ts +475 -0
  714. package/dist/modules/workspace/workspace.service.js +1266 -0
  715. package/dist/modules/workspace/workspace.service.js.map +1 -0
  716. package/dist/modules/workspace/workspaces.controller.d.ts +13 -0
  717. package/dist/modules/workspace/workspaces.controller.js +57 -0
  718. package/dist/modules/workspace/workspaces.controller.js.map +1 -0
  719. package/dist/modules/workspace/workspaces.module.d.ts +2 -0
  720. package/dist/modules/workspace/workspaces.module.js +29 -0
  721. package/dist/modules/workspace/workspaces.module.js.map +1 -0
  722. package/dist/modules/workspace/workspaces.service.d.ts +15 -0
  723. package/dist/modules/workspace/workspaces.service.js +52 -0
  724. package/dist/modules/workspace/workspaces.service.js.map +1 -0
  725. package/dist/modules/workspace-slug/workspace-slug.controller.d.ts +6 -0
  726. package/dist/modules/workspace-slug/workspace-slug.controller.js +37 -0
  727. package/dist/modules/workspace-slug/workspace-slug.controller.js.map +1 -0
  728. package/dist/modules/workspace-slug/workspace-slug.module.d.ts +2 -0
  729. package/dist/modules/workspace-slug/workspace-slug.module.js +26 -0
  730. package/dist/modules/workspace-slug/workspace-slug.module.js.map +1 -0
  731. package/dist/mount.d.ts +51 -0
  732. package/dist/mount.js +194 -0
  733. package/dist/mount.js.map +1 -0
  734. package/dist/plane-config.registry.d.ts +31 -0
  735. package/dist/plane-config.registry.js +91 -0
  736. package/dist/plane-config.registry.js.map +1 -0
  737. package/dist/plane-plugin-options.interface.d.ts +70 -0
  738. package/dist/plane-plugin-options.interface.js +5 -0
  739. package/dist/plane-plugin-options.interface.js.map +1 -0
  740. package/dist/plane-proxy.module.d.ts +16 -0
  741. package/dist/plane-proxy.module.js +176 -0
  742. package/dist/plane-proxy.module.js.map +1 -0
  743. package/package.json +109 -0
@@ -0,0 +1,1052 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var __importDefault = (this && this.__importDefault) || function (mod) {
15
+ return (mod && mod.__esModule) ? mod : { "default": mod };
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.IssuesService = void 0;
19
+ const common_1 = require("@nestjs/common");
20
+ const qs_1 = __importDefault(require("qs"));
21
+ const plugin_integration_plane_models_1 = require("@ever-gauzy/plugin-integration-plane-models");
22
+ const config_1 = require("../../config");
23
+ const api_fetch_service_1 = require("../api-fetch/api-fetch.service");
24
+ const states_service_1 = require("../states/states.service");
25
+ const comments_service_1 = require("../comments/comments.service");
26
+ const project_service_1 = require("../project/project.service");
27
+ const reactions_service_1 = require("../reactions/reactions.service");
28
+ const issue_relations_service_1 = require("../issue-relations/issue-relations.service");
29
+ const issue_links_service_1 = require("../issue-links/issue-links.service");
30
+ const activity_service_1 = require("../activity/activity.service");
31
+ const issue_labels_service_1 = require("./issue-labels/issue-labels.service");
32
+ const subscription_service_1 = require("../subscription/subscription.service");
33
+ const mention_service_1 = require("../mention/mention.service");
34
+ let IssuesService = class IssuesService extends api_fetch_service_1.ApiFetchService {
35
+ constructor(_projectService, _stateSerive, _issueLabelService, _commentService, _reactionService, _issueLinkService, _issueRelationService, _activityService, _subscriptionService, _mentionService, _serverFetchService) {
36
+ super(_serverFetchService['_httpService']);
37
+ this._projectService = _projectService;
38
+ this._stateSerive = _stateSerive;
39
+ this._issueLabelService = _issueLabelService;
40
+ this._commentService = _commentService;
41
+ this._reactionService = _reactionService;
42
+ this._issueLinkService = _issueLinkService;
43
+ this._issueRelationService = _issueRelationService;
44
+ this._activityService = _activityService;
45
+ this._subscriptionService = _subscriptionService;
46
+ this._mentionService = _mentionService;
47
+ this._serverFetchService = _serverFetchService;
48
+ this.path = '/tasks';
49
+ }
50
+ /**
51
+ * @description - Get remode API issue
52
+ * @param {ID} id - The issue ID
53
+ * @returns - A promise that resolved after getting issue
54
+ * @memberof IssuesService
55
+ */
56
+ async getExternalIssue(id, relations, isDraft) {
57
+ const query = qs_1.default.stringify((0, config_1.getTaskQuery)(undefined, {}, relations, undefined, isDraft));
58
+ return (await this.apiFetch({
59
+ path: `${this.path}/${id}`,
60
+ method: 'GET',
61
+ query
62
+ })).data;
63
+ }
64
+ /**
65
+ * Retrieves all tasks from an external source with optional filters.
66
+ *
67
+ * Sends a GET request to an external API to fetch tasks based on the provided options.
68
+ *
69
+ * @param {ITask} options - Optional task filters or configurations to customize the query.
70
+ * @returns {Promise<IPagination<ITask>>} A promise that resolves to an array of tasks.
71
+ * @throws {BadRequestException} If an error occurs during the fetch.
72
+ */
73
+ async findAllExternal(options, relations, orderByField, isDraft = false) {
74
+ try {
75
+ const query = qs_1.default.stringify((0, config_1.getTaskQuery)(undefined, options, relations, orderByField, isDraft));
76
+ return (await this.apiFetch({
77
+ method: 'GET',
78
+ path: this.path,
79
+ query
80
+ })).data;
81
+ }
82
+ catch (error) {
83
+ throw new common_1.BadRequestException(error);
84
+ }
85
+ }
86
+ /**
87
+ * Retrieves tasks assigned to a specific employee from an external source.
88
+ *
89
+ * Sends a GET request to fetch tasks for the specified employee ID.
90
+ *
91
+ * @param {ID} employeeId - The ID of the employee for whom the tasks are being retrieved.
92
+ * @returns {Promise<ITask[]>} A promise that resolves to an array of tasks assigned to the specified employee.
93
+ * @throws {BadRequestException} If an error occurs during the fetch.
94
+ */
95
+ async findExternalByEmployee(employeeId, relations, orderByField) {
96
+ try {
97
+ // Build query for task retrieval
98
+ const query = qs_1.default.stringify((0, config_1.getTaskQuery)(undefined, {}, relations, orderByField, false));
99
+ // Fetch tasks for the authenticated employee
100
+ const tasks = (await this.apiFetch({
101
+ method: 'GET',
102
+ path: `${this.path}/employee/${employeeId}`,
103
+ query
104
+ })).data;
105
+ return tasks;
106
+ }
107
+ catch (error) {
108
+ throw new common_1.BadRequestException(error);
109
+ }
110
+ }
111
+ /**
112
+ * Retrieves tasks based on the provided start and due date filters.
113
+ *
114
+ * This method builds a query dynamically based on the provided `ITaskDateFilterInput` options.
115
+ * It sends a GET request to fetch tasks filtered by the specified
116
+ * start and due date ranges or other applicable criteria.
117
+ *
118
+ * @param {ITaskDateFilterInput} options - The filtering options including start date, due date, and other possible filters.
119
+ * @returns {Promise<ITask[]>} A promise that resolves with an array of tasks that match the filtering criteria.
120
+ * @throws {BadRequestException} Throws an error if the API request fails or if the options are invalid.
121
+ */
122
+ async findByStartAndDueDate(options) {
123
+ try {
124
+ // Build query for task retrieval
125
+ const query = qs_1.default.stringify((0, config_1.getFilteredByDatesTaskQuery)(options));
126
+ const tasks = (await this.apiFetch({
127
+ method: 'GET',
128
+ path: `${this.path}/filter-by-date`,
129
+ query
130
+ })).data;
131
+ return tasks.items;
132
+ }
133
+ catch (error) {
134
+ throw new common_1.BadRequestException(error);
135
+ }
136
+ }
137
+ /**
138
+ * @description - Find issue by Id
139
+ * @param {ID} id - The issue ID to search
140
+ * @returns - A promise that resolves after issue fetched
141
+ * @memberof IssuesService
142
+ */
143
+ async findOne(id, isDraft) {
144
+ var _a, _b, _c;
145
+ try {
146
+ const issue = await this.getExternalIssue(id, [
147
+ 'tags',
148
+ 'members.user',
149
+ 'createdByUser',
150
+ 'project.members.employee.user.role',
151
+ 'organizationSprint',
152
+ 'modules'
153
+ ], isDraft);
154
+ if (!issue) {
155
+ throw new common_1.BadRequestException('Issue not found');
156
+ }
157
+ // Find Issue Reactions
158
+ const reactions = await this.findIssueReactions({
159
+ entityId: id,
160
+ entity: plugin_integration_plane_models_1.ReactionEntityEnum.Task
161
+ }, issue.projectId, isDraft);
162
+ //Check current user subscription.
163
+ const subscriptions = await this._subscriptionService.findAll({
164
+ entity: plugin_integration_plane_models_1.BaseEntityEnum.Task,
165
+ entityId: issue.id,
166
+ userId: (_a = (0, config_1.currentUserId)()) !== null && _a !== void 0 ? _a : undefined
167
+ });
168
+ const isSubscribed = subscriptions && subscriptions.length > 0;
169
+ // Find issue links
170
+ const links = await this.findIssueLinks(id, issue.projectId, issue);
171
+ return (0, config_1.issueTransformer)(issue, reactions, links, isSubscribed);
172
+ }
173
+ catch (error) {
174
+ this.logger.error(`Failed to find issue: ${((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.message) || error.message}`, error.stack);
175
+ throw new common_1.BadRequestException(error);
176
+ }
177
+ }
178
+ /**
179
+ * @description - Create issue
180
+ * @param {IIssueCreateInput} input - data for creating new issue
181
+ * @returns - A promise that resolves after issue created
182
+ * @memberof IssuesService
183
+ */
184
+ async create(input) {
185
+ var _a, _b;
186
+ try {
187
+ const { state_id } = input;
188
+ // Set default status
189
+ let state = { name: plugin_integration_plane_models_1.TaskStatusEnum.BACKLOG };
190
+ if (state_id && state_id.length > 0) {
191
+ state = await this._stateSerive.getOne(input.state_id);
192
+ }
193
+ const body = (0, config_1.createIssueInputTransformer)(input, state.name);
194
+ const issue = (await this.apiFetch({
195
+ method: 'POST',
196
+ path: this.path,
197
+ body
198
+ })).data;
199
+ return (0, config_1.issueTransformer)(issue);
200
+ }
201
+ catch (error) {
202
+ this.logger.error(`Failed to create issue: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
203
+ throw new common_1.BadRequestException(error);
204
+ }
205
+ }
206
+ /**
207
+ * @description - Update issue
208
+ * @param {IIssueCreateInput} input - data for updating issue
209
+ * @param {ID} id - The issue ID to be updated
210
+ * @returns - A promise that resolves after issue updated
211
+ * @memberof IssuesService
212
+ */
213
+ async update(id, input, isDraft) {
214
+ var _a, _b, _c, _d, _e, _f, _g;
215
+ try {
216
+ // Extract modules to be added and removed from the input
217
+ const { modules: added_modules = [], removed_modules = [], module_ids = [] } = input;
218
+ // Fetch the state only if a state_id is provided
219
+ let state;
220
+ try {
221
+ if (input.state_id) {
222
+ state = await this._stateSerive.getOne(input.state_id);
223
+ }
224
+ }
225
+ catch (error) {
226
+ this.logger.warn(`Failed to fetch state: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`);
227
+ }
228
+ // Retrieve the existing issue and external issue details simultaneously
229
+ const [issue, externalIssue] = await Promise.all([
230
+ this.findOne(id, isDraft),
231
+ this.getExternalIssue(id, undefined, isDraft)
232
+ ]);
233
+ if (!issue) {
234
+ throw new common_1.BadRequestException('Issue not found');
235
+ }
236
+ // Find labels
237
+ const labelResult = await this._issueLabelService.getProjectIssueLabels(issue.project_id);
238
+ const labels = Array.isArray(labelResult)
239
+ ? labelResult
240
+ : [labelResult];
241
+ // Find project
242
+ const project = await this._projectService.getExternalProject(issue.project_id, ['modules', 'members.employee']);
243
+ // Calculate the final set of modules after additions and removals
244
+ const existingModules = ((_c = externalIssue === null || externalIssue === void 0 ? void 0 : externalIssue.modules) === null || _c === void 0 ? void 0 : _c.map((module) => module.id)) || [];
245
+ const modules = new Set([
246
+ ...existingModules,
247
+ ...added_modules.concat(module_ids)
248
+ ]);
249
+ removed_modules.forEach((module) => modules.delete(module)); // Remove the modules marked for deletion
250
+ // Transform the input data for the update request
251
+ const body = (0, config_1.updateIssueInputTransformer)(input, state === null || state === void 0 ? void 0 : state.name, (_d = project.members) === null || _d === void 0 ? void 0 : _d.map((member) => member.employee), labels, Array.from(modules), project.modules);
252
+ const task = (await this.apiFetch({
253
+ path: `${this.path}/${id}`,
254
+ method: 'PUT',
255
+ body: Object.assign(Object.assign({}, body), { title: (_e = input.name) !== null && _e !== void 0 ? _e : issue.name, status: (state === null || state === void 0 ? void 0 : state.name) || externalIssue.status })
256
+ })).data;
257
+ const updatedTask = await this.getExternalIssue(task.id, undefined);
258
+ return (0, config_1.issueTransformer)(updatedTask);
259
+ }
260
+ catch (error) {
261
+ this.logger.error(`Failed to update issue: ${((_g = (_f = error === null || error === void 0 ? void 0 : error.response) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.message) || error.message}`, error.stack);
262
+ throw new common_1.BadRequestException(error);
263
+ }
264
+ }
265
+ /**
266
+ * Updates the parent-child relationship between a parent task and multiple sub-tasks.
267
+ *
268
+ * @param {ID} id - The ID of the parent task.
269
+ * @param {Pick<IIssueUpdateInput, 'sub_issue_ids'>} input - Object containing the IDs of the sub-tasks (`sub_issue_ids`).
270
+ * @returns {Promise<ITask[]>} - A promise that resolves to an array of updated tasks
271
+ * @throws {BadRequestException} - Throws an exception in case of an update error.
272
+ */
273
+ async updateRelationnalIssueParent(id, input) {
274
+ var _a, _b;
275
+ try {
276
+ const { sub_issue_ids } = input;
277
+ const tasks = [];
278
+ const subIssues = await Promise.all((sub_issue_ids !== null && sub_issue_ids !== void 0 ? sub_issue_ids : []).map(async (issueId) => {
279
+ const issue = await this.getExternalIssue(issueId, undefined, false);
280
+ await this.apiFetch({
281
+ path: `${this.path}/${issueId}`,
282
+ method: 'PUT',
283
+ body: Object.assign(Object.assign({}, issue), { parentId: id })
284
+ });
285
+ tasks.push(issue);
286
+ return (0, config_1.issueTransformer)(issue);
287
+ }));
288
+ const stateDistribution = (0, config_1.getTaskDistribution)(tasks);
289
+ return {
290
+ sub_issues: subIssues,
291
+ state_distribution: stateDistribution
292
+ };
293
+ }
294
+ catch (error) {
295
+ this.logger.error(`Failed to update relational issue parent: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
296
+ throw new common_1.BadRequestException(error);
297
+ }
298
+ }
299
+ /**
300
+ * Retrieves all issues related to a specific project, with optional filters and grouping.
301
+ *
302
+ * This function fetches issues based on the project ID, using optional parameters such as
303
+ * filter options and the referer to detect if the request comes from a view page.
304
+ * Depending on the `group_by` option, the issues are grouped accordingly before being returned.
305
+ *
306
+ * @param {ID} projectId - The ID of the project for which to retrieve issues.
307
+ * @param {IIssueFindInput} [options] - Optional filters and grouping options for the query.
308
+ * @param {string} [referer] - The referer URL, used to extract the view ID if the request is from a view page.
309
+ * @returns {Promise<any>} A promise that resolves to the grouped or non-grouped issues.
310
+ * @throws {BadRequestException} If there is an error during the API fetch or data processing.
311
+ */
312
+ async getAllIssuesByProject(projectId, options, referer) {
313
+ var _a;
314
+ try {
315
+ // Extract the view ID from the referer if it exists
316
+ const viewId = (_a = (0, config_1.extractViewIdFromReferer)(referer)) !== null && _a !== void 0 ? _a : (0, config_1.extractWorkspaceViewIdFromReferer)(referer);
317
+ // Destructure options for group_by and module if provided
318
+ const { group_by, sub_group_by, mentions, module, priority, start_date, target_date, type } = options;
319
+ // Create the query string based on the provided options and projectId
320
+ const query = qs_1.default.stringify((0, config_1.getTaskQuery)(projectId, options, undefined, undefined, false));
321
+ let path = '';
322
+ // If a module is specified, modify the path accordingly
323
+ if (module && !module.includes(',')) {
324
+ path = 'module';
325
+ }
326
+ // Fetch tasks from the API, using the viewId if available, otherwise default to module or the base path
327
+ const tasks = (await this.apiFetch({
328
+ method: 'GET',
329
+ path: !viewId
330
+ ? `${this.path}/${path}` // Use module path if no viewId
331
+ : `${this.path}/view/${viewId}`, // Use view path if viewId is present
332
+ query
333
+ })).data;
334
+ // Extract the issues from the API response
335
+ let issues = tasks.items;
336
+ // Optional filter tasks by priority criteria
337
+ if (priority) {
338
+ const priorities = (0, config_1.issueFilterSplitter)(priority);
339
+ issues = (0, config_1.filterIssuesByPriorityNames)(issues, priorities);
340
+ }
341
+ // Optional filter tasks by type (Active or Backlog)
342
+ if (type) {
343
+ issues = (0, config_1.filterIssuesByActiveType)(issues, type);
344
+ }
345
+ // Optional filter tasks by start_date string
346
+ if (start_date) {
347
+ issues = (0, config_1.filterTasksByDateCriteria)(issues, 'startDate', start_date);
348
+ }
349
+ // Optional filter tasks by start_date string
350
+ if (target_date) {
351
+ issues = (0, config_1.filterTasksByDateCriteria)(issues, 'dueDate', target_date);
352
+ }
353
+ if (mentions) {
354
+ const mentionIds = (0, config_1.issueFilterSplitter)(mentions);
355
+ try {
356
+ const [taskParentMentionedUsers, taskMentionedUsers] = await Promise.all([
357
+ this._mentionService.findAll({
358
+ parentEntityType: plugin_integration_plane_models_1.BaseEntityEnum.Task
359
+ }),
360
+ this._mentionService.findAll({
361
+ entity: plugin_integration_plane_models_1.BaseEntityEnum.Task
362
+ })
363
+ ]);
364
+ const taskIds = new Set([
365
+ ...taskMentionedUsers.map((mention) => mention.entityId),
366
+ ...taskParentMentionedUsers.map((mention) => mention.parentEntityId)
367
+ ]);
368
+ const mentionedUserIds = new Set([
369
+ ...taskMentionedUsers.map((mention) => mention.mentionedUserId),
370
+ ...taskParentMentionedUsers.map((mention) => mention.mentionedUserId)
371
+ ]);
372
+ // Filtrage des issues
373
+ issues = issues.filter((task) => taskIds.has(task.id) &&
374
+ task.members.some((member) => mentionIds.includes(member.id) &&
375
+ mentionedUserIds.has(member.userId)));
376
+ }
377
+ catch (error) {
378
+ this.logger.error('Error filtering issues by mentions', error instanceof Error ? error.stack : String(error));
379
+ }
380
+ }
381
+ // Group the issues based on the group_by option, or return non-grouped issues by default
382
+ const issuesWithLinks = await Promise.all((issues !== null && issues !== void 0 ? issues : []).map(async (issue) => {
383
+ const issueLinks = await this._issueLinkService.findAll(plugin_integration_plane_models_1.BaseEntityEnum.Task, issue.id);
384
+ const transformedIssueLinks = (0, config_1.issueLinkTransformer)(issueLinks);
385
+ return {
386
+ issue,
387
+ issueLinks: transformedIssueLinks
388
+ };
389
+ }));
390
+ const project = await this._projectService.getExternalProject(projectId, ['members.employee']);
391
+ const employees = project.members.map((member) => member.employee);
392
+ switch (group_by) {
393
+ case plugin_integration_plane_models_1.IssueGroupByEnum.STATE:
394
+ return (0, config_1.groupIssuesByStateId)(issuesWithLinks, sub_group_by, employees); // Group issues by their state
395
+ case plugin_integration_plane_models_1.IssueGroupByEnum.TARGET_DATE:
396
+ return (0, config_1.groupIssuesByTargetDate)(issues); // Group issues by their target date
397
+ case plugin_integration_plane_models_1.IssueGroupByEnum.PRIORITY:
398
+ return (0, config_1.groupIssuesByPriority)(issuesWithLinks, sub_group_by, employees); // Group issues by their priority
399
+ case plugin_integration_plane_models_1.IssueGroupByEnum.CYCLE_ID:
400
+ return (0, config_1.groupIssuesByCycleId)(issuesWithLinks, sub_group_by, employees); // Group issues by their cycle
401
+ case plugin_integration_plane_models_1.IssueGroupByEnum.MODULE_ID:
402
+ return (0, config_1.groupIssuesByModule)(issuesWithLinks, sub_group_by, employees); // Group issues by their modules
403
+ case plugin_integration_plane_models_1.IssueGroupByEnum.LABEL_ID:
404
+ return (0, config_1.groupIssuesByLabel)(issuesWithLinks, sub_group_by, employees); // Group issues by their labels
405
+ case plugin_integration_plane_models_1.IssueGroupByEnum.ASSIGNEE_ID:
406
+ return (0, config_1.groupIssuesByAssignee)(issuesWithLinks, sub_group_by, employees); // Group issues by their assignees
407
+ case plugin_integration_plane_models_1.IssueGroupByEnum.CREATED_BY:
408
+ return (0, config_1.groupIssuesByCreatorId)(issuesWithLinks, sub_group_by, employees); // Group issues by their creator
409
+ default:
410
+ return (0, config_1.nonGroupedIssues)(issues); // Return issues as they are if no group_by is specified
411
+ }
412
+ }
413
+ catch (error) {
414
+ this.logger.error(`Failed to get all issues by project: ${error === null || error === void 0 ? void 0 : error.message}`, error.stack);
415
+ throw new common_1.BadRequestException();
416
+ }
417
+ }
418
+ /**
419
+ * @description Find issu children
420
+ * @param {ID} id - Issue ID to search
421
+ * @returns A promise that resolves after found issue children
422
+ * @memberof IssuesService
423
+ */
424
+ async findIssueChildren(id) {
425
+ try {
426
+ const sub_issues = [];
427
+ const issue = await this.getExternalIssue(id, ['children.taskStatus', 'children.members'], false);
428
+ if (!issue) {
429
+ throw new common_1.BadRequestException('Issue could not be found');
430
+ }
431
+ if (issue.children.length > 0) {
432
+ const children = issue.children;
433
+ children.forEach((task) => sub_issues.push((0, config_1.issueTransformer)(task)));
434
+ }
435
+ const stateDistribution = (0, config_1.getTaskDistribution)(issue.children);
436
+ return { sub_issues, state_distribution: stateDistribution };
437
+ }
438
+ catch (error) {
439
+ this.logger.error('Failed to find issue children', error instanceof Error ? error.stack : String(error));
440
+ throw new common_1.BadRequestException();
441
+ }
442
+ }
443
+ /**
444
+ * Retrieves all tasks with optional filters and options.
445
+ *
446
+ * Sends a GET request to fetch tasks with the provided query options, and
447
+ * transforms each task into the issue format. Returns a list of transformed tasks.
448
+ *
449
+ * @param {ITask} [options] - Optional filters or configurations for fetching tasks.
450
+ * @returns {Promise<IIssue[]>} A promise that resolves to a list of transformed issues.
451
+ * @throws {BadRequestException} If an error occurs during the fetch.
452
+ */
453
+ async findAll(options, relations, isDraft = false) {
454
+ var _a;
455
+ try {
456
+ const query = qs_1.default.stringify((0, config_1.getTaskQuery)(undefined, options, relations, undefined, isDraft));
457
+ const tasks = (await this.apiFetch({
458
+ method: 'GET',
459
+ path: this.path,
460
+ query
461
+ })).data;
462
+ return (_a = tasks.items) === null || _a === void 0 ? void 0 : _a.map((task) => (0, config_1.issueTransformer)(task));
463
+ }
464
+ catch (error) {
465
+ this.logger.error('Failed to find all issues', error instanceof Error ? error.stack : String(error));
466
+ throw new common_1.BadRequestException(error);
467
+ }
468
+ }
469
+ /**
470
+ * Retrieves tasks assigned to a specific employee.
471
+ *
472
+ * Sends a GET request to fetch tasks based on the provided employee ID,
473
+ * applies a transformation to each task, and returns the transformed list.
474
+ *
475
+ * @param {ID} employeeId - The ID of the employee whose tasks are to be fetched.
476
+ * @returns {Promise<ITask[]>} A promise that resolves to a list of transformed tasks.
477
+ * @throws {BadRequestException} If an error occurs during the fetch.
478
+ */
479
+ async findByEmployee(employeeId, relations) {
480
+ var _a, _b;
481
+ try {
482
+ const tasks = await this.findExternalByEmployee(employeeId, relations);
483
+ return tasks.map((task) => (0, config_1.issueTransformer)(task));
484
+ }
485
+ catch (error) {
486
+ this.logger.error(`Failed to find issues by employee: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
487
+ throw new common_1.BadRequestException(error);
488
+ }
489
+ }
490
+ /**
491
+ * @description Create issue relations.
492
+ * @param {ID} taskToId Issue ID for whom to create main relations.
493
+ * @param {ICreateIssueRelationInput} input - Body request data for creating main and inversed relations.
494
+ * @returns A promise resolved to created and transformed main relations.
495
+ * @memberof IssuesService
496
+ */
497
+ async createIssueRelations(taskToId, input) {
498
+ try {
499
+ const { issues, relation_type } = input;
500
+ return await this._issueRelationService.create(taskToId, issues, relation_type);
501
+ }
502
+ catch (error) {
503
+ this.logger.error('Failed to create issue relations', error instanceof Error ? error.stack : String(error));
504
+ throw new common_1.BadRequestException(error);
505
+ }
506
+ }
507
+ /**
508
+ * @description Delete main and inverse relations
509
+ * @param {ID} id - Main Issue ID for delete the main relation
510
+ * @param {IDeleteRelationInput} input - Body Request data for related issue and relation type
511
+ * @returns - Delete Result
512
+ * @memberof IssuesService
513
+ */
514
+ async deleteIssueRelation(id, input) {
515
+ var _a, _b;
516
+ try {
517
+ return await this._issueRelationService.delete(id, input);
518
+ }
519
+ catch (error) {
520
+ this.logger.error(`Failed to delete issue relation: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
521
+ throw new common_1.BadRequestException(error);
522
+ }
523
+ }
524
+ /**
525
+ * @description Find issue relation (Issues associates)
526
+ * @param {ID} id - Issue ID
527
+ * @returns A promise resolved to fetched issue relations
528
+ * @memberof IssuesService
529
+ */
530
+ async findIssueRelations(id) {
531
+ try {
532
+ return await this._issueRelationService.findRelationsByIssueId(id);
533
+ }
534
+ catch (error) {
535
+ this.logger.error('Failed to find issue relations', error instanceof Error ? error.stack : String(error));
536
+ throw new common_1.BadRequestException();
537
+ }
538
+ }
539
+ /**
540
+ * @description Delete issue
541
+ * @param {ID} id - The issue ID to be deleted
542
+ * @returns A promise resolved to delete result
543
+ * @memberof IssuesService
544
+ */
545
+ async delete(id) {
546
+ return (await this.apiFetch({
547
+ method: 'DELETE',
548
+ path: `${this.path}/${id}/soft`
549
+ })).data;
550
+ }
551
+ /**
552
+ * @description Create issue comment
553
+ * @param {ID} entityId - Issue ID for creating comment
554
+ * @param {ID} projectId - Project ID for returning project data
555
+ * @param {ICreateCommentInput} input - Body request
556
+ * @returns A promise resolved to comment created and returned related data
557
+ * @memberof IssuesService
558
+ */
559
+ async createComment(entityId, projectId, input) {
560
+ var _a;
561
+ try {
562
+ const task = await this.getExternalIssue(entityId, ['project.members.employee.user.role', 'project.organization'], false);
563
+ const projectMembers = task.project.members.map((member) => member.employee);
564
+ // Create comment
565
+ const comment = await this._commentService.create(Object.assign(Object.assign({}, input), { entityName: task.title }), plugin_integration_plane_models_1.BaseEntityEnum.Task, entityId, projectMembers);
566
+ const { issue, project, workspace } = await this.getIssueCommentDetails(entityId, task.projectId, (_a = comment.employee) === null || _a === void 0 ? void 0 : _a.id, task, task.project);
567
+ const transformedComment = (0, config_1.issueCommentTrasnsformer)(comment, issue, project, workspace, [], // On creation, comment has no reaction yet
568
+ project.members
569
+ .map((member) => member.employee)
570
+ .filter((employee) => employee.userId === comment.createdByUserId)[0]);
571
+ return Array.isArray(transformedComment)
572
+ ? transformedComment[0]
573
+ : transformedComment;
574
+ }
575
+ catch (error) {
576
+ this.logger.error('Failed to create comment', error instanceof Error ? error.stack : String(error));
577
+ throw new common_1.BadRequestException();
578
+ }
579
+ }
580
+ /**
581
+ * @description Update issue comment
582
+ * @param {ID} id - Comment ID to be updated
583
+ * @param {ID} projectId - Project ID for find details
584
+ * @param {ICreateCommentInput} input - Body Request data
585
+ * @param {ID} entityId
586
+ * @returns A promise resolved to updated comment and details
587
+ * @memberof IssuesService
588
+ */
589
+ async updateComment(id, projectId, input, entityId) {
590
+ var _a, _b;
591
+ try {
592
+ // Update comment
593
+ const options = {
594
+ entity: plugin_integration_plane_models_1.BaseEntityEnum.Task,
595
+ entityId
596
+ };
597
+ const comment = await this._commentService.update(id, options, input);
598
+ const updatedComment = await this._commentService.findOne(id, options);
599
+ const { issue, project, workspace } = await this.getIssueCommentDetails(updatedComment.entityId, projectId, updatedComment.employeeId);
600
+ const reactions = await this._commentService.findCommentReactions({
601
+ entityId: updatedComment.id,
602
+ entity: plugin_integration_plane_models_1.ReactionEntityEnum.Comment
603
+ }, projectId);
604
+ const transformedComment = (0, config_1.issueCommentTrasnsformer)(updatedComment, issue, project, workspace, reactions, project.members
605
+ .map((member) => member.employee)
606
+ .filter((employee) => employee.userId === comment.createdByUserId)[0]);
607
+ return Array.isArray(transformedComment)
608
+ ? transformedComment[0]
609
+ : transformedComment;
610
+ }
611
+ catch (error) {
612
+ this.logger.error(`Failed to update comment: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
613
+ throw new common_1.BadRequestException(error);
614
+ }
615
+ }
616
+ /**
617
+ * @description Delete issue comment
618
+ * @param {ID} id -The issue comment ID to be deleted
619
+ * @returns A promise resolved to delete result
620
+ * @memberof IssuesService
621
+ */
622
+ async deleteComment(id) {
623
+ return await this._commentService.delete(id);
624
+ }
625
+ /**
626
+ * @description Get issues comments
627
+ * @param {Partial<ICommentFindInput>} options Option filters
628
+ * @param {ID} projectId - Project ID
629
+ * @returns A promise resolved after fetch comments
630
+ * @memberof IssuesService
631
+ */
632
+ async getIssueComments(options, projectId) {
633
+ try {
634
+ const comments = await this._commentService.findAll(options);
635
+ const task = await this.getExternalIssue(options.entityId, ['project.members.employee.user.role', 'project.organization'], false);
636
+ const projectMembers = task.project.members.map((member) => member.employee);
637
+ const issueComments = await Promise.all((comments !== null && comments !== void 0 ? comments : []).map(async (comment) => {
638
+ const reactions = await this._commentService.findCommentReactions({
639
+ entityId: comment.id,
640
+ entity: plugin_integration_plane_models_1.ReactionEntityEnum.Comment
641
+ }, projectId);
642
+ const { issue, project, workspace } = await this.getIssueCommentDetails(options.entityId, projectId, comment.employeeId, task, task.project);
643
+ const transformedComment = (0, config_1.issueCommentTrasnsformer)(comment, issue, project, workspace, reactions, projectMembers.filter((employee) => employee.userId === comment.createdByUserId)[0]);
644
+ return Array.isArray(transformedComment)
645
+ ? transformedComment[0]
646
+ : transformedComment;
647
+ }));
648
+ return issueComments;
649
+ }
650
+ catch (error) {
651
+ this.logger.error('Failed to get issue comments', error instanceof Error ? error.stack : String(error));
652
+ throw new common_1.BadRequestException(error);
653
+ }
654
+ }
655
+ async findIssueActivity(id, projectId) {
656
+ try {
657
+ const activityLogs = await this._activityService.findAll({
658
+ entity: plugin_integration_plane_models_1.BaseEntityEnum.Task,
659
+ entityId: id
660
+ });
661
+ const task = await this.getExternalIssue(id, [
662
+ 'project.members.employee.user.role',
663
+ 'project.organization',
664
+ 'organizationSprint',
665
+ 'taskSprintHistories.toSprint',
666
+ 'parent'
667
+ ], false);
668
+ const projectEmployees = task.project.members.map((member) => member.employee);
669
+ // Collect all the IDs of parents mentioned in the logs
670
+ const parentIds = new Set();
671
+ activityLogs === null || activityLogs === void 0 ? void 0 : activityLogs.forEach((log) => {
672
+ var _a, _b, _c;
673
+ if ((_a = log.updatedFields) === null || _a === void 0 ? void 0 : _a.includes('parentId')) {
674
+ (_b = log.updatedValues) === null || _b === void 0 ? void 0 : _b.forEach((value) => {
675
+ if ('parentId' in value && value.parentId) {
676
+ parentIds.add(value.parentId);
677
+ }
678
+ });
679
+ (_c = log.previousValues) === null || _c === void 0 ? void 0 : _c.forEach((value) => {
680
+ if ('parentId' in value && value.parentId) {
681
+ parentIds.add(value.parentId);
682
+ }
683
+ });
684
+ }
685
+ });
686
+ // Load all the parent tasks
687
+ const parentTasks = new Map();
688
+ if (parentIds.size > 0) {
689
+ const parents = await this.findAllExternal({
690
+ issues: Array.from(parentIds).join(',')
691
+ }, ['project']);
692
+ parents.items.forEach((parent) => {
693
+ parentTasks.set(parent.id, parent);
694
+ });
695
+ }
696
+ const issueActivities = await Promise.all((activityLogs !== null && activityLogs !== void 0 ? activityLogs : []).map(async (activityLog) => {
697
+ var _a, _b, _c;
698
+ const { actor, issue, project, workspace } = await this.getIssueCommentDetails(id, projectId, activityLog.employeeId, task, task.project);
699
+ // Check if updatedValues contains organizationSprintId
700
+ const updatedSprintObj = (_a = activityLog.updatedValues) === null || _a === void 0 ? void 0 : _a.find((value) => 'organizationSprintId' in value);
701
+ let updatedSprint = null;
702
+ if (updatedSprintObj &&
703
+ updatedSprintObj.organizationSprintId) {
704
+ updatedSprint = ((_c = (_b = task.taskSprintHistories.find((sprint) => sprint.toSprintId ===
705
+ updatedSprintObj.organizationSprintId)) === null || _b === void 0 ? void 0 : _b.toSprint) !== null && _c !== void 0 ? _c : null);
706
+ }
707
+ const transformedActivityLogs = (0, config_1.issueActivityLogTransformer)(activityLog, issue, actor, project, workspace, updatedSprint ? updatedSprint : task.organizationSprint, projectEmployees.filter((employee) => employee.userId === activityLog.createdByUserId)[0], projectEmployees, parentTasks);
708
+ return Array.isArray(transformedActivityLogs)
709
+ ? transformedActivityLogs
710
+ : [transformedActivityLogs];
711
+ }));
712
+ // Find links for logs
713
+ const links = await this._issueLinkService.findAll(plugin_integration_plane_models_1.BaseEntityEnum.Task, id);
714
+ const linkActivities = await Promise.all((links !== null && links !== void 0 ? links : []).map(async (link) => {
715
+ const logs = await this._activityService.findAll({
716
+ entity: plugin_integration_plane_models_1.BaseEntityEnum.ResourceLink,
717
+ entityId: link.id
718
+ });
719
+ const activities = await Promise.all((logs !== null && logs !== void 0 ? logs : []).map(async (log) => {
720
+ const { actor, issue, project, workspace } = await this.getIssueCommentDetails(id, projectId, log.employeeId, task, task.project);
721
+ return (0, config_1.issueLinksActivities)(logs, link, issue, actor, project, workspace, projectEmployees.filter((employee) => employee.userId === log.createdByUserId)[0]);
722
+ }));
723
+ return activities;
724
+ }));
725
+ // Find issue relations activities logs
726
+ const issueRelations = await this._issueRelationService.findAllByIssueId(id, true);
727
+ const issueRelationsActivities = await Promise.all((issueRelations !== null && issueRelations !== void 0 ? issueRelations : []).map(async (issueRelation) => {
728
+ const logs = await this._activityService.findAll({
729
+ entity: plugin_integration_plane_models_1.BaseEntityEnum.TaskLinkedIssue,
730
+ entityId: issueRelation.id
731
+ });
732
+ const activities = await Promise.all((logs !== null && logs !== void 0 ? logs : []).map(async (log) => {
733
+ const { actor, issue, project, workspace } = await this.getIssueCommentDetails(id, projectId, log.employeeId, task, task.project);
734
+ return (0, config_1.issueRelationActivities)(logs, issueRelation, issue, actor, project, workspace, projectEmployees.filter((employee) => employee.userId === log.createdByUserId)[0]);
735
+ }));
736
+ return activities;
737
+ }));
738
+ // Combined activities
739
+ const flattenedActivities = issueActivities
740
+ .flat()
741
+ .concat(linkActivities.flat(2))
742
+ .concat(issueRelationsActivities.flat(2));
743
+ return flattenedActivities.filter(Boolean);
744
+ }
745
+ catch (error) {
746
+ throw new common_1.BadRequestException(error);
747
+ }
748
+ }
749
+ /**
750
+ * @description Create Reaction to issue
751
+ * @param {ID} entityId - Issue ID for whom create reaction
752
+ * @param {ID} projectId - The project ID for returning project data
753
+ * @param {ICreateReactionInput} input - Body request data
754
+ * @returns A promise resolved to created and transformed reaction
755
+ * @memberof IssuesService
756
+ */
757
+ async createReaction(entityId, projectId, input) {
758
+ try {
759
+ const task = await this.getExternalIssue(entityId, ['project.members.employee.user.role', 'project.organization'], false);
760
+ // Create reaction
761
+ const reaction = await this._reactionService.create(input, plugin_integration_plane_models_1.ReactionEntityEnum.Task, entityId);
762
+ // Reaction details
763
+ const { project, workspace } = await this.getIssueCommentDetails(entityId, projectId, reaction.employeeId, task, task.project);
764
+ // Transform Reaction
765
+ const transformedReaction = (0, config_1.reactionTransformer)(reaction, project, workspace);
766
+ return Array.isArray(transformedReaction)
767
+ ? transformedReaction[0]
768
+ : transformedReaction;
769
+ }
770
+ catch (error) {
771
+ this.logger.error('Failed to create reaction', error instanceof Error ? error.stack : String(error));
772
+ throw new common_1.BadRequestException(error);
773
+ }
774
+ }
775
+ /**
776
+ * @description Find issue reactions with associated data
777
+ * @param {Partial<IReaction>} options Find options filter
778
+ * @param {ID} projectId - Project ID for returning data
779
+ * @returns A promise resolved to found and transformed reactions
780
+ * @memberof IssuesService
781
+ */
782
+ async findIssueReactions(options, projectId, isDraft) {
783
+ var _a, _b;
784
+ try {
785
+ const task = await this.getExternalIssue(options.entityId, ['project.members.employee.user.role', 'project.organization'], isDraft);
786
+ const reactions = await this._reactionService.findAll(options);
787
+ const issueReactions = await Promise.all((reactions !== null && reactions !== void 0 ? reactions : []).map(async (reaction) => {
788
+ const { project, workspace } = await this.getIssueCommentDetails(options.entityId, projectId, reaction.employeeId, task, task.project);
789
+ const transformedReaction = (0, config_1.reactionTransformer)(reaction, project, workspace);
790
+ return Array.isArray(transformedReaction)
791
+ ? transformedReaction[0]
792
+ : transformedReaction;
793
+ }));
794
+ return issueReactions;
795
+ }
796
+ catch (error) {
797
+ this.logger.error(`Failed to find issue reactions: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
798
+ throw new common_1.BadRequestException(error);
799
+ }
800
+ }
801
+ /**
802
+ * @description Delete Issue Reaction By Emoji.
803
+ * @param {string} reaction - Emoji
804
+ * @param {ID} entityId - Issue ID from whom to delete reaction
805
+ * @returns A promise resolved to deleted result
806
+ * @memberof IssuesService
807
+ */
808
+ async deleteIssueReactionByEmoji(reaction, entityId) {
809
+ return await this._reactionService.deleteByEmoji(reaction, plugin_integration_plane_models_1.ReactionEntityEnum.Task, entityId);
810
+ }
811
+ /**
812
+ * @description Get issue activity and comments
813
+ * @param {ID} id - Issue ID
814
+ * @param {ID} projectId - Project ID
815
+ * @param {IssueActivityTypeEnum} activity_type Activity type
816
+ * @returns A promise resolved after got comments or Activity Logs
817
+ * @memberof IssuesService
818
+ */
819
+ async findActivity(id, projectId, activity_type) {
820
+ try {
821
+ if (activity_type === plugin_integration_plane_models_1.IssueActivityTypeEnum.COMMENT) {
822
+ return await this.getIssueComments({ entityId: id, entity: plugin_integration_plane_models_1.BaseEntityEnum.Task }, projectId);
823
+ }
824
+ return await this.findIssueActivity(id, projectId);
825
+ }
826
+ catch (error) {
827
+ this.logger.error(`Failed to find activity: ${error === null || error === void 0 ? void 0 : error.message}`, error.stack);
828
+ throw new common_1.BadRequestException(error);
829
+ }
830
+ }
831
+ /**
832
+ * @description Get Issue comment and reaction details
833
+ * @param {ID} id - Issue ID
834
+ * @param {ID} projectId - Project ID
835
+ * @param {ID} employeeId Creator ID for returning actor details
836
+ * @param {ITask} originalTask Optional task to avoid multiple API calls
837
+ * @param {IOrganizationProject} originalProject Optional project to avoid multiple API calls
838
+ * @returns - A promise resolced afet got details
839
+ * @memberof IssuesService
840
+ */
841
+ async getIssueCommentDetails(id, projectId, employeeId, originalTask, originalProject) {
842
+ var _a, _b;
843
+ try {
844
+ let task = originalTask;
845
+ let project = originalProject;
846
+ // remote issue to find creator member if no task provided
847
+ if (!task) {
848
+ task = await this.getExternalIssue(id, undefined, false);
849
+ }
850
+ // Commented issue
851
+ const issue = (0, config_1.issueTransformer)(task);
852
+ // Find project if none is provided
853
+ if (!originalProject && projectId) {
854
+ project =
855
+ await this._projectService.getExternalProject(projectId);
856
+ }
857
+ // Workspace details
858
+ const organization = project === null || project === void 0 ? void 0 : project.organization;
859
+ const workspace = {
860
+ name: organization === null || organization === void 0 ? void 0 : organization.name,
861
+ id: organization === null || organization === void 0 ? void 0 : organization.id,
862
+ slug: organization === null || organization === void 0 ? void 0 : organization.id
863
+ };
864
+ // Find actor by userId
865
+ const actor = (_b = (_a = project === null || project === void 0 ? void 0 : project.members) === null || _a === void 0 ? void 0 : _a.find((member) => member.employeeId === employeeId)) === null || _b === void 0 ? void 0 : _b.employee;
866
+ return { issue, project, workspace, actor };
867
+ }
868
+ catch (error) {
869
+ this.logger.error('Failed to get issue comment details', error instanceof Error ? error.stack : String(error));
870
+ throw new common_1.BadRequestException(error);
871
+ }
872
+ }
873
+ /**
874
+ * @description Create Issue Link
875
+ * @param {ID} id - Issue ID for whom create link
876
+ * @param {ID} projectId - The project ID for returning project data
877
+ * @param {ICreateIssueLink} input - Body request data
878
+ * @returns A promise resolved to created and transformed link
879
+ * @memberof IssuesService
880
+ */
881
+ async createLink(id, projectId, input) {
882
+ try {
883
+ // Create link
884
+ const link = await this._issueLinkService.create(input, id);
885
+ const task = await this.getExternalIssue(id, [
886
+ 'tags',
887
+ 'members.user',
888
+ 'createdByUser',
889
+ 'project.members.employee.user.role',
890
+ 'organizationSprint'
891
+ ]);
892
+ // Link Details
893
+ const { actor, project } = await this.getIssueCommentDetails(id, projectId, link.employeeId, task, task.project);
894
+ // Transform Link
895
+ const transformedLink = (0, config_1.issueLinkTransformer)(link, actor, project);
896
+ return Array.isArray(transformedLink)
897
+ ? transformedLink[0]
898
+ : transformedLink;
899
+ }
900
+ catch (error) {
901
+ this.logger.error('Failed to create link', error instanceof Error ? error.stack : String(error));
902
+ throw new common_1.BadRequestException(error);
903
+ }
904
+ }
905
+ /**
906
+ * @description Update Issue Link
907
+ * @param {ID} id - Link ID to update update
908
+ * @param {ID} issueId - Issue ID for whom update link
909
+ * @param {ID} projectId - The project ID for returning project data
910
+ * @param {ICreateIssueLink} input - Body request data
911
+ * @returns A promise resolved to created and transformed link
912
+ * @memberof IssuesService
913
+ */
914
+ async updateLink(id, issueId, projectId, input) {
915
+ try {
916
+ // Update link
917
+ const link = await this._issueLinkService.update(id, issueId, '', input, plugin_integration_plane_models_1.BaseEntityEnum.Task);
918
+ // Link Details
919
+ const { actor, project } = await this.getIssueCommentDetails(issueId, projectId, link.employeeId);
920
+ // Transform Link
921
+ const transformedLink = (0, config_1.issueLinkTransformer)(link, actor, project);
922
+ return Array.isArray(transformedLink)
923
+ ? transformedLink[0]
924
+ : transformedLink;
925
+ }
926
+ catch (error) {
927
+ this.logger.error('Failed to update link', error instanceof Error ? error.stack : String(error));
928
+ throw new common_1.BadRequestException(error);
929
+ }
930
+ }
931
+ /**
932
+ * @description Find issue links with associated data
933
+ * @param {ID} id - Issue ID
934
+ * @param {ID} projectId - Project ID for returning data
935
+ * @returns A promise resolved to found and transformed links
936
+ * @memberof IssuesService
937
+ */
938
+ async findIssueLinks(id, projectId, issue) {
939
+ var _a, _b;
940
+ try {
941
+ const links = await this._issueLinkService.findAll(plugin_integration_plane_models_1.BaseEntityEnum.Task, id);
942
+ const issueLinks = await Promise.all((links !== null && links !== void 0 ? links : []).map(async (link) => {
943
+ const { actor, project } = await this.getIssueCommentDetails(id, projectId, link.employeeId, issue, issue.project);
944
+ const transformedLink = (0, config_1.issueLinkTransformer)(link, actor, project);
945
+ return Array.isArray(transformedLink)
946
+ ? transformedLink[0]
947
+ : transformedLink;
948
+ }));
949
+ return issueLinks;
950
+ }
951
+ catch (error) {
952
+ this.logger.error(`Failed to find issue links: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
953
+ throw new common_1.BadRequestException(error);
954
+ }
955
+ }
956
+ /**
957
+ * @description Find issues by view with view filters
958
+ * @param {ID} viewId - The view ID for whom to search issues
959
+ * @param {*} query - View filters
960
+ * @returns A promise resolved to found and tranformed issues
961
+ * @memberof IssuesService
962
+ */
963
+ async findViewIssues(viewId, query) {
964
+ var _a, _b, _c;
965
+ try {
966
+ const issues = (await this.apiFetch({
967
+ method: 'GET',
968
+ path: `${this.path}/view/${viewId}`,
969
+ query
970
+ })).data;
971
+ return (_a = issues.items) === null || _a === void 0 ? void 0 : _a.map((issue) => (0, config_1.issueTransformer)(issue));
972
+ }
973
+ catch (error) {
974
+ this.logger.error(`Failed to find view issues: ${((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.message) || error.message}`, error.stack);
975
+ throw new common_1.BadRequestException(error);
976
+ }
977
+ }
978
+ /**
979
+ * @description Delete Issue Link.
980
+ * @param {ID} id - Issue Link ID to delete
981
+ * @returns A promise resolved to deleted result
982
+ * @memberof IssuesService
983
+ */
984
+ async deleteLink(id) {
985
+ return await this._issueLinkService.delete(id);
986
+ }
987
+ /**
988
+ * Subscribes to a specific issue within a project and returns the subscription details.
989
+ *
990
+ * @param {ID} issueId - The ID of the issue to subscribe to.
991
+ * @param {ID} projectId - The ID of the project where the issue exists.
992
+ * @returns {Promise<ISubscriber | ISubscriber[]>} A promise that resolves to the transformed subscription data, either a single subscriber or a list of subscribers.
993
+ */
994
+ async subscribe(issueId, projectId) {
995
+ const subscription = await this._subscriptionService.create(issueId);
996
+ return (0, config_1.subscriptionTransformer)(subscription, projectId);
997
+ }
998
+ /**
999
+ * Unsubscribes the default user from a task subscription based on the provided issue ID.
1000
+ *
1001
+ * @param {ID} issueId - The unique identifier of the issue/task to unsubscribe from.
1002
+ * @returns {Promise<any>} A promise that resolves to the response of the unsubscribe operation.
1003
+ * @throws {BadRequestException} If the unsubscription fails or encounters an error.
1004
+ */
1005
+ async unsubscribe(issueId) {
1006
+ var _a;
1007
+ return await this._subscriptionService.unsubscribe({
1008
+ entity: plugin_integration_plane_models_1.BaseEntityEnum.Task,
1009
+ entityId: issueId,
1010
+ userId: (_a = (0, config_1.currentUserId)()) !== null && _a !== void 0 ? _a : undefined
1011
+ });
1012
+ }
1013
+ /**
1014
+ * Get issue meta
1015
+ * @param {ID} issueId - Issue ID
1016
+ * @returns {Promise<{ sequence_id: number; project_identifier: string }>} A promise that resolves to the issue meta
1017
+ * @throws {BadRequestException} If the issue is not found
1018
+ */
1019
+ async getIssueMeta(issueId) {
1020
+ try {
1021
+ const issue = await this.getExternalIssue(issueId, ['project']);
1022
+ if (!issue) {
1023
+ throw new common_1.BadRequestException('Issue not found');
1024
+ }
1025
+ return {
1026
+ sequence_id: issue.number,
1027
+ project_identifier: issue.project.code
1028
+ };
1029
+ }
1030
+ catch (error) {
1031
+ this.logger.error('Failed to get issue meta', error instanceof Error ? error.stack : String(error));
1032
+ throw new common_1.BadRequestException(error);
1033
+ }
1034
+ }
1035
+ };
1036
+ exports.IssuesService = IssuesService;
1037
+ exports.IssuesService = IssuesService = __decorate([
1038
+ (0, common_1.Injectable)(),
1039
+ __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => project_service_1.ProjectService))),
1040
+ __metadata("design:paramtypes", [project_service_1.ProjectService,
1041
+ states_service_1.StatesService,
1042
+ issue_labels_service_1.IssueLabelsService,
1043
+ comments_service_1.CommentsService,
1044
+ reactions_service_1.ReactionsService,
1045
+ issue_links_service_1.IssueLinksService,
1046
+ issue_relations_service_1.IssueRelationsService,
1047
+ activity_service_1.ActivityService,
1048
+ subscription_service_1.SubscriptionService,
1049
+ mention_service_1.MentionService,
1050
+ api_fetch_service_1.ApiFetchService])
1051
+ ], IssuesService);
1052
+ //# sourceMappingURL=issues.service.js.map