diff --git a/src/expert-blame/expert-blame.service.ts b/src/expert-blame/expert-blame.service.ts index 07377c9..6ddb723 100644 --- a/src/expert-blame/expert-blame.service.ts +++ b/src/expert-blame/expert-blame.service.ts @@ -1871,6 +1871,7 @@ export class ExpertBlameService { link: this.smsOrchestrationService.buildBlamePartyLink( requestIdToken, role, + "v1", ), }); } @@ -2065,6 +2066,7 @@ export class ExpertBlameService { link: this.smsOrchestrationService.buildBlamePartyLink( requestIdToken, linkRole, + "v1", ), }); } diff --git a/src/expert-claim/expert-claim.service.ts b/src/expert-claim/expert-claim.service.ts index 02cf412..01a7db3 100644 --- a/src/expert-claim/expert-claim.service.ts +++ b/src/expert-claim/expert-claim.service.ts @@ -3164,7 +3164,7 @@ export class ExpertClaimService { receptor: ownerPhoneResend, fileKind: "claim", 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", publicId: claim.publicId, expertLastName, - link: this.smsOrchestrationService.buildClaimLink(String(claim._id)), + link: this.smsOrchestrationService.buildClaimLink(String(claim._id), "v1"), }); } diff --git a/src/request-management/request-management.service.ts b/src/request-management/request-management.service.ts index c5c2d03..ecad0b3 100644 --- a/src/request-management/request-management.service.ts +++ b/src/request-management/request-management.service.ts @@ -2319,6 +2319,7 @@ export class RequestManagementService { const url = this.smsOrchestrationService.buildInviteLink( frontendRoute, requestId, + "v1", ); await this.smsOrchestrationService.sendInviteLink( secondPartyPhone, @@ -2372,6 +2373,7 @@ export class RequestManagementService { const url = this.smsOrchestrationService.buildInviteLink( frontendRoute, requestId, + "v1", ); await this.smsOrchestrationService.sendInviteLink( phoneNumber, @@ -3485,6 +3487,7 @@ export class RequestManagementService { const URL = this.smsOrchestrationService.buildInviteLink( frontendRoutes, requestId, + "v1", ); await this.smsOrchestrationService.sendInviteLink( phoneNumber, @@ -4927,6 +4930,7 @@ export class RequestManagementService { const firstLink = this.smsOrchestrationService.buildBlamePartyLink( requestId, "FIRST", + "v2", ); const smsSent = await this.smsOrchestrationService.sendFieldExpertLink({ receptor: phone, @@ -8365,6 +8369,7 @@ export class RequestManagementService { targetPhone === request?.parties[0]?.person.phoneNumber ? "FIRST" : "SECOND", + "v1", ); await this.smsOrchestrationService.sendThirdPartyDamagedPartyClaimLinkNotice( { @@ -10229,7 +10234,7 @@ export class RequestManagementService { req.parties[firstIdx].person.userId = userId; 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({ receptor: phone, type: req.type, diff --git a/src/sms-orchestration/sms-orchestration.service.ts b/src/sms-orchestration/sms-orchestration.service.ts index d727ef7..ae040f6 100644 --- a/src/sms-orchestration/sms-orchestration.service.ts +++ b/src/sms-orchestration/sms-orchestration.service.ts @@ -37,20 +37,25 @@ export class SmsOrchestrationService implements OnModuleInit { ); } - buildInviteLink(frontendRoute: string, requestId: string): string { - return `${process.env.URL}/${process.env.USER_BASE_PATH}/${frontendRoute}?token=${requestId}`; + buildInviteLink( + frontendRoute: string, + requestId: string, + versionPrefix: string, + ): string { + return `${process.env.URL}/${versionPrefix}/${frontendRoute}?token=${requestId}`; } buildBlamePartyLink( requestId: string, partyRole: "FIRST" | "SECOND", + versionPrefix: string, ): string { 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 { - return `${process.env.URL}/${process.env.USER_BASE_PATH}/caseClaim?token=${claimRequestId}`; + buildClaimLink(claimRequestId: string, versionPrefix: string): string { + return `${process.env.URL}/${versionPrefix}/caseClaim?token=${claimRequestId}`; } async sendInviteLink(