feat(hometitle): add Backend Router — HomeTitle (Property Monitoring)
- Add hometitle schema (Valibot input schemas) - Add change detector (fuzzy matching, severity, change detection) - Add scanner module (geocoding, county records placeholder) - Add hometitle service (property CRUD, scan, alert pipeline) - Add hometitle router (7 tRPC procedures) - Wire into api root - Add alert type 'property_change' to enum - Write unit tests (10 tests, all passing)
This commit is contained in:
23
web/src/server/api/schemas/hometitle.ts
Normal file
23
web/src/server/api/schemas/hometitle.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { object, string, minLength, optional, number, picklist } from "valibot";
|
||||
|
||||
export const AddPropertySchema = object({
|
||||
address: string([minLength(1)]),
|
||||
parcelId: optional(string()),
|
||||
ownerName: optional(string()),
|
||||
});
|
||||
|
||||
export const RemovePropertySchema = object({
|
||||
propertyId: string([minLength(1)]),
|
||||
});
|
||||
|
||||
export const GetSnapshotsSchema = object({
|
||||
propertyId: string([minLength(1)]),
|
||||
});
|
||||
|
||||
export const GetChangesSchema = object({
|
||||
propertyId: string([minLength(1)]),
|
||||
severity: optional(picklist(["info", "warning", "critical"])),
|
||||
changeType: optional(picklist(["tax_change", "deed_change", "ownership_transfer", "lien_filing", "metadata_change"])),
|
||||
});
|
||||
|
||||
export const RunScanSchema = object({});
|
||||
Reference in New Issue
Block a user