@brimble/models 3.8.77 → 3.8.79
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/activity-log.d.ts +6 -27
- package/dist/alert-event.d.ts +9 -0
- package/dist/alert-event.js +78 -0
- package/dist/alert-rule-state.d.ts +9 -0
- package/dist/alert-rule-state.js +49 -0
- package/dist/alert-rule.d.ts +9 -0
- package/dist/alert-rule.js +77 -0
- package/dist/app-message.d.ts +6 -27
- package/dist/app-message.js +2 -2
- package/dist/auto-scaling.d.ts +6 -27
- package/dist/card.d.ts +6 -27
- package/dist/cashier_subscription.d.ts +6 -27
- package/dist/cashier_subscription_item.d.ts +6 -27
- package/dist/collab-annotation.d.ts +6 -27
- package/dist/collab-comment.d.ts +6 -27
- package/dist/collab-integration.d.ts +6 -27
- package/dist/collab-push-subscription.d.ts +6 -27
- package/dist/collab-settings.d.ts +6 -27
- package/dist/collab-share-token.d.ts +6 -27
- package/dist/compute.d.ts +6 -27
- package/dist/compute.js +6 -0
- package/dist/db-image.d.ts +6 -27
- package/dist/db-image.js +19 -0
- package/dist/domain/dns-changelog.d.ts +9 -0
- package/dist/domain/dns-changelog.js +82 -0
- package/dist/domain/dns.d.ts +6 -27
- package/dist/domain/index.d.ts +6 -27
- package/dist/domain/index.js +4 -0
- package/dist/domain/renewal.d.ts +6 -27
- package/dist/domain/transfer.d.ts +6 -27
- package/dist/enum/index.d.ts +184 -0
- package/dist/enum/index.js +273 -37
- package/dist/env.d.ts +6 -27
- package/dist/environment-variable.d.ts +6 -27
- package/dist/environment-variable.js +8 -0
- package/dist/follower.d.ts +6 -27
- package/dist/following.d.ts +6 -27
- package/dist/framework.d.ts +6 -27
- package/dist/idempotency.d.ts +9 -0
- package/dist/idempotency.js +17 -0
- package/dist/index.d.ts +25 -2
- package/dist/index.js +92 -3
- package/dist/integration.d.ts +6 -27
- package/dist/intention.d.ts +6 -27
- package/dist/invoice.d.ts +6 -27
- package/dist/job.d.ts +6 -2
- package/dist/job.js +17 -7
- package/dist/license.d.ts +6 -27
- package/dist/load-balancer-port.d.ts +6 -27
- package/dist/logs.d.ts +6 -27
- package/dist/logs.js +0 -2
- package/dist/member-permission.d.ts +6 -27
- package/dist/member.d.ts +6 -27
- package/dist/object-storage-usage-segment.d.ts +9 -0
- package/dist/object-storage-usage-segment.js +46 -0
- package/dist/ownership-transfer.d.ts +6 -27
- package/dist/permission.d.ts +6 -27
- package/dist/plan_configuration.d.ts +6 -2
- package/dist/plan_configuration.js +22 -0
- package/dist/project/connection.d.ts +6 -27
- package/dist/project/index.d.ts +12 -29
- package/dist/project/index.js +29 -0
- package/dist/project/preview.d.ts +6 -27
- package/dist/project-environment.d.ts +6 -27
- package/dist/project-network-settings.d.ts +9 -0
- package/dist/project-network-settings.js +34 -0
- package/dist/project-tag-assignment.d.ts +6 -27
- package/dist/project_analytics.d.ts +6 -27
- package/dist/provider.d.ts +6 -27
- package/dist/provider.js +1 -0
- package/dist/quest-campaign.d.ts +9 -0
- package/dist/quest-campaign.js +39 -0
- package/dist/quest-participation.d.ts +9 -0
- package/dist/quest-participation.js +21 -0
- package/dist/quest-reward-issuance.d.ts +9 -0
- package/dist/quest-reward-issuance.js +19 -0
- package/dist/ratelimit.d.ts +9 -0
- package/dist/ratelimit.js +36 -0
- package/dist/region.d.ts +7 -28
- package/dist/role.d.ts +6 -27
- package/dist/sandbox-activity.d.ts +9 -0
- package/dist/sandbox-activity.js +49 -0
- package/dist/sandbox-image.d.ts +9 -0
- package/dist/sandbox-image.js +31 -0
- package/dist/sandbox-snapshot-usage-segment.d.ts +9 -0
- package/dist/sandbox-snapshot-usage-segment.js +49 -0
- package/dist/sandbox-snapshot.d.ts +9 -0
- package/dist/sandbox-snapshot.js +51 -0
- package/dist/sandbox-usage-segment.d.ts +9 -0
- package/dist/sandbox-usage-segment.js +57 -0
- package/dist/sandbox.d.ts +9 -0
- package/dist/sandbox.js +142 -0
- package/dist/server.d.ts +6 -27
- package/dist/settings.d.ts +6 -27
- package/dist/storage.d.ts +43 -0
- package/dist/storage.js +118 -0
- package/dist/streak-day.d.ts +9 -0
- package/dist/streak-day.js +11 -0
- package/dist/streak-event.d.ts +9 -0
- package/dist/streak-event.js +18 -0
- package/dist/streak-milestone.d.ts +9 -0
- package/dist/streak-milestone.js +11 -0
- package/dist/streak.d.ts +9 -0
- package/dist/streak.js +17 -0
- package/dist/subscription.d.ts +6 -27
- package/dist/tag.d.ts +6 -27
- package/dist/team.d.ts +6 -27
- package/dist/team.js +26 -0
- package/dist/token.d.ts +6 -27
- package/dist/types/alert-event.d.ts +23 -0
- package/dist/types/alert-event.js +2 -0
- package/dist/types/alert-rule-state.d.ts +13 -0
- package/dist/types/alert-rule-state.js +2 -0
- package/dist/types/alert-rule.d.ts +21 -0
- package/dist/types/alert-rule.js +2 -0
- package/dist/types/app-message.d.ts +2 -2
- package/dist/types/auto-scaling-group.d.ts +1 -1
- package/dist/types/compute.d.ts +3 -1
- package/dist/types/db-image.d.ts +5 -1
- package/dist/types/domain/dns-changelog.d.ts +20 -0
- package/dist/types/domain/dns-changelog.js +2 -0
- package/dist/types/domain/index.d.ts +1 -0
- package/dist/types/environment-variable.d.ts +2 -0
- package/dist/types/idempotency.d.ts +10 -0
- package/dist/types/idempotency.js +2 -0
- package/dist/types/index.d.ts +23 -0
- package/dist/types/object-storage-usage-segment.d.ts +23 -0
- package/dist/types/object-storage-usage-segment.js +2 -0
- package/dist/types/plan_configuration.d.ts +22 -0
- package/dist/types/project/index.d.ts +7 -0
- package/dist/types/project-network-settings.d.ts +28 -0
- package/dist/types/project-network-settings.js +2 -0
- package/dist/types/provider.d.ts +1 -0
- package/dist/types/quest-campaign.d.ts +38 -0
- package/dist/types/quest-campaign.js +2 -0
- package/dist/types/quest-participation.d.ts +19 -0
- package/dist/types/quest-participation.js +2 -0
- package/dist/types/quest-reward-issuance.d.ts +17 -0
- package/dist/types/quest-reward-issuance.js +2 -0
- package/dist/types/ratelimit.d.ts +41 -0
- package/dist/types/ratelimit.js +2 -0
- package/dist/types/region.d.ts +2 -2
- package/dist/types/sandbox-activity.d.ts +14 -0
- package/dist/types/sandbox-activity.js +2 -0
- package/dist/types/sandbox-image.d.ts +9 -0
- package/dist/types/sandbox-image.js +2 -0
- package/dist/types/sandbox-snapshot-usage-segment.d.ts +16 -0
- package/dist/types/sandbox-snapshot-usage-segment.js +2 -0
- package/dist/types/sandbox-snapshot.d.ts +16 -0
- package/dist/types/sandbox-snapshot.js +2 -0
- package/dist/types/sandbox-usage-segment.d.ts +25 -0
- package/dist/types/sandbox-usage-segment.js +2 -0
- package/dist/types/sandbox.d.ts +46 -0
- package/dist/types/sandbox.js +2 -0
- package/dist/types/storage.d.ts +131 -0
- package/dist/types/storage.js +2 -0
- package/dist/types/streak-day.d.ts +9 -0
- package/dist/types/streak-day.js +2 -0
- package/dist/types/streak-event.d.ts +13 -0
- package/dist/types/streak-event.js +2 -0
- package/dist/types/streak-milestone.d.ts +10 -0
- package/dist/types/streak-milestone.js +2 -0
- package/dist/types/streak.d.ts +17 -0
- package/dist/types/streak.js +2 -0
- package/dist/types/team.d.ts +8 -2
- package/dist/types/user.d.ts +4 -0
- package/dist/types/volume-usage-segment.d.ts +16 -0
- package/dist/types/volume-usage-segment.js +2 -0
- package/dist/types/volume.d.ts +9 -3
- package/dist/types/wallet.d.ts +1 -0
- package/dist/user.d.ts +6 -27
- package/dist/user.js +14 -0
- package/dist/volume-usage-segment.d.ts +9 -0
- package/dist/volume-usage-segment.js +46 -0
- package/dist/volume.d.ts +6 -27
- package/dist/volume.js +21 -4
- package/dist/wallet.d.ts +6 -27
- package/dist/wallet.js +4 -0
- package/dist/webhook-category.d.ts +6 -27
- package/dist/webhook-event.d.ts +6 -27
- package/dist/webhook-setting.d.ts +6 -27
- package/package.json +9 -5
- package/.claude/settings.local.json +0 -7
- package/.eslintrc.js +0 -26
- package/.prettierrc +0 -4
- package/activity-log.ts +0 -66
- package/app-message.ts +0 -18
- package/auto-scaling.ts +0 -72
- package/card.ts +0 -45
- package/cashier_subscription.ts +0 -35
- package/cashier_subscription_item.ts +0 -25
- package/collab-annotation.ts +0 -36
- package/collab-comment.ts +0 -27
- package/collab-integration.ts +0 -21
- package/collab-push-subscription.ts +0 -19
- package/collab-settings.ts +0 -29
- package/collab-share-token.ts +0 -15
- package/compute.ts +0 -88
- package/db-image.ts +0 -66
- package/domain/dns.ts +0 -34
- package/domain/index.ts +0 -109
- package/domain/renewal.ts +0 -25
- package/domain/transfer.ts +0 -112
- package/enum/index.ts +0 -257
- package/env.ts +0 -38
- package/environment-variable.ts +0 -21
- package/follower.ts +0 -19
- package/following.ts +0 -19
- package/framework.ts +0 -88
- package/index.ts +0 -199
- package/integration.ts +0 -39
- package/intention.ts +0 -40
- package/invoice.ts +0 -36
- package/job.ts +0 -30
- package/load-balancer-port.ts +0 -31
- package/logs.ts +0 -47
- package/member-permission.ts +0 -13
- package/member.ts +0 -44
- package/ownership-transfer.ts +0 -42
- package/permission.ts +0 -13
- package/plan_configuration.ts +0 -48
- package/project/connection.ts +0 -21
- package/project/index.ts +0 -238
- package/project/preview.ts +0 -41
- package/project-environment.ts +0 -18
- package/project-tag-assignment.ts +0 -40
- package/project_analytics.ts +0 -26
- package/provider.ts +0 -11
- package/region.ts +0 -18
- package/role.ts +0 -12
- package/server.ts +0 -105
- package/settings.ts +0 -53
- package/subscription.ts +0 -86
- package/tag.ts +0 -34
- package/team.ts +0 -60
- package/token.ts +0 -40
- package/tsconfig.json +0 -14
- package/types/activity-log.ts +0 -19
- package/types/app-message.ts +0 -16
- package/types/auto-scaling-group.ts +0 -21
- package/types/card.ts +0 -20
- package/types/cashier_subscription.ts +0 -29
- package/types/collab-annotation.ts +0 -28
- package/types/collab-comment.ts +0 -22
- package/types/collab-integration.ts +0 -14
- package/types/collab-push-subscription.ts +0 -10
- package/types/collab-settings.ts +0 -17
- package/types/collab-share-token.ts +0 -13
- package/types/compute.ts +0 -51
- package/types/db-image.ts +0 -18
- package/types/domain/dns.ts +0 -13
- package/types/domain/index.ts +0 -35
- package/types/domain/renewal.ts +0 -11
- package/types/domain/transfer.ts +0 -32
- package/types/env.ts +0 -14
- package/types/environment-variable.ts +0 -13
- package/types/following.ts +0 -6
- package/types/framework.ts +0 -41
- package/types/git.ts +0 -15
- package/types/index.ts +0 -56
- package/types/installed_integration.ts +0 -9
- package/types/integration.ts +0 -24
- package/types/intention.ts +0 -14
- package/types/invoice.ts +0 -16
- package/types/job.ts +0 -20
- package/types/license.ts +0 -19
- package/types/load-balancer-port.ts +0 -13
- package/types/logs.ts +0 -36
- package/types/member-permission.ts +0 -11
- package/types/member.ts +0 -19
- package/types/ownership-transfer.ts +0 -13
- package/types/permission.ts +0 -19
- package/types/plan_configuration.ts +0 -35
- package/types/project/connection.ts +0 -7
- package/types/project/index.ts +0 -96
- package/types/project/preview.ts +0 -22
- package/types/project-environment.ts +0 -14
- package/types/project-tag-assignment.ts +0 -14
- package/types/project_analytics.ts +0 -12
- package/types/provider.ts +0 -8
- package/types/region.ts +0 -16
- package/types/role.ts +0 -13
- package/types/server.ts +0 -59
- package/types/settings.ts +0 -19
- package/types/subscription.ts +0 -34
- package/types/tag.ts +0 -12
- package/types/team.ts +0 -19
- package/types/token.ts +0 -12
- package/types/user.ts +0 -41
- package/types/volume.ts +0 -15
- package/types/wallet.ts +0 -8
- package/types/webhook-category.ts +0 -5
- package/types/webhook-event.ts +0 -8
- package/types/webhook-setting.ts +0 -17
- package/user.ts +0 -61
- package/volume.ts +0 -36
- package/wallet.ts +0 -23
- package/webhook-category.ts +0 -11
- package/webhook-event.ts +0 -20
- package/webhook-setting.ts +0 -48
package/env.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { ENVIRONMENT } from "./enum";
|
|
3
|
-
import { IEnv } from "./types";
|
|
4
|
-
|
|
5
|
-
const envSchema = new Schema(
|
|
6
|
-
{
|
|
7
|
-
project: {
|
|
8
|
-
ref: "Project",
|
|
9
|
-
type: Schema.Types.ObjectId,
|
|
10
|
-
},
|
|
11
|
-
name: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
value: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: false,
|
|
18
|
-
},
|
|
19
|
-
user: {
|
|
20
|
-
type: Schema.Types.ObjectId,
|
|
21
|
-
ref: "User",
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
environment: {
|
|
25
|
-
type: String,
|
|
26
|
-
default: ENVIRONMENT.PRODUCTION,
|
|
27
|
-
required: true,
|
|
28
|
-
},
|
|
29
|
-
is_system: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: false,
|
|
32
|
-
required: false,
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{ timestamps: true },
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export default model<IEnv>("Env", envSchema);
|
package/environment-variable.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { IEnvironmentVariable } from "./types";
|
|
3
|
-
|
|
4
|
-
const environmentVariableSchema = new Schema(
|
|
5
|
-
{
|
|
6
|
-
name: { type: String, required: true },
|
|
7
|
-
value: { type: String, required: true },
|
|
8
|
-
project_environment: {
|
|
9
|
-
ref: "ProjectEnvironment",
|
|
10
|
-
type: Schema.Types.ObjectId,
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
user: { ref: "User", type: Schema.Types.ObjectId, required: true },
|
|
14
|
-
inheritable: { type: Boolean, default: true },
|
|
15
|
-
},
|
|
16
|
-
{ timestamps: true },
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
environmentVariableSchema.index({ name: 1, project_environment: 1 }, { unique: true });
|
|
20
|
-
|
|
21
|
-
export default model<IEnvironmentVariable>("EnvironmentVariable", environmentVariableSchema);
|
package/follower.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { IFollowing } from "./types";
|
|
3
|
-
|
|
4
|
-
const followingSchema: Schema = new Schema(
|
|
5
|
-
{
|
|
6
|
-
user_id: {
|
|
7
|
-
type: Schema.Types.ObjectId,
|
|
8
|
-
ref: "User",
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
followed_id: {
|
|
12
|
-
type: Schema.Types.ObjectId,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
{ timestamps: true },
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
export default model<IFollowing>("Following", followingSchema);
|
package/following.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { IFollowing } from "./types";
|
|
3
|
-
|
|
4
|
-
const followingSchema: Schema = new Schema(
|
|
5
|
-
{
|
|
6
|
-
user_id: {
|
|
7
|
-
type: Schema.Types.ObjectId,
|
|
8
|
-
ref: "User",
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
followed_id: {
|
|
12
|
-
type: Schema.Types.ObjectId,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
{ timestamps: true },
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
export default model<IFollowing>("Following", followingSchema);
|
package/framework.ts
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { IFramework } from "./types";
|
|
3
|
-
import { FrameworkApplicationType } from "./enum";
|
|
4
|
-
|
|
5
|
-
const frameworkSchema: Schema = new Schema(
|
|
6
|
-
{
|
|
7
|
-
name: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
slug: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
demo: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: false,
|
|
18
|
-
},
|
|
19
|
-
logo: {
|
|
20
|
-
type: String,
|
|
21
|
-
required: true,
|
|
22
|
-
},
|
|
23
|
-
supported: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
required: false,
|
|
26
|
-
default: true
|
|
27
|
-
},
|
|
28
|
-
port: {
|
|
29
|
-
type: Number,
|
|
30
|
-
required: false,
|
|
31
|
-
default: 8000
|
|
32
|
-
},
|
|
33
|
-
tagline: {
|
|
34
|
-
type: String,
|
|
35
|
-
required: false,
|
|
36
|
-
},
|
|
37
|
-
description: {
|
|
38
|
-
type: String,
|
|
39
|
-
required: false,
|
|
40
|
-
},
|
|
41
|
-
website: {
|
|
42
|
-
type: String,
|
|
43
|
-
required: true,
|
|
44
|
-
},
|
|
45
|
-
envPrefix: {
|
|
46
|
-
type: String,
|
|
47
|
-
required: false,
|
|
48
|
-
},
|
|
49
|
-
detector: {
|
|
50
|
-
type: String,
|
|
51
|
-
required: true,
|
|
52
|
-
},
|
|
53
|
-
file_detectors: {
|
|
54
|
-
type: Array,
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
type: {
|
|
58
|
-
type: String,
|
|
59
|
-
enum: Object.values(FrameworkApplicationType),
|
|
60
|
-
required: true,
|
|
61
|
-
},
|
|
62
|
-
settings: {
|
|
63
|
-
installCommand: {
|
|
64
|
-
type: String,
|
|
65
|
-
required: false,
|
|
66
|
-
},
|
|
67
|
-
buildCommand: {
|
|
68
|
-
type: String,
|
|
69
|
-
required: true,
|
|
70
|
-
},
|
|
71
|
-
outputDirectory: {
|
|
72
|
-
type: String,
|
|
73
|
-
required: true,
|
|
74
|
-
},
|
|
75
|
-
manager: {
|
|
76
|
-
type: String,
|
|
77
|
-
required: false,
|
|
78
|
-
},
|
|
79
|
-
startCommand: {
|
|
80
|
-
type: String,
|
|
81
|
-
required: false,
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
{ timestamps: true },
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
export default model<IFramework>("Framework", frameworkSchema, "frameworks");
|
package/index.ts
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
export { default as User } from "./user";
|
|
2
|
-
export { default as Project, DeletedProject } from "./project";
|
|
3
|
-
export { default as ProjectAnalytics } from "./project_analytics";
|
|
4
|
-
export { default as Preview } from "./project/preview";
|
|
5
|
-
export { default as ProjectConnection } from "./project/connection";
|
|
6
|
-
export { default as Following } from "./following";
|
|
7
|
-
export { default as Integration } from "./integration";
|
|
8
|
-
export { default as Domain } from "./domain";
|
|
9
|
-
export { default as Dns } from "./domain/dns";
|
|
10
|
-
export { default as Env } from "./env";
|
|
11
|
-
export { default as Token } from "./token";
|
|
12
|
-
export { default as Team } from "./team";
|
|
13
|
-
export { default as Member } from "./member";
|
|
14
|
-
export { default as Permission } from "./permission";
|
|
15
|
-
export { default as MemberPermission } from "./member-permission";
|
|
16
|
-
export { default as Role } from "./role";
|
|
17
|
-
export { default as Log } from "./logs";
|
|
18
|
-
export { default as Subscription } from "./subscription";
|
|
19
|
-
export { default as Card } from "./card";
|
|
20
|
-
export { default as Server } from "./server";
|
|
21
|
-
export { default as Wallet } from "./wallet";
|
|
22
|
-
export { default as DbImage } from "./db-image";
|
|
23
|
-
export { default as Job } from "./job";
|
|
24
|
-
export { default as Liscense } from "./license";
|
|
25
|
-
export { default as PlanConfiguration } from "./plan_configuration";
|
|
26
|
-
export { default as AutoScalingGroup } from "./auto-scaling";
|
|
27
|
-
export { default as ComputeChange } from "./compute";
|
|
28
|
-
export { default as Region } from "./region";
|
|
29
|
-
export { default as Volume } from "./volume";
|
|
30
|
-
export { default as Framework } from "./framework";
|
|
31
|
-
export { default as Settings } from "./settings";
|
|
32
|
-
export { default as LoadBalancerPort } from "./load-balancer-port";
|
|
33
|
-
export { default as DomainRenewal } from "./domain/renewal";
|
|
34
|
-
export { default as DomainTransfer } from "./domain/transfer";
|
|
35
|
-
export { default as WebhookCategory } from "./webhook-category";
|
|
36
|
-
export { default as WebhookEvent } from "./webhook-event";
|
|
37
|
-
export { default as WebhookSetting } from "./webhook-setting";
|
|
38
|
-
export { default as Intention } from "./intention";
|
|
39
|
-
export { default as Provider } from "./provider";
|
|
40
|
-
export { default as CollabAnnotation } from "./collab-annotation";
|
|
41
|
-
export { default as CollabComment } from "./collab-comment";
|
|
42
|
-
export { default as CollabIntegration } from "./collab-integration";
|
|
43
|
-
export { default as CollabSettings } from "./collab-settings";
|
|
44
|
-
export { default as CollabShareToken } from "./collab-share-token";
|
|
45
|
-
export { default as CollabPushSubscription } from "./collab-push-subscription";
|
|
46
|
-
export { default as AppMessage } from "./app-message";
|
|
47
|
-
export { default as Invoice } from "./invoice";
|
|
48
|
-
export { default as Tag } from "./tag";
|
|
49
|
-
export { default as ProjectTagAssignment } from "./project-tag-assignment";
|
|
50
|
-
export { default as CashierSubscription } from "./cashier_subscription";
|
|
51
|
-
export { default as CashierSubscriptionItem } from "./cashier_subscription_item";
|
|
52
|
-
export { default as ProjectEnvironment } from "./project-environment";
|
|
53
|
-
export { default as EnvironmentVariable } from "./environment-variable";
|
|
54
|
-
export { default as ActivityLog } from "./activity-log";
|
|
55
|
-
export { default as OwnershipTransfer } from "./ownership-transfer";
|
|
56
|
-
|
|
57
|
-
export {
|
|
58
|
-
IUser,
|
|
59
|
-
IGit,
|
|
60
|
-
IProject,
|
|
61
|
-
IProjectAnalytics,
|
|
62
|
-
IPreview,
|
|
63
|
-
IProjectConnection,
|
|
64
|
-
IFollowing,
|
|
65
|
-
IIntegration,
|
|
66
|
-
IEnv,
|
|
67
|
-
IServer,
|
|
68
|
-
IDomain,
|
|
69
|
-
IToken,
|
|
70
|
-
IMember,
|
|
71
|
-
ITeam,
|
|
72
|
-
IInstalledIntegration,
|
|
73
|
-
ILog,
|
|
74
|
-
ISubscription,
|
|
75
|
-
ICard,
|
|
76
|
-
IDns,
|
|
77
|
-
IRole,
|
|
78
|
-
IPermission,
|
|
79
|
-
IMemberPermission,
|
|
80
|
-
IWallet,
|
|
81
|
-
IDbImage,
|
|
82
|
-
IJob,
|
|
83
|
-
ILicense,
|
|
84
|
-
IPlanConfiguration,
|
|
85
|
-
IAutoScalingGroup,
|
|
86
|
-
IComputeChange,
|
|
87
|
-
IRegion,
|
|
88
|
-
IVolume,
|
|
89
|
-
IFramework,
|
|
90
|
-
BrimbleFrameworkType,
|
|
91
|
-
ISettings,
|
|
92
|
-
ILoadBalancerPort,
|
|
93
|
-
IDomainRenewal,
|
|
94
|
-
IDomainTransfer,
|
|
95
|
-
IWebhookCategory,
|
|
96
|
-
IWebhookEvent,
|
|
97
|
-
IWebhookSetting,
|
|
98
|
-
IIntention,
|
|
99
|
-
IProvider,
|
|
100
|
-
ICollabAnnotation,
|
|
101
|
-
ICollabComment,
|
|
102
|
-
ICollabAttachment,
|
|
103
|
-
ICollabIntegration,
|
|
104
|
-
ICollabSettings,
|
|
105
|
-
ICollabShareToken,
|
|
106
|
-
ICollabPushSubscription,
|
|
107
|
-
IAppMessage,
|
|
108
|
-
IInvoice,
|
|
109
|
-
ITag,
|
|
110
|
-
IProjectTagAssignment,
|
|
111
|
-
ICashierSubscription,
|
|
112
|
-
ICashierSubscriptionItem,
|
|
113
|
-
IProjectEnvironment,
|
|
114
|
-
IEnvironmentVariable,
|
|
115
|
-
IActivityLog,
|
|
116
|
-
IOwnershipTransfer,
|
|
117
|
-
} from "./types";
|
|
118
|
-
export {
|
|
119
|
-
GIT_TYPE,
|
|
120
|
-
INTEGRATION_TYPES,
|
|
121
|
-
INTEGRATION_PROVIDERS,
|
|
122
|
-
OAUTH_PERMISSIONS,
|
|
123
|
-
ENVIRONMENT,
|
|
124
|
-
SERVER_STATUS,
|
|
125
|
-
ROLES,
|
|
126
|
-
SUBSCRIPTION_PLAN_TYPE,
|
|
127
|
-
PROJECT_STATUS,
|
|
128
|
-
SUBSCRIPTION_STATUS,
|
|
129
|
-
CARD_TYPES,
|
|
130
|
-
DNS_TYPE,
|
|
131
|
-
PERMISSION_TYPE,
|
|
132
|
-
REQUEST_TYPE,
|
|
133
|
-
ServiceType,
|
|
134
|
-
DatabaseEngine,
|
|
135
|
-
JobStatus,
|
|
136
|
-
LicenseStatus,
|
|
137
|
-
REGION_CONTINENT,
|
|
138
|
-
BUILD_DISABLED_BY,
|
|
139
|
-
SERVER_PROTOCOL,
|
|
140
|
-
FrameworkApplicationType,
|
|
141
|
-
DomainRenewalStatus,
|
|
142
|
-
DomainTransferProvider,
|
|
143
|
-
DomainTransferDirection,
|
|
144
|
-
DomainTransferStatus,
|
|
145
|
-
NomadDeploymentStatus,
|
|
146
|
-
COLLAB_ANNOTATION_STATUS,
|
|
147
|
-
COLLAB_INTEGRATION_TYPE,
|
|
148
|
-
COLLAB_THEME,
|
|
149
|
-
COLLAB_TOOLBAR_POSITION,
|
|
150
|
-
INVOICE_STATUS,
|
|
151
|
-
INVOICE_PAYMENT_STATUS,
|
|
152
|
-
INVOICE_TYPE
|
|
153
|
-
} from "./enum";
|
|
154
|
-
|
|
155
|
-
import mongoose from "mongoose";
|
|
156
|
-
import { log } from "@brimble/utils";
|
|
157
|
-
|
|
158
|
-
export const connectToMongo = async (
|
|
159
|
-
mongoUrl: string,
|
|
160
|
-
config?: mongoose.ConnectOptions,
|
|
161
|
-
): Promise<void> => {
|
|
162
|
-
const options: mongoose.ConnectOptions = {
|
|
163
|
-
socketTimeoutMS: 30000,
|
|
164
|
-
maxPoolSize: 10,
|
|
165
|
-
...config,
|
|
166
|
-
};
|
|
167
|
-
|
|
168
|
-
mongoose.connect(mongoUrl, options).catch((err) => {
|
|
169
|
-
log.error(`Unable to connect to mongo db, ${err}`);
|
|
170
|
-
});
|
|
171
|
-
|
|
172
|
-
// listen for connection
|
|
173
|
-
mongoose.connection.on("connected", () => {
|
|
174
|
-
console.log("Database connection successful 🚀");
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
// listen for error
|
|
178
|
-
mongoose.connection.on("error", ({ message }) => {
|
|
179
|
-
log.error(`Error connecting to DB`, message);
|
|
180
|
-
return process.exit(1);
|
|
181
|
-
});
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
export const db = mongoose.connection;
|
|
185
|
-
|
|
186
|
-
export const closeMongo = () => mongoose.connection.close(true);
|
|
187
|
-
|
|
188
|
-
export const healthCheckMongo = async (): Promise<boolean> => {
|
|
189
|
-
try {
|
|
190
|
-
if (mongoose.connection.readyState !== 1) {
|
|
191
|
-
return false;
|
|
192
|
-
}
|
|
193
|
-
await mongoose.connection.db.admin().ping();
|
|
194
|
-
return true;
|
|
195
|
-
} catch (error) {
|
|
196
|
-
log.error(`MongoDB health check failed`, error);
|
|
197
|
-
return false;
|
|
198
|
-
}
|
|
199
|
-
};
|
package/integration.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { INTEGRATION_PROVIDERS, INTEGRATION_TYPES } from "./enum";
|
|
3
|
-
import { IIntegration } from "./types";
|
|
4
|
-
|
|
5
|
-
const integrationSchema: Schema = new Schema(
|
|
6
|
-
{
|
|
7
|
-
user_id: {
|
|
8
|
-
type: Schema.Types.ObjectId,
|
|
9
|
-
ref: "User",
|
|
10
|
-
default: null,
|
|
11
|
-
required: true,
|
|
12
|
-
},
|
|
13
|
-
team_id: {
|
|
14
|
-
type: Schema.Types.ObjectId,
|
|
15
|
-
ref: "Team",
|
|
16
|
-
default: null,
|
|
17
|
-
required: false,
|
|
18
|
-
},
|
|
19
|
-
name: {
|
|
20
|
-
type: String,
|
|
21
|
-
enum: Object.values(INTEGRATION_PROVIDERS),
|
|
22
|
-
required: true,
|
|
23
|
-
},
|
|
24
|
-
app_id: String,
|
|
25
|
-
hook: String,
|
|
26
|
-
scope_description: Array,
|
|
27
|
-
reference: String,
|
|
28
|
-
type: {
|
|
29
|
-
type: String,
|
|
30
|
-
enum: Object.values(INTEGRATION_TYPES),
|
|
31
|
-
required: true,
|
|
32
|
-
},
|
|
33
|
-
token: String,
|
|
34
|
-
extra: Object,
|
|
35
|
-
},
|
|
36
|
-
{ timestamps: true },
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
export default model<IIntegration>("Integration", integrationSchema);
|
package/intention.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { IIntention } from "./types";
|
|
3
|
-
|
|
4
|
-
const intentionSchema = new Schema(
|
|
5
|
-
{
|
|
6
|
-
project: {
|
|
7
|
-
ref: "Project",
|
|
8
|
-
type: Schema.Types.ObjectId,
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
sourceName: {
|
|
12
|
-
type: String,
|
|
13
|
-
required: true,
|
|
14
|
-
},
|
|
15
|
-
destinationName: {
|
|
16
|
-
type: String,
|
|
17
|
-
required: true,
|
|
18
|
-
},
|
|
19
|
-
sourceNamespace: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: "default",
|
|
22
|
-
},
|
|
23
|
-
destinationNamespace: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: "default",
|
|
26
|
-
},
|
|
27
|
-
action: {
|
|
28
|
-
type: String,
|
|
29
|
-
enum: ["allow", "deny"],
|
|
30
|
-
default: "allow",
|
|
31
|
-
},
|
|
32
|
-
description: {
|
|
33
|
-
type: String,
|
|
34
|
-
required: false,
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
{ timestamps: true },
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
export default model<IIntention>("Intention", intentionSchema);
|
package/invoice.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import {
|
|
3
|
-
INVOICE_STATUS,
|
|
4
|
-
INVOICE_PAYMENT_STATUS,
|
|
5
|
-
INVOICE_TYPE,
|
|
6
|
-
} from "./enum";
|
|
7
|
-
import { IInvoice } from "./types";
|
|
8
|
-
|
|
9
|
-
const invoiceSchema: Schema = new Schema(
|
|
10
|
-
{
|
|
11
|
-
ref: String,
|
|
12
|
-
user_id: String,
|
|
13
|
-
subscription_id: String,
|
|
14
|
-
total_amount: Number,
|
|
15
|
-
due: Boolean,
|
|
16
|
-
type: {
|
|
17
|
-
type: String,
|
|
18
|
-
enum: Object.values(INVOICE_TYPE),
|
|
19
|
-
},
|
|
20
|
-
status: {
|
|
21
|
-
type: String,
|
|
22
|
-
enum: Object.values(INVOICE_STATUS),
|
|
23
|
-
},
|
|
24
|
-
payment_status: {
|
|
25
|
-
type: String,
|
|
26
|
-
enum: Object.values(INVOICE_PAYMENT_STATUS),
|
|
27
|
-
},
|
|
28
|
-
billing_period: String,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
timestamps: true,
|
|
32
|
-
collection: "invoices",
|
|
33
|
-
},
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
export default model<IInvoice>("Invoice", invoiceSchema);
|
package/job.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import mongoose, { model, Schema } from "mongoose";
|
|
2
|
-
import { IJob } from "./types/job";
|
|
3
|
-
import { JobStatus } from "./enum";
|
|
4
|
-
|
|
5
|
-
const jobSchema: Schema = new Schema({
|
|
6
|
-
title: { type: String, required: true },
|
|
7
|
-
jobId: { type: String, required: true, unique: true },
|
|
8
|
-
url: { type: String, required: true },
|
|
9
|
-
method: { type: String, required: true },
|
|
10
|
-
schedule: { type: String, required: true },
|
|
11
|
-
headers: { type: Map, of: String },
|
|
12
|
-
maxAttempts: { type: Number, default: 5 },
|
|
13
|
-
attempts: { type: Number, default: 0 },
|
|
14
|
-
isRecurring: { type: Boolean, required: true },
|
|
15
|
-
lastRun: Date,
|
|
16
|
-
nextRun: Date,
|
|
17
|
-
body: {
|
|
18
|
-
type: mongoose.Schema.Types.Mixed,
|
|
19
|
-
required: false,
|
|
20
|
-
},
|
|
21
|
-
status: {
|
|
22
|
-
type: String,
|
|
23
|
-
enum: Object.values(JobStatus),
|
|
24
|
-
default: JobStatus.SCHEDULED,
|
|
25
|
-
},
|
|
26
|
-
createdAt: { type: Date, default: Date.now },
|
|
27
|
-
updatedAt: { type: Date, default: Date.now },
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export default model<IJob>("Job", jobSchema, "scheduled_jobs");
|
package/load-balancer-port.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { ILoadBalancerPort } from "./types";
|
|
3
|
-
|
|
4
|
-
const loadBalancerPortSchema = new Schema(
|
|
5
|
-
{
|
|
6
|
-
port: {
|
|
7
|
-
type: Number,
|
|
8
|
-
required: true,
|
|
9
|
-
min: 1,
|
|
10
|
-
max: 65535,
|
|
11
|
-
},
|
|
12
|
-
server_id: {
|
|
13
|
-
type: Schema.Types.ObjectId,
|
|
14
|
-
ref: "Server",
|
|
15
|
-
required: true,
|
|
16
|
-
},
|
|
17
|
-
project_id: {
|
|
18
|
-
type: Schema.Types.ObjectId,
|
|
19
|
-
ref: "Project",
|
|
20
|
-
required: true,
|
|
21
|
-
},
|
|
22
|
-
region_id: {
|
|
23
|
-
type: Schema.Types.ObjectId,
|
|
24
|
-
ref: "Region",
|
|
25
|
-
required: true,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
{ timestamps: true },
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
export default model<ILoadBalancerPort>("LoadBalancerPort", loadBalancerPortSchema, "load_balancer_ports");
|
package/logs.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { ENVIRONMENT, PROJECT_STATUS } from "./enum";
|
|
3
|
-
import { ILog } from "./types";
|
|
4
|
-
import { softDeletePlugin } from "soft-delete-plugin-mongoose";
|
|
5
|
-
|
|
6
|
-
const LogSchema = new Schema(
|
|
7
|
-
{
|
|
8
|
-
name: String,
|
|
9
|
-
key: String,
|
|
10
|
-
commit: Object,
|
|
11
|
-
status: {
|
|
12
|
-
type: String,
|
|
13
|
-
enum: Object.values(PROJECT_STATUS),
|
|
14
|
-
default: PROJECT_STATUS.PENDING,
|
|
15
|
-
},
|
|
16
|
-
project: {
|
|
17
|
-
ref: "Project",
|
|
18
|
-
type: Schema.Types.ObjectId,
|
|
19
|
-
},
|
|
20
|
-
user: {
|
|
21
|
-
ref: "User",
|
|
22
|
-
type: Schema.Types.ObjectId,
|
|
23
|
-
},
|
|
24
|
-
team: {
|
|
25
|
-
ref: "Team",
|
|
26
|
-
type: Schema.Types.ObjectId,
|
|
27
|
-
},
|
|
28
|
-
preview: {
|
|
29
|
-
ref: "Preview",
|
|
30
|
-
type: Schema.Types.ObjectId,
|
|
31
|
-
},
|
|
32
|
-
environment: {
|
|
33
|
-
type: String,
|
|
34
|
-
enum: Object.values(ENVIRONMENT),
|
|
35
|
-
default: ENVIRONMENT.PRODUCTION,
|
|
36
|
-
},
|
|
37
|
-
jobs: Array,
|
|
38
|
-
startTime: Schema.Types.Date,
|
|
39
|
-
endTime: Schema.Types.Date,
|
|
40
|
-
deleted: Schema.Types.Boolean,
|
|
41
|
-
},
|
|
42
|
-
{ timestamps: true },
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
LogSchema.plugin(softDeletePlugin);
|
|
46
|
-
|
|
47
|
-
export default model<ILog>("Log", LogSchema);
|
package/member-permission.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import { IMemberPermission } from "./types/member-permission";
|
|
3
|
-
|
|
4
|
-
const memberPermissionSchema = new Schema({
|
|
5
|
-
permission: { type: Schema.Types.ObjectId, ref: "Permission" },
|
|
6
|
-
member: { type: Schema.Types.ObjectId, ref: "Member" },
|
|
7
|
-
enabled: { type: Boolean, default: false },
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export default model<IMemberPermission>(
|
|
11
|
-
"MemberPermission",
|
|
12
|
-
memberPermissionSchema,
|
|
13
|
-
);
|
package/member.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { ROLES } from "./enum";
|
|
3
|
-
import { IMember } from "./types";
|
|
4
|
-
|
|
5
|
-
const memberSchema: Schema = new Schema(
|
|
6
|
-
{
|
|
7
|
-
user: {
|
|
8
|
-
type: Schema.Types.ObjectId,
|
|
9
|
-
ref: "User",
|
|
10
|
-
},
|
|
11
|
-
email: String,
|
|
12
|
-
team: {
|
|
13
|
-
type: Schema.Types.ObjectId,
|
|
14
|
-
ref: "Team",
|
|
15
|
-
},
|
|
16
|
-
role: {
|
|
17
|
-
type: String,
|
|
18
|
-
enum: Object.values(ROLES),
|
|
19
|
-
default: ROLES.MEMBER,
|
|
20
|
-
},
|
|
21
|
-
accepted: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false,
|
|
24
|
-
},
|
|
25
|
-
invitedBy: {
|
|
26
|
-
type: Schema.Types.ObjectId,
|
|
27
|
-
ref: "User",
|
|
28
|
-
},
|
|
29
|
-
featureOnboarded: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: false,
|
|
32
|
-
},
|
|
33
|
-
permissions: [{ type: Schema.Types.ObjectId, ref: "MemberPermission" }],
|
|
34
|
-
project_environments: [{ type: Schema.Types.ObjectId, ref: "ProjectEnvironment" }],
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
timestamps: {
|
|
38
|
-
createdAt: "created_at",
|
|
39
|
-
updatedAt: "updated_at",
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
export default model<IMember>("Member", memberSchema);
|