2022-06-01 13:11:25 +00:00
|
|
|
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
|
2022-06-06 17:36:59 +00:00
|
|
|
sourceUpdateType?: notification_source_update_types
|
2022-06-01 13:11:25 +00:00
|
|
|
sourceContractId?: string
|
|
|
|
sourceUserName?: string
|
|
|
|
sourceUserUsername?: string
|
|
|
|
sourceUserAvatarUrl?: string
|
2022-06-08 14:43:24 +00:00
|
|
|
sourceText?: string
|
2022-06-22 16:35:50 +00:00
|
|
|
|
2022-06-08 14:43:24 +00:00
|
|
|
sourceContractTitle?: string
|
|
|
|
sourceContractCreatorUsername?: string
|
|
|
|
sourceContractSlug?: string
|
2022-06-22 16:35:50 +00:00
|
|
|
|
|
|
|
sourceSlug?: string
|
|
|
|
sourceTitle?: string
|
2022-07-05 23:18:37 +00:00
|
|
|
|
|
|
|
isSeenOnHref?: string
|
2022-06-01 13:11:25 +00:00
|
|
|
}
|
|
|
|
export type notification_source_types =
|
|
|
|
| 'contract'
|
|
|
|
| 'comment'
|
|
|
|
| 'bet'
|
|
|
|
| 'answer'
|
|
|
|
| 'liquidity'
|
2022-06-06 17:36:59 +00:00
|
|
|
| 'follow'
|
|
|
|
| 'tip'
|
|
|
|
| 'admin_message'
|
2022-06-22 16:35:50 +00:00
|
|
|
| 'group'
|
2022-07-01 13:47:19 +00:00
|
|
|
| 'user'
|
2022-07-05 17:29:26 +00:00
|
|
|
| 'bonus'
|
2022-08-04 21:27:02 +00:00
|
|
|
| 'challenge'
|
2022-08-19 17:10:32 +00:00
|
|
|
| 'betting_streak_bonus'
|
2022-08-22 05:22:49 +00:00
|
|
|
| 'loan'
|
2022-06-01 13:11:25 +00:00
|
|
|
|
2022-06-06 17:36:59 +00:00
|
|
|
export type notification_source_update_types =
|
2022-06-01 13:11:25 +00:00
|
|
|
| 'created'
|
|
|
|
| 'updated'
|
|
|
|
| 'resolved'
|
2022-06-06 17:36:59 +00:00
|
|
|
| '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'
|
2022-06-08 14:43:24 +00:00
|
|
|
| 'you_follow_user'
|
2022-06-22 16:35:50 +00:00
|
|
|
| 'added_you_to_group'
|
2022-07-01 13:47:19 +00:00
|
|
|
| 'you_referred_user'
|
|
|
|
| 'user_joined_to_bet_on_your_market'
|
2022-07-05 17:29:26 +00:00
|
|
|
| 'unique_bettors_on_your_contract'
|
2022-07-05 23:18:37 +00:00
|
|
|
| 'on_group_you_are_member_of'
|
2022-07-06 19:30:51 +00:00
|
|
|
| 'tip_received'
|
2022-07-10 18:05:44 +00:00
|
|
|
| 'bet_fill'
|
2022-07-18 16:40:44 +00:00
|
|
|
| 'user_joined_from_your_group_invite'
|
2022-08-04 21:27:02 +00:00
|
|
|
| 'challenge_accepted'
|
2022-08-19 17:10:32 +00:00
|
|
|
| 'betting_streak_incremented'
|
2022-08-22 05:22:49 +00:00
|
|
|
| 'loan_income'
|