@brimble/models 2.7.0 → 2.7.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.
@@ -5,6 +5,10 @@ export declare enum GIT_TYPE {
5
5
  DOCKER = "DOCKER",
6
6
  HUGGING_FACE = "HUGGINGFACE"
7
7
  }
8
+ export declare enum BUILD_DISABLED_BY {
9
+ System = "system",
10
+ User = "user"
11
+ }
8
12
  export declare enum REQUEST_TYPE {
9
13
  GET = "GET",
10
14
  PUT = "PUT",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REGION_CONTINENT = exports.PERMISSION_TYPE = exports.ROLES = exports.DNS_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.GIT_TYPE = void 0;
3
+ exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REGION_CONTINENT = exports.PERMISSION_TYPE = exports.ROLES = exports.DNS_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.BUILD_DISABLED_BY = exports.GIT_TYPE = void 0;
4
4
  var GIT_TYPE;
5
5
  (function (GIT_TYPE) {
6
6
  GIT_TYPE["GITHUB"] = "GITHUB";
@@ -9,6 +9,11 @@ var GIT_TYPE;
9
9
  GIT_TYPE["DOCKER"] = "DOCKER";
10
10
  GIT_TYPE["HUGGING_FACE"] = "HUGGINGFACE";
11
11
  })(GIT_TYPE = exports.GIT_TYPE || (exports.GIT_TYPE = {}));
12
+ var BUILD_DISABLED_BY;
13
+ (function (BUILD_DISABLED_BY) {
14
+ BUILD_DISABLED_BY["System"] = "system";
15
+ BUILD_DISABLED_BY["User"] = "user";
16
+ })(BUILD_DISABLED_BY = exports.BUILD_DISABLED_BY || (exports.BUILD_DISABLED_BY = {}));
12
17
  var REQUEST_TYPE;
13
18
  (function (REQUEST_TYPE) {
14
19
  REQUEST_TYPE["GET"] = "GET";
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, } 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, BUILD_DISABLED_BY } 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,7 +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.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;
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;
16
17
  var user_1 = require("./user");
17
18
  Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
18
19
  var project_1 = require("./project");
@@ -88,6 +89,7 @@ Object.defineProperty(exports, "DatabaseEngine", { enumerable: true, get: functi
88
89
  Object.defineProperty(exports, "JobStatus", { enumerable: true, get: function () { return enum_1.JobStatus; } });
89
90
  Object.defineProperty(exports, "LicenseStatus", { enumerable: true, get: function () { return enum_1.LicenseStatus; } });
90
91
  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; } });
91
93
  const mongoose_1 = __importDefault(require("mongoose"));
92
94
  const utils_1 = require("@brimble/utils");
93
95
  const connectToMongo = (mongoUrl, config) => __awaiter(void 0, void 0, void 0, function* () {
@@ -4,6 +4,7 @@ import { ITeam } from "./team";
4
4
  import { IUser } from "./user";
5
5
  export interface IComputeChange {
6
6
  _id?: string;
7
+ project_name: string;
7
8
  project_id: IProject;
8
9
  user_id: IUser;
9
10
  team_id?: ITeam;
@@ -1,5 +1,6 @@
1
1
  import { Document } from "mongoose";
2
2
  import { IMember, IProject, ISubscription } from "./";
3
+ import { BUILD_DISABLED_BY } from "../enum";
3
4
  export interface ITeam extends Document {
4
5
  name: string;
5
6
  description: string;
@@ -7,5 +8,7 @@ export interface ITeam extends Document {
7
8
  projects: IProject[];
8
9
  image: string;
9
10
  isCreator: boolean;
11
+ build_disabled: boolean;
12
+ build_disabled_by: BUILD_DISABLED_BY;
10
13
  subscription: ISubscription;
11
14
  }
@@ -1,6 +1,7 @@
1
1
  import { Document } from "mongoose";
2
2
  import { IGit } from ".";
3
3
  import { IFollowing, IProject, ITeam } from "./";
4
+ import { BUILD_DISABLED_BY } from "../enum";
4
5
  export interface IUser extends Document {
5
6
  first_name: string;
6
7
  last_name: string;
@@ -24,7 +25,7 @@ export interface IUser extends Document {
24
25
  activated: boolean;
25
26
  is_waitlist: boolean;
26
27
  build_disabled: boolean;
27
- build_disabled_by: string;
28
+ build_disabled_by: BUILD_DISABLED_BY;
28
29
  spending_limit: number;
29
30
  disabled: boolean;
30
31
  disabled_at: Date;
package/enum/index.ts CHANGED
@@ -6,6 +6,11 @@ export enum GIT_TYPE {
6
6
  HUGGING_FACE = "HUGGINGFACE"
7
7
  }
8
8
 
9
+ export enum BUILD_DISABLED_BY {
10
+ System = "system",
11
+ User = "user"
12
+ }
13
+
9
14
  export enum REQUEST_TYPE {
10
15
  GET = "GET",
11
16
  PUT = "PUT",
package/index.ts CHANGED
@@ -77,6 +77,7 @@ export {
77
77
  JobStatus,
78
78
  LicenseStatus,
79
79
  REGION_CONTINENT,
80
+ BUILD_DISABLED_BY
80
81
  } from "./enum";
81
82
 
82
83
  import mongoose from "mongoose";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/types/compute.ts CHANGED
@@ -5,6 +5,7 @@ import { IUser } from "./user";
5
5
 
6
6
  export interface IComputeChange {
7
7
  _id?: string;
8
+ project_name: string;
8
9
  project_id: IProject;
9
10
  user_id: IUser;
10
11
  team_id?: ITeam;
package/types/team.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Document } from "mongoose";
2
2
  import { IMember, IProject, ISubscription } from "./";
3
+ import { BUILD_DISABLED_BY } from "../enum";
3
4
 
4
5
  export interface ITeam extends Document {
5
6
  name: string;
@@ -8,5 +9,7 @@ export interface ITeam extends Document {
8
9
  projects: IProject[];
9
10
  image: string;
10
11
  isCreator: boolean;
12
+ build_disabled: boolean;
13
+ build_disabled_by: BUILD_DISABLED_BY;
11
14
  subscription: ISubscription;
12
15
  }
package/types/user.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Document } from "mongoose";
2
2
  import { IGit } from ".";
3
3
  import { IFollowing, IProject, ITeam } from "./";
4
+ import { BUILD_DISABLED_BY } from "../enum";
4
5
 
5
6
  export interface IUser extends Document {
6
7
  first_name: string;
@@ -25,7 +26,7 @@ export interface IUser extends Document {
25
26
  activated: boolean;
26
27
  is_waitlist: boolean;
27
28
  build_disabled: boolean;
28
- build_disabled_by: string;
29
+ build_disabled_by: BUILD_DISABLED_BY;
29
30
  spending_limit: number;
30
31
  disabled: boolean;
31
32
  disabled_at: Date;