feat: add guilds list in left sidebar

This commit is contained in:
Divlo
2021-11-18 22:47:46 +01:00
parent accd36d1fc
commit ad945d7a7a
33 changed files with 1511 additions and 1017 deletions

View File

@ -12,20 +12,30 @@ export const guildSchema = {
createdAt: date.createdAt,
updatedAt: date.updatedAt
}
export const guildObjectSchema = Type.Object(guildSchema)
export type Guild = Static<typeof guildObjectSchema>
export const guildWithDefaultChannelIdSchema = {
...guildSchema,
defaultChannelId: id
}
export const guildWithDefaultChannelObjectSchema = Type.Object(
guildWithDefaultChannelIdSchema
)
export type GuildWithDefaultChannelId = Static<
typeof guildWithDefaultChannelObjectSchema
>
export const guildCompleteSchema = {
...guildSchema,
channels: Type.Array(Type.Object(channelSchema)),
members: Type.Array(Type.Object(memberSchema))
}
export const guildCompleteObjectSchema = Type.Object(guildCompleteSchema)
export type GuildComplete = Static<typeof guildCompleteObjectSchema>
export const guildPublicObjectSchema = Type.Object({
...guildSchema,
membersCount: Type.Integer({ min: 1 })
})
export const guildCompleteObjectSchema = Type.Object(guildCompleteSchema)
export type GuildComplete = Static<typeof guildCompleteObjectSchema>
export type GuildPublic = Static<typeof guildPublicObjectSchema>