be-components 7.4.0 → 7.4.3
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/ApiOverrides/index.js +4 -0
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/BettorBot/api/index.js +64 -0
- package/lib/commonjs/BettorBot/api/index.js.map +1 -0
- package/lib/commonjs/BettorBot/components/BroadcastMessageCard.js +233 -0
- package/lib/commonjs/BettorBot/components/BroadcastMessageCard.js.map +1 -0
- package/lib/commonjs/BettorBot/components/ServerInfoCard.js +126 -0
- package/lib/commonjs/BettorBot/components/ServerInfoCard.js.map +1 -0
- package/lib/commonjs/BettorBot/index.js +532 -0
- package/lib/commonjs/BettorBot/index.js.map +1 -0
- package/lib/commonjs/CreateEngagement/index.js +3 -0
- package/lib/commonjs/CreateEngagement/index.js.map +1 -1
- package/lib/commonjs/FlashMarket/api/index.js +61 -0
- package/lib/commonjs/FlashMarket/api/index.js.map +1 -1
- package/lib/commonjs/FlashMarket/components/ManageFlashMarket.js +55 -81
- package/lib/commonjs/FlashMarket/components/ManageFlashMarket.js.map +1 -1
- package/lib/commonjs/MyAction/api/index.js +580 -0
- package/lib/commonjs/MyAction/api/index.js.map +1 -0
- package/lib/commonjs/MyAction/components/BracketRow.js +67 -0
- package/lib/commonjs/MyAction/components/BracketRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/CompetitionRow.js +68 -0
- package/lib/commonjs/MyAction/components/CompetitionRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/ContestStatRow.js +265 -0
- package/lib/commonjs/MyAction/components/ContestStatRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/FlashRow.js +131 -0
- package/lib/commonjs/MyAction/components/FlashRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/ParlayRow.js +236 -0
- package/lib/commonjs/MyAction/components/ParlayRow.js.map +1 -0
- package/lib/commonjs/MyAction/components/SquaresRow.js +83 -0
- package/lib/commonjs/MyAction/components/SquaresRow.js.map +1 -0
- package/lib/commonjs/MyAction/index.js +354 -0
- package/lib/commonjs/MyAction/index.js.map +1 -0
- package/lib/commonjs/PartnerPortal/components/EmbedManager.js +42 -0
- package/lib/commonjs/PartnerPortal/components/EmbedManager.js.map +1 -1
- package/lib/commonjs/PartnerPortal/components/StringSelector.js +90 -0
- package/lib/commonjs/PartnerPortal/components/StringSelector.js.map +1 -0
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +4 -0
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/BettorBot/api/index.js +57 -0
- package/lib/module/BettorBot/api/index.js.map +1 -0
- package/lib/module/BettorBot/components/BroadcastMessageCard.js +226 -0
- package/lib/module/BettorBot/components/BroadcastMessageCard.js.map +1 -0
- package/lib/module/BettorBot/components/ServerInfoCard.js +119 -0
- package/lib/module/BettorBot/components/ServerInfoCard.js.map +1 -0
- package/lib/module/BettorBot/index.js +524 -0
- package/lib/module/BettorBot/index.js.map +1 -0
- package/lib/module/CreateEngagement/index.js +3 -0
- package/lib/module/CreateEngagement/index.js.map +1 -1
- package/lib/module/FlashMarket/api/index.js +61 -0
- package/lib/module/FlashMarket/api/index.js.map +1 -1
- package/lib/module/FlashMarket/components/ManageFlashMarket.js +55 -81
- package/lib/module/FlashMarket/components/ManageFlashMarket.js.map +1 -1
- package/lib/module/MyAction/api/index.js +573 -0
- package/lib/module/MyAction/api/index.js.map +1 -0
- package/lib/module/MyAction/components/BracketRow.js +60 -0
- package/lib/module/MyAction/components/BracketRow.js.map +1 -0
- package/lib/module/MyAction/components/CompetitionRow.js +61 -0
- package/lib/module/MyAction/components/CompetitionRow.js.map +1 -0
- package/lib/module/MyAction/components/ContestStatRow.js +258 -0
- package/lib/module/MyAction/components/ContestStatRow.js.map +1 -0
- package/lib/module/MyAction/components/FlashRow.js +124 -0
- package/lib/module/MyAction/components/FlashRow.js.map +1 -0
- package/lib/module/MyAction/components/ParlayRow.js +229 -0
- package/lib/module/MyAction/components/ParlayRow.js.map +1 -0
- package/lib/module/MyAction/components/SquaresRow.js +76 -0
- package/lib/module/MyAction/components/SquaresRow.js.map +1 -0
- package/lib/module/MyAction/index.js +344 -0
- package/lib/module/MyAction/index.js.map +1 -0
- package/lib/module/PartnerPortal/components/EmbedManager.js +42 -0
- package/lib/module/PartnerPortal/components/EmbedManager.js.map +1 -1
- package/lib/module/PartnerPortal/components/StringSelector.js +83 -0
- package/lib/module/PartnerPortal/components/StringSelector.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/BettorBot/api/index.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BettorBot/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BettorBot/components/BroadcastMessageCard.d.ts +10 -0
- package/lib/typescript/lib/commonjs/BettorBot/components/BroadcastMessageCard.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BettorBot/components/ServerInfoCard.d.ts +10 -0
- package/lib/typescript/lib/commonjs/BettorBot/components/ServerInfoCard.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BettorBot/index.d.ts +7 -0
- package/lib/typescript/lib/commonjs/BettorBot/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/CreateEngagement/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/FlashMarket/api/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/FlashMarket/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/FlashMarket/components/ManageFlashMarket.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/MyAction/api/index.d.ts +110 -0
- package/lib/typescript/lib/commonjs/MyAction/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/BracketRow.d.ts +8 -0
- package/lib/typescript/lib/commonjs/MyAction/components/BracketRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/CompetitionRow.d.ts +9 -0
- package/lib/typescript/lib/commonjs/MyAction/components/CompetitionRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/ContestStatRow.d.ts +15 -0
- package/lib/typescript/lib/commonjs/MyAction/components/ContestStatRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/FlashRow.d.ts +10 -0
- package/lib/typescript/lib/commonjs/MyAction/components/FlashRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/ParlayRow.d.ts +15 -0
- package/lib/typescript/lib/commonjs/MyAction/components/ParlayRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/components/SquaresRow.d.ts +8 -0
- package/lib/typescript/lib/commonjs/MyAction/components/SquaresRow.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/MyAction/index.d.ts +7 -0
- package/lib/typescript/lib/commonjs/MyAction/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/EmbedManager.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/PartnerPortal/components/StringSelector.d.ts +8 -0
- package/lib/typescript/lib/commonjs/PartnerPortal/components/StringSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/index.d.ts +2 -0
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/BettorBot/api/index.d.ts +8 -0
- package/lib/typescript/lib/module/BettorBot/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BettorBot/components/BroadcastMessageCard.d.ts +10 -0
- package/lib/typescript/lib/module/BettorBot/components/BroadcastMessageCard.d.ts.map +1 -0
- package/lib/typescript/lib/module/BettorBot/components/ServerInfoCard.d.ts +10 -0
- package/lib/typescript/lib/module/BettorBot/components/ServerInfoCard.d.ts.map +1 -0
- package/lib/typescript/lib/module/BettorBot/index.d.ts +7 -0
- package/lib/typescript/lib/module/BettorBot/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/CreateEngagement/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/api/index.d.ts +1 -0
- package/lib/typescript/lib/module/FlashMarket/api/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/FlashMarket/components/ManageFlashMarket.d.ts.map +1 -1
- package/lib/typescript/lib/module/MyAction/api/index.d.ts +110 -0
- package/lib/typescript/lib/module/MyAction/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/BracketRow.d.ts +8 -0
- package/lib/typescript/lib/module/MyAction/components/BracketRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/CompetitionRow.d.ts +9 -0
- package/lib/typescript/lib/module/MyAction/components/CompetitionRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/ContestStatRow.d.ts +15 -0
- package/lib/typescript/lib/module/MyAction/components/ContestStatRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/FlashRow.d.ts +10 -0
- package/lib/typescript/lib/module/MyAction/components/FlashRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/ParlayRow.d.ts +15 -0
- package/lib/typescript/lib/module/MyAction/components/ParlayRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/components/SquaresRow.d.ts +8 -0
- package/lib/typescript/lib/module/MyAction/components/SquaresRow.d.ts.map +1 -0
- package/lib/typescript/lib/module/MyAction/index.d.ts +7 -0
- package/lib/typescript/lib/module/MyAction/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/PartnerPortal/components/EmbedManager.d.ts.map +1 -1
- package/lib/typescript/lib/module/PartnerPortal/components/StringSelector.d.ts +8 -0
- package/lib/typescript/lib/module/PartnerPortal/components/StringSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/index.d.ts +3 -1
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/BettorBot/api/index.d.ts +9 -0
- package/lib/typescript/src/BettorBot/api/index.d.ts.map +1 -0
- package/lib/typescript/src/BettorBot/components/BroadcastMessageCard.d.ts +15 -0
- package/lib/typescript/src/BettorBot/components/BroadcastMessageCard.d.ts.map +1 -0
- package/lib/typescript/src/BettorBot/components/ServerInfoCard.d.ts +12 -0
- package/lib/typescript/src/BettorBot/components/ServerInfoCard.d.ts.map +1 -0
- package/lib/typescript/src/BettorBot/index.d.ts +9 -0
- package/lib/typescript/src/BettorBot/index.d.ts.map +1 -0
- package/lib/typescript/src/CreateEngagement/index.d.ts.map +1 -1
- package/lib/typescript/src/FlashMarket/api/index.d.ts +1 -0
- package/lib/typescript/src/FlashMarket/api/index.d.ts.map +1 -1
- package/lib/typescript/src/FlashMarket/components/ManageFlashMarket.d.ts.map +1 -1
- package/lib/typescript/src/MyAction/api/index.d.ts +103 -0
- package/lib/typescript/src/MyAction/api/index.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/BracketRow.d.ts +10 -0
- package/lib/typescript/src/MyAction/components/BracketRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/CompetitionRow.d.ts +15 -0
- package/lib/typescript/src/MyAction/components/CompetitionRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/ContestStatRow.d.ts +18 -0
- package/lib/typescript/src/MyAction/components/ContestStatRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/FlashRow.d.ts +12 -0
- package/lib/typescript/src/MyAction/components/FlashRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/ParlayRow.d.ts +18 -0
- package/lib/typescript/src/MyAction/components/ParlayRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/components/SquaresRow.d.ts +10 -0
- package/lib/typescript/src/MyAction/components/SquaresRow.d.ts.map +1 -0
- package/lib/typescript/src/MyAction/index.d.ts +14 -0
- package/lib/typescript/src/MyAction/index.d.ts.map +1 -0
- package/lib/typescript/src/PartnerPortal/components/EmbedManager.d.ts.map +1 -1
- package/lib/typescript/src/PartnerPortal/components/StringSelector.d.ts +10 -0
- package/lib/typescript/src/PartnerPortal/components/StringSelector.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/ApiOverrides/index.ts +4 -0
- package/src/BettorBot/api/index.ts +49 -0
- package/src/BettorBot/components/BroadcastMessageCard.tsx +159 -0
- package/src/BettorBot/components/ServerInfoCard.tsx +73 -0
- package/src/BettorBot/index.tsx +295 -0
- package/src/CreateEngagement/index.tsx +4 -1
- package/src/FlashMarket/api/index.ts +72 -0
- package/src/FlashMarket/components/ManageFlashMarket.tsx +10 -0
- package/src/MyAction/api/index.ts +393 -0
- package/src/MyAction/components/BracketRow.tsx +34 -0
- package/src/MyAction/components/CompetitionRow.tsx +39 -0
- package/src/MyAction/components/ContestStatRow.tsx +153 -0
- package/src/MyAction/components/FlashRow.tsx +74 -0
- package/src/MyAction/components/ParlayRow.tsx +137 -0
- package/src/MyAction/components/SquaresRow.tsx +55 -0
- package/src/MyAction/index.tsx +316 -0
- package/src/PartnerPortal/components/EmbedManager.tsx +20 -0
- package/src/PartnerPortal/components/StringSelector.tsx +55 -0
- package/src/index.tsx +4 -0
- package/src/types.d.ts +60 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import moment, { type Moment } from "moment-mini";
|
|
2
|
+
import type { ActionListProps, AthleteProps, BracketCompetitionProps, CompetitionPayoutTypeProps, CompetitionPlayerBracketProps, CompetitionPlayerProps, CompetitionProps, CompetitionRecordProps, CompetitionResultProps, CompetitionResultTypeProps, CompetitionSeasonPlayerProps, CompetitionSeasonProps, CompetitionSeasonResultProps, CompetitionTypeProps, EventProps, LeagueProps, MatchProps, OrderProps, OrderStatsProps, ParlayPositionProps, ParlayProps, PlayerBracketProps, PollOptionProps, PollProps, PollResponseProps, SquaresCompetitionProps, TeamProps, TournamentProps } from "../../types";
|
|
3
|
+
export declare const MyActionApi: {
|
|
4
|
+
setEnvironment: () => void;
|
|
5
|
+
ContestApi: {
|
|
6
|
+
getLeagues: () => Promise<LeagueProps[]>;
|
|
7
|
+
getTournamentsByIds: (tournament_ids: string[]) => Promise<TournamentProps[]>;
|
|
8
|
+
getEventsByIds: (event_ids: string[]) => Promise<EventProps[]>;
|
|
9
|
+
getMatchesByIds: (match_ids: string[]) => Promise<MatchProps[]>;
|
|
10
|
+
getMatchesByTournamentId: (tournament_id: string) => Promise<MatchProps[]>;
|
|
11
|
+
getAthletesByIds: (athlete_ids: string[]) => Promise<AthleteProps[]>;
|
|
12
|
+
getTeamsByIds: (team_ids: string[]) => Promise<TeamProps[]>;
|
|
13
|
+
};
|
|
14
|
+
OrderApi: {
|
|
15
|
+
getMyAction: () => Promise<{
|
|
16
|
+
orders: OrderProps[];
|
|
17
|
+
parlays: ParlayProps[];
|
|
18
|
+
parlay_positions: ParlayPositionProps[];
|
|
19
|
+
parlay_orders: OrderProps[];
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
22
|
+
FlashApi: {
|
|
23
|
+
getMyFlashAction: () => Promise<{
|
|
24
|
+
polls: PollProps[];
|
|
25
|
+
poll_responses: PollResponseProps[];
|
|
26
|
+
poll_options: PollOptionProps[];
|
|
27
|
+
}>;
|
|
28
|
+
};
|
|
29
|
+
EngagementApi: {
|
|
30
|
+
getCompetitionOptions: () => Promise<{
|
|
31
|
+
competition_types: CompetitionTypeProps[];
|
|
32
|
+
competition_result_types: CompetitionResultTypeProps[];
|
|
33
|
+
competition_payout_types: CompetitionPayoutTypeProps[];
|
|
34
|
+
}>;
|
|
35
|
+
getMyActiveSquaresCompetitions: () => Promise<{
|
|
36
|
+
squares_competitions: SquaresCompetitionProps[];
|
|
37
|
+
}>;
|
|
38
|
+
getMyActiveCompetitions: () => Promise<{
|
|
39
|
+
competitions: CompetitionProps[];
|
|
40
|
+
competition_players: CompetitionPlayerProps[];
|
|
41
|
+
competition_records: CompetitionRecordProps[];
|
|
42
|
+
competition_results: CompetitionResultProps[];
|
|
43
|
+
}>;
|
|
44
|
+
getMyActiveSeasons: () => Promise<{
|
|
45
|
+
competition_seasons: CompetitionSeasonProps[];
|
|
46
|
+
competition_season_players: CompetitionSeasonPlayerProps[];
|
|
47
|
+
competition_season_results: CompetitionSeasonResultProps[];
|
|
48
|
+
}>;
|
|
49
|
+
getMyActiveBracketCompetitions: () => Promise<{
|
|
50
|
+
bracket_competitions: BracketCompetitionProps[];
|
|
51
|
+
competition_player_brackets: CompetitionPlayerBracketProps[];
|
|
52
|
+
player_brackets: PlayerBracketProps[];
|
|
53
|
+
}>;
|
|
54
|
+
getMyActiveAdminBracketCompetitions: () => Promise<any>;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export declare const MyActionHelpers: {
|
|
58
|
+
sortAction: (orders: OrderProps[], parlays: ParlayProps[], parlay_orders: OrderProps[], polls: PollProps[], competitions: CompetitionProps[], squares_competitions: SquaresCompetitionProps[], bracket_competitions: BracketCompetitionProps[]) => ActionListProps[];
|
|
59
|
+
getContestsFromOrders: (orders: OrderProps[]) => {
|
|
60
|
+
event_ids: string[];
|
|
61
|
+
tournament_ids: string[];
|
|
62
|
+
match_ids: string[];
|
|
63
|
+
athlete_ids: string[];
|
|
64
|
+
team_ids: string[];
|
|
65
|
+
};
|
|
66
|
+
getContestsByIds: (event_ids: string[], tournament_ids: string[], match_ids: string[], athlete_ids: string[], team_ids: string[]) => Promise<{
|
|
67
|
+
events: EventProps[];
|
|
68
|
+
tournaments: TournamentProps[];
|
|
69
|
+
matches: MatchProps[];
|
|
70
|
+
athletes: AthleteProps[];
|
|
71
|
+
teams: TeamProps[];
|
|
72
|
+
}>;
|
|
73
|
+
getContestDetails: (contest_type: string, event?: EventProps, tournament?: TournamentProps, match?: MatchProps) => {
|
|
74
|
+
contest_title: string;
|
|
75
|
+
scheduled_datetime: Moment;
|
|
76
|
+
};
|
|
77
|
+
calcAllOrderStats: (orders: OrderProps[], parlay_positions?: ParlayPositionProps[], flash_responses?: PollResponseProps[]) => OrderStatsProps;
|
|
78
|
+
getDetailsForOrder: (order: OrderProps, events: EventProps[], tournaments: TournamentProps[], matches: MatchProps[], athletes: AthleteProps[], teams: TeamProps[], leagues: LeagueProps[]) => {
|
|
79
|
+
event: EventProps | undefined;
|
|
80
|
+
tournament: TournamentProps | undefined;
|
|
81
|
+
match: MatchProps | undefined;
|
|
82
|
+
athlete: AthleteProps | undefined;
|
|
83
|
+
team: TeamProps | undefined;
|
|
84
|
+
contest_title: string;
|
|
85
|
+
scheduled_datetime: moment.Moment;
|
|
86
|
+
league: LeagueProps | undefined;
|
|
87
|
+
};
|
|
88
|
+
aggregatePositions: (parlay: ParlayProps, pp: ParlayPositionProps[]) => {
|
|
89
|
+
stake: number;
|
|
90
|
+
potential_winnings: number;
|
|
91
|
+
earnings: number;
|
|
92
|
+
winnings: number;
|
|
93
|
+
commission: number;
|
|
94
|
+
status: string;
|
|
95
|
+
net_winnings: number;
|
|
96
|
+
offer_side: "maker" | "taker";
|
|
97
|
+
result_ind: "win" | "lose" | "draw" | undefined;
|
|
98
|
+
};
|
|
99
|
+
getActionStats: (orders: OrderProps[], parlays: ParlayProps[], parlay_positions: ParlayPositionProps[], competitions: CompetitionProps[], squares_competitions: SquaresCompetitionProps[], bracket_competitions: BracketCompetitionProps[]) => {
|
|
100
|
+
risk: number;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/MyAction/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,uBAAuB,EAAE,0BAA0B,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tJ,WAAW,MAAK,mBAAmB,EAAE;;;;;;;;;;;6BAgBzC,UAAU,EAAE,WAAU,WAAW,EAAE,oBAAmB,mBAAmB,EAAE,gBAAe,gBAAgB,EAAE,wBAAuB,uBAAuB,EAAE,wBAAuB,uBAAuB,EAAE;;;CAyBvO,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { BracketCompetitionProps } from "../../types";
|
|
3
|
+
type BracketRowProps = {
|
|
4
|
+
market_type: 'FOR_MONEY' | 'FREE';
|
|
5
|
+
bracket_competition: BracketCompetitionProps;
|
|
6
|
+
width: number;
|
|
7
|
+
};
|
|
8
|
+
declare const BracketRow: ({ market_type, bracket_competition, width }: BracketRowProps) => React.JSX.Element;
|
|
9
|
+
export default BracketRow;
|
|
10
|
+
//# sourceMappingURL=BracketRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BracketRow.d.ts","sourceRoot":"","sources":["../../../../../src/MyAction/components/BracketRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAI1D,KAAK,eAAe,GAAG;IACnB,WAAW,EAAC,WAAW,GAAC,MAAM,CAAC;IAC/B,mBAAmB,EAAC,uBAAuB,CAAC;IAC5C,KAAK,EAAC,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,UAAU,GAAI,6CAA4C,eAAe,sBAmB9E,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CompetitionPlayerProps, CompetitionProps, CompetitionRecordProps, CompetitionResultProps, CompetitionResultTypeProps, CompetitionTypeProps } from "../../types";
|
|
3
|
+
type CompetitionRowProps = {
|
|
4
|
+
market_type: 'FOR_MONEY' | 'FREE';
|
|
5
|
+
competition: CompetitionProps;
|
|
6
|
+
competition_type: CompetitionTypeProps;
|
|
7
|
+
competition_result_type: CompetitionResultTypeProps;
|
|
8
|
+
competition_player: CompetitionPlayerProps;
|
|
9
|
+
competition_result: CompetitionResultProps;
|
|
10
|
+
competition_record: CompetitionRecordProps;
|
|
11
|
+
width: number;
|
|
12
|
+
};
|
|
13
|
+
declare const CompetitionRow: ({ market_type, competition, competition_record, width }: CompetitionRowProps) => React.JSX.Element;
|
|
14
|
+
export default CompetitionRow;
|
|
15
|
+
//# sourceMappingURL=CompetitionRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompetitionRow.d.ts","sourceRoot":"","sources":["../../../../../src/MyAction/components/CompetitionRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAI7K,KAAK,mBAAmB,GAAG;IACvB,WAAW,EAAC,WAAW,GAAC,MAAM,CAAC;IAC/B,WAAW,EAAC,gBAAgB,CAAC;IAC7B,gBAAgB,EAAC,oBAAoB,CAAC;IACtC,uBAAuB,EAAC,0BAA0B,CAAC;IACnD,kBAAkB,EAAC,sBAAsB,CAAC;IAC1C,kBAAkB,EAAC,sBAAsB,CAAC;IAC1C,kBAAkB,EAAC,sBAAsB,CAAC;IAC1C,KAAK,EAAC,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,yDAAwD,mBAAmB,sBAmBlG,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AthleteProps, EventProps, LeagueProps, MatchProps, OrderProps, TeamProps, TournamentProps } from "../../types";
|
|
3
|
+
type ContestStatRowProps = {
|
|
4
|
+
market_type: 'FOR_MONEY' | 'FREE';
|
|
5
|
+
contest_label: string;
|
|
6
|
+
time_detail: string;
|
|
7
|
+
orders: OrderProps[];
|
|
8
|
+
leagues: LeagueProps[];
|
|
9
|
+
events: EventProps[];
|
|
10
|
+
tournaments: TournamentProps[];
|
|
11
|
+
matches: MatchProps[];
|
|
12
|
+
athletes: AthleteProps[];
|
|
13
|
+
teams: TeamProps[];
|
|
14
|
+
width: number;
|
|
15
|
+
};
|
|
16
|
+
declare const ContestStatRow: ({ market_type, contest_label, orders, width, events, tournaments, matches, athletes, teams, leagues }: ContestStatRowProps) => React.JSX.Element;
|
|
17
|
+
export default ContestStatRow;
|
|
18
|
+
//# sourceMappingURL=ContestStatRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContestStatRow.d.ts","sourceRoot":"","sources":["../../../../../src/MyAction/components/ContestStatRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAQ5H,KAAK,mBAAmB,GAAG;IACvB,WAAW,EAAC,WAAW,GAAC,MAAM,CAAC;IAC/B,aAAa,EAAC,MAAM,CAAC;IACrB,WAAW,EAAC,MAAM,CAAC;IACnB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,OAAO,EAAC,WAAW,EAAE,CAAC;IACtB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,WAAW,EAAC,eAAe,EAAE,CAAC;IAC9B,OAAO,EAAC,UAAU,EAAE,CAAC;IACrB,QAAQ,EAAC,YAAY,EAAE,CAAC;IACxB,KAAK,EAAC,SAAS,EAAE,CAAC;IAClB,KAAK,EAAC,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,cAAc,GAAI,uGAAsG,mBAAmB,sBA8HhJ,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PollOptionProps, PollProps, PollResponseProps } from "../../types";
|
|
3
|
+
type FlashRowProps = {
|
|
4
|
+
market_type: 'FOR_MONEY' | 'FREE';
|
|
5
|
+
poll: PollProps;
|
|
6
|
+
poll_responses: PollResponseProps[];
|
|
7
|
+
poll_options: PollOptionProps[];
|
|
8
|
+
width: number;
|
|
9
|
+
};
|
|
10
|
+
declare const FlashRow: ({ market_type, poll, poll_options, poll_responses, width }: FlashRowProps) => React.JSX.Element;
|
|
11
|
+
export default FlashRow;
|
|
12
|
+
//# sourceMappingURL=FlashRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlashRow.d.ts","sourceRoot":"","sources":["../../../../../src/MyAction/components/FlashRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAKhF,KAAK,aAAa,GAAG;IACjB,WAAW,EAAC,WAAW,GAAC,MAAM,CAAC;IAC/B,IAAI,EAAC,SAAS,CAAC;IACf,cAAc,EAAC,iBAAiB,EAAE,CAAC;IACnC,YAAY,EAAC,eAAe,EAAE,CAAC;IAC/B,KAAK,EAAC,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,QAAQ,GAAI,4DAA2D,aAAa,sBAwDzF,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AthleteProps, EventProps, LeagueProps, MatchProps, OrderProps, ParlayPositionProps, ParlayProps, TeamProps, TournamentProps } from "../../types";
|
|
3
|
+
type ParlayRowProps = {
|
|
4
|
+
market_type: 'FOR_MONEY' | 'FREE';
|
|
5
|
+
leagues: LeagueProps[];
|
|
6
|
+
events: EventProps[];
|
|
7
|
+
tournaments: TournamentProps[];
|
|
8
|
+
matches: MatchProps[];
|
|
9
|
+
athletes: AthleteProps[];
|
|
10
|
+
teams: TeamProps[];
|
|
11
|
+
parlay: ParlayProps;
|
|
12
|
+
parlay_orders: OrderProps[];
|
|
13
|
+
parlay_positions: ParlayPositionProps[];
|
|
14
|
+
width: number;
|
|
15
|
+
};
|
|
16
|
+
declare const ParlayRow: ({ market_type, parlay, events, matches, tournaments, athletes, teams, parlay_orders, parlay_positions, leagues }: ParlayRowProps) => React.JSX.Element;
|
|
17
|
+
export default ParlayRow;
|
|
18
|
+
//# sourceMappingURL=ParlayRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParlayRow.d.ts","sourceRoot":"","sources":["../../../../../src/MyAction/components/ParlayRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAQ9J,KAAK,cAAc,GAAG;IAClB,WAAW,EAAC,WAAW,GAAC,MAAM,CAAC;IAC/B,OAAO,EAAC,WAAW,EAAE,CAAC;IACtB,MAAM,EAAC,UAAU,EAAE,CAAC;IACpB,WAAW,EAAC,eAAe,EAAE,CAAC;IAC9B,OAAO,EAAC,UAAU,EAAE,CAAC;IACrB,QAAQ,EAAC,YAAY,EAAE,CAAC;IACxB,KAAK,EAAC,SAAS,EAAE,CAAC;IAClB,MAAM,EAAC,WAAW,CAAC;IACnB,aAAa,EAAC,UAAU,EAAE,CAAC;IAC3B,gBAAgB,EAAC,mBAAmB,EAAE,CAAA;IACtC,KAAK,EAAC,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,SAAS,GAAI,kHAAiH,cAAc,sBA8GjJ,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SquaresCompetitionProps } from "../../types";
|
|
3
|
+
type SquaresRowProps = {
|
|
4
|
+
market_type: 'FOR_MONEY' | 'FREE';
|
|
5
|
+
squares_competition: SquaresCompetitionProps;
|
|
6
|
+
width: number;
|
|
7
|
+
};
|
|
8
|
+
declare const SquaresRow: ({ market_type, squares_competition, width }: SquaresRowProps) => React.JSX.Element;
|
|
9
|
+
export default SquaresRow;
|
|
10
|
+
//# sourceMappingURL=SquaresRow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SquaresRow.d.ts","sourceRoot":"","sources":["../../../../../src/MyAction/components/SquaresRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAqB,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAK7E,KAAK,eAAe,GAAG;IACnB,WAAW,EAAC,WAAW,GAAC,MAAM,CAAC;IAC/B,mBAAmB,EAAC,uBAAuB,CAAC;IAC5C,KAAK,EAAC,MAAM,CAAA;CACf,CAAA;AAED,QAAA,MAAM,UAAU,GAAI,6CAA4C,eAAe,sBAuC9E,CAAA;AAED,eAAe,UAAU,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* My Action Components
|
|
3
|
+
* This is responsible for viewing all of your action in one spot
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import type { MyPlayerProps } from '../types';
|
|
8
|
+
type MyActionProps = {
|
|
9
|
+
me: MyPlayerProps;
|
|
10
|
+
market_type: 'FOR_MONEY' | 'FREE';
|
|
11
|
+
};
|
|
12
|
+
declare const MyAction: ({ me, market_type }: MyActionProps) => React.JSX.Element;
|
|
13
|
+
export default MyAction;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/MyAction/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAA8B,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAA2O,aAAa,EAAoJ,MAAM,UAAU,CAAC;AAUza,KAAK,aAAa,GAAG;IACjB,EAAE,EAAC,aAAa,CAAC;IACjB,WAAW,EAAC,WAAW,GAAC,MAAM,CAAA;CACjC,CAAA;AAID,QAAA,MAAM,QAAQ,GAAI,qBAAoB,aAAa,sBAgSlD,CAAA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmbedManager.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/EmbedManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAmE,kBAAkB,EAAE,aAAa,EAAmC,MAAM,aAAa,CAAC;AAEvK,OAAO,EAAgD,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"EmbedManager.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/EmbedManager.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAmE,kBAAkB,EAAE,aAAa,EAAmC,MAAM,aAAa,CAAC;AAEvK,OAAO,EAAgD,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAY5F,KAAK,iBAAiB,GAAG;IACrB,gBAAgB,EAAC,MAAM,CAAC;IACxB,EAAE,EAAC,aAAa,CAAC;IACjB,KAAK,CAAC,EAAC,OAAO,CAAC;IACf,eAAe,CAAC,EAAC,CAAC,GAAG,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAClD,YAAY,CAAC,EAAC,SAAS,CAAC;IACxB,YAAY,CAAC,EAAC,SAAS,CAAC;IACxB,UAAU,EAAC,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,QAAA,MAAM,YAAY,GAAI,mGAAkG,iBAAiB,sBAmhBxI,CAAA;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StringSelectorOptionProps } from "../../types";
|
|
3
|
+
type StringSelectorProps = {
|
|
4
|
+
active_value?: string;
|
|
5
|
+
options: StringSelectorOptionProps[];
|
|
6
|
+
onSelectOption: (option: StringSelectorOptionProps | undefined) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const StringSelector: ({ active_value, options, onSelectOption }: StringSelectorProps) => React.JSX.Element;
|
|
9
|
+
export default StringSelector;
|
|
10
|
+
//# sourceMappingURL=StringSelector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StringSelector.d.ts","sourceRoot":"","sources":["../../../../../src/PartnerPortal/components/StringSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAM7D,KAAK,mBAAmB,GAAG;IACvB,YAAY,CAAC,EAAC,MAAM,CAAC;IACrB,OAAO,EAAE,yBAAyB,EAAE,CAAC;IACrC,cAAc,EAAC,CAAC,MAAM,EAAC,yBAAyB,GAAG,SAAS,KAAK,IAAI,CAAA;CACxE,CAAA;AACD,QAAA,MAAM,cAAc,GAAI,2CAA0C,mBAAmB,sBAwCpF,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -66,5 +66,7 @@ import EmbedManager from './PartnerPortal/components/EmbedManager';
|
|
|
66
66
|
import CreateEmbed from './PartnerPortal/components/CreateEmbed';
|
|
67
67
|
import ReferralCodeManager from './PartnerPortal/components/ReferralCodeManager';
|
|
68
68
|
import FlashCampaignManager from './PartnerPortal/components/FlashCampaignManager';
|
|
69
|
-
|
|
69
|
+
import MyAction from './MyAction';
|
|
70
|
+
import BettorBotDashboard from './BettorBot';
|
|
71
|
+
export { Authenticator, Observer, MyAction, CreateEmbed, ReferralCodeManager, CreateEngagement, DiscordConnectionManager, BEEventApi, FlashCampaignManager, BettorBotDashboard, EmbedManager, RankingsCard, ManageFlashMarket, BELinkApi, PartnerPortal, SquaresManager, GuideView, BetMatch, ManageFilter, Ticker, Premium, CreateGroupWizard, LeaderboardCard, GroupComponent, LocationTracker, BEClarity, FlashMarket, ContactsCard, PlayerRecommender, GolfScoreboard, ContactsSelector, Campaign, BEPostHog, ManageBracketCompetitionForm, NotificationModule, FlashHolder, useNotifications, ClaritySmartEvents, ProfileManager, CompetitionManager, Components, SocialComponents, APIOverrides, LinearGradient, usePlayerLocation, BettorSearch, Colors, MyWallet, Share, Checkout, MarketComponents, EventComponents, PollCampaign, PollCampaignApi, PollApi, MarketMaker, CompetitionModule, SeasonManager, CreateCompetitionForm, CreateSeasonForm, SeasonModule, AdminCompetitionList, AdServer, Leaderboard, AdProvider, BracketRoom, SquaresModule, SocketManager, PromotedOrder, EngageModule, CompetitionCard, SquaresCompetitionCard, BracketCompetitionCard, SeasonCard };
|
|
70
72
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AACpD,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC7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W,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,UAAU,EACX,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "be-components",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.3",
|
|
4
4
|
"description": "Components for BettorEdge Apps",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"typecheck": "tsc --noEmit",
|
|
33
33
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
34
34
|
"clean": "del-cli lib",
|
|
35
|
-
"prepare": "NODE_OPTIONS='--max-old-space-size=
|
|
35
|
+
"prepare": "NODE_OPTIONS='--max-old-space-size=6000' bob build",
|
|
36
36
|
"release": "release-it"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"@paypal/react-paypal-js": "^8.3.0",
|
|
173
173
|
"@react-native-async-storage/async-storage": "2.1.2",
|
|
174
174
|
"@react-native-community/datetimepicker": "^8.4.5",
|
|
175
|
-
"@react-native-community/slider": "
|
|
175
|
+
"@react-native-community/slider": "^5.0.1",
|
|
176
176
|
"@react-spring/web": "^9.7.3",
|
|
177
177
|
"@types/uuid": "^9.0.8",
|
|
178
178
|
"axios": "^1.6.8",
|
|
@@ -12,6 +12,7 @@ const ENVIRONMENT_ENDPOINTS = {
|
|
|
12
12
|
VOUCH_ID: 'adqEZph8t*_NBFy6u_l4!t~Hin6kpK',
|
|
13
13
|
VOUCHED_CALLBACK_URL: 'https://1f9b-64-159-204-178.ngrok-free.app/v1/players/vouch/hook',
|
|
14
14
|
VOUCHED_SANDBOX: true,
|
|
15
|
+
BOT_SVC_API: 'https://api.bot.bettoredge.com',
|
|
15
16
|
EVENT_SVC_API: 'http://localhost:3002',
|
|
16
17
|
MK_SVC_API:'http://localhost:3001',
|
|
17
18
|
TP_SVC_API: 'http://localhost:3006',
|
|
@@ -28,6 +29,7 @@ const ENVIRONMENT_ENDPOINTS = {
|
|
|
28
29
|
VOUCH_ID: 'adqEZph8t*_NBFy6u_l4!t~Hin6kpK',
|
|
29
30
|
VOUCHED_CALLBACK_URL: 'https://stage-be-auth-svc.herokuapp.com/v1/players/vouch/hook',
|
|
30
31
|
VOUCHED_SANDBOX: true,
|
|
32
|
+
BOT_SVC_API: 'https://api.bot.bettoredge.com',
|
|
31
33
|
EVENT_SVC_API: 'https://stage-be-sr-svc.herokuapp.com',
|
|
32
34
|
MK_SVC_API:'https://stage-be-mk-svc.herokuapp.com',
|
|
33
35
|
TP_SVC_API: 'https://stage-be-tp-svc.herokuapp.com',
|
|
@@ -44,6 +46,7 @@ const ENVIRONMENT_ENDPOINTS = {
|
|
|
44
46
|
VOUCH_ID: 'Q3tmJ3r9FnkN*n-MqS-!j0NS*k!mdo',
|
|
45
47
|
VOUCHED_CALLBACK_URL: 'https://be-auth-svc.herokuapp.com/v1/players/vouch/hook',
|
|
46
48
|
VOUCHED_SANDBOX: false,
|
|
49
|
+
BOT_SVC_API: 'https://api.bot.bettoredge.com',
|
|
47
50
|
EVENT_SVC_API: 'https://api.events.bettoredge.com',
|
|
48
51
|
MK_SVC_API: 'https://api.markets.bettoredge.com',
|
|
49
52
|
TP_SVC_API: 'https://be-tp-svc.herokuapp.com',
|
|
@@ -61,6 +64,7 @@ const ENVIRONMENT_ENDPOINTS = {
|
|
|
61
64
|
VOUCHED_CALLBACK_URL: 'https://be-auth-svc.herokuapp.com/v1/players/vouch/hook',
|
|
62
65
|
VOUCHED_SANDBOX: false,
|
|
63
66
|
EVENT_SVC_API: 'https://proxy.bettoredge.com/events',
|
|
67
|
+
BOT_SVC_API: 'https://api.bot.bettoredge.com',
|
|
64
68
|
MK_SVC_API: 'https://proxy.bettoredge.com/markets',
|
|
65
69
|
TP_SVC_API: 'https://be-tp-svc.herokuapp.com',
|
|
66
70
|
SOCIAL_SVC_API: 'https://proxy.bettoredge.com/social',
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { APIOverrides } from "../../ApiOverrides";
|
|
3
|
+
import type { BroadcastResult, BroadcastTarget, DiscordPlayerStatsProps, PublicPlayerProps, ServersResponse } from "../../types";
|
|
4
|
+
|
|
5
|
+
let BOT_SVC_API = ''
|
|
6
|
+
let AUTH_SVC_API = ''
|
|
7
|
+
export const BettorBotApi = {
|
|
8
|
+
setEnvironment: () => {
|
|
9
|
+
const endpoints = APIOverrides.getEndpoints();
|
|
10
|
+
AUTH_SVC_API = endpoints['AUTH_SVC_API'] as string;
|
|
11
|
+
BOT_SVC_API = endpoints['BOT_SVC_API'] as string;
|
|
12
|
+
},
|
|
13
|
+
getServers: async():Promise<ServersResponse> => {
|
|
14
|
+
try {
|
|
15
|
+
console.log('Starting HERE!!!')
|
|
16
|
+
console.log(BOT_SVC_API)
|
|
17
|
+
const resp = await axios.get(`${BOT_SVC_API}/servers`);
|
|
18
|
+
console.log(resp.data)
|
|
19
|
+
return resp.data
|
|
20
|
+
} catch (e) {
|
|
21
|
+
console.log(e)
|
|
22
|
+
return { totalGuilds: 0, error:'Unable to get data', servers: [] }
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
getDiscordStats: async():Promise<DiscordPlayerStatsProps[]> => {
|
|
26
|
+
try {
|
|
27
|
+
const resp = await axios.get(`${AUTH_SVC_API}/v1/players/discord/stats`);
|
|
28
|
+
return resp.data.discord_player_stats
|
|
29
|
+
} catch (e) {
|
|
30
|
+
return []
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
getPlayersByPlayerIds : async(player_ids:string[]):Promise<PublicPlayerProps[]> => {
|
|
34
|
+
try {
|
|
35
|
+
const resp = await axios.post(`${AUTH_SVC_API}/v1/players/bulk/get`, { player_ids })
|
|
36
|
+
return resp.data.players
|
|
37
|
+
} catch (e) {
|
|
38
|
+
return []
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
broadcastMessage: async(message: string, targets:BroadcastTarget[]):Promise<BroadcastResult[]> => {
|
|
42
|
+
try {
|
|
43
|
+
const resp = await axios.post(`${BOT_SVC_API}/broadcast`, { message, targets });
|
|
44
|
+
return resp.data.results
|
|
45
|
+
} catch (e) {
|
|
46
|
+
return []
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Button, Text, TextInput, View } from "../../Components/Themed";
|
|
3
|
+
import type { BroadcastResult, BroadcastTarget, FocusPositionProps, ServerInfo } from '../../types';
|
|
4
|
+
import { useColors } from '../../constants/useColors';
|
|
5
|
+
import { BettorBotApi } from '../api';
|
|
6
|
+
import { FlatList, Image } from 'react-native';
|
|
7
|
+
import { Icons } from '../../Components';
|
|
8
|
+
|
|
9
|
+
type BroadcastMessageCardProps = {
|
|
10
|
+
selected_servers: { guild_id:string, channels:string[] }[],
|
|
11
|
+
onClose:() => void,
|
|
12
|
+
servers:ServerInfo[],
|
|
13
|
+
onFocusPosition?:(pos:FocusPositionProps) => void,
|
|
14
|
+
onSendMessage:(results:BroadcastResult[]) => void
|
|
15
|
+
}
|
|
16
|
+
const BroadcastMessageCard = ({ selected_servers, servers, onSendMessage, onFocusPosition, onClose }:BroadcastMessageCardProps) => {
|
|
17
|
+
const Colors = useColors();
|
|
18
|
+
const [ message, setMessage ] = useState('');
|
|
19
|
+
const [ action_loading, setActionLoading ] = useState(false);
|
|
20
|
+
const [ results, setResults ] = useState<BroadcastResult[]>([]);
|
|
21
|
+
const is_valid = message && selected_servers.length > 0 ? true : false
|
|
22
|
+
|
|
23
|
+
const handleSend = async() => {
|
|
24
|
+
if(!is_valid){ return alert('Please enter valid message') }
|
|
25
|
+
if(action_loading){ return }
|
|
26
|
+
setActionLoading(true);
|
|
27
|
+
let targets:BroadcastTarget[] = []
|
|
28
|
+
selected_servers.map(ss => {
|
|
29
|
+
ss.channels.map(c => {
|
|
30
|
+
targets.push({ guild_id: ss.guild_id, channel_id: c })
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
console.log(targets);
|
|
34
|
+
|
|
35
|
+
const results = await BettorBotApi.broadcastMessage(message, targets);
|
|
36
|
+
let success_results = results.filter(r => r.success);
|
|
37
|
+
let fail_results = results.filter(r => !r.success);
|
|
38
|
+
alert(`Message Sent!\nSuccessful : ${success_results.length}\nFailed: ${fail_results.length}`);
|
|
39
|
+
setResults(results);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const renderServers = (data:{ item:{ guild_id:string, channels:string[] }, index:number }) => {
|
|
43
|
+
const server = servers.find(s => s.id == data.item.guild_id);
|
|
44
|
+
if(!server){ return <></> }
|
|
45
|
+
return (
|
|
46
|
+
<View float style={{ margin:5, width:100 }}>
|
|
47
|
+
<Image
|
|
48
|
+
source={{ uri: server.icon ?? '' }}
|
|
49
|
+
style={{ height:50, width:100, borderTopRightRadius:8, borderTopLeftRadius:8 }}
|
|
50
|
+
resizeMode='cover'
|
|
51
|
+
/>
|
|
52
|
+
<View transparent style={{ padding:10 }}>
|
|
53
|
+
<Text theme='h1' textAlign='center'>{server.name}</Text>
|
|
54
|
+
<Text theme='description'>{data.item.channels.length} Channels</Text>
|
|
55
|
+
</View>
|
|
56
|
+
</View>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const renderResults = (data:{ item:BroadcastResult, index:number }) => {
|
|
61
|
+
const guild = servers.find(s => s.id == data.item.guild_id);
|
|
62
|
+
if(!guild){ return <></> }
|
|
63
|
+
const channel = guild.accessibleChannels.find(c => c.id == data.item.channel_id);
|
|
64
|
+
if(!channel){ return <></> }
|
|
65
|
+
return (
|
|
66
|
+
<View type='row' style={{ borderBottomWidth:1, borderColor:Colors.borders.light, padding:6 }}>
|
|
67
|
+
<Image
|
|
68
|
+
source={{ uri: guild.icon ?? '' }}
|
|
69
|
+
style={{ height:25, width:25 }}
|
|
70
|
+
resizeMode='cover'
|
|
71
|
+
/>
|
|
72
|
+
<View transparent style={{flex:1, marginLeft:10, marginRight:10}}>
|
|
73
|
+
<Text theme='h1'>{channel.name}</Text>
|
|
74
|
+
<Text theme='description' style={{ marginTop:3 }}>{guild.name}</Text>
|
|
75
|
+
</View>
|
|
76
|
+
{data.item.success ?
|
|
77
|
+
<Icons.CheckCirlceIcon size={20} color={Colors.text.success} />
|
|
78
|
+
:
|
|
79
|
+
<Icons.CloseIcon size={20} color={Colors.text.error} />
|
|
80
|
+
}
|
|
81
|
+
</View>
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<View float style={{ flex:1 }}>
|
|
87
|
+
<View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
|
|
88
|
+
<View transparent style={{ flex:1, marginLeft:10 }}>
|
|
89
|
+
<Text theme='h1'>Send Message</Text>
|
|
90
|
+
<Text theme='description' style={{ marginTop:3 }}>Enter your message below and broadcast to {selected_servers.length} servers</Text>
|
|
91
|
+
</View>
|
|
92
|
+
<Button
|
|
93
|
+
float
|
|
94
|
+
title='X'
|
|
95
|
+
title_color={Colors.text.error}
|
|
96
|
+
style={{ padding:10 }}
|
|
97
|
+
onPress={() => {
|
|
98
|
+
if(results.length > 0){ return onSendMessage(results) }
|
|
99
|
+
return onClose()
|
|
100
|
+
}}
|
|
101
|
+
/>
|
|
102
|
+
</View>
|
|
103
|
+
<View style={{ flex:1, padding:10 }}>
|
|
104
|
+
{results.length == 0 ?
|
|
105
|
+
<View transparent>
|
|
106
|
+
<TextInput
|
|
107
|
+
value={message}
|
|
108
|
+
onFocusPosition={onFocusPosition}
|
|
109
|
+
placeholder='Enter your message here'
|
|
110
|
+
onChangeText={(text) => setMessage(text)}
|
|
111
|
+
style={{ height:150, textAlign:'center' }}
|
|
112
|
+
/>
|
|
113
|
+
</View>
|
|
114
|
+
:
|
|
115
|
+
<FlatList
|
|
116
|
+
data={results}
|
|
117
|
+
key='message_results'
|
|
118
|
+
renderItem={renderResults}
|
|
119
|
+
keyExtractor={(item) => `${item.guild_id}:${item.channel_id}`}
|
|
120
|
+
/>
|
|
121
|
+
}
|
|
122
|
+
</View>
|
|
123
|
+
{results.length == 0 ?
|
|
124
|
+
<View style={{ padding:10 }}>
|
|
125
|
+
<Text theme='h1'>Sending Message To:</Text>
|
|
126
|
+
<FlatList
|
|
127
|
+
key={'server_list_message'}
|
|
128
|
+
horizontal
|
|
129
|
+
renderItem={renderServers}
|
|
130
|
+
data={selected_servers}
|
|
131
|
+
keyExtractor={item => item.guild_id}
|
|
132
|
+
/>
|
|
133
|
+
</View>
|
|
134
|
+
:<></>}
|
|
135
|
+
<View type='footer' style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
|
|
136
|
+
{results.length == 0 ?
|
|
137
|
+
<Button
|
|
138
|
+
title='SEND MESSAGE'
|
|
139
|
+
type='success'
|
|
140
|
+
disabled={!is_valid || action_loading}
|
|
141
|
+
loading={action_loading}
|
|
142
|
+
style={{ flex:1, opacity: !is_valid ? 0.5 : 1 }}
|
|
143
|
+
onPress={() => handleSend()}
|
|
144
|
+
/>
|
|
145
|
+
:
|
|
146
|
+
<Button
|
|
147
|
+
title='CLOSE'
|
|
148
|
+
type='close'
|
|
149
|
+
style={{ flex:1 }}
|
|
150
|
+
onPress={() => onSendMessage(results)}
|
|
151
|
+
/>
|
|
152
|
+
}
|
|
153
|
+
</View>
|
|
154
|
+
</View>
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export default BroadcastMessageCard
|