joye-backend-utility 8.0.6 → 8.0.8
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/database.js +2 -0
- package/dist/schema/errorLog.js +0 -4
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.js +5 -1
- package/dist/schema/master_emotional_driver.d.ts +2 -0
- package/dist/schema/master_emotional_driver.js +24 -0
- package/dist/schema/user_wellbeing_data.d.ts +2 -0
- package/dist/schema/user_wellbeing_data.js +60 -0
- package/package.json +1 -1
package/dist/database.js
CHANGED
|
@@ -58,9 +58,11 @@ class database {
|
|
|
58
58
|
con.model('Page_View', schema_1.PageViewSchema);
|
|
59
59
|
con.model('Error_Log', schema_1.ErrorLogSchema);
|
|
60
60
|
con.model('Master_Emotion_v2', schema_1.MasterEmotionsSchemaV2);
|
|
61
|
+
con.model('Master_Emotional_Driver', schema_1.MasterEmotionalDriverSchema);
|
|
61
62
|
con.model('Master_Super_Power_Data', schema_1.MasterSuperPowerDataSchema);
|
|
62
63
|
con.model('Master_Super_Power_Rule', schema_1.MasterSuperPowerRuleSchema);
|
|
63
64
|
con.model('User_Super_Power_Data', schema_1.UserSuperPowerDataSchema);
|
|
65
|
+
con.model('User_Wellbeing_Data', schema_1.UserWellbeingDataSchema);
|
|
64
66
|
};
|
|
65
67
|
this.connectToDatabase = () => {
|
|
66
68
|
const env = config_1.NODE_ENV || 'development';
|
package/dist/schema/errorLog.js
CHANGED
package/dist/schema/index.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export { AIPromptsSchema } from './ai_prompts';
|
|
|
49
49
|
export { PageViewSchema } from './pageView';
|
|
50
50
|
export { ErrorLogSchema } from './errorLog';
|
|
51
51
|
export { MasterEmotionsSchemaV2 } from './masterEmotionV2';
|
|
52
|
+
export { MasterEmotionalDriverSchema } from './master_emotional_driver';
|
|
52
53
|
export { MasterSuperPowerDataSchema } from './masterSuperPowerData';
|
|
53
54
|
export { MasterSuperPowerRuleSchema } from './masterSuperPowerRule';
|
|
54
55
|
export { UserSuperPowerDataSchema } from './userSuperPowerData';
|
|
56
|
+
export { UserWellbeingDataSchema } from './user_wellbeing_data';
|
package/dist/schema/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ErrorLogSchema = exports.PageViewSchema = exports.AIPromptsSchema = exports.UserAnalyticSchema = exports.AIResponsesTrackingSchema = exports.UserProfileSchema = exports.UserChatSessionSchema = exports.FeatureFeedbackSchema = exports.UserWeekActivitySchema = exports.UserTrainingRemindersSchema = exports.UserTrainingDailyDataSchema = exports.MasterTrainingDaysSchema = exports.UserTrainingWeekDataSchema = exports.UserTrainingDataSchema = exports.MasterTrainingWeekSchema = exports.MasterTrainingSchema = exports.userJoyLevelQaSchema = exports.userGoalSchema = exports.OrganizationUserAttrPermissionSchema = exports.TimezoneSchema = exports.UserVideoSchema = exports.UserFeedbackSchema = exports.UserReminderSchema = exports.MasterLinkCardSchema = exports.UserRecommendationSchema = exports.MasterSuggestionsParameterSchema = exports.MasterSuggestionsMessageSchema = exports.MasterBlessingsDataSchema = exports.MasterVideoSchema = exports.DatabaseInfoSchema = exports.UserSchema = exports.UserMessageLogSchema = exports.UserMessageSchema = exports.UserMeetingSchema = exports.UserLogSchema = exports.PlatformSchema = exports.OrganizationSchema = exports.MasterThemeMessageSchema = exports.MasterThemeDataSchema = exports.MasterPredictionEmotionsMessageMappingSchema = exports.MasterPredictionEmotionMessageSchema = exports.MasterPredictionEmotionSchema = exports.MasterPodcastSchema = exports.MasterEmotionMessageTypeThemeMappingSchema = exports.MasterEmotionsMessageMappingSchemaV2 = exports.MasterEmotionsMessageMappingSchema = exports.MasterEmotionsSchema = exports.MasterDataSchema = exports.MasterAppSettingSchema = exports.BrewSchema = void 0;
|
|
4
|
-
exports.UserSuperPowerDataSchema = exports.MasterSuperPowerRuleSchema = exports.MasterSuperPowerDataSchema = exports.MasterEmotionsSchemaV2 = void 0;
|
|
4
|
+
exports.UserWellbeingDataSchema = exports.UserSuperPowerDataSchema = exports.MasterSuperPowerRuleSchema = exports.MasterSuperPowerDataSchema = exports.MasterEmotionalDriverSchema = exports.MasterEmotionsSchemaV2 = void 0;
|
|
5
5
|
var brew_1 = require("./brew");
|
|
6
6
|
Object.defineProperty(exports, "BrewSchema", { enumerable: true, get: function () { return brew_1.BrewSchema; } });
|
|
7
7
|
var masterAppSetting_1 = require("./masterAppSetting");
|
|
@@ -104,9 +104,13 @@ var errorLog_1 = require("./errorLog");
|
|
|
104
104
|
Object.defineProperty(exports, "ErrorLogSchema", { enumerable: true, get: function () { return errorLog_1.ErrorLogSchema; } });
|
|
105
105
|
var masterEmotionV2_1 = require("./masterEmotionV2");
|
|
106
106
|
Object.defineProperty(exports, "MasterEmotionsSchemaV2", { enumerable: true, get: function () { return masterEmotionV2_1.MasterEmotionsSchemaV2; } });
|
|
107
|
+
var master_emotional_driver_1 = require("./master_emotional_driver");
|
|
108
|
+
Object.defineProperty(exports, "MasterEmotionalDriverSchema", { enumerable: true, get: function () { return master_emotional_driver_1.MasterEmotionalDriverSchema; } });
|
|
107
109
|
var masterSuperPowerData_1 = require("./masterSuperPowerData");
|
|
108
110
|
Object.defineProperty(exports, "MasterSuperPowerDataSchema", { enumerable: true, get: function () { return masterSuperPowerData_1.MasterSuperPowerDataSchema; } });
|
|
109
111
|
var masterSuperPowerRule_1 = require("./masterSuperPowerRule");
|
|
110
112
|
Object.defineProperty(exports, "MasterSuperPowerRuleSchema", { enumerable: true, get: function () { return masterSuperPowerRule_1.MasterSuperPowerRuleSchema; } });
|
|
111
113
|
var userSuperPowerData_1 = require("./userSuperPowerData");
|
|
112
114
|
Object.defineProperty(exports, "UserSuperPowerDataSchema", { enumerable: true, get: function () { return userSuperPowerData_1.UserSuperPowerDataSchema; } });
|
|
115
|
+
var user_wellbeing_data_1 = require("./user_wellbeing_data");
|
|
116
|
+
Object.defineProperty(exports, "UserWellbeingDataSchema", { enumerable: true, get: function () { return user_wellbeing_data_1.UserWellbeingDataSchema; } });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MasterEmotionalDriverSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const MasterEmotionalDriver = new mongoose_1.Schema({
|
|
6
|
+
key: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
title: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
type: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
emotions: {
|
|
20
|
+
type: [String],
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
exports.MasterEmotionalDriverSchema = MasterEmotionalDriver;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserWellbeingDataSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const UserWellbeingData = new mongoose_1.Schema({
|
|
6
|
+
employeeId: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
date: {
|
|
12
|
+
type: Date,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
month: {
|
|
16
|
+
type: Number,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
year: {
|
|
20
|
+
type: Number,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
yes: {
|
|
24
|
+
type: Number,
|
|
25
|
+
required: false,
|
|
26
|
+
},
|
|
27
|
+
no: {
|
|
28
|
+
type: Number,
|
|
29
|
+
required: false,
|
|
30
|
+
},
|
|
31
|
+
mayBe: {
|
|
32
|
+
type: Number,
|
|
33
|
+
required: false,
|
|
34
|
+
},
|
|
35
|
+
mmCount: {
|
|
36
|
+
type: Number,
|
|
37
|
+
required: false,
|
|
38
|
+
},
|
|
39
|
+
brew: {
|
|
40
|
+
type: Number,
|
|
41
|
+
required: false,
|
|
42
|
+
},
|
|
43
|
+
gratitude: {
|
|
44
|
+
type: Number,
|
|
45
|
+
required: false,
|
|
46
|
+
},
|
|
47
|
+
sp: {
|
|
48
|
+
type: Number,
|
|
49
|
+
required: false,
|
|
50
|
+
},
|
|
51
|
+
updatedTimestamp: {
|
|
52
|
+
type: Number,
|
|
53
|
+
required: false,
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
UserWellbeingData.index({ employeeId: 1, date: -1 });
|
|
57
|
+
UserWellbeingData.index({ employeeId: 1, year: -1, month: -1 });
|
|
58
|
+
UserWellbeingData.index({ employeeId: 1, month: -1, year: -1, date: -1 });
|
|
59
|
+
UserWellbeingData.index({ year: 1, month: 1, employeeId: 1 });
|
|
60
|
+
exports.UserWellbeingDataSchema = UserWellbeingData;
|