@brimble/models 3.7.9 → 3.7.78
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/.claude/settings.local.json +7 -0
- package/activity-log.ts +66 -0
- package/app-message.ts +18 -0
- package/cashier_subscription.ts +35 -0
- package/cashier_subscription_item.ts +25 -0
- package/collab-annotation.ts +9 -2
- package/collab-comment.ts +2 -2
- package/collab-integration.ts +1 -0
- package/collab-push-subscription.ts +19 -0
- package/compute.ts +16 -6
- package/dist/activity-log.d.ts +30 -0
- package/dist/activity-log.js +61 -0
- package/dist/app-message.d.ts +30 -0
- package/dist/app-message.js +14 -0
- package/dist/cashier_subscription.d.ts +30 -0
- package/dist/cashier_subscription.js +27 -0
- package/dist/cashier_subscription_item.d.ts +30 -0
- package/dist/cashier_subscription_item.js +17 -0
- package/dist/collab-annotation.js +9 -2
- package/dist/collab-comment.js +2 -2
- package/dist/collab-integration.js +1 -0
- package/dist/collab-push-subscription.d.ts +30 -0
- package/dist/collab-push-subscription.js +14 -0
- package/dist/compute.js +15 -6
- package/dist/domain/index.js +10 -0
- package/dist/domain/transfer.d.ts +30 -0
- package/dist/domain/transfer.js +99 -0
- package/dist/enum/index.d.ts +36 -6
- package/dist/enum/index.js +41 -6
- package/dist/env.js +0 -8
- package/dist/environment-variable.d.ts +30 -0
- package/dist/environment-variable.js +16 -0
- package/dist/framework.js +5 -0
- package/dist/index.d.ts +15 -3
- package/dist/index.js +34 -5
- package/dist/invoice.d.ts +30 -0
- package/dist/invoice.js +28 -0
- package/dist/member.js +1 -0
- package/dist/ownership-transfer.d.ts +30 -0
- package/dist/ownership-transfer.js +35 -0
- package/dist/plan_configuration.js +3 -0
- package/dist/project/index.js +14 -6
- package/dist/project-environment.d.ts +30 -0
- package/dist/project-environment.js +13 -0
- package/dist/project-tag-assignment.d.ts +30 -0
- package/dist/project-tag-assignment.js +32 -0
- package/dist/project_analytics.d.ts +30 -0
- package/dist/project_analytics.js +18 -0
- package/dist/subscription.js +8 -0
- package/dist/{branch.d.ts → tag.d.ts} +2 -2
- package/dist/tag.js +29 -0
- package/dist/team.js +16 -0
- package/dist/types/activity-log.d.ts +18 -0
- package/dist/types/app-message.d.ts +15 -0
- package/dist/types/app-message.js +2 -0
- package/dist/types/cashier_subscription.d.ts +27 -0
- package/dist/types/cashier_subscription.js +2 -0
- package/dist/types/collab-annotation.d.ts +8 -1
- package/dist/types/collab-comment.d.ts +1 -1
- package/dist/types/collab-integration.d.ts +2 -0
- package/dist/types/collab-push-subscription.d.ts +12 -0
- package/dist/types/collab-push-subscription.js +2 -0
- package/dist/types/compute.d.ts +12 -2
- package/dist/types/domain/index.d.ts +3 -1
- package/dist/types/domain/transfer.d.ts +27 -0
- package/dist/types/domain/transfer.js +2 -0
- package/dist/types/env.d.ts +0 -3
- package/dist/types/environment-variable.d.ts +12 -0
- package/dist/types/environment-variable.js +2 -0
- package/dist/types/framework.d.ts +1 -0
- package/dist/types/index.d.ts +12 -1
- package/dist/types/invoice.d.ts +15 -0
- package/dist/types/invoice.js +2 -0
- package/dist/types/member.d.ts +2 -0
- package/dist/types/ownership-transfer.d.ts +12 -0
- package/dist/types/ownership-transfer.js +2 -0
- package/dist/types/plan_configuration.d.ts +3 -0
- package/dist/types/project/index.d.ts +4 -2
- package/dist/types/project-environment.d.ts +13 -0
- package/dist/types/project-environment.js +2 -0
- package/dist/types/project-tag-assignment.d.ts +13 -0
- package/dist/types/project-tag-assignment.js +2 -0
- package/dist/types/project_analytics.d.ts +11 -0
- package/dist/types/project_analytics.js +2 -0
- package/dist/types/subscription.d.ts +2 -0
- package/dist/types/tag.d.ts +11 -0
- package/dist/types/tag.js +2 -0
- package/dist/types/team.d.ts +4 -0
- package/dist/types/user.d.ts +2 -0
- package/dist/types/wallet.d.ts +3 -0
- package/dist/user.js +2 -0
- package/dist/wallet.js +12 -0
- package/domain/index.ts +10 -0
- package/domain/transfer.ts +112 -0
- package/enum/index.ts +40 -5
- package/env.ts +0 -8
- package/environment-variable.ts +21 -0
- package/framework.ts +5 -0
- package/index.ts +34 -5
- package/invoice.ts +36 -0
- package/member.ts +1 -0
- package/ownership-transfer.ts +42 -0
- package/package.json +1 -1
- package/plan_configuration.ts +3 -0
- package/project/index.ts +14 -6
- package/project-environment.ts +18 -0
- package/project-tag-assignment.ts +40 -0
- package/project_analytics.ts +26 -0
- package/subscription.ts +8 -0
- package/tag.ts +34 -0
- package/team.ts +16 -0
- package/types/activity-log.ts +19 -0
- package/types/app-message.ts +16 -0
- package/types/cashier_subscription.ts +29 -0
- package/types/collab-annotation.ts +8 -1
- package/types/collab-comment.ts +1 -1
- package/types/collab-integration.ts +2 -0
- package/types/collab-push-subscription.ts +10 -0
- package/types/compute.ts +14 -2
- package/types/domain/index.ts +3 -1
- package/types/domain/transfer.ts +32 -0
- package/types/env.ts +0 -3
- package/types/environment-variable.ts +13 -0
- package/types/framework.ts +3 -2
- package/types/index.ts +12 -1
- package/types/invoice.ts +16 -0
- package/types/member.ts +2 -0
- package/types/ownership-transfer.ts +13 -0
- package/types/plan_configuration.ts +3 -0
- package/types/project/index.ts +4 -2
- package/types/project-environment.ts +14 -0
- package/types/project-tag-assignment.ts +14 -0
- package/types/project_analytics.ts +12 -0
- package/types/subscription.ts +2 -0
- package/types/tag.ts +12 -0
- package/types/team.ts +4 -0
- package/types/user.ts +2 -0
- package/types/wallet.ts +3 -0
- package/user.ts +2 -0
- package/wallet.ts +12 -0
- package/branch.ts +0 -22
- package/dist/branch.js +0 -17
- package/dist/types/branch.d.ts +0 -17
- package/types/branch.ts +0 -18
- /package/dist/types/{branch.js → activity-log.js} +0 -0
package/member.ts
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { IOwnershipTransfer } from "./types";
|
|
3
|
+
|
|
4
|
+
const ownershipTransferSchema: Schema = new Schema(
|
|
5
|
+
{
|
|
6
|
+
team: {
|
|
7
|
+
type: Schema.Types.ObjectId,
|
|
8
|
+
ref: "Team",
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
from_user: {
|
|
12
|
+
type: Schema.Types.ObjectId,
|
|
13
|
+
ref: "User",
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
to_user: {
|
|
17
|
+
type: Schema.Types.ObjectId,
|
|
18
|
+
ref: "User",
|
|
19
|
+
required: true,
|
|
20
|
+
},
|
|
21
|
+
status: {
|
|
22
|
+
type: String,
|
|
23
|
+
enum: ["pending", "accepted", "denied", "expired"],
|
|
24
|
+
default: "pending",
|
|
25
|
+
},
|
|
26
|
+
expires_at: {
|
|
27
|
+
type: Date,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
timestamps: {
|
|
33
|
+
createdAt: "created_at",
|
|
34
|
+
updatedAt: "updated_at",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export default model<IOwnershipTransfer>(
|
|
40
|
+
"OwnershipTransfer",
|
|
41
|
+
ownershipTransferSchema,
|
|
42
|
+
);
|
package/package.json
CHANGED
package/plan_configuration.ts
CHANGED
|
@@ -20,6 +20,8 @@ const PlanConfigurationSchema = new Schema<IPlanConfiguration>(
|
|
|
20
20
|
region: { type: Schema.Types.ObjectId, ref: "Region", required: false },
|
|
21
21
|
multi_region: { type: Boolean, default: false },
|
|
22
22
|
unlimited_projects: { type: Boolean, default: false },
|
|
23
|
+
ai_debug_enabled: { type: Boolean, default: false, required: false },
|
|
24
|
+
ai_debug_limit: { type: Number, default: 0, required: false },
|
|
23
25
|
plan_type: {
|
|
24
26
|
type: String,
|
|
25
27
|
enum: Object.values(SUBSCRIPTION_PLAN_TYPE),
|
|
@@ -36,6 +38,7 @@ const PlanConfigurationSchema = new Schema<IPlanConfiguration>(
|
|
|
36
38
|
custom_domain: { type: Boolean, required: true, default: false },
|
|
37
39
|
webhook_enabled: { type: Boolean, required: true, default: false },
|
|
38
40
|
can_deploy_all_applications: { type: Boolean, required: true, default: false },
|
|
41
|
+
stripe_prices: { type: Schema.Types.Mixed, required: false, default: {} },
|
|
39
42
|
},
|
|
40
43
|
{ timestamps: true },
|
|
41
44
|
);
|
package/project/index.ts
CHANGED
|
@@ -47,6 +47,11 @@ const projectSchema = new Schema(
|
|
|
47
47
|
ref: "Team",
|
|
48
48
|
type: Schema.Types.ObjectId,
|
|
49
49
|
},
|
|
50
|
+
watchPaths: {
|
|
51
|
+
type: Array,
|
|
52
|
+
required: false,
|
|
53
|
+
default: [],
|
|
54
|
+
},
|
|
50
55
|
server: {
|
|
51
56
|
ref: "Server",
|
|
52
57
|
type: Schema.Types.ObjectId,
|
|
@@ -131,12 +136,15 @@ const projectSchema = new Schema(
|
|
|
131
136
|
type: Schema.Types.ObjectId,
|
|
132
137
|
},
|
|
133
138
|
],
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
project_environment: {
|
|
140
|
+
ref: "ProjectEnvironment",
|
|
141
|
+
type: Schema.Types.ObjectId,
|
|
142
|
+
index: true,
|
|
143
|
+
},
|
|
144
|
+
inherit_environment_vars: {
|
|
145
|
+
type: Boolean,
|
|
146
|
+
default: true,
|
|
147
|
+
},
|
|
140
148
|
replicas: {
|
|
141
149
|
type: Number,
|
|
142
150
|
default: 3,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { IProjectEnvironment } from "./types";
|
|
3
|
+
|
|
4
|
+
const projectEnvironmentSchema = new Schema(
|
|
5
|
+
{
|
|
6
|
+
name: { type: String, required: true },
|
|
7
|
+
slug: { type: String, required: true },
|
|
8
|
+
owner: { ref: "User", type: Schema.Types.ObjectId, required: true },
|
|
9
|
+
team: { ref: "Team", type: Schema.Types.ObjectId },
|
|
10
|
+
inherit_from: { ref: "ProjectEnvironment", type: Schema.Types.ObjectId },
|
|
11
|
+
isDefault: { type: Boolean, default: false },
|
|
12
|
+
},
|
|
13
|
+
{ timestamps: true },
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
projectEnvironmentSchema.index({ slug: 1, owner: 1, team: 1 }, { unique: true });
|
|
17
|
+
|
|
18
|
+
export default model<IProjectEnvironment>("ProjectEnvironment", projectEnvironmentSchema);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { IProjectTagAssignment } from "./types";
|
|
3
|
+
|
|
4
|
+
const projectTagAssignmentSchema: Schema = new Schema(
|
|
5
|
+
{
|
|
6
|
+
tagId: {
|
|
7
|
+
type: Schema.Types.ObjectId,
|
|
8
|
+
ref: "Tag",
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
projectId: {
|
|
12
|
+
type: Schema.Types.ObjectId,
|
|
13
|
+
ref: "Project",
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
16
|
+
teamId: {
|
|
17
|
+
type: Schema.Types.ObjectId,
|
|
18
|
+
ref: "Team",
|
|
19
|
+
default: null,
|
|
20
|
+
},
|
|
21
|
+
assignedBy: {
|
|
22
|
+
type: Schema.Types.ObjectId,
|
|
23
|
+
ref: "User",
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
timestamps: true,
|
|
29
|
+
collection: "project_tag_assignments",
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
projectTagAssignmentSchema.index({ tagId: 1, projectId: 1 }, { unique: true });
|
|
34
|
+
projectTagAssignmentSchema.index({ projectId: 1 });
|
|
35
|
+
projectTagAssignmentSchema.index({ teamId: 1 });
|
|
36
|
+
|
|
37
|
+
export default model<IProjectTagAssignment>(
|
|
38
|
+
"ProjectTagAssignment",
|
|
39
|
+
projectTagAssignmentSchema,
|
|
40
|
+
);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Schema, model } from "mongoose";
|
|
2
|
+
import { IProjectAnalytics } from "./types/project_analytics";
|
|
3
|
+
|
|
4
|
+
const ProjectAnalyticsSchema = new Schema<IProjectAnalytics>(
|
|
5
|
+
{
|
|
6
|
+
project: {
|
|
7
|
+
type: Schema.Types.ObjectId,
|
|
8
|
+
ref: "Project",
|
|
9
|
+
required: true,
|
|
10
|
+
unique: true,
|
|
11
|
+
index: true,
|
|
12
|
+
},
|
|
13
|
+
provider: { type: String, enum: ["umami"], required: true, default: "umami" },
|
|
14
|
+
websiteId: { type: String, required: true, unique: true },
|
|
15
|
+
shareId: { type: String, default: null },
|
|
16
|
+
domain: { type: String, required: true },
|
|
17
|
+
enabled: { type: Boolean, default: true },
|
|
18
|
+
},
|
|
19
|
+
{ timestamps: true },
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export default model<IProjectAnalytics>(
|
|
23
|
+
"ProjectAnalytics",
|
|
24
|
+
ProjectAnalyticsSchema,
|
|
25
|
+
"project_analytics",
|
|
26
|
+
);
|
package/subscription.ts
CHANGED
|
@@ -8,6 +8,10 @@ const subscriptionSchema: Schema = new Schema(
|
|
|
8
8
|
type: String,
|
|
9
9
|
required: true,
|
|
10
10
|
},
|
|
11
|
+
due_amount: {
|
|
12
|
+
type: Number,
|
|
13
|
+
default: 0
|
|
14
|
+
},
|
|
11
15
|
team_id: {
|
|
12
16
|
type: Schema.Types.ObjectId,
|
|
13
17
|
ref: "Team",
|
|
@@ -50,6 +54,10 @@ const subscriptionSchema: Schema = new Schema(
|
|
|
50
54
|
expiry_date: String,
|
|
51
55
|
reminder_date: String,
|
|
52
56
|
transaction_retries: Number,
|
|
57
|
+
downgraded: {
|
|
58
|
+
default: false,
|
|
59
|
+
type: Boolean
|
|
60
|
+
},
|
|
53
61
|
is_pending_downgrade: {
|
|
54
62
|
type: Boolean,
|
|
55
63
|
default: false,
|
package/tag.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { ITag } from "./types";
|
|
3
|
+
|
|
4
|
+
const tagSchema: Schema = new Schema(
|
|
5
|
+
{
|
|
6
|
+
name: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
trim: true,
|
|
10
|
+
},
|
|
11
|
+
color: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
},
|
|
15
|
+
teamId: {
|
|
16
|
+
type: Schema.Types.ObjectId,
|
|
17
|
+
ref: "Team",
|
|
18
|
+
default: null,
|
|
19
|
+
},
|
|
20
|
+
createdBy: {
|
|
21
|
+
type: Schema.Types.ObjectId,
|
|
22
|
+
ref: "User",
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
timestamps: true,
|
|
28
|
+
collection: "tags",
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
tagSchema.index({ teamId: 1, name: 1 }, { unique: true });
|
|
33
|
+
|
|
34
|
+
export default model<ITag>("Tag", tagSchema);
|
package/team.ts
CHANGED
|
@@ -26,6 +26,18 @@ const teamSchema: Schema = new Schema(
|
|
|
26
26
|
image: {
|
|
27
27
|
type: String,
|
|
28
28
|
},
|
|
29
|
+
build_minutes: {
|
|
30
|
+
type: Number,
|
|
31
|
+
default: 0,
|
|
32
|
+
},
|
|
33
|
+
build_minutes_last_reset_at: {
|
|
34
|
+
type: Date,
|
|
35
|
+
default: null,
|
|
36
|
+
},
|
|
37
|
+
build_minutes_cycle_anchor: {
|
|
38
|
+
type: Date,
|
|
39
|
+
default: null,
|
|
40
|
+
},
|
|
29
41
|
build_disabled: {
|
|
30
42
|
type: Boolean,
|
|
31
43
|
default: false,
|
|
@@ -35,6 +47,10 @@ const teamSchema: Schema = new Schema(
|
|
|
35
47
|
required: false,
|
|
36
48
|
ref: "Subscription",
|
|
37
49
|
},
|
|
50
|
+
size: {
|
|
51
|
+
type: Number,
|
|
52
|
+
required: false,
|
|
53
|
+
},
|
|
38
54
|
},
|
|
39
55
|
{
|
|
40
56
|
timestamps: true,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { ITeam } from "./team";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
|
|
5
|
+
export interface IActivityLog extends Document {
|
|
6
|
+
user_id: IUser | Types.ObjectId;
|
|
7
|
+
team_id?: ITeam | Types.ObjectId;
|
|
8
|
+
action: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
context?: string;
|
|
11
|
+
metadata?: Record<string, any>;
|
|
12
|
+
ip_address?: string;
|
|
13
|
+
user_agent?: string;
|
|
14
|
+
status: "success" | "failure";
|
|
15
|
+
resource_type?: string;
|
|
16
|
+
resource_id?: Types.ObjectId;
|
|
17
|
+
created_at: Date;
|
|
18
|
+
updated_at: Date;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IUser } from "./user";
|
|
3
|
+
import { ITeam } from "./team";
|
|
4
|
+
|
|
5
|
+
export interface IAppMessage extends Document {
|
|
6
|
+
userId: IUser;
|
|
7
|
+
teamId: ITeam;
|
|
8
|
+
level: string;
|
|
9
|
+
message: string;
|
|
10
|
+
seen: boolean;
|
|
11
|
+
meta?: Record<string, any>;
|
|
12
|
+
route?: string;
|
|
13
|
+
type: string;
|
|
14
|
+
createdAt: Date;
|
|
15
|
+
updatedAt: Date;
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IUser } from "./user";
|
|
3
|
+
import { ITeam } from "./team";
|
|
4
|
+
|
|
5
|
+
export interface ICashierSubscription extends Document {
|
|
6
|
+
user_id: IUser;
|
|
7
|
+
team_id?: ITeam | null;
|
|
8
|
+
type: string;
|
|
9
|
+
stripe_id: string;
|
|
10
|
+
stripe_status: string;
|
|
11
|
+
stripe_price: string | null;
|
|
12
|
+
quantity: number | null;
|
|
13
|
+
trial_ends_at: Date | null;
|
|
14
|
+
ends_at: Date | null;
|
|
15
|
+
plan_type: string | null;
|
|
16
|
+
domain_id: string | null;
|
|
17
|
+
created_at: Date;
|
|
18
|
+
updated_at: Date;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ICashierSubscriptionItem extends Document {
|
|
22
|
+
subscription_id: string;
|
|
23
|
+
stripe_id: string;
|
|
24
|
+
stripe_product: string | null;
|
|
25
|
+
stripe_price: string;
|
|
26
|
+
quantity: number | null;
|
|
27
|
+
created_at: Date;
|
|
28
|
+
updated_at: Date;
|
|
29
|
+
}
|
|
@@ -5,7 +5,7 @@ import { IProject } from "./project";
|
|
|
5
5
|
|
|
6
6
|
export interface ICollabAnnotation extends Document {
|
|
7
7
|
projectId: IProject;
|
|
8
|
-
userId
|
|
8
|
+
userId?: IUser;
|
|
9
9
|
pageUrl: string;
|
|
10
10
|
pagePath: string;
|
|
11
11
|
xPercent: number;
|
|
@@ -16,6 +16,13 @@ export interface ICollabAnnotation extends Document {
|
|
|
16
16
|
status: COLLAB_ANNOTATION_STATUS;
|
|
17
17
|
resolvedAt?: Date;
|
|
18
18
|
resolvedBy?: IUser;
|
|
19
|
+
guestName?: string;
|
|
20
|
+
guestEmail?: string;
|
|
21
|
+
githubPrCommentId?: number;
|
|
22
|
+
githubPrCommentUrl?: string;
|
|
23
|
+
githubIssueUrl?: string;
|
|
24
|
+
githubIssueNumber?: number;
|
|
25
|
+
subscribedUserIds?: IUser[];
|
|
19
26
|
createdAt: Date;
|
|
20
27
|
updatedAt: Date;
|
|
21
28
|
}
|
package/types/collab-comment.ts
CHANGED
|
@@ -12,7 +12,7 @@ export interface ICollabAttachment {
|
|
|
12
12
|
export interface ICollabComment extends Document {
|
|
13
13
|
annotationId: ICollabAnnotation;
|
|
14
14
|
userId?: IUser;
|
|
15
|
-
body
|
|
15
|
+
body?: string;
|
|
16
16
|
screenshot?: string;
|
|
17
17
|
attachments?: ICollabAttachment[];
|
|
18
18
|
guestName?: string;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { COLLAB_INTEGRATION_TYPE } from "../enum";
|
|
3
3
|
import { IProject } from "./project";
|
|
4
|
+
import { IUser } from "./user";
|
|
4
5
|
|
|
5
6
|
export interface ICollabIntegration extends Document {
|
|
6
7
|
projectId: IProject;
|
|
8
|
+
userId: IUser;
|
|
7
9
|
type: COLLAB_INTEGRATION_TYPE;
|
|
8
10
|
webhookUrl: string;
|
|
9
11
|
channelName?: string;
|
package/types/compute.ts
CHANGED
|
@@ -1,28 +1,40 @@
|
|
|
1
|
+
import { ServiceType } from "../enum";
|
|
1
2
|
import { IProject } from "./project";
|
|
2
|
-
import {
|
|
3
|
+
import { IRegion } from "./region";
|
|
4
|
+
|
|
3
5
|
import { ITeam } from "./team";
|
|
4
6
|
import { IUser } from "./user";
|
|
5
7
|
|
|
6
8
|
export interface IComputeChange {
|
|
7
9
|
_id?: string;
|
|
8
10
|
project_name: string;
|
|
11
|
+
project_type?: ServiceType;
|
|
9
12
|
deleted: boolean;
|
|
10
13
|
project_id: IProject;
|
|
11
14
|
user_id: IUser;
|
|
12
15
|
team_id?: ITeam;
|
|
13
|
-
|
|
16
|
+
|
|
14
17
|
timestamp: Date;
|
|
15
18
|
previous: {
|
|
16
19
|
cpu: number;
|
|
17
20
|
memory: number;
|
|
18
21
|
storage: number;
|
|
19
22
|
persistentStorage: number;
|
|
23
|
+
region?: IRegion;
|
|
20
24
|
};
|
|
21
25
|
current: {
|
|
22
26
|
cpu: number;
|
|
23
27
|
memory: number;
|
|
24
28
|
storage: number;
|
|
25
29
|
persistentStorage: number;
|
|
30
|
+
region?: IRegion;
|
|
31
|
+
};
|
|
32
|
+
default_resources?: {
|
|
33
|
+
cpu: number;
|
|
34
|
+
memory: number;
|
|
35
|
+
storage: number;
|
|
36
|
+
persistentStorage: number;
|
|
37
|
+
region?: IRegion;
|
|
26
38
|
};
|
|
27
39
|
costs: {
|
|
28
40
|
startDate: Date;
|
package/types/domain/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
|
-
import { IPreview, IProject, ISubscription, ITeam, IUser } from "../";
|
|
2
|
+
import { IPreview, IProject, IProjectEnvironment, ISubscription, ITeam, IUser } from "../";
|
|
3
3
|
import { IDns } from "./dns";
|
|
4
4
|
|
|
5
5
|
export interface IDomain extends Document {
|
|
@@ -11,6 +11,7 @@ export interface IDomain extends Document {
|
|
|
11
11
|
preview: IPreview;
|
|
12
12
|
provider: string;
|
|
13
13
|
subscription: ISubscription;
|
|
14
|
+
cashier_subscription_id: string | null;
|
|
14
15
|
auto_renewal: boolean;
|
|
15
16
|
renewal_duration: number;
|
|
16
17
|
is_discounted: boolean;
|
|
@@ -23,6 +24,7 @@ export interface IDomain extends Document {
|
|
|
23
24
|
trigger_created_at: string;
|
|
24
25
|
nameservers: string[];
|
|
25
26
|
dns: IDns[];
|
|
27
|
+
project_environment?: IProjectEnvironment;
|
|
26
28
|
is_pending_verification: boolean;
|
|
27
29
|
redirect?: {
|
|
28
30
|
url: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IDomain, IProject, ITeam, IUser } from "../";
|
|
3
|
+
import {
|
|
4
|
+
DomainTransferDirection,
|
|
5
|
+
DomainTransferProvider,
|
|
6
|
+
DomainTransferStatus,
|
|
7
|
+
} from "../../enum";
|
|
8
|
+
|
|
9
|
+
export interface IDomainTransfer extends Document {
|
|
10
|
+
domain_id: IDomain;
|
|
11
|
+
domain_name: string;
|
|
12
|
+
user_id: IUser;
|
|
13
|
+
team_id?: ITeam;
|
|
14
|
+
provider: DomainTransferProvider;
|
|
15
|
+
direction: DomainTransferDirection;
|
|
16
|
+
status: DomainTransferStatus;
|
|
17
|
+
provider_transfer_id?: string;
|
|
18
|
+
payment_reference?: string;
|
|
19
|
+
payment_token?: string;
|
|
20
|
+
payment_amount?: number;
|
|
21
|
+
renewal_price?: number;
|
|
22
|
+
auto_renewal?: boolean;
|
|
23
|
+
privacy_enabled?: boolean;
|
|
24
|
+
renewal_duration?: number;
|
|
25
|
+
project_id?: IProject;
|
|
26
|
+
last_polled_at?: Date;
|
|
27
|
+
poll_count: number;
|
|
28
|
+
last_provider_status?: string;
|
|
29
|
+
failure_reason?: string;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
}
|
package/types/env.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { ENVIRONMENT } from "../enum";
|
|
3
|
-
import { IBranch } from "./branch";
|
|
4
3
|
import { IProject, IUser } from "./";
|
|
5
4
|
|
|
6
5
|
export interface IEnv extends Document {
|
|
@@ -9,8 +8,6 @@ export interface IEnv extends Document {
|
|
|
9
8
|
project: IProject;
|
|
10
9
|
user: IUser;
|
|
11
10
|
environment: ENVIRONMENT | string;
|
|
12
|
-
branch?: IBranch;
|
|
13
|
-
inheritable?: boolean;
|
|
14
11
|
is_system?: boolean;
|
|
15
12
|
createdAt: Date;
|
|
16
13
|
updatedAt: Date;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IProjectEnvironment } from "./project-environment";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
|
|
5
|
+
export interface IEnvironmentVariable extends Document {
|
|
6
|
+
name: string;
|
|
7
|
+
value: string;
|
|
8
|
+
project_environment: IProjectEnvironment;
|
|
9
|
+
user: IUser;
|
|
10
|
+
inheritable: boolean;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt: Date;
|
|
13
|
+
}
|
package/types/framework.ts
CHANGED
|
@@ -7,9 +7,10 @@ export interface IFramework extends Document {
|
|
|
7
7
|
demo?: string;
|
|
8
8
|
logo: string;
|
|
9
9
|
tagline?: string;
|
|
10
|
-
supported: boolean;
|
|
10
|
+
supported: boolean;
|
|
11
11
|
description?: string;
|
|
12
12
|
website: string;
|
|
13
|
+
port: number;
|
|
13
14
|
envPrefix?: string;
|
|
14
15
|
detector: string;
|
|
15
16
|
file_detectors: string[];
|
|
@@ -37,4 +38,4 @@ export type BrimbleFrameworkType = {
|
|
|
37
38
|
envPrefix: string;
|
|
38
39
|
supported: boolean;
|
|
39
40
|
type: string;
|
|
40
|
-
};
|
|
41
|
+
};
|
package/types/index.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export type { IAutoScalingGroup } from "./auto-scaling-group";
|
|
2
|
-
export type { IBranch } from "./branch";
|
|
3
2
|
export type { ICard } from "./card";
|
|
4
3
|
export type { IComputeChange } from "./compute";
|
|
5
4
|
export type { IDbImage } from "./db-image";
|
|
6
5
|
export type { IDomain } from "./domain";
|
|
7
6
|
export type { IDns } from "./domain/dns";
|
|
8
7
|
export type { IDomainRenewal } from "./domain/renewal";
|
|
8
|
+
export type { IDomainTransfer } from "./domain/transfer";
|
|
9
9
|
export type { IEnv } from "./env";
|
|
10
10
|
export type { IFollowing } from "./following";
|
|
11
11
|
export type { BrimbleFrameworkType, IFramework } from "./framework";
|
|
@@ -23,6 +23,7 @@ export type { IPermission } from "./permission";
|
|
|
23
23
|
export type { IPlanConfiguration } from "./plan_configuration";
|
|
24
24
|
export type { IProvider } from "./provider";
|
|
25
25
|
export type { IProject } from "./project";
|
|
26
|
+
export type { IProjectAnalytics } from "./project_analytics";
|
|
26
27
|
export type { IProjectConnection } from "./project/connection";
|
|
27
28
|
export type { IPreview } from "./project/preview";
|
|
28
29
|
export type { IRegion } from "./region";
|
|
@@ -43,3 +44,13 @@ export type { ICollabComment, ICollabAttachment } from "./collab-comment";
|
|
|
43
44
|
export type { ICollabIntegration } from "./collab-integration";
|
|
44
45
|
export type { ICollabSettings } from "./collab-settings";
|
|
45
46
|
export type { ICollabShareToken } from "./collab-share-token";
|
|
47
|
+
export type { ICollabPushSubscription } from "./collab-push-subscription";
|
|
48
|
+
export type { IAppMessage } from "./app-message";
|
|
49
|
+
export type { IInvoice } from "./invoice";
|
|
50
|
+
export type { IProjectTagAssignment } from "./project-tag-assignment";
|
|
51
|
+
export type { ITag } from "./tag";
|
|
52
|
+
export type { ICashierSubscription, ICashierSubscriptionItem } from "./cashier_subscription";
|
|
53
|
+
export type { IProjectEnvironment } from "./project-environment";
|
|
54
|
+
export type { IEnvironmentVariable } from "./environment-variable";
|
|
55
|
+
export type { IActivityLog } from "./activity-log";
|
|
56
|
+
export type { IOwnershipTransfer } from "./ownership-transfer";
|
package/types/invoice.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { INVOICE_STATUS, INVOICE_PAYMENT_STATUS, INVOICE_TYPE } from "../enum";
|
|
3
|
+
|
|
4
|
+
export interface IInvoice extends Document {
|
|
5
|
+
ref: string;
|
|
6
|
+
user_id: string;
|
|
7
|
+
subscription_id: string;
|
|
8
|
+
total_amount: number;
|
|
9
|
+
due: boolean;
|
|
10
|
+
type: INVOICE_TYPE;
|
|
11
|
+
status: INVOICE_STATUS;
|
|
12
|
+
payment_status: INVOICE_PAYMENT_STATUS;
|
|
13
|
+
billing_period: string;
|
|
14
|
+
created_at: Date;
|
|
15
|
+
updated_at: Date;
|
|
16
|
+
}
|
package/types/member.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Document } from "mongoose";
|
|
|
2
2
|
import { ROLES } from "../enum";
|
|
3
3
|
import { ITeam, IUser } from "./";
|
|
4
4
|
import { IMemberPermission } from "./member-permission";
|
|
5
|
+
import { IProjectEnvironment } from "./project-environment";
|
|
5
6
|
|
|
6
7
|
export interface IMember extends Document {
|
|
7
8
|
user: IUser;
|
|
@@ -12,6 +13,7 @@ export interface IMember extends Document {
|
|
|
12
13
|
email: string;
|
|
13
14
|
featureOnboarded: boolean;
|
|
14
15
|
permissions: IMemberPermission[];
|
|
16
|
+
project_environments: IProjectEnvironment[];
|
|
15
17
|
createdAt: Date;
|
|
16
18
|
updatedAt: Date;
|
|
17
19
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { ITeam } from "./team";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
|
|
5
|
+
export interface IOwnershipTransfer extends Document {
|
|
6
|
+
team: ITeam;
|
|
7
|
+
from_user: IUser;
|
|
8
|
+
to_user: IUser;
|
|
9
|
+
status: "pending" | "accepted" | "denied" | "expired";
|
|
10
|
+
expires_at: Date;
|
|
11
|
+
created_at: Date;
|
|
12
|
+
updated_at: Date;
|
|
13
|
+
}
|
|
@@ -16,6 +16,8 @@ export interface IPlanConfiguration extends Document {
|
|
|
16
16
|
build_minutes: number;
|
|
17
17
|
log_retention: number;
|
|
18
18
|
multi_region: boolean;
|
|
19
|
+
ai_debug_enabled: boolean;
|
|
20
|
+
ai_debug_limit: number;
|
|
19
21
|
bandwidth: number;
|
|
20
22
|
pull_request_preview: boolean;
|
|
21
23
|
plan_type: SUBSCRIPTION_PLAN_TYPE;
|
|
@@ -31,4 +33,5 @@ export interface IPlanConfiguration extends Document {
|
|
|
31
33
|
unlimited_projects: boolean;
|
|
32
34
|
webhook_enabled: boolean;
|
|
33
35
|
can_deploy_all_applications: boolean;
|
|
36
|
+
stripe_prices?: Record<string, string>;
|
|
34
37
|
}
|