Skip to content

Commit

Permalink
refactor: remove unused legacy ClientDTO values
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamadJaara committed Nov 23, 2023
1 parent 83763fb commit 3b59b91
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package com.wire.kalium.network.api.base.authenticated.client

import com.wire.kalium.network.api.base.model.LocationResponse
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

Expand All @@ -27,7 +26,6 @@ data class ClientDTO(
@SerialName("cookie") val cookie: String?,
@SerialName("time") val registrationTime: String, // yyyy-mm-ddThh:MM:ss.qqq
@SerialName("last_active") val lastActive: String?, // yyyy-mm-ddThh:MM:ss.qqq
@SerialName("location") val location: LocationResponse?,
@SerialName("model") val model: String?,
@SerialName("id") val clientId: String,
@SerialName("type") val type: ClientTypeDTO,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import com.wire.kalium.network.api.base.authenticated.client.ClientCapabilityDTO
import com.wire.kalium.network.api.base.authenticated.client.ClientDTO
import com.wire.kalium.network.api.base.authenticated.client.ClientTypeDTO
import com.wire.kalium.network.api.base.authenticated.client.DeviceTypeDTO
import com.wire.kalium.network.api.base.model.LocationResponse

object ClientResponseJson {
private val jsonProvider = { serializable: ClientDTO ->
Expand All @@ -37,10 +36,6 @@ object ClientResponseJson {
| "class": "${serializable.deviceType}",
| "label": "${serializable.label}",
| "cookie": "${serializable.cookie}",
| "location": {
| "lat": ${serializable.location!!.latitude},
| "lon": ${serializable.location!!.longitude}
| },
| "model": "${serializable.model}",
| "capabilities": {
| "capabilities": [
Expand All @@ -58,7 +53,6 @@ object ClientResponseJson {
deviceType = DeviceTypeDTO.Phone,
registrationTime = "2021-05-12T10:52:02.671Z",
lastActive = "2021-05-12T10:52:02.671Z",
location = LocationResponse(latitude = "1.2345", longitude = "6.7890"),
label = "label",
cookie = "sldkfmdeklmwldwlek23kl44mntiuepfojfndkjd",
capabilities = Capabilities(listOf(ClientCapabilityDTO.LegalHoldImplicitConsent)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import com.wire.kalium.model.conversation.ConversationResponseJson
import com.wire.kalium.network.api.base.authenticated.client.ClientDTO
import com.wire.kalium.network.api.base.authenticated.client.ClientTypeDTO
import com.wire.kalium.network.api.base.authenticated.client.DeviceTypeDTO
import com.wire.kalium.network.api.base.authenticated.conversation.ConvProtocol
import com.wire.kalium.network.api.base.authenticated.featureConfigs.AppLockConfigDTO
import com.wire.kalium.network.api.base.authenticated.featureConfigs.ClassifiedDomainsConfigDTO
import com.wire.kalium.network.api.base.authenticated.featureConfigs.FeatureConfigData
Expand All @@ -38,7 +37,6 @@ import com.wire.kalium.network.api.base.authenticated.notification.EventContentD
import com.wire.kalium.network.api.base.authenticated.notification.EventResponse
import com.wire.kalium.network.api.base.authenticated.notification.NotificationResponse
import com.wire.kalium.network.api.base.model.ConversationId
import com.wire.kalium.network.api.base.model.LocationResponse
import com.wire.kalium.network.api.base.model.QualifiedID
import com.wire.kalium.network.api.base.model.SupportedProtocolDTO
import kotlinx.serialization.InternalSerializationApi
Expand Down Expand Up @@ -73,7 +71,6 @@ object NotificationEventsResponseJson {
ClientDTO(
cookie = null,
clientId = "id",
location = LocationResponse("23.2", "43.2"),
registrationTime = "2022-02-15T12:54:30Z",
lastActive = "2022-02-15T12:54:30Z",
model = "Firefox (Temporary)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import com.wire.kalium.network.api.base.authenticated.client.ClientCapabilityDTO
import com.wire.kalium.network.api.base.authenticated.client.ClientDTO
import com.wire.kalium.network.api.base.authenticated.client.ClientTypeDTO
import com.wire.kalium.network.api.base.authenticated.client.DeviceTypeDTO
import com.wire.kalium.network.api.base.model.LocationResponse

object ClientResponseJson {
private val jsonProvider = { serializable: ClientDTO ->
Expand All @@ -36,10 +35,6 @@ object ClientResponseJson {
| "class": "${serializable.deviceType}",
| "label": "${serializable.label}",
| "cookie": "${serializable.cookie}",
| "location": {
| "lat": ${serializable.location!!.latitude},
| "lon": ${serializable.location!!.longitude}
| },
| "model": "${serializable.model}",
| "capabilities": {
| "capabilities": [
Expand All @@ -57,7 +52,6 @@ object ClientResponseJson {
deviceType = DeviceTypeDTO.Phone,
registrationTime = "2023-05-12T10:52:02.671Z",
lastActive = "2023-05-12T10:52:02.671Z",
location = LocationResponse(latitude = "1.2345", longitude = "6.7890"),
label = "label",
cookie = "sldkfmdeklmwldwlek23kl44mntiuepfojfndkjd",
capabilities = Capabilities(listOf(ClientCapabilityDTO.LegalHoldImplicitConsent)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import com.wire.kalium.network.api.base.authenticated.client.ClientCapabilityDTO
import com.wire.kalium.network.api.base.authenticated.client.ClientDTO
import com.wire.kalium.network.api.base.authenticated.client.ClientTypeDTO
import com.wire.kalium.network.api.base.authenticated.client.DeviceTypeDTO
import com.wire.kalium.network.api.base.model.LocationResponse

object ListOfClientsResponseJson {
private val jsonProvider = { serializable: ClientDTO ->
Expand All @@ -36,10 +35,6 @@ object ListOfClientsResponseJson {
| "class": "${serializable.deviceType}",
| "label": "${serializable.label}",
| "cookie": "${serializable.cookie}",
| "location": {
| "lat": ${serializable.location!!.latitude},
| "lon": ${serializable.location!!.longitude}
| },
| "model": "${serializable.model}",
| "capabilities": {
| "capabilities": [
Expand All @@ -57,7 +52,6 @@ object ListOfClientsResponseJson {
deviceType = DeviceTypeDTO.Phone,
registrationTime = "2023-05-12T10:52:02.671Z",
lastActive = "2023-05-12T10:52:02.671Z",
location = LocationResponse(latitude = "1.2345", longitude = "6.7890"),
label = "label",
cookie = "sldkfmdeklmwldwlek23kl44mntiuepfojfndkjd",
capabilities = Capabilities(listOf(ClientCapabilityDTO.LegalHoldImplicitConsent)),
Expand Down

0 comments on commit 3b59b91

Please sign in to comment.