Skip to content

Commit

Permalink
Merge pull request #11 from Enaium/develop
Browse files Browse the repository at this point in the history
update some response
  • Loading branch information
Enaium authored Apr 1, 2024
2 parents 88ee2a4 + b0f992f commit 0c3a74d
Show file tree
Hide file tree
Showing 33 changed files with 399 additions and 52 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ java {
}

group = "cn.enaium"
version = "0.4.0"
version = "0.4.1"

repositories {
mavenCentral()
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/cn/enaium/kookstarter/model/event/ChannelEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,31 @@ public record Body(@JsonProperty("id") String id, @JsonProperty("name") String n
@JsonProperty("level") Integer level,
@JsonProperty("slow_mode") Integer slowMode,
@JsonProperty("topic") String topic, @JsonProperty("type") Integer type,
@JsonProperty("permission_overwrites") List<PermissionOverwrites> permissionOverwrites,
@JsonProperty("permission_users") List<PermissionUsers> permissionUsers,
@JsonProperty("permission_sync") Integer permissionSync) {
public record PermissionOverwrites(@JsonProperty("role_id") Integer roleId,
@JsonProperty("allow") Integer allow,
@JsonProperty("deny") Integer deny) {
}

public record PermissionUsers(@JsonProperty("user") User user,
@JsonProperty("allow") Integer allow,
@JsonProperty("deny") Integer deny) {
public record User(@JsonProperty("id") String id,
@JsonProperty("username") String username,
@JsonProperty("identify_num") String identifyNum,
@JsonProperty("online") Boolean online,
@JsonProperty("os") String os,
@JsonProperty("status") Integer status,
@JsonProperty("avatar") String avatar,
@JsonProperty("mobile_verified") Boolean mobileVerified,
@JsonProperty("nickname") String nickname,
@JsonProperty("roles") List<Object> roles,
@JsonProperty("joined_at") Long joinedAt,
@JsonProperty("active_time") Long activeTime) {
}
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,13 @@ public record TagInfo(@JsonProperty("color") String color,
}

public record Kmarkdown(@JsonProperty("mention") List<String> mention,
@JsonProperty("mention_part") List<MentionPart> mentionPart,
@JsonProperty("item_part") List<Object> itemPart) {
public record MentionPart(@JsonProperty("id") String id,
@JsonProperty("username") String username,
@JsonProperty("full_name") String fullName,
@JsonProperty("avatar") String avatar) {
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,32 @@

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
* @author Enaium
* @since 0.4.0
*/
public record BlacklistListResponse(@JsonProperty("code") Integer code,
@JsonProperty("message") String message, @JsonProperty("data") Data data) {
public record Data(@JsonProperty("meta") Meta meta, @JsonProperty("sort") Sort sort) {
public record Data(@JsonProperty("items") List<Items> items, @JsonProperty("meta") Meta meta,
@JsonProperty("sort") Sort sort) {
public record Items(@JsonProperty("user_id") String userId,
@JsonProperty("created_time") Long createdTime,
@JsonProperty("remark") String remark, @JsonProperty("user") User user) {
public record User(@JsonProperty("id") String id,
@JsonProperty("username") String username,
@JsonProperty("identify_num") String identifyNum,
@JsonProperty("online") Boolean online, @JsonProperty("os") String os,
@JsonProperty("status") Integer status, @JsonProperty("avatar") String avatar,
@JsonProperty("vip_avatar") String vipAvatar,
@JsonProperty("banner") String banner,
@JsonProperty("nickname") String nickname,
@JsonProperty("roles") List<Object> roles,
@JsonProperty("is_vip") Boolean isVip, @JsonProperty("bot") Boolean bot) {
}
}

public record Meta(@JsonProperty("page") Integer page,
@JsonProperty("page_total") Integer pageTotal,
@JsonProperty("page_size") Integer pageSize, @JsonProperty("total") Integer total) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ public record Data(@JsonProperty("id") String id, @JsonProperty("guild_id") Stri
@JsonProperty("limit_amount") Integer limitAmount,
@JsonProperty("is_category") Boolean isCategory,
@JsonProperty("permission_sync") Integer permissionSync,
@JsonProperty("permission_overwrites") List<PermissionOverwrites> permissionOverwrites,
@JsonProperty("permission_users") List<Object> permissionUsers,
@JsonProperty("voice_quality") String voiceQuality,
@JsonProperty("server_url") String serverUrl) {
public record PermissionOverwrites(@JsonProperty("role_id") Integer roleId,
@JsonProperty("allow") Integer allow, @JsonProperty("deny") Integer deny) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@
*/
public record ChannelListResponse(@JsonProperty("code") Integer code,
@JsonProperty("message") String message, @JsonProperty("data") Data data) {
public record Data(@JsonProperty("meta") Meta meta, @JsonProperty("sort") List<Object> sort) {
public record Data(@JsonProperty("items") List<Items> items, @JsonProperty("meta") Meta meta,
@JsonProperty("sort") List<Object> sort) {
public record Items(@JsonProperty("id") String id, @JsonProperty("user_id") String userId,
@JsonProperty("parent_id") String parentId, @JsonProperty("name") String name,
@JsonProperty("type") Integer type, @JsonProperty("level") Integer level,
@JsonProperty("limit_amount") Integer limitAmount,
@JsonProperty("is_category") Boolean isCategory) {
}

public record Meta(@JsonProperty("page") Integer page,
@JsonProperty("page_total") Integer pageTotal,
@JsonProperty("page_size") Integer pageSize, @JsonProperty("total") Integer total) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,35 @@

import com.fasterxml.jackson.annotation.JsonProperty;

import java.lang.Integer;
import java.lang.String;
import java.util.List;

/**
* @author Enaium
* @since 0.4.0
*/
public record ChannelRoleIndexResponse(@JsonProperty("code") Integer code,
@JsonProperty("message") String message, @JsonProperty("data") Data data) {
public record Data(@JsonProperty("permission_sync") Integer permissionSync) {
public record Data(
@JsonProperty("permission_overwrites") List<PermissionOverwrites> permissionOverwrites,
@JsonProperty("permission_users") List<PermissionUsers> permissionUsers,
@JsonProperty("permission_sync") Integer permissionSync) {
public record PermissionOverwrites(@JsonProperty("role_id") Integer roleId,
@JsonProperty("allow") Integer allow, @JsonProperty("deny") Integer deny) {
}

public record PermissionUsers(@JsonProperty("user") User user,
@JsonProperty("allow") Integer allow, @JsonProperty("deny") Integer deny) {
public record User(@JsonProperty("id") String id,
@JsonProperty("username") String username,
@JsonProperty("identify_num") String identifyNum,
@JsonProperty("online") Boolean online, @JsonProperty("os") String os,
@JsonProperty("status") Integer status, @JsonProperty("avatar") String avatar,
@JsonProperty("mobile_verified") Boolean mobileVerified,
@JsonProperty("nickname") String nickname,
@JsonProperty("roles") List<Object> roles,
@JsonProperty("joined_at") Long joinedAt,
@JsonProperty("active_time") Long activeTime) {
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
*/
public record ChannelRoleSyncResponse(@JsonProperty("code") Integer code,
@JsonProperty("message") String message, @JsonProperty("data") Data data) {
public record Data(@JsonProperty("permission_users") List<Object> permissionUsers) {
public record Data(
@JsonProperty("permission_overwrites") List<PermissionOverwrites> permissionOverwrites,
@JsonProperty("permission_users") List<Object> permissionUsers) {
public record PermissionOverwrites(@JsonProperty("role_id") Integer roleId,
@JsonProperty("allow") Integer allow, @JsonProperty("deny") Integer deny) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
* @author Enaium
* @since 0.4.0
Expand All @@ -20,7 +22,35 @@ public record Data(@JsonProperty("id") String id, @JsonProperty("name") String n
@JsonProperty("server_url") String serverUrl, @JsonProperty("level") Integer level,
@JsonProperty("slow_mode") Integer slowMode, @JsonProperty("topic") String topic,
@JsonProperty("is_master") Boolean isMaster, @JsonProperty("type") Integer type,
@JsonProperty("permission_overwrites") List<PermissionOverwrites> permissionOverwrites,
@JsonProperty("permission_users") List<PermissionUsers> permissionUsers,
@JsonProperty("permission_sync") Integer permissionSync,
@JsonProperty("mode") Integer mode, @JsonProperty("has_password") Boolean hasPassword) {
public record PermissionOverwrites(@JsonProperty("role_id") Integer roleId,
@JsonProperty("allow") Integer allow, @JsonProperty("deny") Integer deny) {
}

public record PermissionUsers(@JsonProperty("user") User user,
@JsonProperty("allow") Integer allow, @JsonProperty("deny") Integer deny) {
public record User(@JsonProperty("id") String id,
@JsonProperty("username") String username,
@JsonProperty("identify_num") String identifyNum,
@JsonProperty("online") Boolean online, @JsonProperty("os") String os,
@JsonProperty("status") Integer status, @JsonProperty("avatar") String avatar,
@JsonProperty("vip_avatar") String vipAvatar,
@JsonProperty("banner") String banner,
@JsonProperty("nickname") String nickname,
@JsonProperty("roles") List<Integer> roles,
@JsonProperty("is_vip") Boolean isVip,
@JsonProperty("is_ai_reduce_noise") Boolean isAiReduceNoise,
@JsonProperty("bot") Boolean bot, @JsonProperty("tag_info") TagInfo tagInfo,
@JsonProperty("mobile_verified") Boolean mobileVerified,
@JsonProperty("joined_at") Long joinedAt,
@JsonProperty("active_time") Long activeTime) {
public record TagInfo(@JsonProperty("color") String color,
@JsonProperty("text") String text) {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,33 @@

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
* @author Enaium
* @since 0.4.0
*/
public record ChannelUserGetJoinedChannelResponse(@JsonProperty("code") Integer code,
@JsonProperty("message") String message,
@JsonProperty("data") Data data) {
public record Data(@JsonProperty("meta") Meta meta, @JsonProperty("sort") Sort sort) {
public record Data(@JsonProperty("items") List<Items> items, @JsonProperty("meta") Meta meta,
@JsonProperty("sort") Sort sort) {
public record Items(@JsonProperty("id") String id, @JsonProperty("guild_id") String guildId,
@JsonProperty("user_id") String userId, @JsonProperty("parent_id") String parentId,
@JsonProperty("name") String name, @JsonProperty("topic") String topic,
@JsonProperty("type") Integer type, @JsonProperty("level") Integer level,
@JsonProperty("slow_mode") Integer slowMode,
@JsonProperty("limit_amount") Integer limitAmount,
@JsonProperty("is_category") Boolean isCategory,
@JsonProperty("permission_sync") Integer permissionSync,
@JsonProperty("permission_overwrites") List<PermissionOverwrites> permissionOverwrites,
@JsonProperty("permission_users") List<Object> permissionUsers) {
public record PermissionOverwrites(@JsonProperty("role_id") Integer roleId,
@JsonProperty("allow") Integer allow,
@JsonProperty("deny") Integer deny) {
}
}

public record Meta(@JsonProperty("page") Integer page,
@JsonProperty("page_total") Integer pageTotal,
@JsonProperty("page_size") Integer pageSize, @JsonProperty("total") Integer total) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,31 @@

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
* @author Enaium
* @since 0.4.0
*/
public record ChannelUserListResponse(@JsonProperty("code") Integer code,
@JsonProperty("message") String message) {
@JsonProperty("message") String message, @JsonProperty("data") List<Data> data) {
public record Data(@JsonProperty("id") String id, @JsonProperty("username") String username,
@JsonProperty("identify_num") String identifyNum,
@JsonProperty("online") Boolean online, @JsonProperty("os") String os,
@JsonProperty("status") Integer status, @JsonProperty("avatar") String avatar,
@JsonProperty("vip_avatar") String vipAvatar, @JsonProperty("banner") String banner,
@JsonProperty("nickname") String nickname, @JsonProperty("roles") List<Integer> roles,
@JsonProperty("is_vip") Boolean isVip,
@JsonProperty("is_ai_reduce_noise") Boolean isAiReduceNoise,
@JsonProperty("is_personal_card_bg") Boolean isPersonalCardBg,
@JsonProperty("bot") Boolean bot,
@JsonProperty("mobile_verified") Boolean mobileVerified,
@JsonProperty("joined_at") Long joinedAt, @JsonProperty("active_time") Long activeTime,
@JsonProperty("live_info") LiveInfo liveInfo) {
public record LiveInfo(@JsonProperty("in_live") Boolean inLive,
@JsonProperty("audience_count") Integer audienceCount,
@JsonProperty("live_thumb") String liveThumb,
@JsonProperty("live_start_time") Integer liveStartTime) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ public record Data(@JsonProperty("id") String id, @JsonProperty("guild_id") Stri
@JsonProperty("limit_amount") Integer limitAmount,
@JsonProperty("is_category") Boolean isCategory,
@JsonProperty("permission_sync") Integer permissionSync,
@JsonProperty("permission_overwrites") List<PermissionOverwrites> permissionOverwrites,
@JsonProperty("permission_users") List<Object> permissionUsers,
@JsonProperty("voice_quality") String voiceQuality,
@JsonProperty("server_url") String serverUrl,
@JsonProperty("children") List<String> children) {
public record PermissionOverwrites(@JsonProperty("role_id") Integer roleId,
@JsonProperty("allow") Integer allow, @JsonProperty("deny") Integer deny) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,27 @@

import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.List;

/**
* @author Enaium
* @since 0.4.0
*/
public record DirectMessageListResponse(@JsonProperty("code") Integer code,
@JsonProperty("message") String message, @JsonProperty("data") Data data) {
public record Data() {
public record Data(@JsonProperty("items") List<Items> items) {
public record Items(@JsonProperty("id") String id, @JsonProperty("type") Integer type,
@JsonProperty("content") String content,
@JsonProperty("embeds") List<Object> embeds,
@JsonProperty("attachments") List<Object> attachments,
@JsonProperty("create_at") Long createAt,
@JsonProperty("updated_at") Integer updatedAt,
@JsonProperty("reactions") List<Object> reactions,
@JsonProperty("author_id") String authorId,
@JsonProperty("image_name") String imageName,
@JsonProperty("read_status") Boolean readStatus,
@JsonProperty("quote") Object quote,
@JsonProperty("mention_info") Object mentionInfo) {
}
}
}
Loading

0 comments on commit 0c3a74d

Please sign in to comment.