@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,1074 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getTaskQuery = exports.taskRelations = void 0;
7
+ exports.issueAssigneesIds = issueAssigneesIds;
8
+ exports.issueLabelsIds = issueLabelsIds;
9
+ exports.issueTransformer = issueTransformer;
10
+ exports.parentableIssuesTransformer = parentableIssuesTransformer;
11
+ exports.getGroupKeyForCriteria = getGroupKeyForCriteria;
12
+ exports.groupIssuesByManyToManyCriteria = groupIssuesByManyToManyCriteria;
13
+ exports.groupIssuesByStateId = groupIssuesByStateId;
14
+ exports.groupIssuesByStateGroup = groupIssuesByStateGroup;
15
+ exports.groupIssuesByPriority = groupIssuesByPriority;
16
+ exports.groupIssuesByProjectId = groupIssuesByProjectId;
17
+ exports.groupIssuesByCycleId = groupIssuesByCycleId;
18
+ exports.groupIssuesByCreatorId = groupIssuesByCreatorId;
19
+ exports.userWorkNonGroupedIssues = userWorkNonGroupedIssues;
20
+ exports.groupIssuesByLabel = groupIssuesByLabel;
21
+ exports.groupIssuesByAssignee = groupIssuesByAssignee;
22
+ exports.groupIssuesByModule = groupIssuesByModule;
23
+ exports.groupIssuesByTargetDate = groupIssuesByTargetDate;
24
+ exports.nonGroupedIssues = nonGroupedIssues;
25
+ exports.filterIssuesByPriorityNames = filterIssuesByPriorityNames;
26
+ exports.filterIssuesByActiveType = filterIssuesByActiveType;
27
+ exports.filterTasksByDateCriteria = filterTasksByDateCriteria;
28
+ exports.getFilteredByDatesTaskQuery = getFilteredByDatesTaskQuery;
29
+ exports.createIssueInputTransformer = createIssueInputTransformer;
30
+ exports.updateIssueInputTransformer = updateIssueInputTransformer;
31
+ exports.getTaskDistribution = getTaskDistribution;
32
+ exports.issuesByPriority = issuesByPriority;
33
+ exports.getTaskByIdentifierQuery = getTaskByIdentifierQuery;
34
+ const moment_1 = __importDefault(require("moment"));
35
+ const plugin_integration_plane_models_1 = require("@ever-gauzy/plugin-integration-plane-models");
36
+ const query_params_serializers_1 = require("../query-params.serializers");
37
+ const statuses_1 = require("./statuses");
38
+ const credentials_1 = require("../../credentials");
39
+ const issue_relations_1 = require("./issue-relations");
40
+ const utils_1 = require("../../utils");
41
+ /**
42
+ * Task default relations
43
+ */
44
+ exports.taskRelations = [
45
+ 'tags',
46
+ 'members.user',
47
+ 'createdByUser',
48
+ 'project.members.employee.user.role',
49
+ 'organizationSprint',
50
+ 'linkedIssues.taskTo',
51
+ 'linkedIssues.taskFrom',
52
+ 'parent',
53
+ 'children.taskStatus',
54
+ 'taskStatus',
55
+ 'modules'
56
+ ];
57
+ /**
58
+ * Extracts the IDs of the assignees from a given issue.
59
+ *
60
+ * @param {ITask} issue - The issue object from which to extract assignee IDs.
61
+ * The `issue` should have a `members` property containing an array of assignee objects.
62
+ * @returns {ID[]} An array of assignee IDs.
63
+ * If no assignees are found, the function returns `undefined` or an empty array.
64
+ */
65
+ function issueAssigneesIds(issue) {
66
+ const assignees = issue === null || issue === void 0 ? void 0 : issue.members;
67
+ return assignees === null || assignees === void 0 ? void 0 : assignees.map((member) => member.id);
68
+ }
69
+ /**
70
+ * Extracts the IDs of the labels (tags) from a given issue.
71
+ *
72
+ * @param {ITask} issue - The issue object from which to extract label IDs.
73
+ * The `issue` should have a `tags` property containing an array of label objects.
74
+ * @returns {ID[]} An array of label IDs.
75
+ * If no labels are found, the function returns `undefined` or an empty array.
76
+ */
77
+ function issueLabelsIds(issue) {
78
+ const labels = issue === null || issue === void 0 ? void 0 : issue.tags;
79
+ return labels === null || labels === void 0 ? void 0 : labels.map((tag) => tag.id);
80
+ }
81
+ /**
82
+ * Transforms an issue object to a standardized format.
83
+ *
84
+ * @param {ITask} issue - The issue object to be transformed.
85
+ * The `issue` should contain properties such as `id`, `title`, `status`, `priority`, `tags`, etc.
86
+ * @param {IReactionData[]} [reactions] - Optional array of reactions associated with the issue.
87
+ * @param {IIssueLink[]} [links] - Optional array of links associated with the issue.
88
+ * @returns {IIssue} The transformed issue object in a standardized format.
89
+ * The returned object includes properties like `id`, `name`, `state`, `priority`, `description_html`,
90
+ * `assignee_ids`, `label_ids`, `cycle_id`, and more.
91
+ * It also processes optional properties like reactions, links, and sub-issues, providing default values where necessary.
92
+ */
93
+ function issueTransformer(issue, reactions, links, is_subscribed) {
94
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
95
+ return {
96
+ id: issue === null || issue === void 0 ? void 0 : issue.id,
97
+ name: issue === null || issue === void 0 ? void 0 : issue.title,
98
+ state: issue === null || issue === void 0 ? void 0 : issue.status,
99
+ state_id: issue === null || issue === void 0 ? void 0 : issue.taskStatusId,
100
+ sort_order: 65535.0, // TODO : Research usecase and add to API
101
+ completed_at: issue === null || issue === void 0 ? void 0 : issue.resolvedAt,
102
+ estimate_point: undefined, // TODO : Research usecase and add to API
103
+ priority: (_a = issue === null || issue === void 0 ? void 0 : issue.priority) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase(),
104
+ start_date: issue === null || issue === void 0 ? void 0 : issue.startDate,
105
+ target_date: issue === null || issue === void 0 ? void 0 : issue.dueDate,
106
+ sequence_id: issue === null || issue === void 0 ? void 0 : issue.number,
107
+ project_id: issue === null || issue === void 0 ? void 0 : issue.projectId,
108
+ parent_id: issue === null || issue === void 0 ? void 0 : issue.parentId,
109
+ project__identifier: ((_b = issue === null || issue === void 0 ? void 0 : issue.project) === null || _b === void 0 ? void 0 : _b.code) ||
110
+ (issue === null || issue === void 0 ? void 0 : issue.prefix) ||
111
+ ((_d = (_c = issue === null || issue === void 0 ? void 0 : issue.project) === null || _c === void 0 ? void 0 : _c.name) === null || _d === void 0 ? void 0 : _d.slice(0, 5).toUpperCase()),
112
+ parent: {
113
+ id: (_e = issue === null || issue === void 0 ? void 0 : issue.parent) === null || _e === void 0 ? void 0 : _e.id,
114
+ project_id: (_f = issue === null || issue === void 0 ? void 0 : issue.parent) === null || _f === void 0 ? void 0 : _f.projectId,
115
+ type_id: (_g = issue === null || issue === void 0 ? void 0 : issue.parent) === null || _g === void 0 ? void 0 : _g.taskTypeId,
116
+ sequence_id: (_h = issue === null || issue === void 0 ? void 0 : issue.parent) === null || _h === void 0 ? void 0 : _h.number
117
+ },
118
+ created_at: issue === null || issue === void 0 ? void 0 : issue.createdAt,
119
+ updated_at: issue === null || issue === void 0 ? void 0 : issue.updatedAt,
120
+ created_by: issue === null || issue === void 0 ? void 0 : issue.createdByUserId,
121
+ updated_by: issue === null || issue === void 0 ? void 0 : issue.createdByUserId,
122
+ is_draft: issue === null || issue === void 0 ? void 0 : issue.isDraft,
123
+ is_subscribed,
124
+ archived_at: issue === null || issue === void 0 ? void 0 : issue.archivedAt,
125
+ state__group: (0, statuses_1.stateGroup)(issue === null || issue === void 0 ? void 0 : issue.taskStatus),
126
+ type_id: issue === null || issue === void 0 ? void 0 : issue.taskTypeId,
127
+ description_html: (_j = issue === null || issue === void 0 ? void 0 : issue.description) !== null && _j !== void 0 ? _j : '<p></p>',
128
+ cycle_id: issue === null || issue === void 0 ? void 0 : issue.organizationSprintId,
129
+ link_count: (links === null || links === void 0 ? void 0 : links.length) || 0,
130
+ attachment_count: 0, // TODO : Add to API,
131
+ sub_issues_count: (_k = issue === null || issue === void 0 ? void 0 : issue.children) === null || _k === void 0 ? void 0 : _k.length,
132
+ assignee_ids: issueAssigneesIds(issue),
133
+ label_ids: issueLabelsIds(issue),
134
+ module_ids: (_l = issue === null || issue === void 0 ? void 0 : issue.modules) === null || _l === void 0 ? void 0 : _l.map(({ id }) => id),
135
+ issue_reactions: reactions || [],
136
+ issue_relation: (0, issue_relations_1.issueRelationTransformer)(issue === null || issue === void 0 ? void 0 : issue.linkedIssues) || [],
137
+ issue_link: links || [],
138
+ cycle: issue === null || issue === void 0 ? void 0 : issue.organizationSprint,
139
+ workspace__slug: (_o = (_m = issue === null || issue === void 0 ? void 0 : issue.tenant) === null || _m === void 0 ? void 0 : _m.name) === null || _o === void 0 ? void 0 : _o.toLocaleLowerCase()
140
+ };
141
+ }
142
+ /**
143
+ * Transforms an array of issues into a format suitable for displaying parentable issues.
144
+ *
145
+ * @param {ITask[]} issues - An array of issue objects to be transformed.
146
+ * Each `issue` should contain properties such as `id`, `title`, `startDate`, `dueDate`, `taskStatus`, etc.
147
+ * @returns An array of transformed issue objects, each containing a subset of the original issue's properties.
148
+ * The returned objects include properties like `id`, `name`, `start_date`, `target_date`, `sequence_id`, and `project` details.
149
+ * Some properties, such as `project__identifier` and `state__color`, are extracted from related objects.
150
+ */
151
+ function parentableIssuesTransformer(issues) {
152
+ return issues === null || issues === void 0 ? void 0 : issues.map((issue) => {
153
+ var _a, _b;
154
+ return ({
155
+ id: issue.id,
156
+ name: issue.title,
157
+ start_date: issue.startDate,
158
+ target_date: issue.dueDate,
159
+ sequence_id: issue.number,
160
+ project__name: issue.project.name,
161
+ project__identifier: issue.project.code ||
162
+ issue.prefix ||
163
+ issue.project.name.slice(0, 4).toLocaleUpperCase(),
164
+ project_id: issue.projectId,
165
+ workspace__slug: (0, credentials_1.getCurrentOrganizationSlug)(),
166
+ state__name: (_a = issue.taskStatus) === null || _a === void 0 ? void 0 : _a.name,
167
+ state__group: (0, statuses_1.stateGroup)(issue.taskStatus),
168
+ state__color: (_b = issue.taskStatus) === null || _b === void 0 ? void 0 : _b.color,
169
+ type_id: issue.taskTypeId
170
+ });
171
+ });
172
+ }
173
+ function getGroupKeyForCriteria(issue, criteria, employees) {
174
+ var _a, _b, _c;
175
+ switch (criteria) {
176
+ case plugin_integration_plane_models_1.IssueGroupByEnum.ASSIGNEE_ID:
177
+ return (((_a = issue.members) === null || _a === void 0 ? void 0 : _a.map((member) => member.id)) || ['None']);
178
+ case plugin_integration_plane_models_1.IssueGroupByEnum.CREATED_BY:
179
+ const creator = employees === null || employees === void 0 ? void 0 : employees.find((emp) => emp.userId === issue.createdByUserId);
180
+ return creator ? creator.id : 'None';
181
+ case plugin_integration_plane_models_1.IssueGroupByEnum.CYCLE_ID:
182
+ return issue.organizationSprintId || 'None';
183
+ case plugin_integration_plane_models_1.IssueGroupByEnum.LABEL_ID:
184
+ return (((_b = issue.tags) === null || _b === void 0 ? void 0 : _b.map((tag) => tag.id)) || ['None']);
185
+ case plugin_integration_plane_models_1.IssueGroupByEnum.MODULE_ID:
186
+ return (((_c = issue.modules) === null || _c === void 0 ? void 0 : _c.map((module) => module.id)) || ['None']);
187
+ case plugin_integration_plane_models_1.IssueGroupByEnum.PRIORITY:
188
+ return issue.priority || 'none';
189
+ case plugin_integration_plane_models_1.IssueGroupByEnum.PROJECT_ID:
190
+ return issue.projectId || 'none';
191
+ case plugin_integration_plane_models_1.IssueGroupByEnum.STATE:
192
+ return issue.taskStatusId || 'none';
193
+ case plugin_integration_plane_models_1.IssueGroupByEnum.STATE_GROUP:
194
+ return issue.taskStatus ? (0, statuses_1.stateGroup)(issue.taskStatus) : 'none';
195
+ default:
196
+ return 'none';
197
+ }
198
+ }
199
+ /**
200
+ * Groups issues based on a specified key and transforms them into a grouped structure.
201
+ *
202
+ * This function processes a list of issues along with their associated links, groups them
203
+ * by a key derived from the provided `groupByKey` function, and transforms them into a
204
+ * structured output with metadata.
205
+ *
206
+ * @param {{ issue: ITask; issueLinks: any }[]} issuesWithLinks - Array of objects containing issues and their associated links.
207
+ * @param {(issue: ITask) string} groupByKey - Function to determine the grouping key for each issue.
208
+ * @param {string} groupedByLabel - Label describing the grouping criteria.
209
+ * @param {Partial<Record<string, any>>} [initialAccumulator={}] - Optional initial accumulator object to be merged with the default accumulator.
210
+ * @returns {Record<string, any>} An object containing grouped issues, metadata, and statistics.
211
+ */
212
+ function groupIssues(issuesWithLinks, groupByKey, groupedByLabel, subGroupByKey, subGroupByKeyLabel, initialAccumulator = {}) {
213
+ const addToGroup = (group, issue, issueLinks, subGroup) => {
214
+ const transformedIssue = issueTransformer(issue, [], issueLinks);
215
+ if (subGroup) {
216
+ // Initialize subgroup if not present
217
+ if (!group[subGroup]) {
218
+ group[subGroup] = { results: [], total_results: 0 };
219
+ }
220
+ group[subGroup].results.push(transformedIssue);
221
+ group[subGroup].total_results++;
222
+ }
223
+ else {
224
+ // Initialize group results if not present
225
+ if (!group.results) {
226
+ group.results = [];
227
+ group.total_results = 0;
228
+ }
229
+ group.results.push(transformedIssue);
230
+ group.total_results++;
231
+ }
232
+ };
233
+ return issuesWithLinks.reduce((acc, { issue, issueLinks }) => {
234
+ const group = groupByKey(issue) || 'none';
235
+ // Initialize the group if not present
236
+ if (!acc.results[group]) {
237
+ acc.results[group] = subGroupByKeyLabel
238
+ ? { results: {}, total_results: 0 }
239
+ : { results: [], total_results: 0 };
240
+ }
241
+ if (subGroupByKeyLabel) {
242
+ // Handle subgrouping
243
+ const subGroups = (subGroupByKey === null || subGroupByKey === void 0 ? void 0 : subGroupByKey(issue)) || ['none'];
244
+ const subGroupArray = Array.isArray(subGroups)
245
+ ? subGroups
246
+ : [subGroups]; // Normalize to an array
247
+ subGroupArray.forEach((subGroup) => {
248
+ addToGroup(acc.results[group].results, issue, issueLinks, subGroup);
249
+ });
250
+ }
251
+ else {
252
+ // Handle direct grouping without subgroups
253
+ addToGroup(acc.results[group], issue, issueLinks);
254
+ }
255
+ // Recalculate total_results for the group, considering subgroups if applicable
256
+ if (subGroupByKeyLabel) {
257
+ acc.results[group].total_results = Object.values(acc.results[group].results).reduce((total, subGroup) => total + ((subGroup === null || subGroup === void 0 ? void 0 : subGroup.total_results) || 0), 0);
258
+ }
259
+ // Update global counters
260
+ acc.total_results++;
261
+ acc.total_count++;
262
+ acc.count++;
263
+ return acc;
264
+ }, Object.assign({
265
+ // Initialize accumulator
266
+ grouped_by: groupedByLabel, sub_grouped_by: subGroupByKeyLabel || null, total_count: 0, next_cursor: null, prev_cursor: null, next_page_results: false, prev_page_results: false, count: 0, total_pages: 1, total_results: 0, extra_stats: null, results: {} }, initialAccumulator));
267
+ }
268
+ /**
269
+ * Groups issues by a specified many-to-many criteria (e.g., tags, members, or modules) and returns a result object with the grouped issues and statistics.
270
+ * If no values are found for the selected criteria, it groups the issues under a default value ('None').
271
+ *
272
+ * @param {Array<{ issue: ITask, issueLinks: any }>} issuesWithLinks - Array of issues with their associated links.
273
+ * @param {IssueManyToManyGroupCriteria} criteria - The criteria by which to group the issues (e.g., 'tags', 'members', 'modules').
274
+ * @returns {Record<string, any>} The result object containing grouped issues and related statistics like total results and pagination info.
275
+ */
276
+ function groupIssuesByManyToManyCriteria(issuesWithLinks, criteria, subGroupByKey, subGroupByKeyLabel) {
277
+ return issuesWithLinks.reduce((acc, { issue, issueLinks }) => {
278
+ var _a, _b, _c;
279
+ // Extract the values according to the chosed criteria
280
+ let groupItems;
281
+ switch (criteria) {
282
+ case 'tags':
283
+ groupItems = ((_a = issue.tags) === null || _a === void 0 ? void 0 : _a.length)
284
+ ? issue.tags
285
+ : [{ id: 'None', name: 'None', color: null }];
286
+ break;
287
+ case 'members':
288
+ groupItems = ((_b = issue.members) === null || _b === void 0 ? void 0 : _b.length)
289
+ ? issue.members
290
+ : [{ id: 'None', name: 'None', color: null }];
291
+ break;
292
+ case 'modules':
293
+ groupItems = ((_c = issue.modules) === null || _c === void 0 ? void 0 : _c.length)
294
+ ? issue.modules
295
+ : [{ id: 'None', name: 'None' }];
296
+ break;
297
+ default:
298
+ groupItems = [];
299
+ }
300
+ // Group according to each element of criteria
301
+ groupItems.forEach((item) => {
302
+ // Initialize the group if not exist
303
+ if (!acc.results[item.id]) {
304
+ acc.results[item.id] = subGroupByKeyLabel
305
+ ? { results: {}, total_results: 0 }
306
+ : { results: [], total_results: 0 };
307
+ }
308
+ // Transform the issue with its links
309
+ const transformedIssue = issueTransformer(issue, [], issueLinks);
310
+ if (subGroupByKeyLabel) {
311
+ // Handle subgroups
312
+ const subGroups = (subGroupByKey === null || subGroupByKey === void 0 ? void 0 : subGroupByKey(issue)) || ['none'];
313
+ const subGroupArray = Array.isArray(subGroups)
314
+ ? subGroups
315
+ : [subGroups]; // Normalize to an array
316
+ subGroupArray.forEach((subGroup) => {
317
+ // Initialize subgroup if not present
318
+ if (!acc.results[item.id].results[subGroup]) {
319
+ acc.results[item.id].results[subGroup] = {
320
+ results: [],
321
+ total_results: 0
322
+ };
323
+ }
324
+ // Add the transformed issue to the subgroup
325
+ acc.results[item.id].results[subGroup].results.push(transformedIssue);
326
+ acc.results[item.id].results[subGroup].total_results++;
327
+ });
328
+ // Update total_results for the main group
329
+ acc.results[item.id].total_results = Object.values(acc.results[item.id].results).reduce((total, subGroup) => total + ((subGroup === null || subGroup === void 0 ? void 0 : subGroup.total_results) || 0), 0);
330
+ }
331
+ else {
332
+ // Add the transformed issue directly to the group
333
+ acc.results[item.id].results.push(transformedIssue);
334
+ acc.results[item.id].total_results++;
335
+ }
336
+ });
337
+ // Increment global counters
338
+ acc.total_results++;
339
+ acc.total_count++;
340
+ acc.count++;
341
+ return acc;
342
+ }, {
343
+ grouped_by: criteria === 'tags'
344
+ ? 'labels__id'
345
+ : criteria === 'members'
346
+ ? 'assignee__id'
347
+ : 'issue_module__module_id',
348
+ sub_grouped_by: subGroupByKeyLabel || null,
349
+ total_count: 0,
350
+ next_cursor: null,
351
+ prev_cursor: null,
352
+ next_page_results: false,
353
+ prev_page_results: false,
354
+ count: 0,
355
+ total_pages: 1,
356
+ total_results: 0,
357
+ extra_stats: null,
358
+ results: {}
359
+ });
360
+ }
361
+ /**
362
+ * @description - Group issues by state ID for Kanban and list Layouts
363
+ * @param {Array<{ issue: ITask, issueLinks: any }>} issuesWithLinks - Tasks to be transformed and grouped
364
+ * @returns Tranformed and grouped by state Issues
365
+ */
366
+ function groupIssuesByStateId(issuesWithLinks, subGroupby, employees) {
367
+ return groupIssues(issuesWithLinks, (issue) => issue.taskStatusId, // Define the group by state ID
368
+ 'state_id', (issue) => getGroupKeyForCriteria(issue, subGroupby, employees), subGroupby);
369
+ }
370
+ /**
371
+ * Groups issues by their state group and returns a result object with the grouped issues and related statistics.
372
+ * The state group is determined by the task status of each issue.
373
+ *
374
+ * @param {Array<{ issue: ITask, issueLinks: any }>} issuesWithLinks - Array of issues with their associated links.
375
+ * @returns {Record<string, any>} The result object containing grouped issues and statistics like total results and pagination info.
376
+ */
377
+ function groupIssuesByStateGroup(issuesWithLinks, subGroupby, employees) {
378
+ return groupIssues(issuesWithLinks, (issue) => (0, statuses_1.stateGroup)(issue.taskStatus), // Define the group by state
379
+ 'state__group', (issue) => getGroupKeyForCriteria(issue, subGroupby, employees), subGroupby, { total_count: 5, next_cursor: '30:1:0', prev_cursor: '30:-1:1' } // Specific values for initial accumulator.
380
+ );
381
+ }
382
+ /**
383
+ * Groups issues by their state group and applies an initial accumulator with specific values.
384
+ *
385
+ * This function utilizes `groupIssues` to categorize issues based on their state group,
386
+ * determined by the `stateGroup` function applied to the `taskStatus` property of each issue.
387
+ *
388
+ * @param {{ issue: ITask; issueLinks: any }[]} issuesWithLinks - Array of objects containing issues and their associated links.
389
+ * @returns {Record<string, any>} An object containing grouped issues by state group, metadata, and statistics.
390
+ */
391
+ function groupIssuesByPriority(issuesWithLinks, subGroupby, employees) {
392
+ return groupIssues(issuesWithLinks, (issue) => issue.priority || 'none', // Define the group by priority
393
+ 'priority', (issue) => getGroupKeyForCriteria(issue, subGroupby, employees), subGroupby);
394
+ }
395
+ /**
396
+ * Groups issues by their associated project ID.
397
+ *
398
+ * This function uses `groupIssues` to organize issues based on their `projectId`.
399
+ * If an issue does not have a `projectId`, it is grouped under the key `'none'`.
400
+ *
401
+ * @param {{ issue: ITask; issueLinks: any }[]} issuesWithLinks - Array of objects containing issues and their associated links.
402
+ * @returns {Record<string, any>} An object containing grouped issues by project ID, metadata, and statistics.
403
+ */
404
+ function groupIssuesByProjectId(issuesWithLinks, subGroupby, employees) {
405
+ return groupIssues(issuesWithLinks, (issue) => issue.projectId || 'none', // Define the group by project Id
406
+ 'project_id', (issue) => getGroupKeyForCriteria(issue, subGroupby, employees), subGroupby);
407
+ }
408
+ /**
409
+ * Groups issues by their associated sprint (cycle) ID.
410
+ *
411
+ * This function uses `groupIssues` to organize issues based on their `organizationSprintId`.
412
+ * If an issue does not have an `organizationSprintId`, it is grouped under the key `'None'`.
413
+ *
414
+ * @param {{ issue: ITask; issueLinks: any }[]} issuesWithLinks - Array of objects containing issues and their associated links.
415
+ * @returns {Record<string, any>} An object containing grouped issues by sprint (cycle) ID, metadata, and statistics.
416
+ */
417
+ function groupIssuesByCycleId(issuesWithLinks, subGroupby, employees) {
418
+ return groupIssues(issuesWithLinks, (issue) => issue.organizationSprintId || 'None', // Define the group by sprint Id
419
+ 'cycle_id', (issue) => getGroupKeyForCriteria(issue, subGroupby, employees), subGroupby);
420
+ }
421
+ /**
422
+ * Groups issues by their creator's user ID. If no matching member is found, issues are grouped under 'None'.
423
+ * The creator is determined by matching the `creatorId` with the `userId` of the members in the issue.
424
+ *
425
+ * @param {Array<{ issue: ITask, issueLinks: any }>} issuesWithLinks - Array of issues with their associated links.
426
+ * @returns {Record<string, any>} The result object containing grouped issues by creator's user ID.
427
+ */
428
+ function groupIssuesByCreatorId(issuesWithLinks, subGroupby, employees) {
429
+ return groupIssues(issuesWithLinks, (issue) => {
430
+ const member = employees.find((member) => member.userId === issue.createdByUserId);
431
+ return (member === null || member === void 0 ? void 0 : member.id) || 'None';
432
+ }, 'created_by', (issue) => getGroupKeyForCriteria(issue, subGroupby, employees), subGroupby);
433
+ }
434
+ /**
435
+ * Returns a flat list of issues without any grouping, including their transformed data and metadata.
436
+ *
437
+ * This function provides a response structure where issues are not grouped but transformed
438
+ * for presentation or processing. It includes metadata about the total count, pagination, and more.
439
+ *
440
+ * @param {{ issue: ITask; issueLinks: any }[]} issuesWithLinks - Array of objects containing issues and their associated links.
441
+ * @returns {Record<string, any>} An object containing ungrouped issues, metadata, and statistics.
442
+ */
443
+ function userWorkNonGroupedIssues(issuesWithLinks) {
444
+ return {
445
+ grouped_by: null,
446
+ sub_grouped_by: null,
447
+ total_count: issuesWithLinks === null || issuesWithLinks === void 0 ? void 0 : issuesWithLinks.length,
448
+ next_cursor: null,
449
+ prev_cursor: null,
450
+ next_page_results: false,
451
+ prev_page_results: false,
452
+ count: issuesWithLinks === null || issuesWithLinks === void 0 ? void 0 : issuesWithLinks.length,
453
+ total_pages: 1,
454
+ total_results: issuesWithLinks === null || issuesWithLinks === void 0 ? void 0 : issuesWithLinks.length,
455
+ extra_stats: null,
456
+ results: issuesWithLinks === null || issuesWithLinks === void 0 ? void 0 : issuesWithLinks.map((issueLink) => issueTransformer(issueLink.issue, [], issueLink.issueLinks))
457
+ };
458
+ }
459
+ /**
460
+ * Groups issues by their labels and transforms the issues accordingly.
461
+ *
462
+ * @param {Array<{ issue: ITask, issueLinks: any }>} issuesWithLinks - Array of issues with associated links.
463
+ * Each item contains an issue and the related issue links.
464
+ * @returns The grouped issues by label.
465
+ */
466
+ function groupIssuesByLabel(issuesWithLinks, subGroupby, employees) {
467
+ return groupIssuesByManyToManyCriteria(issuesWithLinks, 'tags', (issue) => getGroupKeyForCriteria(issue, subGroupby, employees), subGroupby);
468
+ }
469
+ /**
470
+ * Groups issues by assignee (member) and returns a result object with the grouped issues and related stats.
471
+ * If an issue has no assignees, it is grouped under a default member with the ID 'None'.
472
+ *
473
+ * @param {Array<{ issue: ITask, issueLinks: any }>} issuesWithLinks - Array of issues with their associated links.
474
+ * @returns {Record<string, any>} Grouped issues by assignee with statistics like total results and pagination info.
475
+ */
476
+ function groupIssuesByAssignee(issuesWithLinks, subGroupby, employees) {
477
+ return groupIssuesByManyToManyCriteria(issuesWithLinks, 'members', (issue) => getGroupKeyForCriteria(issue, subGroupby, employees), subGroupby);
478
+ }
479
+ /**
480
+ * Groups a list of issues by their modules and returns an object containing the grouped issues and other related stats.
481
+ * If an issue does not have any modules, it will be grouped under a default module with the ID 'None'.
482
+ *
483
+ * @param {Array<{ issue: ITask, issueLinks: any }>} issuesWithLinks - An array of objects where each object contains an issue (`ITask`) and its associated links.
484
+ * @returns {Record<string, any>} The result object with grouped issues by module, along with other statistics like total results, page information, and more.
485
+ */
486
+ function groupIssuesByModule(issuesWithLinks, subGroupby, employees) {
487
+ return groupIssuesByManyToManyCriteria(issuesWithLinks, 'modules', (issue) => getGroupKeyForCriteria(issue, subGroupby, employees), subGroupby);
488
+ }
489
+ /**
490
+ * @description - Group Issue by Target Date for Calendar Layout display
491
+ * @param {ITask[]} issues - Tasks to be transformed and grouped
492
+ * @returns Tranformed and grouped by target date Issues
493
+ */
494
+ function groupIssuesByTargetDate(issues) {
495
+ return issues.reduce((acc, item) => {
496
+ var _a;
497
+ const targetDate = (_a = item.dueDate) === null || _a === void 0 ? void 0 : _a.toString().split('T')[0];
498
+ if (!acc.results[targetDate]) {
499
+ acc.results[targetDate] = {
500
+ results: [],
501
+ total_results: 0
502
+ };
503
+ }
504
+ const issue = issueTransformer(item);
505
+ acc.results[targetDate].results.push(issue);
506
+ acc.results[targetDate].total_results++;
507
+ acc.total_results++;
508
+ return acc;
509
+ }, {
510
+ grouped_by: 'target_date',
511
+ sub_grouped_by: null,
512
+ total_count: issues.length,
513
+ next_cursor: '30:1:0',
514
+ prev_cursor: '30:-1:1',
515
+ next_page_results: false,
516
+ prev_page_results: false,
517
+ count: issues.length,
518
+ total_pages: 1,
519
+ total_results: issues.length,
520
+ extra_stats: null,
521
+ results: {}
522
+ });
523
+ }
524
+ /**
525
+ * @description - Transform issues for spreadsheet (Table) Layout view
526
+ * @param {ITask[]} issues - Tasks to be transformed
527
+ * @returns Tranformed by target date Issues
528
+ */
529
+ function nonGroupedIssues(issues) {
530
+ return {
531
+ grouped_by: null,
532
+ sub_grouped_by: null,
533
+ total_count: issues === null || issues === void 0 ? void 0 : issues.length,
534
+ next_cursor: '30:1:0',
535
+ prev_cursor: '30:-1:1',
536
+ next_page_results: false,
537
+ prev_page_results: false,
538
+ count: issues === null || issues === void 0 ? void 0 : issues.length,
539
+ total_pages: 1,
540
+ total_results: issues === null || issues === void 0 ? void 0 : issues.length,
541
+ extra_stats: null,
542
+ results: issues === null || issues === void 0 ? void 0 : issues.map((issue) => issueTransformer(issue))
543
+ };
544
+ }
545
+ /**
546
+ * Normalizes filter structure from {"and": [...]} format to a flat object
547
+ * @param filters - Filter object that may contain an "and" array structure
548
+ * @returns Normalized flat filter object
549
+ */
550
+ function normalizeFilters(filters) {
551
+ if (!filters || typeof filters !== 'object') {
552
+ return {};
553
+ }
554
+ // If filters has an "and" array, merge all conditions into a flat object
555
+ if (Array.isArray(filters.and)) {
556
+ const normalizedFilters = {};
557
+ // Temporary storage for date values that need to be merged
558
+ const startDateValues = [];
559
+ const targetDateValues = [];
560
+ filters.and.forEach((condition) => {
561
+ if (condition && typeof condition === 'object') {
562
+ Object.keys(condition).forEach((key) => {
563
+ const value = condition[key];
564
+ // Special handling for date filters - collect all values
565
+ if (key === 'start_date__exact' ||
566
+ key === 'start_date__range') {
567
+ const dates = typeof value === 'string' && value.includes(',')
568
+ ? value.split(',')
569
+ : [value];
570
+ startDateValues.push(...dates);
571
+ return;
572
+ }
573
+ if (key === 'target_date__exact' ||
574
+ key === 'target_date__range') {
575
+ const dates = typeof value === 'string' && value.includes(',')
576
+ ? value.split(',')
577
+ : [value];
578
+ targetDateValues.push(...dates);
579
+ return;
580
+ }
581
+ // If key already exists, merge values
582
+ if (normalizedFilters[key]) {
583
+ // Convert existing value to array if it's not already
584
+ const existingValues = Array.isArray(normalizedFilters[key])
585
+ ? normalizedFilters[key]
586
+ : [normalizedFilters[key]];
587
+ // Handle new value - split if it's a comma-separated string
588
+ const newValues = typeof value === 'string' && value.includes(',')
589
+ ? value.split(',')
590
+ : [value];
591
+ // Merge and deduplicate
592
+ const mergedConditions = [
593
+ ...existingValues,
594
+ ...newValues
595
+ ];
596
+ normalizedFilters[key] =
597
+ mergedConditions.length === 1
598
+ ? mergedConditions[0]
599
+ : mergedConditions.join(',');
600
+ }
601
+ else {
602
+ // First occurrence - keep as is (string with commas or single value)
603
+ normalizedFilters[key] = value;
604
+ }
605
+ });
606
+ }
607
+ });
608
+ // Merge all start date values into a single key (deduplicate)
609
+ if (startDateValues.length > 0) {
610
+ const uniqueStartDates = [...new Set(startDateValues)];
611
+ normalizedFilters.start_date__exact =
612
+ uniqueStartDates.length === 1
613
+ ? uniqueStartDates[0]
614
+ : uniqueStartDates.join(',');
615
+ normalizedFilters.start_date__range =
616
+ uniqueStartDates.length === 1
617
+ ? uniqueStartDates[0]
618
+ : uniqueStartDates.join(',');
619
+ }
620
+ // Merge all target date values into a single key (deduplicate)
621
+ if (targetDateValues.length > 0) {
622
+ const uniqueTargetDates = [...new Set(targetDateValues)];
623
+ normalizedFilters.target_date__exact =
624
+ uniqueTargetDates.length === 1
625
+ ? uniqueTargetDates[0]
626
+ : uniqueTargetDates.join(',');
627
+ normalizedFilters.target_date__range =
628
+ uniqueTargetDates.length === 1
629
+ ? uniqueTargetDates[0]
630
+ : uniqueTargetDates.join(',');
631
+ }
632
+ return normalizedFilters;
633
+ }
634
+ // If filters is already a flat object, return as is
635
+ return filters;
636
+ }
637
+ /**
638
+ * Builds a query object for fetching tasks based on various filters and options.
639
+ *
640
+ * @param projectId - The ID of the project to filter tasks by.
641
+ * @param options - An object containing filter options such as assignees, state, labels, etc.
642
+ * @param relations - Optional array of related entities to include in the response.
643
+ * @param orderByField - Optional field used to order the results.
644
+ * @param isDraft - Optional flag to include only draft tasks.
645
+ * @returns A query object formatted for the backend to retrieve filtered task data.
646
+ */
647
+ const getTaskQuery = (projectId, options, relations, orderByField, isDraft) => {
648
+ // Base queries
649
+ const query = Object.assign({}, (0, query_params_serializers_1.baseGetItemsWhereQuery)());
650
+ // Parse filters if it's a string (JSON encoded in URL)
651
+ if ((options === null || options === void 0 ? void 0 : options.filters) && typeof options.filters === 'string') {
652
+ try {
653
+ options.filters = JSON.parse(options.filters);
654
+ }
655
+ catch (error) {
656
+ // If parsing fails, set filters to empty object
657
+ options.filters = {};
658
+ }
659
+ }
660
+ // Normalize filters structure (handle {"and": [...]} format)
661
+ if (options === null || options === void 0 ? void 0 : options.filters) {
662
+ options.filters = normalizeFilters(options.filters);
663
+ }
664
+ const { assignees, created_by, creatorId, cycle, issues, labels, module, projectId: project_id, state, filters = {} } = options || {};
665
+ if (projectId || project_id) {
666
+ query['where[projectId]'] = projectId;
667
+ }
668
+ if (issues) {
669
+ if (issues.includes(',')) {
670
+ const tasks = (0, utils_1.issueFilterSplitter)(issues);
671
+ tasks.forEach((taskId, i) => {
672
+ query[`filters[id][${i}]`] = taskId;
673
+ });
674
+ }
675
+ else {
676
+ query[`where[id]`] = issues;
677
+ }
678
+ }
679
+ if (assignees || filters.assignee_id__in) {
680
+ const assigneesValue = assignees || filters.assignee_id__in;
681
+ if (assigneesValue && assigneesValue.includes(',')) {
682
+ const members = (0, utils_1.issueFilterSplitter)(assigneesValue);
683
+ members.forEach((memberId, i) => {
684
+ query[`filters[members][${i}]`] = memberId;
685
+ });
686
+ }
687
+ else {
688
+ query[`where[members][id]`] = assigneesValue;
689
+ }
690
+ }
691
+ if (created_by || filters.created_by__in) {
692
+ const createdByValue = created_by || filters.created_by__in;
693
+ if (createdByValue && createdByValue.includes(',')) {
694
+ const creators = (0, utils_1.issueFilterSplitter)(createdByValue);
695
+ creators.forEach((creator, i) => {
696
+ query[`filters[createdByUserIds][${i}]`] = creator;
697
+ });
698
+ }
699
+ else {
700
+ query['where[createdByUserId]'] = createdByValue;
701
+ }
702
+ }
703
+ if (module || filters.module_id__in) {
704
+ const moduleValue = module || filters.module_id__in;
705
+ if (moduleValue && moduleValue.includes(',')) {
706
+ const modules = (0, utils_1.issueFilterSplitter)(moduleValue);
707
+ modules.forEach((mod, i) => {
708
+ query[`filters[modules][${i}]`] = mod;
709
+ });
710
+ }
711
+ else {
712
+ query['join[alias]'] = 'task';
713
+ query['where[modules][0]'] = moduleValue;
714
+ }
715
+ }
716
+ if (cycle || filters.cycle_id__in) {
717
+ const cycleValue = cycle || filters.cycle_id__in;
718
+ if (cycleValue && !cycleValue.includes(',')) {
719
+ query['where[organizationSprintId]'] = cycleValue;
720
+ }
721
+ else {
722
+ const sprints = (0, utils_1.issueFilterSplitter)(cycleValue);
723
+ sprints.forEach((sprint, i) => {
724
+ query[`filters[sprints][${i}]`] = sprint;
725
+ });
726
+ }
727
+ }
728
+ if (labels || filters.label_id__in) {
729
+ const tags = (0, utils_1.issueFilterSplitter)(labels || filters.label_id__in);
730
+ tags.forEach((tag, i) => {
731
+ query[`filters[tags][${i}]`] = tag;
732
+ });
733
+ }
734
+ if (state || filters.state_id__in) {
735
+ const stateValue = state || filters.state_id__in;
736
+ if (stateValue && stateValue.includes(',')) {
737
+ const statusIds = (0, utils_1.issueFilterSplitter)(stateValue);
738
+ statusIds.forEach((statusId, i) => {
739
+ query[`filters[statusIds][${i}]`] = statusId;
740
+ });
741
+ }
742
+ else {
743
+ query['where[taskStatusId]'] = stateValue;
744
+ }
745
+ }
746
+ if (creatorId) {
747
+ query['where[createdByUserId]'] = options.creatorId;
748
+ }
749
+ // Handle priority__in filter
750
+ if (filters.priority__in) {
751
+ const priorities = (0, utils_1.issueFilterSplitter)(filters.priority__in);
752
+ priorities.forEach((priority, i) => {
753
+ query[`filters[priorities][${i}]`] = priority;
754
+ });
755
+ }
756
+ // Handle state_group__in filter
757
+ if (filters.state_group__in) {
758
+ const stateGroups = (0, utils_1.issueFilterSplitter)(filters.state_group__in);
759
+ stateGroups.forEach((stateGroup, i) => {
760
+ query[`filters[statuses][${i}]`] = stateGroup;
761
+ });
762
+ }
763
+ // Handle mention_id__in filter
764
+ if (filters.mention_id__in) {
765
+ const mentions = (0, utils_1.issueFilterSplitter)(filters.mention_id__in);
766
+ mentions.forEach((mention, i) => {
767
+ query[`filters[mentionIds][${i}]`] = mention;
768
+ });
769
+ }
770
+ // Handle date filters - merge all start_date values into one array
771
+ const allStartDates = [];
772
+ if (filters.start_date__exact) {
773
+ allStartDates.push(...(0, utils_1.issueFilterSplitter)(filters.start_date__exact));
774
+ }
775
+ if (filters.start_date__range) {
776
+ allStartDates.push(...(0, utils_1.issueFilterSplitter)(filters.start_date__range));
777
+ }
778
+ if (allStartDates.length > 0) {
779
+ allStartDates.forEach((date, i) => {
780
+ query[`filters[startDates][${i}]`] = new Date(date);
781
+ });
782
+ }
783
+ // Handle date filters - merge all target_date values into one array
784
+ const allTargetDates = [];
785
+ if (filters.target_date__exact) {
786
+ allTargetDates.push(...(0, utils_1.issueFilterSplitter)(filters.target_date__exact));
787
+ }
788
+ if (filters.target_date__range) {
789
+ allTargetDates.push(...(0, utils_1.issueFilterSplitter)(filters.target_date__range));
790
+ }
791
+ if (allTargetDates.length > 0) {
792
+ allTargetDates.forEach((date, i) => {
793
+ query[`filters[dueDates][${i}]`] = new Date(date);
794
+ });
795
+ }
796
+ if (typeof isDraft !== 'undefined') {
797
+ query['where[isDraft]'] = isDraft;
798
+ }
799
+ // Add relations
800
+ if (relations) {
801
+ relations.forEach((relation, i) => {
802
+ query[`relations[${i}]`] = relation;
803
+ });
804
+ }
805
+ else {
806
+ exports.taskRelations.forEach((relation, i) => {
807
+ query[`relations[${i}]`] = relation;
808
+ });
809
+ }
810
+ if (orderByField) {
811
+ const orderField = (0, utils_1.orderByFieldTransformer)(orderByField);
812
+ const orderDirection = (0, utils_1.orderByDirection)(orderByField);
813
+ if (orderField.length > 0) {
814
+ query['order'] = { [orderField]: orderDirection };
815
+ }
816
+ }
817
+ return query;
818
+ };
819
+ exports.getTaskQuery = getTaskQuery;
820
+ /**
821
+ * Filters a list of tasks to include only those with specified priority names.
822
+ *
823
+ * @param {ITask[]} tasks - The list of tasks to filter.
824
+ * @param {string[]} priorities - The priority names to include in the result.
825
+ * @returns {ITask[]} A filtered array of tasks matching the specified priorities.
826
+ */
827
+ function filterIssuesByPriorityNames(tasks, priorities) {
828
+ return tasks.filter((task) => {
829
+ var _a;
830
+ const taskPriority = (_a = task.priority) !== null && _a !== void 0 ? _a : 'none';
831
+ return priorities.includes(taskPriority);
832
+ });
833
+ }
834
+ /**
835
+ * Filters tasks based on the specified issue type.
836
+ *
837
+ * @param {ITask[]} tasks - The list of tasks to filter.
838
+ * @param {IssueFindByTypeEnum} type - The issue type to filter by (e.g., BACKLOG, ACTIVE).
839
+ * @returns {ITask[]} The filtered list of tasks matching the issue type.
840
+ */
841
+ function filterIssuesByActiveType(tasks, type) {
842
+ const statusFilters = {
843
+ [plugin_integration_plane_models_1.IssueFindByTypeEnum.BACKLOG]: [
844
+ plugin_integration_plane_models_1.TaskStatusEnum.BACKLOG.toLocaleLowerCase()
845
+ ],
846
+ [plugin_integration_plane_models_1.IssueFindByTypeEnum.ACTIVE]: [
847
+ (0, utils_1.deslugify)(plugin_integration_plane_models_1.TaskStatusEnum.IN_PROGRESS).toLocaleLowerCase(),
848
+ (0, utils_1.deslugify)(plugin_integration_plane_models_1.TaskStatusEnum.READY_FOR_REVIEW).toLocaleLowerCase(),
849
+ (0, utils_1.deslugify)(plugin_integration_plane_models_1.TaskStatusEnum.IN_REVIEW).toLocaleLowerCase(),
850
+ (0, utils_1.deslugify)(plugin_integration_plane_models_1.TaskStatusEnum.BLOCKED).toLocaleLowerCase(),
851
+ (0, utils_1.deslugify)(plugin_integration_plane_models_1.TaskStatusEnum.OPEN).toLocaleLowerCase()
852
+ ]
853
+ };
854
+ const activeStatuses = statusFilters[type];
855
+ return tasks.filter((task) => { var _a, _b; return activeStatuses.includes((_b = (_a = task === null || task === void 0 ? void 0 : task.status) === null || _a === void 0 ? void 0 : _a.toLocaleLowerCase()) !== null && _b !== void 0 ? _b : ''); });
856
+ }
857
+ /**
858
+ * Filters tasks based on specified date criteria.
859
+ *
860
+ * @param tasks - The list of tasks to filter.
861
+ * @param criteria - A string representing the filter criteria, e.g.,
862
+ * "2_weeks;after;fromnow,2025-01-14;after,2025-01-24;before".
863
+ * The criteria can include relative dates (`fromnow`) and absolute date ranges (`after` and `before`).
864
+ * @returns - A list of tasks matching the criteria.
865
+ */
866
+ function filterTasksByDateCriteria(tasks, dateField, criteria) {
867
+ // Split the criteria string into individual filters
868
+ const filters = criteria.split(',');
869
+ // Array to store filtering conditions
870
+ const conditions = [];
871
+ filters.forEach((filter) => {
872
+ // Split the filter into its components
873
+ const parts = filter.split(';');
874
+ let amount, unit, condition;
875
+ if (parts.length === 3) {
876
+ // Case where we have a relative filter (e.g., "2_weeks;after;fromnow")
877
+ [amount, unit, condition] = parts;
878
+ }
879
+ else if (parts.length === 2) {
880
+ // Case where we have a specific date filter (e.g., "2025-01-14;after")
881
+ [amount, condition] = parts;
882
+ }
883
+ else {
884
+ // Invalid filter format (you can throw an error or handle this case)
885
+ return;
886
+ }
887
+ // Handling the different conditions
888
+ if (condition === 'fromnow') {
889
+ // Handles relative dates (e.g., "2_weeks;after;fromnow")
890
+ const date = (0, moment_1.default)()
891
+ .add(parseInt(amount, 10), unit)
892
+ .startOf('day'); // Ensuring the date comparison is from the start of the day
893
+ if (unit && amount) {
894
+ // Add a condition to include tasks starting on or after the calculated date
895
+ conditions.push((task) => (0, moment_1.default)(task[dateField]).isSameOrAfter(date));
896
+ }
897
+ }
898
+ else if (condition === 'after') {
899
+ // Handles tasks starting after a specific date (e.g., "2025-01-14;after")
900
+ const date = (0, moment_1.default)(amount).startOf('day'); // Start of the day for accurate comparison
901
+ conditions.push((task) => (0, moment_1.default)(task[dateField]).isAfter(date));
902
+ }
903
+ else if (condition === 'before') {
904
+ // Handles tasks starting before a specific date (e.g., "2025-01-24;before")
905
+ const date = (0, moment_1.default)(amount).startOf('day'); // Start of the day for accurate comparison
906
+ conditions.push((task) => (0, moment_1.default)(task[dateField]).isBefore(date));
907
+ }
908
+ });
909
+ // Filter tasks based on the combined conditions
910
+ return tasks.filter((task) =>
911
+ // A task is included if it satisfies at least one condition
912
+ conditions.some((condition) => condition(task)));
913
+ }
914
+ function getFilteredByDatesTaskQuery(options) {
915
+ // Base queries
916
+ const query = {
917
+ organizationId: (0, credentials_1.getCurrentOrganizationSlug)(),
918
+ tenantId: (0, credentials_1.currentTenantId)()
919
+ };
920
+ Object.keys(options).forEach((key) => {
921
+ const value = options[key];
922
+ if (value !== undefined && value !== null) {
923
+ query[`${key}`] = value;
924
+ }
925
+ });
926
+ if (!options.relations) {
927
+ exports.taskRelations.forEach((relation, i) => {
928
+ query[`relations[${i}]`] = relation;
929
+ });
930
+ }
931
+ return query;
932
+ }
933
+ function createIssueInputTransformer(issue, status) {
934
+ var _a, _b, _c, _d;
935
+ const tags = (issue === null || issue === void 0 ? void 0 : issue.label_ids)
936
+ ? (_a = issue === null || issue === void 0 ? void 0 : issue.label_ids) === null || _a === void 0 ? void 0 : _a.map((id) => ({ id }))
937
+ : [];
938
+ const members = (issue === null || issue === void 0 ? void 0 : issue.assignee_ids)
939
+ ? (_b = issue === null || issue === void 0 ? void 0 : issue.assignee_ids) === null || _b === void 0 ? void 0 : _b.map((id) => ({ id }))
940
+ : [];
941
+ // Extract employee IDs mentioned in the issue description
942
+ const mentionedEmployeeIds = (0, utils_1.extractEmployeeMentionIds)(issue === null || issue === void 0 ? void 0 : issue.description_html);
943
+ return Object.assign(Object.assign({ title: issue === null || issue === void 0 ? void 0 : issue.name, description: issue === null || issue === void 0 ? void 0 : issue.description_html, startDate: issue === null || issue === void 0 ? void 0 : issue.start_date, dueDate: issue === null || issue === void 0 ? void 0 : issue.target_date, projectId: issue === null || issue === void 0 ? void 0 : issue.project_id, isDraft: (issue === null || issue === void 0 ? void 0 : issue.is_draft) || false, status,
944
+ tags,
945
+ members, organizationSprintId: issue === null || issue === void 0 ? void 0 : issue.cycle_id, parentId: issue === null || issue === void 0 ? void 0 : issue.parent_id, taskStatusId: ((_c = issue === null || issue === void 0 ? void 0 : issue.state_id) === null || _c === void 0 ? void 0 : _c.length) > 0 ? issue === null || issue === void 0 ? void 0 : issue.state_id : undefined, tenantId: (0, credentials_1.currentTenantId)(), organizationId: (0, credentials_1.getCurrentOrganizationSlug)() }, (issue.priority !== 'none' && {
946
+ priority: issue.priority
947
+ })), { modules: ((_d = issue === null || issue === void 0 ? void 0 : issue.module_ids) === null || _d === void 0 ? void 0 : _d.map((id) => ({ id }))) || [], mentionEmployeeIds: mentionedEmployeeIds !== null && mentionedEmployeeIds !== void 0 ? mentionedEmployeeIds : [] });
948
+ }
949
+ function updateIssueInputTransformer(issue, status, members, tags, modulesIds, modules) {
950
+ var _a, _b;
951
+ // Mapping between IIssueUpdateInput and ITaskUpdateInput
952
+ const keyMapping = {
953
+ name: 'title',
954
+ description_html: 'description',
955
+ priority: 'priority',
956
+ start_date: 'startDate',
957
+ target_date: 'dueDate',
958
+ project_id: 'projectId',
959
+ is_draft: 'isDraft',
960
+ cycle_id: 'organizationSprintId',
961
+ parent_id: 'parentId',
962
+ state_id: 'taskStatusId',
963
+ module_ids: 'modules',
964
+ type_id: 'taskTypeId'
965
+ };
966
+ // TODO : Include mention here
967
+ // Include only user provided flelds in the final request
968
+ const transformedInput = Object.entries(keyMapping).reduce((acc, [issueKey, taskKey]) => {
969
+ var _a;
970
+ if (issueKey in issue) {
971
+ const value = issue[issueKey];
972
+ acc[taskKey] = value;
973
+ }
974
+ if ('state_id' in issue) {
975
+ acc['status'] = status;
976
+ acc['resolvedAt'] =
977
+ status.toLowerCase() === plugin_integration_plane_models_1.TaskStatusEnum.COMPLETED ||
978
+ status.toLowerCase() === plugin_integration_plane_models_1.TaskStatusEnum.DONE
979
+ ? new Date()
980
+ : undefined;
981
+ }
982
+ acc['organizationId'] = (0, credentials_1.getCurrentOrganizationSlug)();
983
+ if (issue.module_ids || issue.modules) {
984
+ acc['modules'] = (_a = modules === null || modules === void 0 ? void 0 : modules.filter((module) => modulesIds.includes(module.id))) === null || _a === void 0 ? void 0 : _a.map((module) => ({ id: module.id, name: module.name }));
985
+ }
986
+ return acc;
987
+ }, {});
988
+ // Add tags only if label_ids is defined
989
+ if (issue.label_ids) {
990
+ transformedInput.tags = (_a = tags === null || tags === void 0 ? void 0 : tags.filter((tag) => issue.label_ids.includes(tag.id))) === null || _a === void 0 ? void 0 : _a.map((tag) => ({ id: tag.id, name: tag.name, color: tag.color }));
991
+ }
992
+ // Add members only if assignee_ids is defined
993
+ if (issue.assignee_ids) {
994
+ transformedInput.members = (_b = members === null || members === void 0 ? void 0 : members.filter((member) => issue.assignee_ids.includes(member.id))) === null || _b === void 0 ? void 0 : _b.map((employee) => ({
995
+ id: employee.id,
996
+ fullName: employee.fullName,
997
+ userId: employee.userId
998
+ }));
999
+ }
1000
+ return transformedInput;
1001
+ }
1002
+ function getTaskDistribution(tasks) {
1003
+ const stateDistribution = {
1004
+ completed: [],
1005
+ started: [],
1006
+ unstarted: [],
1007
+ backlog: []
1008
+ };
1009
+ const statusMap = {
1010
+ [plugin_integration_plane_models_1.TaskStatusEnum.DONE.toLocaleLowerCase()]: 'completed',
1011
+ [plugin_integration_plane_models_1.TaskStatusEnum.COMPLETED.toLocaleLowerCase()]: 'completed',
1012
+ [plugin_integration_plane_models_1.TaskStatusEnum.IN_PROGRESS.toLocaleLowerCase()]: 'started',
1013
+ [plugin_integration_plane_models_1.TaskStatusEnum.READY_FOR_REVIEW.toLocaleLowerCase()]: 'started',
1014
+ [plugin_integration_plane_models_1.TaskStatusEnum.IN_REVIEW.toLocaleLowerCase()]: 'started',
1015
+ [plugin_integration_plane_models_1.TaskStatusEnum.BLOCKED.toLocaleLowerCase()]: 'started',
1016
+ [plugin_integration_plane_models_1.TaskStatusEnum.OPEN.toLocaleLowerCase()]: 'unstarted',
1017
+ [plugin_integration_plane_models_1.TaskStatusEnum.BACKLOG.toLocaleLowerCase()]: 'backlog'
1018
+ };
1019
+ tasks.forEach((task) => {
1020
+ const status = task.status ? (0, utils_1.sluggify)(task.status) : '';
1021
+ const category = statusMap[status];
1022
+ if (category) {
1023
+ stateDistribution[category].push(task.id);
1024
+ }
1025
+ if (task.taskStatus.isTodo) {
1026
+ stateDistribution['unstarted'].push(task.id);
1027
+ }
1028
+ if (task.taskStatus.isInProgress) {
1029
+ stateDistribution['started'].push(task.id);
1030
+ }
1031
+ if (task.taskStatus.isDone) {
1032
+ stateDistribution['completed'].push(task.id);
1033
+ }
1034
+ });
1035
+ return stateDistribution;
1036
+ }
1037
+ /**
1038
+ * Categorizes tasks by their priority and returns the count for each priority level.
1039
+ *
1040
+ * This function filters the list of tasks based on their priority and returns the count
1041
+ * of tasks for each priority level (urgent, high, medium, low, and none).
1042
+ *
1043
+ * @param {ITask[]} tasks - The array of tasks to be categorized by priority.
1044
+ * @returns {Array<{ priority: string; count: number }>} An array of objects containing the priority and the count of tasks with that priority.
1045
+ */
1046
+ function issuesByPriority(tasks) {
1047
+ var _a;
1048
+ // Mapping of priorities to their corresponding filters
1049
+ const priorityMapping = {
1050
+ urgent: plugin_integration_plane_models_1.TaskPriorityEnum.URGENT,
1051
+ high: plugin_integration_plane_models_1.TaskPriorityEnum.HIGH,
1052
+ medium: plugin_integration_plane_models_1.TaskPriorityEnum.MEDIUM,
1053
+ low: plugin_integration_plane_models_1.TaskPriorityEnum.LOW,
1054
+ none: null // Tasks without a priority
1055
+ };
1056
+ // Count tasks for each priority
1057
+ return (_a = Object.entries(priorityMapping)) === null || _a === void 0 ? void 0 : _a.map(([priority, value]) => ({
1058
+ priority,
1059
+ count: tasks.filter((task) => task.priority === value || (value === null && !task.priority)).length
1060
+ }));
1061
+ }
1062
+ /**
1063
+ * Get query with identifier for a task
1064
+ */
1065
+ function getTaskByIdentifierQuery(identifier, relations) {
1066
+ const query = Object.assign({}, (0, query_params_serializers_1.baseGetItemsWhereQuery)());
1067
+ query['where[number]'] = identifier.split('-')[1];
1068
+ query['where[project][code]'] = identifier.split('-')[0];
1069
+ relations === null || relations === void 0 ? void 0 : relations.forEach((relation, i) => {
1070
+ query[`relations[${i}]`] = relation;
1071
+ });
1072
+ return query;
1073
+ }
1074
+ //# sourceMappingURL=tasks.serializer.js.map