@brimble/models 3.8.186 → 3.8.188
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/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/streak-event.js
CHANGED
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const streakEventSchema = new mongoose_1.Schema({
|
|
5
|
-
user_id: {
|
|
5
|
+
user_id: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "User",
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
6
11
|
action_type: {
|
|
7
12
|
type: String,
|
|
8
13
|
required: true,
|
|
@@ -12,7 +17,10 @@ const streakEventSchema = new mongoose_1.Schema({
|
|
|
12
17
|
service_type: { type: String, default: null },
|
|
13
18
|
system_day: { type: Date, required: true, index: true },
|
|
14
19
|
dedupe_key: { type: String, required: true, unique: true },
|
|
15
|
-
}, {
|
|
20
|
+
}, {
|
|
21
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
22
|
+
collection: "streak_events",
|
|
23
|
+
});
|
|
16
24
|
streakEventSchema.index({ user_id: 1, system_day: 1 });
|
|
17
25
|
streakEventSchema.index({ user_id: 1, action_type: 1, created_at: 1 });
|
|
18
26
|
exports.default = (0, mongoose_1.model)("StreakEvent", streakEventSchema);
|
package/dist/streak-milestone.js
CHANGED
|
@@ -2,10 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const streakMilestoneSchema = new mongoose_1.Schema({
|
|
5
|
-
user_id: {
|
|
5
|
+
user_id: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "User",
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
6
11
|
type: { type: String, required: true },
|
|
7
12
|
action: { type: String, required: true },
|
|
8
13
|
date: { type: Date, required: true },
|
|
9
|
-
}, {
|
|
14
|
+
}, {
|
|
15
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
16
|
+
collection: "streak_milestones",
|
|
17
|
+
});
|
|
10
18
|
streakMilestoneSchema.index({ user_id: 1, type: 1, date: 1 }, { unique: true });
|
|
11
19
|
exports.default = (0, mongoose_1.model)("StreakMilestone", streakMilestoneSchema);
|
package/dist/streak.js
CHANGED
|
@@ -6,12 +6,21 @@ const streakMilestoneRefSchema = new mongoose_1.Schema({
|
|
|
6
6
|
date: { type: Date, required: true },
|
|
7
7
|
}, { _id: false });
|
|
8
8
|
const streakSchema = new mongoose_1.Schema({
|
|
9
|
-
user_id: {
|
|
9
|
+
user_id: {
|
|
10
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
11
|
+
ref: "User",
|
|
12
|
+
required: true,
|
|
13
|
+
unique: true,
|
|
14
|
+
index: true,
|
|
15
|
+
},
|
|
10
16
|
current_count: { type: Number, default: 0 },
|
|
11
17
|
longest_count: { type: Number, default: 0 },
|
|
12
18
|
last_active_day: { type: Date, default: null },
|
|
13
19
|
last_processed_day: { type: Date, default: null },
|
|
14
20
|
last_milestone: { type: streakMilestoneRefSchema, default: null },
|
|
15
21
|
last_streak_email_day: { type: Date, default: null },
|
|
16
|
-
}, {
|
|
22
|
+
}, {
|
|
23
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
24
|
+
collection: "streaks",
|
|
25
|
+
});
|
|
17
26
|
exports.default = (0, mongoose_1.model)("Streak", streakSchema);
|
package/dist/subscription.js
CHANGED
|
@@ -9,7 +9,7 @@ const subscriptionSchema = new mongoose_1.Schema({
|
|
|
9
9
|
},
|
|
10
10
|
due_amount: {
|
|
11
11
|
type: Number,
|
|
12
|
-
default: 0
|
|
12
|
+
default: 0,
|
|
13
13
|
},
|
|
14
14
|
team_id: {
|
|
15
15
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -55,7 +55,7 @@ const subscriptionSchema = new mongoose_1.Schema({
|
|
|
55
55
|
transaction_retries: Number,
|
|
56
56
|
downgraded: {
|
|
57
57
|
default: false,
|
|
58
|
-
type: Boolean
|
|
58
|
+
type: Boolean,
|
|
59
59
|
},
|
|
60
60
|
is_pending_downgrade: {
|
|
61
61
|
type: Boolean,
|
package/dist/team.js
CHANGED
package/dist/ticket.js
CHANGED
|
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const ticketSchema = new mongoose_1.Schema({
|
|
5
5
|
airtable_id: { type: String, required: true, unique: true, index: true },
|
|
6
|
-
user_id: {
|
|
6
|
+
user_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "User",
|
|
9
|
+
required: true,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
7
12
|
email: { type: String, required: true },
|
|
8
13
|
subject: { type: String, required: true },
|
|
9
14
|
message: { type: String, required: true },
|
package/dist/types/index.d.ts
CHANGED
|
@@ -56,7 +56,7 @@ export type { IAppMessage } from "./app-message";
|
|
|
56
56
|
export type { IInvoice } from "./invoice";
|
|
57
57
|
export type { IProjectTagAssignment } from "./project-tag-assignment";
|
|
58
58
|
export type { ITag } from "./tag";
|
|
59
|
-
export type { ICashierSubscription, ICashierSubscriptionItem } from "./cashier_subscription";
|
|
59
|
+
export type { ICashierSubscription, ICashierSubscriptionItem, } from "./cashier_subscription";
|
|
60
60
|
export type { IProjectEnvironment } from "./project-environment";
|
|
61
61
|
export type { IEnvironmentVariable } from "./environment-variable";
|
|
62
62
|
export type { IProjectConfigFile } from "./project-config-file";
|
|
@@ -89,14 +89,14 @@ export type { IStreakMilestone } from "./streak-milestone";
|
|
|
89
89
|
export type { IQuestCampaign, IQuestCriterion, IQuestRequirement, IQuestReward, } from "./quest-campaign";
|
|
90
90
|
export type { IQuestParticipation, IQuestCriterionProgress, } from "./quest-participation";
|
|
91
91
|
export type { IQuestRewardIssuance, IQuestIssuedReward, } from "./quest-reward-issuance";
|
|
92
|
-
export type { IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, IStorageCredential, IStorageMigration, StorageTokenPermission, StorageLifecycleRule, StorageCorsRule, StorageLifecycleRuleTransition } from "./storage";
|
|
92
|
+
export type { IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, IStorageCredential, IStorageMigration, StorageTokenPermission, StorageLifecycleRule, StorageCorsRule, StorageLifecycleRuleTransition, } from "./storage";
|
|
93
93
|
export type { ICoupon } from "./coupon";
|
|
94
94
|
export type { ICouponRedemption } from "./coupon-redemption";
|
|
95
95
|
export type { ITicket } from "./ticket";
|
|
96
96
|
export type { ICareerRole } from "./career-role";
|
|
97
97
|
export type { IBlogPost } from "./blog-post";
|
|
98
98
|
export type { IChangelogEntry } from "./changelog-entry";
|
|
99
|
-
export type { ChangelogEmailPayloadEntry, IChangelogCampaign } from "./changelog-campaign";
|
|
99
|
+
export type { ChangelogEmailPayloadEntry, IChangelogCampaign, } from "./changelog-campaign";
|
|
100
100
|
export type { IAgentChat } from "./agent-chat";
|
|
101
101
|
export type { IAgentChatMessage } from "./agent-chat-message";
|
|
102
102
|
export type { IAgentChatFile } from "./agent-chat-file";
|
|
@@ -36,6 +36,7 @@ export interface IPlanConfiguration extends Document {
|
|
|
36
36
|
token_request: number;
|
|
37
37
|
custom_domain: boolean;
|
|
38
38
|
wildcard_domain: boolean;
|
|
39
|
+
email_forwarding_enabled: boolean;
|
|
39
40
|
unlimited_projects: boolean;
|
|
40
41
|
webhook_enabled: boolean;
|
|
41
42
|
can_deploy_all_applications: boolean;
|
|
@@ -43,7 +44,7 @@ export interface IPlanConfiguration extends Document {
|
|
|
43
44
|
storage_bucket_enabled: boolean;
|
|
44
45
|
storage_bucket_quota_gb: number;
|
|
45
46
|
sandbox_max_count: number;
|
|
46
|
-
|
|
47
|
+
sandbox_hours_max: number;
|
|
47
48
|
sandbox_enabled: boolean;
|
|
48
49
|
sandbox_cpu_hours_included: number;
|
|
49
50
|
sandbox_memory_gb_hours_included: number;
|
|
@@ -65,5 +66,4 @@ export interface IPlanConfiguration extends Document {
|
|
|
65
66
|
agent_chat_enabled: boolean;
|
|
66
67
|
agent_chat_tokens_per_session: number;
|
|
67
68
|
agent_chats_per_day: number;
|
|
68
|
-
email_forward_limit: number;
|
|
69
69
|
}
|
package/dist/user.js
CHANGED
|
@@ -51,7 +51,7 @@ const userSchema = new mongoose_1.Schema({
|
|
|
51
51
|
ai_usage_count: {
|
|
52
52
|
type: Number,
|
|
53
53
|
default: 0,
|
|
54
|
-
required: false
|
|
54
|
+
required: false,
|
|
55
55
|
},
|
|
56
56
|
tenant: { type: mongoose_1.Schema.Types.ObjectId, ref: "Tenancy", required: false },
|
|
57
57
|
is_waitlist: { type: Boolean, default: true },
|
|
@@ -68,7 +68,13 @@ const userSchema = new mongoose_1.Schema({
|
|
|
68
68
|
has_payment_method: Boolean,
|
|
69
69
|
totp_enabled: { type: Boolean, default: false },
|
|
70
70
|
agent_byok_enabled: { type: Boolean, default: false },
|
|
71
|
-
referral_code: {
|
|
71
|
+
referral_code: {
|
|
72
|
+
type: String,
|
|
73
|
+
sparse: true,
|
|
74
|
+
unique: true,
|
|
75
|
+
uppercase: true,
|
|
76
|
+
trim: true,
|
|
77
|
+
},
|
|
72
78
|
referred_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", default: null },
|
|
73
79
|
referred_at: Date,
|
|
74
80
|
referral_converted_at: Date,
|
package/dist/volume.js
CHANGED
|
@@ -17,12 +17,12 @@ const volumeSchema = new mongoose_1.Schema({
|
|
|
17
17
|
},
|
|
18
18
|
namespace: {
|
|
19
19
|
type: String,
|
|
20
|
-
required: false
|
|
20
|
+
required: false,
|
|
21
21
|
},
|
|
22
22
|
type: {
|
|
23
23
|
type: String,
|
|
24
24
|
required: false,
|
|
25
|
-
default: "project"
|
|
25
|
+
default: "project",
|
|
26
26
|
},
|
|
27
27
|
size: { type: Number, required: true },
|
|
28
28
|
mount_path: { type: String },
|
package/dist/wallet.js
CHANGED
package/dist/webhook-category.js
CHANGED
package/dist/webhook-setting.js
CHANGED
|
@@ -45,6 +45,6 @@ const webhookSettingSchema = new mongoose_1.Schema({
|
|
|
45
45
|
type: [mongoose_1.Schema.Types.ObjectId],
|
|
46
46
|
ref: webhook_event_1.default,
|
|
47
47
|
default: [],
|
|
48
|
-
}
|
|
48
|
+
},
|
|
49
49
|
});
|
|
50
50
|
exports.default = (0, mongoose_1.model)("WebhookSetting", webhookSettingSchema, "webhook_settings");
|