@brimble/models 1.5.12 → 1.5.14

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.
Files changed (83) hide show
  1. package/.turbo/turbo-build.log +2 -0
  2. package/LICENSE +201 -0
  3. package/dist/domain/dns.d.ts +4 -0
  4. package/dist/domain/dns.js +29 -0
  5. package/dist/domain/index.d.ts +4 -0
  6. package/dist/domain/index.js +58 -0
  7. package/dist/domain.d.ts +0 -0
  8. package/dist/domain.js +4 -0
  9. package/dist/enum/index.d.ts +13 -0
  10. package/dist/enum/index.js +16 -1
  11. package/dist/env.d.ts +0 -0
  12. package/dist/env.js +0 -0
  13. package/dist/follower.d.ts +0 -0
  14. package/dist/follower.js +0 -0
  15. package/dist/following.d.ts +0 -0
  16. package/dist/following.js +0 -0
  17. package/dist/index.d.ts +3 -2
  18. package/dist/index.js +5 -1
  19. package/dist/installed_integration.d.ts +4 -0
  20. package/dist/installed_integration.js +27 -0
  21. package/dist/integration.d.ts +0 -0
  22. package/dist/integration.js +0 -0
  23. package/dist/logs.d.ts +0 -0
  24. package/dist/logs.js +0 -0
  25. package/dist/member.d.ts +0 -0
  26. package/dist/member.js +0 -0
  27. package/dist/project.d.ts +4 -0
  28. package/dist/project.js +87 -0
  29. package/dist/subscription_plan.d.ts +4 -0
  30. package/dist/subscription_plan.js +40 -0
  31. package/dist/team.d.ts +0 -0
  32. package/dist/team.js +0 -0
  33. package/dist/token.d.ts +0 -0
  34. package/dist/token.js +0 -0
  35. package/dist/types/domain/dns.d.ts +9 -0
  36. package/dist/types/domain/index.d.ts +17 -0
  37. package/dist/types/domain/index.js +2 -0
  38. package/dist/types/domain.d.ts +1 -0
  39. package/dist/types/domain.js +0 -0
  40. package/dist/types/env.d.ts +0 -0
  41. package/dist/types/env.js +0 -0
  42. package/dist/types/following.d.ts +0 -0
  43. package/dist/types/following.js +0 -0
  44. package/dist/types/git.d.ts +0 -0
  45. package/dist/types/git.js +0 -0
  46. package/dist/types/index.d.ts +1 -0
  47. package/dist/types/index.js +0 -0
  48. package/dist/types/installed_integration.d.ts +0 -0
  49. package/dist/types/installed_integration.js +0 -0
  50. package/dist/types/integration.d.ts +0 -0
  51. package/dist/types/integration.js +0 -0
  52. package/dist/types/logs.d.ts +0 -0
  53. package/dist/types/logs.js +0 -0
  54. package/dist/types/member.d.ts +0 -0
  55. package/dist/types/member.js +0 -0
  56. package/dist/types/project.d.ts +46 -0
  57. package/dist/types/project.js +2 -0
  58. package/dist/types/subscription.d.ts +1 -1
  59. package/dist/types/subscription_plan.d.ts +15 -0
  60. package/dist/types/subscription_plan.js +2 -0
  61. package/dist/types/team.d.ts +0 -0
  62. package/dist/types/team.js +0 -0
  63. package/dist/types/token.d.ts +0 -0
  64. package/dist/types/token.js +0 -0
  65. package/dist/types/user.d.ts +0 -0
  66. package/dist/types/user.js +0 -0
  67. package/dist/user.d.ts +0 -0
  68. package/dist/user.js +0 -0
  69. package/domain/dns.ts +30 -0
  70. package/{domain.ts → domain/index.ts} +11 -2
  71. package/enum/index.ts +15 -0
  72. package/index.ts +4 -0
  73. package/package.json +2 -2
  74. package/types/domain/dns.ts +10 -0
  75. package/types/{domain.ts → domain/index.ts} +4 -1
  76. package/types/index.ts +1 -0
  77. package/types/subscription.ts +1 -1
  78. package/yarn-error.log +10230 -0
  79. package/brimble.json +0 -3
  80. package/dist/project/stage.d.ts +0 -4
  81. package/dist/project/stage.js +0 -20
  82. package/dist/types/project/stage.d.ts +0 -13
  83. /package/dist/types/{project/stage.js → domain/dns.js} +0 -0
@@ -0,0 +1,17 @@
1
+ import { Document } from "mongoose";
2
+ import { IPreview, IProject } from "../";
3
+ import { IDns } from "./dns";
4
+ export interface IDomain extends Document {
5
+ name: string;
6
+ project: IProject;
7
+ user_id: string;
8
+ team_id: string;
9
+ primary: boolean;
10
+ preview: IPreview;
11
+ is_free: boolean;
12
+ privacy_enabled: boolean;
13
+ renewal_date: string;
14
+ renewal_price: number;
15
+ nameservers: string[];
16
+ dns: IDns[];
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,4 +11,5 @@ export interface IDomain extends Document {
11
11
  privacy_enabled: boolean;
12
12
  renewal_date: string;
13
13
  renewal_price: number;
14
+ nameservers: string[];
14
15
  }
File without changes
File without changes
package/dist/types/env.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/dist/types/git.js CHANGED
File without changes
@@ -6,6 +6,7 @@ export { IPreview } from "./project/preview";
6
6
  export { IIntegration } from "./integration";
7
7
  export { IEnv } from "./env";
8
8
  export { IDomain } from "./domain";
9
+ export { IDns } from "./domain/dns";
9
10
  export { IToken } from "./token";
10
11
  export { ITeam } from "./team";
11
12
  export { IMember } from "./member";
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,46 @@
1
+ import { Document } from "mongoose";
2
+ import { GIT_TYPE, PROJECT_STATUS } from "../enum";
3
+ import { IDomain } from "./domain";
4
+ import { IEnv } from "./env";
5
+ import { ILog } from "./logs";
6
+ import { ITeam } from "./team";
7
+ import { IUser } from "./user";
8
+ import { IServer } from "./server";
9
+ export interface IProject extends Document {
10
+ name: string;
11
+ domains: Array<IDomain>;
12
+ environments: Array<IEnv>;
13
+ uuid: number;
14
+ pid: number;
15
+ port: number;
16
+ ip: string;
17
+ dir: string;
18
+ buildCommand: string;
19
+ outputDirectory: string;
20
+ user_id: IUser;
21
+ repo: {
22
+ name: string;
23
+ full_name: string;
24
+ id: number;
25
+ branch: string;
26
+ installationId: number;
27
+ git: GIT_TYPE;
28
+ };
29
+ rootDir?: string;
30
+ team: ITeam;
31
+ server: IServer;
32
+ isPrivate: boolean;
33
+ status: PROJECT_STATUS;
34
+ framework: string;
35
+ description: string;
36
+ logs: Array<ILog>;
37
+ log: ILog;
38
+ maintenance: boolean;
39
+ passwordEnabled: boolean;
40
+ password: string | null;
41
+ screenshot: string;
42
+ createdAt: Date;
43
+ updatedAt: Date;
44
+ lastProcessed: number;
45
+ tracking_token: string;
46
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,7 +3,7 @@ import { SUBSCRIPTION_STATUS } from "../enum";
3
3
  export interface ISubscription extends Document {
4
4
  team_id: string;
5
5
  admin_id: string;
6
- plan_code: string;
6
+ plan_type: string;
7
7
  status: SUBSCRIPTION_STATUS;
8
8
  amount: number;
9
9
  transaction_retries: number;
@@ -0,0 +1,15 @@
1
+ import { Document } from "mongoose";
2
+ import { SUBSCRIPTION_STATUS } from "../enum";
3
+ export interface ISubscriptionPlan extends Document {
4
+ team_id: string;
5
+ admin_id: string;
6
+ plan_code: string;
7
+ status: SUBSCRIPTION_STATUS;
8
+ amount: number;
9
+ debit_date: string;
10
+ start_date: string;
11
+ reminder_date: string;
12
+ specifications: {
13
+ [key: string]: any;
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/user.d.ts CHANGED
File without changes
package/dist/user.js CHANGED
File without changes
package/domain/dns.ts ADDED
@@ -0,0 +1,30 @@
1
+ import { model, Schema } from "mongoose";
2
+ import { IDns } from "../types";
3
+ import { DNS_TYPE } from "../enum";
4
+
5
+ const dnsSchema = new Schema({
6
+ name: {
7
+ type: String,
8
+ required: true,
9
+ },
10
+ ttl: {
11
+ type: Number,
12
+ default: 3600,
13
+ },
14
+ type: {
15
+ type: String,
16
+ enum: Object.values(DNS_TYPE),
17
+ required: true,
18
+ },
19
+ value: {
20
+ type: String,
21
+ required: true,
22
+ },
23
+ domain: {
24
+ type: Schema.Types.ObjectId,
25
+ ref: "Domain",
26
+ required: true,
27
+ },
28
+ });
29
+
30
+ export default model<IDns>("Dns", dnsSchema);
@@ -1,6 +1,5 @@
1
1
  import { model, Schema } from "mongoose";
2
- import { IDomain } from "./types";
3
- import { ENVIRONMENT } from "./enum";
2
+ import { IDomain } from "../types";
4
3
 
5
4
  const domainSchema = new Schema(
6
5
  {
@@ -46,6 +45,16 @@ const domainSchema = new Schema(
46
45
  ref: "Preview",
47
46
  type: Schema.Types.ObjectId,
48
47
  },
48
+ nameservers: {
49
+ type: Array,
50
+ required: false,
51
+ },
52
+ dns: [
53
+ {
54
+ ref: "Dns",
55
+ type: Schema.Types.ObjectId,
56
+ },
57
+ ],
49
58
  },
50
59
  { timestamps: true },
51
60
  );
package/enum/index.ts CHANGED
@@ -58,6 +58,12 @@ export enum SUBSCRIPTION_STATUS {
58
58
  INACTIVE = "in-active",
59
59
  }
60
60
 
61
+ export enum SUBSCRIPTION_PLAN_TYPE {
62
+ FreePlan = 'FREE_PLAN',
63
+ DeveloperPlan = 'DEVELOPER_PLAN',
64
+ TeamPlan = 'TEAM_PLAN'
65
+ }
66
+
61
67
  export enum OAUTH_PERMISSIONS {
62
68
  READ_USER = "read_user",
63
69
  READ_PROJECT = "read_project",
@@ -68,3 +74,12 @@ export enum SERVER_STATUS {
68
74
  Active = "active",
69
75
  InActive = "in-active",
70
76
  }
77
+
78
+ export enum DNS_TYPE {
79
+ A = "A",
80
+ CNAME = "CNAME",
81
+ NS = "NS",
82
+ TXT = "TXT",
83
+ MX = "MX",
84
+ SPF = "SPF",
85
+ }
package/index.ts CHANGED
@@ -4,6 +4,7 @@ export { default as Preview } from "./project/preview";
4
4
  export { default as Following } from "./following";
5
5
  export { default as Integration } from "./integration";
6
6
  export { default as Domain } from "./domain";
7
+ export { default as Dns } from "./domain/dns";
7
8
  export { default as Env } from "./env";
8
9
  export { default as Token } from "./token";
9
10
  export { default as Team } from "./team";
@@ -32,6 +33,7 @@ export {
32
33
  ILog,
33
34
  ISubscription,
34
35
  ICard,
36
+ IDns,
35
37
  } from "./types";
36
38
  export {
37
39
  GIT_TYPE,
@@ -41,9 +43,11 @@ export {
41
43
  ENVIRONMENT,
42
44
  SERVER_STATUS,
43
45
  ROLES,
46
+ SUBSCRIPTION_PLAN_TYPE,
44
47
  PROJECT_STATUS,
45
48
  SUBSCRIPTION_STATUS,
46
49
  CARD_TYPES,
50
+ DNS_TYPE,
47
51
  } from "./enum";
48
52
 
49
53
  import mongoose from "mongoose";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.5.11",
3
+ "version": "1.5.14",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,5 +21,5 @@
21
21
  "ts-node": "^8.10.2",
22
22
  "typescript": "^4.9.4"
23
23
  },
24
- "gitHead": "9c0c4ea58ebffdeef386658cf892ff8c189a7775"
24
+ "gitHead": "76a28d7492e5e4850b2b1fce3cd74f1a4f90fe84"
25
25
  }
@@ -0,0 +1,10 @@
1
+ import { Document } from "mongoose";
2
+ import { IDomain } from ".";
3
+
4
+ export interface IDns extends Document {
5
+ name: string;
6
+ ttl: number;
7
+ type: string;
8
+ value: string;
9
+ domain: IDomain;
10
+ }
@@ -1,5 +1,6 @@
1
1
  import { Document } from "mongoose";
2
- import { IPreview, IProject } from "./";
2
+ import { IPreview, IProject } from "../";
3
+ import { IDns } from "./dns";
3
4
 
4
5
  export interface IDomain extends Document {
5
6
  name: string;
@@ -12,4 +13,6 @@ export interface IDomain extends Document {
12
13
  privacy_enabled: boolean;
13
14
  renewal_date: string;
14
15
  renewal_price: number;
16
+ nameservers: string[];
17
+ dns: IDns[];
15
18
  }
package/types/index.ts CHANGED
@@ -6,6 +6,7 @@ export { IPreview } from "./project/preview";
6
6
  export { IIntegration } from "./integration";
7
7
  export { IEnv } from "./env";
8
8
  export { IDomain } from "./domain";
9
+ export { IDns } from "./domain/dns";
9
10
  export { IToken } from "./token";
10
11
  export { ITeam } from "./team";
11
12
  export { IMember } from "./member";
@@ -4,7 +4,7 @@ import { SUBSCRIPTION_STATUS } from "../enum";
4
4
  export interface ISubscription extends Document {
5
5
  team_id: string;
6
6
  admin_id: string;
7
- plan_code: string;
7
+ plan_type: string;
8
8
  status: SUBSCRIPTION_STATUS;
9
9
  amount: number;
10
10
  transaction_retries: number;