From cde38795951a5c7328055c30359a42a17f0fdfb7 Mon Sep 17 00:00:00 2001 From: Philippe Weidmann Date: Wed, 11 Dec 2024 13:11:04 +0100 Subject: [PATCH] feat: Add authorEmailToken --- .../common/interfaces/upload/UploadSession.kt | 1 + .../multiplatform_swisstransfer/data/NewUploadSession.kt | 1 + .../network/models/upload/request/InitUploadBody.kt | 2 ++ 3 files changed, 4 insertions(+) diff --git a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/upload/UploadSession.kt b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/upload/UploadSession.kt index a393d67a..e8f7678a 100644 --- a/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/upload/UploadSession.kt +++ b/STCommon/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/common/interfaces/upload/UploadSession.kt @@ -25,6 +25,7 @@ interface UploadSession { val uuid: String val duration: ValidityPeriod get() = ValidityPeriod.THIRTY val authorEmail: String + val authorEmailToken: String? val password: String val message: String val numberOfDownload: DownloadLimit get() = DownloadLimit.TWO_HUNDRED_FIFTY diff --git a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/data/NewUploadSession.kt b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/data/NewUploadSession.kt index 132ddc87..880a23a4 100644 --- a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/data/NewUploadSession.kt +++ b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/data/NewUploadSession.kt @@ -27,6 +27,7 @@ import com.infomaniak.multiplatform_swisstransfer.common.models.ValidityPeriod data class NewUploadSession( override val duration: ValidityPeriod, override val authorEmail: String, + override val authorEmailToken: String?, override val password: String, override val message: String, override val numberOfDownload: DownloadLimit, diff --git a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/InitUploadBody.kt b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/InitUploadBody.kt index a45868d0..00e2146f 100644 --- a/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/InitUploadBody.kt +++ b/STNetwork/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/network/models/upload/request/InitUploadBody.kt @@ -28,6 +28,7 @@ import kotlinx.serialization.json.Json class InitUploadBody( val duration: String = "", val authorEmail: String = "", + val authorEmailToken: String? = null, val password: String = "", val message: String = "", val sizeOfUpload: Long = 0L, @@ -43,6 +44,7 @@ class InitUploadBody( constructor(uploadSession: UploadSession, recaptcha: String) : this( duration = uploadSession.duration.value.toString(), authorEmail = uploadSession.authorEmail, + authorEmailToken = uploadSession.authorEmailToken, password = uploadSession.password, message = uploadSession.message, sizeOfUpload = uploadSession.files.sumOf { it.size },