@brimble/models 3.8.186 → 3.8.189
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/changelog-campaign.ts +19 -5
- package/changelog-entry.ts +12 -2
- package/dist/agent-chat-file.js +5 -1
- package/dist/agent-chat-model.js +1 -1
- package/dist/agent-design-skill-revision.js +15 -3
- package/dist/agent-design-skill.js +5 -1
- package/dist/agent-website-file-overlay.js +5 -1
- package/dist/agent-website-snapshot.js +5 -1
- package/dist/app-message.js +12 -2
- package/dist/blog-post.js +7 -1
- package/dist/career-role.js +7 -1
- package/dist/cashier_subscription.js +1 -1
- package/dist/changelog-campaign.js +15 -4
- package/dist/changelog-entry.js +12 -2
- package/dist/collab-annotation.js +6 -1
- package/dist/collab-comment.js +6 -1
- package/dist/collab-integration.js +6 -1
- package/dist/collab-push-subscription.js +10 -2
- package/dist/collab-share-token.js +6 -1
- package/dist/coupon-redemption.js +16 -3
- package/dist/coupon.js +16 -3
- package/dist/db-image.js +6 -6
- package/dist/domain/index.js +1 -1
- package/dist/domain/renewal.js +1 -1
- package/dist/drain.js +28 -5
- package/dist/enum/index.d.ts +2 -1
- package/dist/enum/index.js +1 -0
- package/dist/environment-variable.js +5 -1
- package/dist/framework.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/logs.js +2 -2
- package/dist/member.js +3 -1
- package/dist/object-storage-usage-segment.js +10 -2
- package/dist/pgbouncer-usage-segment.js +10 -2
- package/dist/plan_configuration.js +9 -5
- package/dist/platform-api-key.js +17 -3
- package/dist/project/index.js +11 -7
- package/dist/project-drain-subscription.js +12 -2
- package/dist/project-network-settings.js +15 -3
- package/dist/project_analytics.js +6 -1
- package/dist/quest-campaign.js +4 -1
- package/dist/quest-participation.js +16 -3
- package/dist/quest-reward-issuance.js +27 -5
- package/dist/sandbox-snapshot-usage-segment.js +10 -2
- package/dist/sandbox-warm-pool.js +4 -1
- package/dist/sandbox.js +1 -1
- package/dist/server.js +1 -1
- package/dist/settings.js +1 -1
- package/dist/storage.js +178 -30
- package/dist/streak-day.js +10 -2
- package/dist/streak-event.js +10 -2
- package/dist/streak-milestone.js +10 -2
- package/dist/streak.js +11 -2
- package/dist/subscription.js +2 -2
- package/dist/team.js +1 -1
- package/dist/ticket.js +6 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/plan_configuration.d.ts +2 -2
- package/dist/user.js +8 -2
- package/dist/volume.js +2 -2
- package/dist/wallet.js +2 -2
- package/dist/webhook-category.js +1 -1
- package/dist/webhook-setting.js +1 -1
- package/package.json +1 -1
package/dist/logs.js
CHANGED
|
@@ -17,8 +17,8 @@ const LogSchema = new mongoose_1.Schema({
|
|
|
17
17
|
},
|
|
18
18
|
source: {
|
|
19
19
|
type: String,
|
|
20
|
-
enum: [
|
|
21
|
-
default:
|
|
20
|
+
enum: ["drop", "git", "pull_request", "debug_assistant", "system"],
|
|
21
|
+
default: "git",
|
|
22
22
|
},
|
|
23
23
|
user: {
|
|
24
24
|
ref: "User",
|
package/dist/member.js
CHANGED
|
@@ -30,7 +30,9 @@ const memberSchema = new mongoose_1.Schema({
|
|
|
30
30
|
default: false,
|
|
31
31
|
},
|
|
32
32
|
permissions: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "MemberPermission" }],
|
|
33
|
-
project_environments: [
|
|
33
|
+
project_environments: [
|
|
34
|
+
{ type: mongoose_1.Schema.Types.ObjectId, ref: "ProjectEnvironment" },
|
|
35
|
+
],
|
|
34
36
|
}, {
|
|
35
37
|
timestamps: {
|
|
36
38
|
createdAt: "created_at",
|
|
@@ -35,8 +35,16 @@ const objectStorageUsageSegmentSchema = new mongoose_1.Schema({
|
|
|
35
35
|
}, {
|
|
36
36
|
timestamps: true,
|
|
37
37
|
});
|
|
38
|
-
objectStorageUsageSegmentSchema.index({
|
|
39
|
-
|
|
38
|
+
objectStorageUsageSegmentSchema.index({
|
|
39
|
+
user_id: 1,
|
|
40
|
+
billed: 1,
|
|
41
|
+
"costs.endDate": 1,
|
|
42
|
+
});
|
|
43
|
+
objectStorageUsageSegmentSchema.index({
|
|
44
|
+
team_id: 1,
|
|
45
|
+
billed: 1,
|
|
46
|
+
"costs.endDate": 1,
|
|
47
|
+
});
|
|
40
48
|
objectStorageUsageSegmentSchema.index({ bucket_id: 1, "costs.endDate": 1 });
|
|
41
49
|
objectStorageUsageSegmentSchema.index({ bucket_id: 1 }, {
|
|
42
50
|
unique: true,
|
|
@@ -32,8 +32,16 @@ const pgbouncerUsageSegmentSchema = new mongoose_1.Schema({
|
|
|
32
32
|
}, {
|
|
33
33
|
timestamps: true,
|
|
34
34
|
});
|
|
35
|
-
pgbouncerUsageSegmentSchema.index({
|
|
36
|
-
|
|
35
|
+
pgbouncerUsageSegmentSchema.index({
|
|
36
|
+
user_id: 1,
|
|
37
|
+
billed: 1,
|
|
38
|
+
"costs.endDate": 1,
|
|
39
|
+
});
|
|
40
|
+
pgbouncerUsageSegmentSchema.index({
|
|
41
|
+
team_id: 1,
|
|
42
|
+
billed: 1,
|
|
43
|
+
"costs.endDate": 1,
|
|
44
|
+
});
|
|
37
45
|
pgbouncerUsageSegmentSchema.index({ project_id: 1, "costs.endDate": 1 });
|
|
38
46
|
pgbouncerUsageSegmentSchema.index({ project_id: 1 }, {
|
|
39
47
|
unique: true,
|
|
@@ -44,19 +44,24 @@ const PlanConfigurationSchema = new mongoose_1.Schema({
|
|
|
44
44
|
view_metrics: { type: Boolean, required: false, default: false },
|
|
45
45
|
custom_domain: { type: Boolean, required: true, default: false },
|
|
46
46
|
wildcard_domain: { type: Boolean, required: true, default: false },
|
|
47
|
+
email_forwarding_enabled: { type: Boolean, required: true, default: false },
|
|
47
48
|
webhook_enabled: { type: Boolean, required: true, default: false },
|
|
48
|
-
can_deploy_all_applications: {
|
|
49
|
+
can_deploy_all_applications: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
required: true,
|
|
52
|
+
default: false,
|
|
53
|
+
},
|
|
49
54
|
stripe_prices: { type: mongoose_1.Schema.Types.Mixed, required: false, default: {} },
|
|
50
55
|
sandbox_max_count: { type: Number, required: false, default: 3 },
|
|
51
|
-
|
|
56
|
+
sandbox_hours_max: { type: Number, required: false, default: 16 },
|
|
52
57
|
sandbox_enabled: { type: Boolean, required: false, default: true },
|
|
53
58
|
sandbox_cpu_hours_included: { type: Number, default: 0 },
|
|
54
59
|
sandbox_memory_gb_hours_included: { type: Number, default: 0 },
|
|
55
60
|
sandbox_max_runtime_minutes: { type: Number, default: 0 },
|
|
56
61
|
sandbox_max_vcpu: { type: Number, default: 0 },
|
|
57
62
|
sandbox_max_memory_gb: { type: Number, default: 0 },
|
|
58
|
-
sandbox_default_size: { type: String, default:
|
|
59
|
-
sandbox_allowed_sizes: { type: [String], default: [
|
|
63
|
+
sandbox_default_size: { type: String, default: "sbx.micro" },
|
|
64
|
+
sandbox_allowed_sizes: { type: [String], default: ["sbx.micro"] },
|
|
60
65
|
sandbox_warm_pool_count: { type: Number, default: 5 },
|
|
61
66
|
sandbox_creation_rate_per_minute: { type: Number, default: 0 },
|
|
62
67
|
sandbox_cpu_overage_price: { type: Number, default: 0 },
|
|
@@ -70,6 +75,5 @@ const PlanConfigurationSchema = new mongoose_1.Schema({
|
|
|
70
75
|
agent_chat_enabled: { type: Boolean, default: false },
|
|
71
76
|
agent_chat_tokens_per_session: { type: Number, default: 0 },
|
|
72
77
|
agent_chats_per_day: { type: Number, default: 0 },
|
|
73
|
-
email_forward_limit: { type: Number, default: 1 },
|
|
74
78
|
}, { timestamps: true });
|
|
75
79
|
exports.default = (0, mongoose_1.model)("PlanConfigurations", PlanConfigurationSchema, "plan_configurations");
|
package/dist/platform-api-key.js
CHANGED
|
@@ -6,9 +6,23 @@ const platformApiKeySchema = new mongoose_1.Schema({
|
|
|
6
6
|
name: { type: String, required: true, trim: true, maxlength: 100 },
|
|
7
7
|
key_id: { type: String, required: true, unique: true, index: true },
|
|
8
8
|
key_prefix: { type: String, required: true },
|
|
9
|
-
owner_id: {
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
owner_id: {
|
|
10
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
11
|
+
ref: "User",
|
|
12
|
+
required: true,
|
|
13
|
+
index: true,
|
|
14
|
+
},
|
|
15
|
+
team_id: {
|
|
16
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
17
|
+
ref: "Team",
|
|
18
|
+
default: null,
|
|
19
|
+
index: true,
|
|
20
|
+
},
|
|
21
|
+
subscription_id: {
|
|
22
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
23
|
+
ref: "Subscription",
|
|
24
|
+
default: null,
|
|
25
|
+
},
|
|
12
26
|
permissions: { type: [String], required: true },
|
|
13
27
|
status: {
|
|
14
28
|
type: String,
|
package/dist/project/index.js
CHANGED
|
@@ -22,7 +22,7 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
22
22
|
http2: {
|
|
23
23
|
type: Boolean,
|
|
24
24
|
default: false,
|
|
25
|
-
required: false
|
|
25
|
+
required: false,
|
|
26
26
|
},
|
|
27
27
|
healthCheckPath: {
|
|
28
28
|
type: String,
|
|
@@ -46,7 +46,7 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
46
46
|
},
|
|
47
47
|
workBenchEnabled: {
|
|
48
48
|
type: Boolean,
|
|
49
|
-
default: false
|
|
49
|
+
default: false,
|
|
50
50
|
},
|
|
51
51
|
domains: [
|
|
52
52
|
{
|
|
@@ -95,7 +95,7 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
95
95
|
},
|
|
96
96
|
tlsEnabled: {
|
|
97
97
|
type: Boolean,
|
|
98
|
-
default: false
|
|
98
|
+
default: false,
|
|
99
99
|
},
|
|
100
100
|
pgbouncerEnabled: {
|
|
101
101
|
type: Boolean,
|
|
@@ -319,7 +319,7 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
319
319
|
public: {
|
|
320
320
|
type: Boolean,
|
|
321
321
|
default: true,
|
|
322
|
-
required: false
|
|
322
|
+
required: false,
|
|
323
323
|
},
|
|
324
324
|
screenshot: {
|
|
325
325
|
image: String,
|
|
@@ -411,7 +411,11 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
411
411
|
haCluster: {
|
|
412
412
|
type: {
|
|
413
413
|
clusterName: { type: String, required: true },
|
|
414
|
-
regions: {
|
|
414
|
+
regions: {
|
|
415
|
+
type: [mongoose_1.Schema.Types.ObjectId],
|
|
416
|
+
ref: "Region",
|
|
417
|
+
default: undefined,
|
|
418
|
+
},
|
|
415
419
|
members: [
|
|
416
420
|
{
|
|
417
421
|
index: { type: Number, required: true },
|
|
@@ -512,12 +516,12 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
512
516
|
},
|
|
513
517
|
persistent_mount_path: {
|
|
514
518
|
type: String,
|
|
515
|
-
required: false
|
|
519
|
+
required: false,
|
|
516
520
|
},
|
|
517
521
|
sendReport: {
|
|
518
522
|
type: Boolean,
|
|
519
523
|
default: false,
|
|
520
|
-
required: false
|
|
524
|
+
required: false,
|
|
521
525
|
},
|
|
522
526
|
volumeMount: {
|
|
523
527
|
type: String,
|
|
@@ -2,8 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const ProjectDrainSubscriptionSchema = new mongoose_1.Schema({
|
|
5
|
-
drain: {
|
|
6
|
-
|
|
5
|
+
drain: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "Drain",
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
project: {
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
13
|
+
ref: "Project",
|
|
14
|
+
required: true,
|
|
15
|
+
index: true,
|
|
16
|
+
},
|
|
7
17
|
enabled: { type: Boolean, default: true },
|
|
8
18
|
disabledAt: { type: Date, default: null },
|
|
9
19
|
}, { timestamps: true });
|
|
@@ -15,9 +15,21 @@ const projectNetworkSettingsSchema = new mongoose_1.Schema({
|
|
|
15
15
|
bypassCache: { type: Boolean, default: false },
|
|
16
16
|
},
|
|
17
17
|
responseRules: {
|
|
18
|
-
xFrameOptions: {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
xFrameOptions: {
|
|
19
|
+
type: String,
|
|
20
|
+
enum: Object.values(enum_1.XFrameOptions),
|
|
21
|
+
default: enum_1.XFrameOptions.Deny,
|
|
22
|
+
},
|
|
23
|
+
xContentTypeOptions: {
|
|
24
|
+
type: String,
|
|
25
|
+
enum: Object.values(enum_1.XContentTypeOptions),
|
|
26
|
+
default: enum_1.XContentTypeOptions.NoSniff,
|
|
27
|
+
},
|
|
28
|
+
xRobotsTag: {
|
|
29
|
+
type: String,
|
|
30
|
+
enum: Object.values(enum_1.XRobotsTag),
|
|
31
|
+
default: enum_1.XRobotsTag.IndexFollow,
|
|
32
|
+
},
|
|
21
33
|
hstsEnabled: { type: Boolean, default: false },
|
|
22
34
|
markdownForAgents: { type: Boolean, default: false },
|
|
23
35
|
},
|
|
@@ -9,7 +9,12 @@ const ProjectAnalyticsSchema = new mongoose_1.Schema({
|
|
|
9
9
|
unique: true,
|
|
10
10
|
index: true,
|
|
11
11
|
},
|
|
12
|
-
provider: {
|
|
12
|
+
provider: {
|
|
13
|
+
type: String,
|
|
14
|
+
enum: ["umami"],
|
|
15
|
+
required: true,
|
|
16
|
+
default: "umami",
|
|
17
|
+
},
|
|
13
18
|
websiteId: { type: String, required: true, unique: true },
|
|
14
19
|
shareId: { type: String, default: null },
|
|
15
20
|
domain: { type: String, required: true },
|
package/dist/quest-campaign.js
CHANGED
|
@@ -34,6 +34,9 @@ const questCampaignSchema = new mongoose_1.Schema({
|
|
|
34
34
|
rewards: { type: [questRewardSchema], default: [] },
|
|
35
35
|
active: { type: Boolean, default: true, index: true },
|
|
36
36
|
auto_expire: { type: Boolean, default: true },
|
|
37
|
-
}, {
|
|
37
|
+
}, {
|
|
38
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
39
|
+
collection: "quest_campaigns",
|
|
40
|
+
});
|
|
38
41
|
questCampaignSchema.index({ active: 1, start_at: 1, end_at: 1 });
|
|
39
42
|
exports.default = (0, mongoose_1.model)("QuestCampaign", questCampaignSchema);
|
|
@@ -8,14 +8,27 @@ const questCriterionProgressSchema = new mongoose_1.Schema({
|
|
|
8
8
|
met: { type: Boolean, default: false },
|
|
9
9
|
}, { _id: false });
|
|
10
10
|
const questParticipationSchema = new mongoose_1.Schema({
|
|
11
|
-
campaign_id: {
|
|
12
|
-
|
|
11
|
+
campaign_id: {
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
13
|
+
ref: "QuestCampaign",
|
|
14
|
+
required: true,
|
|
15
|
+
index: true,
|
|
16
|
+
},
|
|
17
|
+
user_id: {
|
|
18
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
19
|
+
ref: "User",
|
|
20
|
+
required: true,
|
|
21
|
+
index: true,
|
|
22
|
+
},
|
|
13
23
|
joined_at: { type: Date, required: true },
|
|
14
24
|
slot_number: { type: Number, required: true },
|
|
15
25
|
streak_deducted: { type: Number, default: 0 },
|
|
16
26
|
criteria_progress: { type: [questCriterionProgressSchema], default: [] },
|
|
17
27
|
qualifier_met: { type: Boolean, default: false },
|
|
18
28
|
claimed_at: { type: Date, default: null },
|
|
19
|
-
}, {
|
|
29
|
+
}, {
|
|
30
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
31
|
+
collection: "quest_participations",
|
|
32
|
+
});
|
|
20
33
|
questParticipationSchema.index({ campaign_id: 1, user_id: 1 }, { unique: true });
|
|
21
34
|
exports.default = (0, mongoose_1.model)("QuestParticipation", questParticipationSchema);
|
|
@@ -7,13 +7,35 @@ const questIssuedRewardSchema = new mongoose_1.Schema({
|
|
|
7
7
|
metadata: { type: mongoose_1.Schema.Types.Mixed, default: {} },
|
|
8
8
|
}, { _id: false });
|
|
9
9
|
const questRewardIssuanceSchema = new mongoose_1.Schema({
|
|
10
|
-
participation_id: {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
participation_id: {
|
|
11
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
12
|
+
ref: "QuestParticipation",
|
|
13
|
+
required: true,
|
|
14
|
+
index: true,
|
|
15
|
+
},
|
|
16
|
+
campaign_id: {
|
|
17
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
18
|
+
ref: "QuestCampaign",
|
|
19
|
+
required: true,
|
|
20
|
+
index: true,
|
|
21
|
+
},
|
|
22
|
+
user_id: {
|
|
23
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
24
|
+
ref: "User",
|
|
25
|
+
required: true,
|
|
26
|
+
index: true,
|
|
27
|
+
},
|
|
13
28
|
rewards: { type: [questIssuedRewardSchema], default: [] },
|
|
14
|
-
status: {
|
|
29
|
+
status: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true,
|
|
32
|
+
default: enum_1.QuestRewardStatus.Claimed,
|
|
33
|
+
},
|
|
15
34
|
claimed_at: { type: Date, required: true },
|
|
16
35
|
fulfilled_at: { type: Date, default: null },
|
|
17
|
-
}, {
|
|
36
|
+
}, {
|
|
37
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
38
|
+
collection: "quest_reward_issuances",
|
|
39
|
+
});
|
|
18
40
|
questRewardIssuanceSchema.index({ campaign_id: 1, user_id: 1 }, { unique: true });
|
|
19
41
|
exports.default = (0, mongoose_1.model)("QuestRewardIssuance", questRewardIssuanceSchema);
|
|
@@ -38,8 +38,16 @@ const sandboxSnapshotUsageSegmentSchema = new mongoose_1.Schema({
|
|
|
38
38
|
}, {
|
|
39
39
|
timestamps: true,
|
|
40
40
|
});
|
|
41
|
-
sandboxSnapshotUsageSegmentSchema.index({
|
|
42
|
-
|
|
41
|
+
sandboxSnapshotUsageSegmentSchema.index({
|
|
42
|
+
user_id: 1,
|
|
43
|
+
billed: 1,
|
|
44
|
+
"costs.endDate": 1,
|
|
45
|
+
});
|
|
46
|
+
sandboxSnapshotUsageSegmentSchema.index({
|
|
47
|
+
team_id: 1,
|
|
48
|
+
billed: 1,
|
|
49
|
+
"costs.endDate": 1,
|
|
50
|
+
});
|
|
43
51
|
sandboxSnapshotUsageSegmentSchema.index({ snapshot_id: 1, "costs.endDate": 1 });
|
|
44
52
|
sandboxSnapshotUsageSegmentSchema.index({ snapshot_id: 1 }, {
|
|
45
53
|
unique: true,
|
|
@@ -11,6 +11,9 @@ const sandboxWarmPoolSchema = new mongoose_1.Schema({
|
|
|
11
11
|
mem_mb: { type: Number, required: true },
|
|
12
12
|
image_tag: { type: String, default: "" },
|
|
13
13
|
target_count: { type: Number, required: true },
|
|
14
|
-
}, {
|
|
14
|
+
}, {
|
|
15
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
16
|
+
_id: false,
|
|
17
|
+
});
|
|
15
18
|
sandboxWarmPoolSchema.index({ region: 1, size: 1 });
|
|
16
19
|
exports.default = (0, mongoose_1.model)("SandboxWarmPool", sandboxWarmPoolSchema, "sandbox_warm_pools");
|
package/dist/sandbox.js
CHANGED
package/dist/server.js
CHANGED