@brimble/models 3.8.5 → 3.8.10

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.
Files changed (108) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/activity-log.ts +66 -0
  3. package/app-message.ts +3 -2
  4. package/cashier_subscription.ts +7 -3
  5. package/compute.ts +8 -6
  6. package/db-image.ts +5 -0
  7. package/dist/activity-log.d.ts +30 -0
  8. package/dist/activity-log.js +61 -0
  9. package/dist/app-message.js +3 -2
  10. package/dist/cashier_subscription.js +7 -3
  11. package/dist/compute.js +7 -6
  12. package/dist/db-image.js +5 -0
  13. package/dist/domain/index.js +6 -0
  14. package/dist/enum/index.d.ts +20 -6
  15. package/dist/enum/index.js +22 -6
  16. package/dist/env.js +0 -8
  17. package/dist/environment-variable.d.ts +30 -0
  18. package/dist/environment-variable.js +16 -0
  19. package/dist/framework.js +5 -0
  20. package/dist/index.d.ts +9 -3
  21. package/dist/index.js +19 -5
  22. package/dist/member.js +1 -0
  23. package/dist/ownership-transfer.d.ts +30 -0
  24. package/dist/ownership-transfer.js +35 -0
  25. package/dist/plan_configuration.js +5 -0
  26. package/dist/project/index.js +28 -6
  27. package/dist/project-environment.d.ts +30 -0
  28. package/dist/project-environment.js +13 -0
  29. package/dist/project_analytics.d.ts +30 -0
  30. package/dist/project_analytics.js +18 -0
  31. package/dist/sandbox-image.d.ts +30 -0
  32. package/dist/sandbox-image.js +31 -0
  33. package/dist/{branch.d.ts → sandbox.d.ts} +2 -2
  34. package/dist/sandbox.js +89 -0
  35. package/dist/team.js +34 -0
  36. package/dist/types/activity-log.d.ts +18 -0
  37. package/dist/types/app-message.d.ts +3 -2
  38. package/dist/types/cashier_subscription.d.ts +4 -2
  39. package/dist/types/compute.d.ts +7 -2
  40. package/dist/types/db-image.d.ts +1 -0
  41. package/dist/types/domain/index.d.ts +2 -1
  42. package/dist/types/env.d.ts +0 -3
  43. package/dist/types/environment-variable.d.ts +12 -0
  44. package/dist/types/environment-variable.js +2 -0
  45. package/dist/types/framework.d.ts +1 -0
  46. package/dist/types/index.d.ts +7 -1
  47. package/dist/types/member.d.ts +2 -0
  48. package/dist/types/ownership-transfer.d.ts +12 -0
  49. package/dist/types/ownership-transfer.js +2 -0
  50. package/dist/types/plan_configuration.d.ts +5 -0
  51. package/dist/types/project/index.d.ts +6 -2
  52. package/dist/types/project-environment.d.ts +13 -0
  53. package/dist/types/project-environment.js +2 -0
  54. package/dist/types/project_analytics.d.ts +11 -0
  55. package/dist/types/project_analytics.js +2 -0
  56. package/dist/types/sandbox-image.d.ts +9 -0
  57. package/dist/types/sandbox-image.js +2 -0
  58. package/dist/types/sandbox.d.ts +30 -0
  59. package/dist/types/sandbox.js +2 -0
  60. package/dist/types/team.d.ts +10 -2
  61. package/dist/types/user.d.ts +3 -0
  62. package/dist/types/wallet.d.ts +4 -0
  63. package/dist/user.js +7 -0
  64. package/dist/wallet.js +16 -0
  65. package/domain/index.ts +6 -0
  66. package/enum/index.ts +21 -5
  67. package/env.ts +0 -8
  68. package/environment-variable.ts +21 -0
  69. package/framework.ts +5 -0
  70. package/index.ts +19 -4
  71. package/member.ts +1 -0
  72. package/ownership-transfer.ts +42 -0
  73. package/package.json +1 -1
  74. package/plan_configuration.ts +5 -0
  75. package/project/index.ts +32 -6
  76. package/project-environment.ts +18 -0
  77. package/project_analytics.ts +26 -0
  78. package/sandbox-image.ts +35 -0
  79. package/sandbox.ts +91 -0
  80. package/team.ts +34 -0
  81. package/types/activity-log.ts +19 -0
  82. package/types/app-message.ts +3 -2
  83. package/types/cashier_subscription.ts +4 -2
  84. package/types/compute.ts +9 -2
  85. package/types/db-image.ts +1 -0
  86. package/types/domain/index.ts +2 -1
  87. package/types/env.ts +0 -3
  88. package/types/environment-variable.ts +13 -0
  89. package/types/framework.ts +3 -2
  90. package/types/index.ts +7 -1
  91. package/types/member.ts +2 -0
  92. package/types/ownership-transfer.ts +13 -0
  93. package/types/plan_configuration.ts +5 -0
  94. package/types/project/index.ts +6 -2
  95. package/types/project-environment.ts +14 -0
  96. package/types/project_analytics.ts +12 -0
  97. package/types/sandbox-image.ts +10 -0
  98. package/types/sandbox.ts +32 -0
  99. package/types/team.ts +10 -2
  100. package/types/user.ts +3 -0
  101. package/types/wallet.ts +4 -0
  102. package/user.ts +7 -0
  103. package/wallet.ts +16 -0
  104. package/branch.ts +0 -22
  105. package/dist/branch.js +0 -17
  106. package/dist/types/branch.d.ts +0 -17
  107. package/types/branch.ts +0 -18
  108. /package/dist/types/{branch.js → activity-log.js} +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npx tsc:*)"
5
+ ]
6
+ }
7
+ }
@@ -0,0 +1,66 @@
1
+ import { model, Schema } from "mongoose";
2
+ import { IActivityLog } from "./types";
3
+
4
+ const activityLogSchema: Schema = new Schema(
5
+ {
6
+ user_id: {
7
+ type: Schema.Types.ObjectId,
8
+ ref: "User",
9
+ required: true,
10
+ index: true,
11
+ },
12
+ team_id: {
13
+ type: Schema.Types.ObjectId,
14
+ ref: "Team",
15
+ default: null,
16
+ index: true,
17
+ },
18
+ action: {
19
+ type: String,
20
+ required: true,
21
+ index: true,
22
+ },
23
+ description: {
24
+ type: String,
25
+ },
26
+ context: {
27
+ type: String,
28
+ },
29
+ metadata: {
30
+ type: Schema.Types.Mixed,
31
+ default: {},
32
+ },
33
+ ip_address: {
34
+ type: String,
35
+ },
36
+ user_agent: {
37
+ type: String,
38
+ },
39
+ status: {
40
+ type: String,
41
+ enum: ["success", "failure"],
42
+ default: "success",
43
+ },
44
+ resource_type: {
45
+ type: String,
46
+ },
47
+ resource_id: {
48
+ type: Schema.Types.ObjectId,
49
+ },
50
+ },
51
+ {
52
+ timestamps: {
53
+ createdAt: "created_at",
54
+ updatedAt: "updated_at",
55
+ },
56
+ collection: "activity_logs",
57
+ },
58
+ );
59
+
60
+ activityLogSchema.index({ user_id: 1, created_at: -1 });
61
+ activityLogSchema.index({ user_id: 1, action: 1, created_at: -1 });
62
+ activityLogSchema.index({ team_id: 1, created_at: -1 });
63
+ activityLogSchema.index({ team_id: 1, action: 1, created_at: -1 });
64
+ activityLogSchema.index({ resource_type: 1, resource_id: 1 });
65
+
66
+ export default model<IActivityLog>("ActivityLog", activityLogSchema);
package/app-message.ts CHANGED
@@ -3,10 +3,11 @@ import { IAppMessage } from "./types";
3
3
 
4
4
  const appMessageSchema = new Schema(
5
5
  {
6
- userId: { type: Schema.Types.ObjectId, ref: "User", required: true, index: true },
7
- teamId: { type: Schema.Types.ObjectId, ref: "Team", required: true, index: true },
6
+ userId: { type: Schema.Types.ObjectId, ref: "User", required: false, index: true },
7
+ teamId: { type: Schema.Types.ObjectId, ref: "Team", required: false, index: true },
8
8
  level: { type: String, required: true },
9
9
  message: { type: String, required: true },
10
+ seen: { type: Boolean, default: false, index: true },
10
11
  meta: { type: Schema.Types.Mixed },
11
12
  route: { type: String },
12
13
  type: { type: String, required: true },
@@ -4,7 +4,11 @@ import { ICashierSubscription } from "./types";
4
4
 
5
5
  const cashierSubscriptionSchema: Schema = new Schema(
6
6
  {
7
- user_id: { type: String, required: true },
7
+ user_id: {
8
+ ref: "User",
9
+ type: Schema.Types.ObjectId,
10
+ required: true
11
+ },
8
12
  type: { type: String, default: "default" },
9
13
  stripe_id: { type: String, required: true },
10
14
  stripe_status: { type: String, required: true },
@@ -12,9 +16,9 @@ const cashierSubscriptionSchema: Schema = new Schema(
12
16
  quantity: { type: Number, default: null },
13
17
  trial_ends_at: { type: Date, default: null },
14
18
  ends_at: { type: Date, default: null },
15
- team_id: { type: String, default: null },
19
+ team_id: { type: Schema.Types.ObjectId, ref: "Team", default: null },
16
20
  plan_type: { type: String, default: null },
17
- domain_id: { type: String, default: null },
21
+ domain_id: { type: Schema.Types.ObjectId, ref: "Domain", default: null },
18
22
  },
19
23
  {
20
24
  timestamps: {
package/compute.ts CHANGED
@@ -34,12 +34,7 @@ const ComputeChangeSchema = new Schema({
34
34
  required: false,
35
35
  index: true,
36
36
  },
37
- subscription_id: {
38
- type: Schema.Types.ObjectId,
39
- ref: "Subscription",
40
- required: true,
41
- index: true,
42
- },
37
+
43
38
  timestamp: {
44
39
  type: Date,
45
40
  default: Date.now,
@@ -59,6 +54,13 @@ const ComputeChangeSchema = new Schema({
59
54
  persistentStorage: { type: Number, required: false },
60
55
  region: { type: Schema.Types.ObjectId, ref: "Region", required: false },
61
56
  },
57
+ default_resources: {
58
+ cpu: { type: Number, required: false },
59
+ memory: { type: Number, required: false },
60
+ storage: { type: Number, required: false },
61
+ persistentStorage: { type: Number, required: false },
62
+ region: { type: Schema.Types.ObjectId, ref: "Region", required: false },
63
+ },
62
64
  costs: {
63
65
  startDate: { type: Date, required: true },
64
66
  endDate: { type: Date },
package/db-image.ts CHANGED
@@ -46,6 +46,11 @@ const dbImageSchema = new Schema(
46
46
  required: true,
47
47
  default: "/data",
48
48
  },
49
+ free: {
50
+ type: Boolean,
51
+ required: false,
52
+ default: false
53
+ },
49
54
  recommendations: {
50
55
  required: false,
51
56
  type: Array,
@@ -0,0 +1,30 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose" />
25
+ /// <reference types="mongoose/types/inferschematype" />
26
+ import { IActivityLog } from "./types";
27
+ declare const _default: import("mongoose").Model<IActivityLog, {}, {}, {}, import("mongoose").Document<unknown, {}, IActivityLog> & IActivityLog & {
28
+ _id: import("mongoose").Types.ObjectId;
29
+ }, any>;
30
+ export default _default;
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const activityLogSchema = new mongoose_1.Schema({
5
+ user_id: {
6
+ type: mongoose_1.Schema.Types.ObjectId,
7
+ ref: "User",
8
+ required: true,
9
+ index: true,
10
+ },
11
+ team_id: {
12
+ type: mongoose_1.Schema.Types.ObjectId,
13
+ ref: "Team",
14
+ default: null,
15
+ index: true,
16
+ },
17
+ action: {
18
+ type: String,
19
+ required: true,
20
+ index: true,
21
+ },
22
+ description: {
23
+ type: String,
24
+ },
25
+ context: {
26
+ type: String,
27
+ },
28
+ metadata: {
29
+ type: mongoose_1.Schema.Types.Mixed,
30
+ default: {},
31
+ },
32
+ ip_address: {
33
+ type: String,
34
+ },
35
+ user_agent: {
36
+ type: String,
37
+ },
38
+ status: {
39
+ type: String,
40
+ enum: ["success", "failure"],
41
+ default: "success",
42
+ },
43
+ resource_type: {
44
+ type: String,
45
+ },
46
+ resource_id: {
47
+ type: mongoose_1.Schema.Types.ObjectId,
48
+ },
49
+ }, {
50
+ timestamps: {
51
+ createdAt: "created_at",
52
+ updatedAt: "updated_at",
53
+ },
54
+ collection: "activity_logs",
55
+ });
56
+ activityLogSchema.index({ user_id: 1, created_at: -1 });
57
+ activityLogSchema.index({ user_id: 1, action: 1, created_at: -1 });
58
+ activityLogSchema.index({ team_id: 1, created_at: -1 });
59
+ activityLogSchema.index({ team_id: 1, action: 1, created_at: -1 });
60
+ activityLogSchema.index({ resource_type: 1, resource_id: 1 });
61
+ exports.default = (0, mongoose_1.model)("ActivityLog", activityLogSchema);
@@ -2,10 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const mongoose_1 = require("mongoose");
4
4
  const appMessageSchema = new mongoose_1.Schema({
5
- userId: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: true, index: true },
6
- teamId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", required: true, index: true },
5
+ userId: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: false, index: true },
6
+ teamId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", required: false, index: true },
7
7
  level: { type: String, required: true },
8
8
  message: { type: String, required: true },
9
+ seen: { type: Boolean, default: false, index: true },
9
10
  meta: { type: mongoose_1.Schema.Types.Mixed },
10
11
  route: { type: String },
11
12
  type: { type: String, required: true },
@@ -2,7 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const mongoose_1 = require("mongoose");
4
4
  const cashierSubscriptionSchema = new mongoose_1.Schema({
5
- user_id: { type: String, required: true },
5
+ user_id: {
6
+ ref: "User",
7
+ type: mongoose_1.Schema.Types.ObjectId,
8
+ required: true
9
+ },
6
10
  type: { type: String, default: "default" },
7
11
  stripe_id: { type: String, required: true },
8
12
  stripe_status: { type: String, required: true },
@@ -10,9 +14,9 @@ const cashierSubscriptionSchema = new mongoose_1.Schema({
10
14
  quantity: { type: Number, default: null },
11
15
  trial_ends_at: { type: Date, default: null },
12
16
  ends_at: { type: Date, default: null },
13
- team_id: { type: String, default: null },
17
+ team_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", default: null },
14
18
  plan_type: { type: String, default: null },
15
- domain_id: { type: String, default: null },
19
+ domain_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Domain", default: null },
16
20
  }, {
17
21
  timestamps: {
18
22
  createdAt: "created_at",
package/dist/compute.js CHANGED
@@ -34,12 +34,6 @@ const ComputeChangeSchema = new mongoose_1.Schema({
34
34
  required: false,
35
35
  index: true,
36
36
  },
37
- subscription_id: {
38
- type: mongoose_1.Schema.Types.ObjectId,
39
- ref: "Subscription",
40
- required: true,
41
- index: true,
42
- },
43
37
  timestamp: {
44
38
  type: Date,
45
39
  default: Date.now,
@@ -59,6 +53,13 @@ const ComputeChangeSchema = new mongoose_1.Schema({
59
53
  persistentStorage: { type: Number, required: false },
60
54
  region: { type: mongoose_1.Schema.Types.ObjectId, ref: "Region", required: false },
61
55
  },
56
+ default_resources: {
57
+ cpu: { type: Number, required: false },
58
+ memory: { type: Number, required: false },
59
+ storage: { type: Number, required: false },
60
+ persistentStorage: { type: Number, required: false },
61
+ region: { type: mongoose_1.Schema.Types.ObjectId, ref: "Region", required: false },
62
+ },
62
63
  costs: {
63
64
  startDate: { type: Date, required: true },
64
65
  endDate: { type: Date },
package/dist/db-image.js CHANGED
@@ -45,6 +45,11 @@ const dbImageSchema = new mongoose_1.Schema({
45
45
  required: true,
46
46
  default: "/data",
47
47
  },
48
+ free: {
49
+ type: Boolean,
50
+ required: false,
51
+ default: false
52
+ },
48
53
  recommendations: {
49
54
  required: false,
50
55
  type: Array,
@@ -90,6 +90,12 @@ const domainSchema = new mongoose_1.Schema({
90
90
  type: mongoose_1.Schema.Types.ObjectId,
91
91
  },
92
92
  ],
93
+ project_environment: {
94
+ ref: "ProjectEnvironment",
95
+ type: mongoose_1.Schema.Types.ObjectId,
96
+ required: false,
97
+ default: null,
98
+ },
93
99
  is_pending_verification: Boolean,
94
100
  redirect: {
95
101
  url: String,
@@ -13,7 +13,8 @@ export declare enum SERVER_PROTOCOL {
13
13
  }
14
14
  export declare enum BUILD_DISABLED_BY {
15
15
  System = "system",
16
- User = "user"
16
+ User = "user",
17
+ Payment = "payment_failure"
17
18
  }
18
19
  export declare enum REQUEST_TYPE {
19
20
  GET = "GET",
@@ -96,7 +97,8 @@ export declare enum DNS_TYPE {
96
97
  export declare enum ROLES {
97
98
  CREATOR = "CREATOR",
98
99
  ADMINISTRATOR = "ADMINISTRATOR",
99
- MEMBER = "MEMBER"
100
+ MEMBER = "MEMBER",
101
+ VIEWER = "VIEWER"
100
102
  }
101
103
  export declare enum PERMISSION_TYPE {
102
104
  DOMAIN = "DOMAIN",
@@ -183,10 +185,6 @@ export declare enum NomadDeploymentStatus {
183
185
  NOMAD_READY = "nomad_ready",
184
186
  NOMAD_FAILED = "nomad_failed"
185
187
  }
186
- export declare enum BRANCH_TYPE {
187
- USER_CREATED = "USER_CREATED",
188
- PREVIEW = "PREVIEW"
189
- }
190
188
  export declare enum COLLAB_ANNOTATION_STATUS {
191
189
  OPEN = "open",
192
190
  RESOLVED = "resolved"
@@ -222,3 +220,19 @@ export declare enum INVOICE_TYPE {
222
220
  INVOICE = "invoice",
223
221
  RECEIPT = "receipt"
224
222
  }
223
+ export declare enum SANDBOX_TEMPLATE {
224
+ PYTHON = "python",
225
+ NODE = "node"
226
+ }
227
+ export declare enum SANDBOX_STATUS {
228
+ STARTING = "starting",
229
+ READY = "ready",
230
+ FAILED = "failed",
231
+ DESTROYED = "destroyed"
232
+ }
233
+ export declare enum SANDBOX_DESTROY_REASON {
234
+ USER = "user",
235
+ IDLE_TTL = "idle_ttl",
236
+ MAX_LIFETIME = "max_lifetime",
237
+ FAILED = "failed"
238
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = exports.COLLAB_TOOLBAR_POSITION = exports.COLLAB_THEME = exports.COLLAB_INTEGRATION_TYPE = exports.COLLAB_ANNOTATION_STATUS = exports.BRANCH_TYPE = exports.NomadDeploymentStatus = exports.DomainTransferStatus = exports.DomainTransferDirection = exports.DomainTransferProvider = exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REGION_CONTINENT = exports.PERMISSION_TYPE = exports.ROLES = exports.DNS_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.BUILD_DISABLED_BY = exports.SERVER_PROTOCOL = exports.GIT_TYPE = void 0;
3
+ exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = exports.COLLAB_TOOLBAR_POSITION = exports.COLLAB_THEME = exports.COLLAB_INTEGRATION_TYPE = exports.COLLAB_ANNOTATION_STATUS = exports.NomadDeploymentStatus = exports.DomainTransferStatus = exports.DomainTransferDirection = exports.DomainTransferProvider = exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REGION_CONTINENT = exports.PERMISSION_TYPE = exports.ROLES = exports.DNS_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.BUILD_DISABLED_BY = exports.SERVER_PROTOCOL = exports.GIT_TYPE = void 0;
4
4
  var GIT_TYPE;
5
5
  (function (GIT_TYPE) {
6
6
  GIT_TYPE["GITHUB"] = "GITHUB";
@@ -20,6 +20,7 @@ var BUILD_DISABLED_BY;
20
20
  (function (BUILD_DISABLED_BY) {
21
21
  BUILD_DISABLED_BY["System"] = "system";
22
22
  BUILD_DISABLED_BY["User"] = "user";
23
+ BUILD_DISABLED_BY["Payment"] = "payment_failure";
23
24
  })(BUILD_DISABLED_BY = exports.BUILD_DISABLED_BY || (exports.BUILD_DISABLED_BY = {}));
24
25
  var REQUEST_TYPE;
25
26
  (function (REQUEST_TYPE) {
@@ -115,6 +116,7 @@ var ROLES;
115
116
  ROLES["CREATOR"] = "CREATOR";
116
117
  ROLES["ADMINISTRATOR"] = "ADMINISTRATOR";
117
118
  ROLES["MEMBER"] = "MEMBER";
119
+ ROLES["VIEWER"] = "VIEWER";
118
120
  })(ROLES = exports.ROLES || (exports.ROLES = {}));
119
121
  var PERMISSION_TYPE;
120
122
  (function (PERMISSION_TYPE) {
@@ -215,11 +217,6 @@ var NomadDeploymentStatus;
215
217
  NomadDeploymentStatus["NOMAD_READY"] = "nomad_ready";
216
218
  NomadDeploymentStatus["NOMAD_FAILED"] = "nomad_failed";
217
219
  })(NomadDeploymentStatus = exports.NomadDeploymentStatus || (exports.NomadDeploymentStatus = {}));
218
- var BRANCH_TYPE;
219
- (function (BRANCH_TYPE) {
220
- BRANCH_TYPE["USER_CREATED"] = "USER_CREATED";
221
- BRANCH_TYPE["PREVIEW"] = "PREVIEW";
222
- })(BRANCH_TYPE = exports.BRANCH_TYPE || (exports.BRANCH_TYPE = {}));
223
220
  var COLLAB_ANNOTATION_STATUS;
224
221
  (function (COLLAB_ANNOTATION_STATUS) {
225
222
  COLLAB_ANNOTATION_STATUS["OPEN"] = "open";
@@ -262,3 +259,22 @@ var INVOICE_TYPE;
262
259
  INVOICE_TYPE["INVOICE"] = "invoice";
263
260
  INVOICE_TYPE["RECEIPT"] = "receipt";
264
261
  })(INVOICE_TYPE = exports.INVOICE_TYPE || (exports.INVOICE_TYPE = {}));
262
+ var SANDBOX_TEMPLATE;
263
+ (function (SANDBOX_TEMPLATE) {
264
+ SANDBOX_TEMPLATE["PYTHON"] = "python";
265
+ SANDBOX_TEMPLATE["NODE"] = "node";
266
+ })(SANDBOX_TEMPLATE = exports.SANDBOX_TEMPLATE || (exports.SANDBOX_TEMPLATE = {}));
267
+ var SANDBOX_STATUS;
268
+ (function (SANDBOX_STATUS) {
269
+ SANDBOX_STATUS["STARTING"] = "starting";
270
+ SANDBOX_STATUS["READY"] = "ready";
271
+ SANDBOX_STATUS["FAILED"] = "failed";
272
+ SANDBOX_STATUS["DESTROYED"] = "destroyed";
273
+ })(SANDBOX_STATUS = exports.SANDBOX_STATUS || (exports.SANDBOX_STATUS = {}));
274
+ var SANDBOX_DESTROY_REASON;
275
+ (function (SANDBOX_DESTROY_REASON) {
276
+ SANDBOX_DESTROY_REASON["USER"] = "user";
277
+ SANDBOX_DESTROY_REASON["IDLE_TTL"] = "idle_ttl";
278
+ SANDBOX_DESTROY_REASON["MAX_LIFETIME"] = "max_lifetime";
279
+ SANDBOX_DESTROY_REASON["FAILED"] = "failed";
280
+ })(SANDBOX_DESTROY_REASON = exports.SANDBOX_DESTROY_REASON || (exports.SANDBOX_DESTROY_REASON = {}));
package/dist/env.js CHANGED
@@ -25,14 +25,6 @@ const envSchema = new mongoose_1.Schema({
25
25
  default: enum_1.ENVIRONMENT.PRODUCTION,
26
26
  required: true,
27
27
  },
28
- branch: {
29
- ref: "Branch",
30
- type: mongoose_1.Schema.Types.ObjectId,
31
- },
32
- inheritable: {
33
- type: Boolean,
34
- default: true,
35
- },
36
28
  is_system: {
37
29
  type: Boolean,
38
30
  default: false,
@@ -0,0 +1,30 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose" />
25
+ /// <reference types="mongoose/types/inferschematype" />
26
+ import { IEnvironmentVariable } from "./types";
27
+ declare const _default: import("mongoose").Model<IEnvironmentVariable, {}, {}, {}, import("mongoose").Document<unknown, {}, IEnvironmentVariable> & IEnvironmentVariable & {
28
+ _id: import("mongoose").Types.ObjectId;
29
+ }, any>;
30
+ export default _default;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const environmentVariableSchema = new mongoose_1.Schema({
5
+ name: { type: String, required: true },
6
+ value: { type: String, required: true },
7
+ project_environment: {
8
+ ref: "ProjectEnvironment",
9
+ type: mongoose_1.Schema.Types.ObjectId,
10
+ required: true,
11
+ },
12
+ user: { ref: "User", type: mongoose_1.Schema.Types.ObjectId, required: true },
13
+ inheritable: { type: Boolean, default: true },
14
+ }, { timestamps: true });
15
+ environmentVariableSchema.index({ name: 1, project_environment: 1 }, { unique: true });
16
+ exports.default = (0, mongoose_1.model)("EnvironmentVariable", environmentVariableSchema);
package/dist/framework.js CHANGED
@@ -24,6 +24,11 @@ const frameworkSchema = new mongoose_1.Schema({
24
24
  required: false,
25
25
  default: true
26
26
  },
27
+ port: {
28
+ type: Number,
29
+ required: false,
30
+ default: 8000
31
+ },
27
32
  tagline: {
28
33
  type: String,
29
34
  required: false,
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { default as User } from "./user";
2
2
  export { default as Project, DeletedProject } from "./project";
3
+ export { default as ProjectAnalytics } from "./project_analytics";
3
4
  export { default as Preview } from "./project/preview";
4
5
  export { default as ProjectConnection } from "./project/connection";
5
6
  export { default as Following } from "./following";
@@ -36,7 +37,6 @@ export { default as WebhookEvent } from "./webhook-event";
36
37
  export { default as WebhookSetting } from "./webhook-setting";
37
38
  export { default as Intention } from "./intention";
38
39
  export { default as Provider } from "./provider";
39
- export { default as Branch } from "./branch";
40
40
  export { default as CollabAnnotation } from "./collab-annotation";
41
41
  export { default as CollabComment } from "./collab-comment";
42
42
  export { default as CollabIntegration } from "./collab-integration";
@@ -49,8 +49,14 @@ export { default as Tag } from "./tag";
49
49
  export { default as ProjectTagAssignment } from "./project-tag-assignment";
50
50
  export { default as CashierSubscription } from "./cashier_subscription";
51
51
  export { default as CashierSubscriptionItem } from "./cashier_subscription_item";
52
- export { IUser, IGit, IProject, IPreview, IProjectConnection, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, BrimbleFrameworkType, ISettings, ILoadBalancerPort, IDomainRenewal, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, IBranch, ICollabAnnotation, ICollabComment, ICollabAttachment, ICollabIntegration, ICollabSettings, ICollabShareToken, ICollabPushSubscription, IAppMessage, IInvoice, ITag, IProjectTagAssignment, ICashierSubscription, ICashierSubscriptionItem, } from "./types";
53
- 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, REGION_CONTINENT, BUILD_DISABLED_BY, SERVER_PROTOCOL, FrameworkApplicationType, DomainRenewalStatus, DomainTransferProvider, DomainTransferDirection, DomainTransferStatus, NomadDeploymentStatus, BRANCH_TYPE, COLLAB_ANNOTATION_STATUS, COLLAB_INTEGRATION_TYPE, COLLAB_THEME, COLLAB_TOOLBAR_POSITION, INVOICE_STATUS, INVOICE_PAYMENT_STATUS, INVOICE_TYPE } from "./enum";
52
+ export { default as ProjectEnvironment } from "./project-environment";
53
+ export { default as EnvironmentVariable } from "./environment-variable";
54
+ export { default as ActivityLog } from "./activity-log";
55
+ export { default as OwnershipTransfer } from "./ownership-transfer";
56
+ export { default as Sandbox } from "./sandbox";
57
+ export { default as SandboxImage } from "./sandbox-image";
58
+ export { IUser, IGit, IProject, IProjectAnalytics, IPreview, IProjectConnection, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, BrimbleFrameworkType, ISettings, ILoadBalancerPort, IDomainRenewal, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, ICollabAnnotation, ICollabComment, ICollabAttachment, ICollabIntegration, ICollabSettings, ICollabShareToken, ICollabPushSubscription, IAppMessage, IInvoice, ITag, IProjectTagAssignment, ICashierSubscription, ICashierSubscriptionItem, IProjectEnvironment, IEnvironmentVariable, IActivityLog, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxImage, } from "./types";
59
+ 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, REGION_CONTINENT, BUILD_DISABLED_BY, SERVER_PROTOCOL, FrameworkApplicationType, DomainRenewalStatus, DomainTransferProvider, DomainTransferDirection, DomainTransferStatus, NomadDeploymentStatus, COLLAB_ANNOTATION_STATUS, COLLAB_INTEGRATION_TYPE, COLLAB_THEME, COLLAB_TOOLBAR_POSITION, INVOICE_STATUS, INVOICE_PAYMENT_STATUS, INVOICE_TYPE, SANDBOX_TEMPLATE, SANDBOX_STATUS, SANDBOX_DESTROY_REASON, } from "./enum";
54
60
  import mongoose from "mongoose";
55
61
  export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
56
62
  export declare const db: mongoose.Connection;
package/dist/index.js CHANGED
@@ -12,13 +12,15 @@ 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.ProjectTagAssignment = exports.Tag = exports.Invoice = exports.AppMessage = exports.CollabPushSubscription = exports.CollabShareToken = exports.CollabSettings = exports.CollabIntegration = exports.CollabComment = exports.CollabAnnotation = exports.Branch = exports.Provider = exports.Intention = exports.WebhookSetting = exports.WebhookEvent = exports.WebhookCategory = exports.DomainTransfer = exports.DomainRenewal = exports.LoadBalancerPort = exports.Settings = exports.Framework = exports.Volume = exports.Region = exports.ComputeChange = exports.AutoScalingGroup = 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.ProjectConnection = exports.Preview = exports.DeletedProject = exports.Project = exports.User = void 0;
16
- exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = exports.COLLAB_TOOLBAR_POSITION = exports.COLLAB_THEME = exports.COLLAB_INTEGRATION_TYPE = exports.COLLAB_ANNOTATION_STATUS = exports.BRANCH_TYPE = exports.NomadDeploymentStatus = exports.DomainTransferStatus = exports.DomainTransferDirection = exports.DomainTransferProvider = exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SERVER_PROTOCOL = exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = 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.CashierSubscriptionItem = exports.CashierSubscription = void 0;
15
+ exports.ProjectTagAssignment = exports.Tag = exports.Invoice = exports.AppMessage = exports.CollabPushSubscription = exports.CollabShareToken = exports.CollabSettings = exports.CollabIntegration = exports.CollabComment = exports.CollabAnnotation = exports.Provider = exports.Intention = exports.WebhookSetting = exports.WebhookEvent = exports.WebhookCategory = exports.DomainTransfer = exports.DomainRenewal = exports.LoadBalancerPort = exports.Settings = exports.Framework = exports.Volume = exports.Region = exports.ComputeChange = exports.AutoScalingGroup = 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.ProjectConnection = exports.Preview = exports.ProjectAnalytics = exports.DeletedProject = exports.Project = exports.User = void 0;
16
+ exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = exports.COLLAB_TOOLBAR_POSITION = exports.COLLAB_THEME = exports.COLLAB_INTEGRATION_TYPE = exports.COLLAB_ANNOTATION_STATUS = exports.NomadDeploymentStatus = exports.DomainTransferStatus = exports.DomainTransferDirection = exports.DomainTransferProvider = exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SERVER_PROTOCOL = exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = 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.SandboxImage = exports.Sandbox = exports.OwnershipTransfer = exports.ActivityLog = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = exports.CashierSubscription = void 0;
17
17
  var user_1 = require("./user");
18
18
  Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
19
19
  var project_1 = require("./project");
20
20
  Object.defineProperty(exports, "Project", { enumerable: true, get: function () { return __importDefault(project_1).default; } });
21
21
  Object.defineProperty(exports, "DeletedProject", { enumerable: true, get: function () { return project_1.DeletedProject; } });
22
+ var project_analytics_1 = require("./project_analytics");
23
+ Object.defineProperty(exports, "ProjectAnalytics", { enumerable: true, get: function () { return __importDefault(project_analytics_1).default; } });
22
24
  var preview_1 = require("./project/preview");
23
25
  Object.defineProperty(exports, "Preview", { enumerable: true, get: function () { return __importDefault(preview_1).default; } });
24
26
  var connection_1 = require("./project/connection");
@@ -91,8 +93,6 @@ var intention_1 = require("./intention");
91
93
  Object.defineProperty(exports, "Intention", { enumerable: true, get: function () { return __importDefault(intention_1).default; } });
92
94
  var provider_1 = require("./provider");
93
95
  Object.defineProperty(exports, "Provider", { enumerable: true, get: function () { return __importDefault(provider_1).default; } });
94
- var branch_1 = require("./branch");
95
- Object.defineProperty(exports, "Branch", { enumerable: true, get: function () { return __importDefault(branch_1).default; } });
96
96
  var collab_annotation_1 = require("./collab-annotation");
97
97
  Object.defineProperty(exports, "CollabAnnotation", { enumerable: true, get: function () { return __importDefault(collab_annotation_1).default; } });
98
98
  var collab_comment_1 = require("./collab-comment");
@@ -117,6 +117,18 @@ var cashier_subscription_1 = require("./cashier_subscription");
117
117
  Object.defineProperty(exports, "CashierSubscription", { enumerable: true, get: function () { return __importDefault(cashier_subscription_1).default; } });
118
118
  var cashier_subscription_item_1 = require("./cashier_subscription_item");
119
119
  Object.defineProperty(exports, "CashierSubscriptionItem", { enumerable: true, get: function () { return __importDefault(cashier_subscription_item_1).default; } });
120
+ var project_environment_1 = require("./project-environment");
121
+ Object.defineProperty(exports, "ProjectEnvironment", { enumerable: true, get: function () { return __importDefault(project_environment_1).default; } });
122
+ var environment_variable_1 = require("./environment-variable");
123
+ Object.defineProperty(exports, "EnvironmentVariable", { enumerable: true, get: function () { return __importDefault(environment_variable_1).default; } });
124
+ var activity_log_1 = require("./activity-log");
125
+ Object.defineProperty(exports, "ActivityLog", { enumerable: true, get: function () { return __importDefault(activity_log_1).default; } });
126
+ var ownership_transfer_1 = require("./ownership-transfer");
127
+ Object.defineProperty(exports, "OwnershipTransfer", { enumerable: true, get: function () { return __importDefault(ownership_transfer_1).default; } });
128
+ var sandbox_1 = require("./sandbox");
129
+ Object.defineProperty(exports, "Sandbox", { enumerable: true, get: function () { return __importDefault(sandbox_1).default; } });
130
+ var sandbox_image_1 = require("./sandbox-image");
131
+ Object.defineProperty(exports, "SandboxImage", { enumerable: true, get: function () { return __importDefault(sandbox_image_1).default; } });
120
132
  var enum_1 = require("./enum");
121
133
  Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
122
134
  Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
@@ -145,7 +157,6 @@ Object.defineProperty(exports, "DomainTransferProvider", { enumerable: true, get
145
157
  Object.defineProperty(exports, "DomainTransferDirection", { enumerable: true, get: function () { return enum_1.DomainTransferDirection; } });
146
158
  Object.defineProperty(exports, "DomainTransferStatus", { enumerable: true, get: function () { return enum_1.DomainTransferStatus; } });
147
159
  Object.defineProperty(exports, "NomadDeploymentStatus", { enumerable: true, get: function () { return enum_1.NomadDeploymentStatus; } });
148
- Object.defineProperty(exports, "BRANCH_TYPE", { enumerable: true, get: function () { return enum_1.BRANCH_TYPE; } });
149
160
  Object.defineProperty(exports, "COLLAB_ANNOTATION_STATUS", { enumerable: true, get: function () { return enum_1.COLLAB_ANNOTATION_STATUS; } });
150
161
  Object.defineProperty(exports, "COLLAB_INTEGRATION_TYPE", { enumerable: true, get: function () { return enum_1.COLLAB_INTEGRATION_TYPE; } });
151
162
  Object.defineProperty(exports, "COLLAB_THEME", { enumerable: true, get: function () { return enum_1.COLLAB_THEME; } });
@@ -153,6 +164,9 @@ Object.defineProperty(exports, "COLLAB_TOOLBAR_POSITION", { enumerable: true, ge
153
164
  Object.defineProperty(exports, "INVOICE_STATUS", { enumerable: true, get: function () { return enum_1.INVOICE_STATUS; } });
154
165
  Object.defineProperty(exports, "INVOICE_PAYMENT_STATUS", { enumerable: true, get: function () { return enum_1.INVOICE_PAYMENT_STATUS; } });
155
166
  Object.defineProperty(exports, "INVOICE_TYPE", { enumerable: true, get: function () { return enum_1.INVOICE_TYPE; } });
167
+ Object.defineProperty(exports, "SANDBOX_TEMPLATE", { enumerable: true, get: function () { return enum_1.SANDBOX_TEMPLATE; } });
168
+ Object.defineProperty(exports, "SANDBOX_STATUS", { enumerable: true, get: function () { return enum_1.SANDBOX_STATUS; } });
169
+ Object.defineProperty(exports, "SANDBOX_DESTROY_REASON", { enumerable: true, get: function () { return enum_1.SANDBOX_DESTROY_REASON; } });
156
170
  const mongoose_1 = __importDefault(require("mongoose"));
157
171
  const utils_1 = require("@brimble/utils");
158
172
  const connectToMongo = (mongoUrl, config) => __awaiter(void 0, void 0, void 0, function* () {