@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.
- package/README.md +1 -0
- package/dist/config/constants.d.ts +125 -0
- package/dist/config/constants.js +185 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/credentials.d.ts +30 -0
- package/dist/config/credentials.js +50 -0
- package/dist/config/credentials.js.map +1 -0
- package/dist/config/decorators/index.d.ts +1 -0
- package/dist/config/decorators/index.js +18 -0
- package/dist/config/decorators/index.js.map +1 -0
- package/dist/config/decorators/transformers/index.d.ts +1 -0
- package/dist/config/decorators/transformers/index.js +18 -0
- package/dist/config/decorators/transformers/index.js.map +1 -0
- package/dist/config/decorators/transformers/priority.transformer.d.ts +1 -0
- package/dist/config/decorators/transformers/priority.transformer.js +12 -0
- package/dist/config/decorators/transformers/priority.transformer.js.map +1 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/index.js +24 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/serializers/activity/activity.serializer.d.ts +28 -0
- package/dist/config/serializers/activity/activity.serializer.js +288 -0
- package/dist/config/serializers/activity/activity.serializer.js.map +1 -0
- package/dist/config/serializers/activity/assignees-activities.serializer.d.ts +18 -0
- package/dist/config/serializers/activity/assignees-activities.serializer.js +64 -0
- package/dist/config/serializers/activity/assignees-activities.serializer.js.map +1 -0
- package/dist/config/serializers/activity/index.d.ts +7 -0
- package/dist/config/serializers/activity/index.js +24 -0
- package/dist/config/serializers/activity/index.js.map +1 -0
- package/dist/config/serializers/activity/labels-activities.serializer.d.ts +11 -0
- package/dist/config/serializers/activity/labels-activities.serializer.js +30 -0
- package/dist/config/serializers/activity/labels-activities.serializer.js.map +1 -0
- package/dist/config/serializers/activity/many-to-many-field-activity.helper.d.ts +29 -0
- package/dist/config/serializers/activity/many-to-many-field-activity.helper.js +45 -0
- package/dist/config/serializers/activity/many-to-many-field-activity.helper.js.map +1 -0
- package/dist/config/serializers/activity/modules-activities.serializer.d.ts +11 -0
- package/dist/config/serializers/activity/modules-activities.serializer.js +30 -0
- package/dist/config/serializers/activity/modules-activities.serializer.js.map +1 -0
- package/dist/config/serializers/activity/parent-activities.serializer.d.ts +14 -0
- package/dist/config/serializers/activity/parent-activities.serializer.js +47 -0
- package/dist/config/serializers/activity/parent-activities.serializer.js.map +1 -0
- package/dist/config/serializers/activity/status-activities.serializer.d.ts +12 -0
- package/dist/config/serializers/activity/status-activities.serializer.js +30 -0
- package/dist/config/serializers/activity/status-activities.serializer.js.map +1 -0
- package/dist/config/serializers/analytics/analytics.serializer.d.ts +17 -0
- package/dist/config/serializers/analytics/analytics.serializer.js +395 -0
- package/dist/config/serializers/analytics/analytics.serializer.js.map +1 -0
- package/dist/config/serializers/analytics/index.d.ts +1 -0
- package/dist/config/serializers/analytics/index.js +18 -0
- package/dist/config/serializers/analytics/index.js.map +1 -0
- package/dist/config/serializers/auth/auth.serializer.d.ts +2 -0
- package/dist/config/serializers/auth/auth.serializer.js +11 -0
- package/dist/config/serializers/auth/auth.serializer.js.map +1 -0
- package/dist/config/serializers/auth/index.d.ts +1 -0
- package/dist/config/serializers/auth/index.js +18 -0
- package/dist/config/serializers/auth/index.js.map +1 -0
- package/dist/config/serializers/comments/comment.serializer.d.ts +25 -0
- package/dist/config/serializers/comments/comment.serializer.js +94 -0
- package/dist/config/serializers/comments/comment.serializer.js.map +1 -0
- package/dist/config/serializers/comments/index.d.ts +1 -0
- package/dist/config/serializers/comments/index.js +18 -0
- package/dist/config/serializers/comments/index.js.map +1 -0
- package/dist/config/serializers/cycles/cycle.serializer.d.ts +86 -0
- package/dist/config/serializers/cycles/cycle.serializer.js +480 -0
- package/dist/config/serializers/cycles/cycle.serializer.js.map +1 -0
- package/dist/config/serializers/cycles/index.d.ts +1 -0
- package/dist/config/serializers/cycles/index.js +18 -0
- package/dist/config/serializers/cycles/index.js.map +1 -0
- package/dist/config/serializers/dashboard/dashboard.serializer.d.ts +22 -0
- package/dist/config/serializers/dashboard/dashboard.serializer.js +66 -0
- package/dist/config/serializers/dashboard/dashboard.serializer.js.map +1 -0
- package/dist/config/serializers/dashboard/index.d.ts +1 -0
- package/dist/config/serializers/dashboard/index.js +18 -0
- package/dist/config/serializers/dashboard/index.js.map +1 -0
- package/dist/config/serializers/employee-properties/employee-properties.serializer.d.ts +9 -0
- package/dist/config/serializers/employee-properties/employee-properties.serializer.js +57 -0
- package/dist/config/serializers/employee-properties/employee-properties.serializer.js.map +1 -0
- package/dist/config/serializers/employee-properties/index.d.ts +1 -0
- package/dist/config/serializers/employee-properties/index.js +18 -0
- package/dist/config/serializers/employee-properties/index.js.map +1 -0
- package/dist/config/serializers/index.d.ts +24 -0
- package/dist/config/serializers/index.js +41 -0
- package/dist/config/serializers/index.js.map +1 -0
- package/dist/config/serializers/invitation/index.d.ts +1 -0
- package/dist/config/serializers/invitation/index.js +18 -0
- package/dist/config/serializers/invitation/index.js.map +1 -0
- package/dist/config/serializers/invitation/invitation.serializer.d.ts +52 -0
- package/dist/config/serializers/invitation/invitation.serializer.js +140 -0
- package/dist/config/serializers/invitation/invitation.serializer.js.map +1 -0
- package/dist/config/serializers/issue-link/index.d.ts +1 -0
- package/dist/config/serializers/issue-link/index.js +18 -0
- package/dist/config/serializers/issue-link/index.js.map +1 -0
- package/dist/config/serializers/issue-link/issue-link.serializer.d.ts +28 -0
- package/dist/config/serializers/issue-link/issue-link.serializer.js +89 -0
- package/dist/config/serializers/issue-link/issue-link.serializer.js.map +1 -0
- package/dist/config/serializers/mention/index.d.ts +1 -0
- package/dist/config/serializers/mention/index.js +18 -0
- package/dist/config/serializers/mention/index.js.map +1 -0
- package/dist/config/serializers/mention/mention.serializer.d.ts +2 -0
- package/dist/config/serializers/mention/mention.serializer.js +22 -0
- package/dist/config/serializers/mention/mention.serializer.js.map +1 -0
- package/dist/config/serializers/modules/index.d.ts +1 -0
- package/dist/config/serializers/modules/index.js +18 -0
- package/dist/config/serializers/modules/index.js.map +1 -0
- package/dist/config/serializers/modules/module.serializer.d.ts +49 -0
- package/dist/config/serializers/modules/module.serializer.js +215 -0
- package/dist/config/serializers/modules/module.serializer.js.map +1 -0
- package/dist/config/serializers/notification/index.d.ts +1 -0
- package/dist/config/serializers/notification/index.js +18 -0
- package/dist/config/serializers/notification/index.js.map +1 -0
- package/dist/config/serializers/notification/notification.serializer.d.ts +31 -0
- package/dist/config/serializers/notification/notification.serializer.js +135 -0
- package/dist/config/serializers/notification/notification.serializer.js.map +1 -0
- package/dist/config/serializers/pages/index.d.ts +1 -0
- package/dist/config/serializers/pages/index.js +18 -0
- package/dist/config/serializers/pages/index.js.map +1 -0
- package/dist/config/serializers/pages/page.serializer.d.ts +23 -0
- package/dist/config/serializers/pages/page.serializer.js +106 -0
- package/dist/config/serializers/pages/page.serializer.js.map +1 -0
- package/dist/config/serializers/project-deploy-boards/index.d.ts +2 -0
- package/dist/config/serializers/project-deploy-boards/index.js +19 -0
- package/dist/config/serializers/project-deploy-boards/index.js.map +1 -0
- package/dist/config/serializers/project-deploy-boards/project-deploy-boards.helper.d.ts +16 -0
- package/dist/config/serializers/project-deploy-boards/project-deploy-boards.helper.js +169 -0
- package/dist/config/serializers/project-deploy-boards/project-deploy-boards.helper.js.map +1 -0
- package/dist/config/serializers/project-deploy-boards/project-deploy-boards.serializer.d.ts +14 -0
- package/dist/config/serializers/project-deploy-boards/project-deploy-boards.serializer.js +35 -0
- package/dist/config/serializers/project-deploy-boards/project-deploy-boards.serializer.js.map +1 -0
- package/dist/config/serializers/projects/index.d.ts +1 -0
- package/dist/config/serializers/projects/index.js +18 -0
- package/dist/config/serializers/projects/index.js.map +1 -0
- package/dist/config/serializers/projects/projects.serializer.d.ts +42 -0
- package/dist/config/serializers/projects/projects.serializer.js +216 -0
- package/dist/config/serializers/projects/projects.serializer.js.map +1 -0
- package/dist/config/serializers/query-params.serializers.d.ts +4 -0
- package/dist/config/serializers/query-params.serializers.js +10 -0
- package/dist/config/serializers/query-params.serializers.js.map +1 -0
- package/dist/config/serializers/reactions/index.d.ts +1 -0
- package/dist/config/serializers/reactions/index.js +18 -0
- package/dist/config/serializers/reactions/index.js.map +1 -0
- package/dist/config/serializers/reactions/reaction.serializer.d.ts +4 -0
- package/dist/config/serializers/reactions/reaction.serializer.js +62 -0
- package/dist/config/serializers/reactions/reaction.serializer.js.map +1 -0
- package/dist/config/serializers/recent-visits/index.d.ts +1 -0
- package/dist/config/serializers/recent-visits/index.js +18 -0
- package/dist/config/serializers/recent-visits/index.js.map +1 -0
- package/dist/config/serializers/recent-visits/recent-visits.serializer.d.ts +32 -0
- package/dist/config/serializers/recent-visits/recent-visits.serializer.js +109 -0
- package/dist/config/serializers/recent-visits/recent-visits.serializer.js.map +1 -0
- package/dist/config/serializers/subscription/index.d.ts +1 -0
- package/dist/config/serializers/subscription/index.js +18 -0
- package/dist/config/serializers/subscription/index.js.map +1 -0
- package/dist/config/serializers/subscription/subscription.serializer.d.ts +23 -0
- package/dist/config/serializers/subscription/subscription.serializer.js +68 -0
- package/dist/config/serializers/subscription/subscription.serializer.js.map +1 -0
- package/dist/config/serializers/tasks/index.d.ts +5 -0
- package/dist/config/serializers/tasks/index.js +22 -0
- package/dist/config/serializers/tasks/index.js.map +1 -0
- package/dist/config/serializers/tasks/intake-issue/index.d.ts +1 -0
- package/dist/config/serializers/tasks/intake-issue/index.js +18 -0
- package/dist/config/serializers/tasks/intake-issue/index.js.map +1 -0
- package/dist/config/serializers/tasks/intake-issue/intake-issue.serializer.d.ts +35 -0
- package/dist/config/serializers/tasks/intake-issue/intake-issue.serializer.js +123 -0
- package/dist/config/serializers/tasks/intake-issue/intake-issue.serializer.js.map +1 -0
- package/dist/config/serializers/tasks/issue-labels/index.d.ts +1 -0
- package/dist/config/serializers/tasks/issue-labels/index.js +18 -0
- package/dist/config/serializers/tasks/issue-labels/index.js.map +1 -0
- package/dist/config/serializers/tasks/issue-labels/issue-labels.serializer.d.ts +6 -0
- package/dist/config/serializers/tasks/issue-labels/issue-labels.serializer.js +31 -0
- package/dist/config/serializers/tasks/issue-labels/issue-labels.serializer.js.map +1 -0
- package/dist/config/serializers/tasks/issue-relations/index.d.ts +1 -0
- package/dist/config/serializers/tasks/issue-relations/index.js +18 -0
- package/dist/config/serializers/tasks/issue-relations/index.js.map +1 -0
- package/dist/config/serializers/tasks/issue-relations/issue-relations.serializer.d.ts +8 -0
- package/dist/config/serializers/tasks/issue-relations/issue-relations.serializer.js +94 -0
- package/dist/config/serializers/tasks/issue-relations/issue-relations.serializer.js.map +1 -0
- package/dist/config/serializers/tasks/statuses/index.d.ts +1 -0
- package/dist/config/serializers/tasks/statuses/index.js +18 -0
- package/dist/config/serializers/tasks/statuses/index.js.map +1 -0
- package/dist/config/serializers/tasks/statuses/statuses.serializer.d.ts +12 -0
- package/dist/config/serializers/tasks/statuses/statuses.serializer.js +100 -0
- package/dist/config/serializers/tasks/statuses/statuses.serializer.js.map +1 -0
- package/dist/config/serializers/tasks/tasks.serializer.d.ts +285 -0
- package/dist/config/serializers/tasks/tasks.serializer.js +1074 -0
- package/dist/config/serializers/tasks/tasks.serializer.js.map +1 -0
- package/dist/config/serializers/user/actor-details.helper.d.ts +10 -0
- package/dist/config/serializers/user/actor-details.helper.js +16 -0
- package/dist/config/serializers/user/actor-details.helper.js.map +1 -0
- package/dist/config/serializers/user/index.d.ts +2 -0
- package/dist/config/serializers/user/index.js +19 -0
- package/dist/config/serializers/user/index.js.map +1 -0
- package/dist/config/serializers/user/user.serializer.d.ts +140 -0
- package/dist/config/serializers/user/user.serializer.js +192 -0
- package/dist/config/serializers/user/user.serializer.js.map +1 -0
- package/dist/config/serializers/user-favorites/index.d.ts +1 -0
- package/dist/config/serializers/user-favorites/index.js +18 -0
- package/dist/config/serializers/user-favorites/index.js.map +1 -0
- package/dist/config/serializers/user-favorites/user-favorite.serializer.d.ts +6 -0
- package/dist/config/serializers/user-favorites/user-favorite.serializer.js +61 -0
- package/dist/config/serializers/user-favorites/user-favorite.serializer.js.map +1 -0
- package/dist/config/serializers/views/date-range.helper.d.ts +1 -0
- package/dist/config/serializers/views/date-range.helper.js +85 -0
- package/dist/config/serializers/views/date-range.helper.js.map +1 -0
- package/dist/config/serializers/views/index.d.ts +3 -0
- package/dist/config/serializers/views/index.js +20 -0
- package/dist/config/serializers/views/index.js.map +1 -0
- package/dist/config/serializers/views/view-id-from-referer.helper.d.ts +14 -0
- package/dist/config/serializers/views/view-id-from-referer.helper.js +27 -0
- package/dist/config/serializers/views/view-id-from-referer.helper.js.map +1 -0
- package/dist/config/serializers/views/view.serializer.d.ts +47 -0
- package/dist/config/serializers/views/view.serializer.js +187 -0
- package/dist/config/serializers/views/view.serializer.js.map +1 -0
- package/dist/config/serializers/workspace-organization/index.d.ts +2 -0
- package/dist/config/serializers/workspace-organization/index.js +19 -0
- package/dist/config/serializers/workspace-organization/index.js.map +1 -0
- package/dist/config/serializers/workspace-organization/organization.serializer.d.ts +92 -0
- package/dist/config/serializers/workspace-organization/organization.serializer.js +270 -0
- package/dist/config/serializers/workspace-organization/organization.serializer.js.map +1 -0
- package/dist/config/serializers/workspace-organization/widgets-filter.helper.d.ts +4 -0
- package/dist/config/serializers/workspace-organization/widgets-filter.helper.js +14 -0
- package/dist/config/serializers/workspace-organization/widgets-filter.helper.js.map +1 -0
- package/dist/config/time-zones.d.ts +8 -0
- package/dist/config/time-zones.js +722 -0
- package/dist/config/time-zones.js.map +1 -0
- package/dist/config/utils/index.d.ts +1 -0
- package/dist/config/utils/index.js +18 -0
- package/dist/config/utils/index.js.map +1 -0
- package/dist/config/utils/shared.utils.d.ts +95 -0
- package/dist/config/utils/shared.utils.js +256 -0
- package/dist/config/utils/shared.utils.js.map +1 -0
- package/dist/config/validators/custom-length.decorator.d.ts +28 -0
- package/dist/config/validators/custom-length.decorator.js +65 -0
- package/dist/config/validators/custom-length.decorator.js.map +1 -0
- package/dist/config/validators/index.d.ts +1 -0
- package/dist/config/validators/index.js +18 -0
- package/dist/config/validators/index.js.map +1 -0
- package/dist/dev.d.ts +1 -0
- package/dist/dev.js +10 -0
- package/dist/dev.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +50 -0
- package/dist/main.js.map +1 -0
- package/dist/modules/activity/activity.module.d.ts +2 -0
- package/dist/modules/activity/activity.module.js +22 -0
- package/dist/modules/activity/activity.module.js.map +1 -0
- package/dist/modules/activity/activity.service.d.ts +12 -0
- package/dist/modules/activity/activity.service.js +45 -0
- package/dist/modules/activity/activity.service.js.map +1 -0
- package/dist/modules/advance-analytics/advance-analytics.controller.d.ts +30 -0
- package/dist/modules/advance-analytics/advance-analytics.controller.js +128 -0
- package/dist/modules/advance-analytics/advance-analytics.controller.js.map +1 -0
- package/dist/modules/advance-analytics/advance-analytics.module.d.ts +15 -0
- package/dist/modules/advance-analytics/advance-analytics.module.js +56 -0
- package/dist/modules/advance-analytics/advance-analytics.module.js.map +1 -0
- package/dist/modules/advance-analytics/advance-analytics.service.d.ts +29 -0
- package/dist/modules/advance-analytics/advance-analytics.service.js +143 -0
- package/dist/modules/advance-analytics/advance-analytics.service.js.map +1 -0
- package/dist/modules/advance-analytics/dto/advance-analytics-query.dto.d.ts +26 -0
- package/dist/modules/advance-analytics/dto/advance-analytics-query.dto.js +93 -0
- package/dist/modules/advance-analytics/dto/advance-analytics-query.dto.js.map +1 -0
- package/dist/modules/advance-analytics/dto/index.d.ts +1 -0
- package/dist/modules/advance-analytics/dto/index.js +18 -0
- package/dist/modules/advance-analytics/dto/index.js.map +1 -0
- package/dist/modules/advance-analytics/index.d.ts +4 -0
- package/dist/modules/advance-analytics/index.js +21 -0
- package/dist/modules/advance-analytics/index.js.map +1 -0
- package/dist/modules/api-fetch/api-fetch.module.d.ts +2 -0
- package/dist/modules/api-fetch/api-fetch.module.js +24 -0
- package/dist/modules/api-fetch/api-fetch.module.js.map +1 -0
- package/dist/modules/api-fetch/api-fetch.service.d.ts +31 -0
- package/dist/modules/api-fetch/api-fetch.service.js +96 -0
- package/dist/modules/api-fetch/api-fetch.service.js.map +1 -0
- package/dist/modules/api-fetch/token.helper.d.ts +22 -0
- package/dist/modules/api-fetch/token.helper.js +58 -0
- package/dist/modules/api-fetch/token.helper.js.map +1 -0
- package/dist/modules/api-fetch/token.middleware.d.ts +8 -0
- package/dist/modules/api-fetch/token.middleware.js +38 -0
- package/dist/modules/api-fetch/token.middleware.js.map +1 -0
- package/dist/modules/app.module.d.ts +7 -0
- package/dist/modules/app.module.js +49 -0
- package/dist/modules/app.module.js.map +1 -0
- package/dist/modules/auth/auth.controller.d.ts +32 -0
- package/dist/modules/auth/auth.controller.js +278 -0
- package/dist/modules/auth/auth.controller.js.map +1 -0
- package/dist/modules/auth/auth.guard.d.ts +9 -0
- package/dist/modules/auth/auth.guard.js +52 -0
- package/dist/modules/auth/auth.guard.js.map +1 -0
- package/dist/modules/auth/auth.module.d.ts +2 -0
- package/dist/modules/auth/auth.module.js +30 -0
- package/dist/modules/auth/auth.module.js.map +1 -0
- package/dist/modules/auth/auth.service.d.ts +133 -0
- package/dist/modules/auth/auth.service.js +362 -0
- package/dist/modules/auth/auth.service.js.map +1 -0
- package/dist/modules/auth/dto/index.d.ts +1 -0
- package/dist/modules/auth/dto/index.js +18 -0
- package/dist/modules/auth/dto/index.js.map +1 -0
- package/dist/modules/auth/dto/two-factor-dto.d.ts +15 -0
- package/dist/modules/auth/dto/two-factor-dto.js +18 -0
- package/dist/modules/auth/dto/two-factor-dto.js.map +1 -0
- package/dist/modules/comments/comments.controller.d.ts +24 -0
- package/dist/modules/comments/comments.controller.js +72 -0
- package/dist/modules/comments/comments.controller.js.map +1 -0
- package/dist/modules/comments/comments.module.d.ts +2 -0
- package/dist/modules/comments/comments.module.js +26 -0
- package/dist/modules/comments/comments.module.js.map +1 -0
- package/dist/modules/comments/comments.service.d.ts +92 -0
- package/dist/modules/comments/comments.service.js +235 -0
- package/dist/modules/comments/comments.service.js.map +1 -0
- package/dist/modules/cycles/cycles.controller.d.ts +106 -0
- package/dist/modules/cycles/cycles.controller.js +270 -0
- package/dist/modules/cycles/cycles.controller.js.map +1 -0
- package/dist/modules/cycles/cycles.module.d.ts +2 -0
- package/dist/modules/cycles/cycles.module.js +31 -0
- package/dist/modules/cycles/cycles.module.js.map +1 -0
- package/dist/modules/cycles/cycles.service.d.ts +169 -0
- package/dist/modules/cycles/cycles.service.js +477 -0
- package/dist/modules/cycles/cycles.service.js.map +1 -0
- package/dist/modules/cycles/dto/create-cycle.dto.d.ts +6 -0
- package/dist/modules/cycles/dto/create-cycle.dto.js +9 -0
- package/dist/modules/cycles/dto/create-cycle.dto.js.map +1 -0
- package/dist/modules/cycles/dto/cycle.dto.d.ts +18 -0
- package/dist/modules/cycles/dto/cycle.dto.js +112 -0
- package/dist/modules/cycles/dto/cycle.dto.js.map +1 -0
- package/dist/modules/cycles/dto/index.d.ts +3 -0
- package/dist/modules/cycles/dto/index.js +20 -0
- package/dist/modules/cycles/dto/index.js.map +1 -0
- package/dist/modules/cycles/dto/update-cycle.dto.d.ts +6 -0
- package/dist/modules/cycles/dto/update-cycle.dto.js +9 -0
- package/dist/modules/cycles/dto/update-cycle.dto.js.map +1 -0
- package/dist/modules/dashboard/dashboard.controller.d.ts +16 -0
- package/dist/modules/dashboard/dashboard.controller.js +59 -0
- package/dist/modules/dashboard/dashboard.controller.js.map +1 -0
- package/dist/modules/dashboard/dashboard.module.d.ts +2 -0
- package/dist/modules/dashboard/dashboard.module.js +30 -0
- package/dist/modules/dashboard/dashboard.module.js.map +1 -0
- package/dist/modules/dashboard/dashboard.service.d.ts +33 -0
- package/dist/modules/dashboard/dashboard.service.js +97 -0
- package/dist/modules/dashboard/dashboard.service.js.map +1 -0
- package/dist/modules/dashboard/widget.service.d.ts +22 -0
- package/dist/modules/dashboard/widget.service.js +68 -0
- package/dist/modules/dashboard/widget.service.js.map +1 -0
- package/dist/modules/employee-properties/employee-properties.module.d.ts +2 -0
- package/dist/modules/employee-properties/employee-properties.module.js +21 -0
- package/dist/modules/employee-properties/employee-properties.module.js.map +1 -0
- package/dist/modules/employee-properties/employee-properties.service.d.ts +30 -0
- package/dist/modules/employee-properties/employee-properties.service.js +95 -0
- package/dist/modules/employee-properties/employee-properties.service.js.map +1 -0
- package/dist/modules/file-assets/file-assets.controller.d.ts +120 -0
- package/dist/modules/file-assets/file-assets.controller.js +192 -0
- package/dist/modules/file-assets/file-assets.controller.js.map +1 -0
- package/dist/modules/file-assets/file-assets.module.d.ts +2 -0
- package/dist/modules/file-assets/file-assets.module.js +23 -0
- package/dist/modules/file-assets/file-assets.module.js.map +1 -0
- package/dist/modules/file-assets/file-assets.service.d.ts +47 -0
- package/dist/modules/file-assets/file-assets.service.js +141 -0
- package/dist/modules/file-assets/file-assets.service.js.map +1 -0
- package/dist/modules/http.module.d.ts +2 -0
- package/dist/modules/http.module.js +22 -0
- package/dist/modules/http.module.js.map +1 -0
- package/dist/modules/instances/instances.controller.d.ts +73 -0
- package/dist/modules/instances/instances.controller.js +39 -0
- package/dist/modules/instances/instances.controller.js.map +1 -0
- package/dist/modules/instances/instances.module.d.ts +2 -0
- package/dist/modules/instances/instances.module.js +28 -0
- package/dist/modules/instances/instances.module.js.map +1 -0
- package/dist/modules/instances/instances.service.d.ts +68 -0
- package/dist/modules/instances/instances.service.js +88 -0
- package/dist/modules/instances/instances.service.js.map +1 -0
- package/dist/modules/invitation/dto/create-invitation.d.ts +8 -0
- package/dist/modules/invitation/dto/create-invitation.js +41 -0
- package/dist/modules/invitation/dto/create-invitation.js.map +1 -0
- package/dist/modules/invitation/dto/index.d.ts +1 -0
- package/dist/modules/invitation/dto/index.js +18 -0
- package/dist/modules/invitation/dto/index.js.map +1 -0
- package/dist/modules/invitation/invitation.controller.d.ts +53 -0
- package/dist/modules/invitation/invitation.controller.js +168 -0
- package/dist/modules/invitation/invitation.controller.js.map +1 -0
- package/dist/modules/invitation/invitation.module.d.ts +2 -0
- package/dist/modules/invitation/invitation.module.js +29 -0
- package/dist/modules/invitation/invitation.module.js.map +1 -0
- package/dist/modules/invitation/invitation.service.d.ts +67 -0
- package/dist/modules/invitation/invitation.service.js +193 -0
- package/dist/modules/invitation/invitation.service.js.map +1 -0
- package/dist/modules/issue-links/issue-links.module.d.ts +2 -0
- package/dist/modules/issue-links/issue-links.module.js +21 -0
- package/dist/modules/issue-links/issue-links.module.js.map +1 -0
- package/dist/modules/issue-links/issue-links.service.d.ts +47 -0
- package/dist/modules/issue-links/issue-links.service.js +143 -0
- package/dist/modules/issue-links/issue-links.service.js.map +1 -0
- package/dist/modules/issue-relations/dto/create-issue-relation.dto.d.ts +5 -0
- package/dist/modules/issue-relations/dto/create-issue-relation.dto.js +31 -0
- package/dist/modules/issue-relations/dto/create-issue-relation.dto.js.map +1 -0
- package/dist/modules/issue-relations/dto/delete-issue-relation.dto.d.ts +7 -0
- package/dist/modules/issue-relations/dto/delete-issue-relation.dto.js +25 -0
- package/dist/modules/issue-relations/dto/delete-issue-relation.dto.js.map +1 -0
- package/dist/modules/issue-relations/dto/index.d.ts +2 -0
- package/dist/modules/issue-relations/dto/index.js +19 -0
- package/dist/modules/issue-relations/dto/index.js.map +1 -0
- package/dist/modules/issue-relations/issue-relations.module.d.ts +2 -0
- package/dist/modules/issue-relations/issue-relations.module.js +23 -0
- package/dist/modules/issue-relations/issue-relations.module.js.map +1 -0
- package/dist/modules/issue-relations/issue-relations.service.d.ts +49 -0
- package/dist/modules/issue-relations/issue-relations.service.js +242 -0
- package/dist/modules/issue-relations/issue-relations.service.js.map +1 -0
- package/dist/modules/issues/draft-issues/draft-issues.module.d.ts +2 -0
- package/dist/modules/issues/draft-issues/draft-issues.module.js +23 -0
- package/dist/modules/issues/draft-issues/draft-issues.module.js.map +1 -0
- package/dist/modules/issues/draft-issues/draft-issues.service.d.ts +34 -0
- package/dist/modules/issues/draft-issues/draft-issues.service.js +94 -0
- package/dist/modules/issues/draft-issues/draft-issues.service.js.map +1 -0
- package/dist/modules/issues/dto/create-issue-comment.dto.d.ts +4 -0
- package/dist/modules/issues/dto/create-issue-comment.dto.js +24 -0
- package/dist/modules/issues/dto/create-issue-comment.dto.js.map +1 -0
- package/dist/modules/issues/dto/create-issue-link.dto.d.ts +5 -0
- package/dist/modules/issues/dto/create-issue-link.dto.js +30 -0
- package/dist/modules/issues/dto/create-issue-link.dto.js.map +1 -0
- package/dist/modules/issues/dto/create-issue-reaction.dto.d.ts +4 -0
- package/dist/modules/issues/dto/create-issue-reaction.dto.js +24 -0
- package/dist/modules/issues/dto/create-issue-reaction.dto.js.map +1 -0
- package/dist/modules/issues/dto/create-issue.dto.d.ts +21 -0
- package/dist/modules/issues/dto/create-issue.dto.js +139 -0
- package/dist/modules/issues/dto/create-issue.dto.js.map +1 -0
- package/dist/modules/issues/dto/index.d.ts +5 -0
- package/dist/modules/issues/dto/index.js +22 -0
- package/dist/modules/issues/dto/index.js.map +1 -0
- package/dist/modules/issues/dto/update-issue.dto.d.ts +5 -0
- package/dist/modules/issues/dto/update-issue.dto.js +25 -0
- package/dist/modules/issues/dto/update-issue.dto.js.map +1 -0
- package/dist/modules/issues/intake-issues/intake-issues.controller.d.ts +31 -0
- package/dist/modules/issues/intake-issues/intake-issues.controller.js +102 -0
- package/dist/modules/issues/intake-issues/intake-issues.controller.js.map +1 -0
- package/dist/modules/issues/intake-issues/intake-issues.module.d.ts +2 -0
- package/dist/modules/issues/intake-issues/intake-issues.module.js +26 -0
- package/dist/modules/issues/intake-issues/intake-issues.module.js.map +1 -0
- package/dist/modules/issues/intake-issues/intake-issues.service.d.ts +54 -0
- package/dist/modules/issues/intake-issues/intake-issues.service.js +182 -0
- package/dist/modules/issues/intake-issues/intake-issues.service.js.map +1 -0
- package/dist/modules/issues/issue-labels/dto/create-issue-label.dto.d.ts +5 -0
- package/dist/modules/issues/issue-labels/dto/create-issue-label.dto.js +30 -0
- package/dist/modules/issues/issue-labels/dto/create-issue-label.dto.js.map +1 -0
- package/dist/modules/issues/issue-labels/dto/index.d.ts +2 -0
- package/dist/modules/issues/issue-labels/dto/index.js +19 -0
- package/dist/modules/issues/issue-labels/dto/index.js.map +1 -0
- package/dist/modules/issues/issue-labels/dto/update-issue-label.dto.d.ts +6 -0
- package/dist/modules/issues/issue-labels/dto/update-issue-label.dto.js +9 -0
- package/dist/modules/issues/issue-labels/dto/update-issue-label.dto.js.map +1 -0
- package/dist/modules/issues/issue-labels/issue-labels.controller.d.ts +38 -0
- package/dist/modules/issues/issue-labels/issue-labels.controller.js +108 -0
- package/dist/modules/issues/issue-labels/issue-labels.controller.js.map +1 -0
- package/dist/modules/issues/issue-labels/issue-labels.module.d.ts +2 -0
- package/dist/modules/issues/issue-labels/issue-labels.module.js +23 -0
- package/dist/modules/issues/issue-labels/issue-labels.module.js.map +1 -0
- package/dist/modules/issues/issue-labels/issue-labels.service.d.ts +36 -0
- package/dist/modules/issues/issue-labels/issue-labels.service.js +107 -0
- package/dist/modules/issues/issue-labels/issue-labels.service.js.map +1 -0
- package/dist/modules/issues/issues.controller.d.ts +200 -0
- package/dist/modules/issues/issues.controller.js +547 -0
- package/dist/modules/issues/issues.controller.js.map +1 -0
- package/dist/modules/issues/issues.module.d.ts +2 -0
- package/dist/modules/issues/issues.module.js +45 -0
- package/dist/modules/issues/issues.module.js.map +1 -0
- package/dist/modules/issues/issues.service.d.ts +327 -0
- package/dist/modules/issues/issues.service.js +1052 -0
- package/dist/modules/issues/issues.service.js.map +1 -0
- package/dist/modules/issues/search-issues/search-issues.controller.d.ts +14 -0
- package/dist/modules/issues/search-issues/search-issues.controller.js +49 -0
- package/dist/modules/issues/search-issues/search-issues.controller.js.map +1 -0
- package/dist/modules/issues/search-issues/search-issues.module.d.ts +2 -0
- package/dist/modules/issues/search-issues/search-issues.module.js +23 -0
- package/dist/modules/issues/search-issues/search-issues.module.js.map +1 -0
- package/dist/modules/issues/search-issues/search-issues.service.d.ts +13 -0
- package/dist/modules/issues/search-issues/search-issues.service.js +97 -0
- package/dist/modules/issues/search-issues/search-issues.service.js.map +1 -0
- package/dist/modules/logger/index.d.ts +2 -0
- package/dist/modules/logger/index.js +19 -0
- package/dist/modules/logger/index.js.map +1 -0
- package/dist/modules/logger/logger.module.d.ts +6 -0
- package/dist/modules/logger/logger.module.js +26 -0
- package/dist/modules/logger/logger.module.js.map +1 -0
- package/dist/modules/logger/logger.service.d.ts +59 -0
- package/dist/modules/logger/logger.service.js +99 -0
- package/dist/modules/logger/logger.service.js.map +1 -0
- package/dist/modules/mention/mention.module.d.ts +2 -0
- package/dist/modules/mention/mention.module.js +21 -0
- package/dist/modules/mention/mention.module.js.map +1 -0
- package/dist/modules/mention/mention.service.d.ts +6 -0
- package/dist/modules/mention/mention.service.js +38 -0
- package/dist/modules/mention/mention.service.js.map +1 -0
- package/dist/modules/notification/notification.module.d.ts +2 -0
- package/dist/modules/notification/notification.module.js +21 -0
- package/dist/modules/notification/notification.module.js.map +1 -0
- package/dist/modules/notification/notification.service.d.ts +37 -0
- package/dist/modules/notification/notification.service.js +113 -0
- package/dist/modules/notification/notification.service.js.map +1 -0
- package/dist/modules/pages/dto/create-page.dto.d.ts +14 -0
- package/dist/modules/pages/dto/create-page.dto.js +68 -0
- package/dist/modules/pages/dto/create-page.dto.js.map +1 -0
- package/dist/modules/pages/dto/index.d.ts +2 -0
- package/dist/modules/pages/dto/index.js +19 -0
- package/dist/modules/pages/dto/index.js.map +1 -0
- package/dist/modules/pages/dto/update-page.dto.d.ts +15 -0
- package/dist/modules/pages/dto/update-page.dto.js +71 -0
- package/dist/modules/pages/dto/update-page.dto.js.map +1 -0
- package/dist/modules/pages/pages.controller.d.ts +109 -0
- package/dist/modules/pages/pages.controller.js +387 -0
- package/dist/modules/pages/pages.controller.js.map +1 -0
- package/dist/modules/pages/pages.module.d.ts +2 -0
- package/dist/modules/pages/pages.module.js +23 -0
- package/dist/modules/pages/pages.module.js.map +1 -0
- package/dist/modules/pages/pages.service.d.ts +112 -0
- package/dist/modules/pages/pages.service.js +481 -0
- package/dist/modules/pages/pages.service.js.map +1 -0
- package/dist/modules/project/dto/create-project.dto.d.ts +15 -0
- package/dist/modules/project/dto/create-project.dto.js +93 -0
- package/dist/modules/project/dto/create-project.dto.js.map +1 -0
- package/dist/modules/project/dto/index.d.ts +2 -0
- package/dist/modules/project/dto/index.js +19 -0
- package/dist/modules/project/dto/index.js.map +1 -0
- package/dist/modules/project/dto/project-member.dto.d.ts +8 -0
- package/dist/modules/project/dto/project-member.dto.js +48 -0
- package/dist/modules/project/dto/project-member.dto.js.map +1 -0
- package/dist/modules/project/dto/update-project.dto.d.ts +6 -0
- package/dist/modules/project/dto/update-project.dto.js +9 -0
- package/dist/modules/project/dto/update-project.dto.js.map +1 -0
- package/dist/modules/project/project-deploy-boards/project-deploy-boards.service.d.ts +33 -0
- package/dist/modules/project/project-deploy-boards/project-deploy-boards.service.js +127 -0
- package/dist/modules/project/project-deploy-boards/project-deploy-boards.service.js.map +1 -0
- package/dist/modules/project/project-identifiers/project-identifiers.controller.d.ts +12 -0
- package/dist/modules/project/project-identifiers/project-identifiers.controller.js +48 -0
- package/dist/modules/project/project-identifiers/project-identifiers.controller.js.map +1 -0
- package/dist/modules/project/project-identifiers/project-identifiers.module.d.ts +2 -0
- package/dist/modules/project/project-identifiers/project-identifiers.module.js +29 -0
- package/dist/modules/project/project-identifiers/project-identifiers.module.js.map +1 -0
- package/dist/modules/project/project-identifiers/project-identifiers.service.d.ts +14 -0
- package/dist/modules/project/project-identifiers/project-identifiers.service.js +60 -0
- package/dist/modules/project/project-identifiers/project-identifiers.service.js.map +1 -0
- package/dist/modules/project/project.controller.d.ts +94 -0
- package/dist/modules/project/project.controller.js +338 -0
- package/dist/modules/project/project.controller.js.map +1 -0
- package/dist/modules/project/project.module.d.ts +2 -0
- package/dist/modules/project/project.module.js +87 -0
- package/dist/modules/project/project.module.js.map +1 -0
- package/dist/modules/project/project.service.d.ts +132 -0
- package/dist/modules/project/project.service.js +491 -0
- package/dist/modules/project/project.service.js.map +1 -0
- package/dist/modules/project-module/dto/create-module.dto.d.ts +12 -0
- package/dist/modules/project-module/dto/create-module.dto.js +76 -0
- package/dist/modules/project-module/dto/create-module.dto.js.map +1 -0
- package/dist/modules/project-module/dto/index.d.ts +2 -0
- package/dist/modules/project-module/dto/index.js +19 -0
- package/dist/modules/project-module/dto/index.js.map +1 -0
- package/dist/modules/project-module/dto/update-module.dto.d.ts +6 -0
- package/dist/modules/project-module/dto/update-module.dto.js +9 -0
- package/dist/modules/project-module/dto/update-module.dto.js.map +1 -0
- package/dist/modules/project-module/project-module.controller.d.ts +52 -0
- package/dist/modules/project-module/project-module.controller.js +167 -0
- package/dist/modules/project-module/project-module.controller.js.map +1 -0
- package/dist/modules/project-module/project-module.module.d.ts +2 -0
- package/dist/modules/project-module/project-module.module.js +26 -0
- package/dist/modules/project-module/project-module.module.js.map +1 -0
- package/dist/modules/project-module/project-module.service.d.ts +66 -0
- package/dist/modules/project-module/project-module.service.js +275 -0
- package/dist/modules/project-module/project-module.service.js.map +1 -0
- package/dist/modules/reactions/reactions.module.d.ts +2 -0
- package/dist/modules/reactions/reactions.module.js +21 -0
- package/dist/modules/reactions/reactions.module.js.map +1 -0
- package/dist/modules/reactions/reactions.service.d.ts +48 -0
- package/dist/modules/reactions/reactions.service.js +121 -0
- package/dist/modules/reactions/reactions.service.js.map +1 -0
- package/dist/modules/recent-visits/recent-visits.controller.d.ts +12 -0
- package/dist/modules/recent-visits/recent-visits.controller.js +50 -0
- package/dist/modules/recent-visits/recent-visits.controller.js.map +1 -0
- package/dist/modules/recent-visits/recent-visits.module.d.ts +2 -0
- package/dist/modules/recent-visits/recent-visits.module.js +23 -0
- package/dist/modules/recent-visits/recent-visits.module.js.map +1 -0
- package/dist/modules/recent-visits/recent-visits.service.d.ts +12 -0
- package/dist/modules/recent-visits/recent-visits.service.js +53 -0
- package/dist/modules/recent-visits/recent-visits.service.js.map +1 -0
- package/dist/modules/sidebar-preferences/sidebar-preferences.controller.d.ts +47 -0
- package/dist/modules/sidebar-preferences/sidebar-preferences.controller.js +38 -0
- package/dist/modules/sidebar-preferences/sidebar-preferences.controller.js.map +1 -0
- package/dist/modules/sidebar-preferences/sidebar-preferences.module.d.ts +2 -0
- package/dist/modules/sidebar-preferences/sidebar-preferences.module.js +23 -0
- package/dist/modules/sidebar-preferences/sidebar-preferences.module.js.map +1 -0
- package/dist/modules/sidebar-preferences/sidebar-preferences.service.d.ts +49 -0
- package/dist/modules/sidebar-preferences/sidebar-preferences.service.js +27 -0
- package/dist/modules/sidebar-preferences/sidebar-preferences.service.js.map +1 -0
- package/dist/modules/states/dto/create-state.dto.d.ts +7 -0
- package/dist/modules/states/dto/create-state.dto.js +42 -0
- package/dist/modules/states/dto/create-state.dto.js.map +1 -0
- package/dist/modules/states/dto/index.d.ts +1 -0
- package/dist/modules/states/dto/index.js +18 -0
- package/dist/modules/states/dto/index.js.map +1 -0
- package/dist/modules/states/states.controller.d.ts +27 -0
- package/dist/modules/states/states.controller.js +85 -0
- package/dist/modules/states/states.controller.js.map +1 -0
- package/dist/modules/states/states.module.d.ts +2 -0
- package/dist/modules/states/states.module.js +23 -0
- package/dist/modules/states/states.module.js.map +1 -0
- package/dist/modules/states/states.service.d.ts +33 -0
- package/dist/modules/states/states.service.js +99 -0
- package/dist/modules/states/states.service.js.map +1 -0
- package/dist/modules/subscription/subscription.module.d.ts +2 -0
- package/dist/modules/subscription/subscription.module.js +21 -0
- package/dist/modules/subscription/subscription.module.js.map +1 -0
- package/dist/modules/subscription/subscription.service.d.ts +32 -0
- package/dist/modules/subscription/subscription.service.js +98 -0
- package/dist/modules/subscription/subscription.service.js.map +1 -0
- package/dist/modules/timezones/timezones.controller.d.ts +10 -0
- package/dist/modules/timezones/timezones.controller.js +34 -0
- package/dist/modules/timezones/timezones.controller.js.map +1 -0
- package/dist/modules/timezones/timezones.module.d.ts +2 -0
- package/dist/modules/timezones/timezones.module.js +26 -0
- package/dist/modules/timezones/timezones.module.js.map +1 -0
- package/dist/modules/user/dto/check-exist-user.dto.d.ts +10 -0
- package/dist/modules/user/dto/check-exist-user.dto.js +13 -0
- package/dist/modules/user/dto/check-exist-user.dto.js.map +1 -0
- package/dist/modules/user/dto/include-teams.dto.d.ts +3 -0
- package/dist/modules/user/dto/include-teams.dto.js +24 -0
- package/dist/modules/user/dto/include-teams.dto.js.map +1 -0
- package/dist/modules/user/dto/index.d.ts +6 -0
- package/dist/modules/user/dto/index.js +23 -0
- package/dist/modules/user/dto/index.js.map +1 -0
- package/dist/modules/user/dto/user-code.dto.d.ts +7 -0
- package/dist/modules/user/dto/user-code.dto.js +28 -0
- package/dist/modules/user/dto/user-code.dto.js.map +1 -0
- package/dist/modules/user/dto/user-email.dto.d.ts +7 -0
- package/dist/modules/user/dto/user-email.dto.js +27 -0
- package/dist/modules/user/dto/user-email.dto.js.map +1 -0
- package/dist/modules/user/dto/user-password.dto.d.ts +7 -0
- package/dist/modules/user/dto/user-password.dto.js +27 -0
- package/dist/modules/user/dto/user-password.dto.js.map +1 -0
- package/dist/modules/user/dto/user-token.dto.d.ts +7 -0
- package/dist/modules/user/dto/user-token.dto.js +27 -0
- package/dist/modules/user/dto/user-token.dto.js.map +1 -0
- package/dist/modules/user/user.controller.d.ts +79 -0
- package/dist/modules/user/user.controller.js +109 -0
- package/dist/modules/user/user.controller.js.map +1 -0
- package/dist/modules/user/user.module.d.ts +2 -0
- package/dist/modules/user/user.module.js +29 -0
- package/dist/modules/user/user.module.js.map +1 -0
- package/dist/modules/user/user.service.d.ts +118 -0
- package/dist/modules/user/user.service.js +182 -0
- package/dist/modules/user/user.service.js.map +1 -0
- package/dist/modules/user-favorites/dto/create-favorite.dto.d.ts +9 -0
- package/dist/modules/user-favorites/dto/create-favorite.dto.js +55 -0
- package/dist/modules/user-favorites/dto/create-favorite.dto.js.map +1 -0
- package/dist/modules/user-favorites/dto/index.d.ts +1 -0
- package/dist/modules/user-favorites/dto/index.js +18 -0
- package/dist/modules/user-favorites/dto/index.js.map +1 -0
- package/dist/modules/user-favorites/user-favorites.controller.d.ts +27 -0
- package/dist/modules/user-favorites/user-favorites.controller.js +82 -0
- package/dist/modules/user-favorites/user-favorites.controller.js.map +1 -0
- package/dist/modules/user-favorites/user-favorites.module.d.ts +2 -0
- package/dist/modules/user-favorites/user-favorites.module.js +38 -0
- package/dist/modules/user-favorites/user-favorites.module.js.map +1 -0
- package/dist/modules/user-favorites/user-favorites.service.d.ts +36 -0
- package/dist/modules/user-favorites/user-favorites.service.js +174 -0
- package/dist/modules/user-favorites/user-favorites.service.js.map +1 -0
- package/dist/modules/views/dto/create-issue-view.dto.d.ts +9 -0
- package/dist/modules/views/dto/create-issue-view.dto.js +54 -0
- package/dist/modules/views/dto/create-issue-view.dto.js.map +1 -0
- package/dist/modules/views/dto/index.d.ts +2 -0
- package/dist/modules/views/dto/index.js +19 -0
- package/dist/modules/views/dto/index.js.map +1 -0
- package/dist/modules/views/dto/update-issue-view.dto.d.ts +6 -0
- package/dist/modules/views/dto/update-issue-view.dto.js +9 -0
- package/dist/modules/views/dto/update-issue-view.dto.js.map +1 -0
- package/dist/modules/views/view.controller.d.ts +45 -0
- package/dist/modules/views/view.controller.js +128 -0
- package/dist/modules/views/view.controller.js.map +1 -0
- package/dist/modules/views/view.module.d.ts +2 -0
- package/dist/modules/views/view.module.js +23 -0
- package/dist/modules/views/view.module.js.map +1 -0
- package/dist/modules/views/view.service.d.ts +55 -0
- package/dist/modules/views/view.service.js +158 -0
- package/dist/modules/views/view.service.js.map +1 -0
- package/dist/modules/views/workspace-view.controller.d.ts +42 -0
- package/dist/modules/views/workspace-view.controller.js +120 -0
- package/dist/modules/views/workspace-view.controller.js.map +1 -0
- package/dist/modules/views/workspace-view.module.d.ts +2 -0
- package/dist/modules/views/workspace-view.module.js +28 -0
- package/dist/modules/views/workspace-view.module.js.map +1 -0
- package/dist/modules/work-items/work-items.controller.d.ts +6 -0
- package/dist/modules/work-items/work-items.controller.js +42 -0
- package/dist/modules/work-items/work-items.controller.js.map +1 -0
- package/dist/modules/work-items/work-items.module.d.ts +2 -0
- package/dist/modules/work-items/work-items.module.js +23 -0
- package/dist/modules/work-items/work-items.module.js.map +1 -0
- package/dist/modules/work-items/work-items.service.d.ts +11 -0
- package/dist/modules/work-items/work-items.service.js +45 -0
- package/dist/modules/work-items/work-items.service.js.map +1 -0
- package/dist/modules/workspace/dto/create-workspace.dto.d.ts +13 -0
- package/dist/modules/workspace/dto/create-workspace.dto.js +48 -0
- package/dist/modules/workspace/dto/create-workspace.dto.js.map +1 -0
- package/dist/modules/workspace/dto/index.d.ts +0 -0
- package/dist/modules/workspace/dto/index.js +2 -0
- package/dist/modules/workspace/dto/index.js.map +1 -0
- package/dist/modules/workspace/workspace-context.service.d.ts +13 -0
- package/dist/modules/workspace/workspace-context.service.js +35 -0
- package/dist/modules/workspace/workspace-context.service.js.map +1 -0
- package/dist/modules/workspace/workspace.controller.d.ts +292 -0
- package/dist/modules/workspace/workspace.controller.js +758 -0
- package/dist/modules/workspace/workspace.controller.js.map +1 -0
- package/dist/modules/workspace/workspace.middleware.d.ts +5 -0
- package/dist/modules/workspace/workspace.middleware.js +32 -0
- package/dist/modules/workspace/workspace.middleware.js.map +1 -0
- package/dist/modules/workspace/workspace.module.d.ts +2 -0
- package/dist/modules/workspace/workspace.module.js +49 -0
- package/dist/modules/workspace/workspace.module.js.map +1 -0
- package/dist/modules/workspace/workspace.service.d.ts +475 -0
- package/dist/modules/workspace/workspace.service.js +1266 -0
- package/dist/modules/workspace/workspace.service.js.map +1 -0
- package/dist/modules/workspace/workspaces.controller.d.ts +13 -0
- package/dist/modules/workspace/workspaces.controller.js +57 -0
- package/dist/modules/workspace/workspaces.controller.js.map +1 -0
- package/dist/modules/workspace/workspaces.module.d.ts +2 -0
- package/dist/modules/workspace/workspaces.module.js +29 -0
- package/dist/modules/workspace/workspaces.module.js.map +1 -0
- package/dist/modules/workspace/workspaces.service.d.ts +15 -0
- package/dist/modules/workspace/workspaces.service.js +52 -0
- package/dist/modules/workspace/workspaces.service.js.map +1 -0
- package/dist/modules/workspace-slug/workspace-slug.controller.d.ts +6 -0
- package/dist/modules/workspace-slug/workspace-slug.controller.js +37 -0
- package/dist/modules/workspace-slug/workspace-slug.controller.js.map +1 -0
- package/dist/modules/workspace-slug/workspace-slug.module.d.ts +2 -0
- package/dist/modules/workspace-slug/workspace-slug.module.js +26 -0
- package/dist/modules/workspace-slug/workspace-slug.module.js.map +1 -0
- package/dist/mount.d.ts +51 -0
- package/dist/mount.js +194 -0
- package/dist/mount.js.map +1 -0
- package/dist/plane-config.registry.d.ts +31 -0
- package/dist/plane-config.registry.js +91 -0
- package/dist/plane-config.registry.js.map +1 -0
- package/dist/plane-plugin-options.interface.d.ts +70 -0
- package/dist/plane-plugin-options.interface.js +5 -0
- package/dist/plane-plugin-options.interface.js.map +1 -0
- package/dist/plane-proxy.module.d.ts +16 -0
- package/dist/plane-proxy.module.js +176 -0
- package/dist/plane-proxy.module.js.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1,1266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.WorkspaceService = void 0;
|
|
19
|
+
const common_1 = require("@nestjs/common");
|
|
20
|
+
const qs_1 = __importDefault(require("qs"));
|
|
21
|
+
const plugin_integration_plane_models_1 = require("@ever-gauzy/plugin-integration-plane-models");
|
|
22
|
+
const api_fetch_service_1 = require("../api-fetch/api-fetch.service");
|
|
23
|
+
const config_1 = require("../../config");
|
|
24
|
+
const config_2 = require("../../config");
|
|
25
|
+
const project_service_1 = require("../project/project.service");
|
|
26
|
+
const issues_service_1 = require("../issues/issues.service");
|
|
27
|
+
const activity_service_1 = require("../activity/activity.service");
|
|
28
|
+
const issue_links_service_1 = require("../issue-links/issue-links.service");
|
|
29
|
+
const subscription_service_1 = require("../subscription/subscription.service");
|
|
30
|
+
const draft_issues_service_1 = require("../issues/draft-issues/draft-issues.service");
|
|
31
|
+
const employee_properties_service_1 = require("../employee-properties/employee-properties.service");
|
|
32
|
+
const cycles_service_1 = require("../cycles/cycles.service");
|
|
33
|
+
const project_module_service_1 = require("../project-module/project-module.service");
|
|
34
|
+
const view_service_1 = require("../views/view.service");
|
|
35
|
+
const dashboard_service_1 = require("../dashboard/dashboard.service");
|
|
36
|
+
const widget_service_1 = require("../dashboard/widget.service");
|
|
37
|
+
const notification_service_1 = require("../notification/notification.service");
|
|
38
|
+
let WorkspaceService = class WorkspaceService extends api_fetch_service_1.ApiFetchService {
|
|
39
|
+
constructor(_projectService, _issueService, _cycleService, _projectModuleService, _issueViewService, _activityService, _issueLinkService, _subscriptionService, _draftIssueService, _employeePropertiesService, _dashboardService, _widgetService, _notificationService, _serverFetchService) {
|
|
40
|
+
super(_serverFetchService['_httpService']);
|
|
41
|
+
this._projectService = _projectService;
|
|
42
|
+
this._issueService = _issueService;
|
|
43
|
+
this._cycleService = _cycleService;
|
|
44
|
+
this._projectModuleService = _projectModuleService;
|
|
45
|
+
this._issueViewService = _issueViewService;
|
|
46
|
+
this._activityService = _activityService;
|
|
47
|
+
this._issueLinkService = _issueLinkService;
|
|
48
|
+
this._subscriptionService = _subscriptionService;
|
|
49
|
+
this._draftIssueService = _draftIssueService;
|
|
50
|
+
this._employeePropertiesService = _employeePropertiesService;
|
|
51
|
+
this._dashboardService = _dashboardService;
|
|
52
|
+
this._widgetService = _widgetService;
|
|
53
|
+
this._notificationService = _notificationService;
|
|
54
|
+
this._serverFetchService = _serverFetchService;
|
|
55
|
+
}
|
|
56
|
+
/**--------------------------------------------------------------
|
|
57
|
+
* This function handlers should be updated after implementing authentication
|
|
58
|
+
*--------------------------------------------------------------/
|
|
59
|
+
/**
|
|
60
|
+
* @description - Get dashboard widgets for given workspace
|
|
61
|
+
* @param {string} dashboard_type - query that define which widget filter should be fetched
|
|
62
|
+
* @returns - A promise that resolves when dashboard widgets are fetched
|
|
63
|
+
* @memberof WorkspaceService
|
|
64
|
+
*/
|
|
65
|
+
async getDashboard(dashboard_type) {
|
|
66
|
+
var _a, _b, _c, _d;
|
|
67
|
+
try {
|
|
68
|
+
let externalDashboard = await this._dashboardService.findDashboardByIdentifier(dashboard_type);
|
|
69
|
+
if (!externalDashboard) {
|
|
70
|
+
externalDashboard = await this._dashboardService.create({
|
|
71
|
+
name: 'home',
|
|
72
|
+
identifier: 'home',
|
|
73
|
+
description: 'Default home dashboard for plane',
|
|
74
|
+
organizationId: (0, config_1.getCurrentOrganizationSlug)()
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
let transformedWidgets = (0, config_1.widgetTransformer)(externalDashboard.widgets);
|
|
78
|
+
if (externalDashboard.widgets.length === 0) {
|
|
79
|
+
const widgets = config_1.DEFAULT_DASHBOARD_WIDGETS;
|
|
80
|
+
try {
|
|
81
|
+
transformedWidgets = (await Promise.all(widgets.map(async (widget) => {
|
|
82
|
+
return await this._widgetService.create({
|
|
83
|
+
name: widget.key,
|
|
84
|
+
isVisible: widget.is_visible,
|
|
85
|
+
options: widget.widget_filters,
|
|
86
|
+
dashboardId: externalDashboard.id,
|
|
87
|
+
organizationId: externalDashboard.organizationId
|
|
88
|
+
});
|
|
89
|
+
}))).flat();
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
this.logger.error(`Failed to create widget: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
|
|
93
|
+
throw new common_1.BadRequestException(error.response);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
// If found, return the serialized dashboard
|
|
97
|
+
return {
|
|
98
|
+
dashboard: (0, config_1.dashboardTransformer)(externalDashboard),
|
|
99
|
+
widgets: transformedWidgets
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
catch (error) {
|
|
103
|
+
this.logger.error(`Failed to get dashboard: ${((_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.message) || error.message}`, error.stack);
|
|
104
|
+
throw new common_1.BadRequestException(error.response);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Fetches data for various dashboard widgets based on the widget type.
|
|
109
|
+
*
|
|
110
|
+
* This function retrieves data for different types of dashboard widgets such as recent collaborators,
|
|
111
|
+
* created issues, assigned issues, recent projects, issues by state, and issues by priority.
|
|
112
|
+
*
|
|
113
|
+
* @param {DashboardWigetQueryEnum} widget - The widget type to query data for.
|
|
114
|
+
* @returns {Promise<any>} A promise that resolves to the data for the requested widget.
|
|
115
|
+
* @throws {BadRequestException} If an error occurs during data retrieval.
|
|
116
|
+
*/
|
|
117
|
+
async findDashboardWidgetsData(widget, target_date, issue_type) {
|
|
118
|
+
// Mapping object for each widget type and its corresponding handler function
|
|
119
|
+
const widgetHandlers = {
|
|
120
|
+
[plugin_integration_plane_models_1.DashboardWigetQueryEnum.COLLABORATORS]: this.findRecentCollaborators.bind(this),
|
|
121
|
+
[plugin_integration_plane_models_1.DashboardWigetQueryEnum.CREATED_ISSUES]: async () => {
|
|
122
|
+
const issues = await this.findMyCreatedIssues(target_date, issue_type);
|
|
123
|
+
return { issues: issues.slice(0, 5), count: issues.length };
|
|
124
|
+
},
|
|
125
|
+
[plugin_integration_plane_models_1.DashboardWigetQueryEnum.ASSIGNED_ISSUES]: async () => {
|
|
126
|
+
const issues = await this.findMyAssignedIssues(target_date, issue_type);
|
|
127
|
+
return { issues: issues.slice(0, 5), count: issues.length };
|
|
128
|
+
},
|
|
129
|
+
[plugin_integration_plane_models_1.DashboardWigetQueryEnum.RECENT_ACTIVITY]: async () => {
|
|
130
|
+
return this.findRecentIssueActivity(8);
|
|
131
|
+
},
|
|
132
|
+
[plugin_integration_plane_models_1.DashboardWigetQueryEnum.RECENT_PROJECTS]: this.findRecentProjects.bind(this),
|
|
133
|
+
[plugin_integration_plane_models_1.DashboardWigetQueryEnum.ISSUES_BY_STATE]: async () => {
|
|
134
|
+
return this.finAssignedByState(target_date);
|
|
135
|
+
},
|
|
136
|
+
[plugin_integration_plane_models_1.DashboardWigetQueryEnum.ISSUES_BY_PRIORITY]: async () => {
|
|
137
|
+
return this.findAssignedByPriority(target_date);
|
|
138
|
+
},
|
|
139
|
+
[plugin_integration_plane_models_1.DashboardWigetQueryEnum.OVERVIEW]: async () => {
|
|
140
|
+
return await this.findOverViewWidgetStats();
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
// Execute the corresponding handler if the widget type exists in the mapping
|
|
144
|
+
if (widget in widgetHandlers) {
|
|
145
|
+
return widgetHandlers[widget]();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/**--------------------------------------------------------------
|
|
149
|
+
* This function handlers should be updated after implementing authentication and User features
|
|
150
|
+
*--------------------------------------------------------------*/
|
|
151
|
+
/**
|
|
152
|
+
* @description - Get member (from connected user) info for a workspace
|
|
153
|
+
* @returns - A promise that resolves after getting member informations
|
|
154
|
+
* @memberof WorkspaceController
|
|
155
|
+
*/
|
|
156
|
+
async getMembersMe() {
|
|
157
|
+
const employeeId = (0, config_1.currentEmployeeId)();
|
|
158
|
+
const tenantId = (0, config_1.currentTenantId)();
|
|
159
|
+
try {
|
|
160
|
+
let memberSetting = await this._employeePropertiesService.findOneByOptions({
|
|
161
|
+
employeeId: employeeId,
|
|
162
|
+
entity: plugin_integration_plane_models_1.BaseEntityEnum.Tenant,
|
|
163
|
+
entityId: tenantId,
|
|
164
|
+
settingType: plugin_integration_plane_models_1.EmployeeSettingTypeEnum.TASK_VIEWS
|
|
165
|
+
});
|
|
166
|
+
if (!memberSetting) {
|
|
167
|
+
// Create default settings if none exist
|
|
168
|
+
memberSetting = await this.createDefaultSettings(tenantId, employeeId);
|
|
169
|
+
}
|
|
170
|
+
return (0, config_1.memberPropertiesSerializer)(memberSetting, employeeId);
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
this.logger.warn('Failed to retrieve settings, creating new ones...');
|
|
174
|
+
try {
|
|
175
|
+
// Create default settings in case of error
|
|
176
|
+
const memberSetting = await this.createDefaultSettings(tenantId, employeeId);
|
|
177
|
+
return (0, config_1.memberPropertiesSerializer)(memberSetting, employeeId);
|
|
178
|
+
}
|
|
179
|
+
catch (creationError) {
|
|
180
|
+
this.logger.error('Failed to create new view properties', creationError instanceof Error
|
|
181
|
+
? creationError.stack
|
|
182
|
+
: String(creationError));
|
|
183
|
+
throw new common_1.BadRequestException('Failed to find or create new view properties');
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
async createDefaultSettings(tenantId, employeeId) {
|
|
188
|
+
const settingViewProps = Object.assign(Object.assign({}, config_1.MEMBER_DEFAULT_VIEW_PROPS), { issue_props: {
|
|
189
|
+
created: true,
|
|
190
|
+
assigned: true,
|
|
191
|
+
all_issues: true,
|
|
192
|
+
subscribed: true
|
|
193
|
+
} });
|
|
194
|
+
await this._employeePropertiesService.create({
|
|
195
|
+
entity: plugin_integration_plane_models_1.BaseEntityEnum.Tenant,
|
|
196
|
+
entityId: tenantId,
|
|
197
|
+
settingType: plugin_integration_plane_models_1.EmployeeSettingTypeEnum.TASK_VIEWS,
|
|
198
|
+
data: settingViewProps,
|
|
199
|
+
defaultData: settingViewProps,
|
|
200
|
+
employee: { id: employeeId },
|
|
201
|
+
employeeId
|
|
202
|
+
});
|
|
203
|
+
// Retourner les paramètres après la création
|
|
204
|
+
return await this._employeePropertiesService.findOneByOptions({
|
|
205
|
+
employeeId,
|
|
206
|
+
entity: plugin_integration_plane_models_1.BaseEntityEnum.Tenant,
|
|
207
|
+
entityId: tenantId,
|
|
208
|
+
settingType: plugin_integration_plane_models_1.EmployeeSettingTypeEnum.TASK_VIEWS
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* @description - Get Organization members
|
|
213
|
+
* @returns A promise that resolves after get organization members
|
|
214
|
+
* @memberof WorkspaceService
|
|
215
|
+
*/
|
|
216
|
+
async getWorkspaceMembers() {
|
|
217
|
+
try {
|
|
218
|
+
const organizationId = (0, config_1.getCurrentOrganizationSlug)();
|
|
219
|
+
const tenantId = (0, config_1.currentTenantId)();
|
|
220
|
+
const query = qs_1.default.stringify((0, config_2.getEmployeeMembersQuery)(organizationId, tenantId));
|
|
221
|
+
const response = (await this.apiFetch({
|
|
222
|
+
method: 'GET',
|
|
223
|
+
path: '/employee/members',
|
|
224
|
+
query
|
|
225
|
+
})).data;
|
|
226
|
+
return (0, config_2.employeeMembersTransformer)(response.items, organizationId);
|
|
227
|
+
}
|
|
228
|
+
catch (error) {
|
|
229
|
+
this.logger.error('Error while retrieving workspace members', error instanceof Error ? error.stack : String(error));
|
|
230
|
+
throw new common_1.BadRequestException(error);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Retrieves the most recent collaborators from the workspace members.
|
|
235
|
+
*
|
|
236
|
+
* The function fetches all workspace members and and returns the first members found. The result includes each collaborator's
|
|
237
|
+
* user ID and active issue count (which needs to be calculated accordingly).
|
|
238
|
+
*
|
|
239
|
+
* @returns {Promise<IRecentCollaborator[]>} A promise that resolves to an array of recent collaborators.
|
|
240
|
+
* @throws {BadRequestException} If there is an error while fetching the workspace members.
|
|
241
|
+
*/
|
|
242
|
+
async findRecentCollaborators() {
|
|
243
|
+
try {
|
|
244
|
+
const employees = await this.getWorkspaceMembers();
|
|
245
|
+
const collaborators = await Promise.all(employees.map(async (employee) => {
|
|
246
|
+
const tasks = await this._issueService.findExternalByEmployee(employee.member.id, ['taskStatus']);
|
|
247
|
+
const { startedIssues, unstartedIssues } = (0, config_1.getTaskCounts)(tasks);
|
|
248
|
+
return {
|
|
249
|
+
user_id: employee.member.id,
|
|
250
|
+
active_issue_count: startedIssues + unstartedIssues
|
|
251
|
+
};
|
|
252
|
+
}));
|
|
253
|
+
return collaborators.sort((a, b) => b.active_issue_count - a.active_issue_count);
|
|
254
|
+
}
|
|
255
|
+
catch (error) {
|
|
256
|
+
this.logger.error('Failed to find recent collaborators', error instanceof Error ? error.stack : String(error));
|
|
257
|
+
throw new common_1.BadRequestException(error);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Retrieves statistics for the overview widget related to assigned, completed,
|
|
262
|
+
* created, and overdue issues.
|
|
263
|
+
*
|
|
264
|
+
* The method fetches the user's assigned issues, completed issues, and created issues.
|
|
265
|
+
* It also filters assigned issues to determine how many are overdue (i.e., with a due date
|
|
266
|
+
* or target date that is earlier than today).
|
|
267
|
+
*
|
|
268
|
+
* @returns {Promise<Object>} An object containing the following issue counts:
|
|
269
|
+
* - `assigned_issues_count`: The number of issues assigned to the user.
|
|
270
|
+
* - `pending_issues_count`: The number of overdue issues assigned to the user.
|
|
271
|
+
* - `completed_issues_count`: The number of issues the user has completed.
|
|
272
|
+
* - `created_issues_count`: The number of issues created by the user.
|
|
273
|
+
*
|
|
274
|
+
* @throws {Error} If any of the asynchronous operations fail.
|
|
275
|
+
*/
|
|
276
|
+
async findOverViewWidgetStats() {
|
|
277
|
+
const today = new Date();
|
|
278
|
+
const assigned = await this.findMyAssignedIssues();
|
|
279
|
+
const completed = await this.findMyAssignedIssues(undefined, plugin_integration_plane_models_1.DashboardIssueTypeEnum.COMPLETED);
|
|
280
|
+
const created = await this.findMyCreatedIssues();
|
|
281
|
+
const overdue = assigned.filter((task) => {
|
|
282
|
+
if ('dueDate' in task) {
|
|
283
|
+
const taskDueDate = new Date(task.dueDate);
|
|
284
|
+
return taskDueDate < today;
|
|
285
|
+
}
|
|
286
|
+
else if ('target_date' in task) {
|
|
287
|
+
const issueTargetDate = new Date(task.target_date);
|
|
288
|
+
return issueTargetDate < today;
|
|
289
|
+
}
|
|
290
|
+
return true;
|
|
291
|
+
});
|
|
292
|
+
return {
|
|
293
|
+
assigned_issues_count: assigned.length,
|
|
294
|
+
pending_issues_count: overdue.length,
|
|
295
|
+
completed_issues_count: completed.length,
|
|
296
|
+
created_issues_count: created.length
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Retrieves the issues assigned to the current employee.
|
|
301
|
+
*
|
|
302
|
+
* The function calls the issue service to fetch all issues assigned to the employee
|
|
303
|
+
*/
|
|
304
|
+
async findMyAssignedIssues(target_date, issue_type, employee) {
|
|
305
|
+
const employeeId = employee || (0, config_1.currentEmployeeId)();
|
|
306
|
+
return this.getIssues(employeeId, 'employeeId', target_date, issue_type);
|
|
307
|
+
}
|
|
308
|
+
async findMyCreatedIssues(target_date, issue_type) {
|
|
309
|
+
const userId = (0, config_1.currentUserId)();
|
|
310
|
+
return this.getIssues(userId, 'creatorId', target_date, issue_type);
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Retrieves the count of tasks assigned to the current employee, grouped by their state.
|
|
314
|
+
*
|
|
315
|
+
* Sends a GET request to fetch tasks assigned to the authenticated employee.
|
|
316
|
+
* Tasks are then categorized into states (backlog, unstarted, started, completed, and cancelled).
|
|
317
|
+
*
|
|
318
|
+
* @returns {Promise<{ state: string, count: number }[]>} A promise that resolves to an array of objects representing task states and their respective counts.
|
|
319
|
+
* @throws {BadRequestException} If an error occurs during the fetch.
|
|
320
|
+
*/
|
|
321
|
+
async finAssignedByState(target_date) {
|
|
322
|
+
var _a, _b, _c;
|
|
323
|
+
try {
|
|
324
|
+
let tasks = await this._issueService.findExternalByEmployee((0, config_1.currentEmployeeId)(), ['taskStatus']);
|
|
325
|
+
if (target_date) {
|
|
326
|
+
const { dueDateFrom, dueDateTo } = (0, config_1.widgetTargetDateTransformer)(target_date);
|
|
327
|
+
tasks = await this._issueService.findByStartAndDueDate({
|
|
328
|
+
dueDateFrom,
|
|
329
|
+
dueDateTo,
|
|
330
|
+
relations: ['members'],
|
|
331
|
+
employeeId: (_a = (0, config_1.currentEmployeeId)()) !== null && _a !== void 0 ? _a : undefined
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
// Get task counts based on their states
|
|
335
|
+
const { backlogIssues, completedIssues, startedIssues, unstartedIssues } = (0, config_1.getTaskCounts)(tasks);
|
|
336
|
+
// Return the task counts grouped by state
|
|
337
|
+
return [
|
|
338
|
+
{ state: 'backlog', count: backlogIssues },
|
|
339
|
+
{ state: 'unstarted', count: unstartedIssues },
|
|
340
|
+
{ state: 'started', count: startedIssues },
|
|
341
|
+
{ state: 'completed', count: completedIssues },
|
|
342
|
+
{ state: 'cancelled', count: 0 } // Assuming 0 cancelled issues as not specified
|
|
343
|
+
];
|
|
344
|
+
}
|
|
345
|
+
catch (error) {
|
|
346
|
+
this.logger.error(`Failed to get assigned issues by state: ${((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.message) || error.message}`, error.stack);
|
|
347
|
+
throw new common_1.BadRequestException(error);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Retrieves tasks assigned to the authenticated employee and categorizes them by priority.
|
|
352
|
+
*
|
|
353
|
+
* This function fetches tasks for the authenticated employee and returns the count
|
|
354
|
+
* of tasks grouped by their priority (urgent, high, medium, low, none).
|
|
355
|
+
*
|
|
356
|
+
* @returns {Promise<Array<{ priority: string; count: number }>>} A promise that resolves to an array of objects containing the priority and the count of tasks for each priority level.
|
|
357
|
+
* @throws {BadRequestException} If an error occurs during task retrieval.
|
|
358
|
+
*/
|
|
359
|
+
async findAssignedByPriority(target_date) {
|
|
360
|
+
var _a, _b, _c;
|
|
361
|
+
try {
|
|
362
|
+
let tasks = await this._issueService.findExternalByEmployee((0, config_1.currentEmployeeId)(), ['taskStatus']);
|
|
363
|
+
if (target_date) {
|
|
364
|
+
const { dueDateFrom, dueDateTo } = (0, config_1.widgetTargetDateTransformer)(target_date);
|
|
365
|
+
tasks = await this._issueService.findByStartAndDueDate({
|
|
366
|
+
dueDateFrom,
|
|
367
|
+
dueDateTo,
|
|
368
|
+
relations: ['members'],
|
|
369
|
+
employeeId: (_a = (0, config_1.currentEmployeeId)()) !== null && _a !== void 0 ? _a : undefined
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
// Get the tasks counts grouped by priority
|
|
373
|
+
return (0, config_1.issuesByPriority)(tasks);
|
|
374
|
+
}
|
|
375
|
+
catch (error) {
|
|
376
|
+
this.logger.error(`Failed to find assigned issues by priority: ${((_c = (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.message) || error.message}`, error.stack);
|
|
377
|
+
throw new common_1.BadRequestException(error);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
/************* ✨ Windsurf Command ⭐ *************/
|
|
381
|
+
/**
|
|
382
|
+
* Retrieves all projects for the authenticated employee.
|
|
383
|
+
*
|
|
384
|
+
* This function fetches all projects with no specific filters and returns an array of projects.
|
|
385
|
+
*
|
|
386
|
+
* @returns {Promise<IProject[]>} A promise that resolves to an array of projects.
|
|
387
|
+
* @throws {BadRequestException} If an error occurs during project retrieval.
|
|
388
|
+
*/
|
|
389
|
+
/******* e3fe4c94-518f-42c5-ad1c-6ca918f83028 *******/
|
|
390
|
+
async findProjects() {
|
|
391
|
+
try {
|
|
392
|
+
return await this._projectService.getProjects([
|
|
393
|
+
'members.employee.user.role',
|
|
394
|
+
'organizationSprints',
|
|
395
|
+
'modules'
|
|
396
|
+
]);
|
|
397
|
+
}
|
|
398
|
+
catch (error) {
|
|
399
|
+
this.logger.error('Failed to find projects', error instanceof Error ? error.stack : String(error));
|
|
400
|
+
throw new common_1.BadRequestException(error);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Retrieves the most recent project IDs.
|
|
405
|
+
*
|
|
406
|
+
* This function fetches all projects and returns the IDs of the first 5 recent projects.
|
|
407
|
+
*
|
|
408
|
+
* @returns {Promise<ID[]>} A promise that resolves to an array of the most recent project IDs.
|
|
409
|
+
* @throws {BadRequestException} If an error occurs during project retrieval.
|
|
410
|
+
*/
|
|
411
|
+
async findRecentProjects() {
|
|
412
|
+
try {
|
|
413
|
+
// Fetch all projects
|
|
414
|
+
const projects = await this._projectService.getExternalProjects([]);
|
|
415
|
+
// Return the first 5 project IDs
|
|
416
|
+
return projects.map((project) => project.id).slice(0, 4);
|
|
417
|
+
}
|
|
418
|
+
catch (error) {
|
|
419
|
+
this.logger.error('Failed to find recent projects', error instanceof Error ? error.stack : String(error));
|
|
420
|
+
throw new common_1.BadRequestException(error);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
424
|
+
* Retrieves the recent activity logs for issues, transformed and filtered based on the user's activity.
|
|
425
|
+
* The method fetches activity logs, resolves associated tasks, and includes details about the issue,
|
|
426
|
+
* actor, project, workspace, and cycle if applicable.
|
|
427
|
+
*
|
|
428
|
+
* @param {number} [length] - Optional limit for the number of recent activities to return.
|
|
429
|
+
* @returns {Promise<any[]>} A promise that resolves with a list of transformed issue activities.
|
|
430
|
+
*
|
|
431
|
+
* @throws {BadRequestException} If an error occurs during the retrieval or processing of activity logs.
|
|
432
|
+
*/
|
|
433
|
+
async findRecentIssueActivity(length, employeeId) {
|
|
434
|
+
try {
|
|
435
|
+
const activityLogs = await this._activityService.findAll({
|
|
436
|
+
entity: plugin_integration_plane_models_1.BaseEntityEnum.Task,
|
|
437
|
+
employeeId: (0, config_1.currentEmployeeId)() || employeeId
|
|
438
|
+
});
|
|
439
|
+
// Collect all the IDs of parents mentioned in the logs
|
|
440
|
+
const parentIds = new Set();
|
|
441
|
+
activityLogs === null || activityLogs === void 0 ? void 0 : activityLogs.forEach((log) => {
|
|
442
|
+
var _a, _b, _c;
|
|
443
|
+
if ((_a = log.updatedFields) === null || _a === void 0 ? void 0 : _a.includes('parentId')) {
|
|
444
|
+
(_b = log.updatedValues) === null || _b === void 0 ? void 0 : _b.forEach((value) => {
|
|
445
|
+
if ('parentId' in value && value.parentId) {
|
|
446
|
+
parentIds.add(value.parentId);
|
|
447
|
+
}
|
|
448
|
+
});
|
|
449
|
+
(_c = log.previousValues) === null || _c === void 0 ? void 0 : _c.forEach((value) => {
|
|
450
|
+
if ('parentId' in value && value.parentId) {
|
|
451
|
+
parentIds.add(value.parentId);
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
// Load all the parent tasks
|
|
457
|
+
const parentTasks = new Map();
|
|
458
|
+
if (parentIds.size > 0) {
|
|
459
|
+
const parents = await this._issueService.findAllExternal({
|
|
460
|
+
issues: Array.from(parentIds).join(',')
|
|
461
|
+
});
|
|
462
|
+
parents.items.forEach((parent) => {
|
|
463
|
+
parentTasks.set(parent.id, parent);
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
const issueActivities = await Promise.all((activityLogs !== null && activityLogs !== void 0 ? activityLogs : []).map(async (activityLog) => {
|
|
467
|
+
var _a, _b, _c;
|
|
468
|
+
const task = await this._issueService.getExternalIssue(activityLog.entityId, [
|
|
469
|
+
'project.members.employee.user.role',
|
|
470
|
+
'organizationSprint',
|
|
471
|
+
'taskSprintHistories.toSprint'
|
|
472
|
+
]);
|
|
473
|
+
const projectMembers = task.project.members.map((member) => member.employee);
|
|
474
|
+
if (task.projectId) {
|
|
475
|
+
const { actor, issue, project, workspace } = await this._issueService.getIssueCommentDetails(task.id, task.projectId, activityLog.employeeId, task, task.project);
|
|
476
|
+
// Check if updatedValues contains organizationSprintId
|
|
477
|
+
const updatedSprintObj = (_a = activityLog.updatedValues) === null || _a === void 0 ? void 0 : _a.find((value) => 'organizationSprintId' in value);
|
|
478
|
+
let updatedSprint = null;
|
|
479
|
+
if (updatedSprintObj &&
|
|
480
|
+
updatedSprintObj.organizationSprintId) {
|
|
481
|
+
updatedSprint = ((_c = (_b = task.taskSprintHistories.find((sprint) => sprint.toSprintId ===
|
|
482
|
+
updatedSprintObj.organizationSprintId)) === null || _b === void 0 ? void 0 : _b.toSprint) !== null && _c !== void 0 ? _c : null);
|
|
483
|
+
}
|
|
484
|
+
const transformedActivityLogs = (0, config_1.issueActivityLogTransformer)(activityLog, issue, actor, project, workspace, updatedSprint
|
|
485
|
+
? updatedSprint
|
|
486
|
+
: task.organizationSprint, projectMembers.filter((employee) => employee.userId ===
|
|
487
|
+
activityLog.createdByUserId)[0], projectMembers, parentTasks);
|
|
488
|
+
return Array.isArray(transformedActivityLogs)
|
|
489
|
+
? transformedActivityLogs
|
|
490
|
+
: [transformedActivityLogs];
|
|
491
|
+
}
|
|
492
|
+
}));
|
|
493
|
+
// TODO: Include also links activities and filter both by createdAt to return most recent activities.
|
|
494
|
+
const activities = issueActivities.flat().filter(Boolean);
|
|
495
|
+
if (length) {
|
|
496
|
+
return activities.slice(0, length);
|
|
497
|
+
}
|
|
498
|
+
return activities;
|
|
499
|
+
}
|
|
500
|
+
catch (error) {
|
|
501
|
+
this.logger.error('Failed to find recent issue activity', error instanceof Error ? error.stack : String(error));
|
|
502
|
+
throw new common_1.BadRequestException(error);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Fetches and filters issues based on a target date and issue type.
|
|
507
|
+
*/
|
|
508
|
+
async getIssues(id, idField, target_date, issue_type) {
|
|
509
|
+
var _a, _b;
|
|
510
|
+
try {
|
|
511
|
+
let tasks;
|
|
512
|
+
const dateRangesRelations = [
|
|
513
|
+
'taskStatus',
|
|
514
|
+
'linkedIssues.taskTo',
|
|
515
|
+
'linkedIssues.taskFrom'
|
|
516
|
+
];
|
|
517
|
+
const relations = [
|
|
518
|
+
'members.user',
|
|
519
|
+
'createdByUser',
|
|
520
|
+
'project.members.employee.user.role',
|
|
521
|
+
...dateRangesRelations
|
|
522
|
+
];
|
|
523
|
+
// If a target date is provided, fetch tasks by date
|
|
524
|
+
if (target_date) {
|
|
525
|
+
const { dueDateFrom, dueDateTo } = (0, config_1.widgetTargetDateTransformer)(target_date);
|
|
526
|
+
// Pass the appropriate field to the method based on idField
|
|
527
|
+
if (idField === 'employeeId') {
|
|
528
|
+
tasks = await this._issueService.findByStartAndDueDate({
|
|
529
|
+
dueDateFrom,
|
|
530
|
+
dueDateTo,
|
|
531
|
+
relations: dateRangesRelations,
|
|
532
|
+
employeeId: id // Explicitly specify employeeId
|
|
533
|
+
});
|
|
534
|
+
}
|
|
535
|
+
else {
|
|
536
|
+
tasks = await this._issueService.findByStartAndDueDate({
|
|
537
|
+
dueDateFrom,
|
|
538
|
+
dueDateTo,
|
|
539
|
+
relations: dateRangesRelations,
|
|
540
|
+
createdByUserId: id // Explicitly specify creatorId
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
// Apply additional filtering based on issue_type
|
|
544
|
+
if (issue_type) {
|
|
545
|
+
const today = new Date();
|
|
546
|
+
tasks = tasks.filter((task) => {
|
|
547
|
+
if ('dueDate' in task) {
|
|
548
|
+
// Logic for ITask
|
|
549
|
+
const taskDueDate = new Date(task.dueDate);
|
|
550
|
+
if (issue_type === plugin_integration_plane_models_1.DashboardIssueTypeEnum.UPCOMING) {
|
|
551
|
+
return taskDueDate > today; // Only keep tasks due after today
|
|
552
|
+
}
|
|
553
|
+
else if (issue_type === plugin_integration_plane_models_1.DashboardIssueTypeEnum.OVERDUE) {
|
|
554
|
+
return taskDueDate < today; // Only keep tasks due before today
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
else if ('target_date' in task) {
|
|
558
|
+
// Logic for IIssue
|
|
559
|
+
const issueTargetDate = new Date(task.target_date);
|
|
560
|
+
if (issue_type === plugin_integration_plane_models_1.DashboardIssueTypeEnum.UPCOMING) {
|
|
561
|
+
return issueTargetDate > today; // Only keep issues with target_date after today
|
|
562
|
+
}
|
|
563
|
+
else if (issue_type === plugin_integration_plane_models_1.DashboardIssueTypeEnum.OVERDUE) {
|
|
564
|
+
return issueTargetDate < today; // Only keep issues with target_date before today
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return true; // Default: no filtering for other issue types
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
else {
|
|
572
|
+
// Fetch all tasks based on idField
|
|
573
|
+
if (idField === 'employeeId') {
|
|
574
|
+
tasks = await this._issueService.findByEmployee(id, relations); // Directly pass the employeeId
|
|
575
|
+
}
|
|
576
|
+
else {
|
|
577
|
+
tasks = await this._issueService.findAll({ createdByUserId: id }, relations); // Directly pass the creatorId
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
// Filter and transform tasks based on issue type
|
|
581
|
+
return this.filterAndTransformTasks(tasks, issue_type);
|
|
582
|
+
}
|
|
583
|
+
catch (error) {
|
|
584
|
+
this.logger.error(`Failed to get issues: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
|
|
585
|
+
throw new common_1.BadRequestException(error);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Filters and transforms the tasks based on issue type.
|
|
590
|
+
*/
|
|
591
|
+
filterAndTransformTasks(tasks, issue_type) {
|
|
592
|
+
const isCompleted = issue_type === plugin_integration_plane_models_1.DashboardIssueTypeEnum.COMPLETED;
|
|
593
|
+
return tasks
|
|
594
|
+
.filter((task) => {
|
|
595
|
+
const status = 'status' in task
|
|
596
|
+
? task.status
|
|
597
|
+
: 'state__group' in task
|
|
598
|
+
? task.state__group
|
|
599
|
+
: null;
|
|
600
|
+
return isCompleted
|
|
601
|
+
? status === plugin_integration_plane_models_1.TaskStatusEnum.COMPLETED ||
|
|
602
|
+
status === plugin_integration_plane_models_1.TaskStatusEnum.DONE
|
|
603
|
+
: status !== plugin_integration_plane_models_1.TaskStatusEnum.COMPLETED &&
|
|
604
|
+
status !== plugin_integration_plane_models_1.TaskStatusEnum.DONE;
|
|
605
|
+
})
|
|
606
|
+
.map((task) => ('status' in task ? (0, config_1.issueTransformer)(task) : task));
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Retrieves a summary of the user's work statistics, including task distribution
|
|
610
|
+
* by state and priority, as well as counts for created, assigned, and completed issues.
|
|
611
|
+
*
|
|
612
|
+
* @returns {Promise<IUserStatsResponse>} A promise that resolves with the user's work summary.
|
|
613
|
+
*
|
|
614
|
+
* @throws {BadRequestException} If an error occurs during the retrieval of work statistics.
|
|
615
|
+
*/
|
|
616
|
+
async findUserWorkSummary(employeeId) {
|
|
617
|
+
var _a, _b;
|
|
618
|
+
try {
|
|
619
|
+
const assignedIssues = await this._issueService.findExternalByEmployee(employeeId, [
|
|
620
|
+
'taskStatus'
|
|
621
|
+
]);
|
|
622
|
+
const subscribedIssues = await this.findUserSubscribedIssues([]);
|
|
623
|
+
const { completedIssues, backlogIssues, startedIssues, unstartedIssues } = (0, config_1.getTaskCounts)(assignedIssues);
|
|
624
|
+
const createdIssues = await this.findMyCreatedIssues();
|
|
625
|
+
return {
|
|
626
|
+
state_distribution: [
|
|
627
|
+
{ state_group: 'backlog', state_count: backlogIssues },
|
|
628
|
+
{ state_group: 'unstarted', state_count: unstartedIssues },
|
|
629
|
+
{ state_group: 'started', state_count: startedIssues },
|
|
630
|
+
{ state_group: 'completed', state_count: completedIssues }
|
|
631
|
+
],
|
|
632
|
+
priority_distribution: (0, config_1.userIssuesByPriority)(assignedIssues),
|
|
633
|
+
created_issues: createdIssues.length,
|
|
634
|
+
assigned_issues: assignedIssues.length,
|
|
635
|
+
completed_issues: completedIssues,
|
|
636
|
+
pending_issues: backlogIssues + startedIssues + unstartedIssues,
|
|
637
|
+
subscribed_issues: subscribedIssues.length || 0,
|
|
638
|
+
present_cycles: [],
|
|
639
|
+
upcoming_cycles: []
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
catch (error) {
|
|
643
|
+
this.logger.error(`Failed to find user work summary: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
|
|
644
|
+
throw new common_1.BadRequestException(error);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Retrieves the user's recent activity
|
|
649
|
+
*
|
|
650
|
+
* @returns {Promise<Object>} A promise that resolves with a structured response containing user activity details.
|
|
651
|
+
*/
|
|
652
|
+
async findUserRecentActivity(per_page, employeeId) {
|
|
653
|
+
try {
|
|
654
|
+
const activities = await this.findRecentIssueActivity(per_page, employeeId);
|
|
655
|
+
return {
|
|
656
|
+
grouped_by: null,
|
|
657
|
+
sub_grouped_by: null,
|
|
658
|
+
total_count: 165,
|
|
659
|
+
next_cursor: '10:1:0',
|
|
660
|
+
prev_cursor: '10:-1:1',
|
|
661
|
+
next_page_results: true,
|
|
662
|
+
prev_page_results: false,
|
|
663
|
+
count: 10,
|
|
664
|
+
total_pages: 17,
|
|
665
|
+
total_results: 165,
|
|
666
|
+
extra_stats: null,
|
|
667
|
+
results: activities
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
catch (error) {
|
|
671
|
+
this.logger.error(`Failed to find user recent activity: ${error === null || error === void 0 ? void 0 : error.message}`, error.stack);
|
|
672
|
+
throw new common_1.BadRequestException(error);
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
/**
|
|
676
|
+
* Retrieves the project data associated with the currently connected user.
|
|
677
|
+
* This method fetches projects linked to the employee and user ID, then transforms
|
|
678
|
+
* the data using the `userWorkProjectsTransformer`.
|
|
679
|
+
*
|
|
680
|
+
* @returns {Promise<IUserProjectsDataResponse>} A promise that resolves with the user's projects data.
|
|
681
|
+
* @throws {BadRequestException} If an error occurs during the data retrieval or transformation process.
|
|
682
|
+
*
|
|
683
|
+
*/
|
|
684
|
+
async findUserProjectsData(employeeId) {
|
|
685
|
+
try {
|
|
686
|
+
const userId = (0, config_1.currentUserId)();
|
|
687
|
+
const userProjects = await this._projectService.getExternalProjectsByEmployee(employeeId, ['members.employee.user', 'tasks.members']);
|
|
688
|
+
return (0, config_1.userWorkProjectsTransformer)(userProjects, employeeId, userId);
|
|
689
|
+
}
|
|
690
|
+
catch (error) {
|
|
691
|
+
this.logger.error(`Failed to find user projects data: ${error === null || error === void 0 ? void 0 : error.message}`, error.stack);
|
|
692
|
+
throw new common_1.BadRequestException(error);
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
/**
|
|
696
|
+
* Retrieves and groups issues assigned to a user based on the specified grouping option.
|
|
697
|
+
* This method fetches issues assigned to the current employee and organizes them into groups,
|
|
698
|
+
* such as by state or other criteria provided in the options.
|
|
699
|
+
*
|
|
700
|
+
* @param {IIssueFindInput} options - The input options specifying the grouping criteria.
|
|
701
|
+
*
|
|
702
|
+
* @returns A promise that resolves to an array of grouped issues.
|
|
703
|
+
* Each group is structured based on the specified grouping option.
|
|
704
|
+
*
|
|
705
|
+
* @throws {BadRequestException} Throws if an error occurs during issue retrieval or processing.
|
|
706
|
+
*/
|
|
707
|
+
async findUserGroupedIssueAssigned(options) {
|
|
708
|
+
var _a;
|
|
709
|
+
try {
|
|
710
|
+
const { assignees, created_by, group_by, order_by, subscriber } = options;
|
|
711
|
+
let assignedIssues = [];
|
|
712
|
+
const relations = ['taskStatus'];
|
|
713
|
+
if (assignees) {
|
|
714
|
+
assignedIssues =
|
|
715
|
+
await this._issueService.findExternalByEmployee((0, config_1.issueFilterSplitter)(assignees)[0], relations, order_by);
|
|
716
|
+
}
|
|
717
|
+
else if (created_by) {
|
|
718
|
+
const createdTasks = await this._issueService.findAllExternal({
|
|
719
|
+
created_by: (_a = (0, config_1.currentUserId)()) !== null && _a !== void 0 ? _a : undefined
|
|
720
|
+
}, relations, order_by);
|
|
721
|
+
assignedIssues = createdTasks.items;
|
|
722
|
+
}
|
|
723
|
+
else if (subscriber) {
|
|
724
|
+
assignedIssues = await this.findUserSubscribedIssues(relations, order_by);
|
|
725
|
+
}
|
|
726
|
+
else {
|
|
727
|
+
assignedIssues = (await this._issueService.findAllExternal({}, relations, order_by)).items.filter((task) => task.projectId);
|
|
728
|
+
}
|
|
729
|
+
const issuesWithLinks = await Promise.all((assignedIssues !== null && assignedIssues !== void 0 ? assignedIssues : []).map(async (issue) => {
|
|
730
|
+
const issueLinks = await this._issueLinkService.findAll(plugin_integration_plane_models_1.BaseEntityEnum.Task, issue.id);
|
|
731
|
+
const transformedIssueLinks = (0, config_1.issueLinkTransformer)(issueLinks);
|
|
732
|
+
return {
|
|
733
|
+
issue,
|
|
734
|
+
issueLinks: transformedIssueLinks
|
|
735
|
+
};
|
|
736
|
+
}));
|
|
737
|
+
if (group_by === plugin_integration_plane_models_1.IssueGroupByEnum.STATE_GROUP) {
|
|
738
|
+
return (0, config_1.groupIssuesByStateGroup)(issuesWithLinks);
|
|
739
|
+
}
|
|
740
|
+
if (group_by === plugin_integration_plane_models_1.IssueGroupByEnum.PRIORITY) {
|
|
741
|
+
return (0, config_1.groupIssuesByPriority)(issuesWithLinks);
|
|
742
|
+
}
|
|
743
|
+
if (group_by === plugin_integration_plane_models_1.IssueGroupByEnum.PROJECT_ID) {
|
|
744
|
+
return (0, config_1.groupIssuesByProjectId)(issuesWithLinks);
|
|
745
|
+
}
|
|
746
|
+
if (group_by === plugin_integration_plane_models_1.IssueGroupByEnum.LABEL_ID) {
|
|
747
|
+
return (0, config_1.groupIssuesByLabel)(issuesWithLinks);
|
|
748
|
+
}
|
|
749
|
+
return (0, config_1.userWorkNonGroupedIssues)(issuesWithLinks);
|
|
750
|
+
}
|
|
751
|
+
catch (error) {
|
|
752
|
+
this.logger.error('Failed to find user grouped issue assigned', error instanceof Error ? error.stack : String(error));
|
|
753
|
+
throw new common_1.BadRequestException(error);
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
async findUserSubscribedIssues(relations, order_by) {
|
|
757
|
+
var _a;
|
|
758
|
+
const tasks = await this._issueService.findAllExternal({}, relations, order_by);
|
|
759
|
+
const subscriptions = await this._subscriptionService.findAll({
|
|
760
|
+
entity: plugin_integration_plane_models_1.BaseEntityEnum.Task,
|
|
761
|
+
userId: (_a = (0, config_1.currentUserId)()) !== null && _a !== void 0 ? _a : undefined
|
|
762
|
+
});
|
|
763
|
+
const subscribedTaskIds = subscriptions.map((subscription) => subscription.entityId);
|
|
764
|
+
return tasks.items.filter((task) => subscribedTaskIds.includes(task.id));
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Fetches all workspace states associated with projects in the workspace.
|
|
768
|
+
* This method retrieves all projects in the workspace, then queries each project's states,
|
|
769
|
+
* consolidating them into a single array.
|
|
770
|
+
*
|
|
771
|
+
* @returns A promise resolving to an array of workspace states.
|
|
772
|
+
* Each state corresponds to a specific project within the workspace.
|
|
773
|
+
*
|
|
774
|
+
* @throws {BadRequestException} Throws if an error occurs during project or state retrieval.
|
|
775
|
+
*/
|
|
776
|
+
async findWorkspaceStates() {
|
|
777
|
+
try {
|
|
778
|
+
const projects = await this._projectService.getExternalProjects([
|
|
779
|
+
'statuses'
|
|
780
|
+
]);
|
|
781
|
+
const states = projects.map((project) => project.statuses);
|
|
782
|
+
return (0, config_1.getStatesTransformer)(states.flat());
|
|
783
|
+
}
|
|
784
|
+
catch (error) {
|
|
785
|
+
this.logger.error('Failed to find workspace states', error instanceof Error ? error.stack : String(error));
|
|
786
|
+
throw new common_1.BadRequestException(error);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Fetches all workspace modules associated with projects in the workspace.
|
|
791
|
+
* This method retrieves all projects within the workspace and then queries
|
|
792
|
+
* each project's modules, consolidating them into a single array.
|
|
793
|
+
*
|
|
794
|
+
* @returns {Promise<IModule[]>} A promise resolving to an array of project modules.
|
|
795
|
+
* Each module corresponds to a specific project within the workspace.
|
|
796
|
+
*
|
|
797
|
+
* @throws {BadRequestException} Throws if an error occurs during project or module retrieval.
|
|
798
|
+
*/
|
|
799
|
+
async findWorkspaceModules() {
|
|
800
|
+
try {
|
|
801
|
+
const projects = await this._projectService.getExternalProjects([
|
|
802
|
+
'modules'
|
|
803
|
+
]);
|
|
804
|
+
const modules = projects.map((project) => project.modules).flat();
|
|
805
|
+
const transformedModules = (0, config_1.modulesTransformer)(Array.isArray(modules) ? modules : [modules]);
|
|
806
|
+
return Array.isArray(transformedModules)
|
|
807
|
+
? transformedModules
|
|
808
|
+
: [transformedModules];
|
|
809
|
+
}
|
|
810
|
+
catch (error) {
|
|
811
|
+
this.logger.error('Failed to find workspace modules', error instanceof Error ? error.stack : String(error));
|
|
812
|
+
throw new common_1.BadRequestException(error);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* Fetches all cycles associated with projects in the workspace.
|
|
817
|
+
* This method retrieves all projects within the workspace and then queries
|
|
818
|
+
* each project's cycles, consolidating them into a single array.
|
|
819
|
+
*
|
|
820
|
+
* @returns {Promise<ICycle[]>} A promise resolving to an array of cycles.
|
|
821
|
+
* Each cycle corresponds to a specific project within the workspace.
|
|
822
|
+
*
|
|
823
|
+
* @throws {BadRequestException} Throws if an error occurs during project or cycle retrieval.
|
|
824
|
+
*/
|
|
825
|
+
async findWorkspaceCycles() {
|
|
826
|
+
try {
|
|
827
|
+
const projects = await this._projectService.getExternalProjects([
|
|
828
|
+
'organizationSprints'
|
|
829
|
+
]);
|
|
830
|
+
const cycles = projects
|
|
831
|
+
.map((project) => project.organizationSprints)
|
|
832
|
+
.flat();
|
|
833
|
+
const transformedSprints = (0, config_1.cycleTransformer)(Array.isArray(cycles) ? cycles : [cycles]);
|
|
834
|
+
return Array.isArray(transformedSprints)
|
|
835
|
+
? transformedSprints
|
|
836
|
+
: [transformedSprints];
|
|
837
|
+
}
|
|
838
|
+
catch (error) {
|
|
839
|
+
this.logger.error('Failed to find workspace cycles', error instanceof Error ? error.stack : String(error));
|
|
840
|
+
throw new common_1.BadRequestException(error);
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Retrieves all labels associated with the projects in the workspace.
|
|
845
|
+
* This method fetches all projects along with their tags and transforms the tags
|
|
846
|
+
* into issue labels, consolidating them into a single array.
|
|
847
|
+
*
|
|
848
|
+
* @returns {Promise<IIssueLabel[]>} A promise resolving to an array of issue labels (`IIssueLabel[]`),
|
|
849
|
+
* each associated with a specific project in the workspace.
|
|
850
|
+
*
|
|
851
|
+
* @throws {BadRequestException} Throws if an error occurs during project or label retrieval.
|
|
852
|
+
*/
|
|
853
|
+
async findWorkspaceLabels() {
|
|
854
|
+
try {
|
|
855
|
+
const projects = await this._projectService.getExternalProjects([
|
|
856
|
+
'tags'
|
|
857
|
+
]);
|
|
858
|
+
const labels = projects
|
|
859
|
+
.map((project) => {
|
|
860
|
+
const transformed = (0, config_1.issueLabelsTransformer)(project.tags, project.id);
|
|
861
|
+
return Array.isArray(transformed)
|
|
862
|
+
? transformed
|
|
863
|
+
: [transformed];
|
|
864
|
+
})
|
|
865
|
+
.flat();
|
|
866
|
+
return labels;
|
|
867
|
+
}
|
|
868
|
+
catch (error) {
|
|
869
|
+
this.logger.error('Failed to find workspace labels', error instanceof Error ? error.stack : String(error));
|
|
870
|
+
throw new common_1.BadRequestException(error);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
/*
|
|
874
|
+
|--------------------------------------------------------------------------
|
|
875
|
+
| DRAFT ISSUES
|
|
876
|
+
|--------------------------------------------------------------------------
|
|
877
|
+
*/
|
|
878
|
+
/**
|
|
879
|
+
* Creates a new draft issue.
|
|
880
|
+
* @param {IIssueCreateInput} input - The input data required to create a draft issue.
|
|
881
|
+
* @returns {Promise<IIssue>} A promise that resolves to the newly created draft issue.
|
|
882
|
+
*/
|
|
883
|
+
async createDraftIssue(input) {
|
|
884
|
+
return await this._draftIssueService.create(input);
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* Updates an issue with the given ID and input data, ensuring it remains a draft.
|
|
888
|
+
*
|
|
889
|
+
* @param {ID} id - The unique identifier of the issue to update.
|
|
890
|
+
* @param {IIssueUpdateInput} input - The data to update the issue with.
|
|
891
|
+
* @returns {Promise<IIssue>} A promise that resolves to the updated issue.
|
|
892
|
+
*/
|
|
893
|
+
async updateDraftIssue(id, input) {
|
|
894
|
+
return await this._draftIssueService.update(id, input);
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Retrieves all draft issues.
|
|
898
|
+
*
|
|
899
|
+
* @returns {Promise<any>} A promise that resolves to a list of transformed issues.
|
|
900
|
+
*/
|
|
901
|
+
async findDraftIssues() {
|
|
902
|
+
return await this._draftIssueService.findAll();
|
|
903
|
+
}
|
|
904
|
+
async draftToIssue(id, input) {
|
|
905
|
+
return await this._draftIssueService.dratfToIssue(id, input);
|
|
906
|
+
}
|
|
907
|
+
/*
|
|
908
|
+
|--------------------------------------------------------------------------
|
|
909
|
+
| GLOBAL SEARCH
|
|
910
|
+
|--------------------------------------------------------------------------
|
|
911
|
+
*/
|
|
912
|
+
/**
|
|
913
|
+
* Finds global entities based on search criteria across various domains.
|
|
914
|
+
*
|
|
915
|
+
* @param {IGlabalEntitiesFindInput} options - Search options, including project ID and search term.
|
|
916
|
+
* @returns {Promise<IGlobalEntitiesResponse>} A response containing filtered results across multiple entities.
|
|
917
|
+
* @throws {BadRequestException} Throws if the operation fails.
|
|
918
|
+
*/
|
|
919
|
+
async findGlobalEntitiesBySearch(options) {
|
|
920
|
+
var _a, _b;
|
|
921
|
+
try {
|
|
922
|
+
// Retrieve and serialize projects
|
|
923
|
+
const projects = await this._projectService.getExternalProjects([]);
|
|
924
|
+
const serializedProjects = (0, config_1.getProjectsResponse)(projects);
|
|
925
|
+
// Retrieve and serialize tasks (issues)
|
|
926
|
+
const issues = await this._issueService.findAllExternal(options.project_id ? { projectId: options.project_id } : {}, ['project', 'tenant']);
|
|
927
|
+
const serializedIssues = issues.items.map((task) => (0, config_1.issueTransformer)(task));
|
|
928
|
+
// Retrieve and serialize cycles
|
|
929
|
+
const cycles = await this._cycleService.findAll(options.project_id);
|
|
930
|
+
const serializedCycles = Array.isArray(cycles) ? cycles : [cycles];
|
|
931
|
+
// Retrieve and serialize project modules
|
|
932
|
+
const modules = await this._projectModuleService.getAllModulesByProject(options.project_id);
|
|
933
|
+
const serializedModules = Array.isArray(modules)
|
|
934
|
+
? modules
|
|
935
|
+
: [modules];
|
|
936
|
+
// Retrieve and serialize views
|
|
937
|
+
const views = await this._issueViewService.findAll(options.project_id);
|
|
938
|
+
const serializedViews = Array.isArray(views) ? views : [views];
|
|
939
|
+
const searchTerm = options.search.toLowerCase();
|
|
940
|
+
return {
|
|
941
|
+
results: {
|
|
942
|
+
workspace: [], // TODO : Integrate workspaces APIs
|
|
943
|
+
project: this.filterByName(searchTerm, serializedProjects),
|
|
944
|
+
issue: this.filterByName(searchTerm, serializedIssues),
|
|
945
|
+
cycle: this.filterByName(searchTerm, serializedCycles),
|
|
946
|
+
module: this.filterByName(searchTerm, serializedModules),
|
|
947
|
+
issue_view: this.filterByName(searchTerm, serializedViews),
|
|
948
|
+
page: [] // Placeholder for future integration
|
|
949
|
+
}
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
catch (error) {
|
|
953
|
+
this.logger.error(`Failed to find global entities by search: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
|
|
954
|
+
throw new common_1.BadRequestException(error.response);
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* Filters entities based on a search term in a specified key.
|
|
959
|
+
* @param searchTerm The term to search for.
|
|
960
|
+
* @param entities The array of entities to filter.
|
|
961
|
+
* @param key The key in each entity object where the search will be performed. Default is 'name'.
|
|
962
|
+
* @returns Filtered array of entities.
|
|
963
|
+
*/
|
|
964
|
+
filterByName(searchTerm, entities, key = 'name') {
|
|
965
|
+
return entities.filter((entity) => { var _a; return (_a = entity[key]) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(searchTerm.toLowerCase()); });
|
|
966
|
+
}
|
|
967
|
+
/**
|
|
968
|
+
* Performs an entity search based on the provided options.
|
|
969
|
+
*
|
|
970
|
+
* Currently, this function supports the `user_mention` query type, which retrieves
|
|
971
|
+
* project members and maps their details into a simplified format for user mentions.
|
|
972
|
+
*
|
|
973
|
+
* @param {IEntitySearchFindInput} options - The search options containing `project_id`
|
|
974
|
+
* and `query_type`.
|
|
975
|
+
* @returns {Promise<any>} A promise resolving to an object containing the user mention details.
|
|
976
|
+
* @throws {BadRequestException} Throws a BadRequestException if an error occurs during the process.
|
|
977
|
+
*/
|
|
978
|
+
async entitySearch(options) {
|
|
979
|
+
const { project_id, query_type } = options;
|
|
980
|
+
try {
|
|
981
|
+
let members = [];
|
|
982
|
+
if (query_type === 'user_mention') {
|
|
983
|
+
if ((0, config_1.isNotEmpty)(project_id)) {
|
|
984
|
+
const project = await this._projectService.getProject(project_id, ['members.employee.user']);
|
|
985
|
+
members = project.members || [];
|
|
986
|
+
}
|
|
987
|
+
else {
|
|
988
|
+
const projects = await this._projectService.getProjects(['members.employee.user'], 'objects');
|
|
989
|
+
members = projects.flatMap((project) => project.members || []);
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
return {
|
|
993
|
+
user_mention: members
|
|
994
|
+
.filter((member) => member != null && typeof member !== 'string')
|
|
995
|
+
.map(({ member__display_name, member__id, member__avatar }) => ({
|
|
996
|
+
member__display_name,
|
|
997
|
+
member__id,
|
|
998
|
+
member__avatar_url: member__avatar
|
|
999
|
+
}))
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
catch (error) {
|
|
1003
|
+
throw new common_1.BadRequestException(error);
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
/*
|
|
1007
|
+
|--------------------------------------------------------------------------
|
|
1008
|
+
| VIEWS
|
|
1009
|
+
|--------------------------------------------------------------------------
|
|
1010
|
+
*/
|
|
1011
|
+
/**
|
|
1012
|
+
* Retrieves issues based on the provided options and the referer.
|
|
1013
|
+
*
|
|
1014
|
+
* If a `viewId` can be extracted from the referer, the function retrieves all issues
|
|
1015
|
+
* associated with a specific project using the `_issueService`. If no `viewId` is found,
|
|
1016
|
+
* the function fetches issues grouped by user assignment.
|
|
1017
|
+
*
|
|
1018
|
+
* @async
|
|
1019
|
+
* @param {IIssueFindInput} options - The search options for filtering issues.
|
|
1020
|
+
* @param {string} referer - The referer URL, used to extract a workspace view ID.
|
|
1021
|
+
* @returns A promise resolving to the issues, either grouped by user
|
|
1022
|
+
* assignment or retrieved by project.
|
|
1023
|
+
* @throws {BadRequestException} Throws a BadRequestException if an error occurs during
|
|
1024
|
+
* the process.
|
|
1025
|
+
*/
|
|
1026
|
+
async findViewIssues(options, referer) {
|
|
1027
|
+
var _a, _b;
|
|
1028
|
+
try {
|
|
1029
|
+
// Extract the view ID from the referer if it exists
|
|
1030
|
+
const viewId = (0, config_1.extractWorkspaceViewIdFromReferer)(referer);
|
|
1031
|
+
if (!viewId) {
|
|
1032
|
+
return this.findUserGroupedIssueAssigned(options);
|
|
1033
|
+
}
|
|
1034
|
+
return this._issueService.getAllIssuesByProject(undefined, options, referer);
|
|
1035
|
+
}
|
|
1036
|
+
catch (error) {
|
|
1037
|
+
this.logger.error(`Failed to find view issues: ${((_b = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.message) || error.message}`, error.stack);
|
|
1038
|
+
throw new common_1.BadRequestException(error.response);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
/*
|
|
1042
|
+
|--------------------------------------------------------------------------
|
|
1043
|
+
| NOTIFICATIONS SERVICES
|
|
1044
|
+
|--------------------------------------------------------------------------
|
|
1045
|
+
*/
|
|
1046
|
+
/**
|
|
1047
|
+
* Fetches the notifications for the current user.
|
|
1048
|
+
*
|
|
1049
|
+
* @async
|
|
1050
|
+
* @returns {Promise<INotificationResponse>} A promise that resolves to the notification response.
|
|
1051
|
+
*/
|
|
1052
|
+
async findUserNotification() {
|
|
1053
|
+
try {
|
|
1054
|
+
const employeeId = (0, config_1.currentEmployeeId)();
|
|
1055
|
+
const userNotifications = await this._notificationService.findAll({
|
|
1056
|
+
receiverId: employeeId !== null && employeeId !== void 0 ? employeeId : undefined,
|
|
1057
|
+
entity: plugin_integration_plane_models_1.BaseEntityEnum.Task
|
|
1058
|
+
});
|
|
1059
|
+
const notifications = await Promise.all((userNotifications !== null && userNotifications !== void 0 ? userNotifications : []).map(async (notification) => {
|
|
1060
|
+
const task = await this._issueService.getExternalIssue(notification.entityId, ['members', 'project.members.employee.user']);
|
|
1061
|
+
const tranformedNotification = (0, config_1.notificationTranformer)(notification, task);
|
|
1062
|
+
return Array.isArray(tranformedNotification)
|
|
1063
|
+
? tranformedNotification
|
|
1064
|
+
: [tranformedNotification];
|
|
1065
|
+
}));
|
|
1066
|
+
const results = notifications.flat();
|
|
1067
|
+
return {
|
|
1068
|
+
grouped_by: undefined,
|
|
1069
|
+
sub_grouped_by: undefined,
|
|
1070
|
+
total_count: results.length,
|
|
1071
|
+
next_cursor: '300:1:0',
|
|
1072
|
+
prev_cursor: '300:-1:1',
|
|
1073
|
+
next_page_results: false,
|
|
1074
|
+
prev_page_results: false,
|
|
1075
|
+
count: results.length,
|
|
1076
|
+
total_pages: 1,
|
|
1077
|
+
total_results: results.length,
|
|
1078
|
+
extra_stats: null,
|
|
1079
|
+
results
|
|
1080
|
+
};
|
|
1081
|
+
}
|
|
1082
|
+
catch (error) {
|
|
1083
|
+
this.logger.error(`Failed to find user notifications: ${error === null || error === void 0 ? void 0 : error.message}`, error.stack);
|
|
1084
|
+
throw new common_1.BadRequestException(error);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
/**
|
|
1088
|
+
* Fetches the unread notifications for the current user.
|
|
1089
|
+
*
|
|
1090
|
+
* @async
|
|
1091
|
+
* @returns {Promise<IUnreadNotificationResponse>} A promise that resolves to the unread notification data.
|
|
1092
|
+
*/
|
|
1093
|
+
async findUnreadNotifications() {
|
|
1094
|
+
try {
|
|
1095
|
+
const receiverId = (0, config_1.currentEmployeeId)();
|
|
1096
|
+
const userNotifications = await this._notificationService.findAll({
|
|
1097
|
+
receiverId: receiverId !== null && receiverId !== void 0 ? receiverId : undefined,
|
|
1098
|
+
entity: plugin_integration_plane_models_1.BaseEntityEnum.Task,
|
|
1099
|
+
isRead: false
|
|
1100
|
+
});
|
|
1101
|
+
return (0, config_1.unreadNotificationData)(userNotifications);
|
|
1102
|
+
}
|
|
1103
|
+
catch (error) {
|
|
1104
|
+
this.logger.error('Failed to find unread notifications', error instanceof Error ? error.stack : String(error));
|
|
1105
|
+
throw new common_1.BadRequestException(error);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* Updates a notification to be on hold until a specified date.
|
|
1110
|
+
*
|
|
1111
|
+
* @async
|
|
1112
|
+
* @param {ID} id - The ID of the notification to update.
|
|
1113
|
+
* @param {INotification} input - The input object containing the snoozed_till date.
|
|
1114
|
+
* @returns {Promise<any>} A promise that resolves to the result of the update operation.
|
|
1115
|
+
*/
|
|
1116
|
+
async holdNotification(id, input) {
|
|
1117
|
+
var _a;
|
|
1118
|
+
return await this._notificationService.update(id, {
|
|
1119
|
+
onHoldUntil: (_a = input.snoozed_till) !== null && _a !== void 0 ? _a : undefined
|
|
1120
|
+
});
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* Marks all notifications as read.
|
|
1124
|
+
*
|
|
1125
|
+
* @async
|
|
1126
|
+
* @returns {Promise<any>} A promise that resolves to the response data.
|
|
1127
|
+
*/
|
|
1128
|
+
async markAllAsRead() {
|
|
1129
|
+
return await this._notificationService.markAllAsRead();
|
|
1130
|
+
}
|
|
1131
|
+
/**
|
|
1132
|
+
* Archives a notification.
|
|
1133
|
+
*
|
|
1134
|
+
* @async
|
|
1135
|
+
* @param {ID} id - The ID of the notification to archive.
|
|
1136
|
+
* @returns {Promise<any>} A promise that resolves to the result of the archive operation.
|
|
1137
|
+
*/
|
|
1138
|
+
async archiveNotification(id) {
|
|
1139
|
+
return this._toggleNotificationStatus(id, 'isArchived', true);
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Unarchives a notification.
|
|
1143
|
+
*
|
|
1144
|
+
* @async
|
|
1145
|
+
* @param {ID} id - The ID of the notification to unarchive.
|
|
1146
|
+
* @returns {Promise<any>} A promise that resolves to the result of the unarchive operation.
|
|
1147
|
+
*/
|
|
1148
|
+
async unArchiveNotification(id) {
|
|
1149
|
+
return this._toggleNotificationStatus(id, 'isArchived', false);
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* Marks a notification as read and returns the updated notification.
|
|
1153
|
+
*
|
|
1154
|
+
* @async
|
|
1155
|
+
* @param {ID} id - The ID of the notification to mark as read.
|
|
1156
|
+
* @returns {Promise<INotification>} A promise that resolves to the updated notification.
|
|
1157
|
+
*/
|
|
1158
|
+
async readNotification(id) {
|
|
1159
|
+
return this._toggleNotificationStatus(id, 'isRead', true);
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* Marks a notification as unread and returns the updated notification.
|
|
1163
|
+
*
|
|
1164
|
+
* @async
|
|
1165
|
+
* @param {ID} id - The ID of the notification to mark as read.
|
|
1166
|
+
* @returns {Promise<INotification>} A promise that resolves to the updated notification.
|
|
1167
|
+
*/
|
|
1168
|
+
async unreadNotification(id) {
|
|
1169
|
+
return this._toggleNotificationStatus(id, 'isRead', false);
|
|
1170
|
+
}
|
|
1171
|
+
/**
|
|
1172
|
+
* Toggles the status of a notification.
|
|
1173
|
+
*
|
|
1174
|
+
* @private
|
|
1175
|
+
* @async
|
|
1176
|
+
* @param {ID} id - The ID of the notification to toggle.
|
|
1177
|
+
* @param {'isRead' | 'isArchived'} statusKey - The key of the status to toggle.
|
|
1178
|
+
* @param {boolean} statusValue - The value of the status to toggle.
|
|
1179
|
+
* @returns {Promise<INotification>} A promise that resolves to the updated notification.
|
|
1180
|
+
*/
|
|
1181
|
+
async _toggleNotificationStatus(id, statusKey, statusValue) {
|
|
1182
|
+
try {
|
|
1183
|
+
const timestampKey = statusKey === 'isRead' ? 'readAt' : 'archivedAt';
|
|
1184
|
+
await this._notificationService.update(id, {
|
|
1185
|
+
[statusKey]: statusValue,
|
|
1186
|
+
[timestampKey]: statusValue ? new Date() : null
|
|
1187
|
+
});
|
|
1188
|
+
const updatedNotification = await this._notificationService.findOne(id);
|
|
1189
|
+
const task = await this._issueService.getExternalIssue(updatedNotification.entityId, ['members', 'project.members.employee.user']);
|
|
1190
|
+
const transformedNotification = (0, config_1.notificationTranformer)(updatedNotification, task);
|
|
1191
|
+
return Array.isArray(transformedNotification)
|
|
1192
|
+
? transformedNotification[0]
|
|
1193
|
+
: transformedNotification;
|
|
1194
|
+
}
|
|
1195
|
+
catch (error) {
|
|
1196
|
+
this.logger.error('Failed to toggle notification status', error instanceof Error ? error.stack : String(error));
|
|
1197
|
+
throw new common_1.BadRequestException(error);
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
/*
|
|
1201
|
+
|--------------------------------------------------------------------------
|
|
1202
|
+
| QUICK LINKS SERVICES
|
|
1203
|
+
|--------------------------------------------------------------------------
|
|
1204
|
+
*/
|
|
1205
|
+
/**
|
|
1206
|
+
* Creates a quick link, an issue link that is not associated with any issue.
|
|
1207
|
+
*
|
|
1208
|
+
* @param input - The input data for creating the quick link.
|
|
1209
|
+
* @returns The created quick link.
|
|
1210
|
+
* @throws {BadRequestException} If the API returns an array of links instead of a single link.
|
|
1211
|
+
*/
|
|
1212
|
+
async createQuickLink(input) {
|
|
1213
|
+
const link = await this._issueLinkService.create(input, (0, config_1.getCurrentOrganizationSlug)(), 'organization');
|
|
1214
|
+
return (0, config_1.issueLinkTransformer)(link);
|
|
1215
|
+
}
|
|
1216
|
+
/**
|
|
1217
|
+
* Updates a quick link in the workspace.
|
|
1218
|
+
*
|
|
1219
|
+
* @param linkId - The ID of the quick link to update.
|
|
1220
|
+
* @param input - The updated data for the quick link.
|
|
1221
|
+
* @returns The updated quick link.
|
|
1222
|
+
*/
|
|
1223
|
+
async updateQuickLink(linkId, input) {
|
|
1224
|
+
const link = await this._issueLinkService.update(linkId, '', (0, config_1.getCurrentOrganizationSlug)(), input, plugin_integration_plane_models_1.BaseEntityEnum.Organization);
|
|
1225
|
+
return (0, config_1.issueLinkTransformer)(link);
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Finds all quick links in the workspace.
|
|
1229
|
+
* @returns {Promise<IIssueLink[]>} A promise resolved to an array of quick links.
|
|
1230
|
+
*/
|
|
1231
|
+
async findQuickLinks() {
|
|
1232
|
+
const quickLinks = await this._issueLinkService.findWorkspaceQuickLinks();
|
|
1233
|
+
const transformed = (0, config_1.issueLinkTransformer)(quickLinks);
|
|
1234
|
+
// Ensure the result is always an array
|
|
1235
|
+
return Array.isArray(transformed) ? transformed : [transformed];
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* Deletes a quick link from the workspace.
|
|
1239
|
+
*
|
|
1240
|
+
* @param id - The ID of the quick link to delete.
|
|
1241
|
+
* @returns A promise resolving to the deleted result.
|
|
1242
|
+
*/
|
|
1243
|
+
deleteQuickLink(id) {
|
|
1244
|
+
return this._issueLinkService.delete(id);
|
|
1245
|
+
}
|
|
1246
|
+
};
|
|
1247
|
+
exports.WorkspaceService = WorkspaceService;
|
|
1248
|
+
exports.WorkspaceService = WorkspaceService = __decorate([
|
|
1249
|
+
(0, common_1.Injectable)(),
|
|
1250
|
+
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => project_service_1.ProjectService))),
|
|
1251
|
+
__metadata("design:paramtypes", [project_service_1.ProjectService,
|
|
1252
|
+
issues_service_1.IssuesService,
|
|
1253
|
+
cycles_service_1.CyclesService,
|
|
1254
|
+
project_module_service_1.ProjectModuleService,
|
|
1255
|
+
view_service_1.IssueViewService,
|
|
1256
|
+
activity_service_1.ActivityService,
|
|
1257
|
+
issue_links_service_1.IssueLinksService,
|
|
1258
|
+
subscription_service_1.SubscriptionService,
|
|
1259
|
+
draft_issues_service_1.DraftIssuesService,
|
|
1260
|
+
employee_properties_service_1.EmployeePropertiesService,
|
|
1261
|
+
dashboard_service_1.DashboardService,
|
|
1262
|
+
widget_service_1.WidgetService,
|
|
1263
|
+
notification_service_1.NotificationService,
|
|
1264
|
+
api_fetch_service_1.ApiFetchService])
|
|
1265
|
+
], WorkspaceService);
|
|
1266
|
+
//# sourceMappingURL=workspace.service.js.map
|