-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add API v5 support (WPB-6015) (#2398)
* release: feat: Add API v5 support * Code style fix * Review fix
- Loading branch information
1 parent
f51b74b
commit 42a5405
Showing
31 changed files
with
882 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...rk/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/AccessTokenApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.api.v5.authenticated.AccessTokenApiV5 | ||
import io.ktor.client.HttpClient | ||
|
||
internal class AccessTokenApiV6 internal constructor( | ||
private val httpClient: HttpClient | ||
) : AccessTokenApiV5(httpClient) |
28 changes: 28 additions & 0 deletions
28
network/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/AssetApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.base.model.UserId | ||
import com.wire.kalium.network.api.v5.authenticated.AssetApiV5 | ||
|
||
internal open class AssetApiV6 internal constructor( | ||
authenticatedNetworkClient: AuthenticatedNetworkClient, | ||
selfUserId: UserId | ||
) : AssetApiV5(authenticatedNetworkClient, selfUserId) |
26 changes: 26 additions & 0 deletions
26
network/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/CallApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.CallApiV5 | ||
|
||
internal open class CallApiV6 internal constructor( | ||
authenticatedNetworkClient: AuthenticatedNetworkClient | ||
) : CallApiV5(authenticatedNetworkClient) |
26 changes: 26 additions & 0 deletions
26
network/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/ClientApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.ClientApiV5 | ||
|
||
internal open class ClientApiV6 internal constructor( | ||
authenticatedNetworkClient: AuthenticatedNetworkClient | ||
) : ClientApiV5(authenticatedNetworkClient) |
26 changes: 26 additions & 0 deletions
26
...ork/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/ConnectionApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.ConnectionApiV5 | ||
|
||
internal open class ConnectionApiV6 internal constructor( | ||
authenticatedNetworkClient: AuthenticatedNetworkClient | ||
) : ConnectionApiV5(authenticatedNetworkClient) |
26 changes: 26 additions & 0 deletions
26
...k/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/ConversationApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.ConversationApiV5 | ||
|
||
internal open class ConversationApiV6 internal constructor( | ||
authenticatedNetworkClient: AuthenticatedNetworkClient, | ||
) : ConversationApiV5(authenticatedNetworkClient) |
25 changes: 25 additions & 0 deletions
25
network/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/E2EIApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.E2EIApiV5 | ||
|
||
internal open class E2EIApiV6 internal constructor( | ||
private val authenticatedNetworkClient: AuthenticatedNetworkClient | ||
) : E2EIApiV5(authenticatedNetworkClient) |
26 changes: 26 additions & 0 deletions
26
.../src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/FeatureConfigApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.FeatureConfigApiV5 | ||
|
||
internal open class FeatureConfigApiV6 internal constructor( | ||
authenticatedNetworkClient: AuthenticatedNetworkClient | ||
) : FeatureConfigApiV5(authenticatedNetworkClient) |
26 changes: 26 additions & 0 deletions
26
...ork/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/KeyPackageApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.KeyPackageApiV5 | ||
|
||
internal open class KeyPackageApiV6 internal constructor( | ||
private val authenticatedNetworkClient: AuthenticatedNetworkClient | ||
) : KeyPackageApiV5(authenticatedNetworkClient) |
28 changes: 28 additions & 0 deletions
28
network/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/LogoutApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.LogoutApiV5 | ||
import com.wire.kalium.network.session.SessionManager | ||
|
||
internal open class LogoutApiV6 internal constructor( | ||
authenticatedNetworkClient: AuthenticatedNetworkClient, | ||
sessionManager: SessionManager | ||
) : LogoutApiV5(authenticatedNetworkClient, sessionManager) |
26 changes: 26 additions & 0 deletions
26
...ork/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/MLSMessageApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.MLSMessageApiV5 | ||
|
||
internal open class MLSMessageApiV6 internal constructor( | ||
private val authenticatedNetworkClient: AuthenticatedNetworkClient | ||
) : MLSMessageApiV5(authenticatedNetworkClient) |
26 changes: 26 additions & 0 deletions
26
...k/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/MLSPublicKeyApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.v5.authenticated.MLSPublicKeyApiV5 | ||
|
||
internal open class MLSPublicKeyApiV6 internal constructor( | ||
private val authenticatedNetworkClient: AuthenticatedNetworkClient | ||
) : MLSPublicKeyApiV5(authenticatedNetworkClient) |
28 changes: 28 additions & 0 deletions
28
network/src/commonMain/kotlin/com/wire/kalium/network/api/v6/authenticated/MessageApiV6.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Wire | ||
* Copyright (C) 2024 Wire Swiss GmbH | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
|
||
package com.wire.kalium.network.api.v6.authenticated | ||
|
||
import com.wire.kalium.network.AuthenticatedNetworkClient | ||
import com.wire.kalium.network.api.base.authenticated.message.EnvelopeProtoMapper | ||
import com.wire.kalium.network.api.v5.authenticated.MessageApiV5 | ||
|
||
internal open class MessageApiV6 internal constructor( | ||
authenticatedNetworkClient: AuthenticatedNetworkClient, | ||
envelopeProtoMapper: EnvelopeProtoMapper | ||
) : MessageApiV5(authenticatedNetworkClient, envelopeProtoMapper) |
Oops, something went wrong.