3165e42119
* add trigger for updated user * Add referral bonuses and notifications for them * Cleanup * Add share group button, cleanup * Cleanup * Add referrals list to user profile * Remove unused * Referral bonus => constant * Refactor * Add referral txn to helper fn * Move reads into firebase transaction * Use effects to write referral info * Flex-wrap profile objects * Small ui changes * Restrict referral user to one update * Remove rogue semicolon * Note about group referral query details * Track referrals, add them to settings list
59 lines
1.3 KiB
TypeScript
59 lines
1.3 KiB
TypeScript
export type Notification = {
|
|
id: string
|
|
userId: string
|
|
reasonText?: string
|
|
reason?: notification_reason_types
|
|
createdTime: number
|
|
viewTime?: number
|
|
isSeen: boolean
|
|
|
|
sourceId?: string
|
|
sourceType?: notification_source_types
|
|
sourceUpdateType?: notification_source_update_types
|
|
sourceContractId?: string
|
|
sourceUserName?: string
|
|
sourceUserUsername?: string
|
|
sourceUserAvatarUrl?: string
|
|
sourceText?: string
|
|
|
|
sourceContractTitle?: string
|
|
sourceContractCreatorUsername?: string
|
|
sourceContractSlug?: string
|
|
|
|
sourceSlug?: string
|
|
sourceTitle?: string
|
|
}
|
|
export type notification_source_types =
|
|
| 'contract'
|
|
| 'comment'
|
|
| 'bet'
|
|
| 'answer'
|
|
| 'liquidity'
|
|
| 'follow'
|
|
| 'tip'
|
|
| 'admin_message'
|
|
| 'group'
|
|
| 'user'
|
|
|
|
export type notification_source_update_types =
|
|
| 'created'
|
|
| 'updated'
|
|
| 'resolved'
|
|
| 'deleted'
|
|
| 'closed'
|
|
|
|
export type notification_reason_types =
|
|
| 'tagged_user'
|
|
| 'on_users_contract'
|
|
| 'on_contract_with_users_shares_in'
|
|
| 'on_contract_with_users_shares_out'
|
|
| 'on_contract_with_users_answer'
|
|
| 'on_contract_with_users_comment'
|
|
| 'reply_to_users_answer'
|
|
| 'reply_to_users_comment'
|
|
| 'on_new_follow'
|
|
| 'you_follow_user'
|
|
| 'added_you_to_group'
|
|
| 'you_referred_user'
|
|
| 'user_joined_to_bet_on_your_market'
|