my-typescript-library-rahul52us 2.1.2 → 2.1.4

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.
@@ -26,13 +26,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const mongoose_1 = __importStar(require("mongoose"));
27
27
  ;
28
28
  const TokensSchema = new mongoose_1.default.Schema({
29
- userId: {
29
+ user_id: {
30
30
  type: mongoose_1.Schema.Types.ObjectId,
31
31
  required: true
32
32
  },
33
33
  type: {
34
34
  type: String
35
35
  },
36
+ company: {
37
+ type: mongoose_1.Schema.Types.ObjectId
38
+ },
36
39
  created_at: {
37
40
  type: Date,
38
41
  default: Date.now
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.schema.js","sourceRoot":"","sources":["../../../src/repository/schemas/tokens.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAsD;AAMrD,CAAC;AAEF,MAAM,YAAY,GAAW,IAAI,kBAAQ,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE;QACJ,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,QAAQ;QAC3B,QAAQ,EAAE,IAAI;KACjB;IACD,IAAI,EAAE;QACF,IAAI,EAAE,MAAM;KACf;IACD,UAAU,EAAC;QACP,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI,CAAC,GAAG;KACpB;CAEJ,CAAC,CAAA;AAEF,wDAAwD;AACxD,IAAI,UAAU,GAAS,IAAI,CAAC;AAE5B,IAAI,kBAAQ,CAAC,MAAM,CAAC,KAAK,EAAE;IACzB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAC3C,UAAU,GAAG,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;CACpC;KAAM;IACL,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAC9C,UAAU,GAAG,kBAAQ,CAAC,KAAK,CAAW,OAAO,EAAE,YAAY,CAAC,CAAC;CAC9D;AAED,kBAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"tokens.schema.js","sourceRoot":"","sources":["../../../src/repository/schemas/tokens.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAsD;AAOrD,CAAC;AAEF,MAAM,YAAY,GAAW,IAAI,kBAAQ,CAAC,MAAM,CAAC;IAC7C,OAAO,EAAE;QACL,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,QAAQ;QAC3B,QAAQ,EAAE,IAAI;KACjB;IACD,IAAI,EAAE;QACF,IAAI,EAAE,MAAM;KACf;IACD,OAAO,EAAG;QACN,IAAI,EAAE,iBAAM,CAAC,KAAK,CAAC,QAAQ;KAC9B;IACD,UAAU,EAAC;QACP,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,IAAI,CAAC,GAAG;KACpB;CAEJ,CAAC,CAAA;AAEF,wDAAwD;AACxD,IAAI,UAAU,GAAS,IAAI,CAAC;AAE5B,IAAI,kBAAQ,CAAC,MAAM,CAAC,KAAK,EAAE;IACzB,OAAO,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;IAC3C,UAAU,GAAG,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;CACpC;KAAM;IACL,OAAO,CAAC,GAAG,CAAC,gCAAgC,CAAC,CAAC;IAC9C,UAAU,GAAG,kBAAQ,CAAC,KAAK,CAAW,OAAO,EAAE,YAAY,CAAC,CAAC;CAC9D;AAED,kBAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "my-typescript-library-rahul52us",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "A reusable TypeScript utility library.",
5
5
  "main": "dist/server.js",
6
6
  "types": "dist/types/server.d.ts",
@@ -1,19 +1,23 @@
1
1
  import mongoose, { Schema, Document } from "mongoose";
2
2
 
3
3
  interface ISession extends Document {
4
- userId: Schema.Types.ObjectId;
4
+ user_id: Schema.Types.ObjectId;
5
5
  type: string;
6
6
  created_at: Date;
7
+ company:Schema.Types.ObjectId;
7
8
  };
8
9
 
9
10
  const TokensSchema: Schema = new mongoose.Schema({
10
- userId: {
11
+ user_id: {
11
12
  type: Schema.Types.ObjectId,
12
13
  required: true
13
14
  },
14
15
  type: {
15
16
  type: String
16
17
  },
18
+ company : {
19
+ type: Schema.Types.ObjectId
20
+ },
17
21
  created_at:{
18
22
  type: Date,
19
23
  default: Date.now