@brimble/models 1.5.35 → 1.5.37

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.
@@ -92,6 +92,10 @@ const projectSchema = new mongoose_1.Schema({
92
92
  lastProcessed: Number,
93
93
  tracking_token: String,
94
94
  from: mongoose_1.Schema.Types.ObjectId,
95
+ container_stats_schedule_id: {
96
+ type: String,
97
+ default: null,
98
+ },
95
99
  previews: [
96
100
  {
97
101
  ref: "Preview",
@@ -102,6 +106,7 @@ const projectSchema = new mongoose_1.Schema({
102
106
  type: Number,
103
107
  default: 3,
104
108
  },
105
- specs: Object
109
+ specs: Object,
110
+ last_requested: mongoose_1.Schema.Types.Date,
106
111
  }, { timestamps: true });
107
112
  exports.default = (0, mongoose_1.model)("Project", projectSchema);
@@ -27,5 +27,6 @@ const previewsSchema = new mongoose_1.Schema({
27
27
  ref: "Log",
28
28
  type: mongoose_1.Schema.Types.ObjectId,
29
29
  },
30
+ last_requested: mongoose_1.Schema.Types.Date,
30
31
  }, { timestamps: true });
31
32
  exports.default = (0, mongoose_1.model)("Preview", previewsSchema);
@@ -45,6 +45,7 @@ export interface IProject extends Document {
45
45
  screenshot: string;
46
46
  createdAt: Date;
47
47
  updatedAt: Date;
48
+ container_stats_schedule_id: string | null;
48
49
  lastProcessed: number;
49
50
  tracking_token: string;
50
51
  from: string;
@@ -54,4 +55,5 @@ export interface IProject extends Document {
54
55
  memory: number;
55
56
  cpu: number;
56
57
  };
58
+ last_requested: Date;
57
59
  }
@@ -15,4 +15,5 @@ export interface IPreview extends Document {
15
15
  issue_comment_id: number;
16
16
  status: PROJECT_STATUS;
17
17
  log: ILog;
18
+ last_requested: Date;
18
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.5.35",
3
+ "version": "1.5.37",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/project/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { model, Schema } from "mongoose";
1
+ import { model, Schema, } from "mongoose";
2
2
  import { PROJECT_STATUS } from "../enum";
3
3
  import { IProject } from "../types";
4
4
 
@@ -93,6 +93,10 @@ const projectSchema = new Schema(
93
93
  lastProcessed: Number,
94
94
  tracking_token: String,
95
95
  from: Schema.Types.ObjectId,
96
+ container_stats_schedule_id: {
97
+ type: String,
98
+ default: null,
99
+ },
96
100
  previews: [
97
101
  {
98
102
  ref: "Preview",
@@ -103,7 +107,8 @@ const projectSchema = new Schema(
103
107
  type: Number,
104
108
  default: 3,
105
109
  },
106
- specs: Object
110
+ specs: Object,
111
+ last_requested: Schema.Types.Date,
107
112
  },
108
113
  { timestamps: true },
109
114
  );
@@ -28,6 +28,7 @@ const previewsSchema = new Schema(
28
28
  ref: "Log",
29
29
  type: Schema.Types.ObjectId,
30
30
  },
31
+ last_requested: Schema.Types.Date,
31
32
  },
32
33
  { timestamps: true },
33
34
  );
@@ -46,6 +46,7 @@ export interface IProject extends Document {
46
46
  screenshot: string;
47
47
  createdAt: Date;
48
48
  updatedAt: Date;
49
+ container_stats_schedule_id: string | null;
49
50
  lastProcessed: number;
50
51
  tracking_token: string;
51
52
  from: string;
@@ -55,4 +56,5 @@ export interface IProject extends Document {
55
56
  memory: number;
56
57
  cpu: number;
57
58
  };
59
+ last_requested: Date;
58
60
  }
@@ -16,4 +16,5 @@ export interface IPreview extends Document {
16
16
  issue_comment_id: number;
17
17
  status: PROJECT_STATUS;
18
18
  log: ILog;
19
+ last_requested: Date;
19
20
  }