grm-shared-library 1.0.181 → 1.0.183

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.
@@ -2,6 +2,6 @@ export declare class CreateIncidentAssignmentDto {
2
2
  incidentId: number;
3
3
  comments?: string;
4
4
  assignerId: number;
5
- assigneeIds?: number;
5
+ assigneeIds?: number[];
6
6
  timestamp: Date;
7
7
  }
@@ -34,7 +34,7 @@ __decorate([
34
34
  (0, class_validator_1.IsArray)(),
35
35
  (0, class_validator_1.IsNumber)({}, { each: true }),
36
36
  (0, class_validator_1.IsOptional)(),
37
- __metadata("design:type", Number)
37
+ __metadata("design:type", Array)
38
38
  ], CreateIncidentAssignmentDto.prototype, "assigneeIds", void 0);
39
39
  __decorate([
40
40
  (0, class_validator_1.IsDate)(),
@@ -1,14 +1,38 @@
1
1
  export declare enum IncidentStatus {
2
2
  RECEIVED = "Received",
3
- PENDING = "Pending",
4
3
  IN_PROGRESS = "In-Progress",
4
+ IN_REVIEW = "In-Review",
5
5
  ON_HOLD = "On-Hold",
6
6
  ESCALATED = "Escalated",
7
- IN_REVIEW = "In-Review",
8
7
  RESOLVED = "Resolved",
9
8
  APPEALED = "Appealed",
10
9
  CLOSED = "Closed",
11
10
  UNRESOLVED = "Unresolved",
12
- OVERDUE = "Overdue",
13
11
  ARCHIVED = "Archived"
14
12
  }
13
+ /**
14
+ * When an incident is first created it will be created in the DB with the default status Received.
15
+ * Thereafter it can be changed from status Received to any of the stage 1 statuses or Resolved or Escalated statuses in stage 2.
16
+ * An incident cannot change from any of the stage 1 statuses to status Appealed, Closed, Unresolved or Archived
17
+ * An incident CANNOT be changed back to status Received
18
+ * An incident with status Resolved can ONLY be changed to status Appealed, Closed or Unresolved
19
+ * An incident with status Appealed can ONLY be changed to status Escalated, Resolved or Unresolved
20
+ * An incident can ONLY be changed to status Appealed from status Resolved
21
+ * An incident with status Unresolved can only be changed to Resolved
22
+ * An incident with status Escalated can ONLY be changed to status Resolved or Unresolved
23
+ * An incident MUST first be changed to Resolved before status Closed
24
+ * Once an incident is Closed, it CANNOT be changed back to any other statuses apart from Archived
25
+ * An incident with status Archived CANNOT be changed to any other status
26
+ */
27
+ /**
28
+ * Transition map (simplified):
29
+ * - Received → In-Progress | In-Review | On-Hold | Resolved | Escalated
30
+ * - In-Progress/In-Review/On-Hold → (same level or Resolved/Escalated)
31
+ * - Resolved → Appealed | Closed | Unresolved
32
+ * - Appealed → Escalated | Resolved | Unresolved
33
+ * - Escalated → Resolved | Unresolved
34
+ * - Unresolved → Resolved
35
+ * - Resolved → Closed
36
+ * - Closed → Archived
37
+ * - Archived → [no transitions]
38
+ */
@@ -3,16 +3,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IncidentStatus = void 0;
4
4
  var IncidentStatus;
5
5
  (function (IncidentStatus) {
6
+ //Stage 1
6
7
  IncidentStatus["RECEIVED"] = "Received";
7
- IncidentStatus["PENDING"] = "Pending";
8
8
  IncidentStatus["IN_PROGRESS"] = "In-Progress";
9
+ IncidentStatus["IN_REVIEW"] = "In-Review";
9
10
  IncidentStatus["ON_HOLD"] = "On-Hold";
11
+ //Stage 2
10
12
  IncidentStatus["ESCALATED"] = "Escalated";
11
- IncidentStatus["IN_REVIEW"] = "In-Review";
12
13
  IncidentStatus["RESOLVED"] = "Resolved";
13
14
  IncidentStatus["APPEALED"] = "Appealed";
14
15
  IncidentStatus["CLOSED"] = "Closed";
15
16
  IncidentStatus["UNRESOLVED"] = "Unresolved";
16
- IncidentStatus["OVERDUE"] = "Overdue";
17
17
  IncidentStatus["ARCHIVED"] = "Archived";
18
18
  })(IncidentStatus || (exports.IncidentStatus = IncidentStatus = {}));
19
+ /**
20
+ * When an incident is first created it will be created in the DB with the default status Received.
21
+ * Thereafter it can be changed from status Received to any of the stage 1 statuses or Resolved or Escalated statuses in stage 2.
22
+ * An incident cannot change from any of the stage 1 statuses to status Appealed, Closed, Unresolved or Archived
23
+ * An incident CANNOT be changed back to status Received
24
+ * An incident with status Resolved can ONLY be changed to status Appealed, Closed or Unresolved
25
+ * An incident with status Appealed can ONLY be changed to status Escalated, Resolved or Unresolved
26
+ * An incident can ONLY be changed to status Appealed from status Resolved
27
+ * An incident with status Unresolved can only be changed to Resolved
28
+ * An incident with status Escalated can ONLY be changed to status Resolved or Unresolved
29
+ * An incident MUST first be changed to Resolved before status Closed
30
+ * Once an incident is Closed, it CANNOT be changed back to any other statuses apart from Archived
31
+ * An incident with status Archived CANNOT be changed to any other status
32
+ */
33
+ /**
34
+ * Transition map (simplified):
35
+ * - Received → In-Progress | In-Review | On-Hold | Resolved | Escalated
36
+ * - In-Progress/In-Review/On-Hold → (same level or Resolved/Escalated)
37
+ * - Resolved → Appealed | Closed | Unresolved
38
+ * - Appealed → Escalated | Resolved | Unresolved
39
+ * - Escalated → Resolved | Unresolved
40
+ * - Unresolved → Resolved
41
+ * - Resolved → Closed
42
+ * - Closed → Archived
43
+ * - Archived → [no transitions]
44
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.0.181",
3
+ "version": "1.0.183",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [