@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/ownership-transfer.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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/permission.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import { IPermission } from "./types/permission";
|
|
3
|
-
import { PERMISSION_TYPE } from "./enum";
|
|
4
|
-
|
|
5
|
-
const permissionSchema = new Schema({
|
|
6
|
-
title: { type: String },
|
|
7
|
-
role: [{ type: Schema.Types.ObjectId, ref: "Role" }],
|
|
8
|
-
request: { type: Object },
|
|
9
|
-
type: { type: String, enum: Object.values(PERMISSION_TYPE) },
|
|
10
|
-
enabled: { type: Boolean, default: false, select: true },
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export default model<IPermission>("Permission", permissionSchema);
|
package/plan_configuration.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import mongoose, { Schema, Document, model } from "mongoose";
|
|
2
|
-
import { SUBSCRIPTION_PLAN_TYPE } from "./enum";
|
|
3
|
-
import { IPlanConfiguration } from "./types/plan_configuration";
|
|
4
|
-
|
|
5
|
-
const PlanConfigurationSchema = new Schema<IPlanConfiguration>(
|
|
6
|
-
{
|
|
7
|
-
tag: { type: String, required: true },
|
|
8
|
-
slack_support: { type: Boolean, default: false },
|
|
9
|
-
concurrent_builds: { type: Number, required: true },
|
|
10
|
-
project_limit: { type: Number, required: true },
|
|
11
|
-
deploy_private_organization: { type: Boolean, default: false },
|
|
12
|
-
preview_comments: { type: Boolean, default: false },
|
|
13
|
-
analytics: { type: Boolean, default: false },
|
|
14
|
-
build_minutes: { type: Number, required: true },
|
|
15
|
-
pull_request_preview: { type: Boolean, default: false, required: false },
|
|
16
|
-
log_retention: { type: Number, required: true },
|
|
17
|
-
bandwidth: { type: Number, required: true },
|
|
18
|
-
price: { type: Number, required: true },
|
|
19
|
-
autoscaling_enabled: { type: Boolean, default: false, required: false },
|
|
20
|
-
region: { type: Schema.Types.ObjectId, ref: "Region", required: false },
|
|
21
|
-
multi_region: { type: Boolean, default: false },
|
|
22
|
-
unlimited_projects: { type: Boolean, default: false },
|
|
23
|
-
plan_type: {
|
|
24
|
-
type: String,
|
|
25
|
-
enum: Object.values(SUBSCRIPTION_PLAN_TYPE),
|
|
26
|
-
required: true,
|
|
27
|
-
},
|
|
28
|
-
memory: { type: Number, required: true },
|
|
29
|
-
build_timeout: { type: Number, required: true },
|
|
30
|
-
storage: { type: Number, required: true },
|
|
31
|
-
cpu: { type: Number, required: true },
|
|
32
|
-
tokens: { type: Number, required: false },
|
|
33
|
-
hierarchy: { type: Number, required: false },
|
|
34
|
-
token_request: { type: Number, required: false },
|
|
35
|
-
view_metrics: { type: Boolean, required: false, default: false },
|
|
36
|
-
custom_domain: { type: Boolean, required: true, default: false },
|
|
37
|
-
webhook_enabled: { type: Boolean, required: true, default: false },
|
|
38
|
-
can_deploy_all_applications: { type: Boolean, required: true, default: false },
|
|
39
|
-
stripe_prices: { type: Schema.Types.Mixed, required: false, default: {} },
|
|
40
|
-
},
|
|
41
|
-
{ timestamps: true },
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
export default model<IPlanConfiguration>(
|
|
45
|
-
"PlanConfigurations",
|
|
46
|
-
PlanConfigurationSchema,
|
|
47
|
-
"plan_configurations",
|
|
48
|
-
);
|
package/project/connection.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import { IProjectConnection } from "../types";
|
|
3
|
-
|
|
4
|
-
const projectConnectionSchema = new Schema(
|
|
5
|
-
{
|
|
6
|
-
service: {
|
|
7
|
-
ref: "Project",
|
|
8
|
-
type: Schema.Types.ObjectId,
|
|
9
|
-
},
|
|
10
|
-
project: {
|
|
11
|
-
ref: "Project",
|
|
12
|
-
type: Schema.Types.ObjectId,
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
{ timestamps: true },
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
export default model<IProjectConnection>(
|
|
19
|
-
"ProjectConnection",
|
|
20
|
-
projectConnectionSchema,
|
|
21
|
-
);
|
package/project/index.ts
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { PROJECT_STATUS, ServiceType } from "../enum";
|
|
3
|
-
import { IProject } from "../types";
|
|
4
|
-
|
|
5
|
-
const projectSchema = new Schema(
|
|
6
|
-
{
|
|
7
|
-
name: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true,
|
|
10
|
-
unique: true,
|
|
11
|
-
},
|
|
12
|
-
uuid: Number,
|
|
13
|
-
user_id: {
|
|
14
|
-
type: Schema.Types.ObjectId,
|
|
15
|
-
ref: "User",
|
|
16
|
-
required: false,
|
|
17
|
-
},
|
|
18
|
-
monitor_id: {
|
|
19
|
-
type: String,
|
|
20
|
-
required: false,
|
|
21
|
-
},
|
|
22
|
-
healthCheckPath: {
|
|
23
|
-
type: String,
|
|
24
|
-
required: false,
|
|
25
|
-
},
|
|
26
|
-
preStartCommand: {
|
|
27
|
-
type: String,
|
|
28
|
-
required: false,
|
|
29
|
-
},
|
|
30
|
-
buildCacheEnabled: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: true,
|
|
33
|
-
},
|
|
34
|
-
domains: [
|
|
35
|
-
{
|
|
36
|
-
ref: "Domain",
|
|
37
|
-
type: Schema.Types.ObjectId,
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
environments: [
|
|
41
|
-
{
|
|
42
|
-
ref: "Env",
|
|
43
|
-
type: Schema.Types.ObjectId,
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
team: {
|
|
47
|
-
ref: "Team",
|
|
48
|
-
type: Schema.Types.ObjectId,
|
|
49
|
-
},
|
|
50
|
-
watchPaths: {
|
|
51
|
-
type: Array,
|
|
52
|
-
required: false,
|
|
53
|
-
default: [],
|
|
54
|
-
},
|
|
55
|
-
server: {
|
|
56
|
-
ref: "Server",
|
|
57
|
-
type: Schema.Types.ObjectId,
|
|
58
|
-
},
|
|
59
|
-
deployedInCluster: {
|
|
60
|
-
type: Boolean,
|
|
61
|
-
default: false,
|
|
62
|
-
},
|
|
63
|
-
pid: Number,
|
|
64
|
-
port: Number,
|
|
65
|
-
ip: String,
|
|
66
|
-
dir: String,
|
|
67
|
-
installCommand: String,
|
|
68
|
-
buildCommand: String,
|
|
69
|
-
startCommand: String,
|
|
70
|
-
outputDirectory: String,
|
|
71
|
-
repo: Object,
|
|
72
|
-
rootDir: String,
|
|
73
|
-
isPrivate: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
default: false,
|
|
76
|
-
},
|
|
77
|
-
tlsEnabled: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: false
|
|
80
|
-
},
|
|
81
|
-
status: {
|
|
82
|
-
type: String,
|
|
83
|
-
enum: Object.values(PROJECT_STATUS),
|
|
84
|
-
default: PROJECT_STATUS.PENDING,
|
|
85
|
-
},
|
|
86
|
-
framework: String,
|
|
87
|
-
description: String,
|
|
88
|
-
logs: [
|
|
89
|
-
{
|
|
90
|
-
ref: "Log",
|
|
91
|
-
type: Schema.Types.ObjectId,
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
log: {
|
|
95
|
-
ref: "Log",
|
|
96
|
-
type: Schema.Types.ObjectId,
|
|
97
|
-
},
|
|
98
|
-
maintenance: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: false,
|
|
101
|
-
},
|
|
102
|
-
passwordEnabled: {
|
|
103
|
-
type: Boolean,
|
|
104
|
-
default: false,
|
|
105
|
-
},
|
|
106
|
-
backupEnabled: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
default: false,
|
|
109
|
-
},
|
|
110
|
-
disabled: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
default: false,
|
|
113
|
-
},
|
|
114
|
-
password: {
|
|
115
|
-
type: String,
|
|
116
|
-
default: null,
|
|
117
|
-
},
|
|
118
|
-
screenshot: {
|
|
119
|
-
image: String,
|
|
120
|
-
public_id: String,
|
|
121
|
-
},
|
|
122
|
-
hasUpdates: {
|
|
123
|
-
type: Boolean,
|
|
124
|
-
default: false,
|
|
125
|
-
},
|
|
126
|
-
lastProcessed: Number,
|
|
127
|
-
tracking_token: String,
|
|
128
|
-
from: Schema.Types.ObjectId,
|
|
129
|
-
container_stats_schedule_id: {
|
|
130
|
-
type: String,
|
|
131
|
-
default: null,
|
|
132
|
-
},
|
|
133
|
-
previews: [
|
|
134
|
-
{
|
|
135
|
-
ref: "Preview",
|
|
136
|
-
type: Schema.Types.ObjectId,
|
|
137
|
-
},
|
|
138
|
-
],
|
|
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
|
-
},
|
|
148
|
-
replicas: {
|
|
149
|
-
type: Number,
|
|
150
|
-
default: 3,
|
|
151
|
-
},
|
|
152
|
-
nomadJobId: String,
|
|
153
|
-
specs: {
|
|
154
|
-
memory: {
|
|
155
|
-
type: Number,
|
|
156
|
-
default: 0.5,
|
|
157
|
-
},
|
|
158
|
-
cpu: {
|
|
159
|
-
type: Number,
|
|
160
|
-
default: 0.2,
|
|
161
|
-
},
|
|
162
|
-
storage: {
|
|
163
|
-
type: Number,
|
|
164
|
-
default: 1,
|
|
165
|
-
},
|
|
166
|
-
region: {
|
|
167
|
-
type: Schema.Types.ObjectId,
|
|
168
|
-
ref: "Region",
|
|
169
|
-
required: true,
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
last_requested: Schema.Types.Date,
|
|
173
|
-
isPaused: Boolean,
|
|
174
|
-
dbImage: {
|
|
175
|
-
ref: "DbImage",
|
|
176
|
-
type: Schema.Types.ObjectId,
|
|
177
|
-
required: false,
|
|
178
|
-
},
|
|
179
|
-
serviceType: {
|
|
180
|
-
type: String,
|
|
181
|
-
enum: Object.values(ServiceType),
|
|
182
|
-
default: ServiceType.WebService,
|
|
183
|
-
},
|
|
184
|
-
billable: {
|
|
185
|
-
type: Boolean,
|
|
186
|
-
default: false,
|
|
187
|
-
},
|
|
188
|
-
isPaid: {
|
|
189
|
-
type: Boolean,
|
|
190
|
-
default: false,
|
|
191
|
-
},
|
|
192
|
-
diskSize: {
|
|
193
|
-
type: Number,
|
|
194
|
-
default: 0,
|
|
195
|
-
},
|
|
196
|
-
authEnabled: {
|
|
197
|
-
type: Boolean,
|
|
198
|
-
default: false,
|
|
199
|
-
},
|
|
200
|
-
last_backup_url: {
|
|
201
|
-
type: String,
|
|
202
|
-
default: null,
|
|
203
|
-
},
|
|
204
|
-
last_backup_at: {
|
|
205
|
-
type: Date,
|
|
206
|
-
default: null,
|
|
207
|
-
},
|
|
208
|
-
replica_ready: {
|
|
209
|
-
type: Boolean,
|
|
210
|
-
default: false,
|
|
211
|
-
},
|
|
212
|
-
autoscaling_group: {
|
|
213
|
-
ref: "AutoScalingGroup",
|
|
214
|
-
type: Schema.Types.ObjectId,
|
|
215
|
-
required: false,
|
|
216
|
-
},
|
|
217
|
-
whiteListedIps: {
|
|
218
|
-
type: Array,
|
|
219
|
-
required: false,
|
|
220
|
-
},
|
|
221
|
-
vaultPath: {
|
|
222
|
-
type: String,
|
|
223
|
-
default: null,
|
|
224
|
-
},
|
|
225
|
-
vaultToken: {
|
|
226
|
-
type: String,
|
|
227
|
-
default: null,
|
|
228
|
-
},
|
|
229
|
-
volumeMount: {
|
|
230
|
-
type: String,
|
|
231
|
-
required: false,
|
|
232
|
-
},
|
|
233
|
-
},
|
|
234
|
-
{ timestamps: true },
|
|
235
|
-
);
|
|
236
|
-
|
|
237
|
-
export default model<IProject>("Project", projectSchema);
|
|
238
|
-
export const DeletedProject = model<IProject>("DeletedProject", projectSchema);
|
package/project/preview.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import { IPreview } from "../types";
|
|
3
|
-
import { PROJECT_STATUS } from "../enum";
|
|
4
|
-
|
|
5
|
-
const previewsSchema = new Schema(
|
|
6
|
-
{
|
|
7
|
-
name: String,
|
|
8
|
-
project: {
|
|
9
|
-
ref: "Project",
|
|
10
|
-
type: Schema.Types.ObjectId,
|
|
11
|
-
},
|
|
12
|
-
server: {
|
|
13
|
-
ref: "Server",
|
|
14
|
-
type: Schema.Types.ObjectId,
|
|
15
|
-
},
|
|
16
|
-
healthCheckPath: {
|
|
17
|
-
type: String,
|
|
18
|
-
required: false,
|
|
19
|
-
},
|
|
20
|
-
pid: Number,
|
|
21
|
-
port: Number,
|
|
22
|
-
ip: String,
|
|
23
|
-
dir: String,
|
|
24
|
-
branch: String,
|
|
25
|
-
issue_comment_id: Number,
|
|
26
|
-
status: {
|
|
27
|
-
type: String,
|
|
28
|
-
enum: Object.values(PROJECT_STATUS),
|
|
29
|
-
default: PROJECT_STATUS.PENDING,
|
|
30
|
-
},
|
|
31
|
-
log: {
|
|
32
|
-
ref: "Log",
|
|
33
|
-
type: Schema.Types.ObjectId,
|
|
34
|
-
},
|
|
35
|
-
last_requested: Schema.Types.Date,
|
|
36
|
-
isPaused: Boolean,
|
|
37
|
-
},
|
|
38
|
-
{ timestamps: true },
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
export default model<IPreview>("Preview", previewsSchema);
|
package/project-environment.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
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);
|
|
@@ -1,40 +0,0 @@
|
|
|
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
|
-
);
|
package/project_analytics.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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/provider.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import { IProvider } from "./types/provider";
|
|
3
|
-
|
|
4
|
-
const providerSchema = new Schema({
|
|
5
|
-
name: { type: String, required: true },
|
|
6
|
-
slug: { type: String, required: true, unique: true },
|
|
7
|
-
logo: { type: String, required: true },
|
|
8
|
-
enabled: { type: Boolean, default: true },
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export default model<IProvider>("Provider", providerSchema, "providers");
|
package/region.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import { IRegion } from "./types/region";
|
|
3
|
-
import { REGION_CONTINENT } from "./enum";
|
|
4
|
-
|
|
5
|
-
const regionSchema = new Schema({
|
|
6
|
-
name: { type: String, required: true },
|
|
7
|
-
country: { type: String, required: true },
|
|
8
|
-
continent: { type: String, enum: Object.values(REGION_CONTINENT) },
|
|
9
|
-
enabled: { type: Boolean, default: false, select: true },
|
|
10
|
-
dbVolumePath: { type: String, required: true },
|
|
11
|
-
is_paid: { type: Boolean, default: false },
|
|
12
|
-
provider: { type: String, required: true },
|
|
13
|
-
provider_identifier: { type: String, required: true },
|
|
14
|
-
storage_pricing_factor: { type: Number, required: true, default: 0.25 },
|
|
15
|
-
floating_ip: { type: String },
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export default model<IRegion>("Region", regionSchema, "regions");
|
package/role.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Schema, model } from "mongoose";
|
|
2
|
-
import { ROLES } from "./enum";
|
|
3
|
-
import { IRole } from "./types/role";
|
|
4
|
-
|
|
5
|
-
const roleSchema = new Schema({
|
|
6
|
-
type: { type: String, enum: Object.values(ROLES) },
|
|
7
|
-
description: { type: String },
|
|
8
|
-
is_custom: { type: Boolean, default: false },
|
|
9
|
-
permissions: [{ type: Schema.Types.ObjectId, ref: "Permission" }],
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export default model<IRole>("Role", roleSchema);
|
package/server.ts
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { IServer } from "./types";
|
|
3
|
-
import { SERVER_STATUS, SERVER_PROTOCOL } from "./enum";
|
|
4
|
-
|
|
5
|
-
const serverSchema = new Schema(
|
|
6
|
-
{
|
|
7
|
-
name: {
|
|
8
|
-
type: String,
|
|
9
|
-
required: true,
|
|
10
|
-
},
|
|
11
|
-
url: String,
|
|
12
|
-
grpc_address: String,
|
|
13
|
-
userId: {
|
|
14
|
-
type: Schema.Types.ObjectId,
|
|
15
|
-
ref: "User",
|
|
16
|
-
required: true,
|
|
17
|
-
},
|
|
18
|
-
teamId: {
|
|
19
|
-
type: Schema.Types.ObjectId,
|
|
20
|
-
ref: "Team",
|
|
21
|
-
required: false,
|
|
22
|
-
},
|
|
23
|
-
domain: {
|
|
24
|
-
required: false,
|
|
25
|
-
type: String,
|
|
26
|
-
},
|
|
27
|
-
webhook_url: String,
|
|
28
|
-
ip_address: {
|
|
29
|
-
type: String,
|
|
30
|
-
required: true,
|
|
31
|
-
},
|
|
32
|
-
ipv6: String,
|
|
33
|
-
private_ip_address: {
|
|
34
|
-
type: String,
|
|
35
|
-
required: true,
|
|
36
|
-
},
|
|
37
|
-
tunnel_token: {
|
|
38
|
-
type: String,
|
|
39
|
-
required: false,
|
|
40
|
-
},
|
|
41
|
-
type: String,
|
|
42
|
-
status: {
|
|
43
|
-
type: String,
|
|
44
|
-
enum: Object.values(SERVER_STATUS),
|
|
45
|
-
default: SERVER_STATUS.Active,
|
|
46
|
-
},
|
|
47
|
-
protocol: {
|
|
48
|
-
type: String,
|
|
49
|
-
enum: Object.values(SERVER_PROTOCOL),
|
|
50
|
-
default: SERVER_PROTOCOL.TCP,
|
|
51
|
-
},
|
|
52
|
-
default: Boolean,
|
|
53
|
-
is_custom_provision: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: true,
|
|
56
|
-
},
|
|
57
|
-
region: {
|
|
58
|
-
type: Schema.Types.ObjectId,
|
|
59
|
-
ref: "Region",
|
|
60
|
-
required: true,
|
|
61
|
-
},
|
|
62
|
-
tag: String,
|
|
63
|
-
plugin_id: {
|
|
64
|
-
type: String,
|
|
65
|
-
required: false,
|
|
66
|
-
},
|
|
67
|
-
firewall_id: {
|
|
68
|
-
required: false,
|
|
69
|
-
type: String,
|
|
70
|
-
},
|
|
71
|
-
provider: {
|
|
72
|
-
type: String,
|
|
73
|
-
required: true,
|
|
74
|
-
},
|
|
75
|
-
provider_location: {
|
|
76
|
-
type: String,
|
|
77
|
-
required: false,
|
|
78
|
-
},
|
|
79
|
-
provider_identifier: {
|
|
80
|
-
type: String,
|
|
81
|
-
required: false,
|
|
82
|
-
},
|
|
83
|
-
topology_path: {
|
|
84
|
-
type: String,
|
|
85
|
-
required: false,
|
|
86
|
-
},
|
|
87
|
-
specifications: {
|
|
88
|
-
type: Object,
|
|
89
|
-
default: {},
|
|
90
|
-
select: true,
|
|
91
|
-
},
|
|
92
|
-
cert_storage_path: {
|
|
93
|
-
type: String,
|
|
94
|
-
required: false,
|
|
95
|
-
},
|
|
96
|
-
meta: {
|
|
97
|
-
type: Object,
|
|
98
|
-
default: {},
|
|
99
|
-
select: true,
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
{ timestamps: true },
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
export default model<IServer>("Server", serverSchema);
|
package/settings.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { model, Schema } from "mongoose";
|
|
2
|
-
import { ISettings } from "./types";
|
|
3
|
-
|
|
4
|
-
const settingsSchema: Schema = new Schema(
|
|
5
|
-
{
|
|
6
|
-
vaultEnabled: {
|
|
7
|
-
type: Boolean,
|
|
8
|
-
default: false,
|
|
9
|
-
},
|
|
10
|
-
maintenanceMode: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: false,
|
|
13
|
-
},
|
|
14
|
-
enableSecretRotation: {
|
|
15
|
-
type: String,
|
|
16
|
-
required: false,
|
|
17
|
-
},
|
|
18
|
-
domainPromoEnabled: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: false,
|
|
21
|
-
},
|
|
22
|
-
buildsEnabled: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false,
|
|
25
|
-
},
|
|
26
|
-
minimumBuildMinutes: {
|
|
27
|
-
type: Number,
|
|
28
|
-
required: false,
|
|
29
|
-
},
|
|
30
|
-
enableLogging: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: false,
|
|
33
|
-
},
|
|
34
|
-
postHogEnabled: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false
|
|
37
|
-
},
|
|
38
|
-
webhookEnabled: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
|
-
metaSettings: {
|
|
43
|
-
type: Object,
|
|
44
|
-
required: false,
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
timestamps: true,
|
|
49
|
-
collection: "app_settings",
|
|
50
|
-
},
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
export default model<ISettings>("Settings", settingsSchema, "app_settings");
|