AutoCat/AutoCatCore/Services/ApiService/ApiServiceProtocol.swift

40 lines
1.7 KiB
Swift

//
// ApiServiceProtocol.swift
// AutoCatCore
//
// Created by Selim Mustafaev on 13.07.2024.
// Copyright © 2024 Selim Mustafaev. All rights reserved.
//
import Mockable
@Mockable
public protocol ApiServiceProtocol: Sendable {
func login(email: String, password: String) async throws -> User
func signUp(email: String, password: String) async throws -> User
func add(notes: [VehicleNoteDto], to number: String) async throws -> VehicleDto
func edit(note: VehicleNoteDto) async throws -> VehicleDto
func remove(note id: String) async throws -> VehicleDto
func add(event: VehicleEventDto, to number: String) async throws -> VehicleDto
func remove(event id: String) async throws -> VehicleDto
func edit(event: VehicleEventDto) async throws -> VehicleDto
func events(with filter: Filter) async throws -> [VehicleEventDto]
func getBrands() async throws -> [String]
func getModels(of brand: String) async throws -> [String]
func getColors() async throws -> [String]
func getRegions() async throws -> [VehicleRegion]
func getYears() async throws -> [Int]
func checkVehicle(by number: String, notes: [VehicleNoteDto], events: [VehicleEventDto], force: Bool) async throws -> VehicleDto
func checkVehicleGb(by number: String) async throws -> VehicleDto
func getVehicles(with filter: Filter, pageToken: String?, pageSize: Int) async throws -> PagedResponse<VehicleDto>
func fbVerifyAssertion(provider: String, idToken: String, accessToken: String?) async
func getToken(code: String, codeVerifier: String) async throws -> TokenResponse
func getReport(for number: String) async throws -> VehicleDto
}