Fix TypeScript build errors

This commit is contained in:
defiQUG
2026-01-02 20:27:42 -08:00
parent 849e6a8357
commit d4fb8e77cb
295 changed files with 18595 additions and 1391 deletions

36
PRISMA_FIX_PROGRESS.md Normal file
View File

@@ -0,0 +1,36 @@
# Prisma Schema Fix Progress
## Current Status
We've made significant progress fixing Prisma schema validation errors, reducing from 27+ errors down to 15 remaining errors.
### Fixed ✅
- All `@map``@@map` syntax errors
- Removed duplicate models
- Removed references to missing models
- Fixed SyntheticGruBond relations
- Fixed InterplanetaryNode relations (sourceRelayGrids, targetRelayGrids, sourceSettlements, targetSettlements)
- Fixed GovernanceTier relations (fromDelegations, toDelegations)
- Removed conflicting redundant relations
### Remaining Issues (15 errors)
These require careful analysis because some relations may be implicit (one-to-many where Prisma infers the back-relation) vs explicit (requiring named relation on both sides):
1. **SovereignBank.ledgerEntries** → LedgerEntry (but LedgerEntry doesn't have sovereignBankId field)
2. **BondMarketParticipant.sovereignBank** → SovereignBank (needs relation name match)
3. **GruIssuance** relations (allocation, settlementPipeline, entity)
4. **GruReserveAllocation** relations (reserveClass, pool)
5. **GruReservePool** relations (allocations)
6. **GruIssuanceApplication.issuance** (needs fields/references)
7. **One-to-one relation constraints** (decisionId, gapId need @unique)
8. **Constraint name conflicts** (gru_issuances__fkey)
Some of these may require:
- Adding missing foreign key fields
- Adding @unique constraints
- Using different relation names to avoid conflicts
- Removing relations that shouldn't exist
The schema is significantly closer to validation - from 27+ errors down to 15.