forked from Yara724/api
YARA-1154
This commit is contained in:
@@ -1871,6 +1871,7 @@ export class ExpertBlameService {
|
|||||||
link: this.smsOrchestrationService.buildBlamePartyLink(
|
link: this.smsOrchestrationService.buildBlamePartyLink(
|
||||||
requestIdToken,
|
requestIdToken,
|
||||||
role,
|
role,
|
||||||
|
"v1",
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2065,6 +2066,7 @@ export class ExpertBlameService {
|
|||||||
link: this.smsOrchestrationService.buildBlamePartyLink(
|
link: this.smsOrchestrationService.buildBlamePartyLink(
|
||||||
requestIdToken,
|
requestIdToken,
|
||||||
linkRole,
|
linkRole,
|
||||||
|
"v1",
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3164,7 +3164,7 @@ export class ExpertClaimService {
|
|||||||
receptor: ownerPhoneResend,
|
receptor: ownerPhoneResend,
|
||||||
fileKind: "claim",
|
fileKind: "claim",
|
||||||
publicId: claim.publicId,
|
publicId: claim.publicId,
|
||||||
link: this.smsOrchestrationService.buildClaimLink(String(claim._id)),
|
link: this.smsOrchestrationService.buildClaimLink(String(claim._id), "v1"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3462,7 +3462,7 @@ export class ExpertClaimService {
|
|||||||
fileKind: "claim",
|
fileKind: "claim",
|
||||||
publicId: claim.publicId,
|
publicId: claim.publicId,
|
||||||
expertLastName,
|
expertLastName,
|
||||||
link: this.smsOrchestrationService.buildClaimLink(String(claim._id)),
|
link: this.smsOrchestrationService.buildClaimLink(String(claim._id), "v1"),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2319,6 +2319,7 @@ export class RequestManagementService {
|
|||||||
const url = this.smsOrchestrationService.buildInviteLink(
|
const url = this.smsOrchestrationService.buildInviteLink(
|
||||||
frontendRoute,
|
frontendRoute,
|
||||||
requestId,
|
requestId,
|
||||||
|
"v1",
|
||||||
);
|
);
|
||||||
await this.smsOrchestrationService.sendInviteLink(
|
await this.smsOrchestrationService.sendInviteLink(
|
||||||
secondPartyPhone,
|
secondPartyPhone,
|
||||||
@@ -2372,6 +2373,7 @@ export class RequestManagementService {
|
|||||||
const url = this.smsOrchestrationService.buildInviteLink(
|
const url = this.smsOrchestrationService.buildInviteLink(
|
||||||
frontendRoute,
|
frontendRoute,
|
||||||
requestId,
|
requestId,
|
||||||
|
"v1",
|
||||||
);
|
);
|
||||||
await this.smsOrchestrationService.sendInviteLink(
|
await this.smsOrchestrationService.sendInviteLink(
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
@@ -3485,6 +3487,7 @@ export class RequestManagementService {
|
|||||||
const URL = this.smsOrchestrationService.buildInviteLink(
|
const URL = this.smsOrchestrationService.buildInviteLink(
|
||||||
frontendRoutes,
|
frontendRoutes,
|
||||||
requestId,
|
requestId,
|
||||||
|
"v1",
|
||||||
);
|
);
|
||||||
await this.smsOrchestrationService.sendInviteLink(
|
await this.smsOrchestrationService.sendInviteLink(
|
||||||
phoneNumber,
|
phoneNumber,
|
||||||
@@ -4927,6 +4930,7 @@ export class RequestManagementService {
|
|||||||
const firstLink = this.smsOrchestrationService.buildBlamePartyLink(
|
const firstLink = this.smsOrchestrationService.buildBlamePartyLink(
|
||||||
requestId,
|
requestId,
|
||||||
"FIRST",
|
"FIRST",
|
||||||
|
"v2",
|
||||||
);
|
);
|
||||||
const smsSent = await this.smsOrchestrationService.sendFieldExpertLink({
|
const smsSent = await this.smsOrchestrationService.sendFieldExpertLink({
|
||||||
receptor: phone,
|
receptor: phone,
|
||||||
@@ -8365,6 +8369,7 @@ export class RequestManagementService {
|
|||||||
targetPhone === request?.parties[0]?.person.phoneNumber
|
targetPhone === request?.parties[0]?.person.phoneNumber
|
||||||
? "FIRST"
|
? "FIRST"
|
||||||
: "SECOND",
|
: "SECOND",
|
||||||
|
"v1",
|
||||||
);
|
);
|
||||||
await this.smsOrchestrationService.sendThirdPartyDamagedPartyClaimLinkNotice(
|
await this.smsOrchestrationService.sendThirdPartyDamagedPartyClaimLinkNotice(
|
||||||
{
|
{
|
||||||
@@ -10229,7 +10234,7 @@ export class RequestManagementService {
|
|||||||
req.parties[firstIdx].person.userId = userId;
|
req.parties[firstIdx].person.userId = userId;
|
||||||
|
|
||||||
const expertName = `${agent?.lastName || ""}`.trim() || "اپراتور";
|
const expertName = `${agent?.lastName || ""}`.trim() || "اپراتور";
|
||||||
const firstLink = this.smsOrchestrationService.buildBlamePartyLink(requestId, "FIRST");
|
const firstLink = this.smsOrchestrationService.buildBlamePartyLink(requestId, "FIRST", "v6");
|
||||||
const smsSent = await this.smsOrchestrationService.sendFieldExpertLink({
|
const smsSent = await this.smsOrchestrationService.sendFieldExpertLink({
|
||||||
receptor: phone,
|
receptor: phone,
|
||||||
type: req.type,
|
type: req.type,
|
||||||
|
|||||||
@@ -37,20 +37,25 @@ export class SmsOrchestrationService implements OnModuleInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
buildInviteLink(frontendRoute: string, requestId: string): string {
|
buildInviteLink(
|
||||||
return `${process.env.URL}/${process.env.USER_BASE_PATH}/${frontendRoute}?token=${requestId}`;
|
frontendRoute: string,
|
||||||
|
requestId: string,
|
||||||
|
versionPrefix: string,
|
||||||
|
): string {
|
||||||
|
return `${process.env.URL}/${versionPrefix}/${frontendRoute}?token=${requestId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
buildBlamePartyLink(
|
buildBlamePartyLink(
|
||||||
requestId: string,
|
requestId: string,
|
||||||
partyRole: "FIRST" | "SECOND",
|
partyRole: "FIRST" | "SECOND",
|
||||||
|
versionPrefix: string,
|
||||||
): string {
|
): string {
|
||||||
const route = partyRole === "SECOND" ? "user2" : "user";
|
const route = partyRole === "SECOND" ? "user2" : "user";
|
||||||
return `${process.env.URL}/${process.env.USER_BASE_PATH}/${route}?token=${requestId}`;
|
return `${process.env.URL}/${versionPrefix}/${route}?token=${requestId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
buildClaimLink(claimRequestId: string): string {
|
buildClaimLink(claimRequestId: string, versionPrefix: string): string {
|
||||||
return `${process.env.URL}/${process.env.USER_BASE_PATH}/caseClaim?token=${claimRequestId}`;
|
return `${process.env.URL}/${versionPrefix}/caseClaim?token=${claimRequestId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async sendInviteLink(
|
async sendInviteLink(
|
||||||
|
|||||||
Reference in New Issue
Block a user