feat(supabase): animals and relations access layer

animals.ts: POST search with species filter and a probe row, read by id with
explicit columns, create with the optional first client in one call, update,
archive. relations.ts: an animal's relations in one select (voided left out),
create, end, dates, void. Kinds duplicate_relation and already_ended added.
This commit is contained in:
bchanot committed 2026-10-26 17:11:23 +01:00
1 parent 3c2b503fc9
commit e22357630f
7 files changed
+1612 -12

No files matched your search

+29
View File
@@ -93,6 +93,8 @@ export {
RECORD_FAILURE_KINDS,
RecordFailure,
classifyRecordError,
parseRecordAnswer,
UUID_PATTERN,
type RecordFailureKind,
type RecordPage,
} from './records'
@@ -121,6 +123,33 @@ export {
type RelationCursor,
type UpdateClientInput,
} from './clients'
export {
ANIMAL_COLUMNS,
createAnimalRecord,
fetchAnimalRecord,
searchAnimals,
setAnimalArchived,
updateAnimalRecord,
type AnimalFields,
type AnimalListItem,
type AnimalRecord,
type AnimalSearch,
type CreateAnimalInput,
type InitialRelation,
type UpdateAnimalInput,
} from './animals'
export {
ANIMAL_RELATION_COLUMNS,
createAnimalClientRelation,
endAnimalClientRelation,
fetchAnimalRelations,
updateAnimalClientRelation,
voidAnimalClientRelation,
type AnimalRelationItem,
type CreateRelationInput,
type EndRelationInput,
type UpdateRelationDatesInput,
} from './relations'
export {
ANIMAL_FIELD_LIMITS,
BIRTH_YEAR_MIN,