@brimble/models 3.8.180 → 3.8.184

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/db-image.js CHANGED
@@ -135,6 +135,18 @@ const dbImageSchema = new mongoose_1.Schema({
135
135
  type: Boolean,
136
136
  default: true,
137
137
  },
138
+ tls_protocol: {
139
+ type: String,
140
+ required: false,
141
+ },
142
+ tls_params: {
143
+ type: Object,
144
+ required: false,
145
+ },
146
+ connection: {
147
+ type: Object,
148
+ required: false,
149
+ },
138
150
  params: {
139
151
  required: false,
140
152
  type: Object,
package/dist/index.d.ts CHANGED
@@ -106,7 +106,7 @@ export { default as AgentWebsiteSnapshot } from "./agent-website-snapshot";
106
106
  export { default as AgentWebsiteFileOverlay } from "./agent-website-file-overlay";
107
107
  export { default as AgentDesignSkill } from "./agent-design-skill";
108
108
  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, 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";
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
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";
111
111
  import mongoose from "mongoose";
112
112
  export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
@@ -205,6 +205,10 @@ const projectSchema = new mongoose_1.Schema({
205
205
  type: String,
206
206
  default: null,
207
207
  },
208
+ lastFailedMessageId: {
209
+ type: String,
210
+ default: null,
211
+ },
208
212
  provisionProgress: {
209
213
  type: {
210
214
  phase: {
@@ -371,6 +375,24 @@ const projectSchema = new mongoose_1.Schema({
371
375
  required: true,
372
376
  },
373
377
  },
378
+ desiredSpecs: {
379
+ type: {
380
+ memory: { type: Number, required: true },
381
+ cpu: { type: Number, required: true },
382
+ storage: { type: Number, required: true },
383
+ region: { type: mongoose_1.Schema.Types.ObjectId, ref: "Region", required: true },
384
+ },
385
+ default: null,
386
+ },
387
+ currentSpecs: {
388
+ type: {
389
+ memory: { type: Number, required: true },
390
+ cpu: { type: Number, required: true },
391
+ storage: { type: Number, required: true },
392
+ region: { type: mongoose_1.Schema.Types.ObjectId, ref: "Region", required: true },
393
+ },
394
+ default: null,
395
+ },
374
396
  last_requested: mongoose_1.Schema.Types.Date,
375
397
  isPaused: Boolean,
376
398
  paused_by: {
@@ -413,6 +435,8 @@ const projectSchema = new mongoose_1.Schema({
413
435
  internalHost: { type: String, required: true },
414
436
  nomadJobId: { type: String, required: false },
415
437
  csiVolumeId: { type: String, required: false },
438
+ serverId: { type: String, required: false },
439
+ appliedStorage: { type: Number, required: false },
416
440
  status: { type: String, required: false },
417
441
  },
418
442
  ],
@@ -1,5 +1,12 @@
1
1
  import { Document } from "mongoose";
2
2
  import { DatabaseEngine, DatabasePasswordChangeMode, DatabasePasswordMode, WorkbenchMode } from "../enum";
3
+ export interface IDbImageConnection {
4
+ user?: boolean;
5
+ database?: boolean;
6
+ protocol?: string;
7
+ port?: number;
8
+ authEnv?: string;
9
+ }
3
10
  export interface IDbImage extends Document {
4
11
  name: DatabaseEngine;
5
12
  image_url: string;
@@ -25,6 +32,9 @@ export interface IDbImage extends Document {
25
32
  volumePath: string;
26
33
  protocol: string | string[];
27
34
  tls_enabled: boolean;
35
+ tls_protocol?: string;
36
+ tls_params?: Record<string, string | number | boolean>;
37
+ connection?: IDbImageConnection;
28
38
  ha: boolean;
29
39
  workbench: boolean;
30
40
  workbench_mode: WorkbenchMode;
@@ -33,7 +43,7 @@ export interface IDbImage extends Document {
33
43
  password_change_mode: DatabasePasswordChangeMode;
34
44
  httpTitle: string;
35
45
  httpSubtext: string;
36
- params: Record<any, any>;
46
+ params: Record<string, string | number | boolean>;
37
47
  recommendations: Array<{
38
48
  cpu: string;
39
49
  memory: string;
@@ -1,7 +1,7 @@
1
1
  export type { IAutoScalingGroup } from "./auto-scaling-group";
2
2
  export type { ICard } from "./card";
3
3
  export type { IComputeChange } from "./compute";
4
- export type { IDbImage } from "./db-image";
4
+ export type { IDbImage, IDbImageConnection } from "./db-image";
5
5
  export type { IDomain } from "./domain";
6
6
  export type { IDns } from "./domain/dns";
7
7
  export type { IDnsChangeLog } from "./domain/dns-changelog";
@@ -25,7 +25,7 @@ export type { IPermission } from "./permission";
25
25
  export type { IPaymentMethod } from "./payment-method";
26
26
  export type { IPlanConfiguration } from "./plan_configuration";
27
27
  export type { IProvider } from "./provider";
28
- export type { IDatabaseProvisionProgress, IHaCluster, IHaClusterMember, IPasswordRotation, IPendingMqEvent, IPgBouncerConfig, IProject, ITlsMigration, TlsMigrationPhase, } from "./project";
28
+ export type { IDatabaseProvisionProgress, IHaCluster, IHaClusterMember, IPasswordRotation, IPendingMqEvent, IPgBouncerConfig, IProject, IProjectSpecs, ITlsMigration, TlsMigrationPhase, } from "./project";
29
29
  export type { IProjectAnalytics } from "./project_analytics";
30
30
  export type { IProjectConnection } from "./project/connection";
31
31
  export type { IProjectNetworkSettings } from "./project-network-settings";
@@ -33,8 +33,16 @@ export interface IHaClusterMember {
33
33
  internalHost: string;
34
34
  nomadJobId?: string;
35
35
  csiVolumeId?: string;
36
+ serverId?: string;
37
+ appliedStorage?: number;
36
38
  status?: string;
37
39
  }
40
+ export interface IProjectSpecs {
41
+ memory: number;
42
+ cpu: number;
43
+ storage: number;
44
+ region: IRegion;
45
+ }
38
46
  export interface IHaCluster {
39
47
  clusterName: string;
40
48
  regions?: Array<Types.ObjectId | IRegion>;
@@ -101,6 +109,7 @@ export interface IProject extends Document {
101
109
  rolloutInterruptedJobId?: string | null;
102
110
  activeOperationMessageId?: string | null;
103
111
  lastCompletedMessageId?: string | null;
112
+ lastFailedMessageId?: string | null;
104
113
  provisionProgress?: IDatabaseProvisionProgress | null;
105
114
  dbImage: IDbImage;
106
115
  ha: boolean;
@@ -161,12 +170,9 @@ export interface IProject extends Document {
161
170
  replicas: number;
162
171
  vaultPath: string | null;
163
172
  vaultToken: string | null;
164
- specs: {
165
- memory: number;
166
- cpu: number;
167
- storage: number;
168
- region: IRegion;
169
- };
173
+ specs: IProjectSpecs;
174
+ desiredSpecs?: IProjectSpecs | null;
175
+ currentSpecs?: IProjectSpecs | null;
170
176
  last_requested: Date;
171
177
  isPaused: boolean;
172
178
  paused_by: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "3.8.180",
3
+ "version": "3.8.184",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",