@brimble/models 1.5.13 → 1.5.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.
Files changed (72) hide show
  1. package/.turbo/turbo-build.log +2 -0
  2. package/LICENSE +201 -0
  3. package/dist/domain.d.ts +0 -0
  4. package/dist/domain.js +4 -0
  5. package/dist/enum/index.d.ts +5 -0
  6. package/dist/enum/index.js +7 -1
  7. package/dist/env.d.ts +0 -0
  8. package/dist/env.js +0 -0
  9. package/dist/follower.d.ts +0 -0
  10. package/dist/follower.js +0 -0
  11. package/dist/following.d.ts +0 -0
  12. package/dist/following.js +0 -0
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +2 -1
  15. package/dist/installed_integration.d.ts +4 -0
  16. package/dist/installed_integration.js +27 -0
  17. package/dist/integration.d.ts +0 -0
  18. package/dist/integration.js +0 -0
  19. package/dist/logs.d.ts +0 -0
  20. package/dist/logs.js +0 -0
  21. package/dist/member.d.ts +0 -0
  22. package/dist/member.js +0 -0
  23. package/dist/project.d.ts +4 -0
  24. package/dist/project.js +87 -0
  25. package/dist/subscription.js +3 -3
  26. package/dist/subscription_plan.d.ts +4 -0
  27. package/dist/subscription_plan.js +40 -0
  28. package/dist/team.d.ts +0 -0
  29. package/dist/team.js +0 -0
  30. package/dist/token.d.ts +0 -0
  31. package/dist/token.js +0 -0
  32. package/dist/types/domain.d.ts +1 -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.d.ts +46 -0
  51. package/dist/types/{project/stage.js → project.js} +0 -0
  52. package/dist/types/subscription.d.ts +1 -1
  53. package/dist/types/subscription_plan.d.ts +15 -0
  54. package/dist/types/subscription_plan.js +2 -0
  55. package/dist/types/team.d.ts +0 -0
  56. package/dist/types/team.js +0 -0
  57. package/dist/types/token.d.ts +0 -0
  58. package/dist/types/token.js +0 -0
  59. package/dist/types/user.d.ts +0 -0
  60. package/dist/types/user.js +0 -0
  61. package/dist/user.d.ts +0 -0
  62. package/dist/user.js +0 -0
  63. package/enum/index.ts +6 -0
  64. package/index.ts +1 -0
  65. package/package.json +2 -2
  66. package/subscription.ts +4 -4
  67. package/types/subscription.ts +1 -1
  68. package/yarn-error.log +10230 -0
  69. package/brimble.json +0 -3
  70. package/dist/project/stage.d.ts +0 -4
  71. package/dist/project/stage.js +0 -20
  72. package/dist/types/project/stage.d.ts +0 -13
File without changes
File without changes
package/dist/user.d.ts CHANGED
File without changes
package/dist/user.js CHANGED
File without changes
package/enum/index.ts CHANGED
@@ -58,6 +58,12 @@ export enum SUBSCRIPTION_STATUS {
58
58
  INACTIVE = "in-active",
59
59
  }
60
60
 
61
+ export enum SUBSCRIPTION_PLAN_TYPE {
62
+ FreePlan = 'FREE_PLAN',
63
+ DeveloperPlan = 'DEVELOPER_PLAN',
64
+ TeamPlan = 'TEAM_PLAN'
65
+ }
66
+
61
67
  export enum OAUTH_PERMISSIONS {
62
68
  READ_USER = "read_user",
63
69
  READ_PROJECT = "read_project",
package/index.ts CHANGED
@@ -43,6 +43,7 @@ export {
43
43
  ENVIRONMENT,
44
44
  SERVER_STATUS,
45
45
  ROLES,
46
+ SUBSCRIPTION_PLAN_TYPE,
46
47
  PROJECT_STATUS,
47
48
  SUBSCRIPTION_STATUS,
48
49
  CARD_TYPES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.5.13",
3
+ "version": "1.5.15",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,5 +21,5 @@
21
21
  "ts-node": "^8.10.2",
22
22
  "typescript": "^4.9.4"
23
23
  },
24
- "gitHead": "9c0c4ea58ebffdeef386658cf892ff8c189a7775"
24
+ "gitHead": "1254377da023e51390074cd8a930b53731679006"
25
25
  }
package/subscription.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { model, Schema } from "mongoose";
2
- import { SUBSCRIPTION_STATUS } from "./enum";
2
+ import {SUBSCRIPTION_PLAN_TYPE, SUBSCRIPTION_STATUS} from "./enum";
3
3
  import { ISubscription } from "./types";
4
4
 
5
5
  const subscriptionPlanSchema: Schema = new Schema(
@@ -14,10 +14,10 @@ const subscriptionPlanSchema: Schema = new Schema(
14
14
  required: true,
15
15
  ref: "User",
16
16
  },
17
- plan_code: {
17
+ plan_type: {
18
18
  type: String,
19
- required: true,
20
- unique: true,
19
+ enum: Object.values(SUBSCRIPTION_PLAN_TYPE),
20
+ default: SUBSCRIPTION_PLAN_TYPE.FreePlan,
21
21
  },
22
22
  status: {
23
23
  type: String,
@@ -4,7 +4,7 @@ import { SUBSCRIPTION_STATUS } from "../enum";
4
4
  export interface ISubscription extends Document {
5
5
  team_id: string;
6
6
  admin_id: string;
7
- plan_code: string;
7
+ plan_type: string;
8
8
  status: SUBSCRIPTION_STATUS;
9
9
  amount: number;
10
10
  transaction_retries: number;