@brimble/models 1.5.10 → 1.5.12

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 (85) hide show
  1. package/.turbo/turbo-build.log +0 -2
  2. package/brimble.json +3 -0
  3. package/card.ts +39 -39
  4. package/dist/domain.d.ts +0 -0
  5. package/dist/domain.js +13 -1
  6. package/dist/enum/index.d.ts +0 -0
  7. package/dist/enum/index.js +0 -0
  8. package/dist/env.d.ts +0 -0
  9. package/dist/env.js +0 -0
  10. package/dist/follower.d.ts +0 -0
  11. package/dist/follower.js +0 -0
  12. package/dist/following.d.ts +0 -0
  13. package/dist/following.js +0 -0
  14. package/dist/index.d.ts +0 -0
  15. package/dist/index.js +0 -0
  16. package/dist/integration.d.ts +0 -0
  17. package/dist/integration.js +0 -0
  18. package/dist/logs.d.ts +0 -0
  19. package/dist/logs.js +0 -0
  20. package/dist/member.d.ts +0 -0
  21. package/dist/member.js +0 -0
  22. package/dist/project/index.js +1 -0
  23. package/dist/project/stage.d.ts +4 -0
  24. package/dist/project/stage.js +20 -0
  25. package/dist/server.js +3 -3
  26. package/dist/subscription.js +3 -3
  27. package/dist/team.d.ts +0 -0
  28. package/dist/team.js +1 -1
  29. package/dist/tenancy.js +3 -3
  30. package/dist/token.d.ts +0 -0
  31. package/dist/token.js +0 -0
  32. package/dist/types/domain.d.ts +3 -0
  33. package/dist/types/domain.js +0 -0
  34. package/dist/types/env.d.ts +0 -0
  35. package/dist/types/env.js +0 -0
  36. package/dist/types/following.d.ts +0 -0
  37. package/dist/types/following.js +0 -0
  38. package/dist/types/git.d.ts +0 -0
  39. package/dist/types/git.js +0 -0
  40. package/dist/types/index.d.ts +0 -0
  41. package/dist/types/index.js +0 -0
  42. package/dist/types/installed_integration.d.ts +0 -0
  43. package/dist/types/installed_integration.js +0 -0
  44. package/dist/types/integration.d.ts +0 -0
  45. package/dist/types/integration.js +0 -0
  46. package/dist/types/logs.d.ts +0 -0
  47. package/dist/types/logs.js +0 -0
  48. package/dist/types/member.d.ts +0 -0
  49. package/dist/types/member.js +0 -0
  50. package/dist/types/project/index.d.ts +1 -0
  51. package/dist/types/project/stage.d.ts +13 -0
  52. package/dist/types/{project.js → project/stage.js} +0 -0
  53. package/dist/types/team.d.ts +0 -0
  54. package/dist/types/team.js +0 -0
  55. package/dist/types/token.d.ts +0 -0
  56. package/dist/types/token.js +0 -0
  57. package/dist/types/user.d.ts +0 -0
  58. package/dist/types/user.js +0 -0
  59. package/dist/user.d.ts +0 -0
  60. package/dist/user.js +0 -0
  61. package/domain.ts +13 -1
  62. package/package.json +3 -3
  63. package/project/index.ts +1 -0
  64. package/server.ts +4 -4
  65. package/subscription.ts +38 -37
  66. package/team.ts +4 -4
  67. package/tenancy.ts +4 -4
  68. package/types/card.ts +9 -9
  69. package/types/domain.ts +3 -0
  70. package/types/project/index.ts +1 -0
  71. package/types/server.ts +10 -10
  72. package/types/subscription.ts +14 -14
  73. package/types/team.ts +2 -2
  74. package/types/tenancy.ts +1 -1
  75. package/LICENSE +0 -201
  76. package/dist/installed_integration.d.ts +0 -4
  77. package/dist/installed_integration.js +0 -27
  78. package/dist/project.d.ts +0 -4
  79. package/dist/project.js +0 -87
  80. package/dist/subscription_plan.d.ts +0 -4
  81. package/dist/subscription_plan.js +0 -40
  82. package/dist/types/project.d.ts +0 -46
  83. package/dist/types/subscription_plan.d.ts +0 -15
  84. package/dist/types/subscription_plan.js +0 -2
  85. package/yarn-error.log +0 -10230
@@ -1,3 +1 @@
1
- yarn run v1.22.19
2
1
  $ tsc -p .
3
- Done in 2.47s.
package/brimble.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "project": {}
3
+ }
package/card.ts CHANGED
@@ -1,45 +1,45 @@
1
1
  import { model, Schema } from "mongoose";
2
- import {CARD_TYPES} from "./enum";
3
- import {ICard} from "./types";
2
+ import { CARD_TYPES } from "./enum";
3
+ import { ICard } from "./types";
4
4
 
5
5
  const cardSchema = new Schema(
6
- {
7
- user_id: {
8
- ref: "User",
9
- type: Schema.Types.ObjectId,
10
- },
11
- last4: {
12
- type: String,
13
- required: true,
14
- },
15
- card_type: {
16
- type: String,
17
- enum: Object.keys(CARD_TYPES),
18
- required: true,
19
- },
20
- exp_month: {
21
- type: String,
22
- required: true,
23
- },
24
- exp_year: {
25
- type: String,
26
- required: true,
27
- },
28
- signature: {
29
- type: String,
30
- required: false,
31
- },
32
- authorization_code: {
33
- type: String,
34
- required: true,
35
- },
36
- preferred: {
37
- type: Boolean,
38
- default: true,
39
- required: false,
40
- },
41
- },
42
- { timestamps: true, collection: "cards" },
6
+ {
7
+ user_id: {
8
+ ref: "User",
9
+ type: Schema.Types.ObjectId,
10
+ },
11
+ last4: {
12
+ type: String,
13
+ required: true,
14
+ },
15
+ card_type: {
16
+ type: String,
17
+ enum: Object.keys(CARD_TYPES),
18
+ required: true,
19
+ },
20
+ exp_month: {
21
+ type: String,
22
+ required: true,
23
+ },
24
+ exp_year: {
25
+ type: String,
26
+ required: true,
27
+ },
28
+ signature: {
29
+ type: String,
30
+ required: false,
31
+ },
32
+ authorization_code: {
33
+ type: String,
34
+ required: true,
35
+ },
36
+ preferred: {
37
+ type: Boolean,
38
+ default: true,
39
+ required: false,
40
+ },
41
+ },
42
+ { timestamps: true, collection: "cards" },
43
43
  );
44
44
 
45
45
  export default model<ICard>("Card", cardSchema);
package/dist/domain.d.ts CHANGED
File without changes
package/dist/domain.js CHANGED
@@ -26,7 +26,19 @@ const domainSchema = new mongoose_1.Schema({
26
26
  },
27
27
  is_free: {
28
28
  type: Boolean,
29
- default: false
29
+ default: false,
30
+ },
31
+ privacy_enabled: {
32
+ type: Boolean,
33
+ default: false,
34
+ },
35
+ renewal_date: {
36
+ type: String,
37
+ required: false,
38
+ },
39
+ renewal_price: {
40
+ type: Number,
41
+ required: false,
30
42
  },
31
43
  preview: {
32
44
  ref: "Preview",
File without changes
File without changes
package/dist/env.d.ts CHANGED
File without changes
package/dist/env.js CHANGED
File without changes
File without changes
package/dist/follower.js CHANGED
File without changes
File without changes
package/dist/following.js CHANGED
File without changes
package/dist/index.d.ts CHANGED
File without changes
package/dist/index.js CHANGED
File without changes
File without changes
File without changes
package/dist/logs.d.ts CHANGED
File without changes
package/dist/logs.js CHANGED
File without changes
package/dist/member.d.ts CHANGED
File without changes
package/dist/member.js CHANGED
File without changes
@@ -83,6 +83,7 @@ const projectSchema = new mongoose_1.Schema({
83
83
  screenshot: String,
84
84
  lastProcessed: Number,
85
85
  tracking_token: String,
86
+ from: mongoose_1.Schema.Types.ObjectId,
86
87
  previews: [
87
88
  {
88
89
  ref: "Preview",
@@ -0,0 +1,4 @@
1
+ /// <reference types="mongoose" />
2
+ import { IStage } from "../types";
3
+ declare const _default: import("mongoose").Model<IStage, {}, {}>;
4
+ export default _default;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const stagesSchema = new mongoose_1.Schema({
5
+ name: String,
6
+ project: {
7
+ ref: "Project",
8
+ type: mongoose_1.Schema.Types.ObjectId,
9
+ },
10
+ server: {
11
+ ref: "Server",
12
+ type: mongoose_1.Schema.Types.ObjectId,
13
+ },
14
+ pid: Number,
15
+ port: Number,
16
+ ip: String,
17
+ dir: String,
18
+ branch: String,
19
+ }, { timestamps: true });
20
+ exports.default = (0, mongoose_1.model)("Stage", stagesSchema);
package/dist/server.js CHANGED
@@ -25,11 +25,11 @@ const serverSchema = new mongoose_1.Schema({
25
25
  default: Boolean,
26
26
  is_custom_provision: {
27
27
  type: Boolean,
28
- default: true
28
+ default: true,
29
29
  },
30
30
  is_downscaled: {
31
31
  type: Boolean,
32
- default: false
33
- }
32
+ default: false,
33
+ },
34
34
  }, { timestamps: true });
35
35
  exports.default = (0, mongoose_1.model)("Server", serverSchema);
@@ -21,12 +21,12 @@ const subscriptionPlanSchema = new mongoose_1.Schema({
21
21
  status: {
22
22
  type: String,
23
23
  enum: Object.values(enum_1.SUBSCRIPTION_STATUS),
24
- default: enum_1.SUBSCRIPTION_STATUS.ACTIVE
24
+ default: enum_1.SUBSCRIPTION_STATUS.ACTIVE,
25
25
  },
26
26
  specifications: {
27
27
  type: Object,
28
28
  default: {},
29
- select: true
29
+ select: true,
30
30
  },
31
31
  amount: Number,
32
32
  debit_date: String,
@@ -36,6 +36,6 @@ const subscriptionPlanSchema = new mongoose_1.Schema({
36
36
  transaction_retries: Number,
37
37
  }, {
38
38
  timestamps: true,
39
- collection: "subscriptions"
39
+ collection: "subscriptions",
40
40
  });
41
41
  exports.default = (0, mongoose_1.model)("Subscription", subscriptionPlanSchema);
package/dist/team.d.ts CHANGED
File without changes
package/dist/team.js CHANGED
@@ -30,7 +30,7 @@ const teamSchema = new mongoose_1.Schema({
30
30
  required: false,
31
31
  ref: "Subscription",
32
32
  },
33
- tenant: { type: mongoose_1.Schema.Types.ObjectId, ref: "Tenancy", required: false }
33
+ tenant: { type: mongoose_1.Schema.Types.ObjectId, ref: "Tenancy", required: false },
34
34
  }, {
35
35
  timestamps: true,
36
36
  });
package/dist/tenancy.js CHANGED
@@ -18,15 +18,15 @@ const tenancySchema = new mongoose_1.Schema({
18
18
  },
19
19
  username: {
20
20
  type: String,
21
- required: true
21
+ required: true,
22
22
  },
23
23
  password: {
24
24
  type: String,
25
- required: true
25
+ required: true,
26
26
  },
27
27
  is_activated: {
28
28
  type: Boolean,
29
- default: false
29
+ default: false,
30
30
  },
31
31
  }, { timestamps: true });
32
32
  exports.default = (0, mongoose_1.model)("Tenancy", tenancySchema);
package/dist/token.d.ts CHANGED
File without changes
package/dist/token.js CHANGED
File without changes
@@ -8,4 +8,7 @@ export interface IDomain extends Document {
8
8
  primary: boolean;
9
9
  preview: IPreview;
10
10
  is_free: boolean;
11
+ privacy_enabled: boolean;
12
+ renewal_date: string;
13
+ renewal_price: number;
11
14
  }
File without changes
File without changes
package/dist/types/env.js CHANGED
File without changes
File without changes
File without changes
File without changes
package/dist/types/git.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -44,5 +44,6 @@ export interface IProject extends Document {
44
44
  updatedAt: Date;
45
45
  lastProcessed: number;
46
46
  tracking_token: string;
47
+ from: string;
47
48
  previews: IPreview[];
48
49
  }
@@ -0,0 +1,13 @@
1
+ import { Document } from "mongoose";
2
+ import { IServer } from "../server";
3
+ import { IProject } from ".";
4
+ export interface IStage extends Document {
5
+ name: string;
6
+ pid: number;
7
+ port: number;
8
+ ip: string;
9
+ dir: string;
10
+ branch: string;
11
+ server: IServer;
12
+ project: IProject;
13
+ }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/dist/user.d.ts CHANGED
File without changes
package/dist/user.js CHANGED
File without changes
package/domain.ts CHANGED
@@ -28,7 +28,19 @@ const domainSchema = new Schema(
28
28
  },
29
29
  is_free: {
30
30
  type: Boolean,
31
- default: false
31
+ default: false,
32
+ },
33
+ privacy_enabled: {
34
+ type: Boolean,
35
+ default: false,
36
+ },
37
+ renewal_date: {
38
+ type: String,
39
+ required: false,
40
+ },
41
+ renewal_price: {
42
+ type: Number,
43
+ required: false,
32
44
  },
33
45
  preview: {
34
46
  ref: "Preview",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.5.10",
3
+ "version": "1.5.11",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@brimble/utils": "^1.5.17",
12
+ "@brimble/utils": "^1.5.18",
13
13
  "dotenv": "^8.2.0",
14
14
  "mongoose": "^5.8.11",
15
15
  "uuid": "^8.3.2"
@@ -21,5 +21,5 @@
21
21
  "ts-node": "^8.10.2",
22
22
  "typescript": "^4.9.4"
23
23
  },
24
- "gitHead": "305eb952bfaa061aa9159a6ad9ef5209755dec20"
24
+ "gitHead": "9c0c4ea58ebffdeef386658cf892ff8c189a7775"
25
25
  }
package/project/index.ts CHANGED
@@ -84,6 +84,7 @@ const projectSchema = new Schema(
84
84
  screenshot: String,
85
85
  lastProcessed: Number,
86
86
  tracking_token: String,
87
+ from: Schema.Types.ObjectId,
87
88
  previews: [
88
89
  {
89
90
  ref: "Preview",
package/server.ts CHANGED
@@ -32,15 +32,15 @@ const serverSchema = new Schema(
32
32
 
33
33
  is_custom_provision: {
34
34
  type: Boolean,
35
- default: true
35
+ default: true,
36
36
  },
37
37
 
38
38
  is_downscaled: {
39
39
  type: Boolean,
40
- default: false
41
- }
40
+ default: false,
41
+ },
42
42
  },
43
43
  { timestamps: true },
44
44
  );
45
45
 
46
- export default model<IServer>("Server", serverSchema);
46
+ export default model<IServer>("Server", serverSchema);
package/subscription.ts CHANGED
@@ -1,44 +1,45 @@
1
1
  import { model, Schema } from "mongoose";
2
- import {SUBSCRIPTION_STATUS} from "./enum";
3
- import {ISubscription} from "./types";
2
+ import { SUBSCRIPTION_STATUS } from "./enum";
3
+ import { ISubscription } from "./types";
4
4
 
5
- const subscriptionPlanSchema: Schema = new Schema({
6
- team_id: {
7
- type: Schema.Types.ObjectId,
8
- required: true,
9
- ref: "Team",
10
- },
11
- admin_id: {
12
- type: Schema.Types.ObjectId,
13
- required: true,
14
- ref: "User",
15
- },
16
- plan_code: {
17
- type: String,
18
- required: true,
19
- unique: true,
20
- },
21
- status: {
22
- type: String,
23
- enum: Object.values(SUBSCRIPTION_STATUS),
24
- default: SUBSCRIPTION_STATUS.ACTIVE
25
- },
26
- specifications: {
27
- type: Object,
28
- default: {},
29
- select: true
30
- },
31
- amount: Number,
32
- debit_date: String,
33
- start_date: String,
34
- expiry_date: String,
35
- reminder_date: String,
36
- transaction_retries: Number,
5
+ const subscriptionPlanSchema: Schema = new Schema(
6
+ {
7
+ team_id: {
8
+ type: Schema.Types.ObjectId,
9
+ required: true,
10
+ ref: "Team",
37
11
  },
38
- {
39
- timestamps: true,
40
- collection: "subscriptions"
12
+ admin_id: {
13
+ type: Schema.Types.ObjectId,
14
+ required: true,
15
+ ref: "User",
41
16
  },
17
+ plan_code: {
18
+ type: String,
19
+ required: true,
20
+ unique: true,
21
+ },
22
+ status: {
23
+ type: String,
24
+ enum: Object.values(SUBSCRIPTION_STATUS),
25
+ default: SUBSCRIPTION_STATUS.ACTIVE,
26
+ },
27
+ specifications: {
28
+ type: Object,
29
+ default: {},
30
+ select: true,
31
+ },
32
+ amount: Number,
33
+ debit_date: String,
34
+ start_date: String,
35
+ expiry_date: String,
36
+ reminder_date: String,
37
+ transaction_retries: Number,
38
+ },
39
+ {
40
+ timestamps: true,
41
+ collection: "subscriptions",
42
+ },
42
43
  );
43
44
 
44
45
  export default model<ISubscription>("Subscription", subscriptionPlanSchema);
package/team.ts CHANGED
@@ -27,11 +27,11 @@ const teamSchema: Schema = new Schema(
27
27
  type: String,
28
28
  },
29
29
  subscription: {
30
- type: Schema.Types.ObjectId,
31
- required: false,
32
- ref: "Subscription",
30
+ type: Schema.Types.ObjectId,
31
+ required: false,
32
+ ref: "Subscription",
33
33
  },
34
- tenant: { type: Schema.Types.ObjectId, ref: "Tenancy", required: false }
34
+ tenant: { type: Schema.Types.ObjectId, ref: "Tenancy", required: false },
35
35
  },
36
36
  {
37
37
  timestamps: true,
package/tenancy.ts CHANGED
@@ -19,18 +19,18 @@ const tenancySchema = new Schema(
19
19
  },
20
20
  username: {
21
21
  type: String,
22
- required: true
22
+ required: true,
23
23
  },
24
24
  password: {
25
25
  type: String,
26
- required: true
26
+ required: true,
27
27
  },
28
28
  is_activated: {
29
29
  type: Boolean,
30
- default: false
30
+ default: false,
31
31
  },
32
32
  },
33
33
  { timestamps: true },
34
34
  );
35
35
 
36
- export default model<ITenancy>("Tenancy", tenancySchema);
36
+ export default model<ITenancy>("Tenancy", tenancySchema);
package/types/card.ts CHANGED
@@ -1,20 +1,20 @@
1
1
  import { Document } from "mongoose";
2
- import {CARD_TYPES} from "../enum";
2
+ import { CARD_TYPES } from "../enum";
3
3
 
4
4
  export interface ICard extends Document {
5
- user_id: string;
5
+ user_id: string;
6
6
 
7
- last4: string;
7
+ last4: string;
8
8
 
9
- card_type: CARD_TYPES;
9
+ card_type: CARD_TYPES;
10
10
 
11
- preferred: boolean;
11
+ preferred: boolean;
12
12
 
13
- exp_month: string;
13
+ exp_month: string;
14
14
 
15
- exp_year: string;
15
+ exp_year: string;
16
16
 
17
- signature: string;
17
+ signature: string;
18
18
 
19
- authorization_code: string;
19
+ authorization_code: string;
20
20
  }
package/types/domain.ts CHANGED
@@ -9,4 +9,7 @@ export interface IDomain extends Document {
9
9
  primary: boolean;
10
10
  preview: IPreview;
11
11
  is_free: boolean;
12
+ privacy_enabled: boolean;
13
+ renewal_date: string;
14
+ renewal_price: number;
12
15
  }
@@ -45,5 +45,6 @@ export interface IProject extends Document {
45
45
  updatedAt: Date;
46
46
  lastProcessed: number;
47
47
  tracking_token: string;
48
+ from: string;
48
49
  previews: IPreview[];
49
50
  }
package/types/server.ts CHANGED
@@ -1,20 +1,20 @@
1
1
  import { Document } from "mongoose";
2
- import {SERVER_STATUS} from "../enum";
2
+ import { SERVER_STATUS } from "../enum";
3
3
 
4
4
  export interface IServer extends Document {
5
- name: string;
5
+ name: string;
6
6
 
7
- url: string;
7
+ url: string;
8
8
 
9
- ip_address: string;
9
+ ip_address: string;
10
10
 
11
- server_type: string;
11
+ server_type: string;
12
12
 
13
- status: SERVER_STATUS;
13
+ status: SERVER_STATUS;
14
14
 
15
- default: boolean;
15
+ default: boolean;
16
16
 
17
- is_custom_provision: boolean;
17
+ is_custom_provision: boolean;
18
18
 
19
- is_downscaled: boolean;
20
- }
19
+ is_downscaled: boolean;
20
+ }