brutalism design
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { Type } from 'typebox'
|
||||
|
||||
export const UserSchema = Type.Object({
|
||||
id: Type.String(),
|
||||
username: Type.String(),
|
||||
displayName: Type.String(),
|
||||
createdAt: Type.String({ format: 'date-time' }),
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Type } from 'typebox'
|
||||
|
||||
export const ChannelSchema = Type.Object({
|
||||
id: Type.String(),
|
||||
ownerId: Type.Union([Type.String(), Type.Null()]),
|
||||
ownerUsername: Type.Union([Type.String(), Type.Null()]),
|
||||
name: Type.String(),
|
||||
persistent: Type.Boolean(),
|
||||
}, { $id: 'Channel' })
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
import { Type } from 'typebox'
|
||||
import { AttachmentSchema } from './attachment.ts'
|
||||
|
||||
export const ReplySchema = Type.Object({
|
||||
messageId: Type.String({ format: 'uuid' }),
|
||||
senderId: Type.String({ format: 'uuid' }),
|
||||
senderUsername: Type.String(),
|
||||
text: Type.String(),
|
||||
}, { $id: 'Reply' })
|
||||
|
||||
export const ChatMessageSchema = Type.Object({
|
||||
id: Type.String({ format: 'uuid' }),
|
||||
senderId: Type.String({ format: 'uuid' }),
|
||||
senderUsername: Type.String(),
|
||||
text: Type.String({ minLength: 1 }),
|
||||
createdAt: Type.String({ format: 'date-time' }),
|
||||
updatedAt: Type.String({ format: 'date-time' }),
|
||||
|
||||
attachments: Type.Array(Type.String({ format: 'uuid' })),
|
||||
attachments: Type.Array(AttachmentSchema),
|
||||
}, { $id: 'ChatMessage' })
|
||||
|
||||
export const NewChatMessagePayloadSchema = Type.Object({
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Type } from 'typebox'
|
||||
|
||||
export const GetUserQuerySchema = Type.Partial(Type.Object({
|
||||
username: Type.String(),
|
||||
id: Type.String(),
|
||||
}), { $id: 'GetUserQuery' })
|
||||
|
||||
export const UserPreferencesSchema = Type.Object({
|
||||
|
||||
Reference in New Issue
Block a user