joye-backend-utility 5.0.21 → 5.0.23

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
@@ -36,6 +36,7 @@ class database {
36
36
  con.model('User_Reminder', schema_1.UserReminderSchema);
37
37
  con.model('User_Feedback', schema_1.UserFeedbackSchema);
38
38
  con.model('User_Video', schema_1.UserVideoSchema);
39
+ con.model('Timezone', schema_1.TimezoneSchema);
39
40
  };
40
41
  this.connectToDatabase = () => {
41
42
  const env = config_1.NODE_ENV || 'development';
@@ -27,3 +27,4 @@ export { MasterLinkCardSchema } from './masterLinkCard';
27
27
  export { UserReminderSchema } from '../schema/userReminder';
28
28
  export { UserFeedbackSchema } from '../schema/userFeedback';
29
29
  export { UserVideoSchema } from '../schema/userVideo';
30
+ export { TimezoneSchema } from './timezones';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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");
@@ -59,3 +59,5 @@ var userFeedback_1 = require("../schema/userFeedback");
59
59
  Object.defineProperty(exports, "UserFeedbackSchema", { enumerable: true, get: function () { return userFeedback_1.UserFeedbackSchema; } });
60
60
  var userVideo_1 = require("../schema/userVideo");
61
61
  Object.defineProperty(exports, "UserVideoSchema", { enumerable: true, get: function () { return userVideo_1.UserVideoSchema; } });
62
+ var timezones_1 = require("./timezones");
63
+ Object.defineProperty(exports, "TimezoneSchema", { enumerable: true, get: function () { return timezones_1.TimezoneSchema; } });
@@ -0,0 +1,2 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const TimezoneSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimezoneSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const Timezone = new mongoose_1.Schema({
6
+ name: {
7
+ type: String,
8
+ required: true,
9
+ index: true,
10
+ },
11
+ timezone: {
12
+ type: String,
13
+ required: true,
14
+ index: true,
15
+ }
16
+ });
17
+ exports.TimezoneSchema = Timezone;
@@ -158,6 +158,15 @@ const User = new mongoose_1.Schema({
158
158
  type: Boolean,
159
159
  required: false,
160
160
  },
161
+ preferredTimezone: {
162
+ type: String,
163
+ required: false,
164
+ },
165
+ confirmOrgTimezone: {
166
+ type: Boolean,
167
+ required: false,
168
+ default: false,
169
+ },
161
170
  consentTime: {
162
171
  type: Number,
163
172
  required: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joye-backend-utility",
3
- "version": "5.0.21",
3
+ "version": "5.0.23",
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",