orbitx-core-models 8.0.3 → 8.0.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.
- package/dist/interfaces/user.interface.d.ts +3 -0
- package/dist/interfaces/user.interface.d.ts.map +1 -1
- package/dist/models/tierConfig.model.d.ts.map +1 -1
- package/dist/models/tierConfig.model.js +0 -2
- package/dist/models/user.model.d.ts.map +1 -1
- package/dist/models/user.model.js +3 -0
- package/dist/models/wallet.model.d.ts.map +1 -1
- package/dist/models/wallet.model.js +0 -2
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { Document, Types } from "mongoose";
|
|
|
2
2
|
export interface IUser extends Document {
|
|
3
3
|
name?: string;
|
|
4
4
|
email?: string;
|
|
5
|
+
username?: string;
|
|
5
6
|
password?: string;
|
|
6
7
|
profile: string;
|
|
7
8
|
role: "user" | "account-manager" | "manager-ops" | "admin" | "agent-chat";
|
|
@@ -10,6 +11,8 @@ export interface IUser extends Document {
|
|
|
10
11
|
ipAddress?: string;
|
|
11
12
|
currentStatus: string;
|
|
12
13
|
lastLogin?: Date;
|
|
14
|
+
lockedOut?: boolean;
|
|
15
|
+
userId?: string;
|
|
13
16
|
compare: (inputPassword: string) => Promise<boolean>;
|
|
14
17
|
}
|
|
15
18
|
//# sourceMappingURL=user.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/user.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,KAAM,SAAQ,QAAQ;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,aAAa,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1E,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,OAAO,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACtD"}
|
|
1
|
+
{"version":3,"file":"user.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/user.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,KAAM,SAAQ,QAAQ;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,aAAa,GAAG,OAAO,GAAG,YAAY,CAAC;IAC1E,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tierConfig.model.d.ts","sourceRoot":"","sources":["../../src/models/tierConfig.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAY,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"tierConfig.model.d.ts","sourceRoot":"","sources":["../../src/models/tierConfig.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAY,MAAM,oCAAoC,CAAC;AA8B3E,eAAO,MAAM,UAAU;;;;OAA8D,CAAC;AACtF,eAAe,UAAU,CAAC"}
|
|
@@ -56,7 +56,5 @@ const tierConfigSchema = new mongoose_1.Schema({
|
|
|
56
56
|
required: true,
|
|
57
57
|
},
|
|
58
58
|
}, { timestamps: false });
|
|
59
|
-
// Indexes
|
|
60
|
-
tierConfigSchema.index({ tier: 1 });
|
|
61
59
|
exports.TierConfig = mongoose_1.default.model("TierConfig", tierConfigSchema);
|
|
62
60
|
exports.default = exports.TierConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AA6CrD,eAAO,MAAM,IAAI;;;;OAA4C,CAAC"}
|
|
@@ -42,6 +42,7 @@ const argon2_1 = __importDefault(require("argon2"));
|
|
|
42
42
|
const userSchema = new mongoose_1.Schema({
|
|
43
43
|
name: String,
|
|
44
44
|
email: String,
|
|
45
|
+
username: String,
|
|
45
46
|
password: { type: String, select: false },
|
|
46
47
|
profile: { type: String, default: "default.jpg" },
|
|
47
48
|
role: {
|
|
@@ -57,6 +58,8 @@ const userSchema = new mongoose_1.Schema({
|
|
|
57
58
|
ipAddress: String,
|
|
58
59
|
currentStatus: { type: String, default: "Offline" },
|
|
59
60
|
lastLogin: Date,
|
|
61
|
+
lockedOut: { type: Boolean },
|
|
62
|
+
userId: { type: String, unique: true },
|
|
60
63
|
});
|
|
61
64
|
// Hash password before saving if modified
|
|
62
65
|
userSchema.pre("save", async function (next) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.model.d.ts","sourceRoot":"","sources":["../../src/models/wallet.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"wallet.model.d.ts","sourceRoot":"","sources":["../../src/models/wallet.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AA0BzD,eAAO,MAAM,MAAM;;;;OAAkD,CAAC;AACtE,eAAe,MAAM,CAAC"}
|