@brimble/models 3.8.20 → 3.8.22

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.
@@ -244,8 +244,6 @@ const projectSchema = new mongoose_1.Schema({
244
244
  default: null,
245
245
  },
246
246
  }, { timestamps: true });
247
- // Partial index for the free-tier lifecycle crons. Restricts the index to
248
- // rows that actually carry an expiry, so paid/legacy projects stay out of it.
249
247
  projectSchema.index({ free_tier_expires_at: 1, serviceType: 1, status: 1 }, {
250
248
  partialFilterExpression: { free_tier_expires_at: { $type: "date" } },
251
249
  name: "free_tier_lifecycle",
package/dist/sandbox.js CHANGED
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const mongoose_1 = require("mongoose");
4
4
  const enum_1 = require("./enum");
5
5
  const sandboxSchema = new mongoose_1.Schema({
6
+ name: {
7
+ type: String,
8
+ required: true
9
+ },
6
10
  user_id: {
7
11
  type: mongoose_1.Schema.Types.ObjectId,
8
12
  ref: "User",
@@ -9,6 +9,7 @@ export interface ISandboxSpecs {
9
9
  disk: number;
10
10
  }
11
11
  export interface ISandbox extends Document {
12
+ name: string;
12
13
  user_id: IUser | Types.ObjectId;
13
14
  team: ITeam | Types.ObjectId | null;
14
15
  project_environment: IProjectEnvironment | Types.ObjectId | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "3.8.20",
3
+ "version": "3.8.22",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,6 +9,7 @@
9
9
  },
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
+ "@brimble/models": "^3.8.21",
12
13
  "@brimble/utils": "^1.5.23",
13
14
  "dotenv": "^8.2.0",
14
15
  "mongoose": "^8.2.1",
package/project/index.ts CHANGED
@@ -247,8 +247,6 @@ const projectSchema = new Schema(
247
247
  { timestamps: true },
248
248
  );
249
249
 
250
- // Partial index for the free-tier lifecycle crons. Restricts the index to
251
- // rows that actually carry an expiry, so paid/legacy projects stay out of it.
252
250
  projectSchema.index(
253
251
  { free_tier_expires_at: 1, serviceType: 1, status: 1 },
254
252
  {
@@ -258,4 +256,5 @@ projectSchema.index(
258
256
  );
259
257
 
260
258
  export default model<IProject>("Project", projectSchema);
259
+
261
260
  export const DeletedProject = model<IProject>("DeletedProject", projectSchema);
package/sandbox.ts CHANGED
@@ -3,6 +3,10 @@ import { ISandbox } from "./types/sandbox";
3
3
  import { SANDBOX_STATUS, SANDBOX_DESTROY_REASON } from "./enum";
4
4
 
5
5
  const sandboxSchema: Schema = new Schema({
6
+ name: {
7
+ type: String,
8
+ required: true
9
+ },
6
10
  user_id: {
7
11
  type: Schema.Types.ObjectId,
8
12
  ref: "User",
package/types/sandbox.ts CHANGED
@@ -11,6 +11,7 @@ export interface ISandboxSpecs {
11
11
  }
12
12
 
13
13
  export interface ISandbox extends Document {
14
+ name: string;
14
15
  user_id: IUser | Types.ObjectId;
15
16
  team: ITeam | Types.ObjectId | null;
16
17
  project_environment: IProjectEnvironment | Types.ObjectId | null;