A collection of requests intended to be used by the Children's Village Facilitator Area iOS app.
protocol ChildrensVillageApiCompatible {
func requestToken(
_ username: String,
_ password: String
) async throws -> TokenModel
func requestPasswordReset( _ username: String) async throws -> Int
func updatePassword(_ verificationToken: String, _ password: String) async throws -> Int
func requestPupil(
_ token: String,
_ pupilId: UUID
) async throws -> PupilModel
func requestPupilsRegister(
_ token: String,
_ branchId: Int,
_ date: Date
) async throws -> [PupilModel]
func requestFacilitatorsRegister(
_ token: String,
_ date: Date
) async throws -> [ParentModel]
func requestParentsRegister(
_ token: String,
_ branchId: Int,
_ date: Date
) async throws -> [ParentModel]
func clockOnPupil(
_ token: String,
_ pupilId: String,
_ branchId: Int,
_ date: Date?
) async throws -> ClockOnConfirming
func clockOnFacilitator(
_ token: String,
_ facilitatorId: String,
_ branchId: Int,
_ date: Date?
) async throws -> ClockOnConfirming
func revertPupilClockOn(
_ token: String,
_ attendanceId: Int
) async throws
func revertFacilitatorClockOn(
_ token: String,
_ attendanceId: Int
) async throws
func clockOffPupil(
_ token: String,
_ attendanceId: Int,
_ date: Date?
) async throws
}
- Run
swift package update Mockingbird
- Uncomment the JwtApiClient target in
Package.json
- Delete the existing
Tests/ChildrensVillageApiClientTests/Mocks/JwtApiClientMocks.generated.swift
file - Run
./generate-mocks.sh