shuttlepro-shared 1.2.55 → 1.2.57

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.
@@ -21,6 +21,7 @@ const conversationSchema = new mongoose.Schema(
21
21
  "linkedin",
22
22
  "facebook",
23
23
  "tiktok",
24
+ "outlook",
24
25
  "webChat",
25
26
  "smtp_gmail",
26
27
  ],
@@ -0,0 +1,34 @@
1
+ const mongoose = require("mongoose");
2
+ const { Schema } = mongoose;
3
+
4
+ const DefaultRolePermissionSchema = new Schema(
5
+ {
6
+ type: {
7
+ type: String,
8
+ default: "",
9
+ },
10
+ roleId: {
11
+ type: Schema.Types.ObjectId,
12
+ ref: "Role",
13
+ default: null,
14
+ },
15
+ },
16
+ { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } }
17
+ );
18
+
19
+ const fields = ["role", "module", "action", "value"];
20
+
21
+ fields.forEach((field) => {
22
+ DefaultRolePermissionSchema.add({
23
+ [field]: {
24
+ type: String,
25
+ required: true,
26
+ default: "",
27
+ },
28
+ });
29
+ });
30
+
31
+ module.exports = mongoose.model(
32
+ "DefaultRolePermission",
33
+ DefaultRolePermissionSchema
34
+ );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shuttlepro-shared",
3
- "version": "1.2.55",
3
+ "version": "1.2.57",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {