NSProfile.swift 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // NSProfile.swift
  3. // LoopFollow
  4. //
  5. // Created by Jonas Björkert on 2024-07-12.
  6. // Copyright © 2024 Jon Fawcett. All rights reserved.
  7. //
  8. import Foundation
  9. struct NSProfile: Decodable {
  10. struct Store: Decodable {
  11. struct BasalEntry: Decodable {
  12. let value: Double
  13. let time: String
  14. let timeAsSeconds: Double
  15. }
  16. struct SensEntry: Decodable {
  17. let value: Double
  18. let time: String
  19. let timeAsSeconds: Double
  20. }
  21. struct CarbRatioEntry: Decodable {
  22. let value: Double
  23. let time: String
  24. let timeAsSeconds: Double
  25. }
  26. struct OverrideEntry: Decodable {
  27. let name: String?
  28. let targetRange: [Double]?
  29. let duration: Int?
  30. let insulinNeedsScaleFactor: Double?
  31. let symbol: String?
  32. }
  33. let basal: [BasalEntry]
  34. let sens: [SensEntry]
  35. let carbratio: [CarbRatioEntry]
  36. let overrides: [OverrideEntry]?
  37. let timezone: String
  38. }
  39. let store: [String: Store]
  40. let defaultProfile: String
  41. let units: String
  42. }