@brimble/models 3.8.184 → 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/dns.js +4 -0
- package/dist/domain/email-forward.d.ts +9 -0
- package/dist/domain/email-forward.js +53 -0
- package/dist/domain/index.js +5 -1
- package/dist/domain/renewal.js +1 -1
- package/dist/drain.js +28 -5
- package/dist/enum/index.d.ts +9 -0
- package/dist/enum/index.js +14 -3
- package/dist/environment-variable.js +5 -1
- package/dist/framework.js +3 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +9 -5
- 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 -4
- 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/domain/dns.d.ts +1 -0
- package/dist/types/domain/email-forward.d.ts +16 -0
- package/dist/types/domain/email-forward.js +2 -0
- package/dist/types/domain/index.d.ts +1 -0
- package/dist/types/index.d.ts +4 -3
- package/dist/types/plan_configuration.d.ts +2 -1
- 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/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) }],
|
package/dist/enum/index.d.ts
CHANGED
|
@@ -199,6 +199,15 @@ export declare enum DNS_CHANGE_SOURCE {
|
|
|
199
199
|
API = "api",
|
|
200
200
|
SYSTEM = "system"
|
|
201
201
|
}
|
|
202
|
+
export declare enum EMAIL_FORWARD_STATUS {
|
|
203
|
+
PENDING = "pending",
|
|
204
|
+
ACTIVE = "active",
|
|
205
|
+
FAILED = "failed",
|
|
206
|
+
DISABLED = "disabled"
|
|
207
|
+
}
|
|
208
|
+
export declare enum DNS_MANAGED_BY {
|
|
209
|
+
EMAIL_FORWARDING = "email_forwarding"
|
|
210
|
+
}
|
|
202
211
|
export declare enum ROLES {
|
|
203
212
|
CREATOR = "CREATOR",
|
|
204
213
|
ADMINISTRATOR = "ADMINISTRATOR",
|
package/dist/enum/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.AGENT_DESIGN_SKILL_VERDICT = exports.AGENT_DESIGN_SKILL_TRUST_LEVEL = exports.AGENT_DESIGN_SKILL_STATUS = exports.AGENT_WEBSITE_SNAPSHOT_STATUS = void 0;
|
|
3
|
+
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.PERMISSION_TYPE = 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.REQUEST_TYPE = exports.SPENDING_LIMIT_ACTION = exports.PROJECT_DISABLED_BY = exports.BUILD_DISABLED_BY = exports.SERVER_PROTOCOL = exports.GIT_TYPE = void 0;
|
|
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_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 = void 0;
|
|
5
|
+
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";
|
|
@@ -235,6 +235,17 @@ var DNS_CHANGE_SOURCE;
|
|
|
235
235
|
DNS_CHANGE_SOURCE["API"] = "api";
|
|
236
236
|
DNS_CHANGE_SOURCE["SYSTEM"] = "system";
|
|
237
237
|
})(DNS_CHANGE_SOURCE || (exports.DNS_CHANGE_SOURCE = DNS_CHANGE_SOURCE = {}));
|
|
238
|
+
var EMAIL_FORWARD_STATUS;
|
|
239
|
+
(function (EMAIL_FORWARD_STATUS) {
|
|
240
|
+
EMAIL_FORWARD_STATUS["PENDING"] = "pending";
|
|
241
|
+
EMAIL_FORWARD_STATUS["ACTIVE"] = "active";
|
|
242
|
+
EMAIL_FORWARD_STATUS["FAILED"] = "failed";
|
|
243
|
+
EMAIL_FORWARD_STATUS["DISABLED"] = "disabled";
|
|
244
|
+
})(EMAIL_FORWARD_STATUS || (exports.EMAIL_FORWARD_STATUS = EMAIL_FORWARD_STATUS = {}));
|
|
245
|
+
var DNS_MANAGED_BY;
|
|
246
|
+
(function (DNS_MANAGED_BY) {
|
|
247
|
+
DNS_MANAGED_BY["EMAIL_FORWARDING"] = "email_forwarding";
|
|
248
|
+
})(DNS_MANAGED_BY || (exports.DNS_MANAGED_BY = DNS_MANAGED_BY = {}));
|
|
238
249
|
var ROLES;
|
|
239
250
|
(function (ROLES) {
|
|
240
251
|
ROLES["CREATOR"] = "CREATOR";
|
|
@@ -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
|
@@ -10,6 +10,7 @@ export { default as Integration } from "./integration";
|
|
|
10
10
|
export { default as Domain } from "./domain";
|
|
11
11
|
export { default as Dns } from "./domain/dns";
|
|
12
12
|
export { default as DnsChangeLog } from "./domain/dns-changelog";
|
|
13
|
+
export { default as EmailForward } from "./domain/email-forward";
|
|
13
14
|
export { default as Env } from "./env";
|
|
14
15
|
export { default as Token } from "./token";
|
|
15
16
|
export { default as PlatformApiKey } from "./platform-api-key";
|
|
@@ -82,7 +83,7 @@ export { default as VolumeUsageSegment } from "./volume-usage-segment";
|
|
|
82
83
|
export { default as PgBouncerUsageSegment } from "./pgbouncer-usage-segment";
|
|
83
84
|
export { default as ObjectStorageUsageSegment } from "./object-storage-usage-segment";
|
|
84
85
|
export { default as IdempotencyRecord } from "./idempotency";
|
|
85
|
-
export { StorageBucket, StorageObject, StorageUpload, StorageToken, StorageCredential, StorageMigration } from "./storage";
|
|
86
|
+
export { StorageBucket, StorageObject, StorageUpload, StorageToken, StorageCredential, StorageMigration, } from "./storage";
|
|
86
87
|
export { default as Streak } from "./streak";
|
|
87
88
|
export { default as StreakEvent } from "./streak-event";
|
|
88
89
|
export { default as StreakDay } from "./streak-day";
|
|
@@ -106,8 +107,8 @@ export { default as AgentWebsiteSnapshot } from "./agent-website-snapshot";
|
|
|
106
107
|
export { default as AgentWebsiteFileOverlay } from "./agent-website-file-overlay";
|
|
107
108
|
export { default as AgentDesignSkill } from "./agent-design-skill";
|
|
108
109
|
export { default as AgentDesignSkillRevision } from "./agent-design-skill-revision";
|
|
109
|
-
export { IUser, IGit, IOrigin, IProject, 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, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IDbImageConnection, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, BrimbleFrameworkType, ISettings, ILoadBalancerPort, IDomainRenewal, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, 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, 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, } from "./types";
|
|
110
|
-
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, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, 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, 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, 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, } from "./enum";
|
|
110
|
+
export { IUser, IGit, IOrigin, IProject, 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, IPermission, IMemberPermission, IWallet, IDbImage, IDbImageConnection, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, BrimbleFrameworkType, ISettings, ILoadBalancerPort, IDomainRenewal, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, 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, 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, } from "./types";
|
|
111
|
+
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, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, 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, 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, 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, } from "./enum";
|
|
111
112
|
import mongoose from "mongoose";
|
|
112
113
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
|
113
114
|
export declare const db: mongoose.Connection;
|
package/dist/index.js
CHANGED
|
@@ -12,11 +12,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = 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 = void 0;
|
|
15
|
+
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.MemberPermission = exports.PaymentMethod = exports.Permission = 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 = void 0;
|
|
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.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 = exports.CollabSettings = void 0;
|
|
17
|
+
exports.DatabaseProvisionPhase = exports.DatabaseInsightsScope = exports.HaMemberRole = exports.DatabasePasswordMode = exports.DatabasePasswordChangeMode = exports.DatabaseEngine = exports.SCALING_SOURCE = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = 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.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.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.DatabaseUserStatus = exports.DatabaseUserPermission = 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.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 = void 0;
|
|
19
|
+
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = 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 = void 0;
|
|
20
20
|
var user_1 = require("./user");
|
|
21
21
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
22
22
|
var project_1 = require("./project");
|
|
@@ -42,6 +42,8 @@ var dns_1 = require("./domain/dns");
|
|
|
42
42
|
Object.defineProperty(exports, "Dns", { enumerable: true, get: function () { return __importDefault(dns_1).default; } });
|
|
43
43
|
var dns_changelog_1 = require("./domain/dns-changelog");
|
|
44
44
|
Object.defineProperty(exports, "DnsChangeLog", { enumerable: true, get: function () { return __importDefault(dns_changelog_1).default; } });
|
|
45
|
+
var email_forward_1 = require("./domain/email-forward");
|
|
46
|
+
Object.defineProperty(exports, "EmailForward", { enumerable: true, get: function () { return __importDefault(email_forward_1).default; } });
|
|
45
47
|
var env_1 = require("./env");
|
|
46
48
|
Object.defineProperty(exports, "Env", { enumerable: true, get: function () { return __importDefault(env_1).default; } });
|
|
47
49
|
var token_1 = require("./token");
|
|
@@ -263,6 +265,8 @@ Object.defineProperty(exports, "CARD_TYPES", { enumerable: true, get: function (
|
|
|
263
265
|
Object.defineProperty(exports, "DNS_TYPE", { enumerable: true, get: function () { return enum_1.DNS_TYPE; } });
|
|
264
266
|
Object.defineProperty(exports, "DNS_CHANGE_TYPE", { enumerable: true, get: function () { return enum_1.DNS_CHANGE_TYPE; } });
|
|
265
267
|
Object.defineProperty(exports, "DNS_CHANGE_SOURCE", { enumerable: true, get: function () { return enum_1.DNS_CHANGE_SOURCE; } });
|
|
268
|
+
Object.defineProperty(exports, "EMAIL_FORWARD_STATUS", { enumerable: true, get: function () { return enum_1.EMAIL_FORWARD_STATUS; } });
|
|
269
|
+
Object.defineProperty(exports, "DNS_MANAGED_BY", { enumerable: true, get: function () { return enum_1.DNS_MANAGED_BY; } });
|
|
266
270
|
Object.defineProperty(exports, "PERMISSION_TYPE", { enumerable: true, get: function () { return enum_1.PERMISSION_TYPE; } });
|
|
267
271
|
Object.defineProperty(exports, "REQUEST_TYPE", { enumerable: true, get: function () { return enum_1.REQUEST_TYPE; } });
|
|
268
272
|
Object.defineProperty(exports, "ServiceType", { enumerable: true, get: function () { return enum_1.ServiceType; } });
|
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 },
|
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