import Foundation /// One exposure event for `POST /api/feature-control/telemetry/exposure`. public struct FeatureControlExposureEvent: Encodable, Sendable, Equatable { public let featureKey: String public let variant: String? public let subjectType: FeatureControlSubjectType public let storeId: String? public init(featureKey: String, variant: String?, subjectType: FeatureControlSubjectType, storeId: String?) { self.featureKey = featureKey self.variant = variant self.subjectType = subjectType self.storeId = storeId } } /// Request body — server caps `events` at 100 (`maxItems: 100`); batching into that /// limit is the caller's (`FeatureControlManager`'s) job, not this type's. struct FeatureControlExposureBatchBody: Encodable, Sendable { let events: [FeatureControlExposureEvent] } /// Wire envelope for the telemetry response — `{error, code, result: {count}}`. struct FeatureControlExposureBatchEnvelope: Decodable, Sendable { let error: Bool let code: String? }