be-components 7.4.2 → 7.4.4

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.
Files changed (89) hide show
  1. package/lib/commonjs/ApiOverrides/index.js +4 -2
  2. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  3. package/lib/commonjs/BettorBot/api/index.js +64 -0
  4. package/lib/commonjs/BettorBot/api/index.js.map +1 -0
  5. package/lib/commonjs/BettorBot/components/BroadcastMessageCard.js +233 -0
  6. package/lib/commonjs/BettorBot/components/BroadcastMessageCard.js.map +1 -0
  7. package/lib/commonjs/BettorBot/components/ServerInfoCard.js +126 -0
  8. package/lib/commonjs/BettorBot/components/ServerInfoCard.js.map +1 -0
  9. package/lib/commonjs/BettorBot/index.js +532 -0
  10. package/lib/commonjs/BettorBot/index.js.map +1 -0
  11. package/lib/commonjs/NotificationManager/api/index.js +448 -0
  12. package/lib/commonjs/NotificationManager/api/index.js.map +1 -0
  13. package/lib/commonjs/NotificationManager/index.js +1159 -0
  14. package/lib/commonjs/NotificationManager/index.js.map +1 -0
  15. package/lib/commonjs/index.js +27 -0
  16. package/lib/commonjs/index.js.map +1 -1
  17. package/lib/commonjs/types.d.js.map +1 -1
  18. package/lib/module/ApiOverrides/index.js +4 -2
  19. package/lib/module/ApiOverrides/index.js.map +1 -1
  20. package/lib/module/BettorBot/api/index.js +57 -0
  21. package/lib/module/BettorBot/api/index.js.map +1 -0
  22. package/lib/module/BettorBot/components/BroadcastMessageCard.js +226 -0
  23. package/lib/module/BettorBot/components/BroadcastMessageCard.js.map +1 -0
  24. package/lib/module/BettorBot/components/ServerInfoCard.js +119 -0
  25. package/lib/module/BettorBot/components/ServerInfoCard.js.map +1 -0
  26. package/lib/module/BettorBot/index.js +524 -0
  27. package/lib/module/BettorBot/index.js.map +1 -0
  28. package/lib/module/NotificationManager/api/index.js +441 -0
  29. package/lib/module/NotificationManager/api/index.js.map +1 -0
  30. package/lib/module/NotificationManager/index.js +1140 -0
  31. package/lib/module/NotificationManager/index.js.map +1 -0
  32. package/lib/module/index.js +4 -1
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/types.d.js.map +1 -1
  35. package/lib/typescript/lib/commonjs/ApiOverrides/index.d.ts.map +1 -1
  36. package/lib/typescript/lib/commonjs/BettorBot/api/index.d.ts +9 -0
  37. package/lib/typescript/lib/commonjs/BettorBot/api/index.d.ts.map +1 -0
  38. package/lib/typescript/lib/commonjs/BettorBot/components/BroadcastMessageCard.d.ts +10 -0
  39. package/lib/typescript/lib/commonjs/BettorBot/components/BroadcastMessageCard.d.ts.map +1 -0
  40. package/lib/typescript/lib/commonjs/BettorBot/components/ServerInfoCard.d.ts +10 -0
  41. package/lib/typescript/lib/commonjs/BettorBot/components/ServerInfoCard.d.ts.map +1 -0
  42. package/lib/typescript/lib/commonjs/BettorBot/index.d.ts +7 -0
  43. package/lib/typescript/lib/commonjs/BettorBot/index.d.ts.map +1 -0
  44. package/lib/typescript/lib/commonjs/NotificationManager/api/index.d.ts +804 -0
  45. package/lib/typescript/lib/commonjs/NotificationManager/api/index.d.ts.map +1 -0
  46. package/lib/typescript/lib/commonjs/NotificationManager/index.d.ts +815 -0
  47. package/lib/typescript/lib/commonjs/NotificationManager/index.d.ts.map +1 -0
  48. package/lib/typescript/lib/commonjs/index.d.ts +804 -0
  49. package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
  50. package/lib/typescript/lib/module/ApiOverrides/index.d.ts.map +1 -1
  51. package/lib/typescript/lib/module/BettorBot/api/index.d.ts +8 -0
  52. package/lib/typescript/lib/module/BettorBot/api/index.d.ts.map +1 -0
  53. package/lib/typescript/lib/module/BettorBot/components/BroadcastMessageCard.d.ts +10 -0
  54. package/lib/typescript/lib/module/BettorBot/components/BroadcastMessageCard.d.ts.map +1 -0
  55. package/lib/typescript/lib/module/BettorBot/components/ServerInfoCard.d.ts +10 -0
  56. package/lib/typescript/lib/module/BettorBot/components/ServerInfoCard.d.ts.map +1 -0
  57. package/lib/typescript/lib/module/BettorBot/index.d.ts +7 -0
  58. package/lib/typescript/lib/module/BettorBot/index.d.ts.map +1 -0
  59. package/lib/typescript/lib/module/NotificationManager/api/index.d.ts +803 -0
  60. package/lib/typescript/lib/module/NotificationManager/api/index.d.ts.map +1 -0
  61. package/lib/typescript/lib/module/NotificationManager/index.d.ts +16 -0
  62. package/lib/typescript/lib/module/NotificationManager/index.d.ts.map +1 -0
  63. package/lib/typescript/lib/module/index.d.ts +5 -1
  64. package/lib/typescript/lib/module/index.d.ts.map +1 -1
  65. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  66. package/lib/typescript/src/BettorBot/api/index.d.ts +9 -0
  67. package/lib/typescript/src/BettorBot/api/index.d.ts.map +1 -0
  68. package/lib/typescript/src/BettorBot/components/BroadcastMessageCard.d.ts +15 -0
  69. package/lib/typescript/src/BettorBot/components/BroadcastMessageCard.d.ts.map +1 -0
  70. package/lib/typescript/src/BettorBot/components/ServerInfoCard.d.ts +12 -0
  71. package/lib/typescript/src/BettorBot/components/ServerInfoCard.d.ts.map +1 -0
  72. package/lib/typescript/src/BettorBot/index.d.ts +9 -0
  73. package/lib/typescript/src/BettorBot/index.d.ts.map +1 -0
  74. package/lib/typescript/src/NotificationManager/api/index.d.ts +822 -0
  75. package/lib/typescript/src/NotificationManager/api/index.d.ts.map +1 -0
  76. package/lib/typescript/src/NotificationManager/index.d.ts +17 -0
  77. package/lib/typescript/src/NotificationManager/index.d.ts.map +1 -0
  78. package/lib/typescript/src/index.d.ts +4 -1
  79. package/lib/typescript/src/index.d.ts.map +1 -1
  80. package/package.json +1 -1
  81. package/src/ApiOverrides/index.ts +4 -2
  82. package/src/BettorBot/api/index.ts +49 -0
  83. package/src/BettorBot/components/BroadcastMessageCard.tsx +159 -0
  84. package/src/BettorBot/components/ServerInfoCard.tsx +73 -0
  85. package/src/BettorBot/index.tsx +295 -0
  86. package/src/NotificationManager/api/index.ts +134 -0
  87. package/src/NotificationManager/index.tsx +894 -0
  88. package/src/index.tsx +8 -1
  89. package/src/types.d.ts +118 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/NotificationManager/api/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIpI,MAAM,WAAW,uBAAuB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IACtE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAG0D,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DjG,CAAC;AAEF,eAAO,MAAM,eAAe;;IAMxB;;OAEG;wCACsC,MAAM,EAAE,KAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAWhF;;OAEG;kDACgD,uBAAuB,cAAc,MAAM,EAAE,KAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;uCAU1F,OAAO,CAAC,sBAAsB,EAAE,CAAC;gEAQN,MAAM,KAAE,OAAO,CAAC,4BAA4B,EAAE,CAAC;CAQlH,CAAA"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { NotificationApi, NotificationHelpers } from './api';
3
+ import type { PlayerNotificationProps, MyPlayerProps, FocusPositionProps } from '../types';
4
+ type NotificationManagerProps = {
5
+ player_ids: string[];
6
+ me: MyPlayerProps;
7
+ notification_type?: 'order_notifications' | 'competition_notifications' | 'social_notifications';
8
+ default_path_name?: string;
9
+ onFocusPosition?: (pos: FocusPositionProps) => void;
10
+ default_params?: Record<string, string>;
11
+ onComplete?: (notification: PlayerNotificationProps) => void;
12
+ onClose?: () => void;
13
+ };
14
+ declare const NotificationManager: ({ player_ids, me, notification_type, default_path_name, onFocusPosition, default_params, onComplete, onClose }: NotificationManagerProps) => React.JSX.Element;
15
+ export default NotificationManager;
16
+ export { NotificationApi, NotificationHelpers };
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/NotificationManager/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAA0B,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAKnH,KAAK,wBAAwB,GAAG;IAC5B,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,EAAE,EAAE,aAAa,CAAC;IAClB,iBAAiB,CAAC,EAAE,qBAAqB,GAAG,2BAA2B,GAAG,sBAAsB,CAAC;IACjG,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAC,CAAC,GAAG,EAAC,kBAAkB,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC7D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAUF,QAAA,MAAM,mBAAmB,GAAI,gHAS1B,wBAAwB,sBAo1B1B,CAAC;AAEF,eAAe,mBAAmB,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAC"}
@@ -67,5 +67,8 @@ 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
- export { Authenticator, Observer, MyAction, CreateEmbed, ReferralCodeManager, CreateEngagement, DiscordConnectionManager, BEEventApi, FlashCampaignManager, 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
+ import BettorBotDashboard from './BettorBot';
71
+ import NotificationManager from './NotificationManager';
72
+ import { NotificationApi, NotificationHelpers } from './NotificationManager/api';
73
+ 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, NotificationManager, NotificationApi, NotificationHelpers };
71
74
  //# 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;AAC7D,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,YAAY,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,iBAAiB,MAAM,eAAe,CAAC;AAC9C,OAAO,QAAQ,EAAE,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,WAAW,MAAM,WAAW,CAAC;AACpC,OAAO,aAAa,MAAM,UAAU,CAAC;AACrC,OAAO,aAAa,MAAM,WAAW,CAAC;AACtC,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,qBAAqB,MAAM,uDAAuD,CAAC;AAC1F,OAAO,oBAAoB,MAAM,sDAAsD,CAAC;AACxF,OAAO,YAAY,MAAM,UAAU,CAAC;AACpC,OAAO,aAA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ACX,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,oBAAoB,EACpB,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,UAAU,EACV,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACpB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "be-components",
3
- "version": "7.4.2",
3
+ "version": "7.4.4",
4
4
  "description": "Components for BettorEdge Apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -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',
@@ -202,8 +206,6 @@ const APIOverrides = {
202
206
  getCompanyEmbedByIdentifier: async(identifier:string):Promise<{ company_embed:CompanyEmbedProps, embed:EmbedProps, embed_properties:EmbedPropertyProps[] }|undefined> => {
203
207
  let AUTH_SVC_API = ENDPOINTS['AUTH_SVC_API']
204
208
  try {
205
- console.log(AUTH_SVC_API)
206
- console.log(identifier)
207
209
  const resp = await axios.get(`${AUTH_SVC_API}/v1/embeds/company/identifier/${identifier}`);
208
210
  return resp.data
209
211
  } catch (e) {
@@ -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
@@ -0,0 +1,73 @@
1
+ import React, { useState } from 'react';
2
+ import { Button, Text, View } from "../../Components/Themed";
3
+ import type { AccessibleChannel, ServerInfo } from '../../types';
4
+ import { FlatList, Image } from 'react-native';
5
+ import { Checkbox, SearchBox } from '../../Components';
6
+ import { useColors } from '../../constants/useColors';
7
+
8
+ type ServerInfoProps = {
9
+ server:ServerInfo
10
+ selected_channels: string[],
11
+ onClose:() => void,
12
+ onSelectChannel: (channel_id:string) => void,
13
+ onDeselectChannel: (channel_id:string) => void
14
+ }
15
+ const ServerInfoCard = ({ server, selected_channels, onDeselectChannel, onSelectChannel, onClose }:ServerInfoProps) => {
16
+ const Colors = useColors();
17
+ const [ channel_search, setChannelSearch ] = useState('');
18
+ const filtered_channels = server.accessibleChannels.filter(c => `${c.name}`.toLowerCase().includes(channel_search));
19
+
20
+ const renderChannels = (data: { item: AccessibleChannel, index:number }) => {
21
+ const selected = selected_channels.includes(data.item.id) ? true : false
22
+ return (
23
+ <View transparent type='row' style={{ padding:8, borderBottomWidth:1, borderColor:Colors.borders.light }}>
24
+ <Checkbox
25
+ style={{ marginRight:10 }}
26
+ checked={selected}
27
+ onSelect={() => selected ? onDeselectChannel(data.item.id) : onSelectChannel(data.item.id)}
28
+ />
29
+ <View transparent style={{ flex:1, marginLeft:10 }}>
30
+ <Text theme='h1'>{data.item.name}</Text>
31
+ </View>
32
+ </View>
33
+ )
34
+ }
35
+
36
+ return (
37
+ <View float style={{ flex:1 }}>
38
+ <View type='header' style={{ flexDirection:'row', alignItems:'center', padding:10, borderTopRightRadius:8, borderTopLeftRadius:8 }}>
39
+ <Image
40
+ source={{ uri: server.icon ?? '' }}
41
+ style={{ height:40, width:40 }}
42
+ />
43
+ <View transparent style={{ flex:1, marginLeft:10 }}>
44
+ <Text theme='h1'>{server.name}</Text>
45
+ <Text theme='description' style={{ marginTop:3 }}>{server.description}</Text>
46
+ </View>
47
+ </View>
48
+ <View style={{ flex:1, padding:10 }}>
49
+ <Text theme='h1' style={{ marginBottom:10 }}>Select Channels Below</Text>
50
+ <View transparent style={{ padding:5 }}>
51
+ <SearchBox onChange={(text) => setChannelSearch(text)} hide_search_button/>
52
+ </View>
53
+ <FlatList
54
+ key={'channel_list'}
55
+ data={filtered_channels.sort((a,b) => a.name.localeCompare(b.name))}
56
+ renderItem={renderChannels}
57
+ keyExtractor={(item) => item.id}
58
+ />
59
+ </View>
60
+ <View type='footer' style={{ flexDirection:'row', alignItems:'center', padding:10, borderBottomRightRadius:8, borderBottomLeftRadius:8 }}>
61
+ <Button
62
+ type='close'
63
+ title='CLOSE'
64
+ style={{ flex:1 }}
65
+ onPress={() => onClose()}
66
+ />
67
+ </View>
68
+ </View>
69
+ )
70
+
71
+ }
72
+
73
+ export default ServerInfoCard