@brimble/models 2.2.4 → 2.2.6

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.
@@ -66,6 +66,7 @@ export declare enum OAUTH_PERMISSIONS {
66
66
  }
67
67
  export declare enum SERVER_STATUS {
68
68
  Active = "active",
69
+ InProgress = "in-progres",
69
70
  InActive = "in-active"
70
71
  }
71
72
  export declare enum DNS_TYPE {
@@ -80,6 +80,7 @@ var OAUTH_PERMISSIONS;
80
80
  var SERVER_STATUS;
81
81
  (function (SERVER_STATUS) {
82
82
  SERVER_STATUS["Active"] = "active";
83
+ SERVER_STATUS["InProgress"] = "in-progres";
83
84
  SERVER_STATUS["InActive"] = "in-active";
84
85
  })(SERVER_STATUS = exports.SERVER_STATUS || (exports.SERVER_STATUS = {}));
85
86
  var DNS_TYPE;
package/dist/server.js CHANGED
@@ -7,11 +7,25 @@ const serverSchema = new mongoose_1.Schema({
7
7
  type: String,
8
8
  required: true,
9
9
  },
10
+ url: String,
11
+ userId: {
12
+ type: mongoose_1.Schema.Types.ObjectId,
13
+ ref: 'User',
14
+ required: true
15
+ },
16
+ teamId: {
17
+ type: mongoose_1.Schema.Types.ObjectId,
18
+ ref: 'Team',
19
+ required: false
20
+ },
10
21
  ip_address: {
11
22
  type: String,
12
23
  required: true,
13
24
  },
14
- url: String,
25
+ private_ip_address: {
26
+ type: String,
27
+ required: true,
28
+ },
15
29
  server_type: String,
16
30
  status: {
17
31
  type: String,
@@ -23,11 +37,17 @@ const serverSchema = new mongoose_1.Schema({
23
37
  type: Boolean,
24
38
  default: true,
25
39
  },
26
- is_downscaled: {
27
- type: Boolean,
28
- default: false,
29
- },
30
40
  region: String,
31
41
  tag: String,
42
+ specifications: {
43
+ type: Object,
44
+ default: {},
45
+ select: true,
46
+ },
47
+ meta: {
48
+ type: Object,
49
+ default: {},
50
+ select: true,
51
+ },
32
52
  }, { timestamps: true });
33
53
  exports.default = (0, mongoose_1.model)("Server", serverSchema);
@@ -1,13 +1,18 @@
1
- import { Document } from "mongoose";
1
+ import mongoose, { Document } from "mongoose";
2
2
  import { SERVER_STATUS } from "../enum";
3
3
  export interface IServer extends Document {
4
4
  name: string;
5
5
  url: string;
6
+ userId: mongoose.Types.ObjectId;
7
+ teamId?: mongoose.Types.ObjectId;
6
8
  ip_address: string;
9
+ private_ip_address: string;
7
10
  server_type: string;
8
11
  status: SERVER_STATUS;
9
12
  default: boolean;
10
- is_downscaled: boolean;
11
13
  tag: string;
12
14
  region: string;
15
+ is_custom_provision: boolean;
16
+ specifications: Record<any, any>;
17
+ meta: Record<any, any>;
13
18
  }
package/enum/index.ts CHANGED
@@ -76,6 +76,7 @@ export enum OAUTH_PERMISSIONS {
76
76
 
77
77
  export enum SERVER_STATUS {
78
78
  Active = "active",
79
+ InProgress = "in-progres",
79
80
  InActive = "in-active",
80
81
  }
81
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.2.4",
3
+ "version": "2.2.6",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/server.ts CHANGED
@@ -8,11 +8,25 @@ const serverSchema = new Schema(
8
8
  type: String,
9
9
  required: true,
10
10
  },
11
+ url: String,
12
+ userId: {
13
+ type: Schema.Types.ObjectId,
14
+ ref: 'User',
15
+ required: true
16
+ },
17
+ teamId: {
18
+ type: Schema.Types.ObjectId,
19
+ ref: 'Team',
20
+ required: false
21
+ },
11
22
  ip_address: {
12
23
  type: String,
13
24
  required: true,
14
25
  },
15
- url: String,
26
+ private_ip_address: {
27
+ type: String,
28
+ required: true,
29
+ },
16
30
  server_type: String,
17
31
  status: {
18
32
  type: String,
@@ -24,12 +38,18 @@ const serverSchema = new Schema(
24
38
  type: Boolean,
25
39
  default: true,
26
40
  },
27
- is_downscaled: {
28
- type: Boolean,
29
- default: false,
30
- },
31
41
  region: String,
32
42
  tag: String,
43
+ specifications: {
44
+ type: Object,
45
+ default: {},
46
+ select: true,
47
+ },
48
+ meta: {
49
+ type: Object,
50
+ default: {},
51
+ select: true,
52
+ },
33
53
  },
34
54
  { timestamps: true },
35
55
  );
package/types/server.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Document } from "mongoose";
1
+ import mongoose, { Document } from "mongoose";
2
2
  import { SERVER_STATUS } from "../enum";
3
3
 
4
4
  export interface IServer extends Document {
@@ -6,17 +6,27 @@ export interface IServer extends Document {
6
6
 
7
7
  url: string;
8
8
 
9
+ userId: mongoose.Types.ObjectId;
10
+
11
+ teamId?: mongoose.Types.ObjectId;
12
+
9
13
  ip_address: string;
10
14
 
15
+ private_ip_address: string;
16
+
11
17
  server_type: string;
12
18
 
13
19
  status: SERVER_STATUS;
14
20
 
15
21
  default: boolean;
16
22
 
17
- is_downscaled: boolean;
18
-
19
23
  tag: string;
20
24
 
21
25
  region: string;
26
+
27
+ is_custom_provision: boolean;
28
+
29
+ specifications: Record<any, any>;
30
+
31
+ meta: Record<any, any>;
22
32
  }