@brimble/models 3.7.85 → 3.7.87
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/plan_configuration.js +1 -0
- package/dist/project/index.js +6 -0
- package/dist/team.js +13 -0
- package/dist/types/plan_configuration.d.ts +1 -0
- package/dist/types/team.d.ts +5 -2
- package/dist/types/user.d.ts +1 -0
- package/dist/user.js +1 -0
- package/package.json +1 -1
- package/plan_configuration.ts +1 -0
- package/project/index.ts +10 -0
- package/team.ts +13 -0
- package/types/plan_configuration.ts +1 -0
- package/types/team.ts +5 -2
- package/types/user.ts +1 -0
- package/user.ts +1 -0
|
@@ -15,6 +15,7 @@ const PlanConfigurationSchema = new mongoose_1.Schema({
|
|
|
15
15
|
log_retention: { type: Number, required: true },
|
|
16
16
|
bandwidth: { type: Number, required: true },
|
|
17
17
|
price: { type: Number, required: true },
|
|
18
|
+
password_enabled: { type: Boolean, required: false, default: true },
|
|
18
19
|
autoscaling_enabled: { type: Boolean, default: false, required: false },
|
|
19
20
|
region: { type: mongoose_1.Schema.Types.ObjectId, ref: "Region", required: false },
|
|
20
21
|
multi_region: { type: Boolean, default: false },
|
package/dist/project/index.js
CHANGED
|
@@ -239,5 +239,11 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
239
239
|
required: false,
|
|
240
240
|
},
|
|
241
241
|
}, { timestamps: true });
|
|
242
|
+
// Partial index for the free-tier lifecycle crons. Restricts the index to
|
|
243
|
+
// rows that actually carry an expiry, so paid/legacy projects stay out of it.
|
|
244
|
+
projectSchema.index({ free_tier_expires_at: 1, serviceType: 1, status: 1 }, {
|
|
245
|
+
partialFilterExpression: { free_tier_expires_at: { $type: "date" } },
|
|
246
|
+
name: "free_tier_lifecycle",
|
|
247
|
+
});
|
|
242
248
|
exports.default = (0, mongoose_1.model)("Project", projectSchema);
|
|
243
249
|
exports.DeletedProject = (0, mongoose_1.model)("DeletedProject", projectSchema);
|
package/dist/team.js
CHANGED
|
@@ -55,6 +55,19 @@ const teamSchema = new mongoose_1.Schema({
|
|
|
55
55
|
type: Number,
|
|
56
56
|
required: false,
|
|
57
57
|
},
|
|
58
|
+
enforce_2fa: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
62
|
+
enforce_2fa_at: {
|
|
63
|
+
type: Date,
|
|
64
|
+
default: null,
|
|
65
|
+
},
|
|
66
|
+
enforce_2fa_by: {
|
|
67
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
68
|
+
ref: "User",
|
|
69
|
+
default: null,
|
|
70
|
+
},
|
|
58
71
|
}, {
|
|
59
72
|
timestamps: true,
|
|
60
73
|
});
|
package/dist/types/team.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Document } from "mongoose";
|
|
2
|
-
import { IMember, IProject, ISubscription } from "./";
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { IMember, IProject, ISubscription, IUser } from "./";
|
|
3
3
|
import { BUILD_DISABLED_BY } from "../enum";
|
|
4
4
|
export interface ITeam extends Document {
|
|
5
5
|
name: string;
|
|
@@ -16,4 +16,7 @@ export interface ITeam extends Document {
|
|
|
16
16
|
build_disabled: boolean;
|
|
17
17
|
build_disabled_by: BUILD_DISABLED_BY;
|
|
18
18
|
subscription: ISubscription;
|
|
19
|
+
enforce_2fa: boolean;
|
|
20
|
+
enforce_2fa_at: Date | null;
|
|
21
|
+
enforce_2fa_by: IUser | Types.ObjectId | null;
|
|
19
22
|
}
|
package/dist/types/user.d.ts
CHANGED
package/dist/user.js
CHANGED
package/package.json
CHANGED
package/plan_configuration.ts
CHANGED
|
@@ -16,6 +16,7 @@ const PlanConfigurationSchema = new Schema<IPlanConfiguration>(
|
|
|
16
16
|
log_retention: { type: Number, required: true },
|
|
17
17
|
bandwidth: { type: Number, required: true },
|
|
18
18
|
price: { type: Number, required: true },
|
|
19
|
+
password_enabled: { type: Boolean, required: false, default: true },
|
|
19
20
|
autoscaling_enabled: { type: Boolean, default: false, required: false },
|
|
20
21
|
region: { type: Schema.Types.ObjectId, ref: "Region", required: false },
|
|
21
22
|
multi_region: { type: Boolean, default: false },
|
package/project/index.ts
CHANGED
|
@@ -242,5 +242,15 @@ const projectSchema = new Schema(
|
|
|
242
242
|
{ timestamps: true },
|
|
243
243
|
);
|
|
244
244
|
|
|
245
|
+
// Partial index for the free-tier lifecycle crons. Restricts the index to
|
|
246
|
+
// rows that actually carry an expiry, so paid/legacy projects stay out of it.
|
|
247
|
+
projectSchema.index(
|
|
248
|
+
{ free_tier_expires_at: 1, serviceType: 1, status: 1 },
|
|
249
|
+
{
|
|
250
|
+
partialFilterExpression: { free_tier_expires_at: { $type: "date" } },
|
|
251
|
+
name: "free_tier_lifecycle",
|
|
252
|
+
},
|
|
253
|
+
);
|
|
254
|
+
|
|
245
255
|
export default model<IProject>("Project", projectSchema);
|
|
246
256
|
export const DeletedProject = model<IProject>("DeletedProject", projectSchema);
|
package/team.ts
CHANGED
|
@@ -56,6 +56,19 @@ const teamSchema: Schema = new Schema(
|
|
|
56
56
|
type: Number,
|
|
57
57
|
required: false,
|
|
58
58
|
},
|
|
59
|
+
enforce_2fa: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false,
|
|
62
|
+
},
|
|
63
|
+
enforce_2fa_at: {
|
|
64
|
+
type: Date,
|
|
65
|
+
default: null,
|
|
66
|
+
},
|
|
67
|
+
enforce_2fa_by: {
|
|
68
|
+
type: Schema.Types.ObjectId,
|
|
69
|
+
ref: "User",
|
|
70
|
+
default: null,
|
|
71
|
+
},
|
|
59
72
|
},
|
|
60
73
|
{
|
|
61
74
|
timestamps: true,
|
package/types/team.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Document } from "mongoose";
|
|
2
|
-
import { IMember, IProject, ISubscription } from "./";
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { IMember, IProject, ISubscription, IUser } from "./";
|
|
3
3
|
import { BUILD_DISABLED_BY } from "../enum";
|
|
4
4
|
|
|
5
5
|
export interface ITeam extends Document {
|
|
@@ -17,4 +17,7 @@ export interface ITeam extends Document {
|
|
|
17
17
|
build_disabled: boolean;
|
|
18
18
|
build_disabled_by: BUILD_DISABLED_BY;
|
|
19
19
|
subscription: ISubscription;
|
|
20
|
+
enforce_2fa: boolean;
|
|
21
|
+
enforce_2fa_at: Date | null;
|
|
22
|
+
enforce_2fa_by: IUser | Types.ObjectId | null;
|
|
20
23
|
}
|
package/types/user.ts
CHANGED