joye-backend-utility 5.1.44 → 5.1.46

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
@@ -51,6 +51,7 @@ class database {
51
51
  con.model('AI_Responses_Tracking', schema_1.AIResponsesTrackingSchema);
52
52
  con.model('User_Analytic', schema_1.UserAnalyticSchema);
53
53
  con.model('AI_Prompts', schema_1.AIPromptsSchema);
54
+ con.model('Page_View', schema_1.PageViewSchema);
54
55
  };
55
56
  this.connectToDatabase = () => {
56
57
  const env = config_1.NODE_ENV || 'development';
@@ -42,3 +42,4 @@ export { UserProfileSchema } from './userProfile';
42
42
  export { AIResponsesTrackingSchema } from './ai_responses_tracking';
43
43
  export { UserAnalyticSchema } from './user_analytic';
44
44
  export { AIPromptsSchema } from './ai_prompts';
45
+ export { PageViewSchema } from './pageView';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AIPromptsSchema = 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;
3
+ exports.PageViewSchema = exports.AIPromptsSchema = 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");
@@ -89,3 +89,5 @@ var user_analytic_1 = require("./user_analytic");
89
89
  Object.defineProperty(exports, "UserAnalyticSchema", { enumerable: true, get: function () { return user_analytic_1.UserAnalyticSchema; } });
90
90
  var ai_prompts_1 = require("./ai_prompts");
91
91
  Object.defineProperty(exports, "AIPromptsSchema", { enumerable: true, get: function () { return ai_prompts_1.AIPromptsSchema; } });
92
+ var pageView_1 = require("./pageView");
93
+ Object.defineProperty(exports, "PageViewSchema", { enumerable: true, get: function () { return pageView_1.PageViewSchema; } });
@@ -0,0 +1,2 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const PageViewSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PageViewSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const pageView = new mongoose_1.Schema({
6
+ employeeId: {
7
+ type: String,
8
+ required: true,
9
+ },
10
+ date: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ page: {
15
+ type: String,
16
+ index: true,
17
+ },
18
+ count: {
19
+ type: Number,
20
+ required: true,
21
+ },
22
+ time: {
23
+ type: Number,
24
+ required: true,
25
+ },
26
+ });
27
+ pageView.index({ employeeId: 1, date: -1, page: 1 }, {
28
+ unique: false,
29
+ });
30
+ pageView.index({ date: 1, page: -1 }, {
31
+ unique: false,
32
+ });
33
+ exports.PageViewSchema = pageView;
@@ -57,6 +57,10 @@ const userGoal = new mongoose_1.Schema({
57
57
  // 08 AM
58
58
  type: String,
59
59
  },
60
+ deleted: {
61
+ type: Boolean,
62
+ default: false,
63
+ },
60
64
  });
61
65
  userGoal.index({ employeeId: 1, date: -1 }, {
62
66
  unique: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joye-backend-utility",
3
- "version": "5.1.44",
3
+ "version": "5.1.46",
4
4
  "description": "Joye backend utility for db functions and common functions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",