joye-backend-utility 8.0.8 → 8.0.9
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
|
@@ -27,6 +27,7 @@ class database {
|
|
|
27
27
|
con.model('User_Meeting', schema_1.UserMeetingSchema);
|
|
28
28
|
con.model('User_Message', schema_1.UserMessageSchema);
|
|
29
29
|
con.model('User_Message_Log', schema_1.UserMessageLogSchema);
|
|
30
|
+
con.model('User_Notification_Log', schema_1.UserNotificationLogSchema);
|
|
30
31
|
con.model('Database_Info', schema_1.DatabaseInfoSchema);
|
|
31
32
|
con.model('Master_Video', schema_1.MasterVideoSchema);
|
|
32
33
|
con.model('Master_Blessings_Data', schema_1.MasterBlessingsDataSchema);
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export { UserLogSchema } from './userLog';
|
|
|
17
17
|
export { UserMeetingSchema } from './userMeeting';
|
|
18
18
|
export { UserMessageSchema } from './userMessages';
|
|
19
19
|
export { UserMessageLogSchema } from './userMessagesLog';
|
|
20
|
+
export { UserNotificationLogSchema } from './userNotificationLog';
|
|
20
21
|
export { UserSchema } from './user';
|
|
21
22
|
export { DatabaseInfoSchema } from './databaseInfo';
|
|
22
23
|
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.UserWellbeingDataSchema = exports.UserSuperPowerDataSchema = exports.MasterSuperPowerRuleSchema = exports.MasterSuperPowerDataSchema = exports.MasterEmotionalDriverSchema = exports.MasterEmotionsSchemaV2 = void 0;
|
|
3
|
+
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.UserNotificationLogSchema = 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.UserWellbeingDataSchema = exports.UserSuperPowerDataSchema = exports.MasterSuperPowerRuleSchema = exports.MasterSuperPowerDataSchema = exports.MasterEmotionalDriverSchema = exports.MasterEmotionsSchemaV2 = exports.ErrorLogSchema = 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");
|
|
@@ -40,6 +40,8 @@ var userMessages_1 = require("./userMessages");
|
|
|
40
40
|
Object.defineProperty(exports, "UserMessageSchema", { enumerable: true, get: function () { return userMessages_1.UserMessageSchema; } });
|
|
41
41
|
var userMessagesLog_1 = require("./userMessagesLog");
|
|
42
42
|
Object.defineProperty(exports, "UserMessageLogSchema", { enumerable: true, get: function () { return userMessagesLog_1.UserMessageLogSchema; } });
|
|
43
|
+
var userNotificationLog_1 = require("./userNotificationLog");
|
|
44
|
+
Object.defineProperty(exports, "UserNotificationLogSchema", { enumerable: true, get: function () { return userNotificationLog_1.UserNotificationLogSchema; } });
|
|
43
45
|
var user_1 = require("./user");
|
|
44
46
|
Object.defineProperty(exports, "UserSchema", { enumerable: true, get: function () { return user_1.UserSchema; } });
|
|
45
47
|
var databaseInfo_1 = require("./databaseInfo");
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserNotificationLogSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
/**
|
|
6
|
+
* Outbound notification audit (PWA push, Visit batch API) — not Teams cards (`User_Message_Log`).
|
|
7
|
+
* Rows are inserted only after successful delivery. Idempotency: unique (employeeId, date, messageType, channel).
|
|
8
|
+
*/
|
|
9
|
+
const UserNotificationLog = new mongoose_1.Schema({
|
|
10
|
+
employeeId: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
date: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
},
|
|
18
|
+
messageType: {
|
|
19
|
+
type: String,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
sentTime: {
|
|
23
|
+
type: Number,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
/** Delivery path label — free string; common values: `pwa`, `visit` */
|
|
27
|
+
channel: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: true,
|
|
30
|
+
},
|
|
31
|
+
platformKey: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: true,
|
|
34
|
+
},
|
|
35
|
+
/** `Organization.tId` (tenant id) when known */
|
|
36
|
+
tId: {
|
|
37
|
+
type: String,
|
|
38
|
+
required: false,
|
|
39
|
+
},
|
|
40
|
+
deliveryMeta: {
|
|
41
|
+
type: mongoose_1.Schema.Types.Mixed,
|
|
42
|
+
required: false,
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
UserNotificationLog.index({ employeeId: 1, date: 1, messageType: 1, channel: 1 }, { unique: true });
|
|
46
|
+
UserNotificationLog.index({ employeeId: 1, date: -1 });
|
|
47
|
+
UserNotificationLog.index({ channel: 1, messageType: 1, date: -1 });
|
|
48
|
+
exports.UserNotificationLogSchema = UserNotificationLog;
|