import Foundation public struct SDKConfig: Sendable { public let appKey: String public let debug: Bool public let autoRegisterPush: Bool public init( appKey: String, debug: Bool = false, autoRegisterPush: Bool = true ) { self.appKey = appKey self.debug = debug self.autoRegisterPush = autoRegisterPush } } public extension SDKConfig { static func development( appKey: String, debug: Bool = false, autoRegisterPush: Bool = true ) -> SDKConfig { SDKConfig( appKey: appKey, debug: debug, autoRegisterPush: autoRegisterPush ) } } public enum SDKEndpoints { private static var _apiBaseURL: URL? private static var _imWebSocketURL: URL? public static var apiBaseURL: URL { _apiBaseURL ?? URL(string: "https://dev.xuqinmin.com")! } public static var imWebSocketURL: URL { _imWebSocketURL ?? URL(string: "wss://dev.xuqinmin.com/ws/im")! } public static func configure( apiBaseURL: String? = nil, imWebSocketURL: String? = nil ) { if let api = apiBaseURL, let url = URL(string: api) { _apiBaseURL = url } if let ws = imWebSocketURL, let url = URL(string: ws) { _imWebSocketURL = url } } public static func reset() { _apiBaseURL = nil _imWebSocketURL = nil } }