@brimble/models 3.8.149 → 3.8.150

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.
@@ -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",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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.PROJECT_DISABLED_BY = exports.BUILD_DISABLED_BY = exports.SERVER_PROTOCOL = exports.GIT_TYPE = void 0;
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_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";
package/dist/index.d.ts CHANGED
@@ -97,7 +97,7 @@ 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
99
  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, } from "./types";
100
- 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, 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, } from "./enum";
100
+ 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, } from "./enum";
101
101
  import mongoose from "mongoose";
102
102
  export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
103
103
  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.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.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.AgentChatModel = exports.AgentChatFile = exports.AgentChatMessage = exports.AgentChat = void 0;
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_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.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.AgentChatModel = exports.AgentChatFile = exports.AgentChatMessage = exports.AgentChat = void 0;
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 = exports.COLLAB_TOOLBAR_POSITION = 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");
@@ -254,6 +254,7 @@ Object.defineProperty(exports, "REGION_CONTINENT", { enumerable: true, get: func
254
254
  Object.defineProperty(exports, "VOLUME_BACKEND", { enumerable: true, get: function () { return enum_1.VOLUME_BACKEND; } });
255
255
  Object.defineProperty(exports, "BUILD_DISABLED_BY", { enumerable: true, get: function () { return enum_1.BUILD_DISABLED_BY; } });
256
256
  Object.defineProperty(exports, "PROJECT_DISABLED_BY", { enumerable: true, get: function () { return enum_1.PROJECT_DISABLED_BY; } });
257
+ Object.defineProperty(exports, "SPENDING_LIMIT_ACTION", { enumerable: true, get: function () { return enum_1.SPENDING_LIMIT_ACTION; } });
257
258
  Object.defineProperty(exports, "SERVER_PROTOCOL", { enumerable: true, get: function () { return enum_1.SERVER_PROTOCOL; } });
258
259
  Object.defineProperty(exports, "FrameworkApplicationType", { enumerable: true, get: function () { return enum_1.FrameworkApplicationType; } });
259
260
  Object.defineProperty(exports, "DomainRenewalStatus", { enumerable: true, get: function () { return enum_1.DomainRenewalStatus; } });
@@ -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,
package/dist/sandbox.js CHANGED
@@ -117,6 +117,10 @@ const sandboxSchema = new mongoose_1.Schema({
117
117
  type: Date,
118
118
  default: null,
119
119
  },
120
+ paused_by: {
121
+ type: String,
122
+ default: null,
123
+ },
120
124
  image_override: {
121
125
  type: String,
122
126
  default: null,
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,
@@ -118,6 +118,7 @@ export interface IProject extends Document {
118
118
  };
119
119
  last_requested: Date;
120
120
  isPaused: boolean;
121
+ paused_by: string | null;
121
122
  billable: boolean;
122
123
  serviceType?: ServiceType;
123
124
  cronEnabled?: boolean;
@@ -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";
@@ -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;
@@ -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 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "3.8.149",
3
+ "version": "3.8.150",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",