2022-06-22 16:35:50 +00:00
|
|
|
export type Group = {
|
|
|
|
id: string
|
|
|
|
slug: string
|
|
|
|
name: string
|
|
|
|
about: string
|
|
|
|
creatorId: string // User id
|
|
|
|
createdTime: number
|
|
|
|
mostRecentActivityTime: number
|
|
|
|
anyoneCanJoin: boolean
|
2022-09-03 00:06:48 +00:00
|
|
|
totalContracts: number
|
|
|
|
totalMembers: number
|
2022-08-30 12:39:10 +00:00
|
|
|
aboutPostId?: string
|
2022-09-23 19:11:50 +00:00
|
|
|
postIds: string[]
|
2022-07-13 21:11:22 +00:00
|
|
|
chatDisabled?: boolean
|
2022-07-15 12:52:08 +00:00
|
|
|
mostRecentContractAddedTime?: number
|
2022-09-12 19:54:11 +00:00
|
|
|
cachedLeaderboard?: {
|
|
|
|
topTraders: {
|
|
|
|
userId: string
|
|
|
|
score: number
|
|
|
|
}[]
|
|
|
|
topCreators: {
|
|
|
|
userId: string
|
|
|
|
score: number
|
|
|
|
}[]
|
|
|
|
}
|
2022-10-02 23:02:31 +00:00
|
|
|
pinnedItems: { itemId: string; type: 'post' | 'contract' }[]
|
2022-06-22 16:35:50 +00:00
|
|
|
}
|
2022-09-12 19:54:11 +00:00
|
|
|
|
2022-06-22 16:35:50 +00:00
|
|
|
export const MAX_GROUP_NAME_LENGTH = 75
|
|
|
|
export const MAX_ABOUT_LENGTH = 140
|
|
|
|
export const MAX_ID_LENGTH = 60
|
2022-07-13 21:11:22 +00:00
|
|
|
export const NEW_USER_GROUP_SLUGS = ['updates', 'bugs', 'welcome']
|
2022-07-15 12:52:08 +00:00
|
|
|
export const GROUP_CHAT_SLUG = 'chat'
|
2022-07-22 22:28:53 +00:00
|
|
|
|
|
|
|
export type GroupLink = {
|
|
|
|
slug: string
|
|
|
|
name: string
|
|
|
|
groupId: string
|
|
|
|
createdTime: number
|
|
|
|
userId?: string
|
|
|
|
}
|
2022-10-06 13:26:35 +00:00
|
|
|
export type GroupContractDoc = { contractId: string; createdTime: number }
|