manifold/common/user.ts
Marshall Polaris 72b21925e5
Allow users to generate an API key in their profile (#182)
* Add /private-users/apiKey to DB

* Add field to edit API key on profile

* Move API key to bottom of profile page

Austin thinks this is better since most people don't care about it.
2022-05-15 20:41:07 -07:00

40 lines
882 B
TypeScript

export type User = {
id: string
createdTime: number
name: string
username: string
avatarUrl?: string
// For their user page
bio?: string
bannerUrl?: string
website?: string
twitterHandle?: string
discordHandle?: string
balance: number
totalDeposits: number
totalPnLCached: number
creatorVolumeCached: number
followedCategories?: string[]
}
export const STARTING_BALANCE = 1000
export const SUS_STARTING_BALANCE = 10 // for sus users, i.e. multiple sign ups for same person
export type PrivateUser = {
id: string // same as User.id
username: string // denormalized from User
email?: string
unsubscribedFromResolutionEmails?: boolean
unsubscribedFromCommentEmails?: boolean
unsubscribedFromAnswerEmails?: boolean
unsubscribedFromGenericEmails?: boolean
initialDeviceToken?: string
initialIpAddress?: string
apiKey?: string
}