@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/changelog-campaign.ts
CHANGED
|
@@ -3,7 +3,11 @@ import { IChangelogCampaign } from "./types";
|
|
|
3
3
|
|
|
4
4
|
const changelogEmailPayloadEntrySchema = new Schema(
|
|
5
5
|
{
|
|
6
|
-
category: {
|
|
6
|
+
category: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
enum: ["new", "improved", "fixed"],
|
|
10
|
+
},
|
|
7
11
|
title: { type: String, required: true },
|
|
8
12
|
description: { type: String, required: true },
|
|
9
13
|
link: {
|
|
@@ -27,7 +31,9 @@ const changelogCampaignSchema = new Schema<IChangelogCampaign>(
|
|
|
27
31
|
period_end: { type: Date, required: true },
|
|
28
32
|
subject: { type: String, required: true },
|
|
29
33
|
intro: { type: String },
|
|
30
|
-
entry_ids: [
|
|
34
|
+
entry_ids: [
|
|
35
|
+
{ type: Schema.Types.ObjectId, ref: "ChangelogEntry", required: true },
|
|
36
|
+
],
|
|
31
37
|
email_payload: { type: [changelogEmailPayloadEntrySchema], default: [] },
|
|
32
38
|
auto_send: { type: Boolean, required: true, default: true },
|
|
33
39
|
status: { type: String, required: true, index: true },
|
|
@@ -36,12 +42,20 @@ const changelogCampaignSchema = new Schema<IChangelogCampaign>(
|
|
|
36
42
|
preview_sent_at: { type: Date, default: null },
|
|
37
43
|
sent_at: { type: Date, default: null },
|
|
38
44
|
idempotency_key: { type: String, required: true, unique: true },
|
|
39
|
-
skipped_entry_ids: [
|
|
45
|
+
skipped_entry_ids: [
|
|
46
|
+
{ type: Schema.Types.ObjectId, ref: "ChangelogEntry", default: [] },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
51
|
+
collection: "changelog_campaigns",
|
|
40
52
|
},
|
|
41
|
-
{ timestamps: { createdAt: "created_at", updatedAt: "updated_at" }, collection: "changelog_campaigns" },
|
|
42
53
|
);
|
|
43
54
|
|
|
44
55
|
changelogCampaignSchema.index({ status: 1, preview_at: 1 });
|
|
45
56
|
changelogCampaignSchema.index({ status: 1, send_at: 1 });
|
|
46
57
|
|
|
47
|
-
export default model<IChangelogCampaign>(
|
|
58
|
+
export default model<IChangelogCampaign>(
|
|
59
|
+
"ChangelogCampaign",
|
|
60
|
+
changelogCampaignSchema,
|
|
61
|
+
);
|
package/changelog-entry.ts
CHANGED
|
@@ -5,7 +5,13 @@ const changelogEntrySchema = new Schema(
|
|
|
5
5
|
{
|
|
6
6
|
airtable_id: { type: String, unique: true, sparse: true, index: true },
|
|
7
7
|
airtable_created_time: { type: Date },
|
|
8
|
-
slug: {
|
|
8
|
+
slug: {
|
|
9
|
+
type: String,
|
|
10
|
+
required: true,
|
|
11
|
+
unique: true,
|
|
12
|
+
sparse: true,
|
|
13
|
+
index: true,
|
|
14
|
+
},
|
|
9
15
|
status: { type: String, required: true, index: true },
|
|
10
16
|
title: { type: String, required: true },
|
|
11
17
|
date: { type: Date },
|
|
@@ -13,7 +19,11 @@ const changelogEntrySchema = new Schema(
|
|
|
13
19
|
summary: { type: String },
|
|
14
20
|
content: { type: String },
|
|
15
21
|
emailed_at: { type: Date, default: null, index: true },
|
|
16
|
-
email_campaign_id: {
|
|
22
|
+
email_campaign_id: {
|
|
23
|
+
type: Schema.Types.ObjectId,
|
|
24
|
+
default: null,
|
|
25
|
+
index: true,
|
|
26
|
+
},
|
|
17
27
|
},
|
|
18
28
|
{ timestamps: true, collection: "entries" },
|
|
19
29
|
);
|
package/dist/agent-chat-file.js
CHANGED
|
@@ -3,7 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const agentChatFileSchema = new mongoose_1.Schema({
|
|
5
5
|
chat_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "AgentChat", required: true },
|
|
6
|
-
message_id: {
|
|
6
|
+
message_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "AgentChatMessage",
|
|
9
|
+
default: null,
|
|
10
|
+
},
|
|
7
11
|
user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: true },
|
|
8
12
|
filename: { type: String, required: true },
|
|
9
13
|
content_type: { type: String, required: true },
|
package/dist/agent-chat-model.js
CHANGED
|
@@ -4,7 +4,7 @@ const mongoose_1 = require("mongoose");
|
|
|
4
4
|
const agentChatModelSchema = new mongoose_1.Schema({
|
|
5
5
|
slug: { type: String, required: true, unique: true },
|
|
6
6
|
label: { type: String, required: true },
|
|
7
|
-
description: { type: String, required: true, default:
|
|
7
|
+
description: { type: String, required: true, default: "" },
|
|
8
8
|
provider: { type: String, required: true },
|
|
9
9
|
gateway_model: { type: String, required: true },
|
|
10
10
|
audio: { type: Boolean, required: false, default: false },
|
|
@@ -8,7 +8,11 @@ const fileSchema = new mongoose_1.Schema({
|
|
|
8
8
|
bytes: { type: Number, required: true },
|
|
9
9
|
}, { _id: false });
|
|
10
10
|
const inspectionSchema = new mongoose_1.Schema({
|
|
11
|
-
verdict: {
|
|
11
|
+
verdict: {
|
|
12
|
+
type: String,
|
|
13
|
+
enum: Object.values(enum_1.AGENT_DESIGN_SKILL_VERDICT),
|
|
14
|
+
required: true,
|
|
15
|
+
},
|
|
12
16
|
capabilities: { type: [String], default: [] },
|
|
13
17
|
warnings: { type: [String], default: [] },
|
|
14
18
|
rejected_reasons: { type: [String], default: [] },
|
|
@@ -24,7 +28,11 @@ const licenseSchema = new mongoose_1.Schema({
|
|
|
24
28
|
text_hash: { type: String, default: null },
|
|
25
29
|
}, { _id: false });
|
|
26
30
|
const agentDesignSkillRevisionSchema = new mongoose_1.Schema({
|
|
27
|
-
skill_id: {
|
|
31
|
+
skill_id: {
|
|
32
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
33
|
+
ref: "AgentDesignSkill",
|
|
34
|
+
required: true,
|
|
35
|
+
},
|
|
28
36
|
commit: { type: String, required: true },
|
|
29
37
|
content_hash: { type: String, required: true },
|
|
30
38
|
trust_level: {
|
|
@@ -53,5 +61,9 @@ const agentDesignSkillRevisionSchema = new mongoose_1.Schema({
|
|
|
53
61
|
});
|
|
54
62
|
agentDesignSkillRevisionSchema.index({ skill_id: 1, commit: 1 }, { unique: true });
|
|
55
63
|
agentDesignSkillRevisionSchema.index({ content_hash: 1 });
|
|
56
|
-
agentDesignSkillRevisionSchema.index({
|
|
64
|
+
agentDesignSkillRevisionSchema.index({
|
|
65
|
+
skill_id: 1,
|
|
66
|
+
status: 1,
|
|
67
|
+
created_at: -1,
|
|
68
|
+
});
|
|
57
69
|
exports.default = (0, mongoose_1.model)("AgentDesignSkillRevision", agentDesignSkillRevisionSchema);
|
|
@@ -13,7 +13,11 @@ const agentDesignSkillSchema = new mongoose_1.Schema({
|
|
|
13
13
|
required: true,
|
|
14
14
|
default: enum_1.AGENT_DESIGN_SKILL_STATUS.Active,
|
|
15
15
|
},
|
|
16
|
-
latest_revision_id: {
|
|
16
|
+
latest_revision_id: {
|
|
17
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
18
|
+
ref: "AgentDesignSkillRevision",
|
|
19
|
+
default: null,
|
|
20
|
+
},
|
|
17
21
|
}, {
|
|
18
22
|
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
19
23
|
collection: "agent_design_skills",
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const agentWebsiteFileOverlaySchema = new mongoose_1.Schema({
|
|
5
|
-
website_id: {
|
|
5
|
+
website_id: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "AgentWebsite",
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
6
10
|
path: { type: String, required: true },
|
|
7
11
|
content: { type: String, default: "" },
|
|
8
12
|
size: { type: Number, required: true },
|
|
@@ -3,7 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const agentWebsiteSnapshotSchema = new mongoose_1.Schema({
|
|
6
|
-
website_id: {
|
|
6
|
+
website_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "AgentWebsite",
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
7
11
|
user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: true },
|
|
8
12
|
s3_key: { type: String, required: true },
|
|
9
13
|
size: { type: Number, required: true },
|
package/dist/app-message.js
CHANGED
|
@@ -2,8 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const appMessageSchema = new mongoose_1.Schema({
|
|
5
|
-
userId: {
|
|
6
|
-
|
|
5
|
+
userId: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "User",
|
|
8
|
+
required: false,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
11
|
+
teamId: {
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
13
|
+
ref: "Team",
|
|
14
|
+
required: false,
|
|
15
|
+
index: true,
|
|
16
|
+
},
|
|
7
17
|
level: { type: String, required: true },
|
|
8
18
|
message: { type: String, required: true },
|
|
9
19
|
seen: { type: Boolean, default: false, index: true },
|
package/dist/blog-post.js
CHANGED
|
@@ -4,7 +4,13 @@ const mongoose_1 = require("mongoose");
|
|
|
4
4
|
const blogPostSchema = new mongoose_1.Schema({
|
|
5
5
|
airtable_id: { type: String, unique: true, sparse: true, index: true },
|
|
6
6
|
airtable_created_time: { type: Date },
|
|
7
|
-
slug: {
|
|
7
|
+
slug: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true,
|
|
10
|
+
unique: true,
|
|
11
|
+
sparse: true,
|
|
12
|
+
index: true,
|
|
13
|
+
},
|
|
8
14
|
title: { type: String, required: true },
|
|
9
15
|
status: { type: String, required: true, index: true },
|
|
10
16
|
category: { type: String },
|
package/dist/career-role.js
CHANGED
|
@@ -4,7 +4,13 @@ const mongoose_1 = require("mongoose");
|
|
|
4
4
|
const careerRoleSchema = new mongoose_1.Schema({
|
|
5
5
|
airtable_id: { type: String, unique: true, sparse: true, index: true },
|
|
6
6
|
airtable_created_time: { type: Date },
|
|
7
|
-
slug: {
|
|
7
|
+
slug: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true,
|
|
10
|
+
unique: true,
|
|
11
|
+
sparse: true,
|
|
12
|
+
index: true,
|
|
13
|
+
},
|
|
8
14
|
status: { type: String, required: true, index: true },
|
|
9
15
|
title: { type: String, required: true },
|
|
10
16
|
level: { type: String },
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const changelogEmailPayloadEntrySchema = new mongoose_1.Schema({
|
|
5
|
-
category: {
|
|
5
|
+
category: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
enum: ["new", "improved", "fixed"],
|
|
9
|
+
},
|
|
6
10
|
title: { type: String, required: true },
|
|
7
11
|
description: { type: String, required: true },
|
|
8
12
|
link: {
|
|
@@ -19,7 +23,9 @@ const changelogCampaignSchema = new mongoose_1.Schema({
|
|
|
19
23
|
period_end: { type: Date, required: true },
|
|
20
24
|
subject: { type: String, required: true },
|
|
21
25
|
intro: { type: String },
|
|
22
|
-
entry_ids: [
|
|
26
|
+
entry_ids: [
|
|
27
|
+
{ type: mongoose_1.Schema.Types.ObjectId, ref: "ChangelogEntry", required: true },
|
|
28
|
+
],
|
|
23
29
|
email_payload: { type: [changelogEmailPayloadEntrySchema], default: [] },
|
|
24
30
|
auto_send: { type: Boolean, required: true, default: true },
|
|
25
31
|
status: { type: String, required: true, index: true },
|
|
@@ -28,8 +34,13 @@ const changelogCampaignSchema = new mongoose_1.Schema({
|
|
|
28
34
|
preview_sent_at: { type: Date, default: null },
|
|
29
35
|
sent_at: { type: Date, default: null },
|
|
30
36
|
idempotency_key: { type: String, required: true, unique: true },
|
|
31
|
-
skipped_entry_ids: [
|
|
32
|
-
|
|
37
|
+
skipped_entry_ids: [
|
|
38
|
+
{ type: mongoose_1.Schema.Types.ObjectId, ref: "ChangelogEntry", default: [] },
|
|
39
|
+
],
|
|
40
|
+
}, {
|
|
41
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
42
|
+
collection: "changelog_campaigns",
|
|
43
|
+
});
|
|
33
44
|
changelogCampaignSchema.index({ status: 1, preview_at: 1 });
|
|
34
45
|
changelogCampaignSchema.index({ status: 1, send_at: 1 });
|
|
35
46
|
exports.default = (0, mongoose_1.model)("ChangelogCampaign", changelogCampaignSchema);
|
package/dist/changelog-entry.js
CHANGED
|
@@ -4,7 +4,13 @@ const mongoose_1 = require("mongoose");
|
|
|
4
4
|
const changelogEntrySchema = new mongoose_1.Schema({
|
|
5
5
|
airtable_id: { type: String, unique: true, sparse: true, index: true },
|
|
6
6
|
airtable_created_time: { type: Date },
|
|
7
|
-
slug: {
|
|
7
|
+
slug: {
|
|
8
|
+
type: String,
|
|
9
|
+
required: true,
|
|
10
|
+
unique: true,
|
|
11
|
+
sparse: true,
|
|
12
|
+
index: true,
|
|
13
|
+
},
|
|
8
14
|
status: { type: String, required: true, index: true },
|
|
9
15
|
title: { type: String, required: true },
|
|
10
16
|
date: { type: Date },
|
|
@@ -12,7 +18,11 @@ const changelogEntrySchema = new mongoose_1.Schema({
|
|
|
12
18
|
summary: { type: String },
|
|
13
19
|
content: { type: String },
|
|
14
20
|
emailed_at: { type: Date, default: null, index: true },
|
|
15
|
-
email_campaign_id: {
|
|
21
|
+
email_campaign_id: {
|
|
22
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
23
|
+
default: null,
|
|
24
|
+
index: true,
|
|
25
|
+
},
|
|
16
26
|
}, { timestamps: true, collection: "entries" });
|
|
17
27
|
changelogEntrySchema.index({ status: 1, emailed_at: 1, date: -1 });
|
|
18
28
|
exports.default = (0, mongoose_1.model)("ChangelogEntry", changelogEntrySchema);
|
|
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const collabAnnotationSchema = new mongoose_1.Schema({
|
|
6
|
-
projectId: {
|
|
6
|
+
projectId: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "Project",
|
|
9
|
+
required: true,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
7
12
|
userId: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
|
|
8
13
|
pageUrl: { type: String, required: true },
|
|
9
14
|
pagePath: { type: String, required: true, index: true },
|
package/dist/collab-comment.js
CHANGED
|
@@ -8,7 +8,12 @@ const collabAttachmentSchema = new mongoose_1.Schema({
|
|
|
8
8
|
fileSize: { type: Number, required: true },
|
|
9
9
|
}, { _id: false });
|
|
10
10
|
const collabCommentSchema = new mongoose_1.Schema({
|
|
11
|
-
annotationId: {
|
|
11
|
+
annotationId: {
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
13
|
+
ref: "CollabAnnotation",
|
|
14
|
+
required: true,
|
|
15
|
+
index: true,
|
|
16
|
+
},
|
|
12
17
|
userId: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
|
|
13
18
|
body: { type: String },
|
|
14
19
|
screenshot: { type: String },
|
|
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const collabIntegrationSchema = new mongoose_1.Schema({
|
|
6
|
-
projectId: {
|
|
6
|
+
projectId: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "Project",
|
|
9
|
+
required: true,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
7
12
|
userId: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", index: true },
|
|
8
13
|
type: {
|
|
9
14
|
type: String,
|
|
@@ -2,13 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const collabPushSubscriptionSchema = new mongoose_1.Schema({
|
|
5
|
-
userId: {
|
|
5
|
+
userId: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "User",
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
6
11
|
endpoint: { type: String, required: true, unique: true },
|
|
7
12
|
keys: {
|
|
8
13
|
p256dh: { type: String, required: true },
|
|
9
14
|
auth: { type: String, required: true },
|
|
10
15
|
},
|
|
11
16
|
domain: { type: String, required: true, index: true },
|
|
12
|
-
}, {
|
|
17
|
+
}, {
|
|
18
|
+
timestamps: { createdAt: true, updatedAt: false },
|
|
19
|
+
collection: "push_subscriptions",
|
|
20
|
+
});
|
|
13
21
|
collabPushSubscriptionSchema.index({ userId: 1, domain: 1 });
|
|
14
22
|
exports.default = (0, mongoose_1.model)("CollabPushSubscription", collabPushSubscriptionSchema);
|
|
@@ -2,7 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const collabShareTokenSchema = new mongoose_1.Schema({
|
|
5
|
-
projectId: {
|
|
5
|
+
projectId: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "Project",
|
|
8
|
+
required: true,
|
|
9
|
+
index: true,
|
|
10
|
+
},
|
|
6
11
|
createdBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: true },
|
|
7
12
|
token: { type: String, required: true, unique: true },
|
|
8
13
|
expiresAt: { type: Date },
|
|
@@ -3,9 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const couponRedemptionSchema = new mongoose_1.Schema({
|
|
6
|
-
coupon_id: {
|
|
6
|
+
coupon_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "Coupon",
|
|
9
|
+
required: true,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
7
12
|
code: { type: String, required: true },
|
|
8
|
-
user_id: {
|
|
13
|
+
user_id: {
|
|
14
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
15
|
+
ref: "User",
|
|
16
|
+
required: true,
|
|
17
|
+
index: true,
|
|
18
|
+
},
|
|
9
19
|
team_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", default: null },
|
|
10
20
|
scope: {
|
|
11
21
|
type: String,
|
|
@@ -28,7 +38,10 @@ const couponRedemptionSchema = new mongoose_1.Schema({
|
|
|
28
38
|
reserved_at: { type: Date, required: true },
|
|
29
39
|
applied_at: { type: Date, default: null },
|
|
30
40
|
reversed_at: { type: Date, default: null },
|
|
31
|
-
}, {
|
|
41
|
+
}, {
|
|
42
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
43
|
+
collection: "coupon_redemptions",
|
|
44
|
+
});
|
|
32
45
|
couponRedemptionSchema.index({ coupon_id: 1, user_id: 1, status: 1 });
|
|
33
46
|
couponRedemptionSchema.index({ coupon_id: 1, transaction_reference: 1 }, {
|
|
34
47
|
unique: true,
|
package/dist/coupon.js
CHANGED
|
@@ -3,7 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const couponSchema = new mongoose_1.Schema({
|
|
6
|
-
code: {
|
|
6
|
+
code: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
unique: true,
|
|
10
|
+
uppercase: true,
|
|
11
|
+
trim: true,
|
|
12
|
+
},
|
|
7
13
|
description: { type: String, default: null },
|
|
8
14
|
scope: {
|
|
9
15
|
type: String,
|
|
@@ -25,7 +31,11 @@ const couponSchema = new mongoose_1.Schema({
|
|
|
25
31
|
max_purchase_amount: { type: Number, default: null },
|
|
26
32
|
allowed_tlds: { type: [String], default: [] },
|
|
27
33
|
allowed_emails: { type: [String], default: [] },
|
|
28
|
-
allowed_user_ids: {
|
|
34
|
+
allowed_user_ids: {
|
|
35
|
+
type: [mongoose_1.Schema.Types.ObjectId],
|
|
36
|
+
ref: "User",
|
|
37
|
+
default: [],
|
|
38
|
+
},
|
|
29
39
|
max_duration_years: { type: Number, default: null },
|
|
30
40
|
allow_below_cost: { type: Boolean, default: false },
|
|
31
41
|
starts_at: { type: Date, default: null },
|
|
@@ -33,6 +43,9 @@ const couponSchema = new mongoose_1.Schema({
|
|
|
33
43
|
enabled: { type: Boolean, default: true },
|
|
34
44
|
created_by: { type: String, default: null },
|
|
35
45
|
disabled_at: { type: Date, default: null },
|
|
36
|
-
}, {
|
|
46
|
+
}, {
|
|
47
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
48
|
+
collection: "coupons",
|
|
49
|
+
});
|
|
37
50
|
couponSchema.index({ enabled: 1, expires_at: 1 });
|
|
38
51
|
exports.default = (0, mongoose_1.model)("Coupon", couponSchema);
|
package/dist/db-image.js
CHANGED
|
@@ -67,16 +67,16 @@ const dbImageSchema = new mongoose_1.Schema({
|
|
|
67
67
|
ha: {
|
|
68
68
|
type: Boolean,
|
|
69
69
|
required: false,
|
|
70
|
-
default: false
|
|
70
|
+
default: false,
|
|
71
71
|
},
|
|
72
72
|
analytics: {
|
|
73
73
|
type: Boolean,
|
|
74
74
|
required: false,
|
|
75
|
-
default: true
|
|
75
|
+
default: true,
|
|
76
76
|
},
|
|
77
77
|
workbench: {
|
|
78
78
|
type: Boolean,
|
|
79
|
-
default: false
|
|
79
|
+
default: false,
|
|
80
80
|
},
|
|
81
81
|
workbench_mode: {
|
|
82
82
|
type: String,
|
|
@@ -105,12 +105,12 @@ const dbImageSchema = new mongoose_1.Schema({
|
|
|
105
105
|
free: {
|
|
106
106
|
type: Boolean,
|
|
107
107
|
required: false,
|
|
108
|
-
default: false
|
|
108
|
+
default: false,
|
|
109
109
|
},
|
|
110
110
|
erd: {
|
|
111
111
|
type: Boolean,
|
|
112
112
|
required: false,
|
|
113
|
-
default: false
|
|
113
|
+
default: false,
|
|
114
114
|
},
|
|
115
115
|
recommendations: {
|
|
116
116
|
required: false,
|
|
@@ -150,6 +150,6 @@ const dbImageSchema = new mongoose_1.Schema({
|
|
|
150
150
|
params: {
|
|
151
151
|
required: false,
|
|
152
152
|
type: Object,
|
|
153
|
-
}
|
|
153
|
+
},
|
|
154
154
|
}, { timestamps: true });
|
|
155
155
|
exports.default = (0, mongoose_1.model)("DbImage", dbImageSchema);
|
package/dist/domain/index.js
CHANGED
package/dist/domain/renewal.js
CHANGED
package/dist/drain.js
CHANGED
|
@@ -3,10 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const mongoose_1 = require("mongoose");
|
|
4
4
|
const enum_1 = require("./enum");
|
|
5
5
|
const DrainSchema = new mongoose_1.Schema({
|
|
6
|
-
user_id: {
|
|
7
|
-
|
|
6
|
+
user_id: {
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
8
|
+
ref: "User",
|
|
9
|
+
required: false,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
12
|
+
team: {
|
|
13
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
14
|
+
ref: "Team",
|
|
15
|
+
required: false,
|
|
16
|
+
index: true,
|
|
17
|
+
},
|
|
8
18
|
name: { type: String, required: true, minlength: 1, maxlength: 64 },
|
|
9
|
-
type: {
|
|
19
|
+
type: {
|
|
20
|
+
type: String,
|
|
21
|
+
enum: Object.values(enum_1.DrainType),
|
|
22
|
+
default: enum_1.DrainType.Https,
|
|
23
|
+
required: true,
|
|
24
|
+
},
|
|
10
25
|
url: { type: String },
|
|
11
26
|
headerKeys: [{ type: String }],
|
|
12
27
|
s3: {
|
|
@@ -14,8 +29,16 @@ const DrainSchema = new mongoose_1.Schema({
|
|
|
14
29
|
region: { type: String },
|
|
15
30
|
endpoint: { type: String },
|
|
16
31
|
keyPrefix: { type: String, default: "" },
|
|
17
|
-
storageBucketId: {
|
|
18
|
-
|
|
32
|
+
storageBucketId: {
|
|
33
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
34
|
+
ref: "StorageBucket",
|
|
35
|
+
default: null,
|
|
36
|
+
},
|
|
37
|
+
storageCredentialId: {
|
|
38
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
39
|
+
ref: "StorageCredential",
|
|
40
|
+
default: null,
|
|
41
|
+
},
|
|
19
42
|
},
|
|
20
43
|
secretsRef: { type: String, required: true },
|
|
21
44
|
sources: [{ type: String, enum: Object.values(enum_1.LogSource) }],
|
|
@@ -20,5 +20,9 @@ const environmentVariableSchema = new mongoose_1.Schema({
|
|
|
20
20
|
inheritable: { type: Boolean, default: true },
|
|
21
21
|
}, { timestamps: true });
|
|
22
22
|
environmentVariableSchema.index({ name: 1, project_environment: 1 }, { unique: true });
|
|
23
|
-
environmentVariableSchema.index({
|
|
23
|
+
environmentVariableSchema.index({
|
|
24
|
+
project_environment: 1,
|
|
25
|
+
source_project: 1,
|
|
26
|
+
name: 1,
|
|
27
|
+
});
|
|
24
28
|
exports.default = (0, mongoose_1.model)("EnvironmentVariable", environmentVariableSchema);
|
package/dist/framework.js
CHANGED
|
@@ -22,12 +22,12 @@ const frameworkSchema = new mongoose_1.Schema({
|
|
|
22
22
|
supported: {
|
|
23
23
|
type: Boolean,
|
|
24
24
|
required: false,
|
|
25
|
-
default: true
|
|
25
|
+
default: true,
|
|
26
26
|
},
|
|
27
27
|
port: {
|
|
28
28
|
type: Number,
|
|
29
29
|
required: false,
|
|
30
|
-
default: 8000
|
|
30
|
+
default: 8000,
|
|
31
31
|
},
|
|
32
32
|
tagline: {
|
|
33
33
|
type: String,
|
|
@@ -51,7 +51,7 @@ const frameworkSchema = new mongoose_1.Schema({
|
|
|
51
51
|
},
|
|
52
52
|
file_detectors: {
|
|
53
53
|
type: Array,
|
|
54
|
-
required: false
|
|
54
|
+
required: false,
|
|
55
55
|
},
|
|
56
56
|
type: {
|
|
57
57
|
type: String,
|
package/dist/index.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ export { default as VolumeUsageSegment } from "./volume-usage-segment";
|
|
|
83
83
|
export { default as PgBouncerUsageSegment } from "./pgbouncer-usage-segment";
|
|
84
84
|
export { default as ObjectStorageUsageSegment } from "./object-storage-usage-segment";
|
|
85
85
|
export { default as IdempotencyRecord } from "./idempotency";
|
|
86
|
-
export { StorageBucket, StorageObject, StorageUpload, StorageToken, StorageCredential, StorageMigration } from "./storage";
|
|
86
|
+
export { StorageBucket, StorageObject, StorageUpload, StorageToken, StorageCredential, StorageMigration, } from "./storage";
|
|
87
87
|
export { default as Streak } from "./streak";
|
|
88
88
|
export { default as StreakEvent } from "./streak-event";
|
|
89
89
|
export { default as StreakDay } from "./streak-day";
|
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",
|