@brimble/models 1.4.50 → 1.4.52

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.
@@ -1 +1,3 @@
1
+ yarn run v1.22.19
1
2
  $ tsc -p .
3
+ Done in 1.59s.
package/CHANGELOG.md CHANGED
@@ -7,10 +7,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
7
7
 
8
8
  **Note:** Version bump only for package @brimble/models
9
9
 
10
-
11
-
12
-
13
-
14
10
  # [1.2.0-alpha.3](https://github.com/brimblehq/brimble/compare/@brimble/models@1.2.0-alpha.2...@brimble/models@1.2.0-alpha.3) (2022-05-05)
15
11
 
16
12
  **Note:** Version bump only for package @brimble/models
@@ -40,6 +40,10 @@ export declare enum PROJECT_STATUS {
40
40
  FAILED = "FAILED",
41
41
  PENDING = "PENDING"
42
42
  }
43
+ export declare enum SUBSCRIPTION_STATUS {
44
+ ACTIVE = "active",
45
+ INACTIVE = "in-active"
46
+ }
43
47
  export declare enum OAUTH_PERMISSIONS {
44
48
  READ_USER = "read_user",
45
49
  READ_PROJECT = "read_project",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OAUTH_PERMISSIONS = exports.PROJECT_STATUS = exports.ROLES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.GIT_TYPE = void 0;
3
+ exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.ROLES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.ENVIRONMENT = exports.GIT_TYPE = void 0;
4
4
  var GIT_TYPE;
5
5
  (function (GIT_TYPE) {
6
6
  GIT_TYPE["GITHUB"] = "GITHUB";
@@ -49,6 +49,11 @@ var PROJECT_STATUS;
49
49
  PROJECT_STATUS["FAILED"] = "FAILED";
50
50
  PROJECT_STATUS["PENDING"] = "PENDING";
51
51
  })(PROJECT_STATUS = exports.PROJECT_STATUS || (exports.PROJECT_STATUS = {}));
52
+ var SUBSCRIPTION_STATUS;
53
+ (function (SUBSCRIPTION_STATUS) {
54
+ SUBSCRIPTION_STATUS["ACTIVE"] = "active";
55
+ SUBSCRIPTION_STATUS["INACTIVE"] = "in-active";
56
+ })(SUBSCRIPTION_STATUS = exports.SUBSCRIPTION_STATUS || (exports.SUBSCRIPTION_STATUS = {}));
52
57
  var OAUTH_PERMISSIONS;
53
58
  (function (OAUTH_PERMISSIONS) {
54
59
  OAUTH_PERMISSIONS["READ_USER"] = "read_user";
package/dist/follower.js CHANGED
@@ -9,7 +9,7 @@ const followingSchema = new mongoose_1.Schema({
9
9
  },
10
10
  followed_id: {
11
11
  type: mongoose_1.Schema.Types.ObjectId,
12
- required: true
12
+ required: true,
13
13
  },
14
14
  }, { timestamps: true });
15
15
  exports.default = (0, mongoose_1.model)("Following", followingSchema);
package/dist/following.js CHANGED
@@ -9,7 +9,7 @@ const followingSchema = new mongoose_1.Schema({
9
9
  },
10
10
  followed_id: {
11
11
  type: mongoose_1.Schema.Types.ObjectId,
12
- required: true
12
+ required: true,
13
13
  },
14
14
  }, { timestamps: true });
15
15
  exports.default = (0, mongoose_1.model)("Following", followingSchema);
package/dist/index.d.ts CHANGED
@@ -8,8 +8,9 @@ export { default as Token } from "./token";
8
8
  export { default as Team } from "./team";
9
9
  export { default as Member } from "./member";
10
10
  export { default as Log } from "./logs";
11
- export { IUser, IGit, IProject, IFollowing, IIntegration, IEnv, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, } from "./types";
12
- export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, ROLES, PROJECT_STATUS, } from "./enum";
11
+ export { default as SubscriptionPlan } from "./subscription_plan";
12
+ export { IUser, IGit, IProject, IFollowing, IIntegration, IEnv, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscriptionPlan } from "./types";
13
+ export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, ROLES, PROJECT_STATUS, SUBSCRIPTION_STATUS } from "./enum";
13
14
  import mongoose from "mongoose";
14
15
  export declare const connectToMongo: (mongoUrl: string, retryCount?: number) => Promise<void>;
15
16
  export declare const db: mongoose.Connection;
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ 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.closeMongo = exports.db = exports.connectToMongo = exports.PROJECT_STATUS = exports.ROLES = exports.ENVIRONMENT = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.GIT_TYPE = exports.Log = exports.Member = exports.Team = exports.Token = exports.Env = exports.Domain = exports.Integration = exports.Following = exports.Project = exports.User = void 0;
15
+ exports.closeMongo = exports.db = exports.connectToMongo = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.ROLES = exports.ENVIRONMENT = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.GIT_TYPE = exports.SubscriptionPlan = exports.Log = exports.Member = exports.Team = exports.Token = exports.Env = exports.Domain = exports.Integration = exports.Following = exports.Project = exports.User = void 0;
16
16
  var user_1 = require("./user");
17
17
  Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
18
18
  var project_1 = require("./project");
@@ -33,6 +33,8 @@ var member_1 = require("./member");
33
33
  Object.defineProperty(exports, "Member", { enumerable: true, get: function () { return __importDefault(member_1).default; } });
34
34
  var logs_1 = require("./logs");
35
35
  Object.defineProperty(exports, "Log", { enumerable: true, get: function () { return __importDefault(logs_1).default; } });
36
+ var subscription_plan_1 = require("./subscription_plan");
37
+ Object.defineProperty(exports, "SubscriptionPlan", { enumerable: true, get: function () { return __importDefault(subscription_plan_1).default; } });
36
38
  var enum_1 = require("./enum");
37
39
  Object.defineProperty(exports, "GIT_TYPE", { enumerable: true, get: function () { return enum_1.GIT_TYPE; } });
38
40
  Object.defineProperty(exports, "INTEGRATION_TYPES", { enumerable: true, get: function () { return enum_1.INTEGRATION_TYPES; } });
@@ -41,6 +43,7 @@ Object.defineProperty(exports, "OAUTH_PERMISSIONS", { enumerable: true, get: fun
41
43
  Object.defineProperty(exports, "ENVIRONMENT", { enumerable: true, get: function () { return enum_1.ENVIRONMENT; } });
42
44
  Object.defineProperty(exports, "ROLES", { enumerable: true, get: function () { return enum_1.ROLES; } });
43
45
  Object.defineProperty(exports, "PROJECT_STATUS", { enumerable: true, get: function () { return enum_1.PROJECT_STATUS; } });
46
+ Object.defineProperty(exports, "SUBSCRIPTION_STATUS", { enumerable: true, get: function () { return enum_1.SUBSCRIPTION_STATUS; } });
44
47
  const mongoose_1 = __importDefault(require("mongoose"));
45
48
  const utils_1 = require("@brimble/utils");
46
49
  // Connection to Mongo
@@ -1,21 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const mongoose_1 = require("mongoose");
4
- const installedIntegrationSchema = new mongoose_1.Schema({
4
+ const installedIntegrationSchema = new mongoose_1.Schema(
5
+ {
5
6
  user_id: {
6
- type: mongoose_1.Schema.Types.ObjectId,
7
- ref: "User",
8
- default: null,
9
- required: false,
7
+ type: mongoose_1.Schema.Types.ObjectId,
8
+ ref: "User",
9
+ default: null,
10
+ required: false,
10
11
  },
11
12
  integration_id: {
12
- type: mongoose_1.Schema.Types.ObjectId,
13
- ref: "Integration",
14
- required: true,
13
+ type: mongoose_1.Schema.Types.ObjectId,
14
+ ref: "Integration",
15
+ required: true,
15
16
  },
16
17
  enabled: {
17
- type: Boolean,
18
- default: true,
18
+ type: Boolean,
19
+ default: true,
19
20
  },
20
- }, { timestamps: true });
21
- exports.default = mongoose_1.model("InstalledIntegration", installedIntegrationSchema);
21
+ },
22
+ { timestamps: true },
23
+ );
24
+ exports.default = mongoose_1.model(
25
+ "InstalledIntegration",
26
+ installedIntegrationSchema,
27
+ );
@@ -7,6 +7,12 @@ const integrationSchema = new mongoose_1.Schema({
7
7
  type: mongoose_1.Schema.Types.ObjectId,
8
8
  ref: "User",
9
9
  default: null,
10
+ required: true,
11
+ },
12
+ team_id: {
13
+ type: mongoose_1.Schema.Types.ObjectId,
14
+ ref: "Team",
15
+ default: null,
10
16
  required: false,
11
17
  },
12
18
  name: {
@@ -0,0 +1,4 @@
1
+ /// <reference types="mongoose" />
2
+ import { ISubscriptionPlan } from "./types/subscription_plan";
3
+ declare const _default: import("mongoose").Model<ISubscriptionPlan, {}, {}>;
4
+ export default _default;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const enum_1 = require("./enum");
5
+ const subscriptionPlanSchema = new mongoose_1.Schema({
6
+ team_id: {
7
+ type: mongoose_1.Schema.Types.ObjectId,
8
+ required: true,
9
+ ref: "Team",
10
+ },
11
+ admin_id: {
12
+ type: mongoose_1.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(enum_1.SUBSCRIPTION_STATUS),
24
+ default: enum_1.SUBSCRIPTION_STATUS.ACTIVE
25
+ },
26
+ specifications: {
27
+ type: Object,
28
+ default: {},
29
+ select: false,
30
+ },
31
+ amount: Number,
32
+ debit_date: String,
33
+ start_date: String,
34
+ reminder_date: String,
35
+ transaction_retries: Number,
36
+ }, {
37
+ timestamps: true,
38
+ collection: "subscription_plans"
39
+ });
40
+ exports.default = (0, mongoose_1.model)("SubscriptionPlan", subscriptionPlanSchema);
package/dist/team.js CHANGED
@@ -25,6 +25,11 @@ const teamSchema = new mongoose_1.Schema({
25
25
  image: {
26
26
  type: String,
27
27
  },
28
+ subscription: {
29
+ type: mongoose_1.Schema.Types.ObjectId,
30
+ required: false,
31
+ ref: "SubscriptionPlan",
32
+ }
28
33
  }, {
29
34
  timestamps: true,
30
35
  });
package/dist/token.js CHANGED
@@ -14,7 +14,7 @@ const tokenSchema = new mongoose_1.Schema({
14
14
  },
15
15
  description: {
16
16
  type: Array,
17
- required: true
17
+ required: true,
18
18
  },
19
19
  image: {
20
20
  type: String,
@@ -30,7 +30,7 @@ const tokenSchema = new mongoose_1.Schema({
30
30
  },
31
31
  permissions: {
32
32
  type: Array,
33
- required: true
34
- }
33
+ required: true,
34
+ },
35
35
  }, { timestamps: true });
36
36
  exports.default = (0, mongoose_1.model)("Token", tokenSchema);
@@ -10,3 +10,4 @@ export { ITeam } from "./team";
10
10
  export { IMember } from "./member";
11
11
  export { IInstalledIntegration } from "./installed_integration";
12
12
  export { ILog } from "./logs";
13
+ export { ISubscriptionPlan } from "./subscription_plan";
@@ -1,7 +1,8 @@
1
1
  import { Document } from "mongoose";
2
2
  import { INTEGRATION_PROVIDERS, INTEGRATION_TYPES } from "../enum";
3
3
  export interface IIntegration extends Document {
4
- user_id: string | null;
4
+ user_id: string;
5
+ team_id?: string;
5
6
  app_id?: string;
6
7
  name: INTEGRATION_PROVIDERS;
7
8
  scope_description?: string[];
@@ -0,0 +1,15 @@
1
+ import { Document } from "mongoose";
2
+ import { SUBSCRIPTION_STATUS } from "../enum";
3
+ export interface ISubscriptionPlan extends Document {
4
+ team_id: string;
5
+ admin_id: string;
6
+ plan_code: string;
7
+ status: SUBSCRIPTION_STATUS;
8
+ amount: number;
9
+ debit_date: string;
10
+ start_date: string;
11
+ reminder_date: string;
12
+ specifications: {
13
+ [key: string]: any;
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,4 +7,5 @@ export interface ITeam extends Document {
7
7
  projects: IProject[];
8
8
  image: string;
9
9
  isCreator: boolean;
10
+ subscription: string;
10
11
  }
package/enum/index.ts CHANGED
@@ -30,7 +30,7 @@ export enum INTEGRATION_PROVIDERS {
30
30
  Contentful = "CONTENTFUL",
31
31
  Novu = "NOVU",
32
32
  Netlify = "NETLIFY",
33
- GoogleAnalytics = "GOOGLE_ANALYTICS"
33
+ GoogleAnalytics = "GOOGLE_ANALYTICS",
34
34
  }
35
35
 
36
36
  export enum ROLES {
@@ -38,7 +38,6 @@ export enum ROLES {
38
38
  MEMBER = "MEMBER",
39
39
  }
40
40
 
41
-
42
41
  export enum PROJECT_STATUS {
43
42
  INACTIVE = "INACTIVE",
44
43
  ACTIVE = "ACTIVE",
@@ -47,8 +46,13 @@ export enum PROJECT_STATUS {
47
46
  PENDING = "PENDING",
48
47
  }
49
48
 
49
+ export enum SUBSCRIPTION_STATUS {
50
+ ACTIVE = "active",
51
+ INACTIVE = "in-active"
52
+ }
53
+
50
54
  export enum OAUTH_PERMISSIONS {
51
55
  READ_USER = "read_user",
52
56
  READ_PROJECT = "read_project",
53
57
  UPDATE_CREDENTIALS = "update_credentials",
54
- }
58
+ }
package/follower.ts CHANGED
@@ -2,18 +2,18 @@ import { model, Schema } from "mongoose";
2
2
  import { IFollowing } from "./types";
3
3
 
4
4
  const followingSchema: Schema = new Schema(
5
- {
6
- user_id: {
7
- type: Schema.Types.ObjectId,
8
- ref: "User",
9
- required: true,
10
- },
11
- followed_id: {
12
- type: Schema.Types.ObjectId,
13
- required: true
14
- },
5
+ {
6
+ user_id: {
7
+ type: Schema.Types.ObjectId,
8
+ ref: "User",
9
+ required: true,
15
10
  },
16
- { timestamps: true }
11
+ followed_id: {
12
+ type: Schema.Types.ObjectId,
13
+ required: true,
14
+ },
15
+ },
16
+ { timestamps: true },
17
17
  );
18
18
 
19
- export default model<IFollowing>("Following", followingSchema);
19
+ export default model<IFollowing>("Following", followingSchema);
package/following.ts CHANGED
@@ -2,18 +2,18 @@ import { model, Schema } from "mongoose";
2
2
  import { IFollowing } from "./types";
3
3
 
4
4
  const followingSchema: Schema = new Schema(
5
- {
6
- user_id: {
7
- type: Schema.Types.ObjectId,
8
- ref: "User",
9
- required: true,
10
- },
11
- followed_id: {
12
- type: Schema.Types.ObjectId,
13
- required: true
14
- },
5
+ {
6
+ user_id: {
7
+ type: Schema.Types.ObjectId,
8
+ ref: "User",
9
+ required: true,
15
10
  },
16
- { timestamps: true }
11
+ followed_id: {
12
+ type: Schema.Types.ObjectId,
13
+ required: true,
14
+ },
15
+ },
16
+ { timestamps: true },
17
17
  );
18
18
 
19
- export default model<IFollowing>("Following", followingSchema);
19
+ export default model<IFollowing>("Following", followingSchema);
package/index.ts CHANGED
@@ -8,6 +8,7 @@ export { default as Token } from "./token";
8
8
  export { default as Team } from "./team";
9
9
  export { default as Member } from "./member";
10
10
  export { default as Log } from "./logs";
11
+ export { default as SubscriptionPlan } from "./subscription_plan";
11
12
  export {
12
13
  IUser,
13
14
  IGit,
@@ -21,6 +22,7 @@ export {
21
22
  ITeam,
22
23
  IInstalledIntegration,
23
24
  ILog,
25
+ ISubscriptionPlan
24
26
  } from "./types";
25
27
  export {
26
28
  GIT_TYPE,
@@ -30,6 +32,7 @@ export {
30
32
  ENVIRONMENT,
31
33
  ROLES,
32
34
  PROJECT_STATUS,
35
+ SUBSCRIPTION_STATUS
33
36
  } from "./enum";
34
37
 
35
38
  import mongoose from "mongoose";
package/integration.ts CHANGED
@@ -8,6 +8,12 @@ const integrationSchema: Schema = new Schema(
8
8
  type: Schema.Types.ObjectId,
9
9
  ref: "User",
10
10
  default: null,
11
+ required: true,
12
+ },
13
+ team_id: {
14
+ type: Schema.Types.ObjectId,
15
+ ref: "Team",
16
+ default: null,
11
17
  required: false,
12
18
  },
13
19
  name: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "1.4.50",
3
+ "version": "1.4.52",
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.4",
12
+ "@brimble/utils": "^1.5.5",
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": "4a200850c883d47e0e86ae66bef87c8d1d79cc75"
24
+ "gitHead": "4414fc4b5d78210887faae562e49f394e5d9d245"
25
25
  }
@@ -0,0 +1,43 @@
1
+ import { model, Schema } from "mongoose";
2
+ import {SUBSCRIPTION_STATUS} from "./enum";
3
+ import {ISubscriptionPlan} from "./types/subscription_plan";
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: false,
30
+ },
31
+ amount: Number,
32
+ debit_date: String,
33
+ start_date: String,
34
+ reminder_date: String,
35
+ transaction_retries: Number,
36
+ },
37
+ {
38
+ timestamps: true,
39
+ collection: "subscription_plans"
40
+ },
41
+ );
42
+
43
+ export default model<ISubscriptionPlan>("SubscriptionPlan", subscriptionPlanSchema);
package/team.ts CHANGED
@@ -26,6 +26,11 @@ const teamSchema: Schema = new Schema(
26
26
  image: {
27
27
  type: String,
28
28
  },
29
+ subscription: {
30
+ type: Schema.Types.ObjectId,
31
+ required: false,
32
+ ref: "SubscriptionPlan",
33
+ }
29
34
  },
30
35
  {
31
36
  timestamps: true,
package/token.ts CHANGED
@@ -15,7 +15,7 @@ const tokenSchema = new Schema(
15
15
  },
16
16
  description: {
17
17
  type: Array,
18
- required: true
18
+ required: true,
19
19
  },
20
20
  image: {
21
21
  type: String,
@@ -31,8 +31,8 @@ const tokenSchema = new Schema(
31
31
  },
32
32
  permissions: {
33
33
  type: Array,
34
- required: true
35
- }
34
+ required: true,
35
+ },
36
36
  },
37
37
  { timestamps: true },
38
38
  );
package/types/domain.ts CHANGED
@@ -12,5 +12,5 @@ export interface IDomain extends Document {
12
12
  cert: string;
13
13
  key: string;
14
14
  expiry: Date;
15
- }
15
+ };
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import { Document } from "mongoose";
2
2
 
3
3
  export interface IFollowing extends Document {
4
- user_id?: string;
5
- followed_id?: string;
4
+ user_id?: string;
5
+ followed_id?: string;
6
6
  }
package/types/index.ts CHANGED
@@ -10,3 +10,4 @@ export { ITeam } from "./team";
10
10
  export { IMember } from "./member";
11
11
  export { IInstalledIntegration } from "./installed_integration";
12
12
  export { ILog } from "./logs";
13
+ export { ISubscriptionPlan } from "./subscription_plan";
@@ -2,7 +2,9 @@ import { Document } from "mongoose";
2
2
  import { INTEGRATION_PROVIDERS, INTEGRATION_TYPES } from "../enum";
3
3
 
4
4
  export interface IIntegration extends Document {
5
- user_id: string | null;
5
+ user_id: string;
6
+
7
+ team_id?: string;
6
8
 
7
9
  app_id?: string;
8
10
 
@@ -0,0 +1,15 @@
1
+ import { Document } from "mongoose";
2
+ import {SUBSCRIPTION_STATUS} from "../enum";
3
+ export interface ISubscriptionPlan extends Document {
4
+ team_id: string;
5
+ admin_id: string;
6
+ plan_code: string;
7
+ status: SUBSCRIPTION_STATUS;
8
+ amount: number;
9
+ debit_date: string;
10
+ start_date: string;
11
+ reminder_date: string;
12
+ specifications: {
13
+ [key: string]: any;
14
+ }
15
+ }
package/types/team.ts CHANGED
@@ -8,4 +8,5 @@ export interface ITeam extends Document {
8
8
  projects: IProject[];
9
9
  image: string;
10
10
  isCreator: boolean;
11
+ subscription: string;
11
12
  }
package/types/token.ts CHANGED
@@ -2,19 +2,19 @@ import { Document } from "mongoose";
2
2
  import { OAUTH_PERMISSIONS } from "../enum";
3
3
 
4
4
  export interface IToken extends Document {
5
- name: string;
5
+ name: string;
6
6
 
7
- apiKey: string | null;
7
+ apiKey: string | null;
8
8
 
9
- description: string[];
9
+ description: string[];
10
10
 
11
- image: string;
11
+ image: string;
12
12
 
13
- installationUrl?: string;
13
+ installationUrl?: string;
14
14
 
15
- redirectUrl?: string | null;
15
+ redirectUrl?: string | null;
16
16
 
17
- encodedToken: string;
17
+ encodedToken: string;
18
18
 
19
- permission: OAUTH_PERMISSIONS[];
19
+ permission: OAUTH_PERMISSIONS[];
20
20
  }