orbitx-core-models 11.50.0 → 11.52.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/models/agent.model.d.ts.map +1 -1
- package/dist/models/agent.model.js +2 -3
- package/dist/models/chat.model.d.ts.map +1 -1
- package/dist/models/chat.model.js +0 -1
- package/dist/models/lead.model.d.ts.map +1 -1
- package/dist/models/lead.model.js +1 -2
- package/dist/models/user.model.d.ts.map +1 -1
- package/dist/models/user.model.js +2 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.model.d.ts","sourceRoot":"","sources":["../../src/models/agent.model.ts"],"names":[],"mappings":"AAEA,OAAiB,EAAU,KAAK,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.model.d.ts","sourceRoot":"","sources":["../../src/models/agent.model.ts"],"names":[],"mappings":"AAEA,OAAiB,EAAU,KAAK,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAgHrD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,MAAM,CAAgD,CAAC;AACjF,eAAe,KAAK,CAAC"}
|
|
@@ -119,15 +119,14 @@ const agentSchema = new mongoose_1.Schema({
|
|
|
119
119
|
}, {
|
|
120
120
|
timestamps: true,
|
|
121
121
|
});
|
|
122
|
-
agentSchema.pre("save", async function (
|
|
122
|
+
agentSchema.pre("save", async function () {
|
|
123
123
|
if (!this.isModified("password") || !this.password)
|
|
124
|
-
return
|
|
124
|
+
return;
|
|
125
125
|
this.password = await argon2_1.default.hash(this.password, {
|
|
126
126
|
type: argon2_1.default.argon2id,
|
|
127
127
|
timeCost: 3,
|
|
128
128
|
memoryCost: 2 ** 16,
|
|
129
129
|
});
|
|
130
|
-
next();
|
|
131
130
|
});
|
|
132
131
|
agentSchema.methods.comparePassword = async function (input) {
|
|
133
132
|
if (!this.password)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.model.d.ts","sourceRoot":"","sources":["../../src/models/chat.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"chat.model.d.ts","sourceRoot":"","sources":["../../src/models/chat.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAqNrD,eAAO,MAAM,IAAI;;;;OAA4C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lead.model.d.ts","sourceRoot":"","sources":["../../src/models/lead.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAa,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"lead.model.d.ts","sourceRoot":"","sources":["../../src/models/lead.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAa,MAAM,8BAA8B,CAAC;AA0LhE,eAAO,MAAM,IAAI;;;;OAA4C,CAAC;AAC9D,eAAe,IAAI,CAAC"}
|
|
@@ -168,7 +168,7 @@ const leadSchema = new mongoose_1.Schema({
|
|
|
168
168
|
// ─────────────────────────────────────────────
|
|
169
169
|
// STRICT FLAG VALIDATION (CRITICAL)
|
|
170
170
|
// ─────────────────────────────────────────────
|
|
171
|
-
leadSchema.pre("save", function (
|
|
171
|
+
leadSchema.pre("save", function () {
|
|
172
172
|
var _a, _b;
|
|
173
173
|
if (this.isFlagged) {
|
|
174
174
|
const hasEmail = !!((_a = this.data) === null || _a === void 0 ? void 0 : _a.email);
|
|
@@ -180,7 +180,6 @@ leadSchema.pre("save", function (next) {
|
|
|
180
180
|
this.flaggedAt = undefined;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
next();
|
|
184
183
|
});
|
|
185
184
|
// ─────────────────────────────────────────────
|
|
186
185
|
// INDEXES
|
|
@@ -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;AA0IrD,eAAO,MAAM,IAAI;;;;OAA4C,CAAC"}
|
|
@@ -129,15 +129,14 @@ const userSchema = new mongoose_1.Schema({
|
|
|
129
129
|
// ─────────────────────────────────────────────
|
|
130
130
|
// PASSWORD HASH
|
|
131
131
|
// ─────────────────────────────────────────────
|
|
132
|
-
userSchema.pre("save", async function (
|
|
132
|
+
userSchema.pre("save", async function () {
|
|
133
133
|
if (!this.isModified("password") || !this.password)
|
|
134
|
-
return
|
|
134
|
+
return;
|
|
135
135
|
this.password = await argon2_1.default.hash(this.password, {
|
|
136
136
|
type: argon2_1.default.argon2id,
|
|
137
137
|
timeCost: 3,
|
|
138
138
|
memoryCost: 2 ** 16,
|
|
139
139
|
});
|
|
140
|
-
next();
|
|
141
140
|
});
|
|
142
141
|
// ─────────────────────────────────────────────
|
|
143
142
|
// PASSWORD COMPARE (FIXED)
|