@brimble/models 2.3.1 → 2.3.3

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.
package/dist/license.js CHANGED
@@ -17,6 +17,7 @@ const licenseSchema = new mongoose_1.Schema({
17
17
  required: true,
18
18
  unique: true
19
19
  },
20
+ infisicalIdentity: String,
20
21
  userId: {
21
22
  type: mongoose_1.Schema.Types.ObjectId,
22
23
  ref: 'User',
@@ -59,8 +60,8 @@ const licenseSchema = new mongoose_1.Schema({
59
60
  default: 1
60
61
  }
61
62
  }, { timestamps: true });
62
- licenseSchema.index({ userId: 1, status: 1 });
63
- licenseSchema.index({ licenseKey: 1 });
63
+ // licenseSchema.index({ userId: 1, status: 1 });
64
+ // licenseSchema.index({ licenseKey: 1 });
64
65
  licenseSchema.methods.cleanupInactiveDevices = function () {
65
66
  return __awaiter(this, void 0, void 0, function* () {
66
67
  const thirtyDaysAgo = new Date();
@@ -2,6 +2,7 @@ import mongoose, { Document } from "mongoose";
2
2
  import { LicenseStatus } from "../enum";
3
3
  export interface ILicense extends Document {
4
4
  licenseKey: string;
5
+ infisicalIdentity: string;
5
6
  userId: mongoose.Types.ObjectId;
6
7
  teamId: mongoose.Types.ObjectId;
7
8
  status: LicenseStatus;
package/license.ts CHANGED
@@ -8,6 +8,7 @@ const licenseSchema: Schema = new Schema({
8
8
  required: true,
9
9
  unique: true
10
10
  },
11
+ infisicalIdentity: String,
11
12
  userId: {
12
13
  type: Schema.Types.ObjectId,
13
14
  ref: 'User',
@@ -51,8 +52,8 @@ const licenseSchema: Schema = new Schema({
51
52
  }
52
53
  }, { timestamps: true });
53
54
 
54
- licenseSchema.index({ userId: 1, status: 1 });
55
- licenseSchema.index({ licenseKey: 1 });
55
+ // licenseSchema.index({ userId: 1, status: 1 });
56
+ // licenseSchema.index({ licenseKey: 1 });
56
57
 
57
58
  licenseSchema.methods.cleanupInactiveDevices = async function() {
58
59
  const thirtyDaysAgo = new Date();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brimble/models",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "description": "Brimble models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/types/license.ts CHANGED
@@ -3,6 +3,7 @@ import { LicenseStatus } from "../enum";
3
3
 
4
4
  export interface ILicense extends Document {
5
5
  licenseKey: string;
6
+ infisicalIdentity: string;
6
7
  userId: mongoose.Types.ObjectId;
7
8
  teamId: mongoose.Types.ObjectId;
8
9
  status: LicenseStatus;