campose-api / src /types.mts
jbilcke-hf's picture
jbilcke-hf HF staff
initial commit
5b3c62d
raw
history blame
633 Bytes
export type PostVisibility =
| "featured" // featured by admins
| "trending" // top trending / received more than 10 upvotes
| "normal" // default visibility
export type Post = {
postId: string
appId: string
prompt: string
previewUrl: string
assetUrl: string
createdAt: string
visibility: PostVisibility
upvotes: number
downvotes: number
}
export type CreatePostResponse = {
success?: boolean
error?: string
post: Post
}
export type GetAppPostsResponse = {
success?: boolean
error?: string
posts: Post[]
}
export type GetAppPostResponse = {
success?: boolean
error?: string
post: Post
}