forked from Yara724/api
feat: support Fanavaran car-body flow in UI
This commit is contained in:
@@ -23,7 +23,7 @@ source: fanavaran-module-docs
|
||||
|
||||
| # | Document | Covers |
|
||||
|---|----------|--------|
|
||||
| 1 | [01-write-apis.md](./01-write-apis.md) | Auth + GEN.03 / GEN.12 / GEN.07 / GEN.08 write APIs |
|
||||
| 1 | [01-write-apis.md](./01-write-apis.md) | Auth + GEN.03 / GEN.12 / GEN.44 / GEN.07 / GEN.08 write APIs |
|
||||
| 2 | [02-read-apis-lookups.md](./02-read-apis-lookups.md) | Policy inquiry, driver inquiry, lookups |
|
||||
| 3 | [03-constants.md](./03-constants.md) | Shared vs tenant constants |
|
||||
| 4 | [04-tenant-matrix.md](./04-tenant-matrix.md) | Shared ✅ / tenant-specific ✅ matrix |
|
||||
@@ -34,6 +34,10 @@ source: fanavaran-module-docs
|
||||
| 9 | [09-error-handling.md](./09-error-handling.md) | Errors, retry, backoff, logging |
|
||||
| 10 | [10-testing.md](./10-testing.md) | Test scenarios, **manual flow-test script**, proven case |
|
||||
| 11 | [11-onboard-new-client.md](./11-onboard-new-client.md) | Checklist to add a new insurer |
|
||||
| — | [car-body-curl-flow.md](./car-body-curl-flow.md) | **Car-body (بدنه)** manual curl: auth + stages 1, 3, 4 (no dmg-cases) |
|
||||
| — | [third-party-stage-fields.md](./third-party-stage-fields.md) | ثالث: each stage body, null vs required, lookup/inquiry vs user |
|
||||
| — | [car-body-stage-fields.md](./car-body-stage-fields.md) | بدنه: each stage body, null vs required, lookup/inquiry vs user |
|
||||
| — | [flow-design-user-vs-inquiry.md](./flow-design-user-vs-inquiry.md) | Proposed intake: user vs inquiry, Persian titles + types |
|
||||
|
||||
## Related sources (code)
|
||||
|
||||
@@ -75,8 +79,9 @@ Fanavaran API Manager
|
||||
|-------|---------------|------------------|
|
||||
| Auth | EITAuthentication | token cache (`fanavaranAuthTokens`) |
|
||||
| Policy inquiry | inquiry-my-policies | `fanavaranSync.baseClaim.policyId` |
|
||||
| Other people | GEN.44 | `driverId` / `otherPersonId` when inquiry misses |
|
||||
| Base claim | GEN.03 | `claimId`, `claimNo` |
|
||||
| Damage case | GEN.12 | `dmgCaseId`, `driverId`, … |
|
||||
| Damage case | GEN.12 | `dmgCaseId`, `driverId`, `otherPersonId`, … |
|
||||
| Attachments | GEN.07 | `fanavaranSync.attachments.files[]` |
|
||||
| Expertise | GEN.08 | `expertiseId` |
|
||||
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
Snapshot of **what `ClaimRequestManagementService` actually sends** for `THIRD_PARTY` as of this version.
|
||||
|
||||
TejaratNo additionally sends expert-reviewed `NotifierTypeId` and `NotifierRelationId` on the base claim, using the tenant-supplied codebooks. Both are required before initial submission; see [expert field review](../fanavaran-stage-field-review.md#tejaratno-notifier-review). Other tenants' bodies are unchanged.
|
||||
|
||||
|
||||
Experts can now override address, city, report type, damage history and inspection place before their sending stage. See [expert field review](../fanavaran-stage-field-review.md); defaults below remain fallbacks for unreviewed records.
|
||||
|
||||
- Base: `POST /car/third-party-car-financial-claims` (GEN.03)
|
||||
- Damage case: `POST …/{claimId}/dmg-cases` (GEN.12)
|
||||
- Attachments: `POST …/{claimId}/files` (GEN.07, multipart)
|
||||
@@ -43,12 +38,12 @@ Parsian tenant defaults used below: `ClaimExpertId=154`, `ExpertiseClaimExpertId
|
||||
| AnnouncementDate | تاریخ اعلام | string Jalali | **no** | **derived** = AccidentDate | |
|
||||
| DocReceivedDate | تاریخ وصول مدارک | string Jalali | **no** | **derived** = AccidentDate | Third-party only (not on hull whitelist) |
|
||||
| AccidentTime | ساعت حادثه | string `HH:mm` | **no** | **user** / **derived** from createdAt | |
|
||||
| AccidentLocationAddress | نشانی محل حادثه | string | **no** | **user** expert review, else **system** `"استان تهران شهر تهران"` | |
|
||||
| AccidentLocationAddress | نشانی محل حادثه | string | **no** | **system** `"استان تهران شهر تهران"` | Should later be **user** |
|
||||
| AccidentCauseId | علت حادثه | number | **no** | **system** `6` | Lookup: `GET /lookups/accident-causes`. Expert `accidentReason.fanavaran` exists but is not yet wired as the sent id |
|
||||
| AccidentCityId | شهر محل حادثه | number | **no** | **user** expert review, else **system** `701` تهران | Lookup: `GET /lookups/cities` |
|
||||
| AccidentReportTypeId | نحوه اعلام حادثه | number | **no** | **user** expert review, else **system** `155` | Lookup: `GET /lookups/accident-report-type` |
|
||||
| AccidentCityId | شهر محل حادثه | number | **no** | **system** `701` تهران | Lookup: `GET /lookups/cities` |
|
||||
| AccidentReportTypeId | نحوه اعلام حادثه | number | **no** | **system** `155` | Lookup: `GET /lookups/accident-report-type` |
|
||||
| AccidentVehicleUsedId | نوع کاربری خودرو | number | **no** | **inquiry** VIN / policy vehicle `UsedId`, else tenant `1` | Lookup: `GET /lookups/vehicle-use-types` |
|
||||
| CulpritTypeId | نوع مقصر | number | **no** | **system** `337` | Lookup: `GET /lookups/accident-culprit-type` (ثالث, not hull) |
|
||||
| CulpritTypeId | نوع مقصر | number | **no** | **derived** from guilty party: driver = insurer → `337` (بیمهگذار), else `338` (راننده غير از بيمه گذار). Never `728` | Lookup: `GET /lookups/accident-culprit-type` (ثالث, not hull) |
|
||||
| CulpritLicenceTypeId | نوع گواهینامه مقصر | number | **no** | **system** `2` | Lookup: `GET /lookups/driving-licence-types` |
|
||||
| CulpritLicenceNo | شماره گواهینامه مقصر | string | **no** | **user** party licence if stored, else dummy `9705463515` | Must never be empty |
|
||||
| CulpritLicenceIssuDate | تاریخ صدور گواهینامه | string Jalali | **no** | **system** `"1394/10/13"` | Should later be **user** |
|
||||
@@ -109,8 +104,8 @@ If `DriverId` is missing, **submit** (not preview) registers GEN.44 `POST /commo
|
||||
|
||||
| Field | Persian | Type | Null? | Current source |
|
||||
|-------|---------|------|-------|----------------|
|
||||
| DriverId | شناسه راننده زیاندیده در فناوران | number | **no** on submit | **inquiry** `GET /lookups/inquiry-by-unique-identifier` (national code + Jalali birthday). Fallback **GEN.44** create |
|
||||
| OwnerId | شناسه مالک | number | yes | currently `null` |
|
||||
| DriverId | شناسه راننده زیاندیده در فناوران | number | **no** on submit | **inquiry** `GET /lookups/inquiry-by-unique-identifier` — only RoleId **161** or **166**. If missing / only e.g. 162 → **GEN.44** create on submit |
|
||||
| OwnerId | شناسه مالک | number | preferred | **inquiry** same RoleId **161**/**166** rule as DriverId; else **GEN.44** on submit (reuse DriverId when same national code) |
|
||||
| VehicleKindId | نوع خودرو | number | **no** | **inquiry** VIN vehicle `VehicleKindId`, else **lookup** `GET /lookups/vehicle-kinds` matched to `claim.vehicle.carType` |
|
||||
| AccidentVehicleUsedId | کاربری | number | **no** | **inquiry** vehicle `UsedId` / use-types, else tenant |
|
||||
| VIN | شماره شاسی ۱۷ رقمی | string | preferred | **inquiry** plate/VIN inquiry |
|
||||
@@ -132,7 +127,7 @@ If `DriverId` is missing, **submit** (not preview) registers GEN.44 `POST /commo
|
||||
| PreviousPolicyEndDate | پایان بیمهنامه قبلی | string | empty ok | **derived** from EndDate |
|
||||
| InsuranceCorpId | شرکت بیمه زیاندیده | number | **no** | **lookup** insurance-corp for tenant |
|
||||
| DmgCaseTypeId | نوع مورد خسارت | number | **no** | **system** `175` · lookup `dmg-case-type` |
|
||||
| DmgHistoryStatus | وضعیت سابقه خسارت | number | **no** | **user** expert review, else **system** `5214` · lookup `dmg-history-status` |
|
||||
| DmgHistoryStatus | وضعیت سابقه خسارت | number | **no** | **system** `5214` · lookup `dmg-history-status` |
|
||||
| FaultPercent | درصد تقصیر | number | **no** | **system** `100` |
|
||||
| DriverIsOwner | راننده همان مالک؟ | number | **no** | **user** `driverIsInsurer` → 1/0 |
|
||||
| LicenceNo | شماره گواهینامه زیاندیده | string | **no** | **user**, else dummy |
|
||||
@@ -174,7 +169,7 @@ Requires local `dmgCaseId`. `ClaimExpertId` here is the **assessor** role (Parsi
|
||||
| ClaimExpertId | کارشناس ارزیاب | number | **no** | **staff** / tenant `ExpertiseClaimExpertId` |
|
||||
| DmgAssessmentDate | تاریخ بازدید | string Jalali | **no** | **derived** expert reply `submittedAt` |
|
||||
| InspectionTime | ساعت بازدید | string `HH:mm` | **no** | **derived** |
|
||||
| InspectionPlaceId | محل بازدید | number | **no** | **user** expert review, else **system** `282` · lookup `GET /lookups/inspection-place` |
|
||||
| InspectionPlaceId | محل بازدید | number | **no** | **system** `282` · lookup `GET /lookups/inspection-place` |
|
||||
| RepairWage | اجرت کل | number | **no** | **user** sum of part `salary` |
|
||||
| ComponentReplacementCost | قطعه کل | number | **no** | **user** sum of part `price` |
|
||||
| WasteValue | داغی کل | number | **no** | **user** daghi prices |
|
||||
|
||||
Reference in New Issue
Block a user