@larisarozin/dodone-shared 1.0.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 +116 -0
- package/dist/api/routes.d.ts +66 -0
- package/dist/api/routes.js +87 -0
- package/dist/config/ConfigContext.d.ts +4 -0
- package/dist/config/ConfigContext.js +10 -0
- package/dist/config/ConfigProvider.d.ts +8 -0
- package/dist/config/ConfigProvider.js +8 -0
- package/dist/config/useConfig.d.ts +1 -0
- package/dist/config/useConfig.js +17 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.js +6 -0
- package/dist/hooks/auth/AuthContext.d.ts +6 -0
- package/dist/hooks/auth/AuthContext.js +10 -0
- package/dist/hooks/auth/AuthProvider.d.ts +6 -0
- package/dist/hooks/auth/AuthProvider.js +83 -0
- package/dist/hooks/auth/AuthState.d.ts +20 -0
- package/dist/hooks/auth/AuthState.js +7 -0
- package/dist/hooks/auth/useAuth.d.ts +3 -0
- package/dist/hooks/auth/useAuth.js +17 -0
- package/dist/hooks/useAllowanceHistories.d.ts +9 -0
- package/dist/hooks/useAllowanceHistories.js +87 -0
- package/dist/hooks/useAllowanceHistoryTaskItems.d.ts +7 -0
- package/dist/hooks/useAllowanceHistoryTaskItems.js +69 -0
- package/dist/hooks/useGrades.d.ts +5 -0
- package/dist/hooks/useGrades.js +50 -0
- package/dist/hooks/useNotificationPreferences.d.ts +9 -0
- package/dist/hooks/useNotificationPreferences.js +107 -0
- package/dist/hooks/useTaskCategories.d.ts +7 -0
- package/dist/hooks/useTaskCategories.js +70 -0
- package/dist/hooks/useTaskComments.d.ts +7 -0
- package/dist/hooks/useTaskComments.js +69 -0
- package/dist/hooks/useTaskGroups.d.ts +7 -0
- package/dist/hooks/useTaskGroups.js +70 -0
- package/dist/hooks/useTaskItems.d.ts +7 -0
- package/dist/hooks/useTaskItems.js +70 -0
- package/dist/hooks/useTaskKinds.d.ts +7 -0
- package/dist/hooks/useTaskKinds.js +70 -0
- package/dist/hooks/useTeam.d.ts +24 -0
- package/dist/hooks/useTeam.js +255 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +50 -0
- package/dist/types/AllowanceHistory.d.ts +66 -0
- package/dist/types/AllowanceHistory.js +7 -0
- package/dist/types/AllowanceInterval.d.ts +29 -0
- package/dist/types/AllowanceInterval.js +40 -0
- package/dist/types/ApiResponse.d.ts +7 -0
- package/dist/types/ApiResponse.js +7 -0
- package/dist/types/DeviceRegistration.d.ts +6 -0
- package/dist/types/DeviceRegistration.js +7 -0
- package/dist/types/TaskItem.d.ts +174 -0
- package/dist/types/TaskItem.js +16 -0
- package/dist/types/Team.d.ts +76 -0
- package/dist/types/Team.js +7 -0
- package/dist/types/User.d.ts +91 -0
- package/dist/types/User.js +7 -0
- package/dist/types/UserNotificationPreferences.d.ts +81 -0
- package/dist/types/UserNotificationPreferences.js +68 -0
- package/dist/utils/ApiClient.d.ts +204 -0
- package/dist/utils/ApiClient.js +608 -0
- package/dist/utils/paging.d.ts +305 -0
- package/dist/utils/paging.js +428 -0
- package/dist/utils/storage.d.ts +7 -0
- package/dist/utils/storage.js +37 -0
- package/dist/utils/utils.d.ts +0 -0
- package/dist/utils/utils.js +6 -0
- package/package.json +29 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { User } from "./User";
|
|
2
|
+
export interface RequestBase {
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
isActive: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface ExistingItemBase extends RequestBase {
|
|
8
|
+
createdBy: number;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
updatedBy?: number;
|
|
11
|
+
updatedAt?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface GradeResponse {
|
|
14
|
+
id: number;
|
|
15
|
+
letterGrade: string;
|
|
16
|
+
gradePoints: number;
|
|
17
|
+
percentGradeMin: number;
|
|
18
|
+
percentGradeMax: number;
|
|
19
|
+
reducePercent: number;
|
|
20
|
+
}
|
|
21
|
+
export interface TaskCategoryCreateRequest extends RequestBase {
|
|
22
|
+
kindId: number;
|
|
23
|
+
}
|
|
24
|
+
export interface TaskCategoryUpdateRequest extends RequestBase {
|
|
25
|
+
id: number;
|
|
26
|
+
kindId: number;
|
|
27
|
+
}
|
|
28
|
+
export interface TaskCategoryResponse extends ExistingItemBase {
|
|
29
|
+
id: number;
|
|
30
|
+
kindId: number;
|
|
31
|
+
}
|
|
32
|
+
export interface TaskCategoryDetailsResponse extends TaskCategoryResponse {
|
|
33
|
+
createdByUser: User;
|
|
34
|
+
updatedByUser?: User;
|
|
35
|
+
}
|
|
36
|
+
export interface TaskKindCreateRequest extends RequestBase {
|
|
37
|
+
groupId: number;
|
|
38
|
+
}
|
|
39
|
+
export interface TaskKindUpdateRequest extends RequestBase {
|
|
40
|
+
id: number;
|
|
41
|
+
groupId: number;
|
|
42
|
+
}
|
|
43
|
+
export interface TaskKindResponse extends ExistingItemBase {
|
|
44
|
+
id: number;
|
|
45
|
+
groupId: number;
|
|
46
|
+
}
|
|
47
|
+
export interface TaskKindDetailsResponse extends TaskKindResponse {
|
|
48
|
+
createdByUser: User;
|
|
49
|
+
updatedByUser?: User;
|
|
50
|
+
categories?: TaskCategoryResponse[];
|
|
51
|
+
}
|
|
52
|
+
export interface TaskGroupBase extends ExistingItemBase {
|
|
53
|
+
id: number;
|
|
54
|
+
userId: number;
|
|
55
|
+
teamId?: number;
|
|
56
|
+
isPrivate: boolean;
|
|
57
|
+
}
|
|
58
|
+
export interface TaskGroupCreateRequest extends RequestBase {
|
|
59
|
+
userId: number;
|
|
60
|
+
isPrivate: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface TaskGroupUpdateRequest extends RequestBase {
|
|
63
|
+
id: number;
|
|
64
|
+
isPrivate: boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface TaskGroupResponse extends TaskGroupBase {
|
|
67
|
+
}
|
|
68
|
+
export interface TaskGroupDetailsResponse extends TaskGroupResponse {
|
|
69
|
+
createdByUser: User;
|
|
70
|
+
updatedByUser?: User;
|
|
71
|
+
kinds?: TaskKindResponse[];
|
|
72
|
+
}
|
|
73
|
+
export declare enum TaskItemPriority {
|
|
74
|
+
None = 0,
|
|
75
|
+
Low = 1,
|
|
76
|
+
Medium = 2,
|
|
77
|
+
High = 3,
|
|
78
|
+
Critical = 4
|
|
79
|
+
}
|
|
80
|
+
export interface TaskItemUpdateBase extends RequestBase {
|
|
81
|
+
teamId?: number;
|
|
82
|
+
groupId?: number;
|
|
83
|
+
kindId?: number;
|
|
84
|
+
categoryId?: number;
|
|
85
|
+
credits?: number;
|
|
86
|
+
gradeId?: number;
|
|
87
|
+
maxBonus?: string;
|
|
88
|
+
percentComplete?: number;
|
|
89
|
+
isCompleted?: boolean;
|
|
90
|
+
isPinned?: boolean;
|
|
91
|
+
isArchived?: boolean;
|
|
92
|
+
isPrivate: boolean;
|
|
93
|
+
priority: TaskItemPriority;
|
|
94
|
+
activeAt?: string;
|
|
95
|
+
activeBy?: number;
|
|
96
|
+
archivedAt?: string;
|
|
97
|
+
archivedBy?: number;
|
|
98
|
+
gradedAt?: string;
|
|
99
|
+
gradedBy?: number;
|
|
100
|
+
completedAt?: string;
|
|
101
|
+
completedBy?: number;
|
|
102
|
+
assignedTo?: number;
|
|
103
|
+
assignedBy?: number;
|
|
104
|
+
assignedAt?: string;
|
|
105
|
+
dueAt?: string;
|
|
106
|
+
startAt?: string;
|
|
107
|
+
endAt?: string;
|
|
108
|
+
teamAllowanceIntervalId?: number;
|
|
109
|
+
}
|
|
110
|
+
export interface TaskItemBase extends TaskItemUpdateBase {
|
|
111
|
+
details?: string;
|
|
112
|
+
}
|
|
113
|
+
export interface TaskItemResponse extends ExistingItemBase, TaskItemBase {
|
|
114
|
+
id: number;
|
|
115
|
+
approvedBonus?: string;
|
|
116
|
+
isBonusRejected?: boolean;
|
|
117
|
+
bonusStatusBy?: number;
|
|
118
|
+
bonusStatusAt?: string;
|
|
119
|
+
bonusStatusComment?: string;
|
|
120
|
+
bonusClaimedAt?: string;
|
|
121
|
+
isApprovedForAllowance: boolean;
|
|
122
|
+
allowanceApprovalStatusAt?: string;
|
|
123
|
+
allowanceApprovalStatusBy?: number;
|
|
124
|
+
allowanceApprovalStatusComment?: string;
|
|
125
|
+
teamAllowanceIntervalName: string;
|
|
126
|
+
}
|
|
127
|
+
export interface TaskItemDetailsResponse extends TaskItemResponse {
|
|
128
|
+
group?: TaskGroupResponse;
|
|
129
|
+
kind?: TaskKindResponse;
|
|
130
|
+
category?: TaskCategoryResponse;
|
|
131
|
+
grade?: GradeResponse;
|
|
132
|
+
details?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface TaskItemTaskDetailsUpdateRequest {
|
|
135
|
+
id: number;
|
|
136
|
+
taskDetails: string;
|
|
137
|
+
}
|
|
138
|
+
export interface TaskItemCreateRequest extends TaskItemUpdateBase {
|
|
139
|
+
}
|
|
140
|
+
export interface TaskItemUpdateRequest extends TaskItemUpdateBase {
|
|
141
|
+
id: number;
|
|
142
|
+
}
|
|
143
|
+
export interface BonusApprovalRequest {
|
|
144
|
+
taskItemId: number;
|
|
145
|
+
isApproved: boolean;
|
|
146
|
+
approvedBonus?: string;
|
|
147
|
+
comment?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface TaskItemAllowanceApprovalRequest {
|
|
150
|
+
taskItemId: number;
|
|
151
|
+
teamAllowanceIntervalId: number;
|
|
152
|
+
isApproved: boolean;
|
|
153
|
+
comment?: string;
|
|
154
|
+
}
|
|
155
|
+
export interface TaskCommentBase {
|
|
156
|
+
taskId: number;
|
|
157
|
+
userId: number;
|
|
158
|
+
content: string;
|
|
159
|
+
createdAt: string;
|
|
160
|
+
updatedAt?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface TaskCommentCreateRequest {
|
|
163
|
+
taskId: number;
|
|
164
|
+
content: string;
|
|
165
|
+
}
|
|
166
|
+
export interface TaskCommentUpdateRequest {
|
|
167
|
+
id: number;
|
|
168
|
+
content: string;
|
|
169
|
+
}
|
|
170
|
+
export interface TaskCommentResponse extends ExistingItemBase, TaskCommentBase {
|
|
171
|
+
id: number;
|
|
172
|
+
createdByUser: User;
|
|
173
|
+
updatedByUser?: User;
|
|
174
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Larisa Rozin
|
|
4
|
+
* dodone-shared - Task Management, Allowance & Bonus Tracking Application Package
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.TaskItemPriority = void 0;
|
|
9
|
+
var TaskItemPriority;
|
|
10
|
+
(function (TaskItemPriority) {
|
|
11
|
+
TaskItemPriority[TaskItemPriority["None"] = 0] = "None";
|
|
12
|
+
TaskItemPriority[TaskItemPriority["Low"] = 1] = "Low";
|
|
13
|
+
TaskItemPriority[TaskItemPriority["Medium"] = 2] = "Medium";
|
|
14
|
+
TaskItemPriority[TaskItemPriority["High"] = 3] = "High";
|
|
15
|
+
TaskItemPriority[TaskItemPriority["Critical"] = 4] = "Critical";
|
|
16
|
+
})(TaskItemPriority || (exports.TaskItemPriority = TaskItemPriority = {}));
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { AllowanceDayOfWeek, AllowanceIntervalType, AllowanceMonthOfYear } from "./AllowanceInterval";
|
|
2
|
+
import { User } from "./User";
|
|
3
|
+
export interface TeamGradeConfigResponse {
|
|
4
|
+
id: number;
|
|
5
|
+
teamAllowanceIntervalId: number;
|
|
6
|
+
gradeId: number;
|
|
7
|
+
allowanceReducePercent: number;
|
|
8
|
+
createdAt: Date;
|
|
9
|
+
createdBy: number;
|
|
10
|
+
updatedAt?: Date;
|
|
11
|
+
updatedBy: number;
|
|
12
|
+
}
|
|
13
|
+
export interface TeamDetailsBase {
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
isBusiness: boolean;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ExistingTeamDetails extends TeamDetailsBase {
|
|
20
|
+
id: number;
|
|
21
|
+
updatedAt?: string;
|
|
22
|
+
updatedBy: number;
|
|
23
|
+
updatedByUser: User;
|
|
24
|
+
}
|
|
25
|
+
export interface TeamDetailsCreateRequest extends TeamDetailsBase {
|
|
26
|
+
}
|
|
27
|
+
export interface TeamDetailsUpdateRequest extends ExistingTeamDetails {
|
|
28
|
+
}
|
|
29
|
+
export interface TeamDetailsResponse extends ExistingTeamDetails {
|
|
30
|
+
members: User[];
|
|
31
|
+
}
|
|
32
|
+
export interface TeamAllowanceIntervalGradingPeriodResponse {
|
|
33
|
+
id: number;
|
|
34
|
+
name: string;
|
|
35
|
+
startMonth: AllowanceMonthOfYear;
|
|
36
|
+
startDay: number;
|
|
37
|
+
endMonth: AllowanceMonthOfYear;
|
|
38
|
+
endDay: number;
|
|
39
|
+
isSchoolBreak: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface TeamAllowanceIntervalBase {
|
|
42
|
+
teamId: number;
|
|
43
|
+
name: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
maxAllowanceAmount: number;
|
|
46
|
+
minCreditsForAllowance: number;
|
|
47
|
+
intervalType: AllowanceIntervalType;
|
|
48
|
+
intervalValue: number;
|
|
49
|
+
startDayOfWeek?: AllowanceDayOfWeek;
|
|
50
|
+
startMonthOfYear?: number;
|
|
51
|
+
isActive: boolean;
|
|
52
|
+
resetGradesOnIntervalEnd: boolean;
|
|
53
|
+
createdBy: number;
|
|
54
|
+
createdAt: string;
|
|
55
|
+
gradeConfigs: TeamGradeConfigResponse[];
|
|
56
|
+
gradingPeriods?: TeamAllowanceIntervalGradingPeriodResponse[];
|
|
57
|
+
}
|
|
58
|
+
export interface ExistingTeamAllowanceInterval extends TeamAllowanceIntervalBase {
|
|
59
|
+
id: number;
|
|
60
|
+
updatedAt?: string;
|
|
61
|
+
updatedBy: number;
|
|
62
|
+
}
|
|
63
|
+
export interface TeamAllowanceIntervalResponse extends ExistingTeamAllowanceInterval {
|
|
64
|
+
createdByUser: User;
|
|
65
|
+
updatedByUser: User;
|
|
66
|
+
}
|
|
67
|
+
export interface TeamAllowanceIntervalCreateRequest extends TeamAllowanceIntervalBase {
|
|
68
|
+
}
|
|
69
|
+
export interface TeamAllowanceIntervalUpdateRequest extends ExistingTeamAllowanceInterval {
|
|
70
|
+
}
|
|
71
|
+
export interface TeamAllowanceIntervalDeleteRequest {
|
|
72
|
+
id: number;
|
|
73
|
+
}
|
|
74
|
+
export interface TeamAllowanceIntervalListResponse {
|
|
75
|
+
allowanceIntervals: TeamAllowanceIntervalResponse[];
|
|
76
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { ResponseBase } from "./ApiResponse";
|
|
2
|
+
import type { TaskItemDetailsResponse } from "./TaskItem";
|
|
3
|
+
export interface Team {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
isBusiness: boolean;
|
|
8
|
+
members: User[];
|
|
9
|
+
taskItems?: TaskItemDetailsResponse[];
|
|
10
|
+
}
|
|
11
|
+
export interface User {
|
|
12
|
+
id: number;
|
|
13
|
+
teamId: number;
|
|
14
|
+
userName: string;
|
|
15
|
+
password?: string;
|
|
16
|
+
email: string;
|
|
17
|
+
firstName: string;
|
|
18
|
+
lastName: string;
|
|
19
|
+
middleName?: string;
|
|
20
|
+
salutation?: string;
|
|
21
|
+
avatarUri?: string;
|
|
22
|
+
isAdmin: boolean;
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
createdBy: number;
|
|
25
|
+
updatedBy: number;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
updatedAt?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface RegisterRequest {
|
|
30
|
+
userName: string;
|
|
31
|
+
password: string;
|
|
32
|
+
email: string;
|
|
33
|
+
firstName: string;
|
|
34
|
+
lastName: string;
|
|
35
|
+
middleName?: string;
|
|
36
|
+
salutation?: string;
|
|
37
|
+
teamName?: string;
|
|
38
|
+
teamDescription?: string;
|
|
39
|
+
isBusiness?: boolean;
|
|
40
|
+
deviceId: string;
|
|
41
|
+
platform: string;
|
|
42
|
+
timezone: string;
|
|
43
|
+
}
|
|
44
|
+
export interface LoginRequest {
|
|
45
|
+
userName: string;
|
|
46
|
+
password: string;
|
|
47
|
+
}
|
|
48
|
+
export interface LoginResponse {
|
|
49
|
+
user: User;
|
|
50
|
+
token: string;
|
|
51
|
+
}
|
|
52
|
+
export interface UserUpdateRequest {
|
|
53
|
+
id: number;
|
|
54
|
+
userName?: string;
|
|
55
|
+
password: string;
|
|
56
|
+
email?: string;
|
|
57
|
+
firstName?: string;
|
|
58
|
+
lastName?: string;
|
|
59
|
+
middleName?: string;
|
|
60
|
+
salutation?: string;
|
|
61
|
+
avatarUri?: string;
|
|
62
|
+
isAdmin?: boolean;
|
|
63
|
+
isActive?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface UserCreateRequest {
|
|
66
|
+
userName: string;
|
|
67
|
+
email: string;
|
|
68
|
+
firstName: string;
|
|
69
|
+
lastName: string;
|
|
70
|
+
middleName?: string;
|
|
71
|
+
salutation?: string;
|
|
72
|
+
avatarUri?: string;
|
|
73
|
+
isAdmin?: boolean;
|
|
74
|
+
isActive?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface ForgotPasswordRequest {
|
|
77
|
+
email: string;
|
|
78
|
+
}
|
|
79
|
+
export interface ForgotPasswordResponse extends ResponseBase {
|
|
80
|
+
}
|
|
81
|
+
export interface ResetPasswordRequest {
|
|
82
|
+
token: string;
|
|
83
|
+
newPassword: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ResetPasswordResponse extends ResponseBase {
|
|
86
|
+
}
|
|
87
|
+
export interface SendPasswordResetEmailRequest {
|
|
88
|
+
userId: number;
|
|
89
|
+
}
|
|
90
|
+
export interface SendPasswordResetEmailResponse extends ResponseBase {
|
|
91
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare enum NotificationType {
|
|
2
|
+
OptInToTeamEventNotifications = 0,
|
|
3
|
+
TaskCreated = 1,
|
|
4
|
+
TaskDeleted = 2,
|
|
5
|
+
TaskAssigned = 3,
|
|
6
|
+
TaskUnassigned = 4,
|
|
7
|
+
TaskReassigned = 5,
|
|
8
|
+
TaskMarkedCompleted = 6,
|
|
9
|
+
TaskMarkedIncomplete = 7,
|
|
10
|
+
TaskProgressUpdated = 8,
|
|
11
|
+
TaskMarkedActive = 9,
|
|
12
|
+
TaskMarkedInactive = 10,
|
|
13
|
+
TaskArchived = 11,
|
|
14
|
+
TaskUnarchived = 12,
|
|
15
|
+
TaskGroupChanged = 13,
|
|
16
|
+
TaskKindChanged = 14,
|
|
17
|
+
TaskCategoryChanged = 15,
|
|
18
|
+
TaskDetailsUpdated = 16,
|
|
19
|
+
TaskPriorityChanged = 17,
|
|
20
|
+
TaskCreditsAssigned = 18,
|
|
21
|
+
TaskCreditsRemoved = 19,
|
|
22
|
+
TaskCreditsChanged = 20,
|
|
23
|
+
TaskGraded = 21,
|
|
24
|
+
TaskGradeChanged = 22,
|
|
25
|
+
TaskGradeRemoved = 23,
|
|
26
|
+
TaskCommentCreated = 24,
|
|
27
|
+
TaskCommentUpdated = 25,
|
|
28
|
+
TaskCommentDeleted = 26,
|
|
29
|
+
AllowanceClaimed = 100,
|
|
30
|
+
AllowanceApproved = 101,
|
|
31
|
+
AllowanceRejected = 102,
|
|
32
|
+
TaskAllowanceApproved = 103,
|
|
33
|
+
TaskAllowanceRejected = 104,
|
|
34
|
+
TaskAllowanceIntervalRemoved = 105,
|
|
35
|
+
TaskAllowanceIntervalAssigned = 106,
|
|
36
|
+
TaskAllowanceIntervalChanged = 107,
|
|
37
|
+
BonusAssigned = 200,
|
|
38
|
+
BonusChanged = 201,
|
|
39
|
+
BonusRemoved = 202,
|
|
40
|
+
BonusClaimed = 203,
|
|
41
|
+
BonusApproved = 204,
|
|
42
|
+
BonusRejected = 205,
|
|
43
|
+
TaskDueSoon = 1001,
|
|
44
|
+
TaskDue = 1002,
|
|
45
|
+
TaskStartingSoon = 1003,
|
|
46
|
+
TaskStarted = 1004,
|
|
47
|
+
TaskEndingSoon = 1005,
|
|
48
|
+
TaskEnded = 1006,
|
|
49
|
+
AllowanceDaySoon = 1007,
|
|
50
|
+
AllowanceDay = 1008
|
|
51
|
+
}
|
|
52
|
+
export declare enum NotificationChannel {
|
|
53
|
+
Email = 0,
|
|
54
|
+
Push = 1,
|
|
55
|
+
SMS = 2,
|
|
56
|
+
InApp = 3
|
|
57
|
+
}
|
|
58
|
+
export interface UserNotificationPreferenceResponse {
|
|
59
|
+
id: number;
|
|
60
|
+
userId: number;
|
|
61
|
+
notificationType: NotificationType;
|
|
62
|
+
channel: NotificationChannel;
|
|
63
|
+
isEnabled: boolean;
|
|
64
|
+
createdAt: Date;
|
|
65
|
+
updatedAt?: Date;
|
|
66
|
+
}
|
|
67
|
+
export interface UserNotificationPreferenceUpdateRequest {
|
|
68
|
+
id: number;
|
|
69
|
+
isEnabled: boolean;
|
|
70
|
+
}
|
|
71
|
+
export interface UserNotificationPreferenceCreateRequest {
|
|
72
|
+
notificationType: NotificationType;
|
|
73
|
+
channel: NotificationChannel;
|
|
74
|
+
isEnabled: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface BulkNotificationPreferenceUpdateRequest {
|
|
77
|
+
Preferences: UserNotificationPreferenceUpdateRequest[];
|
|
78
|
+
}
|
|
79
|
+
export interface BulkNotificationPreferenceCreateRequest {
|
|
80
|
+
Preferences: UserNotificationPreferenceCreateRequest[];
|
|
81
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2025 Larisa Rozin
|
|
4
|
+
* dodone-shared - Task Management, Allowance & Bonus Tracking Application Package
|
|
5
|
+
* All rights reserved.
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.NotificationChannel = exports.NotificationType = void 0;
|
|
9
|
+
var NotificationType;
|
|
10
|
+
(function (NotificationType) {
|
|
11
|
+
NotificationType[NotificationType["OptInToTeamEventNotifications"] = 0] = "OptInToTeamEventNotifications";
|
|
12
|
+
NotificationType[NotificationType["TaskCreated"] = 1] = "TaskCreated";
|
|
13
|
+
NotificationType[NotificationType["TaskDeleted"] = 2] = "TaskDeleted";
|
|
14
|
+
NotificationType[NotificationType["TaskAssigned"] = 3] = "TaskAssigned";
|
|
15
|
+
NotificationType[NotificationType["TaskUnassigned"] = 4] = "TaskUnassigned";
|
|
16
|
+
NotificationType[NotificationType["TaskReassigned"] = 5] = "TaskReassigned";
|
|
17
|
+
NotificationType[NotificationType["TaskMarkedCompleted"] = 6] = "TaskMarkedCompleted";
|
|
18
|
+
NotificationType[NotificationType["TaskMarkedIncomplete"] = 7] = "TaskMarkedIncomplete";
|
|
19
|
+
NotificationType[NotificationType["TaskProgressUpdated"] = 8] = "TaskProgressUpdated";
|
|
20
|
+
NotificationType[NotificationType["TaskMarkedActive"] = 9] = "TaskMarkedActive";
|
|
21
|
+
NotificationType[NotificationType["TaskMarkedInactive"] = 10] = "TaskMarkedInactive";
|
|
22
|
+
NotificationType[NotificationType["TaskArchived"] = 11] = "TaskArchived";
|
|
23
|
+
NotificationType[NotificationType["TaskUnarchived"] = 12] = "TaskUnarchived";
|
|
24
|
+
NotificationType[NotificationType["TaskGroupChanged"] = 13] = "TaskGroupChanged";
|
|
25
|
+
NotificationType[NotificationType["TaskKindChanged"] = 14] = "TaskKindChanged";
|
|
26
|
+
NotificationType[NotificationType["TaskCategoryChanged"] = 15] = "TaskCategoryChanged";
|
|
27
|
+
NotificationType[NotificationType["TaskDetailsUpdated"] = 16] = "TaskDetailsUpdated";
|
|
28
|
+
NotificationType[NotificationType["TaskPriorityChanged"] = 17] = "TaskPriorityChanged";
|
|
29
|
+
NotificationType[NotificationType["TaskCreditsAssigned"] = 18] = "TaskCreditsAssigned";
|
|
30
|
+
NotificationType[NotificationType["TaskCreditsRemoved"] = 19] = "TaskCreditsRemoved";
|
|
31
|
+
NotificationType[NotificationType["TaskCreditsChanged"] = 20] = "TaskCreditsChanged";
|
|
32
|
+
NotificationType[NotificationType["TaskGraded"] = 21] = "TaskGraded";
|
|
33
|
+
NotificationType[NotificationType["TaskGradeChanged"] = 22] = "TaskGradeChanged";
|
|
34
|
+
NotificationType[NotificationType["TaskGradeRemoved"] = 23] = "TaskGradeRemoved";
|
|
35
|
+
NotificationType[NotificationType["TaskCommentCreated"] = 24] = "TaskCommentCreated";
|
|
36
|
+
NotificationType[NotificationType["TaskCommentUpdated"] = 25] = "TaskCommentUpdated";
|
|
37
|
+
NotificationType[NotificationType["TaskCommentDeleted"] = 26] = "TaskCommentDeleted";
|
|
38
|
+
NotificationType[NotificationType["AllowanceClaimed"] = 100] = "AllowanceClaimed";
|
|
39
|
+
NotificationType[NotificationType["AllowanceApproved"] = 101] = "AllowanceApproved";
|
|
40
|
+
NotificationType[NotificationType["AllowanceRejected"] = 102] = "AllowanceRejected";
|
|
41
|
+
NotificationType[NotificationType["TaskAllowanceApproved"] = 103] = "TaskAllowanceApproved";
|
|
42
|
+
NotificationType[NotificationType["TaskAllowanceRejected"] = 104] = "TaskAllowanceRejected";
|
|
43
|
+
NotificationType[NotificationType["TaskAllowanceIntervalRemoved"] = 105] = "TaskAllowanceIntervalRemoved";
|
|
44
|
+
NotificationType[NotificationType["TaskAllowanceIntervalAssigned"] = 106] = "TaskAllowanceIntervalAssigned";
|
|
45
|
+
NotificationType[NotificationType["TaskAllowanceIntervalChanged"] = 107] = "TaskAllowanceIntervalChanged";
|
|
46
|
+
NotificationType[NotificationType["BonusAssigned"] = 200] = "BonusAssigned";
|
|
47
|
+
NotificationType[NotificationType["BonusChanged"] = 201] = "BonusChanged";
|
|
48
|
+
NotificationType[NotificationType["BonusRemoved"] = 202] = "BonusRemoved";
|
|
49
|
+
NotificationType[NotificationType["BonusClaimed"] = 203] = "BonusClaimed";
|
|
50
|
+
NotificationType[NotificationType["BonusApproved"] = 204] = "BonusApproved";
|
|
51
|
+
NotificationType[NotificationType["BonusRejected"] = 205] = "BonusRejected";
|
|
52
|
+
// Periodic Task Notifications
|
|
53
|
+
NotificationType[NotificationType["TaskDueSoon"] = 1001] = "TaskDueSoon";
|
|
54
|
+
NotificationType[NotificationType["TaskDue"] = 1002] = "TaskDue";
|
|
55
|
+
NotificationType[NotificationType["TaskStartingSoon"] = 1003] = "TaskStartingSoon";
|
|
56
|
+
NotificationType[NotificationType["TaskStarted"] = 1004] = "TaskStarted";
|
|
57
|
+
NotificationType[NotificationType["TaskEndingSoon"] = 1005] = "TaskEndingSoon";
|
|
58
|
+
NotificationType[NotificationType["TaskEnded"] = 1006] = "TaskEnded";
|
|
59
|
+
NotificationType[NotificationType["AllowanceDaySoon"] = 1007] = "AllowanceDaySoon";
|
|
60
|
+
NotificationType[NotificationType["AllowanceDay"] = 1008] = "AllowanceDay";
|
|
61
|
+
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
62
|
+
var NotificationChannel;
|
|
63
|
+
(function (NotificationChannel) {
|
|
64
|
+
NotificationChannel[NotificationChannel["Email"] = 0] = "Email";
|
|
65
|
+
NotificationChannel[NotificationChannel["Push"] = 1] = "Push";
|
|
66
|
+
NotificationChannel[NotificationChannel["SMS"] = 2] = "SMS";
|
|
67
|
+
NotificationChannel[NotificationChannel["InApp"] = 3] = "InApp";
|
|
68
|
+
})(NotificationChannel || (exports.NotificationChannel = NotificationChannel = {}));
|