This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import CryptoKit
|
||||
import Foundation
|
||||
|
||||
enum AppSection: String, CaseIterable, Identifiable, Hashable {
|
||||
enum AppSection: String, CaseIterable, Identifiable, Hashable, Codable {
|
||||
case overview
|
||||
case requests
|
||||
case activity
|
||||
@@ -28,7 +28,7 @@ enum AppSection: String, CaseIterable, Identifiable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
enum NotificationPermissionState: String, CaseIterable, Identifiable {
|
||||
enum NotificationPermissionState: String, CaseIterable, Identifiable, Codable {
|
||||
case unknown
|
||||
case allowed
|
||||
case provisional
|
||||
@@ -72,7 +72,7 @@ struct BootstrapContext {
|
||||
let suggestedPairingPayload: String
|
||||
}
|
||||
|
||||
enum PairingTransport: String, Hashable {
|
||||
enum PairingTransport: String, Hashable, Codable {
|
||||
case qr
|
||||
case nfc
|
||||
case manual
|
||||
@@ -98,7 +98,7 @@ struct PairingAuthenticationRequest: Hashable {
|
||||
let signedGPSPosition: SignedGPSPosition?
|
||||
}
|
||||
|
||||
struct SignedGPSPosition: Hashable {
|
||||
struct SignedGPSPosition: Hashable, Codable {
|
||||
let latitude: Double
|
||||
let longitude: Double
|
||||
let horizontalAccuracyMeters: Double
|
||||
@@ -185,7 +185,7 @@ struct SignInResult {
|
||||
let snapshot: DashboardSnapshot
|
||||
}
|
||||
|
||||
struct MemberProfile: Identifiable, Hashable {
|
||||
struct MemberProfile: Identifiable, Hashable, Codable {
|
||||
let id: UUID
|
||||
let name: String
|
||||
let handle: String
|
||||
@@ -210,7 +210,7 @@ struct MemberProfile: Identifiable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
struct AuthSession: Identifiable, Hashable {
|
||||
struct AuthSession: Identifiable, Hashable, Codable {
|
||||
let id: UUID
|
||||
let deviceName: String
|
||||
let originHost: String
|
||||
@@ -241,7 +241,7 @@ struct AuthSession: Identifiable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
enum ApprovalRequestKind: String, CaseIterable, Hashable {
|
||||
enum ApprovalRequestKind: String, CaseIterable, Hashable, Codable {
|
||||
case signIn
|
||||
case accessGrant
|
||||
case elevatedAction
|
||||
@@ -263,7 +263,7 @@ enum ApprovalRequestKind: String, CaseIterable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
enum ApprovalRisk: String, Hashable {
|
||||
enum ApprovalRisk: String, Hashable, Codable {
|
||||
case routine
|
||||
case elevated
|
||||
|
||||
@@ -293,7 +293,7 @@ enum ApprovalRisk: String, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
enum ApprovalStatus: String, Hashable {
|
||||
enum ApprovalStatus: String, Hashable, Codable {
|
||||
case pending
|
||||
case approved
|
||||
case rejected
|
||||
@@ -315,7 +315,7 @@ enum ApprovalStatus: String, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
struct ApprovalRequest: Identifiable, Hashable {
|
||||
struct ApprovalRequest: Identifiable, Hashable, Codable {
|
||||
let id: UUID
|
||||
let title: String
|
||||
let subtitle: String
|
||||
@@ -382,7 +382,7 @@ struct ApprovalRequest: Identifiable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
enum AppNotificationKind: String, Hashable {
|
||||
enum AppNotificationKind: String, Hashable, Codable {
|
||||
case approval
|
||||
case security
|
||||
case system
|
||||
@@ -415,7 +415,7 @@ enum AppNotificationKind: String, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
struct AppNotification: Identifiable, Hashable {
|
||||
struct AppNotification: Identifiable, Hashable, Codable {
|
||||
let id: UUID
|
||||
let title: String
|
||||
let message: String
|
||||
@@ -440,7 +440,7 @@ struct AppNotification: Identifiable, Hashable {
|
||||
}
|
||||
}
|
||||
|
||||
enum AppError: LocalizedError {
|
||||
enum AppError: LocalizedError, Equatable {
|
||||
case invalidPairingPayload
|
||||
case missingSignedGPSPosition
|
||||
case invalidSignedGPSPosition
|
||||
|
||||
Reference in New Issue
Block a user