Files
swift-manual-s/Sources/ManualS/ManualS.swift
Michael Housh bd33827e53
All checks were successful
CI / Ubuntu (push) Successful in 11m46s
feat: Adds heat pump heating interpolation.
2025-03-13 10:55:15 -04:00

39 lines
1.3 KiB
Swift

import Dependencies
import DependenciesMacros
import Models
public extension DependencyValues {
var manualS: ManualS {
get { self[ManualS.self] }
set { self[ManualS.self] = newValue }
}
}
@DependencyClient
public struct ManualS: Sendable {
public var balancePoint: @Sendable (BalancePoint.Request) async throws -> BalancePoint.Response
public var derating: @Sendable (Derating.Request) async throws -> Derating.Response
public var coolingInterpolation:
@Sendable (CoolingInterpolation.Request) async throws -> CoolingInterpolation.Response
public var heatPumpHeatingInterpolation:
@Sendable (HeatPumpHeatingInterpolation.Request) async throws -> HeatPumpHeatingInterpolation.Response
public var requiredKW: @Sendable (RequiredKW.Request) async throws -> RequiredKW.Response
public var sizingLimits: @Sendable (SizingLimits.Request) async throws -> SizingLimits.Response
}
extension ManualS: DependencyKey {
public static let liveValue = Self(
balancePoint: { try await $0.respond() },
derating: { try await $0.respond() },
coolingInterpolation: { try await $0.respond() },
heatPumpHeatingInterpolation: { try await $0.respond() },
requiredKW: { try await $0.respond() },
sizingLimits: { try await $0.respond() }
)
}
extension ManualS: TestDependencyKey {
public static let testValue: ManualS = Self()
}