@dynamatix/cat-shared 0.0.117 → 0.0.119

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.
@@ -31,8 +31,9 @@ const documentSchema = new mongoose.Schema({
31
31
  type: String,
32
32
  required: false
33
33
  },
34
- status: { // doc current status (pending, approved, rejected, ...)
35
- type: String,
34
+ statusLid: { // doc current status lookup id (pending, approved, rejected, ...)
35
+ type: mongoose.Schema.Types.ObjectId,
36
+ ref: "Lookup",
36
37
  required: false
37
38
  },
38
39
  fileSize: {
@@ -1,4 +1,5 @@
1
1
  import mongoose from "mongoose";
2
+ import applyAuditMiddleware from "../middlewares/audit.middleware";
2
3
 
3
4
  const alertSchema = new mongoose.Schema({
4
5
  contextId: {
@@ -53,5 +54,8 @@ const alertSchema = new mongoose.Schema({
53
54
  alertSchema.index({ source: 1, sourceId: 1 });
54
55
  alertSchema.index({ status: 1, isActive: 1 });
55
56
 
57
+ applyAuditMiddleware(alertSchema, "WorkflowAlert");
58
+
59
+
56
60
  const WorkflowAlertModel = mongoose.models.WorkflowAlert || mongoose.model('WorkflowAlert', alertSchema);
57
61
  export default WorkflowAlertModel;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/cat-shared",
3
- "version": "0.0.117",
3
+ "version": "0.0.119",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"