@ever-gauzy/plugin-integration-plane-api 0.1.0 → 0.1.2
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 -1
- package/dist/config/serializers/analytics/analytics.serializer.d.ts +4 -0
- package/dist/config/serializers/analytics/analytics.serializer.js +1 -0
- package/dist/config/serializers/analytics/analytics.serializer.js.map +1 -1
- package/dist/config/serializers/cycles/cycle.serializer.d.ts +9 -0
- package/dist/config/serializers/cycles/cycle.serializer.js +32 -2
- package/dist/config/serializers/cycles/cycle.serializer.js.map +1 -1
- package/dist/config/serializers/index.d.ts +1 -0
- package/dist/config/serializers/index.js +1 -0
- package/dist/config/serializers/index.js.map +1 -1
- package/dist/config/serializers/issue-link/issue-link.serializer.js +6 -3
- package/dist/config/serializers/issue-link/issue-link.serializer.js.map +1 -1
- package/dist/config/serializers/modules/module.serializer.js +6 -10
- package/dist/config/serializers/modules/module.serializer.js.map +1 -1
- package/dist/config/serializers/notification/notification.serializer.js +3 -2
- package/dist/config/serializers/notification/notification.serializer.js.map +1 -1
- package/dist/config/serializers/recent-visits/recent-visits.serializer.js +2 -2
- package/dist/config/serializers/recent-visits/recent-visits.serializer.js.map +1 -1
- package/dist/config/serializers/stickies/index.d.ts +1 -0
- package/dist/config/serializers/stickies/index.js +18 -0
- package/dist/config/serializers/stickies/index.js.map +1 -0
- package/dist/config/serializers/stickies/sticky.serializer.d.ts +14 -0
- package/dist/config/serializers/stickies/sticky.serializer.js +100 -0
- package/dist/config/serializers/stickies/sticky.serializer.js.map +1 -0
- package/dist/config/serializers/tasks/tasks.serializer.d.ts +19 -16
- package/dist/config/serializers/tasks/tasks.serializer.js +147 -132
- package/dist/config/serializers/tasks/tasks.serializer.js.map +1 -1
- package/dist/config/serializers/user/actor-details.helper.d.ts +1 -1
- package/dist/config/serializers/user/actor-details.helper.js.map +1 -1
- package/dist/config/serializers/user/user.serializer.d.ts +37 -0
- package/dist/config/serializers/user/user.serializer.js +48 -0
- package/dist/config/serializers/user/user.serializer.js.map +1 -1
- package/dist/main.js +12 -0
- package/dist/main.js.map +1 -1
- package/dist/modules/activity/activity.service.js +1 -1
- package/dist/modules/activity/activity.service.js.map +1 -1
- package/dist/modules/advance-analytics/advance-analytics.controller.d.ts +10 -14
- package/dist/modules/advance-analytics/advance-analytics.controller.js +32 -71
- package/dist/modules/advance-analytics/advance-analytics.controller.js.map +1 -1
- package/dist/modules/advance-analytics/advance-analytics.module.d.ts +3 -11
- package/dist/modules/advance-analytics/advance-analytics.module.js +4 -30
- package/dist/modules/advance-analytics/advance-analytics.module.js.map +1 -1
- package/dist/modules/advance-analytics/advance-analytics.service.d.ts +59 -4
- package/dist/modules/advance-analytics/advance-analytics.service.js +274 -8
- package/dist/modules/advance-analytics/advance-analytics.service.js.map +1 -1
- package/dist/modules/advance-analytics/index.d.ts +2 -0
- package/dist/modules/advance-analytics/index.js +2 -0
- package/dist/modules/advance-analytics/index.js.map +1 -1
- package/dist/modules/advance-analytics/workspace-advance-analytics.controller.d.ts +37 -0
- package/dist/modules/advance-analytics/workspace-advance-analytics.controller.js +98 -0
- package/dist/modules/advance-analytics/workspace-advance-analytics.controller.js.map +1 -0
- package/dist/modules/advance-analytics/workspace-advance-analytics.module.d.ts +7 -0
- package/dist/modules/advance-analytics/workspace-advance-analytics.module.js +30 -0
- package/dist/modules/advance-analytics/workspace-advance-analytics.module.js.map +1 -0
- package/dist/modules/api-fetch/api-fetch.service.d.ts +26 -4
- package/dist/modules/api-fetch/api-fetch.service.js +70 -7
- package/dist/modules/api-fetch/api-fetch.service.js.map +1 -1
- package/dist/modules/auth/auth.guard.js +9 -4
- package/dist/modules/auth/auth.guard.js.map +1 -1
- package/dist/modules/auth/auth.service.js +17 -12
- package/dist/modules/auth/auth.service.js.map +1 -1
- package/dist/modules/comments/comments.service.js +7 -7
- package/dist/modules/comments/comments.service.js.map +1 -1
- package/dist/modules/cycles/archived-cycles.controller.d.ts +19 -0
- package/dist/modules/cycles/archived-cycles.controller.js +65 -0
- package/dist/modules/cycles/archived-cycles.controller.js.map +1 -0
- package/dist/modules/cycles/archived-cycles.module.d.ts +2 -0
- package/dist/modules/cycles/archived-cycles.module.js +22 -0
- package/dist/modules/cycles/archived-cycles.module.js.map +1 -0
- package/dist/modules/cycles/cycles.controller.d.ts +29 -1
- package/dist/modules/cycles/cycles.controller.js +66 -0
- package/dist/modules/cycles/cycles.controller.js.map +1 -1
- package/dist/modules/cycles/cycles.service.d.ts +56 -0
- package/dist/modules/cycles/cycles.service.js +209 -11
- package/dist/modules/cycles/cycles.service.js.map +1 -1
- package/dist/modules/dashboard/dashboard.service.js +3 -4
- package/dist/modules/dashboard/dashboard.service.js.map +1 -1
- package/dist/modules/dashboard/widget.service.js +2 -2
- package/dist/modules/dashboard/widget.service.js.map +1 -1
- package/dist/modules/employee-properties/employee-properties.service.js +3 -3
- package/dist/modules/employee-properties/employee-properties.service.js.map +1 -1
- package/dist/modules/invitation/invitation.service.js +23 -13
- package/dist/modules/invitation/invitation.service.js.map +1 -1
- package/dist/modules/issue-links/issue-links.service.js +5 -5
- package/dist/modules/issue-links/issue-links.service.js.map +1 -1
- package/dist/modules/issue-relations/issue-relations.service.js +3 -3
- package/dist/modules/issue-relations/issue-relations.service.js.map +1 -1
- package/dist/modules/issues/draft-issues/draft-issues.service.js +4 -4
- package/dist/modules/issues/draft-issues/draft-issues.service.js.map +1 -1
- package/dist/modules/issues/intake-issues/intake-issues.service.js +4 -4
- package/dist/modules/issues/intake-issues/intake-issues.service.js.map +1 -1
- package/dist/modules/issues/issue-labels/issue-labels.service.js +4 -4
- package/dist/modules/issues/issue-labels/issue-labels.service.js.map +1 -1
- package/dist/modules/issues/issues.service.js +34 -28
- package/dist/modules/issues/issues.service.js.map +1 -1
- package/dist/modules/mention/mention.service.js +1 -1
- package/dist/modules/mention/mention.service.js.map +1 -1
- package/dist/modules/notification/notification.service.js +4 -4
- package/dist/modules/notification/notification.service.js.map +1 -1
- package/dist/modules/pages/pages.controller.d.ts +7 -0
- package/dist/modules/pages/pages.controller.js +8 -7
- package/dist/modules/pages/pages.controller.js.map +1 -1
- package/dist/modules/pages/pages.service.d.ts +4 -4
- package/dist/modules/pages/pages.service.js +42 -68
- package/dist/modules/pages/pages.service.js.map +1 -1
- package/dist/modules/project/project-deploy-boards/project-deploy-boards.service.js +3 -3
- package/dist/modules/project/project-deploy-boards/project-deploy-boards.service.js.map +1 -1
- package/dist/modules/project/project-identifiers/project-identifiers.service.js +1 -1
- package/dist/modules/project/project-identifiers/project-identifiers.service.js.map +1 -1
- package/dist/modules/project/project.module.js +11 -9
- package/dist/modules/project/project.module.js.map +1 -1
- package/dist/modules/project/project.service.js +10 -10
- package/dist/modules/project/project.service.js.map +1 -1
- package/dist/modules/project-module/archived-modules.controller.d.ts +19 -0
- package/dist/modules/project-module/archived-modules.controller.js +65 -0
- package/dist/modules/project-module/archived-modules.controller.js.map +1 -0
- package/dist/modules/project-module/archived-modules.module.d.ts +2 -0
- package/dist/modules/project-module/archived-modules.module.js +22 -0
- package/dist/modules/project-module/archived-modules.module.js.map +1 -0
- package/dist/modules/project-module/project-module.controller.d.ts +62 -2
- package/dist/modules/project-module/project-module.controller.js +161 -2
- package/dist/modules/project-module/project-module.controller.js.map +1 -1
- package/dist/modules/project-module/project-module.module.js +2 -1
- package/dist/modules/project-module/project-module.module.js.map +1 -1
- package/dist/modules/project-module/project-module.service.d.ts +33 -0
- package/dist/modules/project-module/project-module.service.js +115 -7
- package/dist/modules/project-module/project-module.service.js.map +1 -1
- package/dist/modules/reactions/reactions.service.js +3 -3
- package/dist/modules/reactions/reactions.service.js.map +1 -1
- package/dist/modules/recent-visits/recent-visits.service.js +1 -1
- package/dist/modules/recent-visits/recent-visits.service.js.map +1 -1
- package/dist/modules/states/states.service.js +3 -5
- package/dist/modules/states/states.service.js.map +1 -1
- package/dist/modules/stickies/stickies.controller.d.ts +41 -0
- package/dist/modules/stickies/stickies.controller.js +116 -0
- package/dist/modules/stickies/stickies.controller.js.map +1 -0
- package/dist/modules/stickies/stickies.module.d.ts +2 -0
- package/dist/modules/stickies/stickies.module.js +23 -0
- package/dist/modules/stickies/stickies.module.js.map +1 -0
- package/dist/modules/stickies/stickies.service.d.ts +47 -0
- package/dist/modules/stickies/stickies.service.js +162 -0
- package/dist/modules/stickies/stickies.service.js.map +1 -0
- package/dist/modules/subscription/subscription.service.js +3 -3
- package/dist/modules/subscription/subscription.service.js.map +1 -1
- package/dist/modules/user/user.service.d.ts +9 -1
- package/dist/modules/user/user.service.js +94 -7
- package/dist/modules/user/user.service.js.map +1 -1
- package/dist/modules/user-favorites/user-favorites.service.js +3 -3
- package/dist/modules/user-favorites/user-favorites.service.js.map +1 -1
- package/dist/modules/views/view.service.js +4 -4
- package/dist/modules/views/view.service.js.map +1 -1
- package/dist/modules/work-items/work-items.controller.d.ts +11 -1
- package/dist/modules/work-items/work-items.controller.js +14 -3
- package/dist/modules/work-items/work-items.controller.js.map +1 -1
- package/dist/modules/work-items/work-items.module.js +3 -0
- package/dist/modules/work-items/work-items.module.js.map +1 -1
- package/dist/modules/work-items/work-items.service.d.ts +20 -4
- package/dist/modules/work-items/work-items.service.js +76 -9
- package/dist/modules/work-items/work-items.service.js.map +1 -1
- package/dist/modules/workspace/workspace-context.service.d.ts +18 -0
- package/dist/modules/workspace/workspace-context.service.js +29 -3
- package/dist/modules/workspace/workspace-context.service.js.map +1 -1
- package/dist/modules/workspace/workspace.controller.d.ts +9 -0
- package/dist/modules/workspace/workspace.controller.js +26 -0
- package/dist/modules/workspace/workspace.controller.js.map +1 -1
- package/dist/modules/workspace/workspace.middleware.d.ts +14 -1
- package/dist/modules/workspace/workspace.middleware.js +57 -4
- package/dist/modules/workspace/workspace.middleware.js.map +1 -1
- package/dist/modules/workspace/workspace.module.js +20 -2
- package/dist/modules/workspace/workspace.module.js.map +1 -1
- package/dist/modules/workspace/workspace.service.d.ts +13 -2
- package/dist/modules/workspace/workspace.service.js +106 -27
- package/dist/modules/workspace/workspace.service.js.map +1 -1
- package/dist/mount.d.ts +7 -0
- package/dist/mount.js +21 -7
- package/dist/mount.js.map +1 -1
- package/dist/plane-proxy.module.js +5 -3
- package/dist/plane-proxy.module.js.map +1 -1
- package/dist/request-context.d.ts +53 -0
- package/dist/request-context.js +67 -0
- package/dist/request-context.js.map +1 -0
- package/package.json +14 -14
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ID } from '@ever-gauzy/plugin-integration-plane-models';
|
|
2
|
+
import { ProjectModuleService } from './project-module.service';
|
|
3
|
+
export declare class ArchivedModulesController {
|
|
4
|
+
private readonly _projectModuleService;
|
|
5
|
+
constructor(_projectModuleService: ProjectModuleService);
|
|
6
|
+
/**
|
|
7
|
+
* @description List all archived modules for a project
|
|
8
|
+
* @param {ID} projectId - Project ID
|
|
9
|
+
* @returns Archived modules list
|
|
10
|
+
*/
|
|
11
|
+
listArchivedModules(projectId: ID): Promise<import("@ever-gauzy/plugin-integration-plane-models").IModule | import("@ever-gauzy/plugin-integration-plane-models").IModule[]>;
|
|
12
|
+
/**
|
|
13
|
+
* @description Get a single archived module
|
|
14
|
+
* @param {ID} id - Module ID
|
|
15
|
+
* @param {ID} projectId - Project ID
|
|
16
|
+
* @returns Archived module detail
|
|
17
|
+
*/
|
|
18
|
+
getArchivedModule(id: ID, projectId: ID): Promise<import("@ever-gauzy/plugin-integration-plane-models").IModule | import("@ever-gauzy/plugin-integration-plane-models").IModule[]>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ArchivedModulesController = void 0;
|
|
16
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
17
|
+
const common_1 = require("@nestjs/common");
|
|
18
|
+
const project_module_service_1 = require("./project-module.service");
|
|
19
|
+
let ArchivedModulesController = class ArchivedModulesController {
|
|
20
|
+
constructor(_projectModuleService) {
|
|
21
|
+
this._projectModuleService = _projectModuleService;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* @description List all archived modules for a project
|
|
25
|
+
* @param {ID} projectId - Project ID
|
|
26
|
+
* @returns Archived modules list
|
|
27
|
+
*/
|
|
28
|
+
async listArchivedModules(projectId) {
|
|
29
|
+
return this._projectModuleService.getArchivedModules(projectId);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @description Get a single archived module
|
|
33
|
+
* @param {ID} id - Module ID
|
|
34
|
+
* @param {ID} projectId - Project ID
|
|
35
|
+
* @returns Archived module detail
|
|
36
|
+
*/
|
|
37
|
+
async getArchivedModule(id, projectId) {
|
|
38
|
+
return this._projectModuleService.getArchivedModule(id, projectId);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
exports.ArchivedModulesController = ArchivedModulesController;
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
44
|
+
(0, swagger_1.ApiOperation)({ summary: 'List Archived Modules' }),
|
|
45
|
+
(0, common_1.Get)(),
|
|
46
|
+
__param(0, (0, common_1.Param)('projectId')),
|
|
47
|
+
__metadata("design:type", Function),
|
|
48
|
+
__metadata("design:paramtypes", [String]),
|
|
49
|
+
__metadata("design:returntype", Promise)
|
|
50
|
+
], ArchivedModulesController.prototype, "listArchivedModules", null);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
53
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get Archived Module' }),
|
|
54
|
+
(0, common_1.Get)(':id'),
|
|
55
|
+
__param(0, (0, common_1.Param)('id')),
|
|
56
|
+
__param(1, (0, common_1.Param)('projectId')),
|
|
57
|
+
__metadata("design:type", Function),
|
|
58
|
+
__metadata("design:paramtypes", [String, String]),
|
|
59
|
+
__metadata("design:returntype", Promise)
|
|
60
|
+
], ArchivedModulesController.prototype, "getArchivedModule", null);
|
|
61
|
+
exports.ArchivedModulesController = ArchivedModulesController = __decorate([
|
|
62
|
+
(0, common_1.Controller)(),
|
|
63
|
+
__metadata("design:paramtypes", [project_module_service_1.ProjectModuleService])
|
|
64
|
+
], ArchivedModulesController);
|
|
65
|
+
//# sourceMappingURL=archived-modules.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archived-modules.controller.js","sourceRoot":"","sources":["../../../../../../packages/plugin-plane/src/modules/project-module/archived-modules.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA+C;AAC/C,2CAMwB;AAExB,qEAAgE;AAGzD,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IACrC,YAA6B,qBAA2C;QAA3C,0BAAqB,GAArB,qBAAqB,CAAsB;IAAG,CAAC;IAE5E;;;;OAIG;IAIG,AAAN,KAAK,CAAC,mBAAmB,CAAqB,SAAa;QAC1D,OAAO,IAAI,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAC;IACjE,CAAC;IAED;;;;;OAKG;IAIG,AAAN,KAAK,CAAC,iBAAiB,CACT,EAAM,EACC,SAAa;QAEjC,OAAO,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;IACpE,CAAC;CACD,CAAA;AA9BY,8DAAyB;AAW/B;IAHL,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;IAClD,IAAA,YAAG,GAAE;IACqB,WAAA,IAAA,cAAK,EAAC,WAAW,CAAC,CAAA;;;;oEAE5C;AAWK;IAHL,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAC;IAChD,IAAA,YAAG,EAAC,KAAK,CAAC;IAET,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,cAAK,EAAC,WAAW,CAAC,CAAA;;;;kEAGnB;oCA7BW,yBAAyB;IADrC,IAAA,mBAAU,GAAE;qCAEwC,6CAAoB;GAD5D,yBAAyB,CA8BrC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ArchivedModulesModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const project_module_module_1 = require("./project-module.module");
|
|
12
|
+
const archived_modules_controller_1 = require("./archived-modules.controller");
|
|
13
|
+
let ArchivedModulesModule = class ArchivedModulesModule {
|
|
14
|
+
};
|
|
15
|
+
exports.ArchivedModulesModule = ArchivedModulesModule;
|
|
16
|
+
exports.ArchivedModulesModule = ArchivedModulesModule = __decorate([
|
|
17
|
+
(0, common_1.Module)({
|
|
18
|
+
imports: [(0, common_1.forwardRef)(() => project_module_module_1.ProjectModuleModule)],
|
|
19
|
+
controllers: [archived_modules_controller_1.ArchivedModulesController]
|
|
20
|
+
})
|
|
21
|
+
], ArchivedModulesModule);
|
|
22
|
+
//# sourceMappingURL=archived-modules.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archived-modules.module.js","sourceRoot":"","sources":["../../../../../../packages/plugin-plane/src/modules/project-module/archived-modules.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,mEAA8D;AAC9D,+EAA0E;AAMnE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;CAAG,CAAA;AAAxB,sDAAqB;gCAArB,qBAAqB;IAJjC,IAAA,eAAM,EAAC;QACP,OAAO,EAAE,CAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,2CAAmB,CAAC,CAAC;QAChD,WAAW,EAAE,CAAC,uDAAyB,CAAC;KACxC,CAAC;GACW,qBAAqB,CAAG"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { ID, IModule } from '@ever-gauzy/plugin-integration-plane-models';
|
|
1
|
+
import { ICreateIssueLink, ID, IModule } from '@ever-gauzy/plugin-integration-plane-models';
|
|
2
2
|
import { ProjectModuleService } from './project-module.service';
|
|
3
|
+
import { IssueLinksService } from '../issue-links/issue-links.service';
|
|
3
4
|
import { CreateModuleDTO, UpdateModuleDTO } from './dto';
|
|
4
5
|
export declare class ProjectModuleController {
|
|
5
6
|
private readonly _projectModuleService;
|
|
6
|
-
|
|
7
|
+
private readonly _issueLinksService;
|
|
8
|
+
constructor(_projectModuleService: ProjectModuleService, _issueLinksService: IssueLinksService);
|
|
7
9
|
/**
|
|
8
10
|
* @description - Create module
|
|
9
11
|
* @param {ICreateModuleInput} input - data for creating new module
|
|
@@ -49,4 +51,62 @@ export declare class ProjectModuleController {
|
|
|
49
51
|
* @memberof ProjectModuleController
|
|
50
52
|
*/
|
|
51
53
|
delete(id: ID): Promise<any>;
|
|
54
|
+
/**
|
|
55
|
+
* @description Archive a module (only completed or cancelled)
|
|
56
|
+
* @param {ID} id - Module ID
|
|
57
|
+
* @param {ID} projectId - Project ID
|
|
58
|
+
* @returns The archived_at timestamp
|
|
59
|
+
*/
|
|
60
|
+
archiveModule(id: ID, projectId: ID): Promise<{
|
|
61
|
+
archived_at: string;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* @description Unarchive a module
|
|
65
|
+
* @param {ID} id - Module ID
|
|
66
|
+
* @param {ID} projectId - Project ID
|
|
67
|
+
* @returns void (204)
|
|
68
|
+
*/
|
|
69
|
+
unarchiveModule(id: ID, projectId: ID): Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* @description List all links for a module
|
|
72
|
+
* @param {ID} id - Module ID
|
|
73
|
+
* @returns All links attached to the module
|
|
74
|
+
*/
|
|
75
|
+
listModuleLinks(id: ID): Promise<import("@ever-gauzy/plugin-integration-plane-models").IResourceLink[]>;
|
|
76
|
+
/**
|
|
77
|
+
* @description Create a link for a module
|
|
78
|
+
* @param {ID} id - Module ID
|
|
79
|
+
* @param {ICreateIssueLink} input - Link data (title, url)
|
|
80
|
+
* @returns The created link
|
|
81
|
+
*/
|
|
82
|
+
createModuleLink(id: ID, input: ICreateIssueLink): Promise<import("@ever-gauzy/plugin-integration-plane-models").IResourceLink>;
|
|
83
|
+
/**
|
|
84
|
+
* @description Get a specific module link
|
|
85
|
+
* @param {ID} id - Module ID
|
|
86
|
+
* @param {ID} linkId - Link ID
|
|
87
|
+
* @returns The found link
|
|
88
|
+
*/
|
|
89
|
+
getModuleLink(id: ID, linkId: ID): Promise<import("@ever-gauzy/plugin-integration-plane-models").IResourceLink>;
|
|
90
|
+
/**
|
|
91
|
+
* @description Update a module link
|
|
92
|
+
* @param {ID} id - Module ID
|
|
93
|
+
* @param {ID} linkId - Link ID
|
|
94
|
+
* @param {ICreateIssueLink} input - Updated link data
|
|
95
|
+
* @returns The updated link
|
|
96
|
+
*/
|
|
97
|
+
updateModuleLink(id: ID, linkId: ID, input: ICreateIssueLink): Promise<import("@ever-gauzy/plugin-integration-plane-models").IResourceLink>;
|
|
98
|
+
/**
|
|
99
|
+
* @description Update a module link (partial)
|
|
100
|
+
* @param {ID} id - Module ID
|
|
101
|
+
* @param {ID} linkId - Link ID
|
|
102
|
+
* @param {Partial<ICreateIssueLink>} input - Partial updated link data
|
|
103
|
+
* @returns The updated link
|
|
104
|
+
*/
|
|
105
|
+
patchModuleLink(id: ID, linkId: ID, input: ICreateIssueLink): Promise<import("@ever-gauzy/plugin-integration-plane-models").IResourceLink>;
|
|
106
|
+
/**
|
|
107
|
+
* @description Delete a module link
|
|
108
|
+
* @param {ID} linkId - Link ID
|
|
109
|
+
* @returns Delete result
|
|
110
|
+
*/
|
|
111
|
+
deleteModuleLink(linkId: ID): Promise<any>;
|
|
52
112
|
}
|
|
@@ -15,11 +15,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.ProjectModuleController = void 0;
|
|
16
16
|
const swagger_1 = require("@nestjs/swagger");
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
|
+
const plugin_integration_plane_models_1 = require("@ever-gauzy/plugin-integration-plane-models");
|
|
18
19
|
const project_module_service_1 = require("./project-module.service");
|
|
20
|
+
const issue_links_service_1 = require("../issue-links/issue-links.service");
|
|
21
|
+
const config_1 = require("../../config");
|
|
19
22
|
const dto_1 = require("./dto");
|
|
20
23
|
let ProjectModuleController = class ProjectModuleController {
|
|
21
|
-
constructor(_projectModuleService) {
|
|
24
|
+
constructor(_projectModuleService, _issueLinksService) {
|
|
22
25
|
this._projectModuleService = _projectModuleService;
|
|
26
|
+
this._issueLinksService = _issueLinksService;
|
|
23
27
|
}
|
|
24
28
|
/**
|
|
25
29
|
* @description - Create module
|
|
@@ -82,6 +86,80 @@ let ProjectModuleController = class ProjectModuleController {
|
|
|
82
86
|
async delete(id) {
|
|
83
87
|
return await this._projectModuleService.delete(id);
|
|
84
88
|
}
|
|
89
|
+
// ───────────── Module Archive ─────────────
|
|
90
|
+
/**
|
|
91
|
+
* @description Archive a module (only completed or cancelled)
|
|
92
|
+
* @param {ID} id - Module ID
|
|
93
|
+
* @param {ID} projectId - Project ID
|
|
94
|
+
* @returns The archived_at timestamp
|
|
95
|
+
*/
|
|
96
|
+
async archiveModule(id, projectId) {
|
|
97
|
+
return this._projectModuleService.archiveModule(id, projectId);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @description Unarchive a module
|
|
101
|
+
* @param {ID} id - Module ID
|
|
102
|
+
* @param {ID} projectId - Project ID
|
|
103
|
+
* @returns void (204)
|
|
104
|
+
*/
|
|
105
|
+
async unarchiveModule(id, projectId) {
|
|
106
|
+
return this._projectModuleService.unarchiveModule(id, projectId);
|
|
107
|
+
}
|
|
108
|
+
// ───────────── Module Links ─────────────
|
|
109
|
+
/**
|
|
110
|
+
* @description List all links for a module
|
|
111
|
+
* @param {ID} id - Module ID
|
|
112
|
+
* @returns All links attached to the module
|
|
113
|
+
*/
|
|
114
|
+
async listModuleLinks(id) {
|
|
115
|
+
return this._issueLinksService.findAll(plugin_integration_plane_models_1.BaseEntityEnum.OrganizationProjectModule, id);
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @description Create a link for a module
|
|
119
|
+
* @param {ID} id - Module ID
|
|
120
|
+
* @param {ICreateIssueLink} input - Link data (title, url)
|
|
121
|
+
* @returns The created link
|
|
122
|
+
*/
|
|
123
|
+
async createModuleLink(id, input) {
|
|
124
|
+
return this._issueLinksService.create(input, id, 'module');
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* @description Get a specific module link
|
|
128
|
+
* @param {ID} id - Module ID
|
|
129
|
+
* @param {ID} linkId - Link ID
|
|
130
|
+
* @returns The found link
|
|
131
|
+
*/
|
|
132
|
+
async getModuleLink(id, linkId) {
|
|
133
|
+
return this._issueLinksService.findOne(linkId, plugin_integration_plane_models_1.BaseEntityEnum.OrganizationProjectModule, id, (0, config_1.getCurrentOrganizationSlug)());
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @description Update a module link
|
|
137
|
+
* @param {ID} id - Module ID
|
|
138
|
+
* @param {ID} linkId - Link ID
|
|
139
|
+
* @param {ICreateIssueLink} input - Updated link data
|
|
140
|
+
* @returns The updated link
|
|
141
|
+
*/
|
|
142
|
+
async updateModuleLink(id, linkId, input) {
|
|
143
|
+
return this._issueLinksService.update(linkId, id, (0, config_1.getCurrentOrganizationSlug)(), input, plugin_integration_plane_models_1.BaseEntityEnum.OrganizationProjectModule);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* @description Update a module link (partial)
|
|
147
|
+
* @param {ID} id - Module ID
|
|
148
|
+
* @param {ID} linkId - Link ID
|
|
149
|
+
* @param {Partial<ICreateIssueLink>} input - Partial updated link data
|
|
150
|
+
* @returns The updated link
|
|
151
|
+
*/
|
|
152
|
+
async patchModuleLink(id, linkId, input) {
|
|
153
|
+
return this._issueLinksService.update(linkId, id, (0, config_1.getCurrentOrganizationSlug)(), input, plugin_integration_plane_models_1.BaseEntityEnum.OrganizationProjectModule);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* @description Delete a module link
|
|
157
|
+
* @param {ID} linkId - Link ID
|
|
158
|
+
* @returns Delete result
|
|
159
|
+
*/
|
|
160
|
+
async deleteModuleLink(linkId) {
|
|
161
|
+
return this._issueLinksService.delete(linkId);
|
|
162
|
+
}
|
|
85
163
|
};
|
|
86
164
|
exports.ProjectModuleController = ProjectModuleController;
|
|
87
165
|
__decorate([
|
|
@@ -160,8 +238,89 @@ __decorate([
|
|
|
160
238
|
__metadata("design:paramtypes", [String]),
|
|
161
239
|
__metadata("design:returntype", Promise)
|
|
162
240
|
], ProjectModuleController.prototype, "delete", null);
|
|
241
|
+
__decorate([
|
|
242
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
243
|
+
(0, swagger_1.ApiOperation)({ summary: 'Archive Project Module' }),
|
|
244
|
+
(0, common_1.Post)(':id/archive'),
|
|
245
|
+
__param(0, (0, common_1.Param)('id')),
|
|
246
|
+
__param(1, (0, common_1.Param)('projectId')),
|
|
247
|
+
__metadata("design:type", Function),
|
|
248
|
+
__metadata("design:paramtypes", [String, String]),
|
|
249
|
+
__metadata("design:returntype", Promise)
|
|
250
|
+
], ProjectModuleController.prototype, "archiveModule", null);
|
|
251
|
+
__decorate([
|
|
252
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
253
|
+
(0, swagger_1.ApiOperation)({ summary: 'Unarchive Project Module' }),
|
|
254
|
+
(0, common_1.Delete)(':id/archive'),
|
|
255
|
+
__param(0, (0, common_1.Param)('id')),
|
|
256
|
+
__param(1, (0, common_1.Param)('projectId')),
|
|
257
|
+
__metadata("design:type", Function),
|
|
258
|
+
__metadata("design:paramtypes", [String, String]),
|
|
259
|
+
__metadata("design:returntype", Promise)
|
|
260
|
+
], ProjectModuleController.prototype, "unarchiveModule", null);
|
|
261
|
+
__decorate([
|
|
262
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
263
|
+
(0, swagger_1.ApiOperation)({ summary: 'List Module Links' }),
|
|
264
|
+
(0, common_1.Get)(':id/module-links'),
|
|
265
|
+
__param(0, (0, common_1.Param)('id')),
|
|
266
|
+
__metadata("design:type", Function),
|
|
267
|
+
__metadata("design:paramtypes", [String]),
|
|
268
|
+
__metadata("design:returntype", Promise)
|
|
269
|
+
], ProjectModuleController.prototype, "listModuleLinks", null);
|
|
270
|
+
__decorate([
|
|
271
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.CREATED),
|
|
272
|
+
(0, swagger_1.ApiOperation)({ summary: 'Create Module Link' }),
|
|
273
|
+
(0, common_1.Post)(':id/module-links'),
|
|
274
|
+
__param(0, (0, common_1.Param)('id')),
|
|
275
|
+
__param(1, (0, common_1.Body)()),
|
|
276
|
+
__metadata("design:type", Function),
|
|
277
|
+
__metadata("design:paramtypes", [String, Object]),
|
|
278
|
+
__metadata("design:returntype", Promise)
|
|
279
|
+
], ProjectModuleController.prototype, "createModuleLink", null);
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
282
|
+
(0, swagger_1.ApiOperation)({ summary: 'Get Module Link' }),
|
|
283
|
+
(0, common_1.Get)(':id/module-links/:linkId'),
|
|
284
|
+
__param(0, (0, common_1.Param)('id')),
|
|
285
|
+
__param(1, (0, common_1.Param)('linkId')),
|
|
286
|
+
__metadata("design:type", Function),
|
|
287
|
+
__metadata("design:paramtypes", [String, String]),
|
|
288
|
+
__metadata("design:returntype", Promise)
|
|
289
|
+
], ProjectModuleController.prototype, "getModuleLink", null);
|
|
290
|
+
__decorate([
|
|
291
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
292
|
+
(0, swagger_1.ApiOperation)({ summary: 'Update Module Link' }),
|
|
293
|
+
(0, common_1.Put)(':id/module-links/:linkId'),
|
|
294
|
+
__param(0, (0, common_1.Param)('id')),
|
|
295
|
+
__param(1, (0, common_1.Param)('linkId')),
|
|
296
|
+
__param(2, (0, common_1.Body)()),
|
|
297
|
+
__metadata("design:type", Function),
|
|
298
|
+
__metadata("design:paramtypes", [String, String, Object]),
|
|
299
|
+
__metadata("design:returntype", Promise)
|
|
300
|
+
], ProjectModuleController.prototype, "updateModuleLink", null);
|
|
301
|
+
__decorate([
|
|
302
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.OK),
|
|
303
|
+
(0, swagger_1.ApiOperation)({ summary: 'Patch Module Link' }),
|
|
304
|
+
(0, common_1.Patch)(':id/module-links/:linkId'),
|
|
305
|
+
__param(0, (0, common_1.Param)('id')),
|
|
306
|
+
__param(1, (0, common_1.Param)('linkId')),
|
|
307
|
+
__param(2, (0, common_1.Body)()),
|
|
308
|
+
__metadata("design:type", Function),
|
|
309
|
+
__metadata("design:paramtypes", [String, String, Object]),
|
|
310
|
+
__metadata("design:returntype", Promise)
|
|
311
|
+
], ProjectModuleController.prototype, "patchModuleLink", null);
|
|
312
|
+
__decorate([
|
|
313
|
+
(0, common_1.HttpCode)(common_1.HttpStatus.NO_CONTENT),
|
|
314
|
+
(0, swagger_1.ApiOperation)({ summary: 'Delete Module Link' }),
|
|
315
|
+
(0, common_1.Delete)(':id/module-links/:linkId'),
|
|
316
|
+
__param(0, (0, common_1.Param)('linkId')),
|
|
317
|
+
__metadata("design:type", Function),
|
|
318
|
+
__metadata("design:paramtypes", [String]),
|
|
319
|
+
__metadata("design:returntype", Promise)
|
|
320
|
+
], ProjectModuleController.prototype, "deleteModuleLink", null);
|
|
163
321
|
exports.ProjectModuleController = ProjectModuleController = __decorate([
|
|
164
322
|
(0, common_1.Controller)(),
|
|
165
|
-
__metadata("design:paramtypes", [project_module_service_1.ProjectModuleService
|
|
323
|
+
__metadata("design:paramtypes", [project_module_service_1.ProjectModuleService,
|
|
324
|
+
issue_links_service_1.IssueLinksService])
|
|
166
325
|
], ProjectModuleController);
|
|
167
326
|
//# sourceMappingURL=project-module.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-module.controller.js","sourceRoot":"","sources":["../../../../../../packages/plugin-plane/src/modules/project-module/project-module.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA+C;AAC/C,
|
|
1
|
+
{"version":3,"file":"project-module.controller.js","sourceRoot":"","sources":["../../../../../../packages/plugin-plane/src/modules/project-module/project-module.controller.ts"],"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YAAG,EAAC,0BAA0B,CAAC;IAE9B,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;;;;4DAQhB;AAYK;IAHL,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAC/C,IAAA,YAAG,EAAC,0BAA0B,CAAC;IAE9B,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;IACf,WAAA,IAAA,aAAI,GAAE,CAAA;;;;+DASP;AAYK;IAHL,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACvB,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC9C,IAAA,cAAK,EAAC,0BAA0B,CAAC;IAEhC,WAAA,IAAA,cAAK,EAAC,IAAI,CAAC,CAAA;IACX,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;IACf,WAAA,IAAA,aAAI,GAAE,CAAA;;;;8DASP;AAUK;IAHL,IAAA,iBAAQ,EAAC,mBAAU,CAAC,UAAU,CAAC;IAC/B,IAAA,sBAAY,EAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,CAAC;IAC/C,IAAA,eAAM,EAAC,0BAA0B,CAAC;IACX,WAAA,IAAA,cAAK,EAAC,QAAQ,CAAC,CAAA;;;;+DAEtC;kCAhQW,uBAAuB;IADnC,IAAA,mBAAU,GAAE;qCAG6B,6CAAoB;QACvB,uCAAiB;GAH3C,uBAAuB,CAiQnC"}
|
|
@@ -12,12 +12,13 @@ const project_module_1 = require("../project/project.module");
|
|
|
12
12
|
const project_module_service_1 = require("./project-module.service");
|
|
13
13
|
const project_module_controller_1 = require("./project-module.controller");
|
|
14
14
|
const employee_properties_module_1 = require("../employee-properties/employee-properties.module");
|
|
15
|
+
const issue_links_module_1 = require("../issue-links/issue-links.module");
|
|
15
16
|
let ProjectModuleModule = class ProjectModuleModule {
|
|
16
17
|
};
|
|
17
18
|
exports.ProjectModuleModule = ProjectModuleModule;
|
|
18
19
|
exports.ProjectModuleModule = ProjectModuleModule = __decorate([
|
|
19
20
|
(0, common_1.Module)({
|
|
20
|
-
imports: [(0, common_1.forwardRef)(() => project_module_1.ProjectModule), employee_properties_module_1.EmployeePropertiesModule],
|
|
21
|
+
imports: [(0, common_1.forwardRef)(() => project_module_1.ProjectModule), employee_properties_module_1.EmployeePropertiesModule, issue_links_module_1.IssueLinksModule],
|
|
21
22
|
providers: [project_module_service_1.ProjectModuleService],
|
|
22
23
|
controllers: [project_module_controller_1.ProjectModuleController],
|
|
23
24
|
exports: [project_module_service_1.ProjectModuleService]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-module.module.js","sourceRoot":"","sources":["../../../../../../packages/plugin-plane/src/modules/project-module/project-module.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,8DAA0D;AAC1D,qEAAgE;AAChE,2EAAsE;AACtE,kGAA6F;
|
|
1
|
+
{"version":3,"file":"project-module.module.js","sourceRoot":"","sources":["../../../../../../packages/plugin-plane/src/modules/project-module/project-module.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAoD;AACpD,8DAA0D;AAC1D,qEAAgE;AAChE,2EAAsE;AACtE,kGAA6F;AAC7F,0EAAqE;AAQ9D,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;CAAG,CAAA;AAAtB,kDAAmB;8BAAnB,mBAAmB;IAN/B,IAAA,eAAM,EAAC;QACP,OAAO,EAAE,CAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,EAAE,qDAAwB,EAAE,qCAAgB,CAAC;QACtF,SAAS,EAAE,CAAC,6CAAoB,CAAC;QACjC,WAAW,EAAE,CAAC,mDAAuB,CAAC;QACtC,OAAO,EAAE,CAAC,6CAAoB,CAAC;KAC/B,CAAC;GACW,mBAAmB,CAAG"}
|
|
@@ -48,6 +48,39 @@ export declare class ProjectModuleService extends ApiFetchService {
|
|
|
48
48
|
* @memberof ProjectModuleService
|
|
49
49
|
*/
|
|
50
50
|
delete(id: ID): Promise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* @description Archive a module (only if completed or cancelled)
|
|
53
|
+
* @param {ID} id - Module ID to archive
|
|
54
|
+
* @param {ID} projectId - Project ID
|
|
55
|
+
* @returns A promise resolved with the archived_at date
|
|
56
|
+
* @memberof ProjectModuleService
|
|
57
|
+
*/
|
|
58
|
+
archiveModule(id: ID, projectId: ID): Promise<{
|
|
59
|
+
archived_at: string;
|
|
60
|
+
}>;
|
|
61
|
+
/**
|
|
62
|
+
* @description Unarchive a module
|
|
63
|
+
* @param {ID} id - Module ID to unarchive
|
|
64
|
+
* @param {ID} projectId - Project ID
|
|
65
|
+
* @returns void
|
|
66
|
+
* @memberof ProjectModuleService
|
|
67
|
+
*/
|
|
68
|
+
unarchiveModule(id: ID, projectId: ID): Promise<void>;
|
|
69
|
+
/**
|
|
70
|
+
* @description Get archived modules for a project
|
|
71
|
+
* @param {ID} projectId - The project ID
|
|
72
|
+
* @returns Archived modules list
|
|
73
|
+
* @memberof ProjectModuleService
|
|
74
|
+
*/
|
|
75
|
+
getArchivedModules(projectId: ID): Promise<IModule | IModule[]>;
|
|
76
|
+
/**
|
|
77
|
+
* @description Get a single archived module
|
|
78
|
+
* @param {ID} id - Module ID
|
|
79
|
+
* @param {ID} projectId - Project ID
|
|
80
|
+
* @returns Archived module detail
|
|
81
|
+
* @memberof ProjectModuleService
|
|
82
|
+
*/
|
|
83
|
+
getArchivedModule(id: ID, projectId: ID): Promise<IModule | IModule[]>;
|
|
51
84
|
/**
|
|
52
85
|
* @description Get user modules properties
|
|
53
86
|
* @param {ID} id - Module ID of module for whom get properties
|
|
@@ -62,7 +62,7 @@ let ProjectModuleService = class ProjectModuleService extends api_fetch_service_
|
|
|
62
62
|
}
|
|
63
63
|
catch (error) {
|
|
64
64
|
this.logger.error('Operation failed', error instanceof Error ? error.stack : String(error));
|
|
65
|
-
|
|
65
|
+
this.handleApiError(error);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
@@ -74,7 +74,7 @@ let ProjectModuleService = class ProjectModuleService extends api_fetch_service_
|
|
|
74
74
|
async getAllModulesByProject(projectId) {
|
|
75
75
|
try {
|
|
76
76
|
// Build the query string once
|
|
77
|
-
const query = qs_1.default.stringify((0, config_1.getModulesQuery)(projectId, ['members.employee']));
|
|
77
|
+
const query = qs_1.default.stringify((0, config_1.getModulesQuery)(projectId, ['members.employee', 'tasks.members', 'tasks.tags']));
|
|
78
78
|
const favoriteIds = await this._userFavoriteService.findEmployeeFavoriteEntityIds(plugin_integration_plane_models_1.BaseEntityEnum.OrganizationProjectModule);
|
|
79
79
|
// Perform the API call to fetch the modules
|
|
80
80
|
const modules = (await this.apiFetch({
|
|
@@ -87,7 +87,7 @@ let ProjectModuleService = class ProjectModuleService extends api_fetch_service_
|
|
|
87
87
|
}
|
|
88
88
|
catch (error) {
|
|
89
89
|
this.logger.error('Operation failed', error instanceof Error ? error.stack : String(error));
|
|
90
|
-
|
|
90
|
+
this.handleApiError(error);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
@@ -100,7 +100,7 @@ let ProjectModuleService = class ProjectModuleService extends api_fetch_service_
|
|
|
100
100
|
async getModule(id, projectId) {
|
|
101
101
|
try {
|
|
102
102
|
const module = await this.getExternalModule(id, projectId, [
|
|
103
|
-
'members.employee'
|
|
103
|
+
'members.employee', 'members.employee', 'tasks.members', 'tasks.tags'
|
|
104
104
|
]);
|
|
105
105
|
// Favorites
|
|
106
106
|
const favoriteIds = await this._userFavoriteService.findEmployeeFavoriteEntityIds(plugin_integration_plane_models_1.BaseEntityEnum.OrganizationProjectModule);
|
|
@@ -109,7 +109,7 @@ let ProjectModuleService = class ProjectModuleService extends api_fetch_service_
|
|
|
109
109
|
}
|
|
110
110
|
catch (error) {
|
|
111
111
|
this.logger.error('Operation failed', error instanceof Error ? error.stack : String(error));
|
|
112
|
-
|
|
112
|
+
this.handleApiError(error);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
@@ -151,7 +151,7 @@ let ProjectModuleService = class ProjectModuleService extends api_fetch_service_
|
|
|
151
151
|
catch (error) {
|
|
152
152
|
// Log the error and throw a BadRequestException
|
|
153
153
|
this.logger.error('Operation failed', error instanceof Error ? error.stack : String(error));
|
|
154
|
-
|
|
154
|
+
this.handleApiError(error);
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
@@ -166,6 +166,114 @@ let ProjectModuleService = class ProjectModuleService extends api_fetch_service_
|
|
|
166
166
|
path: `${this.path}/${id}/soft`
|
|
167
167
|
})).data;
|
|
168
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* @description Archive a module (only if completed or cancelled)
|
|
171
|
+
* @param {ID} id - Module ID to archive
|
|
172
|
+
* @param {ID} projectId - Project ID
|
|
173
|
+
* @returns A promise resolved with the archived_at date
|
|
174
|
+
* @memberof ProjectModuleService
|
|
175
|
+
*/
|
|
176
|
+
async archiveModule(id, projectId) {
|
|
177
|
+
var _a;
|
|
178
|
+
try {
|
|
179
|
+
const module = await this.getExternalModule(id, projectId);
|
|
180
|
+
if (!module) {
|
|
181
|
+
throw new common_1.BadRequestException(`Module with id ${id} could not be found`);
|
|
182
|
+
}
|
|
183
|
+
// Only completed or cancelled modules can be archived
|
|
184
|
+
const archivableStatuses = ['completed', 'cancelled'];
|
|
185
|
+
if (!archivableStatuses.includes((_a = module.status) !== null && _a !== void 0 ? _a : '')) {
|
|
186
|
+
throw new common_1.BadRequestException('Only completed or cancelled modules can be archived');
|
|
187
|
+
}
|
|
188
|
+
const archivedAt = new Date().toISOString();
|
|
189
|
+
await this.apiFetch({
|
|
190
|
+
method: 'PUT',
|
|
191
|
+
path: `${this.path}/${id}`,
|
|
192
|
+
body: Object.assign(Object.assign({}, module), { isArchived: true, archivedAt })
|
|
193
|
+
});
|
|
194
|
+
return { archived_at: archivedAt };
|
|
195
|
+
}
|
|
196
|
+
catch (error) {
|
|
197
|
+
this.logger.error('Archive operation failed', error instanceof Error ? error.stack : String(error));
|
|
198
|
+
if (error instanceof common_1.BadRequestException)
|
|
199
|
+
throw error;
|
|
200
|
+
this.handleApiError(error);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* @description Unarchive a module
|
|
205
|
+
* @param {ID} id - Module ID to unarchive
|
|
206
|
+
* @param {ID} projectId - Project ID
|
|
207
|
+
* @returns void
|
|
208
|
+
* @memberof ProjectModuleService
|
|
209
|
+
*/
|
|
210
|
+
async unarchiveModule(id, projectId) {
|
|
211
|
+
try {
|
|
212
|
+
const module = await this.getExternalModule(id, projectId);
|
|
213
|
+
if (!module) {
|
|
214
|
+
throw new common_1.BadRequestException(`Module with id ${id} could not be found`);
|
|
215
|
+
}
|
|
216
|
+
await this.apiFetch({
|
|
217
|
+
method: 'PUT',
|
|
218
|
+
path: `${this.path}/${id}`,
|
|
219
|
+
body: Object.assign(Object.assign({}, module), { isArchived: false, archivedAt: null })
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
catch (error) {
|
|
223
|
+
this.logger.error('Unarchive operation failed', error instanceof Error ? error.stack : String(error));
|
|
224
|
+
if (error instanceof common_1.BadRequestException)
|
|
225
|
+
throw error;
|
|
226
|
+
this.handleApiError(error);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* @description Get archived modules for a project
|
|
231
|
+
* @param {ID} projectId - The project ID
|
|
232
|
+
* @returns Archived modules list
|
|
233
|
+
* @memberof ProjectModuleService
|
|
234
|
+
*/
|
|
235
|
+
async getArchivedModules(projectId) {
|
|
236
|
+
var _a, _b;
|
|
237
|
+
try {
|
|
238
|
+
const query = qs_1.default.stringify(Object.assign(Object.assign({}, (0, config_1.getModulesQuery)(projectId, ['members.employee', 'tasks.members', 'tasks.tags'])), { 'where[isArchived]': true }));
|
|
239
|
+
const favoriteIds = await this._userFavoriteService.findEmployeeFavoriteEntityIds(plugin_integration_plane_models_1.BaseEntityEnum.OrganizationProjectModule);
|
|
240
|
+
const modules = (await this.apiFetch({
|
|
241
|
+
method: 'GET',
|
|
242
|
+
path: `${this.path}`,
|
|
243
|
+
query
|
|
244
|
+
})).data;
|
|
245
|
+
return (0, config_1.modulesTransformer)(modules.items, favoriteIds);
|
|
246
|
+
}
|
|
247
|
+
catch (error) {
|
|
248
|
+
this.logger.error(`Operation failed: ${((_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);
|
|
249
|
+
this.handleApiError(error);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* @description Get a single archived module
|
|
254
|
+
* @param {ID} id - Module ID
|
|
255
|
+
* @param {ID} projectId - Project ID
|
|
256
|
+
* @returns Archived module detail
|
|
257
|
+
* @memberof ProjectModuleService
|
|
258
|
+
*/
|
|
259
|
+
async getArchivedModule(id, projectId) {
|
|
260
|
+
try {
|
|
261
|
+
const module = await this.getExternalModule(id, projectId, [
|
|
262
|
+
'members.employee', 'tasks.members', 'tasks.tags'
|
|
263
|
+
]);
|
|
264
|
+
if (!(module === null || module === void 0 ? void 0 : module.isArchived)) {
|
|
265
|
+
throw new common_1.BadRequestException('Module is not archived');
|
|
266
|
+
}
|
|
267
|
+
const favoriteIds = await this._userFavoriteService.findEmployeeFavoriteEntityIds(plugin_integration_plane_models_1.BaseEntityEnum.OrganizationProjectModule);
|
|
268
|
+
return (0, config_1.modulesTransformer)(module, favoriteIds);
|
|
269
|
+
}
|
|
270
|
+
catch (error) {
|
|
271
|
+
this.logger.error('Operation failed', error instanceof Error ? error.stack : String(error));
|
|
272
|
+
if (error instanceof common_1.BadRequestException)
|
|
273
|
+
throw error;
|
|
274
|
+
this.handleApiError(error);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
169
277
|
/**
|
|
170
278
|
* @description Get user modules properties
|
|
171
279
|
* @param {ID} id - Module ID of module for whom get properties
|
|
@@ -258,7 +366,7 @@ let ProjectModuleService = class ProjectModuleService extends api_fetch_service_
|
|
|
258
366
|
}
|
|
259
367
|
catch (error) {
|
|
260
368
|
this.logger.error(`Operation failed: ${((_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);
|
|
261
|
-
|
|
369
|
+
this.handleApiError(error);
|
|
262
370
|
}
|
|
263
371
|
}
|
|
264
372
|
};
|