be-components 7.5.6 → 7.5.7

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 (142) hide show
  1. package/lib/commonjs/AdServer/api/index.js +4 -2
  2. package/lib/commonjs/AdServer/api/index.js.map +1 -1
  3. package/lib/commonjs/AdServer/index.js +26 -13
  4. package/lib/commonjs/AdServer/index.js.map +1 -1
  5. package/lib/commonjs/ApiOverrides/index.js +3 -2
  6. package/lib/commonjs/ApiOverrides/index.js.map +1 -1
  7. package/lib/commonjs/BetRouter/api/index.js +69 -0
  8. package/lib/commonjs/BetRouter/api/index.js.map +1 -1
  9. package/lib/commonjs/BetRouter/components/ContestLiquidity.js +72 -11
  10. package/lib/commonjs/BetRouter/components/ContestLiquidity.js.map +1 -1
  11. package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js +233 -2
  12. package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js.map +1 -1
  13. package/lib/commonjs/BetRouter/components/admin/RouterMarkets.js +1555 -0
  14. package/lib/commonjs/BetRouter/components/admin/RouterMarkets.js.map +1 -0
  15. package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js +16 -3
  16. package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js.map +1 -1
  17. package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js +31 -2
  18. package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js.map +1 -1
  19. package/lib/commonjs/BetRouter/types/api-contracts.js +77 -0
  20. package/lib/commonjs/BetRouter/types/api-contracts.js.map +1 -1
  21. package/lib/commonjs/BetRouter/types/credentials.js +4 -0
  22. package/lib/commonjs/BetRouter/types/credentials.js.map +1 -1
  23. package/lib/commonjs/Components/ViewportObserver.js +9 -0
  24. package/lib/commonjs/Components/ViewportObserver.js.map +1 -1
  25. package/lib/commonjs/ProfileManager/Components/DOBManager.js +38 -2
  26. package/lib/commonjs/ProfileManager/Components/DOBManager.js.map +1 -1
  27. package/lib/commonjs/ProfileManager/Components/EmailManager.js +40 -2
  28. package/lib/commonjs/ProfileManager/Components/EmailManager.js.map +1 -1
  29. package/lib/commonjs/ProfileManager/Components/PhoneManager.js +38 -1
  30. package/lib/commonjs/ProfileManager/Components/PhoneManager.js.map +1 -1
  31. package/lib/commonjs/ProfileManager/Components/VouchCard.js +13 -3
  32. package/lib/commonjs/ProfileManager/Components/VouchCard.js.map +1 -1
  33. package/lib/module/AdServer/api/index.js +4 -2
  34. package/lib/module/AdServer/api/index.js.map +1 -1
  35. package/lib/module/AdServer/index.js +25 -12
  36. package/lib/module/AdServer/index.js.map +1 -1
  37. package/lib/module/ApiOverrides/index.js +3 -2
  38. package/lib/module/ApiOverrides/index.js.map +1 -1
  39. package/lib/module/BetRouter/api/index.js +69 -0
  40. package/lib/module/BetRouter/api/index.js.map +1 -1
  41. package/lib/module/BetRouter/components/ContestLiquidity.js +72 -11
  42. package/lib/module/BetRouter/components/ContestLiquidity.js.map +1 -1
  43. package/lib/module/BetRouter/components/admin/LeagueInfo.js +233 -3
  44. package/lib/module/BetRouter/components/admin/LeagueInfo.js.map +1 -1
  45. package/lib/module/BetRouter/components/admin/RouterMarkets.js +1548 -0
  46. package/lib/module/BetRouter/components/admin/RouterMarkets.js.map +1 -0
  47. package/lib/module/BetRouter/layouts/DesktopAdminLayout.js +16 -3
  48. package/lib/module/BetRouter/layouts/DesktopAdminLayout.js.map +1 -1
  49. package/lib/module/BetRouter/layouts/MobileAdminLayout.js +31 -2
  50. package/lib/module/BetRouter/layouts/MobileAdminLayout.js.map +1 -1
  51. package/lib/module/BetRouter/types/api-contracts.js +77 -0
  52. package/lib/module/BetRouter/types/api-contracts.js.map +1 -1
  53. package/lib/module/BetRouter/types/credentials.js +4 -0
  54. package/lib/module/BetRouter/types/credentials.js.map +1 -1
  55. package/lib/module/Components/ViewportObserver.js +9 -0
  56. package/lib/module/Components/ViewportObserver.js.map +1 -1
  57. package/lib/module/ProfileManager/Components/DOBManager.js +38 -2
  58. package/lib/module/ProfileManager/Components/DOBManager.js.map +1 -1
  59. package/lib/module/ProfileManager/Components/EmailManager.js +40 -2
  60. package/lib/module/ProfileManager/Components/EmailManager.js.map +1 -1
  61. package/lib/module/ProfileManager/Components/PhoneManager.js +38 -1
  62. package/lib/module/ProfileManager/Components/PhoneManager.js.map +1 -1
  63. package/lib/module/ProfileManager/Components/VouchCard.js +13 -3
  64. package/lib/module/ProfileManager/Components/VouchCard.js.map +1 -1
  65. package/lib/typescript/lib/commonjs/AdServer/api/index.d.ts.map +1 -1
  66. package/lib/typescript/lib/commonjs/AdServer/index.d.ts +1 -0
  67. package/lib/typescript/lib/commonjs/AdServer/index.d.ts.map +1 -1
  68. package/lib/typescript/lib/commonjs/ApiOverrides/index.d.ts.map +1 -1
  69. package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts +6 -0
  70. package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts.map +1 -1
  71. package/lib/typescript/lib/commonjs/BetRouter/components/ContestLiquidity.d.ts.map +1 -1
  72. package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -1
  73. package/lib/typescript/lib/commonjs/BetRouter/components/admin/RouterMarkets.d.ts +4 -0
  74. package/lib/typescript/lib/commonjs/BetRouter/components/admin/RouterMarkets.d.ts.map +1 -0
  75. package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -1
  76. package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -1
  77. package/lib/typescript/lib/commonjs/BetRouter/types/api-contracts.d.ts +77 -0
  78. package/lib/typescript/lib/commonjs/BetRouter/types/credentials.d.ts.map +1 -1
  79. package/lib/typescript/lib/commonjs/Components/ViewportObserver.d.ts.map +1 -1
  80. package/lib/typescript/lib/commonjs/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  81. package/lib/typescript/lib/commonjs/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  82. package/lib/typescript/lib/commonjs/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  83. package/lib/typescript/lib/commonjs/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  84. package/lib/typescript/lib/module/AdServer/api/index.d.ts.map +1 -1
  85. package/lib/typescript/lib/module/AdServer/index.d.ts +9 -0
  86. package/lib/typescript/lib/module/AdServer/index.d.ts.map +1 -1
  87. package/lib/typescript/lib/module/ApiOverrides/index.d.ts.map +1 -1
  88. package/lib/typescript/lib/module/BetRouter/api/index.d.ts +6 -0
  89. package/lib/typescript/lib/module/BetRouter/api/index.d.ts.map +1 -1
  90. package/lib/typescript/lib/module/BetRouter/components/ContestLiquidity.d.ts.map +1 -1
  91. package/lib/typescript/lib/module/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -1
  92. package/lib/typescript/lib/module/BetRouter/components/admin/RouterMarkets.d.ts +4 -0
  93. package/lib/typescript/lib/module/BetRouter/components/admin/RouterMarkets.d.ts.map +1 -0
  94. package/lib/typescript/lib/module/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -1
  95. package/lib/typescript/lib/module/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -1
  96. package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts +77 -0
  97. package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts.map +1 -1
  98. package/lib/typescript/lib/module/BetRouter/types/credentials.d.ts.map +1 -1
  99. package/lib/typescript/lib/module/Components/ViewportObserver.d.ts.map +1 -1
  100. package/lib/typescript/lib/module/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  101. package/lib/typescript/lib/module/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  102. package/lib/typescript/lib/module/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  103. package/lib/typescript/lib/module/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  104. package/lib/typescript/src/AdServer/api/index.d.ts.map +1 -1
  105. package/lib/typescript/src/AdServer/index.d.ts +12 -3
  106. package/lib/typescript/src/AdServer/index.d.ts.map +1 -1
  107. package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
  108. package/lib/typescript/src/BetRouter/api/index.d.ts +23 -2
  109. package/lib/typescript/src/BetRouter/api/index.d.ts.map +1 -1
  110. package/lib/typescript/src/BetRouter/components/ContestLiquidity.d.ts.map +1 -1
  111. package/lib/typescript/src/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -1
  112. package/lib/typescript/src/BetRouter/components/admin/RouterMarkets.d.ts +4 -0
  113. package/lib/typescript/src/BetRouter/components/admin/RouterMarkets.d.ts.map +1 -0
  114. package/lib/typescript/src/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -1
  115. package/lib/typescript/src/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -1
  116. package/lib/typescript/src/BetRouter/types/api-contracts.d.ts +93 -4
  117. package/lib/typescript/src/BetRouter/types/api-contracts.d.ts.map +1 -1
  118. package/lib/typescript/src/BetRouter/types/credentials.d.ts +1 -5
  119. package/lib/typescript/src/BetRouter/types/credentials.d.ts.map +1 -1
  120. package/lib/typescript/src/Components/ViewportObserver.d.ts.map +1 -1
  121. package/lib/typescript/src/ProfileManager/Components/DOBManager.d.ts.map +1 -1
  122. package/lib/typescript/src/ProfileManager/Components/EmailManager.d.ts.map +1 -1
  123. package/lib/typescript/src/ProfileManager/Components/PhoneManager.d.ts.map +1 -1
  124. package/lib/typescript/src/ProfileManager/Components/VouchCard.d.ts.map +1 -1
  125. package/package.json +1 -1
  126. package/src/AdServer/api/index.ts +4 -2
  127. package/src/AdServer/index.tsx +64 -22
  128. package/src/ApiOverrides/index.ts +3 -2
  129. package/src/BetRouter/api/index.ts +101 -2
  130. package/src/BetRouter/components/ContestLiquidity.tsx +78 -11
  131. package/src/BetRouter/components/admin/LeagueInfo.tsx +231 -3
  132. package/src/BetRouter/components/admin/RouterMarkets.tsx +1238 -0
  133. package/src/BetRouter/layouts/DesktopAdminLayout.tsx +24 -1
  134. package/src/BetRouter/layouts/MobileAdminLayout.tsx +30 -2
  135. package/src/BetRouter/types/api-contracts.ts +100 -2
  136. package/src/BetRouter/types/credentials.ts +5 -6
  137. package/src/Components/ViewportObserver.tsx +13 -2
  138. package/src/ProfileManager/Components/DOBManager.tsx +14 -1
  139. package/src/ProfileManager/Components/EmailManager.tsx +16 -1
  140. package/src/ProfileManager/Components/PhoneManager.tsx +14 -0
  141. package/src/ProfileManager/Components/VouchCard.tsx +12 -4
  142. package/src/types.d.ts +3 -3
@@ -11,9 +11,10 @@ import LeagueParticipants from '../components/admin/LeagueParticipants';
11
11
  import AutoFillView from '../components/admin/AutoFillView';
12
12
  import ConfigManager from '../components/admin/ConfigManager';
13
13
  import JobManager from '../components/admin/JobManager';
14
+ import RouterMarkets from '../components/admin/RouterMarkets';
14
15
 
15
16
  type NavigationSection = 'info' | 'contests' | 'participants';
16
- type GlobalTool = 'jobs' | 'auto-link' | 'auto-fill' | 'config';
17
+ type GlobalTool = 'jobs' | 'auto-link' | 'auto-fill' | 'config' | 'router-markets';
17
18
 
18
19
  type DesktopAdminLayoutProps = {
19
20
  insets: { top: number; bottom: number; left: number; right: number };
@@ -279,6 +280,7 @@ const DesktopAdminLayout = ({ insets, onClose, initialContestId, initialLeagueId
279
280
  paddingLeft: 16,
280
281
  backgroundColor: selectedTool === 'config' ? Colors.views.header : 'transparent',
281
282
  borderRadius: 4,
283
+ marginBottom: 2,
282
284
  }}
283
285
  >
284
286
  <Text
@@ -288,6 +290,23 @@ const DesktopAdminLayout = ({ insets, onClose, initialContestId, initialLeagueId
288
290
  Config Manager
289
291
  </Text>
290
292
  </TouchableOpacity>
293
+
294
+ <TouchableOpacity
295
+ onPress={() => selectTool('router-markets')}
296
+ style={{
297
+ padding: 10,
298
+ paddingLeft: 16,
299
+ backgroundColor: selectedTool === 'router-markets' ? Colors.views.header : 'transparent',
300
+ borderRadius: 4,
301
+ }}
302
+ >
303
+ <Text
304
+ theme={selectedTool === 'router-markets' ? 'h2' : 'description'}
305
+ size={13}
306
+ >
307
+ Router Markets
308
+ </Text>
309
+ </TouchableOpacity>
291
310
  </View>
292
311
  </ScrollView>
293
312
  </View>
@@ -318,6 +337,10 @@ const DesktopAdminLayout = ({ insets, onClose, initialContestId, initialLeagueId
318
337
  <ConfigManager />
319
338
  )}
320
339
 
340
+ {selectedTool === 'router-markets' && (
341
+ <RouterMarkets />
342
+ )}
343
+
321
344
  {!selectedTool && selectedLeague && selectedSection === 'info' && (
322
345
  <LeagueInfo league={selectedLeague} />
323
346
  )}
@@ -11,9 +11,10 @@ import LeagueParticipants from '../components/admin/LeagueParticipants';
11
11
  import AutoFillView from '../components/admin/AutoFillView';
12
12
  import ConfigManager from '../components/admin/ConfigManager';
13
13
  import JobManager from '../components/admin/JobManager';
14
+ import RouterMarkets from '../components/admin/RouterMarkets';
14
15
 
15
16
  type NavigationSection = 'info' | 'contests' | 'participants';
16
- type GlobalTool = 'jobs' | 'auto-link' | 'auto-fill' | 'config';
17
+ type GlobalTool = 'jobs' | 'auto-link' | 'auto-fill' | 'config' | 'router-markets';
17
18
  type Screen = 'menu' | 'league' | 'tool';
18
19
 
19
20
  type MobileAdminLayoutProps = {
@@ -164,6 +165,7 @@ const MobileAdminLayout = ({ insets, onClose, initialContestId, initialLeagueId
164
165
  borderRadius: 8,
165
166
  borderWidth: 1,
166
167
  borderColor: Colors.borders.light,
168
+ marginBottom: 8,
167
169
  flexDirection: 'row',
168
170
  alignItems: 'center',
169
171
  justifyContent: 'space-between'
@@ -177,6 +179,28 @@ const MobileAdminLayout = ({ insets, onClose, initialContestId, initialLeagueId
177
179
  </View>
178
180
  <Icons.ChevronIcon size={20} color={Colors.text.descriptionLight} direction="right" />
179
181
  </TouchableOpacity>
182
+
183
+ <TouchableOpacity
184
+ onPress={() => handleSelectTool('router-markets')}
185
+ style={{
186
+ padding: 12,
187
+ backgroundColor: Colors.views.header,
188
+ borderRadius: 8,
189
+ borderWidth: 1,
190
+ borderColor: Colors.borders.light,
191
+ flexDirection: 'row',
192
+ alignItems: 'center',
193
+ justifyContent: 'space-between'
194
+ }}
195
+ >
196
+ <View transparent>
197
+ <Text theme='h2' size={16}>Router Markets</Text>
198
+ <Text theme='description' size={12} style={{ marginTop: 4 }}>
199
+ Manage router markets and sides
200
+ </Text>
201
+ </View>
202
+ <Icons.ChevronIcon size={20} color={Colors.text.descriptionLight} direction="right" />
203
+ </TouchableOpacity>
180
204
  </View>
181
205
 
182
206
  {/* Leagues Section */}
@@ -358,7 +382,10 @@ const MobileAdminLayout = ({ insets, onClose, initialContestId, initialLeagueId
358
382
  </TouchableOpacity>
359
383
  <View transparent style={{ flex: 1 }}>
360
384
  <Text theme='h1' size={20}>
361
- {selectedTool === 'jobs' ? 'Job Manager' : selectedTool === 'auto-fill' ? 'Auto-Fill Manager' : 'Config Manager'}
385
+ {selectedTool === 'jobs' ? 'Job Manager' :
386
+ selectedTool === 'auto-fill' ? 'Auto-Fill Manager' :
387
+ selectedTool === 'router-markets' ? 'Router Markets' :
388
+ 'Config Manager'}
362
389
  </Text>
363
390
  </View>
364
391
  {onClose && (
@@ -375,6 +402,7 @@ const MobileAdminLayout = ({ insets, onClose, initialContestId, initialLeagueId
375
402
  {selectedTool === 'jobs' && <JobManager />}
376
403
  {selectedTool === 'auto-fill' && <AutoFillView />}
377
404
  {selectedTool === 'config' && <ConfigManager />}
405
+ {selectedTool === 'router-markets' && <RouterMarkets />}
378
406
  </View>
379
407
  </ScrollView>
380
408
  </View>
@@ -844,6 +844,105 @@ export const ApiContracts = {
844
844
  }
845
845
  },
846
846
 
847
+ 'POST /markets/router': {
848
+ auth: false,
849
+ body: {
850
+ market_key: '' as string,
851
+ market_label: '' as string,
852
+ market_description: '' as string,
853
+ category: '' as 'game_result' | 'team_stat' | 'player_stat' | 'game_stat',
854
+ variable_required: false as boolean,
855
+ default_variable_type: '' as 'total' | 'spread',
856
+ allow_multiple_participants: false as boolean,
857
+ participant_type: '' as 'team' | 'player' | 'event',
858
+ status: '' as 'active' | 'inactive'
859
+ },
860
+ responses: {
861
+ 201: {} as SuccessResponse & {
862
+ router_market: RouterMarketProps
863
+ },
864
+ 400: {} as ErrorResponse
865
+ }
866
+ },
867
+
868
+ 'PATCH /markets/router/:router_market_id': {
869
+ auth: false,
870
+ params: {
871
+ router_market_id: '' as string
872
+ },
873
+ body: {} as Partial<Omit<RouterMarketProps, 'router_market_id' | 'create_datetime'>>,
874
+ responses: {
875
+ 200: {} as SuccessResponse & {
876
+ router_market: RouterMarketProps
877
+ },
878
+ 400: {} as ErrorResponse,
879
+ 404: {} as ErrorResponse & {
880
+ router_market_id: string
881
+ }
882
+ }
883
+ },
884
+
885
+ 'DELETE /markets/router/:router_market_id': {
886
+ auth: false,
887
+ params: {
888
+ router_market_id: '' as string
889
+ },
890
+ responses: {
891
+ 200: {} as SuccessResponse,
892
+ 400: {} as ErrorResponse,
893
+ 404: {} as ErrorResponse & {
894
+ router_market_id: string
895
+ }
896
+ }
897
+ },
898
+
899
+ 'POST /markets/sides': {
900
+ auth: false,
901
+ body: {
902
+ router_market_id: '' as string,
903
+ side_type: '' as string,
904
+ side_key: '' as string,
905
+ renderer: '' as string
906
+ },
907
+ responses: {
908
+ 201: {} as SuccessResponse & {
909
+ router_market_side: RouterMarketSideProps
910
+ },
911
+ 400: {} as ErrorResponse
912
+ }
913
+ },
914
+
915
+ 'PATCH /markets/sides/:market_side_id': {
916
+ auth: false,
917
+ params: {
918
+ market_side_id: '' as string
919
+ },
920
+ body: {} as Partial<Omit<RouterMarketSideProps, 'market_side_id' | 'create_datetime'>>,
921
+ responses: {
922
+ 200: {} as SuccessResponse & {
923
+ router_market_side: RouterMarketSideProps
924
+ },
925
+ 400: {} as ErrorResponse,
926
+ 404: {} as ErrorResponse & {
927
+ market_side_id: string
928
+ }
929
+ }
930
+ },
931
+
932
+ 'DELETE /markets/sides/:market_side_id': {
933
+ auth: false,
934
+ params: {
935
+ market_side_id: '' as string
936
+ },
937
+ responses: {
938
+ 200: {} as SuccessResponse,
939
+ 400: {} as ErrorResponse,
940
+ 404: {} as ErrorResponse & {
941
+ market_side_id: string
942
+ }
943
+ }
944
+ },
945
+
847
946
  // ========== Liquidity Routes ==========
848
947
  'GET /liquidity/contest/:router_contest_id': {
849
948
  auth: false,
@@ -1156,8 +1255,7 @@ export type ExtractRequestParams<T extends keyof ApiContract> =
1156
1255
  ApiContract[T] extends { params: infer P } ? P : never;
1157
1256
 
1158
1257
  export type ExtractSuccessResponse<T extends keyof ApiContract> =
1159
- ApiContract[T] extends { responses: { 200: infer R } } ? R :
1160
- ApiContract[T] extends { responses: { 201: infer R } } ? R : never;
1258
+ ApiContract[T] extends { responses: { 200: infer R } } ? R : never;
1161
1259
 
1162
1260
  export type ExtractErrorResponse<T extends keyof ApiContract> =
1163
1261
  ApiContract[T] extends { responses: { 400: infer R } } ? R :
@@ -1,6 +1,11 @@
1
1
  // Partner Credential Types
2
2
  // These define what inputs are needed for each partner
3
3
 
4
+ //import { BetOpenlyCredentialProps as BetOpenlyCredentialPropsImport } from "../partners/betopenly/cred.types"
5
+
6
+ // Re-export BetOpenly credentials
7
+ export type BetOpenlyCredentialProps = any
8
+
4
9
  export interface KalshiCredentialProps {
5
10
  api_key: string
6
11
  private_key_pem: string
@@ -14,12 +19,6 @@ export interface BettorEdgeCredentialProps {
14
19
  expire_datetime?: any // timestamp with timezone
15
20
  }
16
21
 
17
- export interface BetOpenlyCredentialProps {
18
- user_id: string
19
- username: string
20
- password: string
21
- }
22
-
23
22
  // Union type of all possible credentials
24
23
  export type PartnerCredentialProps = KalshiCredentialProps | BettorEdgeCredentialProps | BetOpenlyCredentialProps
25
24
 
@@ -3,7 +3,7 @@ import { Platform } from 'react-native';
3
3
 
4
4
  export const useIsInViewport = (ref:any) => {
5
5
  const [ isIntersecting, setIsIntersecting ] = useState(false);
6
-
6
+
7
7
  if(Platform.OS != 'web'){ return true }
8
8
 
9
9
  const observer = useMemo(
@@ -11,15 +11,26 @@ export const useIsInViewport = (ref:any) => {
11
11
  new IntersectionObserver(([entry]) => {
12
12
  if(!entry){ return }
13
13
  setIsIntersecting(entry.isIntersecting)
14
+ },
15
+ {
16
+ rootMargin: '100px' // Trigger 100px before element enters viewport
14
17
  }
15
18
  ),
16
19
  [],
17
20
  );
18
-
21
+
19
22
  useEffect(() => {
20
23
  if(!ref?.current){ return }
21
24
  //if(Platform.OS != 'web'){ return }
22
25
  observer.observe(ref.current);
26
+
27
+ // Check if already in viewport on mount
28
+ const rect = ref.current.getBoundingClientRect();
29
+ const isVisible = rect.top < window.innerHeight + 100 && rect.bottom > -100;
30
+ if(isVisible) {
31
+ setIsIntersecting(true);
32
+ }
33
+
23
34
  return () => {
24
35
  observer.disconnect();
25
36
  };
@@ -105,7 +105,7 @@ const DOBManager = ({ player, walkthrough, onFocusPosition, onPlayerUpdate, onNe
105
105
  onFocusPosition={onFocusPosition}
106
106
  keyboardType='default'
107
107
  placeholder='01/01/2005'
108
- editable={player.vouched_status == 'verified' ? false : true}
108
+ editable={player.vouched_status == 'unverified' ? true : false}
109
109
  style={{ flex:1 }}
110
110
  onChangeText={(text) => handleDOBChange(text)}
111
111
  />
@@ -128,6 +128,19 @@ const DOBManager = ({ player, walkthrough, onFocusPosition, onPlayerUpdate, onNe
128
128
  : age_error ?
129
129
  <Text size={14} color={C.text.warning}>{age_error}</Text>
130
130
  :<></>}
131
+ {player.vouched_status !== 'unverified' && (
132
+ <View style={{ marginTop: 15, padding: 15, backgroundColor:'rgba(255, 193, 7, 0.1)', borderRadius: 8, borderWidth: 1, borderColor: C.absolutes.utility.warning }}>
133
+ <View transparent style={{ flexDirection: 'row', alignItems: 'flex-start' }}>
134
+ <Icons.AlertIcon size={20} color={C.text.warning}/>
135
+ <View transparent style={{ flex: 1, marginLeft:10 }}>
136
+ <Text theme='h2' size={14} style={{ marginBottom: 8 }}>DOB Update Restricted</Text>
137
+ <Text theme='description' size={12} style={{ lineHeight: 18 }}>
138
+ Your account verification status prevents DOB updates. Please contact support for assistance with changing your date of birth.
139
+ </Text>
140
+ </View>
141
+ </View>
142
+ </View>
143
+ )}
131
144
  </View>
132
145
  )
133
146
  default:return <></>
@@ -39,7 +39,8 @@ const EmailManager = ({ player, walkthrough, onFocusPosition, onPlayerUpdate, on
39
39
 
40
40
  const is_changed = draft_player.email?.toLowerCase() != player.email?.toLowerCase() ? true : false
41
41
  const token_valid = verify_token.token != '' ? true : false
42
- const update_allowed = valid && is_changed ? true : false
42
+ const can_update_email = player.vouched_status === 'unverified'
43
+ const update_allowed = valid && is_changed && can_update_email ? true : false
43
44
 
44
45
  const handleUpdatePlayer = async() => {
45
46
  try {
@@ -112,6 +113,7 @@ const EmailManager = ({ player, walkthrough, onFocusPosition, onPlayerUpdate, on
112
113
  </View>
113
114
  <TextInput
114
115
  autoFocus
116
+ editable={player.vouched_status == 'unverified' ? true : false}
115
117
  value={draft_player.email}
116
118
  keyboardType='email-address'
117
119
  onFocusPosition={onFocusPosition}
@@ -143,6 +145,19 @@ const EmailManager = ({ player, walkthrough, onFocusPosition, onPlayerUpdate, on
143
145
  {update_error ?
144
146
  <Text style={{ marginTop:10 }} theme='warning'>{update_error}</Text>
145
147
  :<></>}
148
+ {player.vouched_status !== 'unverified' && (
149
+ <View style={{ marginTop: 15, padding: 15, backgroundColor:'rgba(255, 193, 7, 0.1)', borderRadius: 8, borderWidth: 1, borderColor: C.absolutes.utility.warning }}>
150
+ <View transparent style={{ flexDirection: 'row', alignItems: 'flex-start' }}>
151
+ <Icons.AlertIcon size={20} color={C.text.warning}/>
152
+ <View transparent style={{ flex: 1, marginLeft:10 }}>
153
+ <Text theme='h2' size={14} style={{ marginBottom: 8 }}>Email Update Restricted</Text>
154
+ <Text theme='description' size={12} style={{ lineHeight: 18 }}>
155
+ Your account verification status prevents email updates. Please contact support for assistance with changing your email address.
156
+ </Text>
157
+ </View>
158
+ </View>
159
+ </View>
160
+ )}
146
161
  </View>
147
162
  )
148
163
  default: return <></>
@@ -119,6 +119,7 @@ const PhoneManager = ({ player, walkthrough, onPlayerUpdate, onFocusPosition, on
119
119
  value={ProfileHelpers.formatPhone(draft_player.phone)}
120
120
  keyboardType='phone-pad'
121
121
  autoFocus
122
+ editable={player.vouched_status == 'unverified' ? true : false}
122
123
  onFocusPosition={onFocusPosition}
123
124
  style={{ flex:1 }}
124
125
  onChangeText={(text) => handlePhoneChange(text)}
@@ -145,6 +146,19 @@ const PhoneManager = ({ player, walkthrough, onPlayerUpdate, onFocusPosition, on
145
146
  {update_error ?
146
147
  <Text style={{ marginTop:10 }} theme='warning'>{update_error}</Text>
147
148
  :<></>}
149
+ {player.vouched_status !== 'unverified' && (
150
+ <View style={{ marginTop: 15, padding: 15, backgroundColor:'rgba(255, 193, 7, 0.1)', borderRadius: 8, borderWidth: 1, borderColor: C.absolutes.utility.warning }}>
151
+ <View transparent style={{ flexDirection: 'row', alignItems: 'flex-start' }}>
152
+ <Icons.AlertIcon size={20} color={C.text.warning}/>
153
+ <View transparent style={{ flex: 1, marginLeft:10 }}>
154
+ <Text theme='h2' size={14} style={{ marginBottom: 8 }}>Phone Update Restricted</Text>
155
+ <Text theme='description' size={12} style={{ lineHeight: 18 }}>
156
+ Your account verification status prevents phone updates. Please contact support for assistance with changing your phone number.
157
+ </Text>
158
+ </View>
159
+ </View>
160
+ </View>
161
+ )}
148
162
  </View>
149
163
  )
150
164
  default: return <></>
@@ -77,7 +77,7 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
77
77
  const startVouchingPlayer = async() => {
78
78
  setVouchLoading(true);
79
79
  const me = await ProfileApi.getMyDetails();
80
- if(me.player.vouched_status != 'unverified'){
80
+ if(!['unverified','reverify'].includes(me.player.vouched_status)){
81
81
  return onPlayerUpdate(me.player);
82
82
  }
83
83
  if(Platform.OS != 'web'){
@@ -135,7 +135,7 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
135
135
  </View>
136
136
  )
137
137
  case 'disclaimer':
138
- if(player.vouched_status != 'unverified'){ return <></> }
138
+ if(!['unverified','reverify'].includes(player.vouched_status)){ return <></> }
139
139
  return (
140
140
  <View style={{ padding:10 }}>
141
141
  <Button
@@ -271,7 +271,15 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
271
271
  type='success'
272
272
  onPress={() => startVouchingPlayer()}
273
273
  />
274
-
274
+ : player.vouched_status == 'reverify' ?
275
+ <Button
276
+ title={'REVERIFY NOW'}
277
+ loading={vouching || vouch_loading}
278
+ disabled={!scan_ready || vouch_loading || verify_errors.length > 0}
279
+ style={{ flex:3, opacity:scan_ready && scan_ready&&!vouching&&verify_errors.length == 0?1:0.5 }}
280
+ type='success'
281
+ onPress={() => startVouchingPlayer()}
282
+ />
275
283
  : player.vouched_status == 'failed' ?
276
284
  <View style={{ flex:3, margin:4, borderRadius: 8, padding:10, backgroundColor:Colors.shades.shade100 }}>
277
285
  <Text size={16} color={Colors.brand.midnight} textAlign='center' weight='semibold'>Account In Review</Text>
@@ -299,7 +307,7 @@ const VouchCard = ({ player, view_mode, walkthrough, insets, code_details, onVou
299
307
  <Text style={{marginTop:4}} theme='description'>Use the prompts below to verify. Please reach out to support if you have any issues.</Text>
300
308
  </View>
301
309
  </View>
302
- {player?.vouched_status == 'unverified' && vouching ?
310
+ {(player?.vouched_status == 'unverified'||player?.vouched_status == 'reverify') && vouching ?
303
311
  <View style={{ flex:1 }}>
304
312
  {Platform.OS == 'web' ?
305
313
  <View style={{ flex:1 }}>
package/src/types.d.ts CHANGED
@@ -128,7 +128,7 @@ export interface PublicPlayerProps {
128
128
  vouched_id?:string,
129
129
  phone_verified:boolean,
130
130
  bio?:string,
131
- vouched_status:'unverified' | 'failed' | 'verified',
131
+ vouched_status:'unverified' | 'failed' | 'verified'|'reverify',
132
132
  }
133
133
 
134
134
 
@@ -456,7 +456,7 @@ export interface CompanyPlayerProps {
456
456
  phone:number,
457
457
  verified:boolean,
458
458
  phone_verified:boolean,
459
- vouched_status:'verified'|'unverified'|'failed'
459
+ vouched_status:'verified'|'unverified'|'failed'|'reverify'
460
460
  code_used:string,
461
461
  revenue:number,
462
462
  create_datetime:any
@@ -784,7 +784,7 @@ export interface MyPlayerProps {
784
784
  verified:boolean, //Email verification
785
785
  phone:string,
786
786
  phone_verified:boolean,
787
- vouched_status: 'verified'|'unverified'|'failed',
787
+ vouched_status: 'verified'|'unverified'|'failed'|'reverify',
788
788
  bio?:string,
789
789
  terms_agreed_on?:any,
790
790
  create_datetime:any,