@brimble/models 2.2.3 → 2.2.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.
@@ -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/index.d.ts CHANGED
@@ -19,7 +19,7 @@ export { default as Server } from "./server";
19
19
  export { default as Wallet } from "./wallet";
20
20
  export { default as DbImage } from "./db-image";
21
21
  export { default as Job } from "./job";
22
- export { default as Liscense } from "./liscense";
22
+ export { default as Liscense } from "./license";
23
23
  export { IUser, IGit, IProject, IPreview, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IJob, ILicense } from "./types";
24
24
  export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, DatabaseEngine, JobStatus, LicenseStatus } from "./enum";
25
25
  import mongoose from "mongoose";
package/dist/index.js CHANGED
@@ -56,8 +56,8 @@ var db_image_1 = require("./db-image");
56
56
  Object.defineProperty(exports, "DbImage", { enumerable: true, get: function () { return __importDefault(db_image_1).default; } });
57
57
  var job_1 = require("./job");
58
58
  Object.defineProperty(exports, "Job", { enumerable: true, get: function () { return __importDefault(job_1).default; } });
59
- var liscense_1 = require("./liscense");
60
- Object.defineProperty(exports, "Liscense", { enumerable: true, get: function () { return __importDefault(liscense_1).default; } });
59
+ var license_1 = require("./license");
60
+ Object.defineProperty(exports, "Liscense", { enumerable: true, get: function () { return __importDefault(license_1).default; } });
61
61
  var enum_1 = require("./enum");
62
62
  Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
63
63
  Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
@@ -49,7 +49,7 @@
49
49
  /// <reference types="mongoose/types/inferschematype" />
50
50
  /// <reference types="mongoose-delete/node_modules/mongoose/types/inferschematype" />
51
51
  /// <reference types="mongoose-delete/node_modules/mongoose/types/inferrawdoctype" />
52
- import { ILicense } from "./types/liscense";
52
+ import { ILicense } from "./types/license";
53
53
  declare const _default: import("mongoose").Model<ILicense, {}, {}, {}, import("mongoose").Document<unknown, {}, ILicense> & ILicense & {
54
54
  _id: import("mongoose").Types.ObjectId;
55
55
  }, any>;
@@ -37,6 +37,7 @@ const licenseSchema = new mongoose_1.Schema({
37
37
  enum: Object.values(enum_1.LicenseStatus),
38
38
  default: enum_1.LicenseStatus.ACTIVE
39
39
  },
40
+ tag: String,
40
41
  devices: [{
41
42
  deviceId: {
42
43
  type: String,
package/dist/server.js CHANGED
@@ -7,11 +7,15 @@ const serverSchema = new mongoose_1.Schema({
7
7
  type: String,
8
8
  required: true,
9
9
  },
10
+ url: String,
10
11
  ip_address: {
11
12
  type: String,
12
13
  required: true,
13
14
  },
14
- url: String,
15
+ private_ip_address: {
16
+ type: String,
17
+ required: true,
18
+ },
15
19
  server_type: String,
16
20
  status: {
17
21
  type: String,
@@ -23,11 +27,17 @@ const serverSchema = new mongoose_1.Schema({
23
27
  type: Boolean,
24
28
  default: true,
25
29
  },
26
- is_downscaled: {
27
- type: Boolean,
28
- default: false,
29
- },
30
30
  region: String,
31
31
  tag: String,
32
+ specifications: {
33
+ type: Object,
34
+ default: {},
35
+ select: true,
36
+ },
37
+ meta: {
38
+ type: Object,
39
+ default: {},
40
+ select: true,
41
+ },
32
42
  }, { timestamps: true });
33
43
  exports.default = (0, mongoose_1.model)("Server", serverSchema);
@@ -21,4 +21,4 @@ export { IMemberPermission } from "./member-permission";
21
21
  export { IWallet } from "./wallet";
22
22
  export { IDbImage } from "./db-image";
23
23
  export { IJob } from "./job";
24
- export { ILicense } from "./liscense";
24
+ export { ILicense } from "./license";
@@ -1,11 +1,11 @@
1
1
  import mongoose, { Document } from "mongoose";
2
2
  import { LicenseStatus } from "../enum";
3
-
4
3
  export interface ILicense extends Document {
5
4
  licenseKey: string;
6
5
  userId: mongoose.Types.ObjectId;
7
6
  teamId: mongoose.Types.ObjectId;
8
7
  status: LicenseStatus;
8
+ tag: string;
9
9
  subscriptionId: mongoose.Types.ObjectId;
10
10
  devices: Array<{
11
11
  deviceId: string;
@@ -15,4 +15,3 @@ export interface ILicense extends Document {
15
15
  }>;
16
16
  maxDevices: number;
17
17
  }
18
-
@@ -4,10 +4,13 @@ export interface IServer extends Document {
4
4
  name: string;
5
5
  url: string;
6
6
  ip_address: string;
7
+ private_ip_address: string;
7
8
  server_type: string;
8
9
  status: SERVER_STATUS;
9
10
  default: boolean;
10
- is_downscaled: boolean;
11
11
  tag: string;
12
12
  region: string;
13
+ is_custom_provision: boolean;
14
+ specifications: Record<any, any>;
15
+ meta: Record<any, any>;
13
16
  }
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/index.ts CHANGED
@@ -19,7 +19,7 @@ export { default as Server } from "./server";
19
19
  export { default as Wallet } from "./wallet";
20
20
  export { default as DbImage } from "./db-image";
21
21
  export { default as Job } from "./job";
22
- export { default as Liscense } from "./liscense"
22
+ export { default as Liscense } from "./license"
23
23
 
24
24
  export {
25
25
  IUser,
@@ -1,5 +1,5 @@
1
1
  import { model, Schema } from "mongoose";
2
- import { ILicense } from "./types/liscense";
2
+ import { ILicense } from "./types/license";
3
3
  import { LicenseStatus } from "./enum";
4
4
 
5
5
  const licenseSchema: Schema = new Schema({
@@ -28,6 +28,7 @@ const licenseSchema: Schema = new Schema({
28
28
  enum: Object.values(LicenseStatus),
29
29
  default: LicenseStatus.ACTIVE
30
30
  },
31
+ tag: String,
31
32
  devices: [{
32
33
  deviceId: {
33
34
  type: String,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.2.3",
3
+ "version": "2.2.5",
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,15 @@ const serverSchema = new Schema(
8
8
  type: String,
9
9
  required: true,
10
10
  },
11
+ url: String,
11
12
  ip_address: {
12
13
  type: String,
13
14
  required: true,
14
15
  },
15
- url: String,
16
+ private_ip_address: {
17
+ type: String,
18
+ required: true,
19
+ },
16
20
  server_type: String,
17
21
  status: {
18
22
  type: String,
@@ -24,12 +28,18 @@ const serverSchema = new Schema(
24
28
  type: Boolean,
25
29
  default: true,
26
30
  },
27
- is_downscaled: {
28
- type: Boolean,
29
- default: false,
30
- },
31
31
  region: String,
32
32
  tag: String,
33
+ specifications: {
34
+ type: Object,
35
+ default: {},
36
+ select: true,
37
+ },
38
+ meta: {
39
+ type: Object,
40
+ default: {},
41
+ select: true,
42
+ },
33
43
  },
34
44
  { timestamps: true },
35
45
  );
package/types/index.ts CHANGED
@@ -21,4 +21,4 @@ export { IMemberPermission } from "./member-permission";
21
21
  export { IWallet } from "./wallet";
22
22
  export { IDbImage } from "./db-image";
23
23
  export { IJob } from "./job";
24
- export { ILicense } from "./liscense"
24
+ export { ILicense } from "./license"
@@ -1,10 +1,12 @@
1
1
  import mongoose, { Document } from "mongoose";
2
2
  import { LicenseStatus } from "../enum";
3
+
3
4
  export interface ILicense extends Document {
4
5
  licenseKey: string;
5
6
  userId: mongoose.Types.ObjectId;
6
7
  teamId: mongoose.Types.ObjectId;
7
8
  status: LicenseStatus;
9
+ tag: string;
8
10
  subscriptionId: mongoose.Types.ObjectId;
9
11
  devices: Array<{
10
12
  deviceId: string;
@@ -14,3 +16,4 @@ export interface ILicense extends Document {
14
16
  }>;
15
17
  maxDevices: number;
16
18
  }
19
+
package/types/server.ts CHANGED
@@ -8,15 +8,21 @@ export interface IServer extends Document {
8
8
 
9
9
  ip_address: string;
10
10
 
11
+ private_ip_address: string;
12
+
11
13
  server_type: string;
12
14
 
13
15
  status: SERVER_STATUS;
14
16
 
15
17
  default: boolean;
16
18
 
17
- is_downscaled: boolean;
18
-
19
19
  tag: string;
20
20
 
21
21
  region: string;
22
+
23
+ is_custom_provision: boolean;
24
+
25
+ specifications: Record<any, any>;
26
+
27
+ meta: Record<any, any>;
22
28
  }
File without changes