@brimble/models 3.8.149 → 3.8.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-website-snapshot.d.ts +9 -0
- package/dist/agent-website-snapshot.js +22 -0
- package/dist/agent-website.d.ts +9 -0
- package/dist/agent-website.js +22 -0
- package/dist/enum/index.d.ts +12 -0
- package/dist/enum/index.js +17 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +9 -2
- package/dist/project/index.js +4 -0
- package/dist/sandbox-warm-pool.d.ts +8 -8
- package/dist/sandbox.js +4 -0
- package/dist/team.js +15 -0
- package/dist/types/agent-website-snapshot.d.ts +14 -0
- package/dist/types/agent-website-snapshot.js +2 -0
- package/dist/types/agent-website.d.ts +14 -0
- package/dist/types/agent-website.js +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/project/index.d.ts +1 -0
- package/dist/types/sandbox.d.ts +1 -0
- package/dist/types/team.d.ts +4 -1
- package/dist/types/user.d.ts +3 -1
- package/dist/user.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAgentWebsiteSnapshot } from "./types/agent-website-snapshot";
|
|
2
|
+
declare const _default: import("mongoose").Model<IAgentWebsiteSnapshot, {}, {}, {}, import("mongoose").Document<unknown, {}, IAgentWebsiteSnapshot, {}, import("mongoose").DefaultSchemaOptions> & IAgentWebsiteSnapshot & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IAgentWebsiteSnapshot>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const agentWebsiteSnapshotSchema = new mongoose_1.Schema({
|
|
6
|
+
website_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "AgentWebsite", required: true },
|
|
7
|
+
user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: true },
|
|
8
|
+
s3_key: { type: String, required: true },
|
|
9
|
+
size: { type: Number, required: true },
|
|
10
|
+
digest: { type: String, default: null },
|
|
11
|
+
status: {
|
|
12
|
+
type: String,
|
|
13
|
+
enum: Object.values(enum_1.AGENT_WEBSITE_SNAPSHOT_STATUS),
|
|
14
|
+
required: true,
|
|
15
|
+
default: enum_1.AGENT_WEBSITE_SNAPSHOT_STATUS.Pending,
|
|
16
|
+
},
|
|
17
|
+
}, {
|
|
18
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
19
|
+
collection: "agent_website_snapshots",
|
|
20
|
+
});
|
|
21
|
+
agentWebsiteSnapshotSchema.index({ website_id: 1, status: 1, created_at: -1 });
|
|
22
|
+
exports.default = (0, mongoose_1.model)("AgentWebsiteSnapshot", agentWebsiteSnapshotSchema);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IAgentWebsite } from "./types/agent-website";
|
|
2
|
+
declare const _default: import("mongoose").Model<IAgentWebsite, {}, {}, {}, import("mongoose").Document<unknown, {}, IAgentWebsite, {}, import("mongoose").DefaultSchemaOptions> & IAgentWebsite & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IAgentWebsite>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const agentWebsiteSchema = new mongoose_1.Schema({
|
|
6
|
+
chat_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "AgentChat", required: true },
|
|
7
|
+
user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: true },
|
|
8
|
+
team_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", default: null },
|
|
9
|
+
status: {
|
|
10
|
+
type: String,
|
|
11
|
+
enum: Object.values(enum_1.AGENT_WEBSITE_STATUS),
|
|
12
|
+
required: true,
|
|
13
|
+
default: enum_1.AGENT_WEBSITE_STATUS.Active,
|
|
14
|
+
},
|
|
15
|
+
deleted_at: { type: Date, default: null },
|
|
16
|
+
}, {
|
|
17
|
+
timestamps: { createdAt: "created_at", updatedAt: "updated_at" },
|
|
18
|
+
collection: "agent_websites",
|
|
19
|
+
});
|
|
20
|
+
agentWebsiteSchema.index({ chat_id: 1 }, { unique: true });
|
|
21
|
+
agentWebsiteSchema.index({ user_id: 1, created_at: -1 });
|
|
22
|
+
exports.default = (0, mongoose_1.model)("AgentWebsite", agentWebsiteSchema);
|
package/dist/enum/index.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ export declare enum PROJECT_DISABLED_BY {
|
|
|
23
23
|
PlanLimit = "plan_limit",
|
|
24
24
|
SubscriptionEnded = "subscription_ended"
|
|
25
25
|
}
|
|
26
|
+
export declare enum SPENDING_LIMIT_ACTION {
|
|
27
|
+
Notify = "notify",
|
|
28
|
+
Pause = "pause"
|
|
29
|
+
}
|
|
26
30
|
export declare enum REQUEST_TYPE {
|
|
27
31
|
GET = "GET",
|
|
28
32
|
PUT = "PUT",
|
|
@@ -499,3 +503,11 @@ export declare enum AGENT_CHAT_MESSAGE_ROLE {
|
|
|
499
503
|
Assistant = "assistant",
|
|
500
504
|
System = "system"
|
|
501
505
|
}
|
|
506
|
+
export declare enum AGENT_WEBSITE_STATUS {
|
|
507
|
+
Active = "active",
|
|
508
|
+
Deleted = "deleted"
|
|
509
|
+
}
|
|
510
|
+
export declare enum AGENT_WEBSITE_SNAPSHOT_STATUS {
|
|
511
|
+
Pending = "pending",
|
|
512
|
+
Ready = "ready"
|
|
513
|
+
}
|
package/dist/enum/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.AGENT_CHAT_MESSAGE_ROLE = exports.AGENT_CHAT_STATUS = exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = 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 = void 0;
|
|
3
|
+
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.SCALING_SOURCE = exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.EmailDeadLetterStatus = exports.DatabaseEngine = exports.ServiceType = exports.VOLUME_BACKEND = exports.REGION_CONTINENT = exports.PERMISSION_TYPE = exports.ROLES = 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.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_WEBSITE_SNAPSHOT_STATUS = exports.AGENT_WEBSITE_STATUS = exports.AGENT_CHAT_MESSAGE_ROLE = exports.AGENT_CHAT_STATUS = exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = 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 = void 0;
|
|
5
5
|
var GIT_TYPE;
|
|
6
6
|
(function (GIT_TYPE) {
|
|
7
7
|
GIT_TYPE["GITHUB"] = "GITHUB";
|
|
@@ -31,6 +31,11 @@ var PROJECT_DISABLED_BY;
|
|
|
31
31
|
PROJECT_DISABLED_BY["PlanLimit"] = "plan_limit";
|
|
32
32
|
PROJECT_DISABLED_BY["SubscriptionEnded"] = "subscription_ended";
|
|
33
33
|
})(PROJECT_DISABLED_BY || (exports.PROJECT_DISABLED_BY = PROJECT_DISABLED_BY = {}));
|
|
34
|
+
var SPENDING_LIMIT_ACTION;
|
|
35
|
+
(function (SPENDING_LIMIT_ACTION) {
|
|
36
|
+
SPENDING_LIMIT_ACTION["Notify"] = "notify";
|
|
37
|
+
SPENDING_LIMIT_ACTION["Pause"] = "pause";
|
|
38
|
+
})(SPENDING_LIMIT_ACTION || (exports.SPENDING_LIMIT_ACTION = SPENDING_LIMIT_ACTION = {}));
|
|
34
39
|
var REQUEST_TYPE;
|
|
35
40
|
(function (REQUEST_TYPE) {
|
|
36
41
|
REQUEST_TYPE["GET"] = "GET";
|
|
@@ -608,3 +613,13 @@ var AGENT_CHAT_MESSAGE_ROLE;
|
|
|
608
613
|
AGENT_CHAT_MESSAGE_ROLE["Assistant"] = "assistant";
|
|
609
614
|
AGENT_CHAT_MESSAGE_ROLE["System"] = "system";
|
|
610
615
|
})(AGENT_CHAT_MESSAGE_ROLE || (exports.AGENT_CHAT_MESSAGE_ROLE = AGENT_CHAT_MESSAGE_ROLE = {}));
|
|
616
|
+
var AGENT_WEBSITE_STATUS;
|
|
617
|
+
(function (AGENT_WEBSITE_STATUS) {
|
|
618
|
+
AGENT_WEBSITE_STATUS["Active"] = "active";
|
|
619
|
+
AGENT_WEBSITE_STATUS["Deleted"] = "deleted";
|
|
620
|
+
})(AGENT_WEBSITE_STATUS || (exports.AGENT_WEBSITE_STATUS = AGENT_WEBSITE_STATUS = {}));
|
|
621
|
+
var AGENT_WEBSITE_SNAPSHOT_STATUS;
|
|
622
|
+
(function (AGENT_WEBSITE_SNAPSHOT_STATUS) {
|
|
623
|
+
AGENT_WEBSITE_SNAPSHOT_STATUS["Pending"] = "pending";
|
|
624
|
+
AGENT_WEBSITE_SNAPSHOT_STATUS["Ready"] = "ready";
|
|
625
|
+
})(AGENT_WEBSITE_SNAPSHOT_STATUS || (exports.AGENT_WEBSITE_SNAPSHOT_STATUS = AGENT_WEBSITE_SNAPSHOT_STATUS = {}));
|
package/dist/index.d.ts
CHANGED
|
@@ -96,8 +96,10 @@ export { default as AgentChat } from "./agent-chat";
|
|
|
96
96
|
export { default as AgentChatMessage } from "./agent-chat-message";
|
|
97
97
|
export { default as AgentChatFile } from "./agent-chat-file";
|
|
98
98
|
export { default as AgentChatModel } from "./agent-chat-model";
|
|
99
|
-
export {
|
|
100
|
-
export {
|
|
99
|
+
export { default as AgentWebsite } from "./agent-website";
|
|
100
|
+
export { default as AgentWebsiteSnapshot } from "./agent-website-snapshot";
|
|
101
|
+
export { IUser, IGit, IOrigin, IProject, 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, 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, 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, IAgentChat, IAgentChatMessage, IAgentChatFile, IAgentChatModel, IAgentWebsite, IAgentWebsiteSnapshot, } from "./types";
|
|
102
|
+
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, 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, 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, } from "./enum";
|
|
101
103
|
import mongoose from "mongoose";
|
|
102
104
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
|
103
105
|
export declare const db: mongoose.Connection;
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CollabSettings = exports.CollabIntegration = exports.CollabComment = exports.CollabAnnotation = exports.Provider = exports.Intention = exports.WebhookSetting = exports.WebhookEvent = exports.WebhookCategory = exports.DomainTransfer = exports.DomainRenewal = exports.LoadBalancerPort = exports.Settings = exports.Framework = exports.Volume = exports.Region = exports.ComputeChange = exports.AutoScalingGroup = exports.PlanConfiguration = exports.Liscense = exports.Job = exports.EmailDeadLetter = exports.DbImage = exports.Wallet = exports.Server = exports.Card = exports.Subscription = exports.Log = exports.Role = exports.MemberPermission = exports.PaymentMethod = exports.Permission = exports.Member = exports.Team = exports.PlatformApiKey = exports.Token = exports.Env = 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
16
|
exports.Ticket = exports.CouponRedemption = 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.BackupHistory = exports.SandboxSnapshot = exports.SandboxWarmPoolMember = exports.SandboxWarmPool = exports.SandboxSize = exports.SandboxImage = exports.SandboxActivity = exports.Sandbox = exports.OwnershipTransfer = exports.ProjectDrainSubscription = exports.Drain = exports.AlertEvent = exports.AlertRuleStateModel = exports.AlertRule = exports.ActivityLog = exports.ProjectConfigFile = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = exports.CashierSubscription = exports.ProjectTagAssignment = exports.Tag = exports.Invoice = exports.AppMessage = exports.CollabPushSubscription = exports.CollabShareToken = void 0;
|
|
17
|
-
exports.
|
|
18
|
-
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.AGENT_CHAT_MESSAGE_ROLE = exports.AGENT_CHAT_STATUS = exports.CONFIG_FILE_VISIBILITY = exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.WorkbenchMode = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = exports.PlatformApiKeyStatus = exports.StorageTokenStatus = 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 = void 0;
|
|
17
|
+
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.DatabaseEngine = exports.SCALING_SOURCE = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = 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.AgentWebsiteSnapshot = exports.AgentWebsite = exports.AgentChatModel = exports.AgentChatFile = exports.AgentChatMessage = exports.AgentChat = void 0;
|
|
18
|
+
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.AGENT_WEBSITE_SNAPSHOT_STATUS = exports.AGENT_WEBSITE_STATUS = exports.AGENT_CHAT_MESSAGE_ROLE = exports.AGENT_CHAT_STATUS = exports.CONFIG_FILE_VISIBILITY = exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.WorkbenchMode = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = exports.PlatformApiKeyStatus = exports.StorageTokenStatus = 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 = void 0;
|
|
19
19
|
var user_1 = require("./user");
|
|
20
20
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
21
21
|
var project_1 = require("./project");
|
|
@@ -218,6 +218,10 @@ var agent_chat_file_1 = require("./agent-chat-file");
|
|
|
218
218
|
Object.defineProperty(exports, "AgentChatFile", { enumerable: true, get: function () { return __importDefault(agent_chat_file_1).default; } });
|
|
219
219
|
var agent_chat_model_1 = require("./agent-chat-model");
|
|
220
220
|
Object.defineProperty(exports, "AgentChatModel", { enumerable: true, get: function () { return __importDefault(agent_chat_model_1).default; } });
|
|
221
|
+
var agent_website_1 = require("./agent-website");
|
|
222
|
+
Object.defineProperty(exports, "AgentWebsite", { enumerable: true, get: function () { return __importDefault(agent_website_1).default; } });
|
|
223
|
+
var agent_website_snapshot_1 = require("./agent-website-snapshot");
|
|
224
|
+
Object.defineProperty(exports, "AgentWebsiteSnapshot", { enumerable: true, get: function () { return __importDefault(agent_website_snapshot_1).default; } });
|
|
221
225
|
var enum_1 = require("./enum");
|
|
222
226
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
223
227
|
Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
|
|
@@ -254,6 +258,7 @@ Object.defineProperty(exports, "REGION_CONTINENT", { enumerable: true, get: func
|
|
|
254
258
|
Object.defineProperty(exports, "VOLUME_BACKEND", { enumerable: true, get: function () { return enum_1.VOLUME_BACKEND; } });
|
|
255
259
|
Object.defineProperty(exports, "BUILD_DISABLED_BY", { enumerable: true, get: function () { return enum_1.BUILD_DISABLED_BY; } });
|
|
256
260
|
Object.defineProperty(exports, "PROJECT_DISABLED_BY", { enumerable: true, get: function () { return enum_1.PROJECT_DISABLED_BY; } });
|
|
261
|
+
Object.defineProperty(exports, "SPENDING_LIMIT_ACTION", { enumerable: true, get: function () { return enum_1.SPENDING_LIMIT_ACTION; } });
|
|
257
262
|
Object.defineProperty(exports, "SERVER_PROTOCOL", { enumerable: true, get: function () { return enum_1.SERVER_PROTOCOL; } });
|
|
258
263
|
Object.defineProperty(exports, "FrameworkApplicationType", { enumerable: true, get: function () { return enum_1.FrameworkApplicationType; } });
|
|
259
264
|
Object.defineProperty(exports, "DomainRenewalStatus", { enumerable: true, get: function () { return enum_1.DomainRenewalStatus; } });
|
|
@@ -306,6 +311,8 @@ Object.defineProperty(exports, "CouponRedemptionStatus", { enumerable: true, get
|
|
|
306
311
|
Object.defineProperty(exports, "CONFIG_FILE_VISIBILITY", { enumerable: true, get: function () { return enum_1.CONFIG_FILE_VISIBILITY; } });
|
|
307
312
|
Object.defineProperty(exports, "AGENT_CHAT_STATUS", { enumerable: true, get: function () { return enum_1.AGENT_CHAT_STATUS; } });
|
|
308
313
|
Object.defineProperty(exports, "AGENT_CHAT_MESSAGE_ROLE", { enumerable: true, get: function () { return enum_1.AGENT_CHAT_MESSAGE_ROLE; } });
|
|
314
|
+
Object.defineProperty(exports, "AGENT_WEBSITE_STATUS", { enumerable: true, get: function () { return enum_1.AGENT_WEBSITE_STATUS; } });
|
|
315
|
+
Object.defineProperty(exports, "AGENT_WEBSITE_SNAPSHOT_STATUS", { enumerable: true, get: function () { return enum_1.AGENT_WEBSITE_SNAPSHOT_STATUS; } });
|
|
309
316
|
const mongoose_1 = __importDefault(require("mongoose"));
|
|
310
317
|
const utils_1 = require("@brimble/utils");
|
|
311
318
|
const connectToMongo = (mongoUrl, config) => __awaiter(void 0, void 0, void 0, function* () {
|
package/dist/project/index.js
CHANGED
|
@@ -298,6 +298,10 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
298
298
|
},
|
|
299
299
|
last_requested: mongoose_1.Schema.Types.Date,
|
|
300
300
|
isPaused: Boolean,
|
|
301
|
+
paused_by: {
|
|
302
|
+
type: String,
|
|
303
|
+
default: null,
|
|
304
|
+
},
|
|
301
305
|
dbImage: {
|
|
302
306
|
ref: "DbImage",
|
|
303
307
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
@@ -3,11 +3,11 @@ declare const _default: import("mongoose").Model<{
|
|
|
3
3
|
[x: string]: NativeDate;
|
|
4
4
|
_id: string;
|
|
5
5
|
size: string;
|
|
6
|
+
digest: string;
|
|
6
7
|
region: string;
|
|
7
8
|
template: string;
|
|
8
9
|
cpu_mhz: number;
|
|
9
10
|
mem_mb: number;
|
|
10
|
-
digest: string;
|
|
11
11
|
image_tag: string;
|
|
12
12
|
target_count: number;
|
|
13
13
|
}, {}, {}, {
|
|
@@ -16,11 +16,11 @@ declare const _default: import("mongoose").Model<{
|
|
|
16
16
|
[x: string]: NativeDate;
|
|
17
17
|
_id: string;
|
|
18
18
|
size: string;
|
|
19
|
+
digest: string;
|
|
19
20
|
region: string;
|
|
20
21
|
template: string;
|
|
21
22
|
cpu_mhz: number;
|
|
22
23
|
mem_mb: number;
|
|
23
|
-
digest: string;
|
|
24
24
|
image_tag: string;
|
|
25
25
|
target_count: number;
|
|
26
26
|
}, {
|
|
@@ -35,11 +35,11 @@ declare const _default: import("mongoose").Model<{
|
|
|
35
35
|
[x: string]: NativeDate;
|
|
36
36
|
_id: string;
|
|
37
37
|
size: string;
|
|
38
|
+
digest: string;
|
|
38
39
|
region: string;
|
|
39
40
|
template: string;
|
|
40
41
|
cpu_mhz: number;
|
|
41
42
|
mem_mb: number;
|
|
42
|
-
digest: string;
|
|
43
43
|
image_tag: string;
|
|
44
44
|
target_count: number;
|
|
45
45
|
} & Required<{
|
|
@@ -58,22 +58,22 @@ declare const _default: import("mongoose").Model<{
|
|
|
58
58
|
[x: string]: NativeDate;
|
|
59
59
|
_id: string;
|
|
60
60
|
size: string;
|
|
61
|
+
digest: string;
|
|
61
62
|
region: string;
|
|
62
63
|
template: string;
|
|
63
64
|
cpu_mhz: number;
|
|
64
65
|
mem_mb: number;
|
|
65
|
-
digest: string;
|
|
66
66
|
image_tag: string;
|
|
67
67
|
target_count: number;
|
|
68
68
|
}, import("mongoose").Document<unknown, {}, {
|
|
69
69
|
[x: string]: NativeDate;
|
|
70
70
|
_id: string;
|
|
71
71
|
size: string;
|
|
72
|
+
digest: string;
|
|
72
73
|
region: string;
|
|
73
74
|
template: string;
|
|
74
75
|
cpu_mhz: number;
|
|
75
76
|
mem_mb: number;
|
|
76
|
-
digest: string;
|
|
77
77
|
image_tag: string;
|
|
78
78
|
target_count: number;
|
|
79
79
|
}, {
|
|
@@ -88,11 +88,11 @@ declare const _default: import("mongoose").Model<{
|
|
|
88
88
|
[x: string]: NativeDate;
|
|
89
89
|
_id: string;
|
|
90
90
|
size: string;
|
|
91
|
+
digest: string;
|
|
91
92
|
region: string;
|
|
92
93
|
template: string;
|
|
93
94
|
cpu_mhz: number;
|
|
94
95
|
mem_mb: number;
|
|
95
|
-
digest: string;
|
|
96
96
|
image_tag: string;
|
|
97
97
|
target_count: number;
|
|
98
98
|
} & Required<{
|
|
@@ -105,11 +105,11 @@ declare const _default: import("mongoose").Model<{
|
|
|
105
105
|
[x: string]: NativeDate;
|
|
106
106
|
_id: string;
|
|
107
107
|
size: string;
|
|
108
|
+
digest: string;
|
|
108
109
|
region: string;
|
|
109
110
|
template: string;
|
|
110
111
|
cpu_mhz: number;
|
|
111
112
|
mem_mb: number;
|
|
112
|
-
digest: string;
|
|
113
113
|
image_tag: string;
|
|
114
114
|
target_count: number;
|
|
115
115
|
} & Required<{
|
|
@@ -120,11 +120,11 @@ declare const _default: import("mongoose").Model<{
|
|
|
120
120
|
[x: string]: NativeDate;
|
|
121
121
|
_id: string;
|
|
122
122
|
size: string;
|
|
123
|
+
digest: string;
|
|
123
124
|
region: string;
|
|
124
125
|
template: string;
|
|
125
126
|
cpu_mhz: number;
|
|
126
127
|
mem_mb: number;
|
|
127
|
-
digest: string;
|
|
128
128
|
image_tag: string;
|
|
129
129
|
target_count: number;
|
|
130
130
|
} & Required<{
|
package/dist/sandbox.js
CHANGED
package/dist/team.js
CHANGED
|
@@ -47,10 +47,25 @@ const teamSchema = new mongoose_1.Schema({
|
|
|
47
47
|
type: Date,
|
|
48
48
|
default: null,
|
|
49
49
|
},
|
|
50
|
+
spending_limit: {
|
|
51
|
+
type: Number,
|
|
52
|
+
},
|
|
53
|
+
spending_limit_action: {
|
|
54
|
+
type: String,
|
|
55
|
+
default: null,
|
|
56
|
+
},
|
|
57
|
+
spending_limit_breached_at: {
|
|
58
|
+
type: Date,
|
|
59
|
+
default: null,
|
|
60
|
+
},
|
|
50
61
|
build_disabled: {
|
|
51
62
|
type: Boolean,
|
|
52
63
|
default: false,
|
|
53
64
|
},
|
|
65
|
+
build_disabled_by: {
|
|
66
|
+
type: String,
|
|
67
|
+
required: false,
|
|
68
|
+
},
|
|
54
69
|
sandbox_disabled: {
|
|
55
70
|
type: Boolean,
|
|
56
71
|
default: false,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { AGENT_WEBSITE_SNAPSHOT_STATUS } from "../enum";
|
|
3
|
+
import { IAgentWebsite } from "./agent-website";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
export interface IAgentWebsiteSnapshot extends Document {
|
|
6
|
+
website_id: IAgentWebsite | Types.ObjectId;
|
|
7
|
+
user_id: IUser | Types.ObjectId;
|
|
8
|
+
s3_key: string;
|
|
9
|
+
size: number;
|
|
10
|
+
digest: string | null;
|
|
11
|
+
status: AGENT_WEBSITE_SNAPSHOT_STATUS;
|
|
12
|
+
created_at: Date;
|
|
13
|
+
updated_at: Date;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { AGENT_WEBSITE_STATUS } from "../enum";
|
|
3
|
+
import { IAgentChat } from "./agent-chat";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
export interface IAgentWebsite extends Document {
|
|
7
|
+
chat_id: IAgentChat | Types.ObjectId;
|
|
8
|
+
user_id: IUser | Types.ObjectId;
|
|
9
|
+
team_id: ITeam | Types.ObjectId | null;
|
|
10
|
+
status: AGENT_WEBSITE_STATUS;
|
|
11
|
+
deleted_at: Date | null;
|
|
12
|
+
created_at: Date;
|
|
13
|
+
updated_at: Date;
|
|
14
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -95,3 +95,5 @@ export type { IAgentChat } from "./agent-chat";
|
|
|
95
95
|
export type { IAgentChatMessage } from "./agent-chat-message";
|
|
96
96
|
export type { IAgentChatFile } from "./agent-chat-file";
|
|
97
97
|
export type { IAgentChatModel } from "./agent-chat-model";
|
|
98
|
+
export type { IAgentWebsite } from "./agent-website";
|
|
99
|
+
export type { IAgentWebsiteSnapshot } from "./agent-website-snapshot";
|
package/dist/types/sandbox.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export interface ISandbox extends Document {
|
|
|
39
39
|
persistent_disk_gb: number | null;
|
|
40
40
|
csi_volume_id: string | null;
|
|
41
41
|
paused_at: Date | null;
|
|
42
|
+
paused_by: string | null;
|
|
42
43
|
image_override: string | null;
|
|
43
44
|
from_snapshot: Types.ObjectId | null;
|
|
44
45
|
snapshot_mode: "automatic" | "manual";
|
package/dist/types/team.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document, Types } from "mongoose";
|
|
2
2
|
import { IMember, IProject, ISubscription, IUser } from "./";
|
|
3
|
-
import { BUILD_DISABLED_BY } from "../enum";
|
|
3
|
+
import { BUILD_DISABLED_BY, SPENDING_LIMIT_ACTION } from "../enum";
|
|
4
4
|
export interface ITeam extends Document {
|
|
5
5
|
name: string;
|
|
6
6
|
slug: string;
|
|
@@ -14,6 +14,9 @@ export interface ITeam extends Document {
|
|
|
14
14
|
build_minutes: number;
|
|
15
15
|
build_minutes_last_reset_at: Date | null;
|
|
16
16
|
build_minutes_cycle_anchor: Date | null;
|
|
17
|
+
spending_limit: number;
|
|
18
|
+
spending_limit_action: SPENDING_LIMIT_ACTION | null;
|
|
19
|
+
spending_limit_breached_at: Date | null;
|
|
17
20
|
build_disabled: boolean;
|
|
18
21
|
build_disabled_by: BUILD_DISABLED_BY;
|
|
19
22
|
sandbox_disabled: boolean;
|
package/dist/types/user.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IFollowing, IProject, ITeam } from "./";
|
|
3
3
|
import { IGit, IOrigin } from "./git";
|
|
4
|
-
import { BUILD_DISABLED_BY } from "../enum";
|
|
4
|
+
import { BUILD_DISABLED_BY, SPENDING_LIMIT_ACTION } from "../enum";
|
|
5
5
|
export interface IUser extends Document {
|
|
6
6
|
first_name: string;
|
|
7
7
|
last_name: string;
|
|
@@ -31,6 +31,8 @@ export interface IUser extends Document {
|
|
|
31
31
|
sandbox_disabled: boolean;
|
|
32
32
|
sandbox_disabled_by: "system" | "payment_failure" | null;
|
|
33
33
|
spending_limit: number;
|
|
34
|
+
spending_limit_action: SPENDING_LIMIT_ACTION | null;
|
|
35
|
+
spending_limit_breached_at: Date | null;
|
|
34
36
|
build_minutes: number;
|
|
35
37
|
llm_tokens: number;
|
|
36
38
|
llm_tokens_used: number;
|
package/dist/user.js
CHANGED
|
@@ -56,6 +56,8 @@ const userSchema = new mongoose_1.Schema({
|
|
|
56
56
|
tenant: { type: mongoose_1.Schema.Types.ObjectId, ref: "Tenancy", required: false },
|
|
57
57
|
is_waitlist: { type: Boolean, default: true },
|
|
58
58
|
spending_limit: { type: Number },
|
|
59
|
+
spending_limit_action: { type: String, default: null },
|
|
60
|
+
spending_limit_breached_at: { type: Date, default: null },
|
|
59
61
|
build_minutes: { type: Number, default: 0 },
|
|
60
62
|
llm_tokens: { type: Number, default: 0 },
|
|
61
63
|
llm_tokens_used: { type: Number, default: 0 },
|