build: rebuild API release bundle for the one-mobile-one-person check

Rebuilds apps/api/release so the deployed image carries 5f3b004. The vendored
Prisma client changes are only its recorded build paths. No source change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mahmood
2026-10-27 14:26:16 +03:30
co-authored by Claude Sonnet 5.5
parent 5f3b00497e
commit bc881a0a8a
3 changed files with 61 additions and 9 deletions
+53 -3
View File
@@ -88714,6 +88714,39 @@ var require_brand = __commonJS({
} }
}); });
// dist/common/mobile-owner.js
var require_mobile_owner = __commonJS({
"dist/common/mobile-owner.js"(exports2) {
"use strict";
Object.defineProperty(exports2, "__esModule", { value: true });
exports2.CUSTOMER_HOLDS_MOBILE = exports2.EXPERT_HOLDS_MOBILE = void 0;
exports2.activeExpertHoldsMobile = activeExpertHoldsMobile;
exports2.customerHoldsMobile = customerHoldsMobile;
var client_1 = require("@prisma/client");
exports2.EXPERT_HOLDS_MOBILE = "\u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u0628\u0631\u0627\u06CC \u06CC\u06A9 \u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634 \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A";
exports2.CUSTOMER_HOLDS_MOBILE = "\u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u0628\u0631\u0627\u06CC \u06CC\u06A9 \u0645\u0634\u062A\u0631\u06CC \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A";
async function activeExpertHoldsMobile(db, mobile, exceptTradingCustomerId) {
const row = await db.adminUser.findFirst({
where: {
mobile,
role: client_1.AdminRole.SALES_EXPERT,
isActive: true,
...exceptTradingCustomerId ? { NOT: { salesExpertProfile: { is: { tradingCustomerId: exceptTradingCustomerId } } } } : {}
},
select: { id: true }
});
return row !== null;
}
async function customerHoldsMobile(db, mobile, exceptCustomerId) {
const row = await db.customer.findFirst({
where: { mobile, ...exceptCustomerId ? { id: { not: exceptCustomerId } } : {} },
select: { id: true }
});
return row !== null;
}
}
});
// dist/modules/customer-auth/customer-auth.service.js // dist/modules/customer-auth/customer-auth.service.js
var require_customer_auth_service = __commonJS({ var require_customer_auth_service = __commonJS({
"dist/modules/customer-auth/customer-auth.service.js"(exports2) { "dist/modules/customer-auth/customer-auth.service.js"(exports2) {
@@ -88785,6 +88818,7 @@ var require_customer_auth_service = __commonJS({
var digits_1 = require_digits(); var digits_1 = require_digits();
var sms_service_12 = require_sms_service(); var sms_service_12 = require_sms_service();
var brand_1 = require_brand(); var brand_1 = require_brand();
var mobile_owner_1 = require_mobile_owner();
var TooManyRequestsException = class extends common_12.HttpException { var TooManyRequestsException = class extends common_12.HttpException {
constructor(message) { constructor(message) {
super(message, common_12.HttpStatus.TOO_MANY_REQUESTS); super(message, common_12.HttpStatus.TOO_MANY_REQUESTS);
@@ -88924,7 +88958,7 @@ var require_customer_auth_service = __commonJS({
const fname = dto.fname.trim(); const fname = dto.fname.trim();
const lname = dto.lname.trim(); const lname = dto.lname.trim();
const existing = await this.prisma.customer.findUnique({ where: { mobile }, select: { id: true } }); const existing = await this.prisma.customer.findUnique({ where: { mobile }, select: { id: true } });
if (existing) { if (existing || await (0, mobile_owner_1.activeExpertHoldsMobile)(this.prisma, mobile)) {
throw new common_12.ConflictException("\u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A. \u0627\u0632 \u0628\u062E\u0634 \u0648\u0631\u0648\u062F \u0648\u0627\u0631\u062F \u0634\u0648\u06CC\u062F."); throw new common_12.ConflictException("\u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A. \u0627\u0632 \u0628\u062E\u0634 \u0648\u0631\u0648\u062F \u0648\u0627\u0631\u062F \u0634\u0648\u06CC\u062F.");
} }
try { try {
@@ -96979,6 +97013,7 @@ var require_admin_customers_service = __commonJS({
var accounting_hooks_service_1 = require_accounting_hooks_service(); var accounting_hooks_service_1 = require_accounting_hooks_service();
var accounting_config_service_1 = require_accounting_config_service(); var accounting_config_service_1 = require_accounting_config_service();
var brand_1 = require_brand(); var brand_1 = require_brand();
var mobile_owner_1 = require_mobile_owner();
exports2.CUSTOMER_TYPE_STR = { exports2.CUSTOMER_TYPE_STR = {
SALES_AGENT: " \u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634", SALES_AGENT: " \u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634",
// legacy value only — see CustomerKind's schema comment // legacy value only — see CustomerKind's schema comment
@@ -97629,6 +97664,9 @@ var require_admin_customers_service = __commonJS({
if (!fullName || !mobile) { if (!fullName || !mobile) {
throw new common_12.BadRequestException("\u0646\u0627\u0645 \u0648 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); throw new common_12.BadRequestException("\u0646\u0627\u0645 \u0648 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A");
} }
if (await (0, mobile_owner_1.activeExpertHoldsMobile)(this.prisma, mobile)) {
throw new common_12.BadRequestException(mobile_owner_1.EXPERT_HOLDS_MOBILE);
}
if (data.percent === void 0 || data.percent === null || data.percent === "") { if (data.percent === void 0 || data.percent === null || data.percent === "") {
throw new common_12.BadRequestException("\u0648\u0627\u0631\u062F \u06A9\u0631\u062F\u0646 percent \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); throw new common_12.BadRequestException("\u0648\u0627\u0631\u062F \u06A9\u0631\u062F\u0646 percent \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A");
} }
@@ -97696,8 +97734,13 @@ var require_admin_customers_service = __commonJS({
if (data.percent !== void 0 && data.percent !== null && data.percent !== "") { if (data.percent !== void 0 && data.percent !== null && data.percent !== "") {
patch.makingChargeOffsetPercent = new client_1.Prisma.Decimal(String(data.percent)); patch.makingChargeOffsetPercent = new client_1.Prisma.Decimal(String(data.percent));
} }
if (data.mobile !== void 0) if (data.mobile !== void 0) {
patch.mobile = (0, digits_1.faToEn)(String(data.mobile)); const mobile = (0, digits_1.faToEn)(String(data.mobile));
patch.mobile = mobile;
if (mobile !== existing.mobile && await (0, mobile_owner_1.activeExpertHoldsMobile)(this.prisma, mobile, id)) {
throw new common_12.BadRequestException(mobile_owner_1.EXPERT_HOLDS_MOBILE);
}
}
if (data.national_code !== void 0) if (data.national_code !== void 0)
patch.nationalCode = nationalCodeOrNull(data.national_code); patch.nationalCode = nationalCodeOrNull(data.national_code);
if (data.city_id !== void 0) { if (data.city_id !== void 0) {
@@ -101292,6 +101335,7 @@ var require_admin_users_service = __commonJS({
var digits_1 = require_digits(); var digits_1 = require_digits();
var acl_constants_1 = require_acl_constants(); var acl_constants_1 = require_acl_constants();
var super_admin_1 = require_super_admin(); var super_admin_1 = require_super_admin();
var mobile_owner_1 = require_mobile_owner();
var STORABLE_RIDS = new Set(acl_constants_1.ALL_RIDS.flatMap((rid) => rid.split(".").map((_2, i, parts) => parts.slice(0, i + 1).join(".")))); var STORABLE_RIDS = new Set(acl_constants_1.ALL_RIDS.flatMap((rid) => rid.split(".").map((_2, i, parts) => parts.slice(0, i + 1).join("."))));
var AdminUsersService = class AdminUsersService { var AdminUsersService = class AdminUsersService {
static { static {
@@ -101489,6 +101533,9 @@ var require_admin_users_service = __commonJS({
const existing = await this.prisma.adminUser.findUnique({ where: { mobile } }); const existing = await this.prisma.adminUser.findUnique({ where: { mobile } });
if (existing) if (existing)
throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A"); throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A");
if (await (0, mobile_owner_1.customerHoldsMobile)(this.prisma, mobile)) {
throw new common_12.BadRequestException(mobile_owner_1.CUSTOMER_HOLDS_MOBILE);
}
return this.prisma.adminUser.create({ return this.prisma.adminUser.create({
data: { data: {
fullName, fullName,
@@ -101610,6 +101657,9 @@ var require_admin_users_service = __commonJS({
const clash = await this.prisma.adminUser.findUnique({ where: { mobile } }); const clash = await this.prisma.adminUser.findUnique({ where: { mobile } });
if (clash) if (clash)
throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A"); throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A");
if (await (0, mobile_owner_1.customerHoldsMobile)(this.prisma, mobile, existing.salesExpertProfile?.tradingCustomerId)) {
throw new common_12.BadRequestException(mobile_owner_1.CUSTOMER_HOLDS_MOBILE);
}
} }
patch.mobile = mobile; patch.mobile = mobile;
} }
+4 -3
View File
@@ -819,7 +819,7 @@ const config = {
"value": "prisma-client-js" "value": "prisma-client-js"
}, },
"output": { "output": {
"value": "E:\\tehran_taj-wt\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", "value": "E:\\tehran_taj\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client",
"fromEnvVar": null "fromEnvVar": null
}, },
"config": { "config": {
@@ -837,10 +837,11 @@ const config = {
} }
], ],
"previewFeatures": [], "previewFeatures": [],
"sourceFilePath": "E:\\tehran_taj-wt\\apps\\api\\prisma\\schema.prisma" "sourceFilePath": "E:\\tehran_taj\\apps\\api\\prisma\\schema.prisma"
}, },
"relativeEnvPaths": { "relativeEnvPaths": {
"rootEnvPath": null "rootEnvPath": null,
"schemaEnvPath": "../../../../../../apps/api/.env"
}, },
"relativePath": "../../../../../../apps/api/prisma", "relativePath": "../../../../../../apps/api/prisma",
"clientVersion": "5.22.0", "clientVersion": "5.22.0",
+4 -3
View File
@@ -820,7 +820,7 @@ const config = {
"value": "prisma-client-js" "value": "prisma-client-js"
}, },
"output": { "output": {
"value": "E:\\tehran_taj-wt\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", "value": "E:\\tehran_taj\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client",
"fromEnvVar": null "fromEnvVar": null
}, },
"config": { "config": {
@@ -838,10 +838,11 @@ const config = {
} }
], ],
"previewFeatures": [], "previewFeatures": [],
"sourceFilePath": "E:\\tehran_taj-wt\\apps\\api\\prisma\\schema.prisma" "sourceFilePath": "E:\\tehran_taj\\apps\\api\\prisma\\schema.prisma"
}, },
"relativeEnvPaths": { "relativeEnvPaths": {
"rootEnvPath": null "rootEnvPath": null,
"schemaEnvPath": "../../../../../../apps/api/.env"
}, },
"relativePath": "../../../../../../apps/api/prisma", "relativePath": "../../../../../../apps/api/prisma",
"clientVersion": "5.22.0", "clientVersion": "5.22.0",