refact: [NETWORK] format on data part to be able to filter and search… (#288)

Co-authored-by: Florent Champigny <florent@bere.al>
This commit is contained in:
Florent CHAMPIGNY 2025-10-02 14:32:56 +02:00 committed by GitHub
parent 8c6ce2e244
commit 08e58f60f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 4420 additions and 67 deletions

View file

@ -14,12 +14,15 @@ data class FloconNetworkCallDomainModel(
val startTime: Long,
val startTimeFormatted: String,
val method: String,
val methodFormatted: String,
val headers: Map<String, String>,
val body: String?,
val byteSize: Long,
val byteSizeFormatted: String,
val isMocked: Boolean,
val specificInfos: SpecificInfos,
val domainFormatted: String, // extracted from url
val queryFormatted: String, // extracted from url
) {
sealed interface SpecificInfos {
data object Http: SpecificInfos
@ -35,6 +38,7 @@ data class FloconNetworkCallDomainModel(
val durationMs: Double
val durationFormatted: String
val statusFormatted: String // extracted from response
data class Success(
override val durationMs: Double,
@ -45,7 +49,8 @@ data class FloconNetworkCallDomainModel(
val byteSize: Long,
val byteSizeFormatted: String,
val specificInfos: SpecificInfos,
val isImage: Boolean
val isImage: Boolean,
override val statusFormatted: String, // extracted from response
) : Response {
sealed interface SpecificInfos {
data class Http(
@ -64,6 +69,7 @@ data class FloconNetworkCallDomainModel(
override val durationMs: Double,
override val durationFormatted: String,
val issue: String,
override val statusFormatted: String, // extracted from response
) : Response
}
}