Context
This is a React Native mobile app written in TypeScript. The "backend" folder contains issues — actual implementation goes in src/. This is client-side code, not server-side.
File to Create
src/services/petService.ts
Requirements
getAllPets() — fetch all pets for the logged-in owner
getPetById(petId) — fetch a single pet by ID
getPetByQRCode(qrCode) — fetch pet using scanned QR code
createPet(data) — register a new pet
updatePet(petId, data) — update pet details
deletePet(petId) — remove a pet
Acceptance Criteria
Tech Stack
Related Issues
Depends on: #1 (API Client), #3 (Pet Model)
Context
This is a React Native mobile app written in TypeScript. The "backend" folder contains issues — actual implementation goes in
src/. This is client-side code, not server-side.File to Create
src/services/petService.tsRequirements
getAllPets()— fetch all pets for the logged-in ownergetPetById(petId)— fetch a single pet by IDgetPetByQRCode(qrCode)— fetch pet using scanned QR codecreatePet(data)— register a new petupdatePet(petId, data)— update pet detailsdeletePet(petId)— remove a petAcceptance Criteria
getPetByQRCode()works with QR scan dataPromiseresponsesTech Stack
Related Issues
Depends on: #1 (API Client), #3 (Pet Model)