@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.
- package/.turbo/turbo-build.log +2 -0
- package/LICENSE +201 -0
- package/dist/domain/dns.d.ts +4 -0
- package/dist/domain/dns.js +29 -0
- package/dist/domain/index.d.ts +4 -0
- package/dist/domain/index.js +58 -0
- package/dist/domain.d.ts +0 -0
- package/dist/domain.js +4 -0
- package/dist/enum/index.d.ts +13 -0
- package/dist/enum/index.js +16 -1
- package/dist/env.d.ts +0 -0
- package/dist/env.js +0 -0
- package/dist/follower.d.ts +0 -0
- package/dist/follower.js +0 -0
- package/dist/following.d.ts +0 -0
- package/dist/following.js +0 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +5 -1
- package/dist/installed_integration.d.ts +4 -0
- package/dist/installed_integration.js +27 -0
- package/dist/integration.d.ts +0 -0
- package/dist/integration.js +0 -0
- package/dist/logs.d.ts +0 -0
- package/dist/logs.js +0 -0
- package/dist/member.d.ts +0 -0
- package/dist/member.js +0 -0
- package/dist/project.d.ts +4 -0
- package/dist/project.js +87 -0
- package/dist/subscription_plan.d.ts +4 -0
- package/dist/subscription_plan.js +40 -0
- package/dist/team.d.ts +0 -0
- package/dist/team.js +0 -0
- package/dist/token.d.ts +0 -0
- package/dist/token.js +0 -0
- package/dist/types/domain/dns.d.ts +9 -0
- package/dist/types/domain/index.d.ts +17 -0
- package/dist/types/domain/index.js +2 -0
- package/dist/types/domain.d.ts +1 -0
- package/dist/types/domain.js +0 -0
- package/dist/types/env.d.ts +0 -0
- package/dist/types/env.js +0 -0
- package/dist/types/following.d.ts +0 -0
- package/dist/types/following.js +0 -0
- package/dist/types/git.d.ts +0 -0
- package/dist/types/git.js +0 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +0 -0
- package/dist/types/installed_integration.d.ts +0 -0
- package/dist/types/installed_integration.js +0 -0
- package/dist/types/integration.d.ts +0 -0
- package/dist/types/integration.js +0 -0
- package/dist/types/logs.d.ts +0 -0
- package/dist/types/logs.js +0 -0
- package/dist/types/member.d.ts +0 -0
- package/dist/types/member.js +0 -0
- package/dist/types/project.d.ts +46 -0
- package/dist/types/project.js +2 -0
- package/dist/types/subscription.d.ts +1 -1
- package/dist/types/subscription_plan.d.ts +15 -0
- package/dist/types/subscription_plan.js +2 -0
- package/dist/types/team.d.ts +0 -0
- package/dist/types/team.js +0 -0
- package/dist/types/token.d.ts +0 -0
- package/dist/types/token.js +0 -0
- package/dist/types/user.d.ts +0 -0
- package/dist/types/user.js +0 -0
- package/dist/user.d.ts +0 -0
- package/dist/user.js +0 -0
- package/domain/dns.ts +30 -0
- package/{domain.ts → domain/index.ts} +11 -2
- package/enum/index.ts +15 -0
- package/index.ts +4 -0
- package/package.json +2 -2
- package/types/domain/dns.ts +10 -0
- package/types/{domain.ts → domain/index.ts} +4 -1
- package/types/index.ts +1 -0
- package/types/subscription.ts +1 -1
- package/yarn-error.log +10230 -0
- package/brimble.json +0 -3
- package/dist/project/stage.d.ts +0 -4
- package/dist/project/stage.js +0 -20
- package/dist/types/project/stage.d.ts +0 -13
- /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
|
+
}
|
package/dist/types/domain.d.ts
CHANGED
package/dist/types/domain.js
CHANGED
|
File without changes
|
package/dist/types/env.d.ts
CHANGED
|
File without changes
|
package/dist/types/env.js
CHANGED
|
File without changes
|
|
File without changes
|
package/dist/types/following.js
CHANGED
|
File without changes
|
package/dist/types/git.d.ts
CHANGED
|
File without changes
|
package/dist/types/git.js
CHANGED
|
File without changes
|
package/dist/types/index.d.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";
|
package/dist/types/index.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/types/logs.d.ts
CHANGED
|
File without changes
|
package/dist/types/logs.js
CHANGED
|
File without changes
|
package/dist/types/member.d.ts
CHANGED
|
File without changes
|
package/dist/types/member.js
CHANGED
|
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,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
|
+
}
|
package/dist/types/team.d.ts
CHANGED
|
File without changes
|
package/dist/types/team.js
CHANGED
|
File without changes
|
package/dist/types/token.d.ts
CHANGED
|
File without changes
|
package/dist/types/token.js
CHANGED
|
File without changes
|
package/dist/types/user.d.ts
CHANGED
|
File without changes
|
package/dist/types/user.js
CHANGED
|
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 "
|
|
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.
|
|
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": "
|
|
24
|
+
"gitHead": "76a28d7492e5e4850b2b1fce3cd74f1a4f90fe84"
|
|
25
25
|
}
|
|
@@ -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";
|
package/types/subscription.ts
CHANGED