forked from Yara724/api
Added SMS for Link flow of FIELD-EXPERT: YARA-802
This commit is contained in:
@@ -35,6 +35,7 @@ import { ExpertUploadPartySignatureDto } from "./dto/expert-upload-party-signatu
|
||||
import { VerifyPartyOtpsDto } from "./dto/verify-party-otps.dto";
|
||||
import { SendPartyOtpsDto } from "./dto/send-party-otps.dto";
|
||||
import { ExpertCompleteLocationV2Dto } from "./dto/expert-complete-location.v2.dto";
|
||||
import { SendExpertInitiatedLinkV2Dto } from "./dto/send-expert-initiated-link.v2.dto";
|
||||
import { ClaimRequestManagementService } from "src/claim-request-management/claim-request-management.service";
|
||||
import { PartyRole } from "./entities/schema/partyRole.enum";
|
||||
|
||||
@@ -156,12 +157,13 @@ export class ExpertInitiatedV2Controller {
|
||||
@ApiOperation({
|
||||
summary: "[V2] Send blame link to party/parties (LINK)",
|
||||
description:
|
||||
"For expert-initiated LINK files only. Sends the blame link to the first party (and second party for THIRD_PARTY). SMS delivery is mocked for now; first party opens the link and fills the form via the normal flow. Call after create when creationMethod is LINK.",
|
||||
"For expert-initiated LINK files only. Sends SMS with template `yara-field-expert-link` to first party (and second party for THIRD_PARTY). Tokens: token=#1(بدنه/ثالث), token2=#2(expert name), token3=#3(invite link built exactly like add-second-party flow: `${URL}/{frontendRoute}?token={requestId}`).",
|
||||
})
|
||||
@ApiParam({ name: "requestId", description: "Blame request ID" })
|
||||
@ApiBody({ type: SendExpertInitiatedLinkV2Dto })
|
||||
@ApiResponse({
|
||||
status: 200,
|
||||
description: "Link sent (mocked); recipients can open the link to fill the form",
|
||||
description: "Link sent; recipients can open and fill via normal user flow",
|
||||
schema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
@@ -174,6 +176,7 @@ export class ExpertInitiatedV2Controller {
|
||||
properties: {
|
||||
role: { type: "string", enum: ["FIRST", "SECOND"] },
|
||||
phoneNumber: { type: "string" },
|
||||
smsSent: { type: "boolean" },
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -183,8 +186,9 @@ export class ExpertInitiatedV2Controller {
|
||||
async sendLinkV2(
|
||||
@CurrentUser() expert: any,
|
||||
@Param("requestId") requestId: string,
|
||||
@Body() dto: SendExpertInitiatedLinkV2Dto,
|
||||
) {
|
||||
return this.requestManagementService.sendLinkV2(expert, requestId);
|
||||
return this.requestManagementService.sendLinkV2(expert, requestId, dto);
|
||||
}
|
||||
|
||||
@Post("send-party-otps/:requestId")
|
||||
|
||||
Reference in New Issue
Block a user