diff --git a/Sources/Segment/Settings.swift b/Sources/Segment/Settings.swift index a434cf7e..41a6aeb3 100644 --- a/Sources/Segment/Settings.swift +++ b/Sources/Segment/Settings.swift @@ -12,6 +12,8 @@ public struct Settings: Codable { public var plan: JSON? = nil public var edgeFunction: JSON? = nil public var middlewareSettings: JSON? = nil + public var metrics: JSON? = nil + public var consentSettings: JSON? = nil public init(writeKey: String, apiHost: String) { integrations = try! JSON([ @@ -37,6 +39,8 @@ public struct Settings: Codable { self.plan = try? values.decode(JSON.self, forKey: CodingKeys.plan) self.edgeFunction = try? values.decode(JSON.self, forKey: CodingKeys.edgeFunction) self.middlewareSettings = try? values.decode(JSON.self, forKey: CodingKeys.middlewareSettings) + self.metrics = try? values.decode(JSON.self, forKey: CodingKeys.metrics) + self.consentSettings = try? values.decode(JSON.self, forKey: CodingKeys.consentSettings) } static public func load(from url: URL?) -> Settings? { @@ -56,6 +60,8 @@ public struct Settings: Codable { case plan case edgeFunction case middlewareSettings + case metrics + case consentSettings } /**