@kkkarsss/lr-models 1.0.4 → 1.0.6
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TGUID } from '../guid';
|
|
2
|
-
export type TEventType = 'create-task' | 'complete-task' | 'complete-task-overdue' | 'delete-task' | 'mark-task-as-not-completed' | 'create-project' | 'archive-project' | 'unarchive-project' | 'reduce-priority' | 'increase-priority' | 'create-note' | 'success-archive-note' | 'not-needed-archive-note' | 'take-to-work';
|
|
3
|
-
export type TEventEntityType = 'task' | 'project' | 'note' | 'person' | 'system';
|
|
2
|
+
export type TEventType = 'create-task' | 'complete-task' | 'complete-task-overdue' | 'delete-task' | 'mark-task-as-not-completed' | 'create-project' | 'archive-project' | 'unarchive-project' | 'reduce-priority' | 'increase-priority' | 'create-note' | 'success-archive-note' | 'not-needed-archive-note' | 'take-to-work' | 'create-incident';
|
|
3
|
+
export type TEventEntityType = 'task' | 'project' | 'note' | 'person' | 'system' | 'incident';
|
|
4
4
|
export type TEvent = {
|
|
5
5
|
id: TGUID;
|
|
6
6
|
type: TEventType;
|
|
@@ -10,6 +10,37 @@ export type TIncident = {
|
|
|
10
10
|
dateEnd: Temporal.PlainDate;
|
|
11
11
|
timeEnd: Temporal.PlainTime;
|
|
12
12
|
tags: TGUID[];
|
|
13
|
+
averageRating?: number;
|
|
13
14
|
createdAt: Temporal.PlainDateTime;
|
|
14
15
|
updatedAt: Temporal.PlainDateTime;
|
|
15
16
|
};
|
|
17
|
+
export type TCreateIncidentRequestBody = Omit<TIncident, 'id' | 'createdAt' | 'updatedAt' | 'participants' | 'averageRating'> & {
|
|
18
|
+
authorId: TGUID;
|
|
19
|
+
participants?: TGUID[];
|
|
20
|
+
};
|
|
21
|
+
export type TCreateIncidentResponse = TIncident;
|
|
22
|
+
export type TGetIncidentsByUserIdRequestParams = {
|
|
23
|
+
userId: TGUID;
|
|
24
|
+
};
|
|
25
|
+
export type TGetIncidentsByUserIdResponse = TIncident[];
|
|
26
|
+
export type TDeleteIncidentRequestParams = {
|
|
27
|
+
id: TGUID;
|
|
28
|
+
};
|
|
29
|
+
export type TDeleteIncidentResponse = void;
|
|
30
|
+
export type TLinkUserToIncidentRequestBody = {
|
|
31
|
+
incidentId: TGUID;
|
|
32
|
+
userId: TGUID;
|
|
33
|
+
approved?: boolean;
|
|
34
|
+
};
|
|
35
|
+
export type TUpdateIncidentRequestBody = Partial<TIncident>;
|
|
36
|
+
export type TUpdateIncidentResponse = TIncident;
|
|
37
|
+
export type TSetIncidentRatingRequestBody = {
|
|
38
|
+
incidentId: TGUID;
|
|
39
|
+
userId: TGUID;
|
|
40
|
+
rating: number;
|
|
41
|
+
};
|
|
42
|
+
export type TSetIncidentRatingResponse = TIncident;
|
|
43
|
+
export type TGetIncidentByIdRequestParams = {
|
|
44
|
+
id: TGUID;
|
|
45
|
+
};
|
|
46
|
+
export type TGetIncidentByIdResponse = TIncident;
|
package/dist/models/index.d.ts
CHANGED
package/dist/models/index.js
CHANGED
|
@@ -26,3 +26,5 @@ __exportStar(require("./user-day"), exports);
|
|
|
26
26
|
__exportStar(require("./routine"), exports);
|
|
27
27
|
__exportStar(require("./routine-entry"), exports);
|
|
28
28
|
__exportStar(require("./day-item"), exports);
|
|
29
|
+
__exportStar(require("./incident/incident"), exports);
|
|
30
|
+
__exportStar(require("./incident-user/incident-user"), exports);
|