@brimble/models 3.8.219 → 3.8.225
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/cloud-server-resource.d.ts +9 -0
- package/dist/cloud-server-resource.js +13 -0
- package/dist/cloud-server.d.ts +9 -0
- package/dist/cloud-server.js +139 -0
- package/dist/cloud-usage-charge.d.ts +14 -0
- package/dist/cloud-usage-charge.js +23 -0
- package/dist/cloud-usage-review.d.ts +9 -0
- package/dist/cloud-usage-review.js +21 -0
- package/dist/cloud-usage-settlement.d.ts +9 -0
- package/dist/cloud-usage-settlement.js +16 -0
- package/dist/cloud-usage-source-period.d.ts +9 -0
- package/dist/cloud-usage-source-period.js +12 -0
- package/dist/domain/index.js +4 -0
- package/dist/enum/index.d.ts +61 -0
- package/dist/enum/index.js +71 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +25 -3
- package/dist/plan_configuration.js +1 -0
- package/dist/types/cloud-server-resource.d.ts +8 -0
- package/dist/types/cloud-server-resource.js +2 -0
- package/dist/types/cloud-server.d.ts +85 -0
- package/dist/types/cloud-server.js +2 -0
- package/dist/types/cloud-usage-charge.d.ts +22 -0
- package/dist/types/cloud-usage-charge.js +2 -0
- package/dist/types/cloud-usage-review.d.ts +13 -0
- package/dist/types/cloud-usage-review.js +2 -0
- package/dist/types/cloud-usage-settlement.d.ts +11 -0
- package/dist/types/cloud-usage-settlement.js +2 -0
- package/dist/types/cloud-usage-source-period.d.ts +8 -0
- package/dist/types/cloud-usage-source-period.js +2 -0
- package/dist/types/domain/index.d.ts +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/plan_configuration.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CloudServerResource } from "./types/cloud-server-resource";
|
|
2
|
+
declare const _default: import("mongoose").Model<CloudServerResource, {}, {}, {}, import("mongoose").Document<unknown, {}, CloudServerResource, {}, import("mongoose").DefaultSchemaOptions> & CloudServerResource & {
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
} & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, CloudServerResource>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const cloudServerResourceSchema = new mongoose_1.Schema({
|
|
5
|
+
provider: { type: String, required: true },
|
|
6
|
+
resourceId: { type: String, required: true },
|
|
7
|
+
serverId: { type: String, required: true },
|
|
8
|
+
kind: { type: String, required: true },
|
|
9
|
+
firstSeenAt: { type: Date, required: true },
|
|
10
|
+
});
|
|
11
|
+
cloudServerResourceSchema.index({ provider: 1, resourceId: 1 }, { unique: true });
|
|
12
|
+
cloudServerResourceSchema.index({ serverId: 1 });
|
|
13
|
+
exports.default = (0, mongoose_1.model)("CloudServerResource", cloudServerResourceSchema);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ICloudServer } from "./types/cloud-server";
|
|
2
|
+
declare const _default: import("mongoose").Model<ICloudServer, {}, {}, {}, import("mongoose").Document<unknown, {}, ICloudServer, {}, import("mongoose").DefaultSchemaOptions> & ICloudServer & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, ICloudServer>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const sshKeySchema = new mongoose_1.Schema({
|
|
6
|
+
id: { type: String, required: true },
|
|
7
|
+
name: { type: String, required: true },
|
|
8
|
+
publicKey: { type: String, required: true },
|
|
9
|
+
}, { _id: false });
|
|
10
|
+
const firewallRuleSchema = new mongoose_1.Schema({
|
|
11
|
+
id: { type: String, required: true },
|
|
12
|
+
action: { type: String, required: true },
|
|
13
|
+
protocol: { type: String, required: true },
|
|
14
|
+
port: { type: Number, required: true },
|
|
15
|
+
cidr: { type: String, required: true },
|
|
16
|
+
}, { _id: false });
|
|
17
|
+
const volumeSchema = new mongoose_1.Schema({
|
|
18
|
+
id: { type: String, required: true },
|
|
19
|
+
name: { type: String, required: true },
|
|
20
|
+
sizeGb: { type: Number, required: true },
|
|
21
|
+
formatMount: {
|
|
22
|
+
type: String,
|
|
23
|
+
enum: Object.values(enum_1.CLOUD_VOLUME_FORMAT_MOUNT),
|
|
24
|
+
default: enum_1.CLOUD_VOLUME_FORMAT_MOUNT.Automatic,
|
|
25
|
+
},
|
|
26
|
+
filesystem: {
|
|
27
|
+
type: String,
|
|
28
|
+
enum: [...Object.values(enum_1.CLOUD_VOLUME_FILESYSTEM), null],
|
|
29
|
+
default: enum_1.CLOUD_VOLUME_FILESYSTEM.Ext4,
|
|
30
|
+
},
|
|
31
|
+
}, { _id: false });
|
|
32
|
+
const networkSchema = new mongoose_1.Schema({
|
|
33
|
+
id: { type: String, required: true },
|
|
34
|
+
name: { type: String, required: true },
|
|
35
|
+
cidr: { type: String, required: true },
|
|
36
|
+
}, { _id: false });
|
|
37
|
+
const pointSchema = new mongoose_1.Schema({
|
|
38
|
+
id: { type: String, required: true },
|
|
39
|
+
name: { type: String, required: true },
|
|
40
|
+
createdAt: { type: String, required: true },
|
|
41
|
+
}, { _id: false });
|
|
42
|
+
const logLineSchema = new mongoose_1.Schema({
|
|
43
|
+
at: { type: String, required: true },
|
|
44
|
+
message: { type: String, required: true },
|
|
45
|
+
}, { _id: false });
|
|
46
|
+
const cloudServerSchema = new mongoose_1.Schema({
|
|
47
|
+
name: { type: String, required: true },
|
|
48
|
+
user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: true },
|
|
49
|
+
team: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", default: null },
|
|
50
|
+
provider: {
|
|
51
|
+
type: String,
|
|
52
|
+
enum: Object.values(enum_1.CLOUD_PROVIDER),
|
|
53
|
+
required: true,
|
|
54
|
+
},
|
|
55
|
+
kind: {
|
|
56
|
+
type: String,
|
|
57
|
+
enum: Object.values(enum_1.CLOUD_SERVER_KIND),
|
|
58
|
+
required: true,
|
|
59
|
+
},
|
|
60
|
+
zone: { type: String, required: true },
|
|
61
|
+
region: { type: String, required: true },
|
|
62
|
+
size: { type: String, required: true },
|
|
63
|
+
sku: { type: String, required: true },
|
|
64
|
+
image: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "ubuntu-24.04",
|
|
67
|
+
required: true,
|
|
68
|
+
},
|
|
69
|
+
status: {
|
|
70
|
+
type: String,
|
|
71
|
+
enum: Object.values(enum_1.CLOUD_SERVER_STATUS),
|
|
72
|
+
required: true,
|
|
73
|
+
},
|
|
74
|
+
billing_status: {
|
|
75
|
+
type: String,
|
|
76
|
+
enum: Object.values(enum_1.CLOUD_SERVER_BILLING_STATUS),
|
|
77
|
+
default: enum_1.CLOUD_SERVER_BILLING_STATUS.Active,
|
|
78
|
+
},
|
|
79
|
+
username: { type: String, required: true },
|
|
80
|
+
public_ip: { type: String, default: null },
|
|
81
|
+
private_ip: { type: String, default: null },
|
|
82
|
+
provider_resource_id: { type: String, default: null },
|
|
83
|
+
console_url: { type: String, default: null },
|
|
84
|
+
password_ciphertext: { type: String, default: null },
|
|
85
|
+
brimble_public_key: { type: String, default: null },
|
|
86
|
+
brimble_key_ciphertext: { type: String, default: null },
|
|
87
|
+
subscription_id: { type: String, default: null },
|
|
88
|
+
stripe_subscription_id: { type: String, default: null },
|
|
89
|
+
last_error: { type: String, default: null },
|
|
90
|
+
provider_monthly_price: { type: Number, required: true },
|
|
91
|
+
monthly_price: { type: Number, required: true },
|
|
92
|
+
vcpu: { type: Number, required: true },
|
|
93
|
+
memory_mb: { type: Number, required: true },
|
|
94
|
+
disk_gb: { type: Number, required: true },
|
|
95
|
+
bandwidth_gb: { type: Number, required: true },
|
|
96
|
+
ssh_keys: { type: [sshKeySchema], default: [] },
|
|
97
|
+
firewall: { type: [firewallRuleSchema], default: [] },
|
|
98
|
+
volumes: { type: [volumeSchema], default: [] },
|
|
99
|
+
networks: { type: [networkSchema], default: [] },
|
|
100
|
+
snapshots: { type: [pointSchema], default: [] },
|
|
101
|
+
backups: { type: [pointSchema], default: [] },
|
|
102
|
+
system_logs: { type: [logLineSchema], default: [] },
|
|
103
|
+
provisionProgress: {
|
|
104
|
+
type: {
|
|
105
|
+
phase: {
|
|
106
|
+
type: String,
|
|
107
|
+
enum: Object.values(enum_1.CloudServerProvisionPhase),
|
|
108
|
+
required: true,
|
|
109
|
+
},
|
|
110
|
+
message: {
|
|
111
|
+
type: String,
|
|
112
|
+
required: true,
|
|
113
|
+
},
|
|
114
|
+
step: {
|
|
115
|
+
type: String,
|
|
116
|
+
enum: Object.values(enum_1.CloudServerProvisionStep),
|
|
117
|
+
required: true,
|
|
118
|
+
},
|
|
119
|
+
operation: {
|
|
120
|
+
type: String,
|
|
121
|
+
enum: Object.values(enum_1.CloudServerProvisionOperation),
|
|
122
|
+
required: true,
|
|
123
|
+
},
|
|
124
|
+
updatedAt: {
|
|
125
|
+
type: Date,
|
|
126
|
+
required: true,
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
default: null,
|
|
130
|
+
},
|
|
131
|
+
}, {
|
|
132
|
+
timestamps: {
|
|
133
|
+
createdAt: "created_at",
|
|
134
|
+
updatedAt: "updated_at",
|
|
135
|
+
},
|
|
136
|
+
});
|
|
137
|
+
cloudServerSchema.index({ user_id: 1, status: 1, name: 1 });
|
|
138
|
+
cloudServerSchema.index({ team: 1, status: 1 });
|
|
139
|
+
exports.default = (0, mongoose_1.model)("CloudServer", cloudServerSchema);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CloudUsageCharge } from "./types/cloud-usage-charge";
|
|
2
|
+
declare const _default: import("mongoose").Model<CloudUsageCharge, {}, {}, {}, import("mongoose").Document<unknown, {}, CloudUsageCharge, {}, import("mongoose").DefaultSchemaOptions> & import("./types/cloud-usage-charge").CloudUsageLine & {
|
|
3
|
+
month: string;
|
|
4
|
+
serverId: string | null;
|
|
5
|
+
status: import("./types/cloud-usage-charge").CloudUsageStatus;
|
|
6
|
+
importedAt: Date;
|
|
7
|
+
} & {
|
|
8
|
+
_id: import("mongoose").Types.ObjectId;
|
|
9
|
+
} & {
|
|
10
|
+
__v: number;
|
|
11
|
+
} & {
|
|
12
|
+
id: string;
|
|
13
|
+
}, any, CloudUsageCharge>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const cloudUsageChargeSchema = new mongoose_1.Schema({
|
|
5
|
+
provider: { type: String, required: true },
|
|
6
|
+
billingAccount: { type: String, required: true },
|
|
7
|
+
lineId: { type: String, required: true },
|
|
8
|
+
month: { type: String, required: true },
|
|
9
|
+
resourceId: { type: String, default: null },
|
|
10
|
+
kind: { type: String, required: true },
|
|
11
|
+
description: { type: String, required: true },
|
|
12
|
+
chargeStart: { type: Date, required: true },
|
|
13
|
+
chargeEnd: { type: Date, required: true },
|
|
14
|
+
currency: { type: String, required: true },
|
|
15
|
+
amount: { type: String, required: true },
|
|
16
|
+
finalized: { type: Boolean, required: true },
|
|
17
|
+
serverId: { type: String, default: null },
|
|
18
|
+
status: { type: String, required: true },
|
|
19
|
+
importedAt: { type: Date, required: true },
|
|
20
|
+
});
|
|
21
|
+
cloudUsageChargeSchema.index({ provider: 1, billingAccount: 1, lineId: 1 }, { unique: true });
|
|
22
|
+
cloudUsageChargeSchema.index({ serverId: 1, month: 1, status: 1 });
|
|
23
|
+
exports.default = (0, mongoose_1.model)("CloudUsageCharge", cloudUsageChargeSchema);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CloudUsageReview } from "./types/cloud-usage-review";
|
|
2
|
+
declare const _default: import("mongoose").Model<CloudUsageReview, {}, {}, {}, import("mongoose").Document<unknown, {}, CloudUsageReview, {}, import("mongoose").DefaultSchemaOptions> & CloudUsageReview & {
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
} & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, CloudUsageReview>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const cloudUsageReviewSchema = new mongoose_1.Schema({
|
|
5
|
+
provider: { type: String, required: true },
|
|
6
|
+
billingAccount: { type: String, required: true },
|
|
7
|
+
lineId: { type: String, required: true },
|
|
8
|
+
sourceFingerprint: { type: String, required: true },
|
|
9
|
+
kind: { type: String, required: true },
|
|
10
|
+
serverId: { type: String, default: null },
|
|
11
|
+
reviewer: { type: String, required: true },
|
|
12
|
+
reason: { type: String, required: true },
|
|
13
|
+
reviewedAt: { type: Date, required: true },
|
|
14
|
+
});
|
|
15
|
+
cloudUsageReviewSchema.index({
|
|
16
|
+
provider: 1,
|
|
17
|
+
billingAccount: 1,
|
|
18
|
+
lineId: 1,
|
|
19
|
+
reviewedAt: -1,
|
|
20
|
+
});
|
|
21
|
+
exports.default = (0, mongoose_1.model)("CloudUsageReview", cloudUsageReviewSchema);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CloudUsageSettlement } from "./types/cloud-usage-settlement";
|
|
2
|
+
declare const _default: import("mongoose").Model<CloudUsageSettlement, {}, {}, {}, import("mongoose").Document<unknown, {}, CloudUsageSettlement, {}, import("mongoose").DefaultSchemaOptions> & CloudUsageSettlement & {
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
} & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, CloudUsageSettlement>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const pendingSchema = new mongoose_1.Schema({
|
|
5
|
+
id: { type: String, required: true },
|
|
6
|
+
amountUsdCents: { type: Number, required: true },
|
|
7
|
+
targetUsdCents: { type: Number, required: true },
|
|
8
|
+
}, { _id: false });
|
|
9
|
+
const cloudUsageSettlementSchema = new mongoose_1.Schema({
|
|
10
|
+
serverId: { type: String, required: true },
|
|
11
|
+
month: { type: String, required: true },
|
|
12
|
+
postedUsdCents: { type: Number, required: true, default: 0 },
|
|
13
|
+
pending: { type: pendingSchema, default: null },
|
|
14
|
+
});
|
|
15
|
+
cloudUsageSettlementSchema.index({ serverId: 1, month: 1 }, { unique: true });
|
|
16
|
+
exports.default = (0, mongoose_1.model)("CloudUsageSettlement", cloudUsageSettlementSchema);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CloudUsageSourcePeriod } from "./types/cloud-usage-source-period";
|
|
2
|
+
declare const _default: import("mongoose").Model<CloudUsageSourcePeriod, {}, {}, {}, import("mongoose").Document<unknown, {}, CloudUsageSourcePeriod, {}, import("mongoose").DefaultSchemaOptions> & CloudUsageSourcePeriod & {
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
} & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, CloudUsageSourcePeriod>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const cloudUsageSourcePeriodSchema = new mongoose_1.Schema({
|
|
5
|
+
provider: { type: String, required: true },
|
|
6
|
+
billingAccount: { type: String, required: true },
|
|
7
|
+
month: { type: String, required: true },
|
|
8
|
+
finalized: { type: Boolean, required: true },
|
|
9
|
+
importedAt: { type: Date, required: true },
|
|
10
|
+
});
|
|
11
|
+
cloudUsageSourcePeriodSchema.index({ provider: 1, billingAccount: 1, month: 1 }, { unique: true });
|
|
12
|
+
exports.default = (0, mongoose_1.model)("CloudUsageSourcePeriod", cloudUsageSourcePeriodSchema);
|
package/dist/domain/index.js
CHANGED
package/dist/enum/index.d.ts
CHANGED
|
@@ -647,3 +647,64 @@ export declare enum PaymentStatus {
|
|
|
647
647
|
Expired = "expired",
|
|
648
648
|
NeedsReview = "needs_review"
|
|
649
649
|
}
|
|
650
|
+
export declare enum CLOUD_PROVIDER {
|
|
651
|
+
Oracle = "oracle",
|
|
652
|
+
Gcp = "gcp",
|
|
653
|
+
Aws = "aws",
|
|
654
|
+
Azure = "azure",
|
|
655
|
+
DigitalOcean = "digitalocean",
|
|
656
|
+
Hetzner = "hetzner",
|
|
657
|
+
Linode = "linode",
|
|
658
|
+
Vultr = "vultr",
|
|
659
|
+
Tencent = "tencent",
|
|
660
|
+
Nobus = "nobus",
|
|
661
|
+
Pantech = "pantech"
|
|
662
|
+
}
|
|
663
|
+
export declare enum CLOUD_SERVER_KIND {
|
|
664
|
+
Vps = "vps",
|
|
665
|
+
Dedicated = "dedicated"
|
|
666
|
+
}
|
|
667
|
+
export declare enum CLOUD_SERVER_STATUS {
|
|
668
|
+
PendingPayment = "pending_payment",
|
|
669
|
+
Provisioning = "provisioning",
|
|
670
|
+
Active = "active",
|
|
671
|
+
Stopped = "stopped",
|
|
672
|
+
Updating = "updating",
|
|
673
|
+
Failed = "failed",
|
|
674
|
+
Deleting = "deleting",
|
|
675
|
+
Deleted = "deleted"
|
|
676
|
+
}
|
|
677
|
+
export declare enum CLOUD_VOLUME_FORMAT_MOUNT {
|
|
678
|
+
Automatic = "automatic",
|
|
679
|
+
Manual = "manual"
|
|
680
|
+
}
|
|
681
|
+
export declare enum CLOUD_VOLUME_FILESYSTEM {
|
|
682
|
+
Ext4 = "ext4",
|
|
683
|
+
Xfs = "xfs"
|
|
684
|
+
}
|
|
685
|
+
export declare enum CLOUD_SERVER_BILLING_STATUS {
|
|
686
|
+
Active = "active",
|
|
687
|
+
PastDue = "past_due",
|
|
688
|
+
Unpaid = "unpaid"
|
|
689
|
+
}
|
|
690
|
+
export declare enum CloudServerProvisionPhase {
|
|
691
|
+
Preparing = "preparing",
|
|
692
|
+
Provisioning = "provisioning",
|
|
693
|
+
Ready = "ready",
|
|
694
|
+
Failed = "failed"
|
|
695
|
+
}
|
|
696
|
+
export declare enum CloudServerProvisionOperation {
|
|
697
|
+
Create = "create",
|
|
698
|
+
Retry = "retry",
|
|
699
|
+
Update = "update"
|
|
700
|
+
}
|
|
701
|
+
export declare enum CloudServerProvisionStep {
|
|
702
|
+
Queued = "queued",
|
|
703
|
+
CreatingInstance = "creating-instance",
|
|
704
|
+
WaitingNetwork = "waiting-network",
|
|
705
|
+
Bootstrapping = "bootstrapping",
|
|
706
|
+
InstallingMonitoring = "installing-monitoring",
|
|
707
|
+
FormattingVolumes = "formatting-volumes",
|
|
708
|
+
Ready = "ready",
|
|
709
|
+
Failed = "failed"
|
|
710
|
+
}
|
package/dist/enum/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SCALING_SOURCE = exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.EmailDeadLetterStatus = exports.DatabaseInsightsScope = exports.HaMemberRole = exports.DatabasePasswordMode = exports.DatabasePasswordChangeMode = exports.DatabaseEngine = exports.ServiceType = exports.VOLUME_BACKEND = exports.REGION_CONTINENT = exports.ROLES = exports.DNS_MANAGED_BY = exports.EMAIL_FORWARD_STATUS = exports.DNS_CHANGE_SOURCE = exports.DNS_CHANGE_TYPE = exports.DNS_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = exports.DrainEventType = exports.LogSource = exports.DrainStatus = exports.DrainType = exports.AlertEventStatus = exports.AlertChannelMode = exports.AlertRuleState = exports.AlertCondition = exports.AlertMetric = exports.DatabaseProvisionStep = exports.DatabaseProvisionOperation = exports.DatabaseProvisionPhase = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.CONFIG_FILE_VISIBILITY = exports.ENVIRONMENT = exports.TEAM_ACTIVATION_STATUS = exports.SPENDING_LIMIT_ACTION = exports.PROJECT_DISABLED_BY = exports.BUILD_DISABLED_BY = exports.SERVER_PROTOCOL = exports.GIT_TYPE = void 0;
|
|
4
4
|
exports.AGENT_CHAT_STATUS = exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.DatabaseUserStatus = exports.DatabaseUserPermission = exports.WorkbenchMode = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = exports.PlatformApiKeyStatus = exports.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.RESTORE_STATUS = exports.WorkerRunTrigger = exports.WorkerRunStatus = exports.BACKUP_DESTINATION_TYPE = exports.BACKUP_STATUS = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_EGRESS_MODE = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = exports.COLLAB_TOOLBAR_POSITION = exports.COLLAB_THEME = exports.COLLAB_INTEGRATION_TYPE = exports.COLLAB_ANNOTATION_STATUS = exports.NomadDeploymentStatus = exports.DomainTransferStatus = exports.DomainTransferDirection = exports.DomainTransferProvider = void 0;
|
|
5
|
-
exports.PaymentStatus = exports.PaymentProviderName = exports.WalletTransactionType = exports.WalletTransactionDirection = exports.WalletCurrency = exports.WalletOwnerType = exports.BuildDispatch = exports.BuildProviderType = exports.BuildMethod = exports.BuildUseCase = exports.AGENT_DESIGN_SKILL_VERDICT = exports.AGENT_DESIGN_SKILL_TRUST_LEVEL = exports.AGENT_DESIGN_SKILL_STATUS = exports.AGENT_WEBSITE_SNAPSHOT_STATUS = exports.AGENT_WEBSITE_STATUS = exports.AGENT_CHAT_MESSAGE_ROLE = void 0;
|
|
5
|
+
exports.CloudServerProvisionStep = exports.CloudServerProvisionOperation = exports.CloudServerProvisionPhase = exports.CLOUD_SERVER_BILLING_STATUS = exports.CLOUD_VOLUME_FILESYSTEM = exports.CLOUD_VOLUME_FORMAT_MOUNT = exports.CLOUD_SERVER_STATUS = exports.CLOUD_SERVER_KIND = exports.CLOUD_PROVIDER = exports.PaymentStatus = exports.PaymentProviderName = exports.WalletTransactionType = exports.WalletTransactionDirection = exports.WalletCurrency = exports.WalletOwnerType = exports.BuildDispatch = exports.BuildProviderType = exports.BuildMethod = exports.BuildUseCase = exports.AGENT_DESIGN_SKILL_VERDICT = exports.AGENT_DESIGN_SKILL_TRUST_LEVEL = exports.AGENT_DESIGN_SKILL_STATUS = exports.AGENT_WEBSITE_SNAPSHOT_STATUS = exports.AGENT_WEBSITE_STATUS = exports.AGENT_CHAT_MESSAGE_ROLE = void 0;
|
|
6
6
|
var GIT_TYPE;
|
|
7
7
|
(function (GIT_TYPE) {
|
|
8
8
|
GIT_TYPE["GITHUB"] = "GITHUB";
|
|
@@ -784,3 +784,73 @@ var PaymentStatus;
|
|
|
784
784
|
PaymentStatus["Expired"] = "expired";
|
|
785
785
|
PaymentStatus["NeedsReview"] = "needs_review";
|
|
786
786
|
})(PaymentStatus || (exports.PaymentStatus = PaymentStatus = {}));
|
|
787
|
+
var CLOUD_PROVIDER;
|
|
788
|
+
(function (CLOUD_PROVIDER) {
|
|
789
|
+
CLOUD_PROVIDER["Oracle"] = "oracle";
|
|
790
|
+
CLOUD_PROVIDER["Gcp"] = "gcp";
|
|
791
|
+
CLOUD_PROVIDER["Aws"] = "aws";
|
|
792
|
+
CLOUD_PROVIDER["Azure"] = "azure";
|
|
793
|
+
CLOUD_PROVIDER["DigitalOcean"] = "digitalocean";
|
|
794
|
+
CLOUD_PROVIDER["Hetzner"] = "hetzner";
|
|
795
|
+
CLOUD_PROVIDER["Linode"] = "linode";
|
|
796
|
+
CLOUD_PROVIDER["Vultr"] = "vultr";
|
|
797
|
+
CLOUD_PROVIDER["Tencent"] = "tencent";
|
|
798
|
+
CLOUD_PROVIDER["Nobus"] = "nobus";
|
|
799
|
+
CLOUD_PROVIDER["Pantech"] = "pantech";
|
|
800
|
+
})(CLOUD_PROVIDER || (exports.CLOUD_PROVIDER = CLOUD_PROVIDER = {}));
|
|
801
|
+
var CLOUD_SERVER_KIND;
|
|
802
|
+
(function (CLOUD_SERVER_KIND) {
|
|
803
|
+
CLOUD_SERVER_KIND["Vps"] = "vps";
|
|
804
|
+
CLOUD_SERVER_KIND["Dedicated"] = "dedicated";
|
|
805
|
+
})(CLOUD_SERVER_KIND || (exports.CLOUD_SERVER_KIND = CLOUD_SERVER_KIND = {}));
|
|
806
|
+
var CLOUD_SERVER_STATUS;
|
|
807
|
+
(function (CLOUD_SERVER_STATUS) {
|
|
808
|
+
CLOUD_SERVER_STATUS["PendingPayment"] = "pending_payment";
|
|
809
|
+
CLOUD_SERVER_STATUS["Provisioning"] = "provisioning";
|
|
810
|
+
CLOUD_SERVER_STATUS["Active"] = "active";
|
|
811
|
+
CLOUD_SERVER_STATUS["Stopped"] = "stopped";
|
|
812
|
+
CLOUD_SERVER_STATUS["Updating"] = "updating";
|
|
813
|
+
CLOUD_SERVER_STATUS["Failed"] = "failed";
|
|
814
|
+
CLOUD_SERVER_STATUS["Deleting"] = "deleting";
|
|
815
|
+
CLOUD_SERVER_STATUS["Deleted"] = "deleted";
|
|
816
|
+
})(CLOUD_SERVER_STATUS || (exports.CLOUD_SERVER_STATUS = CLOUD_SERVER_STATUS = {}));
|
|
817
|
+
var CLOUD_VOLUME_FORMAT_MOUNT;
|
|
818
|
+
(function (CLOUD_VOLUME_FORMAT_MOUNT) {
|
|
819
|
+
CLOUD_VOLUME_FORMAT_MOUNT["Automatic"] = "automatic";
|
|
820
|
+
CLOUD_VOLUME_FORMAT_MOUNT["Manual"] = "manual";
|
|
821
|
+
})(CLOUD_VOLUME_FORMAT_MOUNT || (exports.CLOUD_VOLUME_FORMAT_MOUNT = CLOUD_VOLUME_FORMAT_MOUNT = {}));
|
|
822
|
+
var CLOUD_VOLUME_FILESYSTEM;
|
|
823
|
+
(function (CLOUD_VOLUME_FILESYSTEM) {
|
|
824
|
+
CLOUD_VOLUME_FILESYSTEM["Ext4"] = "ext4";
|
|
825
|
+
CLOUD_VOLUME_FILESYSTEM["Xfs"] = "xfs";
|
|
826
|
+
})(CLOUD_VOLUME_FILESYSTEM || (exports.CLOUD_VOLUME_FILESYSTEM = CLOUD_VOLUME_FILESYSTEM = {}));
|
|
827
|
+
var CLOUD_SERVER_BILLING_STATUS;
|
|
828
|
+
(function (CLOUD_SERVER_BILLING_STATUS) {
|
|
829
|
+
CLOUD_SERVER_BILLING_STATUS["Active"] = "active";
|
|
830
|
+
CLOUD_SERVER_BILLING_STATUS["PastDue"] = "past_due";
|
|
831
|
+
CLOUD_SERVER_BILLING_STATUS["Unpaid"] = "unpaid";
|
|
832
|
+
})(CLOUD_SERVER_BILLING_STATUS || (exports.CLOUD_SERVER_BILLING_STATUS = CLOUD_SERVER_BILLING_STATUS = {}));
|
|
833
|
+
var CloudServerProvisionPhase;
|
|
834
|
+
(function (CloudServerProvisionPhase) {
|
|
835
|
+
CloudServerProvisionPhase["Preparing"] = "preparing";
|
|
836
|
+
CloudServerProvisionPhase["Provisioning"] = "provisioning";
|
|
837
|
+
CloudServerProvisionPhase["Ready"] = "ready";
|
|
838
|
+
CloudServerProvisionPhase["Failed"] = "failed";
|
|
839
|
+
})(CloudServerProvisionPhase || (exports.CloudServerProvisionPhase = CloudServerProvisionPhase = {}));
|
|
840
|
+
var CloudServerProvisionOperation;
|
|
841
|
+
(function (CloudServerProvisionOperation) {
|
|
842
|
+
CloudServerProvisionOperation["Create"] = "create";
|
|
843
|
+
CloudServerProvisionOperation["Retry"] = "retry";
|
|
844
|
+
CloudServerProvisionOperation["Update"] = "update";
|
|
845
|
+
})(CloudServerProvisionOperation || (exports.CloudServerProvisionOperation = CloudServerProvisionOperation = {}));
|
|
846
|
+
var CloudServerProvisionStep;
|
|
847
|
+
(function (CloudServerProvisionStep) {
|
|
848
|
+
CloudServerProvisionStep["Queued"] = "queued";
|
|
849
|
+
CloudServerProvisionStep["CreatingInstance"] = "creating-instance";
|
|
850
|
+
CloudServerProvisionStep["WaitingNetwork"] = "waiting-network";
|
|
851
|
+
CloudServerProvisionStep["Bootstrapping"] = "bootstrapping";
|
|
852
|
+
CloudServerProvisionStep["InstallingMonitoring"] = "installing-monitoring";
|
|
853
|
+
CloudServerProvisionStep["FormattingVolumes"] = "formatting-volumes";
|
|
854
|
+
CloudServerProvisionStep["Ready"] = "ready";
|
|
855
|
+
CloudServerProvisionStep["Failed"] = "failed";
|
|
856
|
+
})(CloudServerProvisionStep || (exports.CloudServerProvisionStep = CloudServerProvisionStep = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -109,8 +109,14 @@ export { default as AgentDesignSkillRevision } from "./agent-design-skill-revisi
|
|
|
109
109
|
export { default as CreditWallet } from "./credit-wallet";
|
|
110
110
|
export { default as CreditWalletTransaction } from "./credit-wallet-transaction";
|
|
111
111
|
export { default as WalletFundingPayment } from "./wallet-funding-payment";
|
|
112
|
-
export {
|
|
113
|
-
export {
|
|
112
|
+
export { default as CloudServer } from "./cloud-server";
|
|
113
|
+
export { default as CloudUsageChargeModel } from "./cloud-usage-charge";
|
|
114
|
+
export { default as CloudServerResourceModel } from "./cloud-server-resource";
|
|
115
|
+
export { default as CloudUsageReviewModel } from "./cloud-usage-review";
|
|
116
|
+
export { default as CloudUsageSourcePeriodModel } from "./cloud-usage-source-period";
|
|
117
|
+
export { default as CloudUsageSettlementModel } from "./cloud-usage-settlement";
|
|
118
|
+
export { IUser, IGit, IOrigin, IProject, IDedicatedEgress, IDatabaseProvisionProgress, IProjectAnalytics, IPreview, IProjectConnection, IProjectNetworkSettings, IRatelimit, RatelimitConfig, RateLimitZone, RateLimitMatcher, DistributedRateLimitConfig, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IPlatformApiKey, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IPaymentMethod, IDns, IDnsChangeLog, IEmailForward, IRole, IWallet, ICreditWallet, ICreditWalletTransaction, IWalletFundingPayment, ICloudServer, CloudUsageCharge, CloudServerResource, CloudUsageReview, CloudUsageSourcePeriod, CloudUsagePendingCharge, CloudUsageSettlement, CloudUsageKind, CloudUsageLine, CloudUsageStatus, ICloudServerSshKey, ICloudServerFirewallRule, ICloudServerVolume, ICloudServerNetwork, ICloudServerPoint, ICloudServerLogLine, ICloudServerProvisionProgress, IDbImage, IDbImageConnection, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, BrimbleFrameworkType, ISettings, ILoadBalancerPort, IDomainRenewal, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, BuildProviderRoute, BuildSandboxPoolConfig, BuildSandboxConfig, BuildProviderMeta, ICollabAnnotation, ICollabComment, ICollabAttachment, ICollabIntegration, ICollabSettings, ICollabShareToken, ICollabPushSubscription, IAppMessage, IInvoice, ITag, IProjectTagAssignment, ICashierSubscription, ICashierSubscriptionItem, IProjectEnvironment, IEnvironmentVariable, IProjectConfigFile, IActivityLog, IAlertRule, IAlertRuleState, IAlertEvent, IAlertNotificationResult, IDrain, IProjectDrainSubscription, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSize, ISandboxSnapshot, IBackupHistory, IDatabaseUser, IRestoreHistory, IWorkerRun, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, IPgBouncerUsageSegment, IPgBouncerUsageSegmentCosts, IObjectStorageUsageSegment, IObjectStorageUsageSegmentCosts, IObjectStorageUsageUnitsSummary, IIdempotencyRecord, IStorageBucket, IStorageBucketConnection, IStorageObject, IStorageUpload, IStorageToken, IStorageCredential, IStorageMigration, StorageTokenPermission, StorageLifecycleRule, StorageCorsRule, StorageLifecycleRuleTransition, IStreak, IStreakMilestoneRef, IStreakEvent, IStreakDay, IStreakMilestone, IQuestCampaign, IQuestCriterion, IQuestRequirement, IQuestReward, IQuestParticipation, IQuestCriterionProgress, IQuestRewardIssuance, IQuestIssuedReward, ICoupon, ICouponRedemption, ITicket, ICareerRole, IBlogPost, IChangelogEntry, IChangelogCampaign, ChangelogEmailPayloadEntry, IAgentChat, IAgentChatMessage, IAgentChatFile, IAgentChatModel, IAgentWebsite, IAgentWebsiteSnapshot, IAgentWebsiteFileOverlay, IAgentDesignSkill, IAgentDesignSkillRevision, IAgentDesignSkillFile, IAgentDesignSkillInspection, IAgentDesignSkillLicense, IConfigApply, ConfigApplyStatus, ConfigFieldDiff, ConfigFieldValue, ConfigManagedFields, ConfigPlan, ConfigResource, ConfigStep, ConfigStepKind, ConfigStepResult, } from "./types";
|
|
119
|
+
export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, AlertMetric, AlertCondition, AlertRuleState, AlertChannelMode, AlertEventStatus, DrainType, DrainStatus, LogSource, DrainEventType, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, DNS_CHANGE_TYPE, DNS_CHANGE_SOURCE, EMAIL_FORWARD_STATUS, DNS_MANAGED_BY, ServiceType, BuildUseCase, BuildMethod, BuildProviderType, BuildDispatch, SCALING_SOURCE, DatabaseEngine, DatabasePasswordChangeMode, DatabasePasswordMode, HaMemberRole, DatabaseInsightsScope, DatabaseProvisionPhase, DatabaseProvisionOperation, DatabaseProvisionStep, EmailDeadLetterStatus, JobStatus, LicenseStatus, REGION_CONTINENT, VOLUME_BACKEND, BUILD_DISABLED_BY, PROJECT_DISABLED_BY, SPENDING_LIMIT_ACTION, TEAM_ACTIVATION_STATUS, SERVER_PROTOCOL, FrameworkApplicationType, DomainRenewalStatus, DomainTransferProvider, DomainTransferDirection, DomainTransferStatus, NomadDeploymentStatus, COLLAB_ANNOTATION_STATUS, COLLAB_INTEGRATION_TYPE, COLLAB_THEME, COLLAB_TOOLBAR_POSITION, INVOICE_STATUS, INVOICE_PAYMENT_STATUS, INVOICE_TYPE, SANDBOX_TEMPLATE, SANDBOX_STATUS, SANDBOX_DESTROY_REASON, SANDBOX_EGRESS_MODE, SANDBOX_SNAPSHOT_STATUS, BACKUP_STATUS, BACKUP_DESTINATION_TYPE, DatabaseUserPermission, DatabaseUserStatus, WorkerRunStatus, WorkerRunTrigger, RESTORE_STATUS, StorageBucketStatus, StorageUploadStatus, StorageTokenStatus, PlatformApiKeyStatus, StorageCredentialRole, StorageCredentialStatus, StorageMigrationStatus, XFrameOptions, XContentTypeOptions, XRobotsTag, QualifyingActionType, MilestoneType, QUEST_COUNTABLE_MILESTONES, ACTION_TO_MILESTONE, EligibilityType, RewardType, QuestRewardStatus, QuestCriterionType, QuestEntity, QuestRequirementType, QUEST_CLAIM_REQUIREMENTS, QUEST_TARGETLESS_REQUIREMENTS, WorkbenchMode, CouponDiscountType, CouponScope, CouponRedemptionStatus, CONFIG_FILE_VISIBILITY, AGENT_CHAT_STATUS, AGENT_CHAT_MESSAGE_ROLE, AGENT_WEBSITE_STATUS, AGENT_WEBSITE_SNAPSHOT_STATUS, AGENT_DESIGN_SKILL_STATUS, AGENT_DESIGN_SKILL_TRUST_LEVEL, AGENT_DESIGN_SKILL_VERDICT, WalletOwnerType, WalletCurrency, WalletTransactionDirection, WalletTransactionType, PaymentProviderName, PaymentStatus, CLOUD_PROVIDER, CLOUD_SERVER_KIND, CLOUD_SERVER_STATUS, CLOUD_SERVER_BILLING_STATUS, CLOUD_VOLUME_FORMAT_MOUNT, CLOUD_VOLUME_FILESYSTEM, CloudServerProvisionPhase, CloudServerProvisionOperation, CloudServerProvisionStep, } from "./enum";
|
|
114
120
|
import mongoose from "mongoose";
|
|
115
121
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
|
116
122
|
export declare const db: mongoose.Connection;
|
package/dist/index.js
CHANGED
|
@@ -14,9 +14,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CollabSettings = exports.CollabIntegration = exports.CollabComment = exports.CollabAnnotation = exports.Provider = exports.Intention = exports.WebhookSetting = exports.WebhookEvent = exports.WebhookCategory = exports.DomainTransfer = exports.DomainRenewal = exports.LoadBalancerPort = exports.Settings = exports.Framework = exports.Volume = exports.Region = exports.ComputeChange = exports.AutoScalingGroup = exports.PlanConfiguration = exports.Liscense = exports.Job = exports.EmailDeadLetter = exports.DbImage = exports.Wallet = exports.Server = exports.Card = exports.Subscription = exports.Log = exports.Role = exports.PaymentMethod = exports.Member = exports.Team = exports.PlatformApiKey = exports.Token = exports.Env = exports.EmailForward = exports.DnsChangeLog = exports.Dns = exports.Domain = exports.Integration = exports.Following = exports.Ratelimit = exports.ProjectNetworkSettings = exports.ProjectConnection = exports.Preview = exports.ProjectAnalytics = exports.DeletedProject = exports.Project = exports.User = exports.ConfigApply = void 0;
|
|
16
16
|
exports.Coupon = exports.QuestRewardIssuance = exports.QuestParticipation = exports.QuestCampaign = exports.StreakMilestone = exports.StreakDay = exports.StreakEvent = exports.Streak = exports.StorageMigration = exports.StorageCredential = exports.StorageToken = exports.StorageUpload = exports.StorageObject = exports.StorageBucketConnection = exports.StorageBucket = exports.IdempotencyRecord = exports.ObjectStorageUsageSegment = exports.PgBouncerUsageSegment = exports.VolumeUsageSegment = exports.SandboxUsageSegment = exports.SandboxSnapshotUsageSegment = exports.WorkerRun = exports.RestoreHistory = exports.DatabaseUser = exports.BackupHistory = exports.SandboxSnapshot = exports.SandboxWarmPoolMember = exports.SandboxWarmPool = exports.SandboxSize = exports.SandboxImage = exports.SandboxActivity = exports.Sandbox = exports.OwnershipTransfer = exports.ProjectDrainSubscription = exports.Drain = exports.AlertEvent = exports.AlertRuleStateModel = exports.AlertRule = exports.ActivityLog = exports.ProjectConfigFile = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = exports.CashierSubscription = exports.ProjectTagAssignment = exports.Tag = exports.Invoice = exports.AppMessage = exports.CollabPushSubscription = exports.CollabShareToken = void 0;
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
17
|
+
exports.ServiceType = exports.DNS_MANAGED_BY = exports.EMAIL_FORWARD_STATUS = exports.DNS_CHANGE_SOURCE = exports.DNS_CHANGE_TYPE = exports.DNS_TYPE = exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = exports.DrainEventType = exports.LogSource = exports.DrainStatus = exports.DrainType = exports.AlertEventStatus = exports.AlertChannelMode = exports.AlertRuleState = exports.AlertCondition = exports.AlertMetric = exports.PROJECT_STATUS = exports.SUBSCRIPTION_PLAN_TYPE = exports.ROLES = exports.SERVER_STATUS = exports.ENVIRONMENT = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.GIT_TYPE = exports.CloudUsageSettlementModel = exports.CloudUsageSourcePeriodModel = exports.CloudUsageReviewModel = exports.CloudServerResourceModel = exports.CloudUsageChargeModel = exports.CloudServer = exports.WalletFundingPayment = exports.CreditWalletTransaction = exports.CreditWallet = exports.AgentDesignSkillRevision = exports.AgentDesignSkill = exports.AgentWebsiteFileOverlay = exports.AgentWebsiteSnapshot = exports.AgentWebsite = exports.AgentChatModel = exports.AgentChatFile = exports.AgentChatMessage = exports.AgentChat = exports.ChangelogCampaign = exports.ChangelogEntry = exports.BlogPost = exports.CareerRole = exports.Ticket = exports.CouponRedemption = void 0;
|
|
18
|
+
exports.StorageUploadStatus = exports.StorageBucketStatus = exports.RESTORE_STATUS = exports.WorkerRunTrigger = exports.WorkerRunStatus = exports.DatabaseUserStatus = exports.DatabaseUserPermission = exports.BACKUP_DESTINATION_TYPE = exports.BACKUP_STATUS = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_EGRESS_MODE = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = exports.COLLAB_TOOLBAR_POSITION = exports.COLLAB_THEME = exports.COLLAB_INTEGRATION_TYPE = exports.COLLAB_ANNOTATION_STATUS = exports.NomadDeploymentStatus = exports.DomainTransferStatus = exports.DomainTransferDirection = exports.DomainTransferProvider = exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SERVER_PROTOCOL = exports.TEAM_ACTIVATION_STATUS = exports.SPENDING_LIMIT_ACTION = exports.PROJECT_DISABLED_BY = exports.BUILD_DISABLED_BY = exports.VOLUME_BACKEND = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.EmailDeadLetterStatus = exports.DatabaseProvisionStep = exports.DatabaseProvisionOperation = exports.DatabaseProvisionPhase = exports.DatabaseInsightsScope = exports.HaMemberRole = exports.DatabasePasswordMode = exports.DatabasePasswordChangeMode = exports.DatabaseEngine = exports.SCALING_SOURCE = exports.BuildDispatch = exports.BuildProviderType = exports.BuildMethod = exports.BuildUseCase = void 0;
|
|
19
|
+
exports.closeMongo = exports.db = exports.connectToMongo = exports.CloudServerProvisionStep = exports.CloudServerProvisionOperation = exports.CloudServerProvisionPhase = exports.CLOUD_VOLUME_FILESYSTEM = exports.CLOUD_VOLUME_FORMAT_MOUNT = exports.CLOUD_SERVER_BILLING_STATUS = exports.CLOUD_SERVER_STATUS = exports.CLOUD_SERVER_KIND = exports.CLOUD_PROVIDER = exports.PaymentStatus = exports.PaymentProviderName = exports.WalletTransactionType = exports.WalletTransactionDirection = exports.WalletCurrency = exports.WalletOwnerType = exports.AGENT_DESIGN_SKILL_VERDICT = exports.AGENT_DESIGN_SKILL_TRUST_LEVEL = exports.AGENT_DESIGN_SKILL_STATUS = exports.AGENT_WEBSITE_SNAPSHOT_STATUS = exports.AGENT_WEBSITE_STATUS = exports.AGENT_CHAT_MESSAGE_ROLE = exports.AGENT_CHAT_STATUS = exports.CONFIG_FILE_VISIBILITY = exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.WorkbenchMode = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = exports.PlatformApiKeyStatus = exports.StorageTokenStatus = void 0;
|
|
20
|
+
exports.healthCheckMongo = void 0;
|
|
20
21
|
var config_apply_1 = require("./config-apply");
|
|
21
22
|
Object.defineProperty(exports, "ConfigApply", { enumerable: true, get: function () { return __importDefault(config_apply_1).default; } });
|
|
22
23
|
var user_1 = require("./user");
|
|
@@ -246,6 +247,18 @@ var credit_wallet_transaction_1 = require("./credit-wallet-transaction");
|
|
|
246
247
|
Object.defineProperty(exports, "CreditWalletTransaction", { enumerable: true, get: function () { return __importDefault(credit_wallet_transaction_1).default; } });
|
|
247
248
|
var wallet_funding_payment_1 = require("./wallet-funding-payment");
|
|
248
249
|
Object.defineProperty(exports, "WalletFundingPayment", { enumerable: true, get: function () { return __importDefault(wallet_funding_payment_1).default; } });
|
|
250
|
+
var cloud_server_1 = require("./cloud-server");
|
|
251
|
+
Object.defineProperty(exports, "CloudServer", { enumerable: true, get: function () { return __importDefault(cloud_server_1).default; } });
|
|
252
|
+
var cloud_usage_charge_1 = require("./cloud-usage-charge");
|
|
253
|
+
Object.defineProperty(exports, "CloudUsageChargeModel", { enumerable: true, get: function () { return __importDefault(cloud_usage_charge_1).default; } });
|
|
254
|
+
var cloud_server_resource_1 = require("./cloud-server-resource");
|
|
255
|
+
Object.defineProperty(exports, "CloudServerResourceModel", { enumerable: true, get: function () { return __importDefault(cloud_server_resource_1).default; } });
|
|
256
|
+
var cloud_usage_review_1 = require("./cloud-usage-review");
|
|
257
|
+
Object.defineProperty(exports, "CloudUsageReviewModel", { enumerable: true, get: function () { return __importDefault(cloud_usage_review_1).default; } });
|
|
258
|
+
var cloud_usage_source_period_1 = require("./cloud-usage-source-period");
|
|
259
|
+
Object.defineProperty(exports, "CloudUsageSourcePeriodModel", { enumerable: true, get: function () { return __importDefault(cloud_usage_source_period_1).default; } });
|
|
260
|
+
var cloud_usage_settlement_1 = require("./cloud-usage-settlement");
|
|
261
|
+
Object.defineProperty(exports, "CloudUsageSettlementModel", { enumerable: true, get: function () { return __importDefault(cloud_usage_settlement_1).default; } });
|
|
249
262
|
var enum_1 = require("./enum");
|
|
250
263
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
251
264
|
Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
|
|
@@ -361,6 +374,15 @@ Object.defineProperty(exports, "WalletTransactionDirection", { enumerable: true,
|
|
|
361
374
|
Object.defineProperty(exports, "WalletTransactionType", { enumerable: true, get: function () { return enum_1.WalletTransactionType; } });
|
|
362
375
|
Object.defineProperty(exports, "PaymentProviderName", { enumerable: true, get: function () { return enum_1.PaymentProviderName; } });
|
|
363
376
|
Object.defineProperty(exports, "PaymentStatus", { enumerable: true, get: function () { return enum_1.PaymentStatus; } });
|
|
377
|
+
Object.defineProperty(exports, "CLOUD_PROVIDER", { enumerable: true, get: function () { return enum_1.CLOUD_PROVIDER; } });
|
|
378
|
+
Object.defineProperty(exports, "CLOUD_SERVER_KIND", { enumerable: true, get: function () { return enum_1.CLOUD_SERVER_KIND; } });
|
|
379
|
+
Object.defineProperty(exports, "CLOUD_SERVER_STATUS", { enumerable: true, get: function () { return enum_1.CLOUD_SERVER_STATUS; } });
|
|
380
|
+
Object.defineProperty(exports, "CLOUD_SERVER_BILLING_STATUS", { enumerable: true, get: function () { return enum_1.CLOUD_SERVER_BILLING_STATUS; } });
|
|
381
|
+
Object.defineProperty(exports, "CLOUD_VOLUME_FORMAT_MOUNT", { enumerable: true, get: function () { return enum_1.CLOUD_VOLUME_FORMAT_MOUNT; } });
|
|
382
|
+
Object.defineProperty(exports, "CLOUD_VOLUME_FILESYSTEM", { enumerable: true, get: function () { return enum_1.CLOUD_VOLUME_FILESYSTEM; } });
|
|
383
|
+
Object.defineProperty(exports, "CloudServerProvisionPhase", { enumerable: true, get: function () { return enum_1.CloudServerProvisionPhase; } });
|
|
384
|
+
Object.defineProperty(exports, "CloudServerProvisionOperation", { enumerable: true, get: function () { return enum_1.CloudServerProvisionOperation; } });
|
|
385
|
+
Object.defineProperty(exports, "CloudServerProvisionStep", { enumerable: true, get: function () { return enum_1.CloudServerProvisionStep; } });
|
|
364
386
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
365
387
|
const utils_1 = require("@brimble/utils");
|
|
366
388
|
const connectToMongo = (mongoUrl, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -55,6 +55,7 @@ const PlanConfigurationSchema = new mongoose_1.Schema({
|
|
|
55
55
|
view_metrics: { type: Boolean, required: false, default: false },
|
|
56
56
|
custom_domain: { type: Boolean, required: true, default: false },
|
|
57
57
|
wildcard_domain: { type: Boolean, required: true, default: false },
|
|
58
|
+
edge_domain_limit: { type: Number, required: false, default: 2 },
|
|
58
59
|
email_forwarding_enabled: { type: Boolean, required: true, default: false },
|
|
59
60
|
webhook_enabled: { type: Boolean, required: true, default: false },
|
|
60
61
|
can_deploy_all_applications: {
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { CLOUD_PROVIDER, CLOUD_SERVER_BILLING_STATUS, CLOUD_SERVER_KIND, CLOUD_SERVER_STATUS, CLOUD_VOLUME_FILESYSTEM, CLOUD_VOLUME_FORMAT_MOUNT, CloudServerProvisionOperation, CloudServerProvisionPhase, CloudServerProvisionStep } from "../enum";
|
|
3
|
+
import { ITeam } from "./team";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
export interface ICloudServerProvisionProgress {
|
|
6
|
+
phase: CloudServerProvisionPhase;
|
|
7
|
+
message: string;
|
|
8
|
+
step: CloudServerProvisionStep;
|
|
9
|
+
operation: CloudServerProvisionOperation;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
}
|
|
12
|
+
export interface ICloudServerSshKey {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
publicKey: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ICloudServerFirewallRule {
|
|
18
|
+
id: string;
|
|
19
|
+
action: "accept" | "deny";
|
|
20
|
+
protocol: string;
|
|
21
|
+
port: number;
|
|
22
|
+
cidr: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ICloudServerVolume {
|
|
25
|
+
id: string;
|
|
26
|
+
name: string;
|
|
27
|
+
sizeGb: number;
|
|
28
|
+
formatMount: CLOUD_VOLUME_FORMAT_MOUNT;
|
|
29
|
+
filesystem: CLOUD_VOLUME_FILESYSTEM | null;
|
|
30
|
+
}
|
|
31
|
+
export interface ICloudServerNetwork {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
cidr: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ICloudServerPoint {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ICloudServerLogLine {
|
|
42
|
+
at: string;
|
|
43
|
+
message: string;
|
|
44
|
+
}
|
|
45
|
+
export interface ICloudServer extends Document {
|
|
46
|
+
name: string;
|
|
47
|
+
user_id: IUser | Types.ObjectId;
|
|
48
|
+
team: ITeam | Types.ObjectId | null;
|
|
49
|
+
provider: CLOUD_PROVIDER;
|
|
50
|
+
kind: CLOUD_SERVER_KIND;
|
|
51
|
+
zone: string;
|
|
52
|
+
region: string;
|
|
53
|
+
size: string;
|
|
54
|
+
sku: string;
|
|
55
|
+
image: string;
|
|
56
|
+
status: CLOUD_SERVER_STATUS;
|
|
57
|
+
billing_status: CLOUD_SERVER_BILLING_STATUS;
|
|
58
|
+
username: string;
|
|
59
|
+
public_ip: string | null;
|
|
60
|
+
private_ip: string | null;
|
|
61
|
+
provider_resource_id: string | null;
|
|
62
|
+
console_url: string | null;
|
|
63
|
+
password_ciphertext: string | null;
|
|
64
|
+
brimble_public_key: string | null;
|
|
65
|
+
brimble_key_ciphertext: string | null;
|
|
66
|
+
subscription_id: string | null;
|
|
67
|
+
stripe_subscription_id: string | null;
|
|
68
|
+
last_error: string | null;
|
|
69
|
+
provider_monthly_price: number;
|
|
70
|
+
monthly_price: number;
|
|
71
|
+
vcpu: number;
|
|
72
|
+
memory_mb: number;
|
|
73
|
+
disk_gb: number;
|
|
74
|
+
bandwidth_gb: number;
|
|
75
|
+
ssh_keys: ICloudServerSshKey[];
|
|
76
|
+
firewall: ICloudServerFirewallRule[];
|
|
77
|
+
volumes: ICloudServerVolume[];
|
|
78
|
+
networks: ICloudServerNetwork[];
|
|
79
|
+
snapshots: ICloudServerPoint[];
|
|
80
|
+
backups: ICloudServerPoint[];
|
|
81
|
+
system_logs: ICloudServerLogLine[];
|
|
82
|
+
provisionProgress?: ICloudServerProvisionProgress | null;
|
|
83
|
+
created_at: Date;
|
|
84
|
+
updated_at: Date;
|
|
85
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CLOUD_PROVIDER } from "../enum";
|
|
2
|
+
export type CloudUsageKind = "snapshot" | "traffic" | "publicIp" | "performance" | "backup" | "fixed" | "unknown";
|
|
3
|
+
export type CloudUsageStatus = "ready" | "excluded" | "unmatched" | "review";
|
|
4
|
+
export type CloudUsageLine = {
|
|
5
|
+
provider: CLOUD_PROVIDER;
|
|
6
|
+
billingAccount: string;
|
|
7
|
+
lineId: string;
|
|
8
|
+
resourceId: string | null;
|
|
9
|
+
kind: CloudUsageKind;
|
|
10
|
+
description: string;
|
|
11
|
+
chargeStart: Date;
|
|
12
|
+
chargeEnd: Date;
|
|
13
|
+
currency: string;
|
|
14
|
+
amount: string;
|
|
15
|
+
finalized: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type CloudUsageCharge = CloudUsageLine & {
|
|
18
|
+
month: string;
|
|
19
|
+
serverId: string | null;
|
|
20
|
+
status: CloudUsageStatus;
|
|
21
|
+
importedAt: Date;
|
|
22
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CloudUsageKind } from "./cloud-usage-charge";
|
|
2
|
+
import { CLOUD_PROVIDER } from "../enum";
|
|
3
|
+
export type CloudUsageReview = {
|
|
4
|
+
provider: CLOUD_PROVIDER;
|
|
5
|
+
billingAccount: string;
|
|
6
|
+
lineId: string;
|
|
7
|
+
sourceFingerprint: string;
|
|
8
|
+
kind: CloudUsageKind;
|
|
9
|
+
serverId: string | null;
|
|
10
|
+
reviewer: string;
|
|
11
|
+
reason: string;
|
|
12
|
+
reviewedAt: Date;
|
|
13
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type CloudUsagePendingCharge = {
|
|
2
|
+
id: string;
|
|
3
|
+
amountUsdCents: number;
|
|
4
|
+
targetUsdCents: number;
|
|
5
|
+
};
|
|
6
|
+
export type CloudUsageSettlement = {
|
|
7
|
+
serverId: string;
|
|
8
|
+
month: string;
|
|
9
|
+
postedUsdCents: number;
|
|
10
|
+
pending: CloudUsagePendingCharge | null;
|
|
11
|
+
};
|
|
@@ -20,6 +20,7 @@ export interface IDomain extends Document {
|
|
|
20
20
|
renewal_price: number;
|
|
21
21
|
job_identifier: string;
|
|
22
22
|
cloudflare_custom_hostname_id?: string;
|
|
23
|
+
cloudflare_custom_hostname_status?: string;
|
|
23
24
|
trigger_created: boolean;
|
|
24
25
|
trigger_created_at: string;
|
|
25
26
|
nameservers: string[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -108,4 +108,10 @@ export type { IAgentWebsiteSnapshot } from "./agent-website-snapshot";
|
|
|
108
108
|
export type { IAgentWebsiteFileOverlay } from "./agent-website-file-overlay";
|
|
109
109
|
export type { IAgentDesignSkill } from "./agent-design-skill";
|
|
110
110
|
export type { IAgentDesignSkillFile, IAgentDesignSkillInspection, IAgentDesignSkillLicense, IAgentDesignSkillRevision, } from "./agent-design-skill-revision";
|
|
111
|
+
export type { ICloudServer, ICloudServerFirewallRule, ICloudServerLogLine, ICloudServerNetwork, ICloudServerPoint, ICloudServerProvisionProgress, ICloudServerSshKey, ICloudServerVolume, } from "./cloud-server";
|
|
111
112
|
export * from "./config-apply";
|
|
113
|
+
export type { CloudUsageCharge, CloudUsageKind, CloudUsageLine, CloudUsageStatus, } from "./cloud-usage-charge";
|
|
114
|
+
export type { CloudServerResource } from "./cloud-server-resource";
|
|
115
|
+
export type { CloudUsageReview } from "./cloud-usage-review";
|
|
116
|
+
export type { CloudUsageSourcePeriod } from "./cloud-usage-source-period";
|
|
117
|
+
export type { CloudUsagePendingCharge, CloudUsageSettlement } from "./cloud-usage-settlement";
|
|
@@ -47,6 +47,7 @@ export interface IPlanConfiguration extends Document {
|
|
|
47
47
|
token_request: number;
|
|
48
48
|
custom_domain: boolean;
|
|
49
49
|
wildcard_domain: boolean;
|
|
50
|
+
edge_domain_limit: number | null;
|
|
50
51
|
email_forwarding_enabled: boolean;
|
|
51
52
|
unlimited_projects: boolean;
|
|
52
53
|
webhook_enabled: boolean;
|