Skip to content

Commit

Permalink
chore: reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
lukellmann committed Sep 9, 2024
1 parent 2c44cb7 commit 104ada0
Show file tree
Hide file tree
Showing 19 changed files with 168 additions and 174 deletions.
26 changes: 13 additions & 13 deletions core/api/core.api
Original file line number Diff line number Diff line change
Expand Up @@ -3533,20 +3533,20 @@ public final class dev/kord/core/cache/data/EmojiDataKt {

public final class dev/kord/core/cache/data/EntitlementData {
public static final field Companion Ldev/kord/core/cache/data/EntitlementData$Companion;
public fun <init> (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/EntitlementType;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;ZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;)V
public synthetic fun <init> (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/EntitlementType;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;ZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun <init> (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/EntitlementType;ZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;)V
public synthetic fun <init> (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/EntitlementType;ZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ldev/kord/common/entity/Snowflake;
public final fun component10 ()Ldev/kord/common/entity/optional/OptionalBoolean;
public final fun component2 ()Ldev/kord/common/entity/Snowflake;
public final fun component3 ()Ldev/kord/common/entity/EntitlementType;
public final fun component4 ()Ldev/kord/common/entity/Snowflake;
public final fun component5 ()Ldev/kord/common/entity/optional/OptionalSnowflake;
public final fun component6 ()Ldev/kord/common/entity/optional/OptionalSnowflake;
public final fun component7 ()Z
public final fun component3 ()Ldev/kord/common/entity/Snowflake;
public final fun component4 ()Ldev/kord/common/entity/optional/OptionalSnowflake;
public final fun component5 ()Ldev/kord/common/entity/EntitlementType;
public final fun component6 ()Z
public final fun component7 ()Ldev/kord/common/entity/optional/Optional;
public final fun component8 ()Ldev/kord/common/entity/optional/Optional;
public final fun component9 ()Ldev/kord/common/entity/optional/Optional;
public final fun copy (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/EntitlementType;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;ZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/core/cache/data/EntitlementData;
public static synthetic fun copy$default (Ldev/kord/core/cache/data/EntitlementData;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/EntitlementType;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;ZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/core/cache/data/EntitlementData;
public final fun component9 ()Ldev/kord/common/entity/optional/OptionalSnowflake;
public final fun copy (Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/EntitlementType;ZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;)Ldev/kord/core/cache/data/EntitlementData;
public static synthetic fun copy$default (Ldev/kord/core/cache/data/EntitlementData;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/Snowflake;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/EntitlementType;ZLdev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/Optional;Ldev/kord/common/entity/optional/OptionalSnowflake;Ldev/kord/common/entity/optional/OptionalBoolean;ILjava/lang/Object;)Ldev/kord/core/cache/data/EntitlementData;
public fun equals (Ljava/lang/Object;)Z
public final fun getApplicationId ()Ldev/kord/common/entity/Snowflake;
public final fun getConsumed ()Ldev/kord/common/entity/optional/OptionalBoolean;
Expand Down Expand Up @@ -11716,7 +11716,7 @@ public final class dev/kord/core/event/channel/thread/UnknownChannelThreadUpdate
}

public final class dev/kord/core/event/entitlement/EntitlementCreateEvent : dev/kord/core/event/Event {
public fun <init> (Ldev/kord/core/entity/Entitlement;ILjava/lang/Object;Ldev/kord/core/Kord;)V
public fun <init> (Ldev/kord/core/entity/Entitlement;Ldev/kord/core/Kord;ILjava/lang/Object;)V
public fun getCustomContext ()Ljava/lang/Object;
public final fun getEntitlement ()Ldev/kord/core/entity/Entitlement;
public fun getGateway ()Ldev/kord/gateway/Gateway;
Expand All @@ -11726,7 +11726,7 @@ public final class dev/kord/core/event/entitlement/EntitlementCreateEvent : dev/
}

public final class dev/kord/core/event/entitlement/EntitlementDeleteEvent : dev/kord/core/event/Event {
public fun <init> (Ldev/kord/core/entity/Entitlement;ILjava/lang/Object;Ldev/kord/core/Kord;)V
public fun <init> (Ldev/kord/core/entity/Entitlement;Ldev/kord/core/Kord;ILjava/lang/Object;)V
public fun getCustomContext ()Ljava/lang/Object;
public final fun getEntitlement ()Ldev/kord/core/entity/Entitlement;
public fun getGateway ()Ldev/kord/gateway/Gateway;
Expand All @@ -11736,7 +11736,7 @@ public final class dev/kord/core/event/entitlement/EntitlementDeleteEvent : dev/
}

public final class dev/kord/core/event/entitlement/EntitlementUpdateEvent : dev/kord/core/event/Event {
public fun <init> (Ldev/kord/core/entity/Entitlement;Ldev/kord/core/entity/Entitlement;ILjava/lang/Object;Ldev/kord/core/Kord;)V
public fun <init> (Ldev/kord/core/entity/Entitlement;Ldev/kord/core/entity/Entitlement;Ldev/kord/core/Kord;ILjava/lang/Object;)V
public fun getCustomContext ()Ljava/lang/Object;
public final fun getEntitlement ()Ldev/kord/core/entity/Entitlement;
public fun getGateway ()Ldev/kord/gateway/Gateway;
Expand Down
22 changes: 11 additions & 11 deletions core/api/core.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -3121,7 +3121,7 @@ final class dev.kord.core.cache.data/EmojiData { // dev.kord.core.cache.data/Emo
}

final class dev.kord.core.cache.data/EntitlementData { // dev.kord.core.cache.data/EntitlementData|null[0]
constructor <init>(dev.kord.common.entity/Snowflake, dev.kord.common.entity/Snowflake, dev.kord.common.entity/EntitlementType, dev.kord.common.entity/Snowflake, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., kotlin/Boolean, dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant?> = ..., dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant> = ..., dev.kord.common.entity.optional/OptionalBoolean = ...) // dev.kord.core.cache.data/EntitlementData.<init>|<init>(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.EntitlementType;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;kotlin.Boolean;dev.kord.common.entity.optional.Optional<kotlinx.datetime.Instant?>;dev.kord.common.entity.optional.Optional<kotlinx.datetime.Instant>;dev.kord.common.entity.optional.OptionalBoolean){}[0]
constructor <init>(dev.kord.common.entity/Snowflake, dev.kord.common.entity/Snowflake, dev.kord.common.entity/Snowflake, dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/EntitlementType, kotlin/Boolean, dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant> = ..., dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant?> = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalBoolean = ...) // dev.kord.core.cache.data/EntitlementData.<init>|<init>(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.EntitlementType;kotlin.Boolean;dev.kord.common.entity.optional.Optional<kotlinx.datetime.Instant>;dev.kord.common.entity.optional.Optional<kotlinx.datetime.Instant?>;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalBoolean){}[0]

final val applicationId // dev.kord.core.cache.data/EntitlementData.applicationId|{}applicationId[0]
final fun <get-applicationId>(): dev.kord.common.entity/Snowflake // dev.kord.core.cache.data/EntitlementData.applicationId.<get-applicationId>|<get-applicationId>(){}[0]
Expand All @@ -3147,14 +3147,14 @@ final class dev.kord.core.cache.data/EntitlementData { // dev.kord.core.cache.da
final fun component1(): dev.kord.common.entity/Snowflake // dev.kord.core.cache.data/EntitlementData.component1|component1(){}[0]
final fun component10(): dev.kord.common.entity.optional/OptionalBoolean // dev.kord.core.cache.data/EntitlementData.component10|component10(){}[0]
final fun component2(): dev.kord.common.entity/Snowflake // dev.kord.core.cache.data/EntitlementData.component2|component2(){}[0]
final fun component3(): dev.kord.common.entity/EntitlementType // dev.kord.core.cache.data/EntitlementData.component3|component3(){}[0]
final fun component4(): dev.kord.common.entity/Snowflake // dev.kord.core.cache.data/EntitlementData.component4|component4(){}[0]
final fun component5(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.core.cache.data/EntitlementData.component5|component5(){}[0]
final fun component6(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.core.cache.data/EntitlementData.component6|component6(){}[0]
final fun component7(): kotlin/Boolean // dev.kord.core.cache.data/EntitlementData.component7|component7(){}[0]
final fun component3(): dev.kord.common.entity/Snowflake // dev.kord.core.cache.data/EntitlementData.component3|component3(){}[0]
final fun component4(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.core.cache.data/EntitlementData.component4|component4(){}[0]
final fun component5(): dev.kord.common.entity/EntitlementType // dev.kord.core.cache.data/EntitlementData.component5|component5(){}[0]
final fun component6(): kotlin/Boolean // dev.kord.core.cache.data/EntitlementData.component6|component6(){}[0]
final fun component7(): dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant> // dev.kord.core.cache.data/EntitlementData.component7|component7(){}[0]
final fun component8(): dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant?> // dev.kord.core.cache.data/EntitlementData.component8|component8(){}[0]
final fun component9(): dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant> // dev.kord.core.cache.data/EntitlementData.component9|component9(){}[0]
final fun copy(dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/EntitlementType = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., kotlin/Boolean = ..., dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant?> = ..., dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant> = ..., dev.kord.common.entity.optional/OptionalBoolean = ...): dev.kord.core.cache.data/EntitlementData // dev.kord.core.cache.data/EntitlementData.copy|copy(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.EntitlementType;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalSnowflake;kotlin.Boolean;dev.kord.common.entity.optional.Optional<kotlinx.datetime.Instant?>;dev.kord.common.entity.optional.Optional<kotlinx.datetime.Instant>;dev.kord.common.entity.optional.OptionalBoolean){}[0]
final fun component9(): dev.kord.common.entity.optional/OptionalSnowflake // dev.kord.core.cache.data/EntitlementData.component9|component9(){}[0]
final fun copy(dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity/Snowflake = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity/EntitlementType = ..., kotlin/Boolean = ..., dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant> = ..., dev.kord.common.entity.optional/Optional<kotlinx.datetime/Instant?> = ..., dev.kord.common.entity.optional/OptionalSnowflake = ..., dev.kord.common.entity.optional/OptionalBoolean = ...): dev.kord.core.cache.data/EntitlementData // dev.kord.core.cache.data/EntitlementData.copy|copy(dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.Snowflake;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.EntitlementType;kotlin.Boolean;dev.kord.common.entity.optional.Optional<kotlinx.datetime.Instant>;dev.kord.common.entity.optional.Optional<kotlinx.datetime.Instant?>;dev.kord.common.entity.optional.OptionalSnowflake;dev.kord.common.entity.optional.OptionalBoolean){}[0]
final fun equals(kotlin/Any?): kotlin/Boolean // dev.kord.core.cache.data/EntitlementData.equals|equals(kotlin.Any?){}[0]
final fun hashCode(): kotlin/Int // dev.kord.core.cache.data/EntitlementData.hashCode|hashCode(){}[0]
final fun toString(): kotlin/String // dev.kord.core.cache.data/EntitlementData.toString|toString(){}[0]
Expand Down Expand Up @@ -9496,7 +9496,7 @@ final class dev.kord.core.event.channel/VoiceChannelUpdateEvent : dev.kord.core.
}

final class dev.kord.core.event.entitlement/EntitlementCreateEvent : dev.kord.core.event/Event { // dev.kord.core.event.entitlement/EntitlementCreateEvent|null[0]
constructor <init>(dev.kord.core.entity/Entitlement, kotlin/Int, kotlin/Any?, dev.kord.core/Kord) // dev.kord.core.event.entitlement/EntitlementCreateEvent.<init>|<init>(dev.kord.core.entity.Entitlement;kotlin.Int;kotlin.Any?;dev.kord.core.Kord){}[0]
constructor <init>(dev.kord.core.entity/Entitlement, dev.kord.core/Kord, kotlin/Int, kotlin/Any?) // dev.kord.core.event.entitlement/EntitlementCreateEvent.<init>|<init>(dev.kord.core.entity.Entitlement;dev.kord.core.Kord;kotlin.Int;kotlin.Any?){}[0]

final val customContext // dev.kord.core.event.entitlement/EntitlementCreateEvent.customContext|{}customContext[0]
final fun <get-customContext>(): kotlin/Any? // dev.kord.core.event.entitlement/EntitlementCreateEvent.customContext.<get-customContext>|<get-customContext>(){}[0]
Expand All @@ -9511,7 +9511,7 @@ final class dev.kord.core.event.entitlement/EntitlementCreateEvent : dev.kord.co
}

final class dev.kord.core.event.entitlement/EntitlementDeleteEvent : dev.kord.core.event/Event { // dev.kord.core.event.entitlement/EntitlementDeleteEvent|null[0]
constructor <init>(dev.kord.core.entity/Entitlement, kotlin/Int, kotlin/Any?, dev.kord.core/Kord) // dev.kord.core.event.entitlement/EntitlementDeleteEvent.<init>|<init>(dev.kord.core.entity.Entitlement;kotlin.Int;kotlin.Any?;dev.kord.core.Kord){}[0]
constructor <init>(dev.kord.core.entity/Entitlement, dev.kord.core/Kord, kotlin/Int, kotlin/Any?) // dev.kord.core.event.entitlement/EntitlementDeleteEvent.<init>|<init>(dev.kord.core.entity.Entitlement;dev.kord.core.Kord;kotlin.Int;kotlin.Any?){}[0]

final val customContext // dev.kord.core.event.entitlement/EntitlementDeleteEvent.customContext|{}customContext[0]
final fun <get-customContext>(): kotlin/Any? // dev.kord.core.event.entitlement/EntitlementDeleteEvent.customContext.<get-customContext>|<get-customContext>(){}[0]
Expand All @@ -9526,7 +9526,7 @@ final class dev.kord.core.event.entitlement/EntitlementDeleteEvent : dev.kord.co
}

final class dev.kord.core.event.entitlement/EntitlementUpdateEvent : dev.kord.core.event/Event { // dev.kord.core.event.entitlement/EntitlementUpdateEvent|null[0]
constructor <init>(dev.kord.core.entity/Entitlement, dev.kord.core.entity/Entitlement?, kotlin/Int, kotlin/Any?, dev.kord.core/Kord) // dev.kord.core.event.entitlement/EntitlementUpdateEvent.<init>|<init>(dev.kord.core.entity.Entitlement;dev.kord.core.entity.Entitlement?;kotlin.Int;kotlin.Any?;dev.kord.core.Kord){}[0]
constructor <init>(dev.kord.core.entity/Entitlement, dev.kord.core.entity/Entitlement?, dev.kord.core/Kord, kotlin/Int, kotlin/Any?) // dev.kord.core.event.entitlement/EntitlementUpdateEvent.<init>|<init>(dev.kord.core.entity.Entitlement;dev.kord.core.entity.Entitlement?;dev.kord.core.Kord;kotlin.Int;kotlin.Any?){}[0]

final val customContext // dev.kord.core.event.entitlement/EntitlementUpdateEvent.customContext|{}customContext[0]
final fun <get-customContext>(): kotlin/Any? // dev.kord.core.event.entitlement/EntitlementUpdateEvent.customContext.<get-customContext>|<get-customContext>(){}[0]
Expand Down
21 changes: 16 additions & 5 deletions core/src/commonMain/kotlin/cache/data/EntitlementData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,32 @@ import kotlinx.serialization.Serializable
@Serializable
public data class EntitlementData(
val id: Snowflake,
val applicationId: Snowflake,
val type: EntitlementType,
val skuId: Snowflake,
val guildId: OptionalSnowflake = OptionalSnowflake.Missing,
val applicationId: Snowflake,
val userId: OptionalSnowflake = OptionalSnowflake.Missing,
val type: EntitlementType,
val deleted: Boolean,
val endsAt: Optional<Instant?> = Optional.Missing(),
val startsAt: Optional<Instant> = Optional.Missing(),
val endsAt: Optional<Instant?> = Optional.Missing(),
val guildId: OptionalSnowflake = OptionalSnowflake.Missing,
val consumed: OptionalBoolean = OptionalBoolean.Missing,
) {
public companion object {
public val description: DataDescription<EntitlementData, Snowflake> = description(EntitlementData::id)

public fun from(entity: DiscordEntitlement): EntitlementData = with(entity) {
EntitlementData(id, applicationId, type, skuId, guildId, userId, deleted, endsAt, startsAt, consumed)
EntitlementData(
id = id,
skuId = skuId,
applicationId = applicationId,
userId = userId,
type = type,
deleted = deleted,
startsAt = startsAt,
endsAt = endsAt,
guildId = guildId,
consumed = consumed,
)
}
}
}
2 changes: 1 addition & 1 deletion core/src/commonMain/kotlin/cache/data/GuildData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import kotlinx.datetime.Instant
import kotlinx.serialization.Serializable

private val ApplicationCommandData.nullableGuildId get() = guildId.value
private val EntitlementData.nullableGuildId get() = guildId.value
private val MessageData.nullableGuildId get() = guildId.value
private val ChannelData.nullableGuildId get() = guildId.value
private val WebhookData.nullableGuildId get() = guildId.value
private val StickerData.nullableGuildId get() = guildId.value
private val EntitlementData.nullableGuildId get() = guildId.value

@Serializable
public data class GuildData(
Expand Down
2 changes: 1 addition & 1 deletion core/src/commonMain/kotlin/cache/data/UserData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import dev.kord.common.entity.optional.Optional
import dev.kord.common.entity.optional.OptionalBoolean
import kotlinx.serialization.Serializable

private val EntitlementData.nullableUserId get() = userId.value
private val ThreadMemberData.nullableUserId get() = userId.value
private val EntitlementData.nullableUserId get() = userId.value

@Serializable
public data class UserData(
Expand Down
Loading

0 comments on commit 104ada0

Please sign in to comment.