fanavaran rate bugs fixed + sms of claimId and claimNo added

This commit is contained in:
2026-08-02 11:33:24 +03:30
parent 86f8b829fd
commit 8f66502c49
10 changed files with 1205 additions and 438 deletions

View File

@@ -55,7 +55,7 @@ export class FanavaranController {
@ApiOperation({
summary: "Preview Fanavaran base claim create payload",
description:
"Builds the GEN.03 third-party-car-financial-claims payload from local claimCases + blameCases without creating a Fanavaran claim.",
"Builds the GEN.03 payload from local claim/blame data. Fanavaran-sourced PolicyId is resolve-once: first call may inquire and caches on the claim; later calls reuse the cache. Auth token is shared until Asia/Tehran midnight. Pass forceRefreshPolicy=true to re-inquire.",
})
@ApiParam({
name: "client",
@@ -71,16 +71,32 @@ export class FanavaranController {
required: false,
description: "When true, returns payload plus mapping debug steps",
})
@ApiQuery({
name: "forceRefreshPolicy",
required: false,
description:
"When true, ignores cached PolicyId and performs a live Fanavaran policy inquiry again",
})
async preview(
@Param("client") client: string,
@Param("claimCaseId") claimCaseId: string,
@Query("debug") debug?: string,
@Query("forceRefreshPolicy") forceRefreshPolicy?: string,
@Query("resolvePolicy") resolvePolicy?: string,
) {
const clientKey = this.parseClientParam(client);
return await this.claimRequestManagementService.previewFanavaranSubmitV2(
claimCaseId,
clientKey,
{ debug: debug === "1" || debug === "true" },
{
debug: debug === "1" || debug === "true",
forceRefreshPolicy:
forceRefreshPolicy === "1" ||
forceRefreshPolicy === "true" ||
resolvePolicy === "1" ||
resolvePolicy === "true",
requirePolicyId: false,
},
);
}