From 8660e92e80c941ff455732826af02f45756987e3 Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Wed, 6 Nov 2024 16:52:22 +0100 Subject: [PATCH] Fix Serialization issue --- common/api/common.api | 12 +++++++----- common/api/common.klib.api | 10 ++++++---- .../commonMain/kotlin/entity/DiscordApplication.kt | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/common/api/common.api b/common/api/common.api index 0cad2d7834f..2b8e8ed36e7 100644 --- a/common/api/common.api +++ b/common/api/common.api @@ -711,12 +711,14 @@ public final class dev/kord/common/entity/ApplicationIntegrationType$UserInstall public final class dev/kord/common/entity/ApplicationIntegrationTypeConfig { public static final field Companion Ldev/kord/common/entity/ApplicationIntegrationTypeConfig$Companion; - public fun (Ldev/kord/common/entity/InstallParams;)V - public final fun component1 ()Ldev/kord/common/entity/InstallParams; - public final fun copy (Ldev/kord/common/entity/InstallParams;)Ldev/kord/common/entity/ApplicationIntegrationTypeConfig; - public static synthetic fun copy$default (Ldev/kord/common/entity/ApplicationIntegrationTypeConfig;Ldev/kord/common/entity/InstallParams;ILjava/lang/Object;)Ldev/kord/common/entity/ApplicationIntegrationTypeConfig; + public fun ()V + public fun (Ldev/kord/common/entity/optional/Optional;)V + public synthetic fun (Ldev/kord/common/entity/optional/Optional;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ldev/kord/common/entity/optional/Optional; + public final fun copy (Ldev/kord/common/entity/optional/Optional;)Ldev/kord/common/entity/ApplicationIntegrationTypeConfig; + public static synthetic fun copy$default (Ldev/kord/common/entity/ApplicationIntegrationTypeConfig;Ldev/kord/common/entity/optional/Optional;ILjava/lang/Object;)Ldev/kord/common/entity/ApplicationIntegrationTypeConfig; public fun equals (Ljava/lang/Object;)Z - public final fun getOauth2InstallParams ()Ldev/kord/common/entity/InstallParams; + public final fun getOauth2InstallParams ()Ldev/kord/common/entity/optional/Optional; public fun hashCode ()I public fun toString ()Ljava/lang/String; } diff --git a/common/api/common.klib.api b/common/api/common.klib.api index 675b54d84e8..3cfdadba328 100644 --- a/common/api/common.klib.api +++ b/common/api/common.klib.api @@ -384,13 +384,13 @@ final class dev.kord.common.entity/ApplicationFlags { // dev.kord.common.entity/ } final class dev.kord.common.entity/ApplicationIntegrationTypeConfig { // dev.kord.common.entity/ApplicationIntegrationTypeConfig|null[0] - constructor (dev.kord.common.entity/InstallParams) // dev.kord.common.entity/ApplicationIntegrationTypeConfig.|(dev.kord.common.entity.InstallParams){}[0] + constructor (dev.kord.common.entity.optional/Optional = ...) // dev.kord.common.entity/ApplicationIntegrationTypeConfig.|(dev.kord.common.entity.optional.Optional){}[0] final val oauth2InstallParams // dev.kord.common.entity/ApplicationIntegrationTypeConfig.oauth2InstallParams|{}oauth2InstallParams[0] - final fun (): dev.kord.common.entity/InstallParams // dev.kord.common.entity/ApplicationIntegrationTypeConfig.oauth2InstallParams.|(){}[0] + final fun (): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/ApplicationIntegrationTypeConfig.oauth2InstallParams.|(){}[0] - final fun component1(): dev.kord.common.entity/InstallParams // dev.kord.common.entity/ApplicationIntegrationTypeConfig.component1|component1(){}[0] - final fun copy(dev.kord.common.entity/InstallParams = ...): dev.kord.common.entity/ApplicationIntegrationTypeConfig // dev.kord.common.entity/ApplicationIntegrationTypeConfig.copy|copy(dev.kord.common.entity.InstallParams){}[0] + final fun component1(): dev.kord.common.entity.optional/Optional // dev.kord.common.entity/ApplicationIntegrationTypeConfig.component1|component1(){}[0] + final fun copy(dev.kord.common.entity.optional/Optional = ...): dev.kord.common.entity/ApplicationIntegrationTypeConfig // dev.kord.common.entity/ApplicationIntegrationTypeConfig.copy|copy(dev.kord.common.entity.optional.Optional){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.common.entity/ApplicationIntegrationTypeConfig.equals|equals(kotlin.Any?){}[0] final fun hashCode(): kotlin/Int // dev.kord.common.entity/ApplicationIntegrationTypeConfig.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // dev.kord.common.entity/ApplicationIntegrationTypeConfig.toString|toString(){}[0] @@ -405,6 +405,8 @@ final class dev.kord.common.entity/ApplicationIntegrationTypeConfig { // dev.kor } final object Companion { // dev.kord.common.entity/ApplicationIntegrationTypeConfig.Companion|null[0] + final val $childSerializers // dev.kord.common.entity/ApplicationIntegrationTypeConfig.Companion.$childSerializers|{}$childSerializers[0] + final fun serializer(): kotlinx.serialization/KSerializer // dev.kord.common.entity/ApplicationIntegrationTypeConfig.Companion.serializer|serializer(){}[0] } } diff --git a/common/src/commonMain/kotlin/entity/DiscordApplication.kt b/common/src/commonMain/kotlin/entity/DiscordApplication.kt index 784a5ecdbb5..a07502a0352 100644 --- a/common/src/commonMain/kotlin/entity/DiscordApplication.kt +++ b/common/src/commonMain/kotlin/entity/DiscordApplication.kt @@ -184,5 +184,5 @@ public data class InstallParams( public data class ApplicationIntegrationTypeConfig( /** Install params for each installation context's default in-app authorization link */ @SerialName("oauth2_install_params") - val oauth2InstallParams: InstallParams + val oauth2InstallParams: Optional = Optional.Missing() )