be-components 2.1.3 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/Components/Icons.js +173 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/api/index.js +1 -1
- package/lib/commonjs/MarketComponents/components/TeamEventMarket/api/index.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerCard.js +7 -6
- package/lib/commonjs/SocialComponents/PlayerCard.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerList.js +1 -0
- package/lib/commonjs/SocialComponents/PlayerList.js.map +1 -1
- package/lib/commonjs/SocialComponents/PlayerProfile/api/index.js +149 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/api/index.js.map +1 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PlayerFollowersList.js +138 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PlayerFollowersList.js.map +1 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PostsList.js +102 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/components/PostsList.js.map +1 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/index.js +565 -0
- package/lib/commonjs/SocialComponents/PlayerProfile/index.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/DraftTextEntities.js +36 -0
- package/lib/commonjs/SocialComponents/PostCard/components/DraftTextEntities.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/DraftTextViewer.js +59 -0
- package/lib/commonjs/SocialComponents/PostCard/components/DraftTextViewer.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/EntityHelpers.js +52 -0
- package/lib/commonjs/SocialComponents/PostCard/components/EntityHelpers.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/ImageList.js +51 -0
- package/lib/commonjs/SocialComponents/PostCard/components/ImageList.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/PostHeader.js +48 -0
- package/lib/commonjs/SocialComponents/PostCard/components/PostHeader.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.js +139 -0
- package/lib/commonjs/SocialComponents/PostCard/components/PostReactionBar.js.map +1 -0
- package/lib/commonjs/SocialComponents/PostCard/index.js +236 -0
- package/lib/commonjs/SocialComponents/PostCard/index.js.map +1 -0
- package/lib/commonjs/SocialComponents/SocialOrderCard.js +225 -0
- package/lib/commonjs/SocialComponents/SocialOrderCard.js.map +1 -0
- package/lib/commonjs/SocialComponents/SocialOrdersList.js +104 -0
- package/lib/commonjs/SocialComponents/SocialOrdersList.js.map +1 -0
- package/lib/commonjs/SocialComponents/api/index.js +292 -1
- package/lib/commonjs/SocialComponents/api/index.js.map +1 -1
- package/lib/commonjs/SocialComponents/index.js +7 -0
- package/lib/commonjs/SocialComponents/index.js.map +1 -1
- package/lib/module/Components/Icons.js +173 -0
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/api/index.js +1 -1
- package/lib/module/MarketComponents/components/TeamEventMarket/api/index.js.map +1 -1
- package/lib/module/SocialComponents/PlayerCard.js +7 -6
- package/lib/module/SocialComponents/PlayerCard.js.map +1 -1
- package/lib/module/SocialComponents/PlayerList.js +1 -0
- package/lib/module/SocialComponents/PlayerList.js.map +1 -1
- package/lib/module/SocialComponents/PlayerProfile/api/index.js +143 -0
- package/lib/module/SocialComponents/PlayerProfile/api/index.js.map +1 -0
- package/lib/module/SocialComponents/PlayerProfile/components/PlayerFollowersList.js +129 -0
- package/lib/module/SocialComponents/PlayerProfile/components/PlayerFollowersList.js.map +1 -0
- package/lib/module/SocialComponents/PlayerProfile/components/PostsList.js +94 -0
- package/lib/module/SocialComponents/PlayerProfile/components/PostsList.js.map +1 -0
- package/lib/module/SocialComponents/PlayerProfile/index.js +557 -0
- package/lib/module/SocialComponents/PlayerProfile/index.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/DraftTextEntities.js +27 -0
- package/lib/module/SocialComponents/PostCard/components/DraftTextEntities.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/DraftTextViewer.js +51 -0
- package/lib/module/SocialComponents/PostCard/components/DraftTextViewer.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/EntityHelpers.js +41 -0
- package/lib/module/SocialComponents/PostCard/components/EntityHelpers.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/ImageList.js +44 -0
- package/lib/module/SocialComponents/PostCard/components/ImageList.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/PostHeader.js +41 -0
- package/lib/module/SocialComponents/PostCard/components/PostHeader.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/components/PostReactionBar.js +130 -0
- package/lib/module/SocialComponents/PostCard/components/PostReactionBar.js.map +1 -0
- package/lib/module/SocialComponents/PostCard/index.js +227 -0
- package/lib/module/SocialComponents/PostCard/index.js.map +1 -0
- package/lib/module/SocialComponents/SocialOrderCard.js +216 -0
- package/lib/module/SocialComponents/SocialOrderCard.js.map +1 -0
- package/lib/module/SocialComponents/SocialOrdersList.js +95 -0
- package/lib/module/SocialComponents/SocialOrdersList.js.map +1 -0
- package/lib/module/SocialComponents/api/index.js +292 -1
- package/lib/module/SocialComponents/api/index.js.map +1 -1
- package/lib/module/SocialComponents/index.js +2 -1
- package/lib/module/SocialComponents/index.js.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +6 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerCard.d.ts +2 -1
- package/lib/typescript/src/SocialComponents/PlayerCard.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerList.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/PlayerProfile/api/index.d.ts +19 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/api/index.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts +13 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PlayerFollowersList.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PostsList.d.ts +13 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/components/PostsList.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/index.d.ts +19 -0
- package/lib/typescript/src/SocialComponents/PlayerProfile/index.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextEntities.d.ts +4 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextEntities.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextViewer.d.ts +12 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/DraftTextViewer.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/EntityHelpers.d.ts +12 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/EntityHelpers.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/ImageList.d.ts +9 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/ImageList.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/PostHeader.d.ts +9 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/PostHeader.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/PostReactionBar.d.ts +13 -0
- package/lib/typescript/src/SocialComponents/PostCard/components/PostReactionBar.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/PostCard/index.d.ts +15 -0
- package/lib/typescript/src/SocialComponents/PostCard/index.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/SocialOrderCard.d.ts +17 -0
- package/lib/typescript/src/SocialComponents/SocialOrderCard.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/SocialOrdersList.d.ts +13 -0
- package/lib/typescript/src/SocialComponents/SocialOrdersList.d.ts.map +1 -0
- package/lib/typescript/src/SocialComponents/api/index.d.ts +34 -2
- package/lib/typescript/src/SocialComponents/api/index.d.ts.map +1 -1
- package/lib/typescript/src/SocialComponents/index.d.ts +2 -1
- package/lib/typescript/src/SocialComponents/index.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/Components/Icons.tsx +93 -0
- package/src/MarketComponents/components/TeamEventMarket/api/index.ts +1 -1
- package/src/SocialComponents/PlayerCard.tsx +6 -5
- package/src/SocialComponents/PlayerList.tsx +2 -1
- package/src/SocialComponents/PlayerProfile/api/index.ts +138 -0
- package/src/SocialComponents/PlayerProfile/components/PlayerFollowersList.tsx +111 -0
- package/src/SocialComponents/PlayerProfile/components/PostsList.tsx +100 -0
- package/src/SocialComponents/PlayerProfile/index.tsx +412 -0
- package/src/SocialComponents/PostCard/components/DraftTextEntities.tsx +25 -0
- package/src/SocialComponents/PostCard/components/DraftTextViewer.tsx +61 -0
- package/src/SocialComponents/PostCard/components/EntityHelpers.tsx +44 -0
- package/src/SocialComponents/PostCard/components/ImageList.tsx +46 -0
- package/src/SocialComponents/PostCard/components/PostHeader.tsx +29 -0
- package/src/SocialComponents/PostCard/components/PostReactionBar.tsx +93 -0
- package/src/SocialComponents/PostCard/index.tsx +176 -0
- package/src/SocialComponents/SocialOrderCard.tsx +146 -0
- package/src/SocialComponents/SocialOrdersList.tsx +101 -0
- package/src/SocialComponents/api/index.ts +170 -3
- package/src/SocialComponents/index.tsx +3 -2
- package/src/types.d.ts +245 -0
|
@@ -1,17 +1,39 @@
|
|
|
1
1
|
import axios from "axios";
|
|
2
2
|
import { APIOverrides } from "../../ApiOverrides";
|
|
3
|
-
import type { PlayerFollowerProps } from "../../types";
|
|
3
|
+
import type { AthleteProps, EventProps, LeagueProps, MatchProps, OrderProps, PlayerFollowerProps, PostReactionProps, TeamProps, TournamentProps } from "../../types";
|
|
4
|
+
import Colors from "../../constants/colors";
|
|
5
|
+
import moment from "moment-mini";
|
|
4
6
|
|
|
5
7
|
let SOCIAL_SVC_API = '';
|
|
8
|
+
let EVENT_SVC_API = '';
|
|
9
|
+
let MK_SVC_API = '';
|
|
6
10
|
|
|
7
|
-
export { SocialComponentApi }
|
|
11
|
+
export { SocialComponentApi, SocialOrderHelpers }
|
|
8
12
|
|
|
9
13
|
const SocialComponentApi = {
|
|
10
14
|
setEnvironment: () => {
|
|
11
15
|
const endpoints = APIOverrides.getEndpoints();
|
|
12
16
|
SOCIAL_SVC_API = endpoints['SOCIAL_SVC_API'] as string;
|
|
17
|
+
EVENT_SVC_API = endpoints['EVENT_SVC_API'] as string;
|
|
18
|
+
MK_SVC_API = endpoints['MK_SVC_API'] as string;
|
|
13
19
|
|
|
14
20
|
},
|
|
21
|
+
getLeagues: async():Promise<LeagueProps[]> => {
|
|
22
|
+
try {
|
|
23
|
+
const resp = await axios.get(`${EVENT_SVC_API}/v1/leagues`);
|
|
24
|
+
return resp.data.leagues
|
|
25
|
+
} catch (e) {
|
|
26
|
+
return []
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
reverseOrder: async(order:OrderProps):Promise<OrderProps | undefined> => {
|
|
30
|
+
try {
|
|
31
|
+
const resp = await axios.post(`${MK_SVC_API}/v1/orders/order/reverse`, { order })
|
|
32
|
+
return resp.data.order
|
|
33
|
+
} catch (e) {
|
|
34
|
+
return undefined
|
|
35
|
+
}
|
|
36
|
+
},
|
|
15
37
|
getBulkPlayerfollowers: async(player_ids:string[]) => {
|
|
16
38
|
const resp = await axios.post(`${SOCIAL_SVC_API}/v1/followers/bulk/get`, { player_ids })
|
|
17
39
|
return resp.data.player_followers
|
|
@@ -19,5 +41,150 @@ const SocialComponentApi = {
|
|
|
19
41
|
savePlayerFollower: async(player_follower:PlayerFollowerProps):Promise<PlayerFollowerProps> => {
|
|
20
42
|
const resp = await axios.post(`${SOCIAL_SVC_API}/v1/followers/player/create`, { player_follower })
|
|
21
43
|
return resp.data.player_follower
|
|
22
|
-
}
|
|
44
|
+
},
|
|
45
|
+
getEventsByEventIds: async(event_ids:string[]):Promise<EventProps[]> => {
|
|
46
|
+
if(event_ids.length == 0){ return [] }
|
|
47
|
+
try {
|
|
48
|
+
const resp = await axios.post(`${EVENT_SVC_API}/v1/events/bulk/get`, { attribute:'event_id', values: event_ids })
|
|
49
|
+
return resp.data.events
|
|
50
|
+
} catch (e) {
|
|
51
|
+
return []
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
getMatchesByMatchIds: async(match_ids:string[]):Promise<MatchProps[]> => {
|
|
55
|
+
if(match_ids.length == 0){ return [] }
|
|
56
|
+
try {
|
|
57
|
+
const resp = await axios.post(`${EVENT_SVC_API}/v1/matches/bulk/get`, { attribute: 'match_id', values: match_ids })
|
|
58
|
+
return resp.data.matches
|
|
59
|
+
} catch (e) {
|
|
60
|
+
return []
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
getAthletesByIds : async(athlete_ids:string[]):Promise<AthleteProps[]> => {
|
|
64
|
+
if(athlete_ids.length == 0){ return [] }
|
|
65
|
+
try {
|
|
66
|
+
const resp = await axios.post(`${EVENT_SVC_API}/v1/athletes/bulk/get`, { attribute: 'athlete_id', values: athlete_ids })
|
|
67
|
+
return resp.data.athletes
|
|
68
|
+
} catch (e) {
|
|
69
|
+
return []
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
getTournamentsByTournamentIds: async(tournament_ids:string[]):Promise<TournamentProps[]> => {
|
|
73
|
+
if(tournament_ids.length == 0){ return [] }
|
|
74
|
+
try {
|
|
75
|
+
const resp = await axios.post(`${EVENT_SVC_API}/v1/tournaments/bulk/get`, { attribute: 'event_id', values: tournament_ids })
|
|
76
|
+
return resp.data.tournaments
|
|
77
|
+
} catch (e) {
|
|
78
|
+
return []
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
getTeamsByIds: async(team_ids:string[]) => {
|
|
82
|
+
if(team_ids.length == 0){ return [] }
|
|
83
|
+
try {
|
|
84
|
+
const resp = await axios.post(`${EVENT_SVC_API}/v1/teams/bulk/get`, { attribute:'team_id', values: team_ids })
|
|
85
|
+
return resp.data.teams
|
|
86
|
+
} catch (e) {
|
|
87
|
+
return []
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
createPostReaction: async(post_reaction:PostReactionProps):Promise<PostReactionProps|undefined> => {
|
|
91
|
+
try {
|
|
92
|
+
const resp = await axios.post(`${SOCIAL_SVC_API}/v1/posts/reaction/create`, { post_reaction });
|
|
93
|
+
return resp.data.post_reaction
|
|
94
|
+
} catch (e) {
|
|
95
|
+
console.log(e);
|
|
96
|
+
return undefined
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
updatePostReaction : async(post_reaction:PostReactionProps):Promise<PostReactionProps|undefined> => {
|
|
100
|
+
try {
|
|
101
|
+
const resp = await axios.post(`${SOCIAL_SVC_API}/v1/posts/reaction/update`, { post_reaction })
|
|
102
|
+
return resp.data.post_reaction
|
|
103
|
+
} catch (e) {
|
|
104
|
+
console.log(e)
|
|
105
|
+
return undefined
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
const SocialOrderHelpers = {
|
|
112
|
+
getIconColor: (order:OrderProps) => {
|
|
113
|
+
switch(order.status){
|
|
114
|
+
case 'approved':
|
|
115
|
+
return Colors.brand.electric
|
|
116
|
+
case 'closed':
|
|
117
|
+
return Colors.brand.midnight
|
|
118
|
+
case 'cancelled':
|
|
119
|
+
return Colors.highlights.highlight200
|
|
120
|
+
default:
|
|
121
|
+
return Colors.shades.black
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
getResultDetails: (order:OrderProps) => {
|
|
125
|
+
if(order.resolution_status == 'inprogress'){ return { result_label: '', color:Colors.brand.midnight } }
|
|
126
|
+
if(order.resolution_status == 'closed' && !order.positions[0]){ return { result_label: 'CANCELLED', color:Colors.brand.slate } }
|
|
127
|
+
let position = order.positions[0]
|
|
128
|
+
if(!position || position.status == 'inprogress'){ return { result_label: '', color:Colors.brand.midnight } }
|
|
129
|
+
switch(position.result_ind){
|
|
130
|
+
case 'win': return { result_label: 'WIN', color:Colors.utility.success }
|
|
131
|
+
case 'lose': return { result_label: 'LOSE', color:Colors.utility.error }
|
|
132
|
+
case 'draw': return { result_label: 'DRAW', color:Colors.brand.midnight }
|
|
133
|
+
default: return { result_label: '', color:Colors.brand.midnight }
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
calcPotentialWinnings :(odds:number, amt:number) => {
|
|
137
|
+
let potential_winnings;
|
|
138
|
+
if (odds > 0) {
|
|
139
|
+
var earningsMultiplyer = (odds/100) + 1;
|
|
140
|
+
potential_winnings = Math.round(earningsMultiplyer * amt * 100) / 100;
|
|
141
|
+
} else {
|
|
142
|
+
var earningsMultiplyer = (100/(Math.abs(odds))) + 1;
|
|
143
|
+
potential_winnings = Math.round(earningsMultiplyer * amt * 100) / 100;
|
|
144
|
+
}
|
|
145
|
+
return potential_winnings
|
|
146
|
+
},
|
|
147
|
+
getIdsFromOrders: (orders:OrderProps[]) => {
|
|
148
|
+
let event_ids:string[] = [], tournament_ids:string[] = [], match_ids:string[] = [], athlete_ids:string[] = [], team_ids:string[] = []
|
|
149
|
+
orders.map(o => {
|
|
150
|
+
if(o.event_type == 'team'){ event_ids.push(o.event_id) }
|
|
151
|
+
if(o.event_type == 'tournament'){ tournament_ids.push(o.event_id) }
|
|
152
|
+
if(o.event_type == 'match'){ match_ids.push(o.event_id) }
|
|
153
|
+
if(o.side_type == 'athlete'){ athlete_ids.push(o.side_id) }
|
|
154
|
+
if(o.side_type == 'team'){ team_ids.push(o.side_id) }
|
|
155
|
+
})
|
|
156
|
+
return { event_ids, tournament_ids, match_ids, athlete_ids, team_ids }
|
|
157
|
+
},
|
|
158
|
+
getContestDetails: (order:OrderProps, events:EventProps[], tournaments:TournamentProps[], matches:MatchProps[], athletes:AthleteProps[], teams:TeamProps[], leagues:LeagueProps[]):{ title:string, time:string, league?:LeagueProps, athlete?:AthleteProps, team?:TeamProps } => {
|
|
159
|
+
let athlete = order.side_type == 'athlete' ? athletes.find(a => a.athlete_id == order.side_id) : undefined
|
|
160
|
+
let team = order.side_type == 'team' ? teams.find(t => t.team_id == order.side_id) : undefined;
|
|
161
|
+
|
|
162
|
+
switch(order.event_type){
|
|
163
|
+
case 'team':
|
|
164
|
+
console.log('HERE WE GO')
|
|
165
|
+
let event = events.find(e => e.event_id == order.event_id);
|
|
166
|
+
console.log(event)
|
|
167
|
+
if(!event){ return { team, athlete, title: '', time: '' } }
|
|
168
|
+
let league = leagues.find(l => l.league_id == event.league_id);
|
|
169
|
+
return { team, athlete, league, title: event.event_title, time: event.status == 'scheduled' ? moment(event.scheduled_datetime).format('MM/DD @ hh:mm a') : event.time_detail ?? '' }
|
|
170
|
+
case 'match':
|
|
171
|
+
let match = matches.find(m => m.match_id == order.event_id);
|
|
172
|
+
if(!match){ return { team, athlete, title: '', time: '' } }
|
|
173
|
+
let tourney = tournaments.find(t => t.tournament_id == match.tournament_id);
|
|
174
|
+
let m_league = leagues.find(l => l.league_id == tourney?.league_id)
|
|
175
|
+
return { team, athlete, league: m_league, title: match.match_title, time: moment(match.scheduled_datetime).format('MM/DD @ hh:mm a') }
|
|
176
|
+
case 'tournament':
|
|
177
|
+
let tournament = tournaments.find(t => t.tournament_id == order.event_id);
|
|
178
|
+
if(!tournament){ return { title: '', time: '' } }
|
|
179
|
+
const t_league = leagues.find(l => l.league_id == tournament.league_id)
|
|
180
|
+
return { team, athlete, league: t_league, title: tournament.tournament_name, time: moment(tournament.scheduled_datetime).format('MM/DD @ hh:mm a') }
|
|
181
|
+
default : return { title: '', time: '' }
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
getOddsLabel: (odds:number, decimals?:number) => {
|
|
185
|
+
let new_odds = odds.toFixed()
|
|
186
|
+
if(decimals){ new_odds = odds.toFixed(decimals) }
|
|
187
|
+
if(odds < 0){ return `${new_odds}` }
|
|
188
|
+
return `+${new_odds}`
|
|
189
|
+
},
|
|
23
190
|
}
|
package/src/types.d.ts
CHANGED
|
@@ -1742,3 +1742,248 @@ export interface OrderProps {
|
|
|
1742
1742
|
no_bet?:boolean,
|
|
1743
1743
|
no_bet_reason?:string
|
|
1744
1744
|
}
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
//SOCIAL COMPONENTS
|
|
1749
|
+
|
|
1750
|
+
export interface PlayerLinkProps {
|
|
1751
|
+
player_link_id: string,
|
|
1752
|
+
player_id: string,
|
|
1753
|
+
link_type: 'twitter' | 'rss_podcast' | 'rss_article' | 'custom' | 'linked_in',
|
|
1754
|
+
link_full:string,
|
|
1755
|
+
link_display:string,
|
|
1756
|
+
link?:LinkProps,
|
|
1757
|
+
create_datetime:any,
|
|
1758
|
+
last_update_datetime:any,
|
|
1759
|
+
link_status:'active'|'pending'|'inactive',
|
|
1760
|
+
last_feed_pull_datetime?:any
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
export interface PlayerFollowerStatsProps {
|
|
1764
|
+
player_id:string,
|
|
1765
|
+
following_count: number,
|
|
1766
|
+
follower_count:number,
|
|
1767
|
+
team_member_count:number
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
|
|
1772
|
+
export interface PlayerTagProps {
|
|
1773
|
+
player_tag_id:string,
|
|
1774
|
+
player_id:string,
|
|
1775
|
+
tag_id:string,
|
|
1776
|
+
tag: string,
|
|
1777
|
+
tag_type:'selected'|'earned'|'company',
|
|
1778
|
+
company_id?:string,
|
|
1779
|
+
status: string,
|
|
1780
|
+
companyDetails?:PublicPlayerProps,
|
|
1781
|
+
create_datetime: any,
|
|
1782
|
+
last_update_datetime:any
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
interface EntityMapProps {
|
|
1786
|
+
value: {
|
|
1787
|
+
type: string,
|
|
1788
|
+
mutability:string,
|
|
1789
|
+
data: any
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
export interface RawDraftJSProps {
|
|
1793
|
+
blocks:any[],
|
|
1794
|
+
entityMap:EntityMapProps
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
export interface PostProps {
|
|
1798
|
+
memo_post_id:string,
|
|
1799
|
+
player_id:string,
|
|
1800
|
+
title:string,
|
|
1801
|
+
body:string,
|
|
1802
|
+
formatted_body?: RawDraftJSProps,
|
|
1803
|
+
status:'active'|'hidden',
|
|
1804
|
+
memo_events:any[],
|
|
1805
|
+
memo_urls:string[],
|
|
1806
|
+
post_type:string,
|
|
1807
|
+
memo_podcast_episodes?:string[],
|
|
1808
|
+
featured?:boolean,
|
|
1809
|
+
memo_podcasts?:string[],
|
|
1810
|
+
memo_article_feeds?:string[],
|
|
1811
|
+
memo_teams:any[],
|
|
1812
|
+
memo_images:any[],
|
|
1813
|
+
memo_videos:any[],
|
|
1814
|
+
memo_players:any[],
|
|
1815
|
+
memo_topics:TagProps[],
|
|
1816
|
+
edited:boolean,
|
|
1817
|
+
external_social_id:string,
|
|
1818
|
+
memo_location:any,
|
|
1819
|
+
memo_positions:any[],
|
|
1820
|
+
memo_orders:any[],
|
|
1821
|
+
memo_hashtags:string[],
|
|
1822
|
+
create_datetime:any,
|
|
1823
|
+
last_update_datetime:any,
|
|
1824
|
+
url_metadata:URLMetadataProps[],
|
|
1825
|
+
url_preview:any,
|
|
1826
|
+
memo_competitions:any[],
|
|
1827
|
+
my_reactions:PostReactionProps[],
|
|
1828
|
+
comment_count:number,
|
|
1829
|
+
reaction_details:PostReactionStatsProps[],
|
|
1830
|
+
comment_details:PostCommentProps[],
|
|
1831
|
+
playerDetails?:PublicPlayerProps,
|
|
1832
|
+
rss_link_id?:string,
|
|
1833
|
+
shared_post_id?:string,
|
|
1834
|
+
memo_polls?:string[],
|
|
1835
|
+
shared_post_type?:string,
|
|
1836
|
+
shared_post?:PostProps,
|
|
1837
|
+
memo_podcast?:PodcastProps,
|
|
1838
|
+
memo_articles?:string[]
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
export interface URLMetadataProps {
|
|
1843
|
+
charset:string,
|
|
1844
|
+
ogDescription:string,
|
|
1845
|
+
ogImage: {
|
|
1846
|
+
height:string,
|
|
1847
|
+
type: string,
|
|
1848
|
+
url: string,
|
|
1849
|
+
width:string
|
|
1850
|
+
},
|
|
1851
|
+
ogLocale:string,
|
|
1852
|
+
ogSiteName: string,
|
|
1853
|
+
ogTitle:string,
|
|
1854
|
+
ogType:string,
|
|
1855
|
+
ogUrl:string,
|
|
1856
|
+
requestUrl:string,
|
|
1857
|
+
success:boolean,
|
|
1858
|
+
twitterCard:string,
|
|
1859
|
+
twitterDescription: string,
|
|
1860
|
+
twitterImage?:{
|
|
1861
|
+
alt?:string,
|
|
1862
|
+
height?:string,
|
|
1863
|
+
url:string,
|
|
1864
|
+
width?:string
|
|
1865
|
+
},
|
|
1866
|
+
twitterTitle:string
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
export interface PostReactionProps {
|
|
1871
|
+
post_reaction_id:string;
|
|
1872
|
+
activity_post_id:string;
|
|
1873
|
+
player_id:string;
|
|
1874
|
+
reaction:string;
|
|
1875
|
+
status:'visible'|'hidden';
|
|
1876
|
+
post_type: 'memo' | 'activity' | 'comment';
|
|
1877
|
+
create_datetime:any;
|
|
1878
|
+
last_update_datetime:any;
|
|
1879
|
+
playerDetails?:PublicPlayerProps;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
export interface PostReactionStatsProps {
|
|
1883
|
+
activity_post_id:string,
|
|
1884
|
+
reaction: string,
|
|
1885
|
+
reaction_count:number
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
export interface PostCommentProps {
|
|
1889
|
+
post_comment_id:string,
|
|
1890
|
+
activity_post_id:string,
|
|
1891
|
+
player_id:string,
|
|
1892
|
+
message:string,
|
|
1893
|
+
status:'active'|'hidden',
|
|
1894
|
+
edited:boolean,
|
|
1895
|
+
post_type: 'memo' | 'activity',
|
|
1896
|
+
related_comment_id:string,
|
|
1897
|
+
create_datetime:any,
|
|
1898
|
+
last_update_datetime:any,
|
|
1899
|
+
playerDetails?:PublicPlayerProps,
|
|
1900
|
+
formatted_body: RawDraftJSProps,
|
|
1901
|
+
my_reactions:PostReactionProps[],
|
|
1902
|
+
reaction_details:PostReactionStatsProps[],
|
|
1903
|
+
comment_orders?:string[],
|
|
1904
|
+
comment_urls?:string[],
|
|
1905
|
+
comment_images?:any[],
|
|
1906
|
+
comment_videos?:any[],
|
|
1907
|
+
url_metadata?:any[],
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
export interface PostCommentStatProps {
|
|
1912
|
+
activity_post_id: string,
|
|
1913
|
+
comment_count: number,
|
|
1914
|
+
top_comment?: PostCommentProps
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
|
|
1918
|
+
export interface PodcastProps {
|
|
1919
|
+
podcast_id: string,
|
|
1920
|
+
company_id?: string,
|
|
1921
|
+
lead_email?:string,
|
|
1922
|
+
lead_contact_name?:string,
|
|
1923
|
+
secondary_contact?:string,
|
|
1924
|
+
last_episode_pull?:any,
|
|
1925
|
+
title: string,
|
|
1926
|
+
description: string,
|
|
1927
|
+
claim_status?:string,
|
|
1928
|
+
global_rank?:number,
|
|
1929
|
+
publisher_original?:string,
|
|
1930
|
+
publisher_highlighted?:string,
|
|
1931
|
+
website?:string,
|
|
1932
|
+
listen_notes_score?:number,
|
|
1933
|
+
listen_notes_id?:string,
|
|
1934
|
+
image_override?:any
|
|
1935
|
+
description_override?:string,
|
|
1936
|
+
suggested_text?:string,
|
|
1937
|
+
key_words?:string[];
|
|
1938
|
+
player_ids?: string[];
|
|
1939
|
+
image?: any,
|
|
1940
|
+
rss_url?: string,
|
|
1941
|
+
status: string,
|
|
1942
|
+
create_datetime:any,
|
|
1943
|
+
last_update_datetime:any
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
|
|
1947
|
+
export interface PodcastEpisodesProps {
|
|
1948
|
+
podcast_episode_id:string,
|
|
1949
|
+
podcast_id:string,
|
|
1950
|
+
url:string,
|
|
1951
|
+
length:string | number,
|
|
1952
|
+
type: string,
|
|
1953
|
+
author?:string,
|
|
1954
|
+
description?:string,
|
|
1955
|
+
image?: {
|
|
1956
|
+
url:string,
|
|
1957
|
+
height?:number,
|
|
1958
|
+
width?:number
|
|
1959
|
+
},
|
|
1960
|
+
image_override?:any,
|
|
1961
|
+
description_override?:string,
|
|
1962
|
+
explicit?:boolean,
|
|
1963
|
+
episode?:string,
|
|
1964
|
+
guid?:string,
|
|
1965
|
+
title:string,
|
|
1966
|
+
external_link?:string,
|
|
1967
|
+
publish_date:any,
|
|
1968
|
+
status: 'visible' | 'hidden',
|
|
1969
|
+
create_datetime:any,
|
|
1970
|
+
last_update_datetime: any,
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
export interface ArticleProps {
|
|
1974
|
+
article_id:string,
|
|
1975
|
+
company_id:string,
|
|
1976
|
+
url:string,
|
|
1977
|
+
author?:string,
|
|
1978
|
+
contentSnippet?:string,
|
|
1979
|
+
image?: {
|
|
1980
|
+
url:string,
|
|
1981
|
+
width:string,
|
|
1982
|
+
height:string,
|
|
1983
|
+
type:string
|
|
1984
|
+
},
|
|
1985
|
+
guid?:string,
|
|
1986
|
+
title:string,
|
|
1987
|
+
pubDate:any,
|
|
1988
|
+
status: string
|
|
1989
|
+
}
|