@olasphe/mongo 1.0.0 → 1.1.0

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/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IUserRepository, ISessionRepository, User, Session } from '@olasubomimk/core';
1
+ import { IUserRepository, ISessionRepository, User, Session } from '@olasphe/core';
2
2
  export declare class MongoUserRepository implements IUserRepository {
3
3
  create(data: Omit<User, 'id' | 'createdAt' | 'updatedAt'>): Promise<User>;
4
4
  findByEmail(email: string): Promise<User | null>;
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ const UserSchema = new mongoose_1.Schema({
41
41
  isVerified: { type: Boolean, default: false },
42
42
  verificationToken: { type: String },
43
43
  verificationExpires: { type: Date },
44
+ role: { type: String, enum: ['superadmin', 'admin', 'user'], default: 'user' },
44
45
  createdAt: { type: Date, default: Date.now },
45
46
  updatedAt: { type: Date, default: Date.now }
46
47
  });
@@ -75,6 +76,7 @@ class MongoUserRepository {
75
76
  isVerified: doc.isVerified,
76
77
  verificationToken: doc.verificationToken,
77
78
  verificationExpires: doc.verificationExpires,
79
+ role: doc.role,
78
80
  createdAt: doc.createdAt,
79
81
  updatedAt: doc.updatedAt
80
82
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olasphe/mongo",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Auth SDK User <user@example.com>",
@@ -19,7 +19,7 @@
19
19
  "build": "tsc"
20
20
  },
21
21
  "dependencies": {
22
- "@olasphe/core": "*",
22
+ "@olasphe/core": "^1.1.0",
23
23
  "mongoose": "^8.0.0"
24
24
  },
25
25
  "devDependencies": {