@kipicore/dbcore 1.1.259 → 1.1.261
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/dist/constants/errorMessages.d.ts +2 -1
- package/dist/constants/errorMessages.js +1 -0
- package/dist/constants/successMessages.d.ts +2 -1
- package/dist/constants/successMessages.js +1 -0
- package/dist/interfaces/dashboardManagementInterface.d.ts +1 -1
- package/dist/interfaces/replaceTeacherInterface.d.ts +1 -1
- package/dist/interfaces/ticketRaiseInterface.d.ts +2 -4
- package/dist/interfaces/userInstituteMetaInterface.d.ts +3 -2
- package/dist/models/mongodb/subjectIndexModel.js +2 -6
- package/dist/models/mongodb/ticketRaiseModel.js +3 -3
- package/dist/models/mongodb/userInstituteMetaModel.js +4 -0
- package/package.json +8 -2
|
@@ -1314,5 +1314,6 @@ export declare enum TICKET_RAISE_ERROR_MESSAGES {
|
|
|
1314
1314
|
CREATE_FAIL = "Unable to save ticket",
|
|
1315
1315
|
GET_FAIL = "Unable to retrieve ticket",
|
|
1316
1316
|
UPDATE_FAIL = "Unable to update ticket",
|
|
1317
|
-
DELETE_FAIL = "Unable to delete ticket"
|
|
1317
|
+
DELETE_FAIL = "Unable to delete ticket",
|
|
1318
|
+
COMMENT_DELETED = "Comment deleted!"
|
|
1318
1319
|
}
|
|
@@ -1460,4 +1460,5 @@ var TICKET_RAISE_ERROR_MESSAGES;
|
|
|
1460
1460
|
TICKET_RAISE_ERROR_MESSAGES["GET_FAIL"] = "Unable to retrieve ticket";
|
|
1461
1461
|
TICKET_RAISE_ERROR_MESSAGES["UPDATE_FAIL"] = "Unable to update ticket";
|
|
1462
1462
|
TICKET_RAISE_ERROR_MESSAGES["DELETE_FAIL"] = "Unable to delete ticket";
|
|
1463
|
+
TICKET_RAISE_ERROR_MESSAGES["COMMENT_DELETED"] = "Comment deleted!";
|
|
1463
1464
|
})(TICKET_RAISE_ERROR_MESSAGES || (exports.TICKET_RAISE_ERROR_MESSAGES = TICKET_RAISE_ERROR_MESSAGES = {}));
|
|
@@ -913,5 +913,6 @@ export declare enum TICKET_RAISE_SUCCESS_MESSAGES {
|
|
|
913
913
|
CREATE_SUCCESS = "Ticket created successfully",
|
|
914
914
|
GET_SUCCESS = "Ticket retrieved successfully",
|
|
915
915
|
UPDATE_SUCCESS = "Ticket updated successfully",
|
|
916
|
-
DELETE_SUCCESS = "Ticket deleted successfully"
|
|
916
|
+
DELETE_SUCCESS = "Ticket deleted successfully",
|
|
917
|
+
COMMENT_ADDED = "Comment added"
|
|
917
918
|
}
|
|
@@ -1063,4 +1063,5 @@ var TICKET_RAISE_SUCCESS_MESSAGES;
|
|
|
1063
1063
|
TICKET_RAISE_SUCCESS_MESSAGES["GET_SUCCESS"] = "Ticket retrieved successfully";
|
|
1064
1064
|
TICKET_RAISE_SUCCESS_MESSAGES["UPDATE_SUCCESS"] = "Ticket updated successfully";
|
|
1065
1065
|
TICKET_RAISE_SUCCESS_MESSAGES["DELETE_SUCCESS"] = "Ticket deleted successfully";
|
|
1066
|
+
TICKET_RAISE_SUCCESS_MESSAGES["COMMENT_ADDED"] = "Comment added";
|
|
1066
1067
|
})(TICKET_RAISE_SUCCESS_MESSAGES || (exports.TICKET_RAISE_SUCCESS_MESSAGES = TICKET_RAISE_SUCCESS_MESSAGES = {}));
|
|
@@ -19,5 +19,5 @@ export interface IReplaceTeacherModelAttributes extends IDefaultAttributes, Docu
|
|
|
19
19
|
teacherType: TEACHER_TYPE;
|
|
20
20
|
batches: IReplaceTeacherBatchesSchema[];
|
|
21
21
|
replaceTeacherStatus: REPLACE_TEACHER_STATUS;
|
|
22
|
-
academicCalendarId:
|
|
22
|
+
academicCalendarId: string;
|
|
23
23
|
}
|
|
@@ -4,15 +4,13 @@ import { IDefaultAttributes } from "./commonInterface";
|
|
|
4
4
|
export interface ITicketRaiseConversationAttributes {
|
|
5
5
|
text: string;
|
|
6
6
|
senderId: string;
|
|
7
|
-
parentId
|
|
8
|
-
|
|
7
|
+
parentId?: string;
|
|
8
|
+
conversationId: string;
|
|
9
9
|
}
|
|
10
10
|
export interface ITicketRaiseAttributes extends IDefaultAttributes, Document {
|
|
11
11
|
id: string;
|
|
12
12
|
title: string;
|
|
13
13
|
description: string;
|
|
14
|
-
startDate: Date;
|
|
15
|
-
deadLine: Date;
|
|
16
14
|
status: TICKET_RAISE_STATUS;
|
|
17
15
|
priority: TICKET_RAISE_PRIORITY;
|
|
18
16
|
assignTo: string;
|
|
@@ -9,8 +9,8 @@ export interface IUserInstituteMetaSlots {
|
|
|
9
9
|
}
|
|
10
10
|
export interface IUserTrip {
|
|
11
11
|
tripId: string;
|
|
12
|
-
pickUpNo:
|
|
13
|
-
dropNo:
|
|
12
|
+
pickUpNo: number;
|
|
13
|
+
dropNo: number;
|
|
14
14
|
}
|
|
15
15
|
export interface IStudentFeeService {
|
|
16
16
|
feeTypeId: string;
|
|
@@ -55,4 +55,5 @@ export interface IUserInstituteMetaAttributes extends IDefaultAttributes, Docume
|
|
|
55
55
|
previousEntities?: string[];
|
|
56
56
|
studentFeeService?: IStudentFeeService[];
|
|
57
57
|
studentFeeType?: FEE_COLLECTION_TYPE;
|
|
58
|
+
isSchoolMeta?: boolean;
|
|
58
59
|
}
|
|
@@ -512,9 +512,7 @@ const addDocsDetailsHook = async (subjectIndexList, where = {}, options = {}) =>
|
|
|
512
512
|
attributes: { exclude: defaultModelAttributes_1.DEFAULT_EXCLUDES_ATTRIBUTES },
|
|
513
513
|
});
|
|
514
514
|
const fileCategoryListById = (0, utils_1.keyByFieldOrFields)(fileCategoryList, 'id');
|
|
515
|
-
return await Promise.all(
|
|
516
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
517
|
-
subjectIndexList.map(async (subject) => {
|
|
515
|
+
return await Promise.all(subjectIndexList.map(async (subject) => {
|
|
518
516
|
subject.batchDetails = batchListById[subject.batch] || {};
|
|
519
517
|
subject.userDetails = userListById[subject.userId] || {};
|
|
520
518
|
subject.createdByUser = userListById[subject.createdBy] || {};
|
|
@@ -559,9 +557,7 @@ const addDocsDetailsHook = async (subjectIndexList, where = {}, options = {}) =>
|
|
|
559
557
|
}
|
|
560
558
|
}
|
|
561
559
|
if (subject.chapterIndex?.length) {
|
|
562
|
-
subject.chapterIndex = await Promise.all(
|
|
563
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
564
|
-
subject.chapterIndex.map(async (chapter) => {
|
|
560
|
+
subject.chapterIndex = await Promise.all(subject.chapterIndex.map(async (chapter) => {
|
|
565
561
|
if (chapter.files?.length) {
|
|
566
562
|
if (subject.type === app_1.SUBJECT_INDEX_TYPE.BATCH &&
|
|
567
563
|
options.reqUser &&
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const mongoose_1 = __importStar(require("mongoose"));
|
|
37
|
-
const
|
|
37
|
+
const TicketConversationsSchema = new mongoose_1.Schema({
|
|
38
38
|
text: {
|
|
39
39
|
type: String,
|
|
40
40
|
required: true,
|
|
@@ -43,7 +43,7 @@ const TaskConversationsSchema = new mongoose_1.Schema({
|
|
|
43
43
|
type: String,
|
|
44
44
|
required: true,
|
|
45
45
|
},
|
|
46
|
-
|
|
46
|
+
conversationId: {
|
|
47
47
|
type: String,
|
|
48
48
|
required: true,
|
|
49
49
|
},
|
|
@@ -78,7 +78,7 @@ const TicketRaiseSchema = new mongoose_1.Schema({
|
|
|
78
78
|
required: false,
|
|
79
79
|
},
|
|
80
80
|
conversation: {
|
|
81
|
-
type: [
|
|
81
|
+
type: [TicketConversationsSchema],
|
|
82
82
|
required: false
|
|
83
83
|
},
|
|
84
84
|
academicCalendarId: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kipicore/dbcore",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.261",
|
|
4
4
|
"description": "Reusable DB core package with Postgres, MongoDB, models, services, interfaces, and types",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
+
"prepare": "husky install",
|
|
16
17
|
"clean": "rm -rf dist",
|
|
17
18
|
"build": "tsc -p tsconfig.json",
|
|
18
19
|
"prebuild": "npm run clean",
|
|
@@ -49,13 +50,18 @@
|
|
|
49
50
|
"uuid": "^8.3.2"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
53
|
+
"@eslint/js": "^9.17.0",
|
|
52
54
|
"@types/mongoose": "^5.11.97",
|
|
53
55
|
"@types/node": "^24.5.2",
|
|
54
56
|
"@types/sequelize": "^4.28.14",
|
|
55
57
|
"country-state-city": "^3.2.1",
|
|
58
|
+
"eslint": "^9.17.0",
|
|
59
|
+
"globals": "^15.14.0",
|
|
60
|
+
"husky": "^9.1.7",
|
|
56
61
|
"prettier": "^3.3.3",
|
|
57
62
|
"sequelize-cli": "^6.6.2",
|
|
58
|
-
"typescript": "^5.5.4"
|
|
63
|
+
"typescript": "^5.5.4",
|
|
64
|
+
"typescript-eslint": "^8.18.2"
|
|
59
65
|
},
|
|
60
66
|
"files": [
|
|
61
67
|
"dist",
|