joye-backend-utility 5.0.44 → 5.0.45

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.
Files changed (82) hide show
  1. package/README.md +2 -2
  2. package/dist/config/index.d.ts +2 -2
  3. package/dist/config/index.js +8 -8
  4. package/dist/database.d.ts +26 -26
  5. package/dist/database.js +135 -135
  6. package/dist/dateTime.d.ts +11 -11
  7. package/dist/dateTime.js +82 -82
  8. package/dist/index.d.ts +6 -6
  9. package/dist/index.js +25 -25
  10. package/dist/jwt.d.ts +3 -3
  11. package/dist/jwt.js +40 -40
  12. package/dist/jwtKeys/jwtRS256.key +54 -0
  13. package/dist/jwtKeys/jwtRS256.key.pub +14 -0
  14. package/dist/redisClient.d.ts +6 -6
  15. package/dist/redisClient.js +34 -34
  16. package/dist/schema/brew.d.ts +2 -2
  17. package/dist/schema/brew.js +160 -160
  18. package/dist/schema/databaseInfo.d.ts +2 -2
  19. package/dist/schema/databaseInfo.js +35 -35
  20. package/dist/schema/index.d.ts +31 -31
  21. package/dist/schema/index.js +65 -65
  22. package/dist/schema/masterAppSetting.d.ts +2 -2
  23. package/dist/schema/masterAppSetting.js +24 -24
  24. package/dist/schema/masterBlessingsData.d.ts +2 -2
  25. package/dist/schema/masterBlessingsData.js +41 -41
  26. package/dist/schema/masterData.d.ts +2 -2
  27. package/dist/schema/masterData.js +28 -28
  28. package/dist/schema/masterEmotion.d.ts +2 -2
  29. package/dist/schema/masterEmotion.js +115 -115
  30. package/dist/schema/masterEmotionMessageMapping.d.ts +2 -2
  31. package/dist/schema/masterEmotionMessageMapping.js +16 -16
  32. package/dist/schema/masterEmotionMessageTypeThemeMapping.d.ts +2 -2
  33. package/dist/schema/masterEmotionMessageTypeThemeMapping.js +23 -23
  34. package/dist/schema/masterLinkCard.d.ts +2 -2
  35. package/dist/schema/masterLinkCard.js +28 -28
  36. package/dist/schema/masterPodcast.d.ts +2 -2
  37. package/dist/schema/masterPodcast.js +33 -33
  38. package/dist/schema/masterPredictionEmotion.d.ts +2 -2
  39. package/dist/schema/masterPredictionEmotion.js +27 -27
  40. package/dist/schema/masterPredictionEmotionMessage.d.ts +2 -2
  41. package/dist/schema/masterPredictionEmotionMessage.js +26 -26
  42. package/dist/schema/masterPredictionEmotionMessageMapping.d.ts +2 -2
  43. package/dist/schema/masterPredictionEmotionMessageMapping.js +16 -16
  44. package/dist/schema/masterSuggestionsMessage.model.d.ts +2 -2
  45. package/dist/schema/masterSuggestionsMessage.model.js +23 -23
  46. package/dist/schema/masterSuggestionsParameter.model.d.ts +2 -2
  47. package/dist/schema/masterSuggestionsParameter.model.js +23 -23
  48. package/dist/schema/masterThemeData.d.ts +2 -2
  49. package/dist/schema/masterThemeData.js +48 -48
  50. package/dist/schema/masterThemeMessage.d.ts +2 -2
  51. package/dist/schema/masterThemeMessage.js +13 -13
  52. package/dist/schema/masterVideo.d.ts +2 -2
  53. package/dist/schema/masterVideo.js +33 -33
  54. package/dist/schema/organization.d.ts +2 -2
  55. package/dist/schema/organization.js +79 -79
  56. package/dist/schema/organizationUserAttrPermission.d.ts +2 -2
  57. package/dist/schema/organizationUserAttrPermission.js +35 -35
  58. package/dist/schema/platform.d.ts +2 -2
  59. package/dist/schema/platform.js +28 -28
  60. package/dist/schema/timezones.d.ts +2 -2
  61. package/dist/schema/timezones.js +26 -26
  62. package/dist/schema/user.d.ts +2 -2
  63. package/dist/schema/user.js +221 -221
  64. package/dist/schema/userFeedback.d.ts +2 -2
  65. package/dist/schema/userFeedback.js +24 -24
  66. package/dist/schema/userLog.d.ts +2 -2
  67. package/dist/schema/userLog.js +22 -22
  68. package/dist/schema/userMeeting.d.ts +2 -2
  69. package/dist/schema/userMeeting.js +22 -22
  70. package/dist/schema/userMessages.d.ts +2 -2
  71. package/dist/schema/userMessages.js +24 -24
  72. package/dist/schema/userMessagesLog.d.ts +2 -2
  73. package/dist/schema/userMessagesLog.js +69 -69
  74. package/dist/schema/userRecommendation.d.ts +2 -2
  75. package/dist/schema/userRecommendation.js +24 -24
  76. package/dist/schema/userReminder.d.ts +2 -2
  77. package/dist/schema/userReminder.js +61 -61
  78. package/dist/schema/userVideo.d.ts +2 -2
  79. package/dist/schema/userVideo.js +50 -50
  80. package/dist/util.d.ts +2 -2
  81. package/dist/util.js +13 -13
  82. package/package.json +62 -62
@@ -1,221 +1,221 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- const User = new mongoose_1.Schema({
6
- organizationId: {
7
- type: String,
8
- required: true,
9
- index: true,
10
- },
11
- employeeId: {
12
- type: String,
13
- required: true,
14
- index: true,
15
- },
16
- postPieScreen: {
17
- type: String,
18
- required: false,
19
- },
20
- happinessCounterLifetime: {
21
- type: Object,
22
- yesCount: {
23
- type: Number,
24
- },
25
- noCount: {
26
- type: Number,
27
- },
28
- required: false,
29
- },
30
- delegatedAccessToken: {
31
- type: String,
32
- required: false,
33
- },
34
- email: {
35
- type: String,
36
- required: false,
37
- },
38
- displayName: {
39
- type: String,
40
- required: false,
41
- },
42
- jobTitle: {
43
- type: String,
44
- required: false,
45
- },
46
- dateFormat: {
47
- type: String,
48
- required: false,
49
- },
50
- timeFormat: {
51
- type: String,
52
- required: false,
53
- },
54
- timeZone: {
55
- type: String,
56
- required: false,
57
- },
58
- language: {
59
- type: Object,
60
- displayName: {
61
- type: String,
62
- },
63
- locale: {
64
- type: String,
65
- },
66
- required: false,
67
- },
68
- preferredLanguage: {
69
- type: String,
70
- required: false,
71
- },
72
- userPurpose: {
73
- type: String,
74
- required: false,
75
- },
76
- // Optional user attributes start
77
- department: {
78
- type: String,
79
- required: false,
80
- },
81
- birthday: {
82
- type: String,
83
- required: false,
84
- },
85
- officeLocation: {
86
- type: String,
87
- required: false,
88
- },
89
- // Optional user attributes end
90
- notificationDate: {
91
- type: String,
92
- required: false,
93
- },
94
- notificationCount: {
95
- type: Number,
96
- required: false,
97
- },
98
- timeNotificationCount: {
99
- type: Number,
100
- required: false,
101
- },
102
- workingHours: {
103
- type: Object,
104
- daysOfWeek: {
105
- type: Array,
106
- },
107
- endTime: {
108
- type: String,
109
- },
110
- startTime: {
111
- type: String,
112
- },
113
- timeZone: {
114
- type: Object,
115
- name: {
116
- type: String,
117
- },
118
- },
119
- },
120
- createdAt: {
121
- type: Number,
122
- required: false,
123
- },
124
- botDetails: {
125
- type: Object,
126
- index: true,
127
- },
128
- uniqueCode: {
129
- type: String,
130
- required: false,
131
- },
132
- accessToken: {
133
- type: String,
134
- required: false,
135
- },
136
- refreshToken: {
137
- type: String,
138
- required: false,
139
- },
140
- jId: {
141
- type: String,
142
- required: false,
143
- },
144
- roleName: {
145
- type: String,
146
- required: false,
147
- },
148
- cardPodcastClickCount: {
149
- type: Number,
150
- required: false,
151
- },
152
- currentStreak: {
153
- type: Number,
154
- required: false,
155
- },
156
- maxStreak: {
157
- type: Number,
158
- required: false,
159
- },
160
- createTimestamp: {
161
- type: Number,
162
- required: false,
163
- },
164
- lastRecommendationCategory: {
165
- type: String,
166
- required: false,
167
- },
168
- consentVia: {
169
- type: String,
170
- required: false,
171
- },
172
- loginTime: {
173
- type: Number,
174
- required: false,
175
- },
176
- lastRecommendationDate: {
177
- type: String,
178
- required: false,
179
- },
180
- appreciationDate: {
181
- type: String,
182
- required: false,
183
- },
184
- consent: {
185
- type: Boolean,
186
- required: false,
187
- },
188
- preferredTimezone: {
189
- type: String,
190
- required: false,
191
- },
192
- confirmOrgTimezone: {
193
- type: Boolean,
194
- required: false,
195
- default: false,
196
- },
197
- consentTime: {
198
- type: Number,
199
- required: false,
200
- },
201
- badgeNumber: {
202
- type: Number,
203
- default: 0,
204
- required: false,
205
- },
206
- chatBlocked: {
207
- type: Boolean,
208
- default: false,
209
- required: false,
210
- },
211
- });
212
- User.index({ botDetails: 1, preferredTimezone: -1 }, {
213
- unique: false,
214
- });
215
- User.index({ organizationId: 1, botDetails: -1 }, {
216
- unique: false,
217
- });
218
- User.index({ botDetails: 1, organizationId: -1, preferredTimezone: -1 }, {
219
- unique: false,
220
- });
221
- exports.UserSchema = User;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const User = new mongoose_1.Schema({
6
+ organizationId: {
7
+ type: String,
8
+ required: true,
9
+ index: true,
10
+ },
11
+ employeeId: {
12
+ type: String,
13
+ required: true,
14
+ index: true,
15
+ },
16
+ postPieScreen: {
17
+ type: String,
18
+ required: false,
19
+ },
20
+ happinessCounterLifetime: {
21
+ type: Object,
22
+ yesCount: {
23
+ type: Number,
24
+ },
25
+ noCount: {
26
+ type: Number,
27
+ },
28
+ required: false,
29
+ },
30
+ delegatedAccessToken: {
31
+ type: String,
32
+ required: false,
33
+ },
34
+ email: {
35
+ type: String,
36
+ required: false,
37
+ },
38
+ displayName: {
39
+ type: String,
40
+ required: false,
41
+ },
42
+ jobTitle: {
43
+ type: String,
44
+ required: false,
45
+ },
46
+ dateFormat: {
47
+ type: String,
48
+ required: false,
49
+ },
50
+ timeFormat: {
51
+ type: String,
52
+ required: false,
53
+ },
54
+ timeZone: {
55
+ type: String,
56
+ required: false,
57
+ },
58
+ language: {
59
+ type: Object,
60
+ displayName: {
61
+ type: String,
62
+ },
63
+ locale: {
64
+ type: String,
65
+ },
66
+ required: false,
67
+ },
68
+ preferredLanguage: {
69
+ type: String,
70
+ required: false,
71
+ },
72
+ userPurpose: {
73
+ type: String,
74
+ required: false,
75
+ },
76
+ // Optional user attributes start
77
+ department: {
78
+ type: String,
79
+ required: false,
80
+ },
81
+ birthday: {
82
+ type: String,
83
+ required: false,
84
+ },
85
+ officeLocation: {
86
+ type: String,
87
+ required: false,
88
+ },
89
+ // Optional user attributes end
90
+ notificationDate: {
91
+ type: String,
92
+ required: false,
93
+ },
94
+ notificationCount: {
95
+ type: Number,
96
+ required: false,
97
+ },
98
+ timeNotificationCount: {
99
+ type: Number,
100
+ required: false,
101
+ },
102
+ workingHours: {
103
+ type: Object,
104
+ daysOfWeek: {
105
+ type: Array,
106
+ },
107
+ endTime: {
108
+ type: String,
109
+ },
110
+ startTime: {
111
+ type: String,
112
+ },
113
+ timeZone: {
114
+ type: Object,
115
+ name: {
116
+ type: String,
117
+ },
118
+ },
119
+ },
120
+ createdAt: {
121
+ type: Number,
122
+ required: false,
123
+ },
124
+ botDetails: {
125
+ type: Object,
126
+ index: true,
127
+ },
128
+ uniqueCode: {
129
+ type: String,
130
+ required: false,
131
+ },
132
+ accessToken: {
133
+ type: String,
134
+ required: false,
135
+ },
136
+ refreshToken: {
137
+ type: String,
138
+ required: false,
139
+ },
140
+ jId: {
141
+ type: String,
142
+ required: false,
143
+ },
144
+ roleName: {
145
+ type: String,
146
+ required: false,
147
+ },
148
+ cardPodcastClickCount: {
149
+ type: Number,
150
+ required: false,
151
+ },
152
+ currentStreak: {
153
+ type: Number,
154
+ required: false,
155
+ },
156
+ maxStreak: {
157
+ type: Number,
158
+ required: false,
159
+ },
160
+ createTimestamp: {
161
+ type: Number,
162
+ required: false,
163
+ },
164
+ lastRecommendationCategory: {
165
+ type: String,
166
+ required: false,
167
+ },
168
+ consentVia: {
169
+ type: String,
170
+ required: false,
171
+ },
172
+ loginTime: {
173
+ type: Number,
174
+ required: false,
175
+ },
176
+ lastRecommendationDate: {
177
+ type: String,
178
+ required: false,
179
+ },
180
+ appreciationDate: {
181
+ type: String,
182
+ required: false,
183
+ },
184
+ consent: {
185
+ type: Boolean,
186
+ required: false,
187
+ },
188
+ preferredTimezone: {
189
+ type: String,
190
+ required: false,
191
+ },
192
+ confirmOrgTimezone: {
193
+ type: Boolean,
194
+ required: false,
195
+ default: false,
196
+ },
197
+ consentTime: {
198
+ type: Number,
199
+ required: false,
200
+ },
201
+ badgeNumber: {
202
+ type: Number,
203
+ default: 0,
204
+ required: false,
205
+ },
206
+ chatBlocked: {
207
+ type: Boolean,
208
+ default: false,
209
+ required: false,
210
+ },
211
+ });
212
+ User.index({ botDetails: 1, preferredTimezone: -1 }, {
213
+ unique: false,
214
+ });
215
+ User.index({ organizationId: 1, botDetails: -1 }, {
216
+ unique: false,
217
+ });
218
+ User.index({ botDetails: 1, organizationId: -1, preferredTimezone: -1 }, {
219
+ unique: false,
220
+ });
221
+ exports.UserSchema = User;
@@ -1,2 +1,2 @@
1
- import { Schema } from 'mongoose';
2
- export declare const UserFeedbackSchema: 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 UserFeedbackSchema: 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.UserFeedbackSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- const UserFeedback = new mongoose_1.Schema({
6
- employeeId: {
7
- type: String,
8
- required: true,
9
- index: true,
10
- },
11
- feedbackTime: {
12
- type: Number,
13
- required: true,
14
- },
15
- date: {
16
- type: String,
17
- required: true,
18
- },
19
- details: {
20
- type: Object,
21
- required: true,
22
- },
23
- });
24
- exports.UserFeedbackSchema = UserFeedback;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserFeedbackSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const UserFeedback = new mongoose_1.Schema({
6
+ employeeId: {
7
+ type: String,
8
+ required: true,
9
+ index: true,
10
+ },
11
+ feedbackTime: {
12
+ type: Number,
13
+ required: true,
14
+ },
15
+ date: {
16
+ type: String,
17
+ required: true,
18
+ },
19
+ details: {
20
+ type: Object,
21
+ required: true,
22
+ },
23
+ });
24
+ exports.UserFeedbackSchema = UserFeedback;
@@ -1,2 +1,2 @@
1
- import { Schema } from 'mongoose';
2
- export declare const UserLogSchema: 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 UserLogSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
@@ -1,22 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserLogSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- const UserLog = new mongoose_1.Schema({
6
- userId: {
7
- type: mongoose_1.Types.ObjectId,
8
- required: true,
9
- },
10
- date: {
11
- type: String,
12
- required: true,
13
- },
14
- log: {
15
- type: Object,
16
- required: false,
17
- },
18
- });
19
- UserLog.index({ userId: 1, date: -1 }, {
20
- unique: true,
21
- });
22
- exports.UserLogSchema = UserLog;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserLogSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const UserLog = new mongoose_1.Schema({
6
+ userId: {
7
+ type: mongoose_1.Types.ObjectId,
8
+ required: true,
9
+ },
10
+ date: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ log: {
15
+ type: Object,
16
+ required: false,
17
+ },
18
+ });
19
+ UserLog.index({ userId: 1, date: -1 }, {
20
+ unique: true,
21
+ });
22
+ exports.UserLogSchema = UserLog;
@@ -1,2 +1,2 @@
1
- import { Schema } from 'mongoose';
2
- export declare const UserMeetingSchema: 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 UserMeetingSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
@@ -1,22 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserMeetingSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- const UserMeeting = new mongoose_1.Schema({
6
- employeeId: {
7
- type: String,
8
- required: true,
9
- },
10
- date: {
11
- type: String,
12
- required: true,
13
- },
14
- meetings: {
15
- type: Array,
16
- required: false,
17
- },
18
- });
19
- UserMeeting.index({ employeeId: 1, date: -1 }, {
20
- unique: true,
21
- });
22
- exports.UserMeetingSchema = UserMeeting;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserMeetingSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const UserMeeting = new mongoose_1.Schema({
6
+ employeeId: {
7
+ type: String,
8
+ required: true,
9
+ },
10
+ date: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ meetings: {
15
+ type: Array,
16
+ required: false,
17
+ },
18
+ });
19
+ UserMeeting.index({ employeeId: 1, date: -1 }, {
20
+ unique: true,
21
+ });
22
+ exports.UserMeetingSchema = UserMeeting;
@@ -1,2 +1,2 @@
1
- import { Schema } from 'mongoose';
2
- export declare const UserMessageSchema: 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 UserMessageSchema: 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.UserMessageSchema = void 0;
4
- const mongoose_1 = require("mongoose");
5
- const UserMessage = 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
- },
17
- activityId: {
18
- type: String,
19
- },
20
- praiseThanks: {
21
- type: Boolean,
22
- },
23
- });
24
- exports.UserMessageSchema = UserMessage;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserMessageSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const UserMessage = 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
+ },
17
+ activityId: {
18
+ type: String,
19
+ },
20
+ praiseThanks: {
21
+ type: Boolean,
22
+ },
23
+ });
24
+ exports.UserMessageSchema = UserMessage;
@@ -1,2 +1,2 @@
1
- import { Schema } from 'mongoose';
2
- export declare const UserMessageLogSchema: 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 UserMessageLogSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;