joye-backend-utility 5.0.44-1 → 5.0.44
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 +135 -135
- package/dist/dateTime.d.ts +11 -11
- package/dist/dateTime.js +82 -82
- package/dist/index.d.ts +6 -6
- package/dist/index.js +25 -25
- 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 +31 -31
- package/dist/schema/index.js +65 -65
- 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 +33 -33
- 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 +23 -23
- 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/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 +35 -35
- 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 +221 -221
- package/dist/schema/userFeedback.d.ts +2 -2
- package/dist/schema/userFeedback.js +24 -24
- 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/userVideo.d.ts +2 -2
- package/dist/schema/userVideo.js +50 -50
- package/dist/util.d.ts +2 -2
- package/dist/util.js +13 -13
- package/package.json +62 -62
- package/dist/jwtKeys/jwtRS256.key +0 -54
- package/dist/jwtKeys/jwtRS256.key.pub +0 -14
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserMessageLogSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const UserMessageLog = new mongoose_1.Schema({
|
|
6
|
-
userId: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: false,
|
|
9
|
-
},
|
|
10
|
-
employeeId: {
|
|
11
|
-
type: String,
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
date: {
|
|
15
|
-
type: String,
|
|
16
|
-
required: true,
|
|
17
|
-
},
|
|
18
|
-
activityId: {
|
|
19
|
-
type: String,
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
messageType: {
|
|
23
|
-
type: String,
|
|
24
|
-
required: true,
|
|
25
|
-
},
|
|
26
|
-
status: {
|
|
27
|
-
type: String,
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
sentTime: {
|
|
31
|
-
type: Number,
|
|
32
|
-
required: false,
|
|
33
|
-
},
|
|
34
|
-
messageSeen: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
required: false,
|
|
37
|
-
},
|
|
38
|
-
appreciation: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
required: false,
|
|
41
|
-
},
|
|
42
|
-
saved: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false,
|
|
45
|
-
required: false,
|
|
46
|
-
},
|
|
47
|
-
deleted: {
|
|
48
|
-
type: Boolean,
|
|
49
|
-
default: false,
|
|
50
|
-
required: false,
|
|
51
|
-
},
|
|
52
|
-
recommendationsMoreClick: {
|
|
53
|
-
type: Boolean,
|
|
54
|
-
default: false,
|
|
55
|
-
required: false,
|
|
56
|
-
},
|
|
57
|
-
linkCardCounter: {
|
|
58
|
-
type: Number,
|
|
59
|
-
required: false,
|
|
60
|
-
},
|
|
61
|
-
noteToSelfClick: {
|
|
62
|
-
type: Number,
|
|
63
|
-
required: false,
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
UserMessageLog.index({ employeeId: 1, activityId: -1 });
|
|
67
|
-
UserMessageLog.index({ employeeId: 1, date: -1 });
|
|
68
|
-
UserMessageLog.index({ employeeId: 1, messageType: -1, status: -1, date: -1 });
|
|
69
|
-
exports.UserMessageLogSchema = UserMessageLog;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserMessageLogSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const UserMessageLog = new mongoose_1.Schema({
|
|
6
|
+
userId: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: false,
|
|
9
|
+
},
|
|
10
|
+
employeeId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
date: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
activityId: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
messageType: {
|
|
23
|
+
type: String,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
status: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
sentTime: {
|
|
31
|
+
type: Number,
|
|
32
|
+
required: false,
|
|
33
|
+
},
|
|
34
|
+
messageSeen: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
required: false,
|
|
37
|
+
},
|
|
38
|
+
appreciation: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
required: false,
|
|
41
|
+
},
|
|
42
|
+
saved: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false,
|
|
45
|
+
required: false,
|
|
46
|
+
},
|
|
47
|
+
deleted: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: false,
|
|
50
|
+
required: false,
|
|
51
|
+
},
|
|
52
|
+
recommendationsMoreClick: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false,
|
|
55
|
+
required: false,
|
|
56
|
+
},
|
|
57
|
+
linkCardCounter: {
|
|
58
|
+
type: Number,
|
|
59
|
+
required: false,
|
|
60
|
+
},
|
|
61
|
+
noteToSelfClick: {
|
|
62
|
+
type: Number,
|
|
63
|
+
required: false,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
UserMessageLog.index({ employeeId: 1, activityId: -1 });
|
|
67
|
+
UserMessageLog.index({ employeeId: 1, date: -1 });
|
|
68
|
+
UserMessageLog.index({ employeeId: 1, messageType: -1, status: -1, date: -1 });
|
|
69
|
+
exports.UserMessageLogSchema = UserMessageLog;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const UserRecommendationSchema: 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 UserRecommendationSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserRecommendationSchema = void 0;
|
|
4
|
-
const mongoose_1 = require("mongoose");
|
|
5
|
-
const UserRecommendation = new mongoose_1.Schema({
|
|
6
|
-
employeeId: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true,
|
|
9
|
-
index: true,
|
|
10
|
-
},
|
|
11
|
-
weekNumber: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: false,
|
|
14
|
-
},
|
|
15
|
-
weekStartDate: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
recommendations: {
|
|
20
|
-
type: Array,
|
|
21
|
-
required: false,
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
exports.UserRecommendationSchema = UserRecommendation;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserRecommendationSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const UserRecommendation = new mongoose_1.Schema({
|
|
6
|
+
employeeId: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
weekNumber: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: false,
|
|
14
|
+
},
|
|
15
|
+
weekStartDate: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
recommendations: {
|
|
20
|
+
type: Array,
|
|
21
|
+
required: false,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
exports.UserRecommendationSchema = UserRecommendation;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Schema } from 'mongoose';
|
|
2
|
-
export declare const UserReminderSchema: 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 UserReminderSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
|
|
@@ -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 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;
|
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.0.44
|
|
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.0.44",
|
|
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,54 +0,0 @@
|
|
|
1
|
-
-----BEGIN ENCRYPTED PRIVATE KEY-----
|
|
2
|
-
MIIJrTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIp0xapDb8tYMCAggA
|
|
3
|
-
MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBDM1Kld8O/X9oGyo6n/JkwqBIIJ
|
|
4
|
-
UHXMYWwE0fnND5eNlCi5aBqWad3id24+a1M2QRkDzCyoqxEDi83AxxZJJjewbXlO
|
|
5
|
-
Btc+bryv1xRVjBUcpw+vDWF4gzwMIgmSA0vVtK6x1sFCkJ9uGkwFTEFn4Kz1r0Lz
|
|
6
|
-
y6xsUC+yZEiAnAOrKdXLsRRUizbhxpxdzkYtzI3EgqeIAGN6IAAbhlp7xSOxelDv
|
|
7
|
-
ZiJ2E/ssdQn/vpyJrR41S0xg7ioz4vxTVD8VectKMrwYs2TpRF68QOSyP7dsv73X
|
|
8
|
-
wZdfHs6fxx8lCKNg/GzBJooycBA9UDQEeGFiOcSbEm1legamTzIUbTpthBJOtYo/
|
|
9
|
-
OxhO03fj7uTNXnnV197iZRmsQrwkRf+P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