# Consumer ProGuard rules for Relyance CMP SDK
# These rules are automatically applied to apps that consume this library

# Keep public API
-keep public class ai.relyance.sdk.RelyanceCmp { public *; }
-keep public class ai.relyance.sdk.RelyanceInitConfig { public *; }
-keep public class ai.relyance.sdk.LogLevel { public *; }

# Keep domain models that are part of public API
-keep class ai.relyance.sdk.domain.model.ConsentState { *; }
-keep class ai.relyance.sdk.domain.model.RelyanceTrackerConsent { *; }
-keep class ai.relyance.sdk.domain.model.RelyanceError { *; }
-keep class ai.relyance.sdk.domain.model.ErrorCode { *; }
-keep class ai.relyance.sdk.domain.model.ConsentUpdateEvent { *; }
-keep class ai.relyance.sdk.domain.model.ConsentUpdateSource { *; }

# Keep entity classes used for JSON serialization with Moshi reflection
-keep class ai.relyance.sdk.data.local.entity.** { *; }

# Keep DTO classes used for API communication
-keep class ai.relyance.sdk.data.remote.dto.** { *; }

# Keep enums with their values (Moshi uses reflection for enums)
-keepclassmembers enum ai.relyance.sdk.data.local.entity.SyncStatus { *; }
-keepclassmembers enum ai.relyance.sdk.data.local.entity.LogRecordLogLevel { *; }

# JWT library - only used for test token validation, not needed in production
-dontwarn com.auth0.jwt.**

# Parcelize annotation - compile-time only
-dontwarn kotlinx.parcelize.**

-keepnames class ai.relyance.sdk.data.local.entity.ConsentRecord
-if class ai.relyance.sdk.data.local.entity.ConsentRecord
-keep class ai.relyance.sdk.data.local.entity.ConsentRecordJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class ai.relyance.sdk.data.local.entity.ConsentRecord
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-keepclassmembers class ai.relyance.sdk.data.local.entity.ConsentRecord {
    public synthetic <init>(long,java.lang.String,java.lang.String,ai.relyance.sdk.data.local.entity.UserLocation,java.lang.String,java.util.List,boolean,boolean,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,boolean,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-keepnames class ai.relyance.sdk.data.local.entity.ProcessingActivityConsent
-if class ai.relyance.sdk.data.local.entity.ProcessingActivityConsent
-keep class ai.relyance.sdk.data.local.entity.ProcessingActivityConsentJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.local.entity.UserLocation
-if class ai.relyance.sdk.data.local.entity.UserLocation
-keep class ai.relyance.sdk.data.local.entity.UserLocationJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class ai.relyance.sdk.data.local.entity.UserLocation
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-keepclassmembers class ai.relyance.sdk.data.local.entity.UserLocation {
    public synthetic <init>(java.lang.String,java.lang.String,java.lang.String,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-keepnames class ai.relyance.sdk.data.remote.dto.BannerConfig
-if class ai.relyance.sdk.data.remote.dto.BannerConfig
-keep class ai.relyance.sdk.data.remote.dto.BannerConfigJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.BannerConfigResponse
-if class ai.relyance.sdk.data.remote.dto.BannerConfigResponse
-keep class ai.relyance.sdk.data.remote.dto.BannerConfigResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.BannerLocaleContent
-if class ai.relyance.sdk.data.remote.dto.BannerLocaleContent
-keep class ai.relyance.sdk.data.remote.dto.BannerLocaleContentJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.BannerStyleConfig
-if class ai.relyance.sdk.data.remote.dto.BannerStyleConfig
-keep class ai.relyance.sdk.data.remote.dto.BannerStyleConfigJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.BehaviorLocation
-if class ai.relyance.sdk.data.remote.dto.BehaviorLocation
-keep class ai.relyance.sdk.data.remote.dto.BehaviorLocationJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.BehaviorProperties
-if class ai.relyance.sdk.data.remote.dto.BehaviorProperties
-keep class ai.relyance.sdk.data.remote.dto.BehaviorPropertiesJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class ai.relyance.sdk.data.remote.dto.BehaviorProperties
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-keepclassmembers class ai.relyance.sdk.data.remote.dto.BehaviorProperties {
    public synthetic <init>(boolean,java.lang.String,boolean,java.lang.String,boolean,boolean,java.lang.Integer,boolean,java.util.List,java.lang.String,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-keepnames class ai.relyance.sdk.data.remote.dto.BehaviorResult
-if class ai.relyance.sdk.data.remote.dto.BehaviorResult
-keep class ai.relyance.sdk.data.remote.dto.BehaviorResultJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.BehaviorsResponse
-if class ai.relyance.sdk.data.remote.dto.BehaviorsResponse
-keep class ai.relyance.sdk.data.remote.dto.BehaviorsResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.ButtonStyleConfig
-if class ai.relyance.sdk.data.remote.dto.ButtonStyleConfig
-keep class ai.relyance.sdk.data.remote.dto.ButtonStyleConfigJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.ConfigVersionResponse
-if class ai.relyance.sdk.data.remote.dto.ConfigVersionResponse
-keep class ai.relyance.sdk.data.remote.dto.ConfigVersionResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.ConsentSubmissionRequest
-if class ai.relyance.sdk.data.remote.dto.ConsentSubmissionRequest
-keep class ai.relyance.sdk.data.remote.dto.ConsentSubmissionRequestJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class ai.relyance.sdk.data.remote.dto.ConsentSubmissionRequest
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-keepclassmembers class ai.relyance.sdk.data.remote.dto.ConsentSubmissionRequest {
    public synthetic <init>(long,java.lang.String,java.lang.String,ai.relyance.sdk.data.remote.dto.UserLocationDto,java.lang.String,java.util.List,boolean,boolean,boolean,java.lang.String,boolean,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,boolean,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-keepnames class ai.relyance.sdk.data.remote.dto.GlobalConfig
-if class ai.relyance.sdk.data.remote.dto.GlobalConfig
-keep class ai.relyance.sdk.data.remote.dto.GlobalConfigJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.KnownUserConsentRecord
-if class ai.relyance.sdk.data.remote.dto.KnownUserConsentRecord
-keep class ai.relyance.sdk.data.remote.dto.KnownUserConsentRecordJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class ai.relyance.sdk.data.remote.dto.KnownUserConsentRecord
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-keepclassmembers class ai.relyance.sdk.data.remote.dto.KnownUserConsentRecord {
    public synthetic <init>(java.lang.String,java.lang.String,long,java.lang.String,java.lang.String,java.lang.String,java.util.List,java.lang.String,boolean,boolean,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-keepnames class ai.relyance.sdk.data.remote.dto.KnownUserConsentResponse
-if class ai.relyance.sdk.data.remote.dto.KnownUserConsentResponse
-keep class ai.relyance.sdk.data.remote.dto.KnownUserConsentResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.LocaleResponse
-if class ai.relyance.sdk.data.remote.dto.LocaleResponse
-keep class ai.relyance.sdk.data.remote.dto.LocaleResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.LocaleResult
-if class ai.relyance.sdk.data.remote.dto.LocaleResult
-keep class ai.relyance.sdk.data.remote.dto.LocaleResultJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.LocationResponse
-if class ai.relyance.sdk.data.remote.dto.LocationResponse
-keep class ai.relyance.sdk.data.remote.dto.LocationResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.LogBatchSubmissionRequest
-if class ai.relyance.sdk.data.remote.dto.LogBatchSubmissionRequest
-keep class ai.relyance.sdk.data.remote.dto.LogBatchSubmissionRequestJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.LogSubmissionRequest
-if class ai.relyance.sdk.data.remote.dto.LogSubmissionRequest
-keep class ai.relyance.sdk.data.remote.dto.LogSubmissionRequestJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.LogSubmissionResponse
-if class ai.relyance.sdk.data.remote.dto.LogSubmissionResponse
-keep class ai.relyance.sdk.data.remote.dto.LogSubmissionResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class ai.relyance.sdk.data.remote.dto.LogSubmissionResponse
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-keepclassmembers class ai.relyance.sdk.data.remote.dto.LogSubmissionResponse {
    public synthetic <init>(java.lang.String,java.lang.String,int,kotlin.jvm.internal.DefaultConstructorMarker);
}

-keepnames class ai.relyance.sdk.data.remote.dto.MobileTrackingProcessingActivities
-if class ai.relyance.sdk.data.remote.dto.MobileTrackingProcessingActivities
-keep class ai.relyance.sdk.data.remote.dto.MobileTrackingProcessingActivitiesJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.PreferenceCenterConfig
-if class ai.relyance.sdk.data.remote.dto.PreferenceCenterConfig
-keep class ai.relyance.sdk.data.remote.dto.PreferenceCenterConfigJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.PreferenceCenterLocaleContent
-if class ai.relyance.sdk.data.remote.dto.PreferenceCenterLocaleContent
-keep class ai.relyance.sdk.data.remote.dto.PreferenceCenterLocaleContentJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.PreferenceCenterStyleConfig
-if class ai.relyance.sdk.data.remote.dto.PreferenceCenterStyleConfig
-keep class ai.relyance.sdk.data.remote.dto.PreferenceCenterStyleConfigJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.ProcessingActivitiesResponse
-if class ai.relyance.sdk.data.remote.dto.ProcessingActivitiesResponse
-keep class ai.relyance.sdk.data.remote.dto.ProcessingActivitiesResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.ProcessingActivityConsentDto
-if class ai.relyance.sdk.data.remote.dto.ProcessingActivityConsentDto
-keep class ai.relyance.sdk.data.remote.dto.ProcessingActivityConsentDtoJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.ProcessingActivityDto
-if class ai.relyance.sdk.data.remote.dto.ProcessingActivityDto
-keep class ai.relyance.sdk.data.remote.dto.ProcessingActivityDtoJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.TrackingTechnologiesResponse
-if class ai.relyance.sdk.data.remote.dto.TrackingTechnologiesResponse
-keep class ai.relyance.sdk.data.remote.dto.TrackingTechnologiesResponseJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.TrackingTechnologyDto
-if class ai.relyance.sdk.data.remote.dto.TrackingTechnologyDto
-keep class ai.relyance.sdk.data.remote.dto.TrackingTechnologyDtoJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.TrackingTechnologyElement
-if class ai.relyance.sdk.data.remote.dto.TrackingTechnologyElement
-keep class ai.relyance.sdk.data.remote.dto.TrackingTechnologyElementJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.TrackingTechnologyResult
-if class ai.relyance.sdk.data.remote.dto.TrackingTechnologyResult
-keep class ai.relyance.sdk.data.remote.dto.TrackingTechnologyResultJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.UIConfig
-if class ai.relyance.sdk.data.remote.dto.UIConfig
-keep class ai.relyance.sdk.data.remote.dto.UIConfigJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}

-keepnames class ai.relyance.sdk.data.remote.dto.UserLocationDto
-if class ai.relyance.sdk.data.remote.dto.UserLocationDto
-keep class ai.relyance.sdk.data.remote.dto.UserLocationDtoJsonAdapter {
    public <init>(com.squareup.moshi.Moshi);
}
-if class ai.relyance.sdk.data.remote.dto.UserLocationDto
-keepnames class kotlin.jvm.internal.DefaultConstructorMarker
-keepclassmembers class ai.relyance.sdk.data.remote.dto.UserLocationDto {
    public synthetic <init>(java.lang.String,java.lang.String,java.lang.String,int,kotlin.jvm.internal.DefaultConstructorMarker);
}
