diff --git a/Sources/Auth/Types.swift b/Sources/Auth/Types.swift index 3a56ea18..d09a0136 100644 --- a/Sources/Auth/Types.swift +++ b/Sources/Auth/Types.swift @@ -619,7 +619,7 @@ public struct AuthMFAEnrollResponse: Decodable, Hashable, Sendable { } } -public struct MFAChallengeParams: Encodable, Hashable { +public struct MFAChallengeParams: Encodable, Hashable, Sendable { /// ID of the factor to be challenged. Returned in ``AuthMFA/enroll(params:)``. public let factorId: String @@ -632,7 +632,7 @@ public struct MFAChallengeParams: Encodable, Hashable { } } -public struct MFAVerifyParams: Encodable, Hashable { +public struct MFAVerifyParams: Encodable, Hashable, Sendable { /// ID of the factor being verified. Returned in ``AuthMFA/enroll(params:)``. public let factorId: String diff --git a/Sources/Realtime/Defaults.swift b/Sources/Realtime/Defaults.swift index e74f08bc..8309d4a5 100644 --- a/Sources/Realtime/Defaults.swift +++ b/Sources/Realtime/Defaults.swift @@ -21,7 +21,7 @@ import Foundation /// A collection of default values and behaviors used across the Client -public enum Defaults { +public enum Defaults: Sendable { /// Default timeout when sending messages public static let timeoutInterval: TimeInterval = 10.0 @@ -73,7 +73,7 @@ public enum Defaults { /// Represents the multiple states that a Channel can be in /// throughout it's lifecycle. -public enum ChannelState: String { +public enum ChannelState: String, Sendable { case closed case errored case joined @@ -83,7 +83,7 @@ public enum ChannelState: String { /// Represents the different events that can be sent through /// a channel regarding a Channel's lifecycle. -public enum ChannelEvent { +public enum ChannelEvent: Sendable { public static let join = "phx_join" public static let leave = "phx_leave" public static let close = "phx_close" diff --git a/Sources/Realtime/PhoenixTransport.swift b/Sources/Realtime/PhoenixTransport.swift index 79c85400..dc75d7af 100644 --- a/Sources/Realtime/PhoenixTransport.swift +++ b/Sources/Realtime/PhoenixTransport.swift @@ -110,7 +110,7 @@ public protocol PhoenixTransportDelegate { // ---------------------------------------------------------------------- /// Available `ReadyState`s of a `Transport` layer. -public enum PhoenixTransportReadyState { +public enum PhoenixTransportReadyState: Sendable { /// The `Transport` is opening a connection to the server. case connecting diff --git a/Sources/Realtime/Presence.swift b/Sources/Realtime/Presence.swift index 2370697f..76825d8f 100644 --- a/Sources/Realtime/Presence.swift +++ b/Sources/Realtime/Presence.swift @@ -108,7 +108,7 @@ public final class Presence { /// /// let options = Options(events: [.state: "my_state", .diff: "my_diff"]) /// let presence = Presence(channel, opts: options) - public struct Options { + public struct Options: Sendable { let events: [Events: String] /// Default set of Options used when creating Presence. Uses the @@ -124,7 +124,7 @@ public final class Presence { } /// Presense Events - public enum Events: String { + public enum Events: String, Sendable { case state case diff } diff --git a/Sources/Realtime/RealtimeChannel.swift b/Sources/Realtime/RealtimeChannel.swift index 380df82f..1e53f480 100644 --- a/Sources/Realtime/RealtimeChannel.swift +++ b/Sources/Realtime/RealtimeChannel.swift @@ -35,7 +35,7 @@ struct Binding { let id: String? } -public struct ChannelFilter { +public struct ChannelFilter: Sendable { public var event: String? public var schema: String? public let table: String? @@ -60,18 +60,18 @@ public struct ChannelFilter { } } -public enum ChannelResponse { +public enum ChannelResponse: Sendable { case ok, timedOut, error } -public enum RealtimeListenTypes: String { +public enum RealtimeListenTypes: String, Sendable { case postgresChanges = "postgres_changes" case broadcast case presence } /// Represents the broadcast and presence options for a channel. -public struct RealtimeChannelOptions { +public struct RealtimeChannelOptions: Sendable { /// Used to track presence payload across clients. Must be unique per client. If `nil`, the server /// will generate one. var presenceKey: String? @@ -106,7 +106,7 @@ public struct RealtimeChannelOptions { } } -public enum RealtimeSubscribeStates { +public enum RealtimeSubscribeStates: Sendable { case subscribed case timedOut case closed diff --git a/Sources/Realtime/RealtimeClient.swift b/Sources/Realtime/RealtimeClient.swift index 6366dc77..af403111 100644 --- a/Sources/Realtime/RealtimeClient.swift +++ b/Sources/Realtime/RealtimeClient.swift @@ -1007,7 +1007,7 @@ public class RealtimeClient: PhoenixTransportDelegate { // ---------------------------------------------------------------------- extension RealtimeClient { - public enum CloseCode: Int { + public enum CloseCode: Int, Sendable { case abnormal = 999 case normal = 1000 diff --git a/Sources/Realtime/RealtimeMessage.swift b/Sources/Realtime/RealtimeMessage.swift index 3feb0066..780eaa66 100644 --- a/Sources/Realtime/RealtimeMessage.swift +++ b/Sources/Realtime/RealtimeMessage.swift @@ -22,7 +22,7 @@ import Foundation import Helpers /// Data that is received from the Server. -public struct RealtimeMessage { +public struct RealtimeMessage: Sendable { /// Reference number. Empty if missing public let ref: String diff --git a/Sources/Realtime/V2/RealtimeMessageV2.swift b/Sources/Realtime/V2/RealtimeMessageV2.swift index ff45913e..f24dcacd 100644 --- a/Sources/Realtime/V2/RealtimeMessageV2.swift +++ b/Sources/Realtime/V2/RealtimeMessageV2.swift @@ -54,7 +54,7 @@ public struct RealtimeMessageV2: Hashable, Codable, Sendable { } } - public enum EventType { + public enum EventType: Sendable { case system case postgresChanges case broadcast diff --git a/Sources/Storage/Deprecated.swift b/Sources/Storage/Deprecated.swift index 865328b9..da2ec58a 100644 --- a/Sources/Storage/Deprecated.swift +++ b/Sources/Storage/Deprecated.swift @@ -103,7 +103,7 @@ extension StorageFileApi { deprecated, message: "File was deprecated and it isn't used in the package anymore, if you're using it on your application, consider replacing it as it will be removed on the next major release." ) -public struct File: Hashable, Equatable { +public struct File: Hashable, Equatable, Sendable { public var name: String public var data: Data public var fileName: String?