joye-backend-utility 3.0.0 → 3.0.2

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
@@ -14,7 +14,7 @@ class database {
14
14
  useFindAndModify: false,
15
15
  user: config_1.DB_USER || '',
16
16
  pass: config_1.DB_PASSWORD || '',
17
- autoIndex: false, // True only for development
17
+ // autoIndex: false, // True only for development
18
18
  },
19
19
  };
20
20
  if (env !== 'production') {
@@ -79,6 +79,10 @@ const BrewSchema = new mongoose_1.Schema({
79
79
  type: String,
80
80
  required: false,
81
81
  },
82
+ visualJournalQuestion: {
83
+ type: String,
84
+ required: false,
85
+ },
82
86
  podcastKey: {
83
87
  type: String,
84
88
  required: false,
@@ -103,7 +107,7 @@ const BrewSchema = new mongoose_1.Schema({
103
107
  },
104
108
  });
105
109
  BrewSchema.index({ userId: 1, date: -1 }, {
106
- unique: true,
110
+ unique: false,
107
111
  });
108
112
  const brewModel = (0, mongoose_1.model)('Brew', BrewSchema);
109
113
  brewModel.syncIndexes();
@@ -0,0 +1,2 @@
1
+ /// <reference types="mongoose" />
2
+ export declare const CounterModel: import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CounterModel = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const CounterSchema = new mongoose_1.Schema({
6
+ counterId: {
7
+ type: mongoose_1.Types.ObjectId,
8
+ required: true,
9
+ },
10
+ counterKey: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ counterValue: {
15
+ type: Number,
16
+ required: true,
17
+ },
18
+ });
19
+ exports.CounterModel = (0, mongoose_1.model)('Counter', CounterSchema);
@@ -6,7 +6,7 @@ const MasterAppSettingSchema = new mongoose_1.Schema({
6
6
  key: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  name: {
12
12
  type: String,
@@ -6,7 +6,7 @@ const MasterDataSchema = new mongoose_1.Schema({
6
6
  key: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  dataType: {
12
12
  type: String,
@@ -6,7 +6,7 @@ const MasterEmotionsSchema = new mongoose_1.Schema({
6
6
  key: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  name: {
12
12
  type: String,
@@ -98,5 +98,13 @@ const MasterEmotionsSchema = new mongoose_1.Schema({
98
98
  pie: { type: Array, required: false },
99
99
  dailyChart: { type: Array, required: false },
100
100
  prePieMessage: { type: Array, required: false },
101
+ suggestionEmotionColor: {
102
+ type: String,
103
+ required: false,
104
+ },
105
+ appreciationEmotionColor: {
106
+ type: String,
107
+ required: false,
108
+ },
101
109
  });
102
110
  exports.MasterEmotionsModel = (0, mongoose_1.model)('Master_Emotion', MasterEmotionsSchema);
@@ -6,7 +6,7 @@ const MasterPodcastSchema = new mongoose_1.Schema({
6
6
  key: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  file: {
12
12
  type: String,
@@ -6,7 +6,7 @@ const MasterPredictionEmotionMessageSchema = new mongoose_1.Schema({
6
6
  masterPredictionEmotionKey: {
7
7
  type: String,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  messages: {
12
12
  type: Array,
@@ -6,7 +6,7 @@ const MasterThemeDataSchema = new mongoose_1.Schema({
6
6
  theme: {
7
7
  type: Number,
8
8
  required: true,
9
- index: true,
9
+ // index: true,
10
10
  },
11
11
  appreciationMessages: {
12
12
  type: Array,
@@ -40,6 +40,10 @@ const OrganizationSchema = new mongoose_1.Schema({
40
40
  type: Number,
41
41
  required: false,
42
42
  },
43
+ timezone: {
44
+ type: String,
45
+ required: false,
46
+ },
43
47
  });
44
48
  const organizationModel = (0, mongoose_1.model)('Organization', OrganizationSchema);
45
49
  organizationModel.syncIndexes();
@@ -6,6 +6,7 @@ const PlatformSchema = new mongoose_1.Schema({
6
6
  key: {
7
7
  type: String,
8
8
  required: true,
9
+ index: true,
9
10
  },
10
11
  name: {
11
12
  type: String,
@@ -15,5 +16,9 @@ const PlatformSchema = new mongoose_1.Schema({
15
16
  type: String,
16
17
  required: false,
17
18
  },
19
+ timezone: {
20
+ type: String,
21
+ required: false,
22
+ },
18
23
  });
19
24
  exports.PlatformModel = (0, mongoose_1.model)('Platform', PlatformSchema);
@@ -106,6 +106,10 @@ const UserSchema = new mongoose_1.Schema({
106
106
  type: Object,
107
107
  index: true,
108
108
  },
109
+ uniqueCode: {
110
+ type: String,
111
+ required: false,
112
+ },
109
113
  });
110
114
  const userModel = (0, mongoose_1.model)('User', UserSchema);
111
115
  userModel.syncIndexes();
@@ -37,7 +37,7 @@ const UserMessageLogSchema = new mongoose_1.Schema({
37
37
  required: false,
38
38
  },
39
39
  });
40
- UserMessageLogSchema.index({ employeeId: 1, activityId: -1 });
40
+ // UserMessageLogSchema.index({ employeeId: 1, activityId: -1 });
41
41
  const userMessageLogModel = (0, mongoose_1.model)('User_Message_Log', UserMessageLogSchema);
42
- userMessageLogModel.syncIndexes();
42
+ // userMessageLogModel.syncIndexes();
43
43
  exports.UserMessageLogModel = userMessageLogModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joye-backend-utility",
3
- "version": "3.0.0",
3
+ "version": "3.0.2",
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",
@@ -16,8 +16,7 @@
16
16
  "postinstall": "npm run build",
17
17
  "lint": "eslint --ignore-path .gitignore --ext .ts .",
18
18
  "lint:fix": "npm run lint -- --fix",
19
- "prepare": "husky install && yarn build",
20
- "publish": "npm publish"
19
+ "prepare": "husky install && yarn build"
21
20
  },
22
21
  "repository": {
23
22
  "type": "git",