joye-backend-utility 5.1.36 → 5.1.38
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 +1 -0
- package/dist/schema/index.d.ts +1 -0
- package/dist/schema/index.js +3 -1
- package/dist/schema/organizationUserAttrPermission.js +11 -0
- package/dist/schema/platform.js +11 -0
- package/dist/schema/user_analytic.d.ts +2 -0
- package/dist/schema/user_analytic.js +91 -0
- package/package.json +1 -1
package/dist/database.js
CHANGED
|
@@ -49,6 +49,7 @@ class database {
|
|
|
49
49
|
con.model('User_Chat_session', schema_1.UserChatSessionSchema);
|
|
50
50
|
con.model('User_Profile', schema_1.UserProfileSchema);
|
|
51
51
|
con.model('AI_Responses_Tracking', schema_1.AIResponsesTrackingSchema);
|
|
52
|
+
con.model('User_Analytic', schema_1.UserAnalyticSchema);
|
|
52
53
|
};
|
|
53
54
|
this.connectToDatabase = () => {
|
|
54
55
|
const env = config_1.NODE_ENV || 'development';
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -40,3 +40,4 @@ export { FeatureFeedbackSchema } from './featureFeedback';
|
|
|
40
40
|
export { UserChatSessionSchema } from './userChatSession';
|
|
41
41
|
export { UserProfileSchema } from './userProfile';
|
|
42
42
|
export { AIResponsesTrackingSchema } from './ai_responses_tracking';
|
|
43
|
+
export { UserAnalyticSchema } from './user_analytic';
|
package/dist/schema/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AIResponsesTrackingSchema = exports.UserProfileSchema = exports.UserChatSessionSchema = exports.FeatureFeedbackSchema = exports.UserWeekActivitySchema = 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.MasterEmotionsMessageMappingSchema = exports.MasterEmotionsSchema = exports.MasterDataSchema = exports.MasterAppSettingSchema = exports.BrewSchema = void 0;
|
|
3
|
+
exports.UserAnalyticSchema = exports.AIResponsesTrackingSchema = exports.UserProfileSchema = exports.UserChatSessionSchema = exports.FeatureFeedbackSchema = exports.UserWeekActivitySchema = 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.MasterEmotionsMessageMappingSchema = exports.MasterEmotionsSchema = exports.MasterDataSchema = exports.MasterAppSettingSchema = exports.BrewSchema = void 0;
|
|
4
4
|
var brew_1 = require("./brew");
|
|
5
5
|
Object.defineProperty(exports, "BrewSchema", { enumerable: true, get: function () { return brew_1.BrewSchema; } });
|
|
6
6
|
var masterAppSetting_1 = require("./masterAppSetting");
|
|
@@ -85,3 +85,5 @@ var userProfile_1 = require("./userProfile");
|
|
|
85
85
|
Object.defineProperty(exports, "UserProfileSchema", { enumerable: true, get: function () { return userProfile_1.UserProfileSchema; } });
|
|
86
86
|
var ai_responses_tracking_1 = require("./ai_responses_tracking");
|
|
87
87
|
Object.defineProperty(exports, "AIResponsesTrackingSchema", { enumerable: true, get: function () { return ai_responses_tracking_1.AIResponsesTrackingSchema; } });
|
|
88
|
+
var user_analytic_1 = require("./user_analytic");
|
|
89
|
+
Object.defineProperty(exports, "UserAnalyticSchema", { enumerable: true, get: function () { return user_analytic_1.UserAnalyticSchema; } });
|
|
@@ -68,5 +68,16 @@ const OrganizationUserAttrPermission = new mongoose_1.Schema({
|
|
|
68
68
|
required: false,
|
|
69
69
|
enum: ['start', 'pro', 'premium'],
|
|
70
70
|
},
|
|
71
|
+
aiModels: {
|
|
72
|
+
type: Object,
|
|
73
|
+
required: false,
|
|
74
|
+
},
|
|
75
|
+
// Sample data
|
|
76
|
+
/* aiModels: {
|
|
77
|
+
"brew": "claude-sonnet-4-20250514",
|
|
78
|
+
"byb": "claude-3-5-haiku-20241022",
|
|
79
|
+
"mindful-minute": "claude-sonnet-4-20250514",
|
|
80
|
+
"quick-jl": "claude-3-5-haiku-20241022"
|
|
81
|
+
} */
|
|
71
82
|
});
|
|
72
83
|
exports.OrganizationUserAttrPermissionSchema = OrganizationUserAttrPermission;
|
package/dist/schema/platform.js
CHANGED
|
@@ -24,5 +24,16 @@ const Platform = new mongoose_1.Schema({
|
|
|
24
24
|
type: String,
|
|
25
25
|
required: false,
|
|
26
26
|
},
|
|
27
|
+
aiModels: {
|
|
28
|
+
type: Object,
|
|
29
|
+
required: false,
|
|
30
|
+
},
|
|
31
|
+
// Sample data
|
|
32
|
+
/* aiModels: {
|
|
33
|
+
"brew": "claude-sonnet-4-20250514",
|
|
34
|
+
"byb": "claude-3-5-haiku-20241022",
|
|
35
|
+
"mindful-minute": "claude-sonnet-4-20250514",
|
|
36
|
+
"quick-jl": "claude-3-5-haiku-20241022"
|
|
37
|
+
} */
|
|
27
38
|
});
|
|
28
39
|
exports.PlatformSchema = Platform;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserAnalyticSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const UserAnalytic = new mongoose_1.Schema({
|
|
6
|
+
employeeId: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
date: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
index: true,
|
|
15
|
+
},
|
|
16
|
+
weekNumber: {
|
|
17
|
+
type: Number,
|
|
18
|
+
},
|
|
19
|
+
year: {
|
|
20
|
+
type: Number,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
month: {
|
|
24
|
+
type: Number,
|
|
25
|
+
},
|
|
26
|
+
createdAt: {
|
|
27
|
+
type: Number,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
data: {
|
|
31
|
+
dominant_moods: {
|
|
32
|
+
type: [String],
|
|
33
|
+
default: [],
|
|
34
|
+
},
|
|
35
|
+
joy_level: {
|
|
36
|
+
current: { type: Number, default: 0 },
|
|
37
|
+
previous: { type: Number, default: 0 },
|
|
38
|
+
},
|
|
39
|
+
relationships: {
|
|
40
|
+
current: { type: Number, default: 0 },
|
|
41
|
+
previous: { type: Number, default: 0 },
|
|
42
|
+
},
|
|
43
|
+
optimism: {
|
|
44
|
+
current: { type: Number, default: 0 },
|
|
45
|
+
previous: { type: Number, default: 0 },
|
|
46
|
+
},
|
|
47
|
+
motivation: {
|
|
48
|
+
current: { type: Number, default: 0 },
|
|
49
|
+
previous: { type: Number, default: 0 },
|
|
50
|
+
},
|
|
51
|
+
irritability: {
|
|
52
|
+
current: { type: Number, default: 0 },
|
|
53
|
+
previous: { type: Number, default: 0 },
|
|
54
|
+
},
|
|
55
|
+
anxiety: {
|
|
56
|
+
current: { type: Number, default: 0 },
|
|
57
|
+
previous: { type: Number, default: 0 },
|
|
58
|
+
},
|
|
59
|
+
satisfaction: {
|
|
60
|
+
current: { type: Number, default: 0 },
|
|
61
|
+
previous: { type: Number, default: 0 },
|
|
62
|
+
},
|
|
63
|
+
happy_moments: {
|
|
64
|
+
current: { type: Number, default: 0 },
|
|
65
|
+
previous: { type: Number, default: 0 },
|
|
66
|
+
lifetime: { type: Number, default: 0 },
|
|
67
|
+
},
|
|
68
|
+
badges: {
|
|
69
|
+
current: { type: Number, default: 0 },
|
|
70
|
+
previous: { type: Number, default: 0 },
|
|
71
|
+
lifetime: { type: Number, default: 0 },
|
|
72
|
+
},
|
|
73
|
+
appreciations_sent: {
|
|
74
|
+
current: { type: Number, default: 0 },
|
|
75
|
+
previous: { type: Number, default: 0 },
|
|
76
|
+
lifetime: { type: Number, default: 0 },
|
|
77
|
+
},
|
|
78
|
+
appreciations_received: {
|
|
79
|
+
current: { type: Number, default: 0 },
|
|
80
|
+
previous: { type: Number, default: 0 },
|
|
81
|
+
lifetime: { type: Number, default: 0 },
|
|
82
|
+
},
|
|
83
|
+
resilience: {
|
|
84
|
+
now: { type: Number, default: 0 },
|
|
85
|
+
before: { type: Number, default: 0 },
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
UserAnalytic.index({ employeeId: 1, weekNumber: -1, year: -1, date: -1 });
|
|
90
|
+
UserAnalytic.index({ employeeId: 1, month: -1, year: -1, date: -1 });
|
|
91
|
+
exports.UserAnalyticSchema = UserAnalytic;
|