import Dependencies import DependenciesMacros import Foundation import SharedModels import Vapor public extension DatabaseClient { @DependencyClient struct Users: Sendable { public var count: @Sendable () async throws -> Int public var create: @Sendable (User.Create) async throws -> User public var delete: @Sendable (User.ID) async throws -> Void public var fetchAll: @Sendable () async throws -> [User] public var get: @Sendable (User.ID) async throws -> User? public var login: @Sendable (User.Login) async throws -> User.Token public var logout: @Sendable (User.Token.ID) async throws -> Void } } public extension DatabaseClient.Users { enum AuthRequest { case basic(BasicAuthorization) } } extension DatabaseClient.Users: TestDependencyKey { public static let testValue: DatabaseClient.Users = Self() }