@brimble/models 2.3.8 → 2.4.0
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 +2 -1
- package/dist/index.js +3 -1
- package/dist/plan_configuration.d.ts +6 -0
- package/dist/plan_configuration.js +22 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/plan_configuration.d.ts +19 -0
- package/dist/types/plan_configuration.js +2 -0
- package/index.ts +3 -1
- package/package.json +1 -1
- package/plan_configuration.ts +23 -0
- package/types/index.ts +2 -1
- package/types/plan_configuration.ts +21 -0
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,8 @@ export { default as Wallet } from "./wallet";
|
|
|
20
20
|
export { default as DbImage } from "./db-image";
|
|
21
21
|
export { default as Job } from "./job";
|
|
22
22
|
export { default as Liscense } from "./license";
|
|
23
|
-
export {
|
|
23
|
+
export { default as PlanConfiguration } from "./plan_configuration";
|
|
24
|
+
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 } from "./types";
|
|
24
25
|
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 } from "./enum";
|
|
25
26
|
import mongoose from "mongoose";
|
|
26
27
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -12,7 +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.closeMongo = exports.db = exports.connectToMongo = 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.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.closeMongo = exports.db = exports.connectToMongo = 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.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
16
|
var user_1 = require("./user");
|
|
17
17
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
18
18
|
var project_1 = require("./project");
|
|
@@ -58,6 +58,8 @@ var job_1 = require("./job");
|
|
|
58
58
|
Object.defineProperty(exports, "Job", { enumerable: true, get: function () { return __importDefault(job_1).default; } });
|
|
59
59
|
var license_1 = require("./license");
|
|
60
60
|
Object.defineProperty(exports, "Liscense", { enumerable: true, get: function () { return __importDefault(license_1).default; } });
|
|
61
|
+
var plan_configuration_1 = require("./plan_configuration");
|
|
62
|
+
Object.defineProperty(exports, "PlanConfiguration", { enumerable: true, get: function () { return __importDefault(plan_configuration_1).default; } });
|
|
61
63
|
var enum_1 = require("./enum");
|
|
62
64
|
Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
|
|
63
65
|
Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import { IPlanConfiguration } from './types/plan_configuration';
|
|
3
|
+
declare const _default: mongoose.Model<IPlanConfiguration, {}, {}, {}, mongoose.Document<unknown, {}, IPlanConfiguration> & IPlanConfiguration & {
|
|
4
|
+
_id: mongoose.Types.ObjectId;
|
|
5
|
+
}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const PlanConfigurationSchema = new mongoose_1.Schema({
|
|
6
|
+
tag: { type: String, required: true },
|
|
7
|
+
slack_support: { type: Boolean, default: false },
|
|
8
|
+
concurrent_builds: { type: Number, required: true },
|
|
9
|
+
project_limit: { type: Number, required: true },
|
|
10
|
+
deploy_private_organization: { type: Boolean, default: false },
|
|
11
|
+
preview_comments: { type: Boolean, default: false },
|
|
12
|
+
analytics: { type: Boolean, default: false },
|
|
13
|
+
build_minutes: { type: Number, required: true },
|
|
14
|
+
log_retention: { type: Number, required: true },
|
|
15
|
+
bandwidth: { type: Number, required: true },
|
|
16
|
+
plan_type: { type: String, enum: Object.values(enum_1.SUBSCRIPTION_PLAN_TYPE), required: true },
|
|
17
|
+
memory: { type: Number, required: true },
|
|
18
|
+
build_timeout: { type: Number, required: true },
|
|
19
|
+
storage: { type: Number, required: true },
|
|
20
|
+
cpu: { type: Number, required: true },
|
|
21
|
+
}, { timestamps: true });
|
|
22
|
+
exports.default = (0, mongoose_1.model)('PlanConfigurations', PlanConfigurationSchema, "plan_configurations");
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { SUBSCRIPTION_PLAN_TYPE } from "../enum";
|
|
3
|
+
export interface IPlanConfiguration extends Document {
|
|
4
|
+
tag: string;
|
|
5
|
+
slack_support: boolean;
|
|
6
|
+
concurrent_builds: number;
|
|
7
|
+
project_limit: number;
|
|
8
|
+
deploy_private_organization: boolean;
|
|
9
|
+
preview_comments: boolean;
|
|
10
|
+
analytics: boolean;
|
|
11
|
+
build_minutes: number;
|
|
12
|
+
log_retention: number;
|
|
13
|
+
bandwidth: number;
|
|
14
|
+
plan_type: SUBSCRIPTION_PLAN_TYPE;
|
|
15
|
+
memory: number;
|
|
16
|
+
build_timeout: number;
|
|
17
|
+
storage: number;
|
|
18
|
+
cpu: number;
|
|
19
|
+
}
|
package/index.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { default as Wallet } from "./wallet";
|
|
|
20
20
|
export { default as DbImage } from "./db-image";
|
|
21
21
|
export { default as Job } from "./job";
|
|
22
22
|
export { default as Liscense } from "./license"
|
|
23
|
+
export { default as PlanConfiguration } from "./plan_configuration"
|
|
23
24
|
|
|
24
25
|
export {
|
|
25
26
|
IUser,
|
|
@@ -45,7 +46,8 @@ export {
|
|
|
45
46
|
IWallet,
|
|
46
47
|
IDbImage,
|
|
47
48
|
IJob,
|
|
48
|
-
ILicense
|
|
49
|
+
ILicense,
|
|
50
|
+
IPlanConfiguration
|
|
49
51
|
} from "./types";
|
|
50
52
|
export {
|
|
51
53
|
GIT_TYPE,
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import mongoose, { Schema, Document, model } from 'mongoose';
|
|
2
|
+
import { SUBSCRIPTION_PLAN_TYPE } from './enum';
|
|
3
|
+
import { IPlanConfiguration } from './types/plan_configuration';
|
|
4
|
+
|
|
5
|
+
const PlanConfigurationSchema = new Schema<IPlanConfiguration>({
|
|
6
|
+
tag: { type: String, required: true },
|
|
7
|
+
slack_support: { type: Boolean, default: false },
|
|
8
|
+
concurrent_builds: { type: Number, required: true },
|
|
9
|
+
project_limit: { type: Number, required: true },
|
|
10
|
+
deploy_private_organization: { type: Boolean, default: false },
|
|
11
|
+
preview_comments: { type: Boolean, default: false },
|
|
12
|
+
analytics: { type: Boolean, default: false },
|
|
13
|
+
build_minutes: { type: Number, required: true },
|
|
14
|
+
log_retention: { type: Number, required: true },
|
|
15
|
+
bandwidth: { type: Number, required: true },
|
|
16
|
+
plan_type: { type: String, enum: Object.values(SUBSCRIPTION_PLAN_TYPE), required: true },
|
|
17
|
+
memory: { type: Number, required: true },
|
|
18
|
+
build_timeout: { type: Number, required: true },
|
|
19
|
+
storage: { type: Number, required: true },
|
|
20
|
+
cpu: { type: Number, required: true },
|
|
21
|
+
}, { timestamps: true });
|
|
22
|
+
|
|
23
|
+
export default model<IPlanConfiguration>('PlanConfigurations', PlanConfigurationSchema, "plan_configurations");
|
package/types/index.ts
CHANGED
|
@@ -21,4 +21,5 @@ export { IMemberPermission } from "./member-permission";
|
|
|
21
21
|
export { IWallet } from "./wallet";
|
|
22
22
|
export { IDbImage } from "./db-image";
|
|
23
23
|
export { IJob } from "./job";
|
|
24
|
-
export { ILicense } from "./license"
|
|
24
|
+
export { ILicense } from "./license"
|
|
25
|
+
export { IPlanConfiguration } from "./plan_configuration"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { SUBSCRIPTION_PLAN_TYPE } from "../enum";
|
|
3
|
+
|
|
4
|
+
export interface IPlanConfiguration extends Document {
|
|
5
|
+
tag: string;
|
|
6
|
+
slack_support: boolean;
|
|
7
|
+
concurrent_builds: number;
|
|
8
|
+
project_limit: number;
|
|
9
|
+
deploy_private_organization: boolean;
|
|
10
|
+
preview_comments: boolean;
|
|
11
|
+
analytics: boolean;
|
|
12
|
+
build_minutes: number;
|
|
13
|
+
log_retention: number;
|
|
14
|
+
bandwidth: number;
|
|
15
|
+
plan_type: SUBSCRIPTION_PLAN_TYPE;
|
|
16
|
+
memory: number;
|
|
17
|
+
build_timeout: number;
|
|
18
|
+
storage: number;
|
|
19
|
+
cpu: number;
|
|
20
|
+
}
|
|
21
|
+
|