forked from Yara724/api
location dynamicallllllly finally or not ?
This commit is contained in:
@@ -23,10 +23,24 @@ Secrets are **not** printed here — read from Mongo `fanavaranClientConfigs` or
|
||||
| `password` | *(config)* | Login | Password | ✅ |
|
||||
| `corpId` | `543` | All business calls | Corp scope | ✅ |
|
||||
| `contractId` | `28` | All business calls | Contract | ✅ |
|
||||
| `location` | `210050` | Fallback only when no staff location | Tenant default OpBUId | ✅ (per expert `locations[].id` at runtime) |
|
||||
| `location` | `210050` | General calls without claim context | Tenant default OpBUId | ✅ (claim submissions require staff `locations[].id`) |
|
||||
|
||||
Seed: `SEED_FANAVARAN_CLIENT_PROFILES` · Runtime: `getFanavaranClientProfile(key)`.
|
||||
|
||||
Claim submissions resolve `Location` from staff profiles in the `file-maker`,
|
||||
`file-reviewer`, `expert`, `damage-expert`, and `field-expert` collections. Each
|
||||
profile stores `locations: [{ id, name }]`; the first non-empty `id` is its primary
|
||||
Fanavaran OpBUId. `branchId` is a local branch reference, not the HTTP Location.
|
||||
|
||||
Resolution priority: claim initiator → blame initiator → active damage reply actor
|
||||
→ assigned damage reviewer → assigned FileReviewer → assigned blame expert → blame
|
||||
decision actor. The first candidate with a location wins. A missing blame record
|
||||
does not discard the claim's own staff. When none has a location, claim submission
|
||||
fails with `FANAVARAN_STAFF_LOCATION_MISSING` instead of sending the tenant default.
|
||||
Base claim, damage, attachment, expertise, hull update, and GEN.44 create calls use
|
||||
the same claim header resolver. Authentication requests do not send Location;
|
||||
the cached login token can be reused across staff locations.
|
||||
|
||||
---
|
||||
|
||||
## Payload defaults (tenant profile.defaults)
|
||||
|
||||
Reference in New Issue
Block a user