@brimble/models 2.4.0 → 2.4.2

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 (57) hide show
  1. package/auto-scaling.ts +72 -0
  2. package/db-image.ts +6 -6
  3. package/dist/auto-scaling.d.ts +56 -0
  4. package/dist/auto-scaling.js +63 -0
  5. package/dist/domain/index.js +3 -3
  6. package/dist/enum/index.d.ts +12 -0
  7. package/dist/enum/index.js +15 -1
  8. package/dist/index.d.ts +3 -2
  9. package/dist/index.js +3 -1
  10. package/dist/job.js +1 -1
  11. package/dist/license.js +19 -17
  12. package/dist/logs.d.ts +54 -2
  13. package/dist/logs.js +4 -4
  14. package/dist/member-permission.js +3 -3
  15. package/dist/member.js +1 -1
  16. package/dist/permission.js +2 -2
  17. package/dist/plan_configuration.d.ts +2 -2
  18. package/dist/plan_configuration.js +6 -2
  19. package/dist/project/index.js +1 -1
  20. package/dist/role.js +1 -1
  21. package/dist/server.js +5 -5
  22. package/dist/subscription.js +4 -4
  23. package/dist/team.js +2 -2
  24. package/dist/types/auto-scaling-group.d.ts +15 -0
  25. package/dist/types/auto-scaling-group.js +2 -0
  26. package/dist/types/index.d.ts +1 -0
  27. package/dist/user.js +2 -2
  28. package/dist/wallet.js +2 -2
  29. package/domain/index.ts +3 -3
  30. package/enum/index.ts +37 -23
  31. package/index.ts +6 -4
  32. package/job.ts +2 -3
  33. package/license.ts +57 -52
  34. package/logs.ts +4 -4
  35. package/member-permission.ts +7 -4
  36. package/member.ts +1 -1
  37. package/package.json +1 -1
  38. package/permission.ts +6 -6
  39. package/plan_configuration.ts +32 -21
  40. package/project/index.ts +1 -1
  41. package/role.ts +5 -5
  42. package/server.ts +8 -8
  43. package/subscription.ts +5 -5
  44. package/team.ts +2 -2
  45. package/types/auto-scaling-group.ts +16 -0
  46. package/types/db-image.ts +9 -9
  47. package/types/index.ts +3 -2
  48. package/types/job.ts +16 -16
  49. package/types/license.ts +14 -15
  50. package/types/member-permission.ts +4 -4
  51. package/types/plan_configuration.ts +16 -17
  52. package/types/role.ts +5 -5
  53. package/types/server.ts +2 -2
  54. package/types/subscription.ts +1 -1
  55. package/types/user.ts +1 -1
  56. package/user.ts +2 -2
  57. package/wallet.ts +6 -8
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -23,3 +23,4 @@ export { IDbImage } from "./db-image";
23
23
  export { IJob } from "./job";
24
24
  export { ILicense } from "./license";
25
25
  export { IPlanConfiguration } from "./plan_configuration";
26
+ export { IAutoScalingGroup } from "./auto-scaling-group";
package/dist/user.js CHANGED
@@ -33,14 +33,14 @@ const userSchema = new mongoose_1.Schema({
33
33
  build_disabled: {
34
34
  type: Boolean,
35
35
  default: false,
36
- required: false
36
+ required: false,
37
37
  },
38
38
  tenant: { type: mongoose_1.Schema.Types.ObjectId, ref: "Tenancy", required: false },
39
39
  is_waitlist: { type: Boolean, default: true },
40
40
  spending_limit: { type: Number },
41
41
  notifications: Object,
42
42
  disabled: Boolean,
43
- disabled_at: Date
43
+ disabled_at: Date,
44
44
  }, {
45
45
  timestamps: {
46
46
  createdAt: "created_at",
package/dist/wallet.js CHANGED
@@ -4,7 +4,7 @@ const mongoose_1 = require("mongoose");
4
4
  const walletSchema = new mongoose_1.Schema({
5
5
  balance: {
6
6
  type: Number,
7
- required: true
8
- }
7
+ required: true,
8
+ },
9
9
  });
10
10
  exports.default = (0, mongoose_1.model)("Wallet", walletSchema);
package/domain/index.ts CHANGED
@@ -59,13 +59,13 @@ const domainSchema = new Schema(
59
59
  },
60
60
  trigger_created: {
61
61
  type: Boolean,
62
- default: false
62
+ default: false,
63
63
  },
64
64
  trigger_created_at: {
65
- type: String
65
+ type: String,
66
66
  },
67
67
  job_identifier: {
68
- type: String
68
+ type: String,
69
69
  },
70
70
  dns: [
71
71
  {
package/enum/index.ts CHANGED
@@ -8,7 +8,7 @@ export enum REQUEST_TYPE {
8
8
  GET = "GET",
9
9
  PUT = "PUT",
10
10
  POST = "POST",
11
- DELETE = "DELETE"
11
+ DELETE = "DELETE",
12
12
  }
13
13
 
14
14
  export enum ENVIRONMENT {
@@ -61,11 +61,11 @@ export enum SUBSCRIPTION_STATUS {
61
61
  }
62
62
 
63
63
  export enum SUBSCRIPTION_PLAN_TYPE {
64
- FreePlan = 'FREE_PLAN',
65
- DeveloperPlan = 'DEVELOPER_PLAN',
66
- TeamPlan = 'TEAM_PLAN',
67
- DatabasePlan = 'DATABASE_PLAN',
68
- LiscensePlan = 'LISCENSE_PLAN'
64
+ FreePlan = "FREE_PLAN",
65
+ DeveloperPlan = "DEVELOPER_PLAN",
66
+ TeamPlan = "TEAM_PLAN",
67
+ DatabasePlan = "DATABASE_PLAN",
68
+ LiscensePlan = "LISCENSE_PLAN",
69
69
  }
70
70
 
71
71
  export enum OAUTH_PERMISSIONS {
@@ -92,30 +92,30 @@ export enum DNS_TYPE {
92
92
  export enum ROLES {
93
93
  CREATOR = "CREATOR",
94
94
  ADMINISTRATOR = "ADMINISTRATOR",
95
- MEMBER = "MEMBER"
95
+ MEMBER = "MEMBER",
96
96
  }
97
97
 
98
98
  export enum PERMISSION_TYPE {
99
- DOMAIN = 'DOMAIN',
100
- BILLING = 'BILLING',
101
- PROJECT = 'PROJECT',
102
- INTEGRATION = 'INTEGRATION',
103
- USERS = 'USERS'
99
+ DOMAIN = "DOMAIN",
100
+ BILLING = "BILLING",
101
+ PROJECT = "PROJECT",
102
+ INTEGRATION = "INTEGRATION",
103
+ USERS = "USERS",
104
104
  }
105
105
 
106
106
  export enum ServiceType {
107
- Database = 'database',
108
- WebService = 'web-service',
109
- Liscense = "liscense"
107
+ Database = "database",
108
+ WebService = "web-service",
109
+ Liscense = "liscense",
110
110
  }
111
111
 
112
112
  export enum DatabaseEngine {
113
- MySQL = 'mysql',
114
- PostgreSQL = 'postgresql',
115
- MongoDB = 'mongodb',
116
- Redis = 'redis',
117
- WordPress = 'wordpress',
118
- SQLite = 'sqlite',
113
+ MySQL = "mysql",
114
+ PostgreSQL = "postgresql",
115
+ MongoDB = "mongodb",
116
+ Redis = "redis",
117
+ WordPress = "wordpress",
118
+ SQLite = "sqlite",
119
119
  }
120
120
 
121
121
  export enum JobStatus {
@@ -130,5 +130,19 @@ export enum LicenseStatus {
130
130
  ACTIVE = "ACTIVE",
131
131
  EXPIRED = "EXPIRED",
132
132
  SUSPENDED = "SUSPENDED",
133
- REVOKED = "REVOKED"
134
- }
133
+ REVOKED = "REVOKED",
134
+ }
135
+
136
+ export enum SCALING_STRATEGY {
137
+ Linear = "LINEAR",
138
+ Exponential = "EXPONENTIAL",
139
+ Target = "TARGET",
140
+ }
141
+
142
+ export enum SCALING_METRIC {
143
+ Cpu = "CPU",
144
+ Memory = "MEMORY",
145
+ RequestCount = "REQUEST_COUNT",
146
+ ResponseTime = "RESPONSE_TIME",
147
+ CustomMetric = "CUSTOM_METRIC",
148
+ }
package/index.ts CHANGED
@@ -19,8 +19,9 @@ export { default as Server } from "./server";
19
19
  export { default as Wallet } from "./wallet";
20
20
  export { default as DbImage } from "./db-image";
21
21
  export { default as Job } from "./job";
22
- export { default as Liscense } from "./license"
23
- export { default as PlanConfiguration } from "./plan_configuration"
22
+ export { default as Liscense } from "./license";
23
+ export { default as PlanConfiguration } from "./plan_configuration";
24
+ export { default as AutoScalingGroup } from "./auto-scaling"
24
25
 
25
26
  export {
26
27
  IUser,
@@ -47,7 +48,8 @@ export {
47
48
  IDbImage,
48
49
  IJob,
49
50
  ILicense,
50
- IPlanConfiguration
51
+ IPlanConfiguration,
52
+ IAutoScalingGroup
51
53
  } from "./types";
52
54
  export {
53
55
  GIT_TYPE,
@@ -67,7 +69,7 @@ export {
67
69
  ServiceType,
68
70
  DatabaseEngine,
69
71
  JobStatus,
70
- LicenseStatus
72
+ LicenseStatus,
71
73
  } from "./enum";
72
74
 
73
75
  import mongoose from "mongoose";
package/job.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import mongoose, { model, Schema } from "mongoose";
2
2
  import { IJob } from "./types/job";
3
3
  import { JobStatus } from "./enum";
4
-
4
+
5
5
  const jobSchema: Schema = new Schema({
6
6
  title: { type: String, required: true },
7
7
  jobId: { type: String, required: true, unique: true },
@@ -27,5 +27,4 @@ const jobSchema: Schema = new Schema({
27
27
  updatedAt: { type: Date, default: Date.now },
28
28
  });
29
29
 
30
- export default model<IJob>('Job', jobSchema, 'scheduled_jobs');
31
-
30
+ export default model<IJob>("Job", jobSchema, "scheduled_jobs");
package/license.ts CHANGED
@@ -2,68 +2,73 @@ import { model, Schema } from "mongoose";
2
2
  import { ILicense } from "./types/license";
3
3
  import { LicenseStatus } from "./enum";
4
4
 
5
- const licenseSchema: Schema = new Schema({
6
- licenseKey: {
7
- type: String,
8
- required: true,
9
- unique: true
10
- },
11
- infisicalIdentity: String,
12
- userId: {
13
- type: Schema.Types.ObjectId,
14
- ref: 'User',
15
- required: true
16
- },
17
- teamId: {
18
- type: Schema.Types.ObjectId,
19
- ref: 'Team',
20
- required: false
21
- },
22
- subscriptionId: {
23
- type: Schema.Types.ObjectId,
24
- ref: 'Subscription',
25
- required: true
26
- },
27
- status: {
28
- type: String,
29
- enum: Object.values(LicenseStatus),
30
- default: LicenseStatus.ACTIVE
31
- },
32
- tag: String,
33
- devices: [{
34
- deviceId: {
35
- type: String,
36
- required: true
5
+ const licenseSchema: Schema = new Schema(
6
+ {
7
+ licenseKey: {
8
+ type: String,
9
+ required: true,
10
+ unique: true,
11
+ },
12
+ infisicalIdentity: String,
13
+ userId: {
14
+ type: Schema.Types.ObjectId,
15
+ ref: "User",
16
+ required: true,
37
17
  },
38
- hostname: String,
39
- lastSeen: {
40
- type: Date,
41
- default: Date.now
18
+ teamId: {
19
+ type: Schema.Types.ObjectId,
20
+ ref: "Team",
21
+ required: false,
42
22
  },
43
- isActive: {
44
- type: Boolean,
45
- default: true
46
- }
47
- }],
48
- maxDevices: {
49
- type: Number,
50
- required: true,
51
- default: 1
52
- }
53
- }, { timestamps: true });
23
+ subscriptionId: {
24
+ type: Schema.Types.ObjectId,
25
+ ref: "Subscription",
26
+ required: true,
27
+ },
28
+ status: {
29
+ type: String,
30
+ enum: Object.values(LicenseStatus),
31
+ default: LicenseStatus.ACTIVE,
32
+ },
33
+ tag: String,
34
+ devices: [
35
+ {
36
+ deviceId: {
37
+ type: String,
38
+ required: true,
39
+ },
40
+ hostname: String,
41
+ lastSeen: {
42
+ type: Date,
43
+ default: Date.now,
44
+ },
45
+ isActive: {
46
+ type: Boolean,
47
+ default: true,
48
+ },
49
+ },
50
+ ],
51
+ maxDevices: {
52
+ type: Number,
53
+ required: true,
54
+ default: 1,
55
+ },
56
+ },
57
+ { timestamps: true },
58
+ );
54
59
 
55
60
  // licenseSchema.index({ userId: 1, status: 1 });
56
61
  // licenseSchema.index({ licenseKey: 1 });
57
62
 
58
- licenseSchema.methods.cleanupInactiveDevices = async function() {
63
+ licenseSchema.methods.cleanupInactiveDevices = async function () {
59
64
  const thirtyDaysAgo = new Date();
60
65
  thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);
61
66
 
62
- this.devices = this.devices.filter((device: any) =>
63
- device.lastSeen > thirtyDaysAgo || device.isActive
67
+ this.devices = this.devices.filter(
68
+ (device: any) => device.lastSeen > thirtyDaysAgo || device.isActive,
64
69
  );
65
-
70
+
66
71
  await this.save();
67
72
  };
68
73
 
69
- export default model<ILicense>('License', licenseSchema, 'licenses');
74
+ export default model<ILicense>("License", licenseSchema, "licenses");
package/logs.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { model, Schema } from "mongoose";
2
2
  import { ENVIRONMENT, PROJECT_STATUS } from "./enum";
3
3
  import { ILog } from "./types";
4
- import { SoftDeleteModel, softDeletePlugin } from "soft-delete-plugin-mongoose";
4
+ // import { SoftDeleteModel, softDeletePlugin } from "soft-delete-plugin-mongoose";
5
5
 
6
6
  const LogSchema = new Schema(
7
7
  {
@@ -33,11 +33,11 @@ const LogSchema = new Schema(
33
33
  jobs: Array,
34
34
  startTime: Schema.Types.Date,
35
35
  endTime: Schema.Types.Date,
36
- deleted: Schema.Types.Boolean
36
+ deleted: Schema.Types.Boolean,
37
37
  },
38
38
  { timestamps: true },
39
39
  );
40
40
 
41
- LogSchema.plugin(softDeletePlugin);
41
+ // LogSchema.plugin(softDeletePlugin);
42
42
 
43
- export default model<ILog, SoftDeleteModel<ILog>>('Log', LogSchema);
43
+ export default model<ILog>("Log", LogSchema);
@@ -2,9 +2,12 @@ import { Schema, model } from "mongoose";
2
2
  import { IMemberPermission } from "./types/member-permission";
3
3
 
4
4
  const memberPermissionSchema = new Schema({
5
- permission: { type: Schema.Types.ObjectId, ref: 'Permission' },
6
- member: { type: Schema.Types.ObjectId, ref: 'Member' },
7
- enabled: { type: Boolean, default: false }
5
+ permission: { type: Schema.Types.ObjectId, ref: "Permission" },
6
+ member: { type: Schema.Types.ObjectId, ref: "Member" },
7
+ enabled: { type: Boolean, default: false },
8
8
  });
9
9
 
10
- export default model<IMemberPermission>("MemberPermission", memberPermissionSchema);
10
+ export default model<IMemberPermission>(
11
+ "MemberPermission",
12
+ memberPermissionSchema,
13
+ );
package/member.ts CHANGED
@@ -30,7 +30,7 @@ const memberSchema: Schema = new Schema(
30
30
  type: Boolean,
31
31
  default: false,
32
32
  },
33
- permissions: [{ type: Schema.Types.ObjectId, ref: 'MemberPermission' }],
33
+ permissions: [{ type: Schema.Types.ObjectId, ref: "MemberPermission" }],
34
34
  },
35
35
  {
36
36
  timestamps: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/permission.ts CHANGED
@@ -3,11 +3,11 @@ import { IPermission } from "./types/permission";
3
3
  import { PERMISSION_TYPE } from "./enum";
4
4
 
5
5
  const permissionSchema = new Schema({
6
- title: { type: String },
7
- role: [{ type: Schema.Types.ObjectId, ref: 'Role' }],
8
- request: { type: Object },
9
- type: { type: String, enum: Object.values(PERMISSION_TYPE) },
10
- enabled: { type: Boolean, default: false, select: true }
6
+ title: { type: String },
7
+ role: [{ type: Schema.Types.ObjectId, ref: "Role" }],
8
+ request: { type: Object },
9
+ type: { type: String, enum: Object.values(PERMISSION_TYPE) },
10
+ enabled: { type: Boolean, default: false, select: true },
11
11
  });
12
12
 
13
- export default model<IPermission>("Permission", permissionSchema);
13
+ export default model<IPermission>("Permission", permissionSchema);
@@ -1,23 +1,34 @@
1
- import mongoose, { Schema, Document, model } from 'mongoose';
2
- import { SUBSCRIPTION_PLAN_TYPE } from './enum';
3
- import { IPlanConfiguration } from './types/plan_configuration';
1
+ import mongoose, { Schema, Document, model } from "mongoose";
2
+ import { SUBSCRIPTION_PLAN_TYPE } from "./enum";
3
+ import { IPlanConfiguration } from "./types/plan_configuration";
4
4
 
5
- const PlanConfigurationSchema = new Schema<IPlanConfiguration>({
6
- tag: { type: String, required: true },
7
- slack_support: { type: Boolean, default: false },
8
- concurrent_builds: { type: Number, required: true },
9
- project_limit: { type: Number, required: true },
10
- deploy_private_organization: { type: Boolean, default: false },
11
- preview_comments: { type: Boolean, default: false },
12
- analytics: { type: Boolean, default: false },
13
- build_minutes: { type: Number, required: true },
14
- log_retention: { type: Number, required: true },
15
- bandwidth: { type: Number, required: true },
16
- plan_type: { type: String, enum: Object.values(SUBSCRIPTION_PLAN_TYPE), required: true },
17
- memory: { type: Number, required: true },
18
- build_timeout: { type: Number, required: true },
19
- storage: { type: Number, required: true },
20
- cpu: { type: Number, required: true },
21
- }, { timestamps: true });
5
+ const PlanConfigurationSchema = new Schema<IPlanConfiguration>(
6
+ {
7
+ tag: { type: String, required: true },
8
+ slack_support: { type: Boolean, default: false },
9
+ concurrent_builds: { type: Number, required: true },
10
+ project_limit: { type: Number, required: true },
11
+ deploy_private_organization: { type: Boolean, default: false },
12
+ preview_comments: { type: Boolean, default: false },
13
+ analytics: { type: Boolean, default: false },
14
+ build_minutes: { type: Number, required: true },
15
+ log_retention: { type: Number, required: true },
16
+ bandwidth: { type: Number, required: true },
17
+ plan_type: {
18
+ type: String,
19
+ enum: Object.values(SUBSCRIPTION_PLAN_TYPE),
20
+ required: true,
21
+ },
22
+ memory: { type: Number, required: true },
23
+ build_timeout: { type: Number, required: true },
24
+ storage: { type: Number, required: true },
25
+ cpu: { type: Number, required: true },
26
+ },
27
+ { timestamps: true },
28
+ );
22
29
 
23
- export default model<IPlanConfiguration>('PlanConfigurations', PlanConfigurationSchema, "plan_configurations");
30
+ export default model<IPlanConfiguration>(
31
+ "PlanConfigurations",
32
+ PlanConfigurationSchema,
33
+ "plan_configurations",
34
+ );
package/project/index.ts CHANGED
@@ -127,7 +127,7 @@ const projectSchema = new Schema(
127
127
  },
128
128
  isPaid: {
129
129
  type: Boolean,
130
- default: false
130
+ default: false,
131
131
  },
132
132
  uri: {
133
133
  type: String,
package/role.ts CHANGED
@@ -3,10 +3,10 @@ import { ROLES } from "./enum";
3
3
  import { IRole } from "./types/role";
4
4
 
5
5
  const roleSchema = new Schema({
6
- type: { type: String, enum: Object.values(ROLES) },
7
- description: { type: String },
8
- is_custom: { type: Boolean, default: false },
9
- permissions: [{ type: Schema.Types.ObjectId, ref: 'Permission' }]
6
+ type: { type: String, enum: Object.values(ROLES) },
7
+ description: { type: String },
8
+ is_custom: { type: Boolean, default: false },
9
+ permissions: [{ type: Schema.Types.ObjectId, ref: "Permission" }],
10
10
  });
11
11
 
12
- export default model<IRole>("Role", roleSchema);
12
+ export default model<IRole>("Role", roleSchema);
package/server.ts CHANGED
@@ -10,15 +10,15 @@ const serverSchema = new Schema(
10
10
  },
11
11
  url: String,
12
12
  grpc_address: String,
13
- userId: {
14
- type: Schema.Types.ObjectId,
15
- ref: 'User',
16
- required: true
13
+ userId: {
14
+ type: Schema.Types.ObjectId,
15
+ ref: "User",
16
+ required: true,
17
17
  },
18
18
  teamId: {
19
- type: Schema.Types.ObjectId,
20
- ref: 'Team',
21
- required: false
19
+ type: Schema.Types.ObjectId,
20
+ ref: "Team",
21
+ required: false,
22
22
  },
23
23
  webhook_url: String,
24
24
  ip_address: {
@@ -32,7 +32,7 @@ const serverSchema = new Schema(
32
32
  },
33
33
  tunnel_token: {
34
34
  type: String,
35
- required: false
35
+ required: false,
36
36
  },
37
37
  type: String,
38
38
  status: {
package/subscription.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { model, Schema } from "mongoose";
2
- import {SUBSCRIPTION_PLAN_TYPE, SUBSCRIPTION_STATUS} from "./enum";
2
+ import { SUBSCRIPTION_PLAN_TYPE, SUBSCRIPTION_STATUS } from "./enum";
3
3
  import { ISubscription } from "./types";
4
4
 
5
5
  const subscriptionSchema: Schema = new Schema(
@@ -48,14 +48,14 @@ const subscriptionSchema: Schema = new Schema(
48
48
  transaction_retries: Number,
49
49
  trigger_created: {
50
50
  type: Boolean,
51
- default: false
51
+ default: false,
52
52
  },
53
53
  trigger_created_at: {
54
- type: String
54
+ type: String,
55
55
  },
56
56
  job_identifier: {
57
- type: String
58
- }
57
+ type: String,
58
+ },
59
59
  },
60
60
  {
61
61
  timestamps: true,
package/team.ts CHANGED
@@ -28,13 +28,13 @@ const teamSchema: Schema = new Schema(
28
28
  },
29
29
  build_disabled: {
30
30
  type: Boolean,
31
- default: false
31
+ default: false,
32
32
  },
33
33
  subscription: {
34
34
  type: Schema.Types.ObjectId,
35
35
  required: false,
36
36
  ref: "Subscription",
37
- }
37
+ },
38
38
  },
39
39
  {
40
40
  timestamps: true,
@@ -0,0 +1,16 @@
1
+ import { Types } from "mongoose";
2
+
3
+ export interface IAutoScalingGroup extends Document {
4
+ _id: Types.ObjectId;
5
+ name: string;
6
+ user_id: Types.ObjectId;
7
+ team_id?: Types.ObjectId;
8
+ subscription_id: Types.ObjectId;
9
+ min_containers: number;
10
+ max_containers: number;
11
+ min_application_response_time: number;
12
+ active: boolean;
13
+ meta: Record<string, any>;
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ }
package/types/db-image.ts CHANGED
@@ -2,12 +2,12 @@ import { Document } from "mongoose";
2
2
  import { DatabaseEngine } from "../enum";
3
3
 
4
4
  export interface IDbImage extends Document {
5
- name: DatabaseEngine;
6
- image_url: string;
7
- version: string;
8
- envs: string[];
9
- is_available: boolean;
10
- is_default: boolean;
11
- image: string;
12
- has_port: boolean;
13
- }
5
+ name: DatabaseEngine;
6
+ image_url: string;
7
+ version: string;
8
+ envs: string[];
9
+ is_available: boolean;
10
+ is_default: boolean;
11
+ image: string;
12
+ has_port: boolean;
13
+ }
package/types/index.ts CHANGED
@@ -21,5 +21,6 @@ export { IMemberPermission } from "./member-permission";
21
21
  export { IWallet } from "./wallet";
22
22
  export { IDbImage } from "./db-image";
23
23
  export { IJob } from "./job";
24
- export { ILicense } from "./license"
25
- export { IPlanConfiguration } from "./plan_configuration"
24
+ export { ILicense } from "./license";
25
+ export { IPlanConfiguration } from "./plan_configuration";
26
+ export { IAutoScalingGroup } from "./auto-scaling-group";
package/types/job.ts CHANGED
@@ -2,19 +2,19 @@ import { Document } from "mongoose";
2
2
  import { JobStatus } from "../enum";
3
3
 
4
4
  export interface IJob extends Document {
5
- title: string;
6
- jobId: string;
7
- url: string;
8
- method: string;
9
- schedule: string;
10
- headers?: Map<string, string>;
11
- maxAttempts?: number;
12
- attempts?: number;
13
- isRecurring: boolean;
14
- lastRun?: Date;
15
- nextRun?: Date;
16
- body?: any;
17
- status?: JobStatus;
18
- createdAt?: Date;
19
- updatedAt?: Date;
20
- }
5
+ title: string;
6
+ jobId: string;
7
+ url: string;
8
+ method: string;
9
+ schedule: string;
10
+ headers?: Map<string, string>;
11
+ maxAttempts?: number;
12
+ attempts?: number;
13
+ isRecurring: boolean;
14
+ lastRun?: Date;
15
+ nextRun?: Date;
16
+ body?: any;
17
+ status?: JobStatus;
18
+ createdAt?: Date;
19
+ updatedAt?: Date;
20
+ }