joye-backend-utility 8.2.7 → 8.2.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
CHANGED
|
@@ -29,6 +29,7 @@ class database {
|
|
|
29
29
|
con.model('User_Message', schema_1.UserMessageSchema);
|
|
30
30
|
con.model('User_Message_Log', schema_1.UserMessageLogSchema);
|
|
31
31
|
con.model('User_Notification_Log', schema_1.UserNotificationLogSchema);
|
|
32
|
+
con.model('User_Consent_History', schema_1.UserConsentHistorySchema);
|
|
32
33
|
con.model('Database_Info', schema_1.DatabaseInfoSchema);
|
|
33
34
|
con.model('Master_Video', schema_1.MasterVideoSchema);
|
|
34
35
|
con.model('Master_Blessings_Data', schema_1.MasterBlessingsDataSchema);
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { UserMeetingSchema } from './userMeeting';
|
|
|
19
19
|
export { UserMessageSchema } from './userMessages';
|
|
20
20
|
export { UserMessageLogSchema } from './userMessagesLog';
|
|
21
21
|
export { UserNotificationLogSchema } from './userNotificationLog';
|
|
22
|
+
export { UserConsentHistorySchema } from './userConsentHistory';
|
|
22
23
|
export { UserSchema } from './user';
|
|
23
24
|
export { DatabaseInfoSchema } from './databaseInfo';
|
|
24
25
|
export { MasterVideoSchema } from './masterVideo';
|
package/dist/schema/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.UserEmotionalHealthDetailSchema = exports.UserEmotionalHealthSchema = exports.UserWellbeingDataSchema = exports.UserSuperPowerDataSchema = exports.MasterSuperPowerRuleSchema = exports.MasterSuperPowerDataSchema = exports.MasterEmotionalHealthSchema = exports.MasterEmotionalDriverSchema = exports.MasterEmotionsSchemaV2 = exports.ErrorLogSchema = exports.PageViewSchema = exports.AIPromptsSchema = void 0;
|
|
3
|
+
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.UserConsentHistorySchema = exports.UserNotificationLogSchema = exports.UserMessageLogSchema = exports.UserMessageSchema = exports.UserMeetingSchema = exports.UserLogSchema = exports.PlatformSchema = exports.OrganizationAnalyticsSchema = 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.UserEmotionalHealthDetailSchema = exports.UserEmotionalHealthSchema = exports.UserWellbeingDataSchema = exports.UserSuperPowerDataSchema = exports.MasterSuperPowerRuleSchema = exports.MasterSuperPowerDataSchema = exports.MasterEmotionalHealthSchema = exports.MasterEmotionalDriverSchema = exports.MasterEmotionsSchemaV2 = exports.ErrorLogSchema = exports.PageViewSchema = exports.AIPromptsSchema = exports.LlmBatchJobSchema = 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");
|
|
@@ -44,6 +44,8 @@ var userMessagesLog_1 = require("./userMessagesLog");
|
|
|
44
44
|
Object.defineProperty(exports, "UserMessageLogSchema", { enumerable: true, get: function () { return userMessagesLog_1.UserMessageLogSchema; } });
|
|
45
45
|
var userNotificationLog_1 = require("./userNotificationLog");
|
|
46
46
|
Object.defineProperty(exports, "UserNotificationLogSchema", { enumerable: true, get: function () { return userNotificationLog_1.UserNotificationLogSchema; } });
|
|
47
|
+
var userConsentHistory_1 = require("./userConsentHistory");
|
|
48
|
+
Object.defineProperty(exports, "UserConsentHistorySchema", { enumerable: true, get: function () { return userConsentHistory_1.UserConsentHistorySchema; } });
|
|
47
49
|
var user_1 = require("./user");
|
|
48
50
|
Object.defineProperty(exports, "UserSchema", { enumerable: true, get: function () { return user_1.UserSchema; } });
|
|
49
51
|
var databaseInfo_1 = require("./databaseInfo");
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserConsentHistorySchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
/**
|
|
6
|
+
* Audit log of consent accept, decline, and withdraw events.
|
|
7
|
+
* Current state stays on User.consent / User.consentVia / User.consentTime.
|
|
8
|
+
*/
|
|
9
|
+
const UserConsentHistory = new mongoose_1.Schema({
|
|
10
|
+
employeeId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
/** accept | withdraw | decline */
|
|
15
|
+
action: {
|
|
16
|
+
type: String,
|
|
17
|
+
required: true,
|
|
18
|
+
},
|
|
19
|
+
consent: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
required: true,
|
|
22
|
+
},
|
|
23
|
+
consentVia: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: false,
|
|
26
|
+
},
|
|
27
|
+
previousConsent: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
required: false,
|
|
30
|
+
},
|
|
31
|
+
actionTime: {
|
|
32
|
+
type: Number,
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
UserConsentHistory.index({ employeeId: 1, actionTime: -1 });
|
|
37
|
+
exports.UserConsentHistorySchema = UserConsentHistory;
|