@drax/identity-back 0.17.0 → 0.18.1

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.
@@ -4,6 +4,7 @@ import mongoosePaginate from 'mongoose-paginate-v2';
4
4
  const Schema = mongoose.Schema;
5
5
  const TenantMongoSchema = new Schema({
6
6
  name: { type: String, unique: true, required: true, index: true, },
7
+ custom: { type: Object, unique: false, required: false, index: false, },
7
8
  }, { timestamps: true, toJSON: { virtuals: true }, toObject: { virtuals: true } });
8
9
  TenantMongoSchema.virtual("id").get(function () {
9
10
  return this._id.toString();
@@ -1,4 +1,4 @@
1
- import { object, string, date } from "zod";
1
+ import { object, string, date, record, any } from "zod";
2
2
  const TenantBaseSchema = object({
3
3
  name: string({ required_error: "validation.required" })
4
4
  .min(1, "validation.required")
@@ -7,6 +7,7 @@ const TenantBaseSchema = object({
7
7
  const TenantSchema = TenantBaseSchema.extend({
8
8
  _id: string(),
9
9
  id: string().optional(),
10
+ custom: record(string(), any()).optional(),
10
11
  createdAt: date(),
11
12
  updatedAt: date()
12
13
  });
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.17.0",
6
+ "version": "0.18.1",
7
7
  "description": "Identity module for user management, authentication and authorization.",
8
8
  "main": "dist/index.js",
9
9
  "types": "types/index.d.ts",
@@ -28,11 +28,11 @@
28
28
  "author": "Cristian Incarnato & Drax Team",
29
29
  "license": "ISC",
30
30
  "dependencies": {
31
- "@drax/common-back": "^0.17.0",
32
- "@drax/crud-back": "^0.17.0",
33
- "@drax/crud-share": "^0.17.0",
34
- "@drax/email-back": "^0.17.0",
35
- "@drax/identity-share": "^0.17.0",
31
+ "@drax/common-back": "^0.18.1",
32
+ "@drax/crud-back": "^0.18.1",
33
+ "@drax/crud-share": "^0.18.1",
34
+ "@drax/email-back": "^0.18.1",
35
+ "@drax/identity-share": "^0.18.1",
36
36
  "bcryptjs": "^2.4.3",
37
37
  "graphql": "^16.8.2",
38
38
  "jsonwebtoken": "^9.0.2"
@@ -63,5 +63,5 @@
63
63
  "debug": "0"
64
64
  }
65
65
  },
66
- "gitHead": "b8b41fafbc53b1c37691bf063da2764edfcec907"
66
+ "gitHead": "3821f72f92e7255710f5162cd589e5725c1a7230"
67
67
  }
@@ -8,6 +8,7 @@ import {PaginateModel} from "mongoose";
8
8
 
9
9
  const TenantMongoSchema = new Schema<ITenant>({
10
10
  name: {type: String, unique: true, required: true, index: true,},
11
+ custom: {type: Object, unique: false, required: false, index: false,},
11
12
  }, {timestamps: true, toJSON: { virtuals: true}, toObject: { virtuals: true}});
12
13
 
13
14
 
@@ -1,4 +1,4 @@
1
- import { object, string, date } from "zod"
1
+ import { object, string, date, record, any } from "zod"
2
2
 
3
3
  const TenantBaseSchema = object({
4
4
  name: string({ required_error: "validation.required" })
@@ -10,6 +10,7 @@ const TenantBaseSchema = object({
10
10
  const TenantSchema = TenantBaseSchema.extend({
11
11
  _id: string(),
12
12
  id: string().optional(),
13
+ custom: record(string(), any()).optional(),
13
14
  createdAt: date(),
14
15
  updatedAt: date()
15
16
  });