@brimble/models 1.3.31 → 1.3.32

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.
package/dist/domain.js CHANGED
@@ -15,5 +15,9 @@ const domainSchema = new mongoose_1.Schema({
15
15
  type: mongoose_1.Schema.Types.ObjectId,
16
16
  required: true,
17
17
  },
18
+ primary: {
19
+ type: Boolean,
20
+ default: false,
21
+ },
18
22
  }, { timestamps: true });
19
23
  exports.default = mongoose_1.model("Domain", domainSchema);
@@ -25,3 +25,9 @@ export declare enum ROLES {
25
25
  CREATOR = "CREATOR",
26
26
  MEMBER = "MEMBER"
27
27
  }
28
+ export declare enum PROJECT_STATUS {
29
+ INACTIVE = "INACTIVE",
30
+ ACTIVE = "ACTIVE",
31
+ INPROGRESS = "INPROGRESS",
32
+ FAILED = "FAILED"
33
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ROLES = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_TYPE = exports.ENVIRONMENT = exports.GIT_TYPE = void 0;
3
+ exports.PROJECT_STATUS = exports.ROLES = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_TYPE = exports.ENVIRONMENT = exports.GIT_TYPE = void 0;
4
4
  var GIT_TYPE;
5
5
  (function (GIT_TYPE) {
6
6
  GIT_TYPE["GITHUB"] = "GITHUB";
@@ -33,3 +33,10 @@ var ROLES;
33
33
  ROLES["CREATOR"] = "CREATOR";
34
34
  ROLES["MEMBER"] = "MEMBER";
35
35
  })(ROLES = exports.ROLES || (exports.ROLES = {}));
36
+ var PROJECT_STATUS;
37
+ (function (PROJECT_STATUS) {
38
+ PROJECT_STATUS["INACTIVE"] = "INACTIVE";
39
+ PROJECT_STATUS["ACTIVE"] = "ACTIVE";
40
+ PROJECT_STATUS["INPROGRESS"] = "INPROGRESS";
41
+ PROJECT_STATUS["FAILED"] = "FAILED";
42
+ })(PROJECT_STATUS = exports.PROJECT_STATUS || (exports.PROJECT_STATUS = {}));
package/dist/project.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const mongoose_1 = require("mongoose");
4
+ const enum_1 = require("./enum");
4
5
  const projectSchema = new mongoose_1.Schema({
5
6
  name: {
6
7
  type: String,
@@ -45,5 +46,10 @@ const projectSchema = new mongoose_1.Schema({
45
46
  type: Boolean,
46
47
  default: false,
47
48
  },
49
+ status: {
50
+ type: Object.values(enum_1.PROJECT_STATUS),
51
+ default: enum_1.PROJECT_STATUS.INPROGRESS,
52
+ },
53
+ description: String,
48
54
  }, { timestamps: true });
49
55
  exports.default = mongoose_1.model("Project", projectSchema);
@@ -4,4 +4,5 @@ export interface IDomain extends Document {
4
4
  name: string;
5
5
  project: IProject;
6
6
  user_id: string;
7
+ primary: boolean;
7
8
  }
@@ -1,4 +1,5 @@
1
1
  import { Document } from "mongoose";
2
+ import { GIT_TYPE, PROJECT_STATUS } from "../enum";
2
3
  import { IDomain } from "./domain";
3
4
  import { IEnv } from "./env";
4
5
  import { ITeam } from "./team";
@@ -20,7 +21,13 @@ export interface IProject extends Document {
20
21
  id: number;
21
22
  branch: string;
22
23
  deployment_id: number;
24
+ git: GIT_TYPE;
23
25
  };
24
26
  rootDir?: string;
25
27
  team: ITeam;
28
+ isPrivate: boolean;
29
+ status: PROJECT_STATUS;
30
+ description: string;
31
+ createdAt: Date;
32
+ updatedAt: Date;
26
33
  }
package/domain.ts CHANGED
@@ -16,6 +16,10 @@ const domainSchema = new Schema(
16
16
  type: Schema.Types.ObjectId,
17
17
  required: true,
18
18
  },
19
+ primary: {
20
+ type: Boolean,
21
+ default: false,
22
+ },
19
23
  },
20
24
  { timestamps: true },
21
25
  );
package/enum/index.ts CHANGED
@@ -28,3 +28,10 @@ export enum ROLES {
28
28
  CREATOR = "CREATOR",
29
29
  MEMBER = "MEMBER",
30
30
  }
31
+
32
+ export enum PROJECT_STATUS {
33
+ INACTIVE = "INACTIVE",
34
+ ACTIVE = "ACTIVE",
35
+ INPROGRESS = "INPROGRESS",
36
+ FAILED = "FAILED",
37
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.3.31",
3
+ "version": "1.3.32",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/project.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { model, Schema } from "mongoose";
2
+ import { PROJECT_STATUS } from "./enum";
2
3
  import { IProject } from "./types";
3
4
 
4
5
  const projectSchema = new Schema(
@@ -46,6 +47,11 @@ const projectSchema = new Schema(
46
47
  type: Boolean,
47
48
  default: false,
48
49
  },
50
+ status: {
51
+ type: Object.values(PROJECT_STATUS),
52
+ default: PROJECT_STATUS.INPROGRESS,
53
+ },
54
+ description: String,
49
55
  },
50
56
  { timestamps: true },
51
57
  );
package/types/domain.ts CHANGED
@@ -5,4 +5,5 @@ export interface IDomain extends Document {
5
5
  name: string;
6
6
  project: IProject;
7
7
  user_id: string;
8
+ primary: boolean;
8
9
  }
package/types/project.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Document } from "mongoose";
2
+ import { GIT_TYPE, PROJECT_STATUS } from "../enum";
2
3
  import { IDomain } from "./domain";
3
4
  import { IEnv } from "./env";
4
5
  import { ITeam } from "./team";
@@ -21,7 +22,13 @@ export interface IProject extends Document {
21
22
  id: number;
22
23
  branch: string;
23
24
  deployment_id: number;
25
+ git: GIT_TYPE;
24
26
  };
25
27
  rootDir?: string;
26
28
  team: ITeam;
29
+ isPrivate: boolean;
30
+ status: PROJECT_STATUS;
31
+ description: string;
32
+ createdAt: Date;
33
+ updatedAt: Date;
27
34
  }