@brimble/models 1.6.4 → 1.6.5

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.
File without changes
package/brimble.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "project": {}
3
+ }
@@ -77,6 +77,6 @@ export declare enum PERMISSION_TYPE {
77
77
  DOMAIN = "DOMAIN",
78
78
  BILLING = "BILLING",
79
79
  PROJECT = "PROJECT",
80
- INTEGRATION = "INTEGRATION",
80
+ DNS = "DNS",
81
81
  USERS = "USERS"
82
82
  }
@@ -93,6 +93,6 @@ var PERMISSION_TYPE;
93
93
  PERMISSION_TYPE["DOMAIN"] = "DOMAIN";
94
94
  PERMISSION_TYPE["BILLING"] = "BILLING";
95
95
  PERMISSION_TYPE["PROJECT"] = "PROJECT";
96
- PERMISSION_TYPE["INTEGRATION"] = "INTEGRATION";
96
+ PERMISSION_TYPE["DNS"] = "DNS";
97
97
  PERMISSION_TYPE["USERS"] = "USERS";
98
98
  })(PERMISSION_TYPE = exports.PERMISSION_TYPE || (exports.PERMISSION_TYPE = {}));
@@ -5,7 +5,6 @@ const enum_1 = require("./enum");
5
5
  const permissionSchema = new mongoose_1.Schema({
6
6
  title: { type: String },
7
7
  role: [{ type: mongoose_1.Schema.Types.ObjectId, ref: 'Role' }],
8
- route: { type: String, required: true },
9
8
  type: { type: String, enum: Object.values(enum_1.PERMISSION_TYPE) }
10
9
  });
11
10
  exports.default = (0, mongoose_1.model)("Permission", permissionSchema);
@@ -111,5 +111,6 @@ const projectSchema = new mongoose_1.Schema({
111
111
  },
112
112
  specs: Object,
113
113
  last_requested: mongoose_1.Schema.Types.Date,
114
+ isPaused: Boolean,
114
115
  }, { timestamps: true });
115
116
  exports.default = (0, mongoose_1.model)("Project", projectSchema);
@@ -28,5 +28,6 @@ const previewsSchema = new mongoose_1.Schema({
28
28
  type: mongoose_1.Schema.Types.ObjectId,
29
29
  },
30
30
  last_requested: mongoose_1.Schema.Types.Date,
31
+ isPaused: Boolean,
31
32
  }, { timestamps: true });
32
33
  exports.default = (0, mongoose_1.model)("Preview", previewsSchema);
package/dist/server.js CHANGED
@@ -4,18 +4,14 @@ const mongoose_1 = require("mongoose");
4
4
  const enum_1 = require("./enum");
5
5
  const serverSchema = new mongoose_1.Schema({
6
6
  name: {
7
- type: mongoose_1.Schema.Types.ObjectId,
8
- ref: "User",
9
- required: true,
10
- },
11
- url: {
12
7
  type: String,
13
8
  required: true,
14
9
  },
15
10
  ip_address: {
16
- ref: "Team",
17
- type: mongoose_1.Schema.Types.ObjectId,
11
+ type: String,
12
+ required: true,
18
13
  },
14
+ url: String,
19
15
  server_type: String,
20
16
  status: {
21
17
  type: String,
@@ -5,5 +5,4 @@ export interface IPermission extends Document {
5
5
  title: string;
6
6
  role: IRole[];
7
7
  type: PERMISSION_TYPE;
8
- route: string;
9
8
  }
@@ -59,4 +59,5 @@ export interface IProject extends Document {
59
59
  cpu: number;
60
60
  };
61
61
  last_requested: Date;
62
+ isPaused: boolean;
62
63
  }
@@ -16,4 +16,5 @@ export interface IPreview extends Document {
16
16
  status: PROJECT_STATUS;
17
17
  log: ILog;
18
18
  last_requested: Date;
19
+ isPaused: boolean;
19
20
  }
package/enum/index.ts CHANGED
@@ -89,6 +89,6 @@ export enum PERMISSION_TYPE {
89
89
  DOMAIN = 'DOMAIN',
90
90
  BILLING = 'BILLING',
91
91
  PROJECT = 'PROJECT',
92
- INTEGRATION = 'INTEGRATION',
92
+ DNS = 'DNS',
93
93
  USERS = 'USERS'
94
94
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.6.4",
3
+ "version": "1.6.5",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/permission.ts CHANGED
@@ -5,7 +5,6 @@ import { PERMISSION_TYPE } from "./enum";
5
5
  const permissionSchema = new Schema({
6
6
  title: { type: String },
7
7
  role: [{ type: Schema.Types.ObjectId, ref: 'Role' }],
8
- route: { type: String, required: true },
9
8
  type: { type: String, enum: Object.values(PERMISSION_TYPE) }
10
9
  });
11
10
 
package/project/index.ts CHANGED
@@ -112,6 +112,7 @@ const projectSchema = new Schema(
112
112
  },
113
113
  specs: Object,
114
114
  last_requested: Schema.Types.Date,
115
+ isPaused: Boolean,
115
116
  },
116
117
  { timestamps: true },
117
118
  );
@@ -29,6 +29,7 @@ const previewsSchema = new Schema(
29
29
  type: Schema.Types.ObjectId,
30
30
  },
31
31
  last_requested: Schema.Types.Date,
32
+ isPaused: Boolean,
32
33
  },
33
34
  { timestamps: true },
34
35
  );
package/server.ts CHANGED
@@ -5,43 +5,30 @@ import { SERVER_STATUS } from "./enum";
5
5
  const serverSchema = new Schema(
6
6
  {
7
7
  name: {
8
- type: Schema.Types.ObjectId,
9
- ref: "User",
10
- required: true,
11
- },
12
-
13
- url: {
14
8
  type: String,
15
9
  required: true,
16
10
  },
17
-
18
11
  ip_address: {
19
- ref: "Team",
20
- type: Schema.Types.ObjectId,
12
+ type: String,
13
+ required: true,
21
14
  },
22
-
15
+ url: String,
23
16
  server_type: String,
24
-
25
17
  status: {
26
18
  type: String,
27
19
  enum: Object.values(SERVER_STATUS),
28
20
  default: SERVER_STATUS.Active,
29
21
  },
30
-
31
22
  default: Boolean,
32
-
33
23
  is_custom_provision: {
34
24
  type: Boolean,
35
25
  default: true,
36
26
  },
37
-
38
27
  is_downscaled: {
39
28
  type: Boolean,
40
29
  default: false,
41
30
  },
42
-
43
31
  region: String,
44
-
45
32
  tag: String,
46
33
  },
47
34
  { timestamps: true },
@@ -8,6 +8,4 @@ export interface IPermission extends Document {
8
8
  role: IRole[];
9
9
 
10
10
  type: PERMISSION_TYPE;
11
-
12
- route: string;
13
11
  }
@@ -60,4 +60,5 @@ export interface IProject extends Document {
60
60
  cpu: number;
61
61
  };
62
62
  last_requested: Date;
63
+ isPaused: boolean;
63
64
  }
@@ -17,4 +17,5 @@ export interface IPreview extends Document {
17
17
  status: PROJECT_STATUS;
18
18
  log: ILog;
19
19
  last_requested: Date;
20
+ isPaused: boolean;
20
21
  }