@brimble/models 3.8.197 → 3.8.200

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.
@@ -23,7 +23,7 @@ const autoScalingGroupSchema = new mongoose_1.Schema({
23
23
  },
24
24
  subscription_id: {
25
25
  type: mongoose_1.Schema.Types.ObjectId,
26
- ref: "Subscription",
26
+ ref: "CashierSubscription",
27
27
  required: true,
28
28
  },
29
29
  min_containers: {
@@ -389,7 +389,9 @@ const projectSchema = new mongoose_1.Schema({
389
389
  region: {
390
390
  type: mongoose_1.Schema.Types.ObjectId,
391
391
  ref: "Region",
392
- required: true,
392
+ required: function () {
393
+ return this.serviceType !== enum_1.ServiceType.Static;
394
+ },
393
395
  },
394
396
  },
395
397
  desiredSpecs: {
@@ -1,6 +1,6 @@
1
1
  import { Types, Document } from "mongoose";
2
2
  import { IUser } from "./user";
3
- import { ISubscription } from "./subscription";
3
+ import { ICashierSubscription } from "./cashier_subscription";
4
4
  import { ITeam } from "./team";
5
5
  export interface IAutoScalingGroup extends Document {
6
6
  _id: Types.ObjectId;
@@ -8,7 +8,7 @@ export interface IAutoScalingGroup extends Document {
8
8
  replicas: number;
9
9
  user_id?: IUser;
10
10
  team_id?: ITeam;
11
- subscription_id: ISubscription;
11
+ subscription_id: ICashierSubscription;
12
12
  min_containers: number;
13
13
  max_containers: number;
14
14
  active: boolean;
@@ -41,7 +41,7 @@ export interface IProjectSpecs {
41
41
  memory: number;
42
42
  cpu: number;
43
43
  storage: number;
44
- region: IRegion;
44
+ region?: IRegion | Types.ObjectId;
45
45
  }
46
46
  export interface IDedicatedEgress {
47
47
  enabled: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "3.8.197",
3
+ "version": "3.8.200",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",