@brimble/models 2.7.2 → 2.7.4

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.
File without changes
package/brimble.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "project": {}
3
+ }
@@ -25,5 +25,9 @@ const dnsSchema = new mongoose_1.Schema({
25
25
  ref: "Domain",
26
26
  required: true,
27
27
  },
28
+ isProxied: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
28
32
  });
29
33
  exports.default = (0, mongoose_1.model)("Dns", dnsSchema);
@@ -15,7 +15,7 @@ const domainSchema = new mongoose_1.Schema({
15
15
  team_id: {
16
16
  ref: "Team",
17
17
  type: mongoose_1.Schema.Types.ObjectId,
18
- required: false
18
+ required: false,
19
19
  },
20
20
  user_id: {
21
21
  ref: "User",
@@ -78,5 +78,9 @@ const domainSchema = new mongoose_1.Schema({
78
78
  },
79
79
  ],
80
80
  is_pending_verification: Boolean,
81
+ redirect: {
82
+ url: String,
83
+ status: Number,
84
+ },
81
85
  }, { timestamps: true });
82
86
  exports.default = (0, mongoose_1.model)("Domain", domainSchema);
package/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@ export { default as ComputeChange } from "./compute";
26
26
  export { default as Region } from "./region";
27
27
  export { default as Volume } from "./volume";
28
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 { 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";
29
+ 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, } from "./enum";
30
30
  import mongoose from "mongoose";
31
31
  export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
32
32
  export declare const db: mongoose.Connection;
package/dist/index.js CHANGED
@@ -12,8 +12,7 @@ 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.closeMongo = exports.db = exports.connectToMongo = 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;
17
16
  var user_1 = require("./user");
18
17
  Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
19
18
  var project_1 = require("./project");
@@ -89,7 +88,6 @@ Object.defineProperty(exports, "DatabaseEngine", { enumerable: true, get: functi
89
88
  Object.defineProperty(exports, "JobStatus", { enumerable: true, get: function () { return enum_1.JobStatus; } });
90
89
  Object.defineProperty(exports, "LicenseStatus", { enumerable: true, get: function () { return enum_1.LicenseStatus; } });
91
90
  Object.defineProperty(exports, "REGION_CONTINENT", { enumerable: true, get: function () { return enum_1.REGION_CONTINENT; } });
92
- Object.defineProperty(exports, "BUILD_DISABLED_BY", { enumerable: true, get: function () { return enum_1.BUILD_DISABLED_BY; } });
93
91
  const mongoose_1 = __importDefault(require("mongoose"));
94
92
  const utils_1 = require("@brimble/utils");
95
93
  const connectToMongo = (mongoUrl, config) => __awaiter(void 0, void 0, void 0, function* () {
@@ -6,4 +6,5 @@ export interface IDns extends Document {
6
6
  type: string;
7
7
  value: string;
8
8
  domain: IDomain;
9
+ isProxied?: boolean;
9
10
  }
@@ -21,4 +21,8 @@ export interface IDomain extends Document {
21
21
  nameservers: string[];
22
22
  dns: IDns[];
23
23
  is_pending_verification: boolean;
24
+ redirect?: {
25
+ url: string;
26
+ status?: 301 | 302 | 307 | 308;
27
+ };
24
28
  }
@@ -8,7 +8,7 @@ export interface ITeam extends Document {
8
8
  projects: IProject[];
9
9
  image: string;
10
10
  isCreator: boolean;
11
- build_disabled: boolean;
12
- build_disabled_by: BUILD_DISABLED_BY;
11
+ build_disabled?: boolean;
12
+ build_disabled_by?: BUILD_DISABLED_BY;
13
13
  subscription: ISubscription;
14
14
  }
package/domain/dns.ts CHANGED
@@ -25,6 +25,10 @@ const dnsSchema = new Schema({
25
25
  ref: "Domain",
26
26
  required: true,
27
27
  },
28
+ isProxied: {
29
+ type: Boolean,
30
+ default: false,
31
+ },
28
32
  });
29
33
 
30
34
  export default model<IDns>("Dns", dnsSchema);
package/domain/index.ts CHANGED
@@ -16,7 +16,7 @@ const domainSchema = new Schema(
16
16
  team_id: {
17
17
  ref: "Team",
18
18
  type: Schema.Types.ObjectId,
19
- required: false
19
+ required: false,
20
20
  },
21
21
  user_id: {
22
22
  ref: "User",
@@ -79,6 +79,10 @@ const domainSchema = new Schema(
79
79
  },
80
80
  ],
81
81
  is_pending_verification: Boolean,
82
+ redirect: {
83
+ url: String,
84
+ status: Number,
85
+ },
82
86
  },
83
87
  { timestamps: true },
84
88
  );
package/index.ts CHANGED
@@ -77,7 +77,6 @@ export {
77
77
  JobStatus,
78
78
  LicenseStatus,
79
79
  REGION_CONTINENT,
80
- BUILD_DISABLED_BY
81
80
  } from "./enum";
82
81
 
83
82
  import mongoose from "mongoose";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.7.2",
3
+ "version": "2.7.4",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -7,4 +7,5 @@ export interface IDns extends Document {
7
7
  type: string;
8
8
  value: string;
9
9
  domain: IDomain;
10
+ isProxied?: boolean;
10
11
  }
@@ -22,4 +22,8 @@ export interface IDomain extends Document {
22
22
  nameservers: string[];
23
23
  dns: IDns[];
24
24
  is_pending_verification: boolean;
25
- }
25
+ redirect?: {
26
+ url: string;
27
+ status?: 301 | 302 | 307 | 308;
28
+ };
29
+ }
package/types/team.ts CHANGED
@@ -9,7 +9,7 @@ export interface ITeam extends Document {
9
9
  projects: IProject[];
10
10
  image: string;
11
11
  isCreator: boolean;
12
- build_disabled: boolean;
13
- build_disabled_by: BUILD_DISABLED_BY;
12
+ build_disabled?: boolean;
13
+ build_disabled_by?: BUILD_DISABLED_BY;
14
14
  subscription: ISubscription;
15
15
  }