@brimble/models 3.8.14 → 3.8.15
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/sandbox.js +9 -0
- package/dist/types/sandbox.d.ts +2 -0
- package/dist/types/volume.d.ts +6 -3
- package/dist/volume.js +13 -5
- package/package.json +1 -1
- package/sandbox.ts +9 -0
- package/types/sandbox.ts +2 -0
- package/types/volume.ts +6 -3
- package/volume.ts +13 -5
package/dist/sandbox.js
CHANGED
|
@@ -107,6 +107,15 @@ const sandboxSchema = new mongoose_1.Schema({
|
|
|
107
107
|
ref: "SandboxSnapshot",
|
|
108
108
|
default: null,
|
|
109
109
|
},
|
|
110
|
+
snapshot_mode: {
|
|
111
|
+
type: String,
|
|
112
|
+
enum: ["automatic", "manual"],
|
|
113
|
+
default: "manual",
|
|
114
|
+
},
|
|
115
|
+
snapshot_frequency: {
|
|
116
|
+
type: String,
|
|
117
|
+
default: null,
|
|
118
|
+
},
|
|
110
119
|
isDeleted: {
|
|
111
120
|
type: Boolean,
|
|
112
121
|
default: false,
|
package/dist/types/sandbox.d.ts
CHANGED
package/dist/types/volume.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
import { Document } from "mongoose";
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
2
|
import { IUser } from "./user";
|
|
3
3
|
import { ITeam } from "./team";
|
|
4
|
-
import { ISubscription } from "./subscription";
|
|
5
4
|
export interface IVolume extends Document {
|
|
6
5
|
name: string;
|
|
7
6
|
user?: IUser;
|
|
8
7
|
team?: ITeam;
|
|
9
|
-
subscription: ISubscription;
|
|
10
8
|
size: number;
|
|
11
9
|
mount_path?: string;
|
|
10
|
+
csi_volume_id: string | null;
|
|
11
|
+
region: string | null;
|
|
12
|
+
attached_sandbox_id: Types.ObjectId | null;
|
|
13
|
+
attached_project_id: Types.ObjectId | null;
|
|
14
|
+
last_attached_at: Date | null;
|
|
12
15
|
created_at?: Date;
|
|
13
16
|
updated_at?: Date;
|
|
14
17
|
}
|
package/dist/volume.js
CHANGED
|
@@ -15,13 +15,21 @@ const volumeSchema = new mongoose_1.Schema({
|
|
|
15
15
|
ref: "Team",
|
|
16
16
|
default: null,
|
|
17
17
|
},
|
|
18
|
-
subscription: {
|
|
19
|
-
type: mongoose_1.Schema.Types.ObjectId,
|
|
20
|
-
required: true,
|
|
21
|
-
ref: "Subscription",
|
|
22
|
-
},
|
|
23
18
|
size: { type: Number, required: true },
|
|
24
19
|
mount_path: { type: String },
|
|
20
|
+
csi_volume_id: { type: String, default: null },
|
|
21
|
+
region: { type: String, default: null },
|
|
22
|
+
attached_sandbox_id: {
|
|
23
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
24
|
+
ref: "Sandbox",
|
|
25
|
+
default: null,
|
|
26
|
+
},
|
|
27
|
+
attached_project_id: {
|
|
28
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
29
|
+
ref: "Project",
|
|
30
|
+
default: null,
|
|
31
|
+
},
|
|
32
|
+
last_attached_at: { type: Date, default: null },
|
|
25
33
|
}, {
|
|
26
34
|
timestamps: {
|
|
27
35
|
createdAt: "created_at",
|
package/package.json
CHANGED
package/sandbox.ts
CHANGED
|
@@ -107,6 +107,15 @@ const sandboxSchema: Schema = new Schema({
|
|
|
107
107
|
ref: "SandboxSnapshot",
|
|
108
108
|
default: null,
|
|
109
109
|
},
|
|
110
|
+
snapshot_mode: {
|
|
111
|
+
type: String,
|
|
112
|
+
enum: ["automatic", "manual"],
|
|
113
|
+
default: "manual",
|
|
114
|
+
},
|
|
115
|
+
snapshot_frequency: {
|
|
116
|
+
type: String,
|
|
117
|
+
default: null,
|
|
118
|
+
},
|
|
110
119
|
isDeleted: {
|
|
111
120
|
type: Boolean,
|
|
112
121
|
default: false,
|
package/types/sandbox.ts
CHANGED
package/types/volume.ts
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { Document } from "mongoose";
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
2
|
import { IUser } from "./user";
|
|
3
3
|
import { ITeam } from "./team";
|
|
4
|
-
import { ISubscription } from "./subscription";
|
|
5
4
|
|
|
6
5
|
export interface IVolume extends Document {
|
|
7
6
|
name: string;
|
|
8
7
|
user?: IUser;
|
|
9
8
|
team?: ITeam;
|
|
10
|
-
subscription: ISubscription;
|
|
11
9
|
size: number;
|
|
12
10
|
mount_path?: string;
|
|
11
|
+
csi_volume_id: string | null;
|
|
12
|
+
region: string | null;
|
|
13
|
+
attached_sandbox_id: Types.ObjectId | null;
|
|
14
|
+
attached_project_id: Types.ObjectId | null;
|
|
15
|
+
last_attached_at: Date | null;
|
|
13
16
|
created_at?: Date;
|
|
14
17
|
updated_at?: Date;
|
|
15
18
|
}
|
package/volume.ts
CHANGED
|
@@ -17,13 +17,21 @@ const volumeSchema: Schema = new Schema(
|
|
|
17
17
|
ref: "Team",
|
|
18
18
|
default: null,
|
|
19
19
|
},
|
|
20
|
-
subscription: {
|
|
21
|
-
type: Schema.Types.ObjectId,
|
|
22
|
-
required: true,
|
|
23
|
-
ref: "Subscription",
|
|
24
|
-
},
|
|
25
20
|
size: { type: Number, required: true },
|
|
26
21
|
mount_path: { type: String },
|
|
22
|
+
csi_volume_id: { type: String, default: null },
|
|
23
|
+
region: { type: String, default: null },
|
|
24
|
+
attached_sandbox_id: {
|
|
25
|
+
type: Schema.Types.ObjectId,
|
|
26
|
+
ref: "Sandbox",
|
|
27
|
+
default: null,
|
|
28
|
+
},
|
|
29
|
+
attached_project_id: {
|
|
30
|
+
type: Schema.Types.ObjectId,
|
|
31
|
+
ref: "Project",
|
|
32
|
+
default: null,
|
|
33
|
+
},
|
|
34
|
+
last_attached_at: { type: Date, default: null },
|
|
27
35
|
},
|
|
28
36
|
{
|
|
29
37
|
timestamps: {
|