@brimble/models 2.3.8 → 2.3.9
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.
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
import { IPlanConfiguration } from './types/plan_configuration';
|
|
3
|
+
declare const PlanConfiguration: mongoose.Model<IPlanConfiguration, {}, {}, {}, mongoose.Document<unknown, {}, IPlanConfiguration> & IPlanConfiguration & {
|
|
4
|
+
_id: mongoose.Types.ObjectId;
|
|
5
|
+
}, any>;
|
|
6
|
+
export default PlanConfiguration;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
27
|
+
const enum_1 = require("./enum");
|
|
28
|
+
const PlanConfigurationSchema = new mongoose_1.Schema({
|
|
29
|
+
tag: { type: String, required: true },
|
|
30
|
+
slack_support: { type: Boolean, default: false },
|
|
31
|
+
concurrent_builds: { type: Number, required: true },
|
|
32
|
+
project_limit: { type: Number, required: true },
|
|
33
|
+
deploy_private_organization: { type: Boolean, default: false },
|
|
34
|
+
preview_comments: { type: Boolean, default: false },
|
|
35
|
+
analytics: { type: Boolean, default: false },
|
|
36
|
+
build_minutes: { type: Number, required: true },
|
|
37
|
+
log_retention: { type: Number, required: true },
|
|
38
|
+
bandwidth: { type: Number, required: true },
|
|
39
|
+
plan_type: { type: String, enum: Object.values(enum_1.SUBSCRIPTION_PLAN_TYPE), required: true },
|
|
40
|
+
memory: { type: Number, required: true },
|
|
41
|
+
build_timeout: { type: Number, required: true },
|
|
42
|
+
storage: { type: Number, required: true },
|
|
43
|
+
cpu: { type: Number, required: true },
|
|
44
|
+
}, { timestamps: true });
|
|
45
|
+
const PlanConfiguration = mongoose_1.default.model('PlanConfigurations', PlanConfigurationSchema);
|
|
46
|
+
exports.default = PlanConfiguration;
|
|
@@ -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/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import mongoose, { Schema, Document } 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
|
+
const PlanConfiguration = mongoose.model<IPlanConfiguration>('PlanConfigurations', PlanConfigurationSchema);
|
|
24
|
+
|
|
25
|
+
export default PlanConfiguration;
|
|
@@ -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
|
+
|