cf508fd8b6
* Members and contracts now documents * undo loans change? * Handle closed group * Slight refactoring * Don't allow modification of private groups contracts * Add back in numMembers * Update group field names * Update firestore rules * Update firestore rules * Handle updated groups * update start numbers * Lint * Lint
33 lines
881 B
TypeScript
33 lines
881 B
TypeScript
export type Group = {
|
|
id: string
|
|
slug: string
|
|
name: string
|
|
about: string
|
|
creatorId: string // User id
|
|
createdTime: number
|
|
mostRecentActivityTime: number
|
|
anyoneCanJoin: boolean
|
|
totalContracts: number
|
|
totalMembers: number
|
|
aboutPostId?: string
|
|
chatDisabled?: boolean
|
|
mostRecentContractAddedTime?: number
|
|
/** @deprecated - members and contracts now stored as subcollections*/
|
|
memberIds?: string[] // Deprecated
|
|
/** @deprecated - members and contracts now stored as subcollections*/
|
|
contractIds?: string[] // Deprecated
|
|
}
|
|
export const MAX_GROUP_NAME_LENGTH = 75
|
|
export const MAX_ABOUT_LENGTH = 140
|
|
export const MAX_ID_LENGTH = 60
|
|
export const NEW_USER_GROUP_SLUGS = ['updates', 'bugs', 'welcome']
|
|
export const GROUP_CHAT_SLUG = 'chat'
|
|
|
|
export type GroupLink = {
|
|
slug: string
|
|
name: string
|
|
groupId: string
|
|
createdTime: number
|
|
userId?: string
|
|
}
|