@brimble/models 3.8.57 → 3.8.60

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/compute.js CHANGED
@@ -78,5 +78,11 @@ const ComputeChangeSchema = new mongoose_1.Schema({
78
78
  default: false,
79
79
  },
80
80
  storage_pricing_factor: { type: Number, required: false, default: 1 },
81
+ instance_count: { type: Number, default: 1 },
82
+ scaling_source: {
83
+ type: String,
84
+ enum: Object.values(enum_1.SCALING_SOURCE),
85
+ default: enum_1.SCALING_SOURCE.Manual,
86
+ },
81
87
  });
82
88
  exports.default = (0, mongoose_1.model)("ComputeChange", ComputeChangeSchema, "compute_changes");
@@ -188,6 +188,12 @@ export declare enum SCALING_METRIC {
188
188
  ResponseTime = "RESPONSE_TIME",
189
189
  CustomMetric = "CUSTOM_METRIC"
190
190
  }
191
+ export declare enum SCALING_SOURCE {
192
+ Manual = "manual",
193
+ Autoscaler = "autoscaler",
194
+ Rebaseline = "rebaseline",
195
+ Continuation = "continuation"
196
+ }
191
197
  export declare enum FrameworkApplicationType {
192
198
  Spa = "spa",
193
199
  Ssr = "ssr",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.SANDBOX_SNAPSHOT_STATUS = 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.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = 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.AlertEventStatus = exports.AlertChannelMode = exports.AlertRuleState = exports.AlertCondition = exports.AlertMetric = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.BUILD_DISABLED_BY = exports.SERVER_PROTOCOL = exports.GIT_TYPE = void 0;
4
- 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 = void 0;
3
+ exports.StorageUploadStatus = exports.StorageBucketStatus = exports.SANDBOX_SNAPSHOT_STATUS = 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.SCALING_SOURCE = exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = 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.AlertEventStatus = exports.AlertChannelMode = exports.AlertRuleState = exports.AlertCondition = exports.AlertMetric = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.BUILD_DISABLED_BY = exports.SERVER_PROTOCOL = exports.GIT_TYPE = void 0;
4
+ 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.StorageTokenStatus = void 0;
5
5
  var GIT_TYPE;
6
6
  (function (GIT_TYPE) {
7
7
  GIT_TYPE["GITHUB"] = "GITHUB";
@@ -222,6 +222,13 @@ var SCALING_METRIC;
222
222
  SCALING_METRIC["ResponseTime"] = "RESPONSE_TIME";
223
223
  SCALING_METRIC["CustomMetric"] = "CUSTOM_METRIC";
224
224
  })(SCALING_METRIC || (exports.SCALING_METRIC = SCALING_METRIC = {}));
225
+ var SCALING_SOURCE;
226
+ (function (SCALING_SOURCE) {
227
+ SCALING_SOURCE["Manual"] = "manual";
228
+ SCALING_SOURCE["Autoscaler"] = "autoscaler";
229
+ SCALING_SOURCE["Rebaseline"] = "rebaseline";
230
+ SCALING_SOURCE["Continuation"] = "continuation";
231
+ })(SCALING_SOURCE || (exports.SCALING_SOURCE = SCALING_SOURCE = {}));
225
232
  var FrameworkApplicationType;
226
233
  (function (FrameworkApplicationType) {
227
234
  FrameworkApplicationType["Spa"] = "spa";
package/dist/index.d.ts CHANGED
@@ -76,8 +76,8 @@ export { default as StreakMilestone } from "./streak-milestone";
76
76
  export { default as QuestCampaign } from "./quest-campaign";
77
77
  export { default as QuestParticipation } from "./quest-participation";
78
78
  export { default as QuestRewardIssuance } from "./quest-reward-issuance";
79
- export { IUser, IGit, IProject, IProjectAnalytics, IPreview, IProjectConnection, IProjectNetworkSettings, IRatelimit, RatelimitConfig, RateLimitZone, RateLimitMatcher, DistributedRateLimitConfig, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, 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, IActivityLog, IAlertRule, IAlertRuleState, IAlertEvent, IAlertNotificationResult, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSnapshot, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, 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, } from "./types";
80
- export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, AlertMetric, AlertCondition, AlertRuleState, AlertChannelMode, AlertEventStatus, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, DNS_CHANGE_TYPE, DNS_CHANGE_SOURCE, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, DatabaseEngine, JobStatus, LicenseStatus, REGION_CONTINENT, BUILD_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_SNAPSHOT_STATUS, StorageBucketStatus, StorageUploadStatus, StorageTokenStatus, 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 } from "./enum";
79
+ export { IUser, IGit, IProject, IProjectAnalytics, IPreview, IProjectConnection, IProjectNetworkSettings, IRatelimit, RatelimitConfig, RateLimitZone, RateLimitMatcher, DistributedRateLimitConfig, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, 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, IActivityLog, IAlertRule, IAlertRuleState, IAlertEvent, IAlertNotificationResult, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSnapshot, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, 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, } from "./types";
80
+ export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, AlertMetric, AlertCondition, AlertRuleState, AlertChannelMode, AlertEventStatus, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, DNS_CHANGE_TYPE, DNS_CHANGE_SOURCE, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, SCALING_SOURCE, DatabaseEngine, JobStatus, LicenseStatus, REGION_CONTINENT, BUILD_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_SNAPSHOT_STATUS, StorageBucketStatus, StorageUploadStatus, StorageTokenStatus, 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 } from "./enum";
81
81
  import mongoose from "mongoose";
82
82
  export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
83
83
  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.AppMessage = exports.CollabPushSubscription = exports.CollabShareToken = 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.DbImage = exports.Wallet = exports.Server = exports.Card = exports.Subscription = exports.Log = exports.Role = exports.MemberPermission = exports.Permission = exports.Member = exports.Team = 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.CARD_TYPES = exports.SUBSCRIPTION_STATUS = 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.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.VolumeUsageSegment = exports.SandboxUsageSegment = exports.SandboxSnapshotUsageSegment = exports.SandboxSnapshot = exports.SandboxImage = exports.SandboxActivity = exports.Sandbox = exports.OwnershipTransfer = exports.AlertEvent = exports.AlertRuleStateModel = exports.AlertRule = exports.ActivityLog = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = exports.CashierSubscription = exports.ProjectTagAssignment = exports.Tag = exports.Invoice = void 0;
17
- 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.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.SANDBOX_SNAPSHOT_STATUS = 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.BUILD_DISABLED_BY = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = exports.DNS_CHANGE_SOURCE = exports.DNS_CHANGE_TYPE = exports.DNS_TYPE = void 0;
18
- exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.WorkbenchMode = void 0;
17
+ 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.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.SANDBOX_SNAPSHOT_STATUS = 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.BUILD_DISABLED_BY = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.SCALING_SOURCE = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = exports.DNS_CHANGE_SOURCE = exports.DNS_CHANGE_TYPE = exports.DNS_TYPE = void 0;
18
+ exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.WorkbenchMode = exports.QUEST_TARGETLESS_REQUIREMENTS = 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");
@@ -201,6 +201,7 @@ Object.defineProperty(exports, "DNS_CHANGE_SOURCE", { enumerable: true, get: fun
201
201
  Object.defineProperty(exports, "PERMISSION_TYPE", { enumerable: true, get: function () { return enum_1.PERMISSION_TYPE; } });
202
202
  Object.defineProperty(exports, "REQUEST_TYPE", { enumerable: true, get: function () { return enum_1.REQUEST_TYPE; } });
203
203
  Object.defineProperty(exports, "ServiceType", { enumerable: true, get: function () { return enum_1.ServiceType; } });
204
+ Object.defineProperty(exports, "SCALING_SOURCE", { enumerable: true, get: function () { return enum_1.SCALING_SOURCE; } });
204
205
  Object.defineProperty(exports, "DatabaseEngine", { enumerable: true, get: function () { return enum_1.DatabaseEngine; } });
205
206
  Object.defineProperty(exports, "JobStatus", { enumerable: true, get: function () { return enum_1.JobStatus; } });
206
207
  Object.defineProperty(exports, "LicenseStatus", { enumerable: true, get: function () { return enum_1.LicenseStatus; } });
package/dist/storage.js CHANGED
@@ -6,6 +6,7 @@ const enum_1 = require("./enum");
6
6
  const storageBucketSchema = new mongoose_1.Schema({
7
7
  name: { type: String, required: true, trim: true },
8
8
  project: { type: mongoose_1.Schema.Types.ObjectId, ref: "Project", required: false, index: true },
9
+ project_environment: { type: mongoose_1.Schema.Types.ObjectId, ref: "ProjectEnvironment", required: false, index: true },
9
10
  user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: false, index: true },
10
11
  team: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", required: false, index: true },
11
12
  bucket_name: { type: String, required: true, unique: true },
@@ -23,9 +24,11 @@ const storageBucketSchema = new mongoose_1.Schema({
23
24
  storageBucketSchema.index({ user_id: 1, team: 1, name: 1 }, { unique: true, name: "uniq_storage_bucket_owner_name" });
24
25
  storageBucketSchema.index({ user_id: 1, updatedAt: -1 }, { name: "idx_storage_bucket_user_updated_at" });
25
26
  storageBucketSchema.index({ team: 1, updatedAt: -1 }, { name: "idx_storage_bucket_team_updated_at" });
27
+ storageBucketSchema.index({ user_id: 1, team: 1, project_environment: 1, updatedAt: -1 }, { name: "idx_storage_bucket_environment_updated_at" });
26
28
  const storageObjectSchema = new mongoose_1.Schema({
27
29
  bucket: { type: mongoose_1.Schema.Types.ObjectId, ref: "StorageBucket", required: true, index: true },
28
30
  project: { type: mongoose_1.Schema.Types.ObjectId, ref: "Project", required: false, index: true },
31
+ project_environment: { type: mongoose_1.Schema.Types.ObjectId, ref: "ProjectEnvironment", required: false, index: true },
29
32
  key: { type: String, required: true },
30
33
  path: { type: String, required: true },
31
34
  content_type: { type: String },
@@ -38,6 +41,7 @@ storageObjectSchema.index({ bucket: 1, key: 1 }, { unique: true, name: "uniq_sto
38
41
  const storageUploadSchema = new mongoose_1.Schema({
39
42
  bucket: { type: mongoose_1.Schema.Types.ObjectId, ref: "StorageBucket", required: true, index: true },
40
43
  project: { type: mongoose_1.Schema.Types.ObjectId, ref: "Project", required: false, index: true },
44
+ project_environment: { type: mongoose_1.Schema.Types.ObjectId, ref: "ProjectEnvironment", required: false, index: true },
41
45
  key: { type: String, required: true },
42
46
  path: { type: String, required: true },
43
47
  upload_id: { type: String, index: true },
@@ -65,6 +69,7 @@ const storageCredentialSchema = new mongoose_1.Schema({
65
69
  name: { type: String, required: true, trim: true },
66
70
  bucket: { type: mongoose_1.Schema.Types.ObjectId, ref: "StorageBucket", required: true, index: true },
67
71
  project: { type: mongoose_1.Schema.Types.ObjectId, ref: "Project", required: false, index: true },
72
+ project_environment: { type: mongoose_1.Schema.Types.ObjectId, ref: "ProjectEnvironment", required: false, index: true },
68
73
  user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: false, index: true },
69
74
  team: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", required: false, index: true },
70
75
  provider: { type: String, default: "tigris" },
@@ -80,6 +85,7 @@ storageCredentialSchema.index({ bucket: 1, status: 1, updatedAt: -1 }, { name: "
80
85
  const storageMigrationSchema = new mongoose_1.Schema({
81
86
  bucket: { type: mongoose_1.Schema.Types.ObjectId, ref: "StorageBucket", required: true, index: true },
82
87
  project: { type: mongoose_1.Schema.Types.ObjectId, ref: "Project", required: false, index: true },
88
+ project_environment: { type: mongoose_1.Schema.Types.ObjectId, ref: "ProjectEnvironment", required: false, index: true },
83
89
  user_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: false, index: true },
84
90
  team: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", required: false, index: true },
85
91
  source_bucket: { type: String, required: true, trim: true },
@@ -1,4 +1,4 @@
1
- import { ServiceType } from "../enum";
1
+ import { SCALING_SOURCE, ServiceType } from "../enum";
2
2
  import { IProject } from "./project";
3
3
  import { IRegion } from "./region";
4
4
  import { ITeam } from "./team";
@@ -45,4 +45,6 @@ export interface IComputeChange {
45
45
  project_deleted_at?: Date;
46
46
  billed: boolean;
47
47
  storage_pricing_factor: number;
48
+ instance_count?: number;
49
+ scaling_source?: SCALING_SOURCE;
48
50
  }
@@ -1,4 +1,5 @@
1
1
  import { Document, Types } from "mongoose";
2
+ import { IProjectEnvironment } from "./project-environment";
2
3
  import { StorageBucketStatus, StorageCredentialRole, StorageCredentialStatus, StorageMigrationStatus, StorageTokenStatus, StorageUploadStatus } from "../enum";
3
4
  export type StorageTokenPermission = "read" | "write" | "delete" | "list" | "admin";
4
5
  export type StorageCorsRule = {
@@ -22,6 +23,7 @@ export type StorageLifecycleRuleTransition = {
22
23
  export interface IStorageBucket extends Document {
23
24
  name: string;
24
25
  project?: Types.ObjectId;
26
+ project_environment?: IProjectEnvironment | Types.ObjectId;
25
27
  user_id?: Types.ObjectId;
26
28
  team?: Types.ObjectId;
27
29
  bucket_name: string;
@@ -41,6 +43,7 @@ export interface IStorageBucket extends Document {
41
43
  export interface IStorageObject extends Document {
42
44
  bucket: Types.ObjectId;
43
45
  project?: Types.ObjectId;
46
+ project_environment?: IProjectEnvironment | Types.ObjectId;
44
47
  key: string;
45
48
  path: string;
46
49
  content_type?: string;
@@ -54,6 +57,7 @@ export interface IStorageObject extends Document {
54
57
  export interface IStorageUpload extends Document {
55
58
  bucket: Types.ObjectId;
56
59
  project?: Types.ObjectId;
60
+ project_environment?: IProjectEnvironment | Types.ObjectId;
57
61
  key: string;
58
62
  path: string;
59
63
  upload_id?: string;
@@ -84,6 +88,7 @@ export interface IStorageCredential extends Document {
84
88
  name: string;
85
89
  bucket: Types.ObjectId;
86
90
  project?: Types.ObjectId;
91
+ project_environment?: IProjectEnvironment | Types.ObjectId;
87
92
  user_id?: Types.ObjectId;
88
93
  team?: Types.ObjectId;
89
94
  provider: string;
@@ -100,6 +105,7 @@ export interface IStorageCredential extends Document {
100
105
  export interface IStorageMigration extends Document {
101
106
  bucket: Types.ObjectId;
102
107
  project?: Types.ObjectId;
108
+ project_environment?: IProjectEnvironment | Types.ObjectId;
103
109
  user_id?: Types.ObjectId;
104
110
  team?: Types.ObjectId;
105
111
  source_bucket: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "3.8.57",
3
+ "version": "3.8.60",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",