@brimble/models 1.5.3 → 1.5.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.
@@ -1,7 +1,8 @@
1
1
  import { Document } from "mongoose";
2
- import { IProject } from "./project";
3
- export interface IDomainBase {
2
+ import { IProject } from "./";
3
+ export interface IDomain extends Document {
4
4
  name: string;
5
+ project: IProject;
5
6
  user_id: string;
6
7
  team_id: string;
7
8
  primary: boolean;
@@ -12,6 +13,3 @@ export interface IDomainBase {
12
13
  expiry: Date;
13
14
  };
14
15
  }
15
- export interface IDomain extends Document, IDomainBase {
16
- project: IProject;
17
- }
@@ -1,6 +1,6 @@
1
1
  import { Document } from "mongoose";
2
2
  import { ENVIRONMENT } from "../enum";
3
- import { IUser } from "./user";
3
+ import { IProject, IUser } from "./";
4
4
  export interface IEnv extends Document {
5
5
  name: string;
6
6
  value: string;
@@ -8,6 +8,3 @@ export interface IEnv extends Document {
8
8
  user: IUser;
9
9
  environment: ENVIRONMENT;
10
10
  }
11
- interface IProject {
12
- }
13
- export {};
@@ -1,8 +1,8 @@
1
1
  import { Document } from "mongoose";
2
2
  import { PROJECT_STATUS } from "../enum";
3
- import { IUser } from "./user";
4
3
  import { IProject } from "./project";
5
- export interface ILogBase {
4
+ import { IUser } from "./user";
5
+ export interface ILog extends Document {
6
6
  logFile: string;
7
7
  name: string;
8
8
  commit: {
@@ -15,6 +15,9 @@ export interface ILogBase {
15
15
  username: string;
16
16
  };
17
17
  };
18
+ status: PROJECT_STATUS;
19
+ project: IProject;
20
+ user?: IUser;
18
21
  jobs: {
19
22
  id: number;
20
23
  name: string;
@@ -24,8 +27,3 @@ export interface ILogBase {
24
27
  createdAt: Date | string;
25
28
  updatedAt: Date | string;
26
29
  }
27
- export interface ILog extends Document, ILogBase {
28
- status: PROJECT_STATUS;
29
- project: IProject;
30
- user?: IUser;
31
- }
@@ -1,7 +1,6 @@
1
1
  import { Document } from "mongoose";
2
2
  import { ROLES } from "../enum";
3
- import { IUser } from "./user";
4
- import { ITeam } from "./team";
3
+ import { ITeam, IUser } from "./";
5
4
  export interface IMember extends Document {
6
5
  user: IUser;
7
6
  team: ITeam;
@@ -1,14 +1,14 @@
1
1
  import { Document } from "mongoose";
2
2
  import { GIT_TYPE, PROJECT_STATUS } from "../enum";
3
- import { IDomainBase } from "./domain";
3
+ import { IDomain } from "./domain";
4
4
  import { IEnv } from "./env";
5
- import { ILogBase } from "./logs";
5
+ import { ILog } from "./logs";
6
6
  import { ITeam } from "./team";
7
7
  import { IUser } from "./user";
8
8
  import { IServer } from "./server";
9
9
  export interface IProject extends Document {
10
10
  name: string;
11
- domains: Array<IDomainBase>;
11
+ domains: Array<IDomain>;
12
12
  environments: Array<IEnv>;
13
13
  uuid: number;
14
14
  pid: number;
@@ -33,8 +33,8 @@ export interface IProject extends Document {
33
33
  status: PROJECT_STATUS;
34
34
  framework: string;
35
35
  description: string;
36
- logs: Array<ILogBase>;
37
- log: ILogBase;
36
+ logs: Array<ILog>;
37
+ log: ILog;
38
38
  maintenance: boolean;
39
39
  passwordEnabled: boolean;
40
40
  password: string | null;
@@ -1,7 +1,5 @@
1
1
  import { Document } from "mongoose";
2
- import { IMember } from "./member";
3
- import { ITenancy } from "./tenancy";
4
- import { ISubscription } from "./subscription";
2
+ import { IMember, IProject, ISubscription, ITenancy } from "./";
5
3
  export interface ITeam extends Document {
6
4
  name: string;
7
5
  description: string;
@@ -12,6 +10,3 @@ export interface ITeam extends Document {
12
10
  tenant: ITenancy;
13
11
  subscription: ISubscription;
14
12
  }
15
- interface IProject {
16
- }
17
- export {};
@@ -1,8 +1,6 @@
1
1
  import { Document } from "mongoose";
2
- import { IGit } from "./git";
3
- import { IFollowing } from "./following";
4
- import { ITeam } from "./team";
5
- import { ITenancy } from "./tenancy";
2
+ import { IGit } from ".";
3
+ import { IFollowing, IProject, ITeam, ITenancy } from "./";
6
4
  export interface IUser extends Document {
7
5
  first_name: string;
8
6
  last_name: string;
@@ -27,6 +25,3 @@ export interface IUser extends Document {
27
25
  tenant: ITenancy;
28
26
  is_waitlist: boolean;
29
27
  }
30
- interface IProject {
31
- }
32
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.5.3",
3
+ "version": "1.5.5",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/types/domain.ts CHANGED
@@ -1,9 +1,9 @@
1
- // domain.ts
2
1
  import { Document } from "mongoose";
3
- import { IProject } from "./project";
2
+ import { IProject } from "./";
4
3
 
5
- export interface IDomainBase {
4
+ export interface IDomain extends Document {
6
5
  name: string;
6
+ project: IProject;
7
7
  user_id: string;
8
8
  team_id: string;
9
9
  primary: boolean;
@@ -14,7 +14,3 @@ export interface IDomainBase {
14
14
  expiry: Date;
15
15
  };
16
16
  }
17
-
18
- export interface IDomain extends Document, IDomainBase {
19
- project: IProject;
20
- }
package/types/env.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Document } from "mongoose";
2
2
  import { ENVIRONMENT } from "../enum";
3
- import { IUser } from "./user";
3
+ import { IProject, IUser } from "./";
4
4
 
5
5
  export interface IEnv extends Document {
6
6
  name: string;
@@ -9,4 +9,3 @@ export interface IEnv extends Document {
9
9
  user: IUser;
10
10
  environment: ENVIRONMENT;
11
11
  }
12
- interface IProject {}
package/types/logs.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { Document } from "mongoose";
2
2
  import { PROJECT_STATUS } from "../enum";
3
- import { IUser } from "./user";
4
3
  import { IProject } from "./project";
4
+ import { IUser } from "./user";
5
5
 
6
- export interface ILogBase {
6
+ export interface ILog extends Document {
7
7
  logFile: string;
8
8
  name: string;
9
9
  commit: {
@@ -16,6 +16,9 @@ export interface ILogBase {
16
16
  username: string;
17
17
  };
18
18
  };
19
+ status: PROJECT_STATUS;
20
+ project: IProject;
21
+ user?: IUser;
19
22
  jobs: {
20
23
  id: number;
21
24
  name: string;
@@ -25,8 +28,3 @@ export interface ILogBase {
25
28
  createdAt: Date | string;
26
29
  updatedAt: Date | string;
27
30
  }
28
- export interface ILog extends Document, ILogBase {
29
- status: PROJECT_STATUS;
30
- project: IProject;
31
- user?: IUser;
32
- }
package/types/member.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { Document } from "mongoose";
2
2
  import { ROLES } from "../enum";
3
- import { IUser } from "./user";
4
- import { ITeam } from "./team";
3
+ import { ITeam, IUser } from "./";
5
4
 
6
5
  export interface IMember extends Document {
7
6
  user: IUser;
package/types/project.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { Document } from "mongoose";
2
2
  import { GIT_TYPE, PROJECT_STATUS } from "../enum";
3
- import { IDomainBase } from "./domain";
3
+ import { IDomain } from "./domain";
4
4
  import { IEnv } from "./env";
5
- import { ILogBase } from "./logs";
5
+ import { ILog } from "./logs";
6
6
  import { ITeam } from "./team";
7
7
  import { IUser } from "./user";
8
8
  import { IServer } from "./server";
9
9
 
10
10
  export interface IProject extends Document {
11
11
  name: string;
12
- domains: Array<IDomainBase>;
12
+ domains: Array<IDomain>;
13
13
  environments: Array<IEnv>;
14
14
  uuid: number;
15
15
  pid: number;
@@ -34,8 +34,8 @@ export interface IProject extends Document {
34
34
  status: PROJECT_STATUS;
35
35
  framework: string;
36
36
  description: string;
37
- logs: Array<ILogBase>;
38
- log: ILogBase;
37
+ logs: Array<ILog>;
38
+ log: ILog;
39
39
  maintenance: boolean;
40
40
  passwordEnabled: boolean;
41
41
  password: string | null;
package/types/team.ts CHANGED
@@ -1,7 +1,5 @@
1
1
  import { Document } from "mongoose";
2
- import { IMember } from "./member";
3
- import { ITenancy } from "./tenancy";
4
- import { ISubscription } from "./subscription";
2
+ import {IMember, IProject, ISubscription, ITenancy} from "./";
5
3
 
6
4
  export interface ITeam extends Document {
7
5
  name: string;
@@ -12,5 +10,4 @@ export interface ITeam extends Document {
12
10
  isCreator: boolean;
13
11
  tenant: ITenancy;
14
12
  subscription: ISubscription;
15
- }
16
- interface IProject {}
13
+ }
package/types/user.ts CHANGED
@@ -1,8 +1,6 @@
1
1
  import { Document } from "mongoose";
2
- import { IGit } from "./git";
3
- import { IFollowing } from "./following";
4
- import { ITeam } from "./team";
5
- import { ITenancy } from "./tenancy";
2
+ import { IGit } from ".";
3
+ import { IFollowing, IProject, ITeam, ITenancy } from "./";
6
4
 
7
5
  export interface IUser extends Document {
8
6
  first_name: string;
@@ -28,4 +26,3 @@ export interface IUser extends Document {
28
26
  tenant: ITenancy;
29
27
  is_waitlist: boolean;
30
28
  }
31
- interface IProject {}