joye-backend-utility 5.1.33 → 5.1.35

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
@@ -48,6 +48,7 @@ class database {
48
48
  con.model('Feature_Feedback', schema_1.FeatureFeedbackSchema);
49
49
  con.model('User_Chat_session', schema_1.UserChatSessionSchema);
50
50
  con.model('User_Profile', schema_1.UserProfileSchema);
51
+ con.model('AI_Responses_Tracking', schema_1.AIResponsesTrackingSchema);
51
52
  };
52
53
  this.connectToDatabase = () => {
53
54
  const env = config_1.NODE_ENV || 'development';
@@ -0,0 +1,2 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const AIResponsesTrackingSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AIResponsesTrackingSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const AIResponsesTracking = new mongoose_1.Schema({
6
+ sessionId: {
7
+ type: String,
8
+ required: true,
9
+ },
10
+ date: {
11
+ type: String,
12
+ required: true,
13
+ index: true,
14
+ },
15
+ type: {
16
+ type: String,
17
+ required: true,
18
+ index: true,
19
+ },
20
+ createdAt: {
21
+ type: Number,
22
+ required: true,
23
+ index: true,
24
+ },
25
+ aiResponses: {
26
+ type: Array,
27
+ required: false,
28
+ },
29
+ });
30
+ exports.AIResponsesTrackingSchema = AIResponsesTracking;
@@ -39,3 +39,4 @@ export { UserWeekActivitySchema } from './userWeekActivity';
39
39
  export { FeatureFeedbackSchema } from './featureFeedback';
40
40
  export { UserChatSessionSchema } from './userChatSession';
41
41
  export { UserProfileSchema } from './userProfile';
42
+ export { AIResponsesTrackingSchema } from './ai_responses_tracking';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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");
@@ -83,3 +83,5 @@ var userChatSession_1 = require("./userChatSession");
83
83
  Object.defineProperty(exports, "UserChatSessionSchema", { enumerable: true, get: function () { return userChatSession_1.UserChatSessionSchema; } });
84
84
  var userProfile_1 = require("./userProfile");
85
85
  Object.defineProperty(exports, "UserProfileSchema", { enumerable: true, get: function () { return userProfile_1.UserProfileSchema; } });
86
+ var ai_responses_tracking_1 = require("./ai_responses_tracking");
87
+ Object.defineProperty(exports, "AIResponsesTrackingSchema", { enumerable: true, get: function () { return ai_responses_tracking_1.AIResponsesTrackingSchema; } });
@@ -59,5 +59,14 @@ const OrganizationUserAttrPermission = new mongoose_1.Schema({
59
59
  required: false,
60
60
  default: false,
61
61
  },
62
+ allowedFeatures: {
63
+ type: Array,
64
+ required: false,
65
+ },
66
+ subscription: {
67
+ type: String,
68
+ required: false,
69
+ enum: ['start', 'pro', 'premium'],
70
+ },
62
71
  });
63
72
  exports.OrganizationUserAttrPermissionSchema = OrganizationUserAttrPermission;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joye-backend-utility",
3
- "version": "5.1.33",
3
+ "version": "5.1.35",
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",