joye-backend-utility 5.1.10 → 5.1.11
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 +2 -2
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +8 -8
- package/dist/database.d.ts +26 -26
- package/dist/database.js +142 -141
- package/dist/dateTime.d.ts +11 -11
- package/dist/dateTime.js +82 -82
- package/dist/index.d.ts +6 -6
- package/dist/index.js +26 -26
- package/dist/jwt.d.ts +3 -3
- package/dist/jwt.js +40 -40
- package/dist/redisClient.d.ts +6 -6
- package/dist/redisClient.js +34 -34
- package/dist/schema/brew.d.ts +2 -2
- package/dist/schema/brew.js +160 -160
- package/dist/schema/databaseInfo.d.ts +2 -2
- package/dist/schema/databaseInfo.js +35 -35
- package/dist/schema/index.d.ts +38 -37
- package/dist/schema/index.js +79 -77
- package/dist/schema/masterAppSetting.d.ts +2 -2
- package/dist/schema/masterAppSetting.js +24 -24
- package/dist/schema/masterBlessingsData.d.ts +2 -2
- package/dist/schema/masterBlessingsData.js +41 -41
- package/dist/schema/masterData.d.ts +2 -2
- package/dist/schema/masterData.js +28 -28
- package/dist/schema/masterEmotion.d.ts +2 -2
- package/dist/schema/masterEmotion.js +115 -115
- package/dist/schema/masterEmotionMessageMapping.d.ts +2 -2
- package/dist/schema/masterEmotionMessageMapping.js +16 -16
- package/dist/schema/masterEmotionMessageTypeThemeMapping.d.ts +2 -2
- package/dist/schema/masterEmotionMessageTypeThemeMapping.js +23 -23
- package/dist/schema/masterLinkCard.d.ts +2 -2
- package/dist/schema/masterLinkCard.js +28 -28
- package/dist/schema/masterPodcast.d.ts +2 -2
- package/dist/schema/masterPodcast.js +37 -37
- package/dist/schema/masterPredictionEmotion.d.ts +2 -2
- package/dist/schema/masterPredictionEmotion.js +27 -27
- package/dist/schema/masterPredictionEmotionMessage.d.ts +2 -2
- package/dist/schema/masterPredictionEmotionMessage.js +26 -26
- package/dist/schema/masterPredictionEmotionMessageMapping.d.ts +2 -2
- package/dist/schema/masterPredictionEmotionMessageMapping.js +16 -16
- package/dist/schema/masterSuggestionsMessage.model.d.ts +2 -2
- package/dist/schema/masterSuggestionsMessage.model.js +31 -31
- package/dist/schema/masterSuggestionsParameter.model.d.ts +2 -2
- package/dist/schema/masterSuggestionsParameter.model.js +23 -23
- package/dist/schema/masterThemeData.d.ts +2 -2
- package/dist/schema/masterThemeData.js +48 -48
- package/dist/schema/masterThemeMessage.d.ts +2 -2
- package/dist/schema/masterThemeMessage.js +13 -13
- package/dist/schema/masterTraining.d.ts +2 -2
- package/dist/schema/masterTraining.js +29 -29
- package/dist/schema/masterTrainingWeek.d.ts +2 -2
- package/dist/schema/masterTrainingWeek.js +32 -32
- package/dist/schema/masterVideo.d.ts +2 -2
- package/dist/schema/masterVideo.js +33 -33
- package/dist/schema/organization.d.ts +2 -2
- package/dist/schema/organization.js +79 -79
- package/dist/schema/organizationUserAttrPermission.d.ts +2 -2
- package/dist/schema/organizationUserAttrPermission.js +59 -59
- package/dist/schema/platform.d.ts +2 -2
- package/dist/schema/platform.js +28 -28
- package/dist/schema/timezones.d.ts +2 -2
- package/dist/schema/timezones.js +26 -26
- package/dist/schema/user.d.ts +2 -2
- package/dist/schema/user.js +202 -202
- package/dist/schema/userFeedback.d.ts +2 -2
- package/dist/schema/userFeedback.js +24 -24
- package/dist/schema/userGoal.d.ts +2 -2
- package/dist/schema/userGoal.js +38 -38
- package/dist/schema/userJoyLevelQa.d.ts +2 -2
- package/dist/schema/userJoyLevelQa.js +49 -49
- package/dist/schema/userLog.d.ts +2 -2
- package/dist/schema/userLog.js +22 -22
- package/dist/schema/userMeeting.d.ts +2 -2
- package/dist/schema/userMeeting.js +22 -22
- package/dist/schema/userMessages.d.ts +2 -2
- package/dist/schema/userMessages.js +24 -24
- package/dist/schema/userMessagesLog.d.ts +2 -2
- package/dist/schema/userMessagesLog.js +69 -69
- package/dist/schema/userRecommendation.d.ts +2 -2
- package/dist/schema/userRecommendation.js +24 -24
- package/dist/schema/userReminder.d.ts +2 -2
- package/dist/schema/userReminder.js +61 -61
- package/dist/schema/userTrainingData.d.ts +2 -2
- package/dist/schema/userTrainingData.js +37 -37
- package/dist/schema/userTrainingWeekData.d.ts +2 -2
- package/dist/schema/userTrainingWeekData.js +36 -36
- package/dist/schema/userVideo.d.ts +2 -2
- package/dist/schema/userVideo.js +50 -50
- package/dist/schema/userWeekActivity.d.ts +2 -0
- package/dist/schema/userWeekActivity.js +90 -0
- package/dist/util.d.ts +2 -2
- package/dist/util.js +13 -13
- package/package.json +62 -62
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserReminderSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const UserReminder = new mongoose_1.Schema({
|
|
6
|
-
employeeId: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
index: true,
|
|
10
|
-
},
|
|
11
|
-
note: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
days: {
|
|
16
|
-
type: Array,
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
time: {
|
|
20
|
-
type: String,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
endDate: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
taskOneDate: {
|
|
28
|
-
type: String,
|
|
29
|
-
required: true,
|
|
30
|
-
},
|
|
31
|
-
taskTwoDate: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: true,
|
|
34
|
-
},
|
|
35
|
-
taskThreeDate: {
|
|
36
|
-
type: String,
|
|
37
|
-
required: true,
|
|
38
|
-
},
|
|
39
|
-
taskOneTime: {
|
|
40
|
-
type: String,
|
|
41
|
-
required: true,
|
|
42
|
-
},
|
|
43
|
-
taskTwoTime: {
|
|
44
|
-
type: String,
|
|
45
|
-
required: true,
|
|
46
|
-
},
|
|
47
|
-
taskThreeTime: {
|
|
48
|
-
type: String,
|
|
49
|
-
required: true,
|
|
50
|
-
},
|
|
51
|
-
});
|
|
52
|
-
UserReminder.index({ taskOneDate: 1, taskOneTime: -1 }, {
|
|
53
|
-
unique: false,
|
|
54
|
-
});
|
|
55
|
-
UserReminder.index({ taskTwoDate: 1, taskTwoTime: -1 }, {
|
|
56
|
-
unique: false,
|
|
57
|
-
});
|
|
58
|
-
UserReminder.index({ taskThreeDate: 1, taskThreeTime: -1 }, {
|
|
59
|
-
unique: false,
|
|
60
|
-
});
|
|
61
|
-
exports.UserReminderSchema = UserReminder;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserReminderSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const UserReminder = new mongoose_1.Schema({
|
|
6
|
+
employeeId: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
note: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
days: {
|
|
16
|
+
type: Array,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
time: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
endDate: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
taskOneDate: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
taskTwoDate: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
taskThreeDate: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: true,
|
|
38
|
+
},
|
|
39
|
+
taskOneTime: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
taskTwoTime: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: true,
|
|
46
|
+
},
|
|
47
|
+
taskThreeTime: {
|
|
48
|
+
type: String,
|
|
49
|
+
required: true,
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
UserReminder.index({ taskOneDate: 1, taskOneTime: -1 }, {
|
|
53
|
+
unique: false,
|
|
54
|
+
});
|
|
55
|
+
UserReminder.index({ taskTwoDate: 1, taskTwoTime: -1 }, {
|
|
56
|
+
unique: false,
|
|
57
|
+
});
|
|
58
|
+
UserReminder.index({ taskThreeDate: 1, taskThreeTime: -1 }, {
|
|
59
|
+
unique: false,
|
|
60
|
+
});
|
|
61
|
+
exports.UserReminderSchema = UserReminder;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const UserTrainingDataSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const UserTrainingDataSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserTrainingDataSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const UserTrainingData = new mongoose_1.Schema({
|
|
6
|
-
trainingKey: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
index: true,
|
|
10
|
-
},
|
|
11
|
-
startDate: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
startWeek: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: false,
|
|
18
|
-
},
|
|
19
|
-
creationTimestamp: {
|
|
20
|
-
type: Number,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
status: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: true,
|
|
26
|
-
default: true,
|
|
27
|
-
},
|
|
28
|
-
preRating: {
|
|
29
|
-
type: Number,
|
|
30
|
-
required: false,
|
|
31
|
-
},
|
|
32
|
-
postRating: {
|
|
33
|
-
type: Number,
|
|
34
|
-
required: false,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
exports.UserTrainingDataSchema = UserTrainingData;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserTrainingDataSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const UserTrainingData = new mongoose_1.Schema({
|
|
6
|
+
trainingKey: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
startDate: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
startWeek: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false,
|
|
18
|
+
},
|
|
19
|
+
creationTimestamp: {
|
|
20
|
+
type: Number,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
status: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true,
|
|
26
|
+
default: true,
|
|
27
|
+
},
|
|
28
|
+
preRating: {
|
|
29
|
+
type: Number,
|
|
30
|
+
required: false,
|
|
31
|
+
},
|
|
32
|
+
postRating: {
|
|
33
|
+
type: Number,
|
|
34
|
+
required: false,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
exports.UserTrainingDataSchema = UserTrainingData;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const UserTrainingWeekDataSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const UserTrainingWeekDataSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserTrainingWeekDataSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const UserTrainingWeekData = new mongoose_1.Schema({
|
|
6
|
-
trainingKey: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
index: true,
|
|
10
|
-
},
|
|
11
|
-
startDate: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
startWeek: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: false,
|
|
18
|
-
},
|
|
19
|
-
creationTimestamp: {
|
|
20
|
-
type: Number,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
status: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
practiceReminder: {
|
|
28
|
-
type: Array,
|
|
29
|
-
required: false,
|
|
30
|
-
},
|
|
31
|
-
endDate: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: false,
|
|
34
|
-
},
|
|
35
|
-
});
|
|
36
|
-
exports.UserTrainingWeekDataSchema = UserTrainingWeekData;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserTrainingWeekDataSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const UserTrainingWeekData = new mongoose_1.Schema({
|
|
6
|
+
trainingKey: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
startDate: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
startWeek: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: false,
|
|
18
|
+
},
|
|
19
|
+
creationTimestamp: {
|
|
20
|
+
type: Number,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
status: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
practiceReminder: {
|
|
28
|
+
type: Array,
|
|
29
|
+
required: false,
|
|
30
|
+
},
|
|
31
|
+
endDate: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
exports.UserTrainingWeekDataSchema = UserTrainingWeekData;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const UserVideoSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
|
|
1
|
+
import { Schema } from 'mongoose';
|
|
2
|
+
export declare const UserVideoSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
|
package/dist/schema/userVideo.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserVideoSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const UserVideo = new mongoose_1.Schema({
|
|
6
|
-
employeeId: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
index: true,
|
|
10
|
-
},
|
|
11
|
-
tId: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
index: true,
|
|
15
|
-
},
|
|
16
|
-
tags: {
|
|
17
|
-
type: String,
|
|
18
|
-
required: true,
|
|
19
|
-
index: true,
|
|
20
|
-
},
|
|
21
|
-
date: {
|
|
22
|
-
type: String,
|
|
23
|
-
required: true,
|
|
24
|
-
index: true,
|
|
25
|
-
},
|
|
26
|
-
fileName: {
|
|
27
|
-
type: String,
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
thumbnailUrl: {
|
|
31
|
-
type: String,
|
|
32
|
-
required: true,
|
|
33
|
-
},
|
|
34
|
-
url: {
|
|
35
|
-
type: String,
|
|
36
|
-
required: true,
|
|
37
|
-
},
|
|
38
|
-
caption: {
|
|
39
|
-
type: String,
|
|
40
|
-
required: false,
|
|
41
|
-
},
|
|
42
|
-
uploadTime: {
|
|
43
|
-
type: Number,
|
|
44
|
-
default: false,
|
|
45
|
-
},
|
|
46
|
-
});
|
|
47
|
-
UserVideo.index({ employeeId: 1, date: -1 }, {
|
|
48
|
-
unique: false,
|
|
49
|
-
});
|
|
50
|
-
exports.UserVideoSchema = UserVideo;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserVideoSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const UserVideo = new mongoose_1.Schema({
|
|
6
|
+
employeeId: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
tId: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
index: true,
|
|
15
|
+
},
|
|
16
|
+
tags: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true,
|
|
19
|
+
index: true,
|
|
20
|
+
},
|
|
21
|
+
date: {
|
|
22
|
+
type: String,
|
|
23
|
+
required: true,
|
|
24
|
+
index: true,
|
|
25
|
+
},
|
|
26
|
+
fileName: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
thumbnailUrl: {
|
|
31
|
+
type: String,
|
|
32
|
+
required: true,
|
|
33
|
+
},
|
|
34
|
+
url: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: true,
|
|
37
|
+
},
|
|
38
|
+
caption: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: false,
|
|
41
|
+
},
|
|
42
|
+
uploadTime: {
|
|
43
|
+
type: Number,
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
UserVideo.index({ employeeId: 1, date: -1 }, {
|
|
48
|
+
unique: false,
|
|
49
|
+
});
|
|
50
|
+
exports.UserVideoSchema = UserVideo;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserWeekActivitySchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const UserWeekActivity = new mongoose_1.Schema({
|
|
6
|
+
employeeId: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
week: {
|
|
12
|
+
type: Number,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
year: {
|
|
16
|
+
type: Number,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
blocked: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
required: false,
|
|
22
|
+
},
|
|
23
|
+
active: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
required: true,
|
|
26
|
+
default: true,
|
|
27
|
+
},
|
|
28
|
+
brews: {
|
|
29
|
+
type: Number,
|
|
30
|
+
required: false,
|
|
31
|
+
},
|
|
32
|
+
qJoyLevel: {
|
|
33
|
+
type: Number,
|
|
34
|
+
required: false,
|
|
35
|
+
},
|
|
36
|
+
mindfulMin: {
|
|
37
|
+
type: Number,
|
|
38
|
+
required: false,
|
|
39
|
+
},
|
|
40
|
+
sbUsed: {
|
|
41
|
+
type: Number,
|
|
42
|
+
required: false,
|
|
43
|
+
},
|
|
44
|
+
ratings: {
|
|
45
|
+
type: Number,
|
|
46
|
+
required: false,
|
|
47
|
+
},
|
|
48
|
+
avgRating: {
|
|
49
|
+
type: Number,
|
|
50
|
+
required: false,
|
|
51
|
+
},
|
|
52
|
+
happiness: {
|
|
53
|
+
type: Object,
|
|
54
|
+
required: false,
|
|
55
|
+
},
|
|
56
|
+
journals: {
|
|
57
|
+
type: Number,
|
|
58
|
+
required: false,
|
|
59
|
+
},
|
|
60
|
+
podcasts: {
|
|
61
|
+
type: Number,
|
|
62
|
+
required: false,
|
|
63
|
+
},
|
|
64
|
+
curStreak: {
|
|
65
|
+
type: Number,
|
|
66
|
+
required: false,
|
|
67
|
+
},
|
|
68
|
+
maxStreaks: {
|
|
69
|
+
type: Number,
|
|
70
|
+
required: false,
|
|
71
|
+
},
|
|
72
|
+
badge: {
|
|
73
|
+
type: Number,
|
|
74
|
+
required: false,
|
|
75
|
+
default: 0,
|
|
76
|
+
},
|
|
77
|
+
appSent: {
|
|
78
|
+
type: Number,
|
|
79
|
+
required: false,
|
|
80
|
+
},
|
|
81
|
+
appReceived: {
|
|
82
|
+
type: Number,
|
|
83
|
+
required: false,
|
|
84
|
+
},
|
|
85
|
+
activities: {
|
|
86
|
+
type: Number,
|
|
87
|
+
required: false,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
exports.UserWeekActivitySchema = UserWeekActivity;
|
package/dist/util.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const createHashPassword: (password: string) => Promise<string>;
|
|
2
|
-
export declare const createUuid: () => Promise<string>;
|
|
1
|
+
export declare const createHashPassword: (password: string) => Promise<string>;
|
|
2
|
+
export declare const createUuid: () => Promise<string>;
|
package/dist/util.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createUuid = exports.createHashPassword = void 0;
|
|
4
|
-
const bcrypt_1 = require("bcrypt");
|
|
5
|
-
const uuid_1 = require("uuid");
|
|
6
|
-
const createHashPassword = async (password) => {
|
|
7
|
-
return await (0, bcrypt_1.hash)(password, 10);
|
|
8
|
-
};
|
|
9
|
-
exports.createHashPassword = createHashPassword;
|
|
10
|
-
const createUuid = async () => {
|
|
11
|
-
return (0, uuid_1.v4)();
|
|
12
|
-
};
|
|
13
|
-
exports.createUuid = createUuid;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createUuid = exports.createHashPassword = void 0;
|
|
4
|
+
const bcrypt_1 = require("bcrypt");
|
|
5
|
+
const uuid_1 = require("uuid");
|
|
6
|
+
const createHashPassword = async (password) => {
|
|
7
|
+
return await (0, bcrypt_1.hash)(password, 10);
|
|
8
|
+
};
|
|
9
|
+
exports.createHashPassword = createHashPassword;
|
|
10
|
+
const createUuid = async () => {
|
|
11
|
+
return (0, uuid_1.v4)();
|
|
12
|
+
};
|
|
13
|
+
exports.createUuid = createUuid;
|
package/package.json
CHANGED
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "joye-backend-utility",
|
|
3
|
-
"version": "5.1.
|
|
4
|
-
"description": "Joye backend utility for db functions and common functions",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"/dist/**/*"
|
|
9
|
-
],
|
|
10
|
-
"engines": {
|
|
11
|
-
"node": "17.1.0"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"build": "tsc && yarn copy-files",
|
|
15
|
-
"test": "echo \"Error: no test specified\"",
|
|
16
|
-
"postinstall": "npm run build",
|
|
17
|
-
"lint": "eslint --ignore-path .gitignore --ext .ts .",
|
|
18
|
-
"lint:fix": "npm run lint -- --fix",
|
|
19
|
-
"prepare": "husky install && yarn build",
|
|
20
|
-
"copy-files": "copyfiles -u 1 lib/jwtKeys/**/* dist/"
|
|
21
|
-
},
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "git+https://github.com/Joye-ai/joye-backend-utility.git"
|
|
25
|
-
},
|
|
26
|
-
"author": "",
|
|
27
|
-
"license": "ISC",
|
|
28
|
-
"bugs": {
|
|
29
|
-
"url": "https://github.com/Joye-ai/joye-backend-utility/issues"
|
|
30
|
-
},
|
|
31
|
-
"homepage": "https://github.com/Joye-ai/joye-backend-utility#readme",
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"bcrypt": "^5.0.1",
|
|
34
|
-
"dotenv": "^16.0.0",
|
|
35
|
-
"fs": "^0.0.1-security",
|
|
36
|
-
"jsonwebtoken": "^9.0.0",
|
|
37
|
-
"moment": "^2.29.3",
|
|
38
|
-
"mongoose": "^5.10.1",
|
|
39
|
-
"path": "^0.12.7",
|
|
40
|
-
"redis": "^4.6.15",
|
|
41
|
-
"uuid": "^9.0.0"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@types/bcrypt": "^5.0.0",
|
|
45
|
-
"@types/node": "^17.0.25",
|
|
46
|
-
"@types/redis": "^4.0.11",
|
|
47
|
-
"@typescript-eslint/eslint-plugin": "^4.28.2",
|
|
48
|
-
"@typescript-eslint/parser": "^4.28.2",
|
|
49
|
-
"copyfiles": "^2.4.1",
|
|
50
|
-
"eslint": "^7.30.0",
|
|
51
|
-
"eslint-config-prettier": "^8.3.0",
|
|
52
|
-
"eslint-plugin-prettier": "^3.4.0",
|
|
53
|
-
"husky": "^7.0.0",
|
|
54
|
-
"lint-staged": "^11.0.0",
|
|
55
|
-
"prettier": "^2.3.2",
|
|
56
|
-
"rimraf": "^5.0.1",
|
|
57
|
-
"ts-node": "^10.4.0",
|
|
58
|
-
"tsc-alias": "^1.4.1",
|
|
59
|
-
"tsconfig-paths": "^3.10.1",
|
|
60
|
-
"typescript": "^4.6.3"
|
|
61
|
-
}
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "joye-backend-utility",
|
|
3
|
+
"version": "5.1.11",
|
|
4
|
+
"description": "Joye backend utility for db functions and common functions",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist/**/*"
|
|
9
|
+
],
|
|
10
|
+
"engines": {
|
|
11
|
+
"node": "17.1.0"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc && yarn copy-files",
|
|
15
|
+
"test": "echo \"Error: no test specified\"",
|
|
16
|
+
"postinstall": "npm run build",
|
|
17
|
+
"lint": "eslint --ignore-path .gitignore --ext .ts .",
|
|
18
|
+
"lint:fix": "npm run lint -- --fix",
|
|
19
|
+
"prepare": "husky install && yarn build",
|
|
20
|
+
"copy-files": "copyfiles -u 1 lib/jwtKeys/**/* dist/"
|
|
21
|
+
},
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/Joye-ai/joye-backend-utility.git"
|
|
25
|
+
},
|
|
26
|
+
"author": "",
|
|
27
|
+
"license": "ISC",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/Joye-ai/joye-backend-utility/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/Joye-ai/joye-backend-utility#readme",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"bcrypt": "^5.0.1",
|
|
34
|
+
"dotenv": "^16.0.0",
|
|
35
|
+
"fs": "^0.0.1-security",
|
|
36
|
+
"jsonwebtoken": "^9.0.0",
|
|
37
|
+
"moment": "^2.29.3",
|
|
38
|
+
"mongoose": "^5.10.1",
|
|
39
|
+
"path": "^0.12.7",
|
|
40
|
+
"redis": "^4.6.15",
|
|
41
|
+
"uuid": "^9.0.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/bcrypt": "^5.0.0",
|
|
45
|
+
"@types/node": "^17.0.25",
|
|
46
|
+
"@types/redis": "^4.0.11",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^4.28.2",
|
|
48
|
+
"@typescript-eslint/parser": "^4.28.2",
|
|
49
|
+
"copyfiles": "^2.4.1",
|
|
50
|
+
"eslint": "^7.30.0",
|
|
51
|
+
"eslint-config-prettier": "^8.3.0",
|
|
52
|
+
"eslint-plugin-prettier": "^3.4.0",
|
|
53
|
+
"husky": "^7.0.0",
|
|
54
|
+
"lint-staged": "^11.0.0",
|
|
55
|
+
"prettier": "^2.3.2",
|
|
56
|
+
"rimraf": "^5.0.1",
|
|
57
|
+
"ts-node": "^10.4.0",
|
|
58
|
+
"tsc-alias": "^1.4.1",
|
|
59
|
+
"tsconfig-paths": "^3.10.1",
|
|
60
|
+
"typescript": "^4.6.3"
|
|
61
|
+
}
|
|
62
|
+
}
|