@brimble/models 2.8.0 → 2.8.2

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/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { default as User } from "./user";
2
2
  export { default as Project, DeletedProject } from "./project";
3
3
  export { default as Preview } from "./project/preview";
4
+ export { default as ProjectConnection } from "./project/connection";
4
5
  export { default as Following } from "./following";
5
6
  export { default as Integration } from "./integration";
6
7
  export { default as Domain } from "./domain";
@@ -25,7 +26,7 @@ export { default as AutoScalingGroup } from "./auto-scaling";
25
26
  export { default as ComputeChange } from "./compute";
26
27
  export { default as Region } from "./region";
27
28
  export { default as Volume } from "./volume";
28
- export { IUser, IGit, IProject, IPreview, 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, } from "./types";
29
+ export { IUser, IGit, IProject, IPreview, IProjectConnection, 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, } from "./types";
29
30
  export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, DatabaseEngine, JobStatus, LicenseStatus, REGION_CONTINENT, BUILD_DISABLED_BY, } from "./enum";
30
31
  import mongoose from "mongoose";
31
32
  export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
package/dist/index.js CHANGED
@@ -12,8 +12,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.db = exports.connectToMongo = exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = exports.DNS_TYPE = exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = 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.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.Dns = exports.Domain = exports.Integration = exports.Following = exports.Preview = exports.DeletedProject = exports.Project = exports.User = void 0;
16
- exports.closeMongo = void 0;
15
+ exports.connectToMongo = exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = exports.DNS_TYPE = exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = 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.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.Dns = exports.Domain = exports.Integration = exports.Following = exports.ProjectConnection = exports.Preview = exports.DeletedProject = exports.Project = exports.User = void 0;
16
+ exports.closeMongo = exports.db = void 0;
17
17
  var user_1 = require("./user");
18
18
  Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
19
19
  var project_1 = require("./project");
@@ -21,6 +21,8 @@ Object.defineProperty(exports, "Project", { enumerable: true, get: function () {
21
21
  Object.defineProperty(exports, "DeletedProject", { enumerable: true, get: function () { return project_1.DeletedProject; } });
22
22
  var preview_1 = require("./project/preview");
23
23
  Object.defineProperty(exports, "Preview", { enumerable: true, get: function () { return __importDefault(preview_1).default; } });
24
+ var connection_1 = require("./project/connection");
25
+ Object.defineProperty(exports, "ProjectConnection", { enumerable: true, get: function () { return __importDefault(connection_1).default; } });
24
26
  var following_1 = require("./following");
25
27
  Object.defineProperty(exports, "Following", { enumerable: true, get: function () { return __importDefault(following_1).default; } });
26
28
  var integration_1 = require("./integration");
@@ -0,0 +1,30 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose" />
25
+ /// <reference types="mongoose/types/inferschematype" />
26
+ import { IProjectConnection } from "../types";
27
+ declare const _default: import("mongoose").Model<IProjectConnection, {}, {}, {}, import("mongoose").Document<unknown, {}, IProjectConnection> & IProjectConnection & {
28
+ _id: import("mongoose").Types.ObjectId;
29
+ }, any>;
30
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const projectConnectionSchema = new mongoose_1.Schema({
5
+ service: {
6
+ ref: "Project",
7
+ type: mongoose_1.Schema.Types.ObjectId,
8
+ },
9
+ project: {
10
+ ref: "Project",
11
+ type: mongoose_1.Schema.Types.ObjectId,
12
+ },
13
+ }, { timestamps: true });
14
+ exports.default = (0, mongoose_1.model)("ProjectConnection", projectConnectionSchema);
@@ -171,6 +171,10 @@ const projectSchema = new mongoose_1.Schema({
171
171
  type: Boolean,
172
172
  default: false,
173
173
  },
174
+ persistentDiskSize: {
175
+ type: Number,
176
+ default: 0,
177
+ },
174
178
  authEnabled: {
175
179
  type: Boolean,
176
180
  default: false,
@@ -204,6 +208,10 @@ const projectSchema = new mongoose_1.Schema({
204
208
  type: String,
205
209
  default: null,
206
210
  },
211
+ volumeMounts: {
212
+ type: Array,
213
+ default: [],
214
+ },
207
215
  }, { timestamps: true });
208
216
  exports.default = (0, mongoose_1.model)("Project", projectSchema);
209
217
  exports.DeletedProject = (0, mongoose_1.model)("DeletedProject", projectSchema);
@@ -3,6 +3,7 @@ export { IGit } from "./git";
3
3
  export { IFollowing } from "./following";
4
4
  export { IProject } from "./project";
5
5
  export { IPreview } from "./project/preview";
6
+ export { IProjectConnection } from "./project/connection";
6
7
  export { IIntegration } from "./integration";
7
8
  export { IEnv } from "./env";
8
9
  export { IDomain } from "./domain";
@@ -0,0 +1,6 @@
1
+ import { Document } from "mongoose";
2
+ import { IProject } from ".";
3
+ export interface IProjectConnection extends Document {
4
+ service: IProject;
5
+ project: IProject;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -85,4 +85,9 @@ export interface IProject extends Document {
85
85
  isPaid: boolean;
86
86
  hasUpdates?: boolean;
87
87
  whiteListedIps?: string[];
88
+ persistentDiskSize?: number;
89
+ volumeMounts: Array<{
90
+ storage: string;
91
+ destination: string;
92
+ }>;
88
93
  }
package/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { default as User } from "./user";
2
2
  export { default as Project, DeletedProject } from "./project";
3
3
  export { default as Preview } from "./project/preview";
4
+ export { default as ProjectConnection } from "./project/connection";
4
5
  export { default as Following } from "./following";
5
6
  export { default as Integration } from "./integration";
6
7
  export { default as Domain } from "./domain";
@@ -31,6 +32,7 @@ export {
31
32
  IGit,
32
33
  IProject,
33
34
  IPreview,
35
+ IProjectConnection,
34
36
  IFollowing,
35
37
  IIntegration,
36
38
  IEnv,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.8.0",
3
+ "version": "2.8.2",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,21 @@
1
+ import { Schema, model } from "mongoose";
2
+ import { IProjectConnection } from "../types";
3
+
4
+ const projectConnectionSchema = new Schema(
5
+ {
6
+ service: {
7
+ ref: "Project",
8
+ type: Schema.Types.ObjectId,
9
+ },
10
+ project: {
11
+ ref: "Project",
12
+ type: Schema.Types.ObjectId,
13
+ },
14
+ },
15
+ { timestamps: true },
16
+ );
17
+
18
+ export default model<IProjectConnection>(
19
+ "ProjectConnection",
20
+ projectConnectionSchema,
21
+ );
package/project/index.ts CHANGED
@@ -171,6 +171,10 @@ const projectSchema = new Schema(
171
171
  type: Boolean,
172
172
  default: false,
173
173
  },
174
+ persistentDiskSize: {
175
+ type: Number,
176
+ default: 0,
177
+ },
174
178
  authEnabled: {
175
179
  type: Boolean,
176
180
  default: false,
@@ -204,6 +208,10 @@ const projectSchema = new Schema(
204
208
  type: String,
205
209
  default: null,
206
210
  },
211
+ volumeMounts: {
212
+ type: Array,
213
+ default: [],
214
+ },
207
215
  },
208
216
  { timestamps: true },
209
217
  );
package/types/index.ts CHANGED
@@ -3,6 +3,7 @@ export { IGit } from "./git";
3
3
  export { IFollowing } from "./following";
4
4
  export { IProject } from "./project";
5
5
  export { IPreview } from "./project/preview";
6
+ export { IProjectConnection } from "./project/connection";
6
7
  export { IIntegration } from "./integration";
7
8
  export { IEnv } from "./env";
8
9
  export { IDomain } from "./domain";
@@ -0,0 +1,7 @@
1
+ import { Document } from "mongoose";
2
+ import { IProject } from ".";
3
+
4
+ export interface IProjectConnection extends Document {
5
+ service: IProject;
6
+ project: IProject;
7
+ }
@@ -86,4 +86,9 @@ export interface IProject extends Document {
86
86
  isPaid: boolean;
87
87
  hasUpdates?: boolean;
88
88
  whiteListedIps?: string[];
89
+ persistentDiskSize?: number;
90
+ volumeMounts: Array<{
91
+ storage: string;
92
+ destination: string;
93
+ }>;
89
94
  }