tf-checkout-react-native 1.0.22 → 1.0.24

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 (134) hide show
  1. package/README.md +291 -30
  2. package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
  3. package/android/.gradle/7.4.2/checksums/md5-checksums.bin +0 -0
  4. package/android/.gradle/7.4.2/checksums/sha1-checksums.bin +0 -0
  5. package/android/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  6. package/android/.gradle/7.4.2/dependencies-accessors/gc.properties +0 -0
  7. package/android/.gradle/7.4.2/executionHistory/executionHistory.lock +0 -0
  8. package/android/.gradle/7.4.2/fileChanges/last-build.bin +0 -0
  9. package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
  10. package/android/.gradle/7.4.2/gc.properties +0 -0
  11. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  12. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  13. package/android/.gradle/vcs-1/gc.properties +0 -0
  14. package/assets/icons/ic_eye.png +0 -0
  15. package/assets/icons/ic_eye_off.png +0 -0
  16. package/ios/TFCheckoutRNModule.xcodeproj/project.xcworkspace/xcuserdata/jorgegutierrez.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  17. package/ios/TFCheckoutRNModule.xcodeproj/xcshareddata/xcschemes/TFCheckoutRNModule.xcscheme +67 -0
  18. package/lib/api/ApiClient.d.ts +4 -1
  19. package/lib/api/ApiClient.js +88 -3
  20. package/lib/api/ApiClient.js.map +1 -1
  21. package/lib/api/types.d.ts +15 -0
  22. package/lib/components/checkbox/Checkbox.d.ts +1 -1
  23. package/lib/components/checkbox/Checkbox.js +8 -6
  24. package/lib/components/checkbox/Checkbox.js.map +1 -1
  25. package/lib/components/checkbox/types.d.ts +2 -0
  26. package/lib/components/enterPassword/EnterPassword.d.ts +4 -0
  27. package/lib/components/enterPassword/EnterPassword.js +21 -0
  28. package/lib/components/enterPassword/EnterPassword.js.map +1 -0
  29. package/lib/components/enterPassword/styles.d.ts +20 -0
  30. package/lib/components/enterPassword/styles.js +22 -0
  31. package/lib/components/enterPassword/styles.js.map +1 -0
  32. package/lib/components/enterPassword/types.d.ts +23 -0
  33. package/lib/components/enterPassword/types.js +2 -0
  34. package/lib/components/enterPassword/types.js.map +1 -0
  35. package/lib/components/index.d.ts +1 -0
  36. package/lib/components/index.js +1 -0
  37. package/lib/components/index.js.map +1 -1
  38. package/lib/components/input/Input.js +14 -3
  39. package/lib/components/input/Input.js.map +1 -1
  40. package/lib/components/input/styles.d.ts +5 -0
  41. package/lib/components/input/styles.js +5 -0
  42. package/lib/components/input/styles.js.map +1 -1
  43. package/lib/components/input/types.d.ts +7 -1
  44. package/lib/components/login/Login.js +53 -6
  45. package/lib/components/login/Login.js.map +1 -1
  46. package/lib/components/login/LoginView.js +63 -91
  47. package/lib/components/login/LoginView.js.map +1 -1
  48. package/lib/components/login/components/LoginForm.d.ts +4 -0
  49. package/lib/components/login/components/LoginForm.js +28 -0
  50. package/lib/components/login/components/LoginForm.js.map +1 -0
  51. package/lib/components/login/components/types.d.ts +18 -0
  52. package/lib/components/login/components/types.js +3 -0
  53. package/lib/components/login/components/types.js.map +1 -0
  54. package/lib/components/login/styles.d.ts +5 -0
  55. package/lib/components/login/styles.js +5 -0
  56. package/lib/components/login/styles.js.map +1 -1
  57. package/lib/components/login/types.d.ts +29 -5
  58. package/lib/components/restorePassword/RestorePassword.d.ts +4 -0
  59. package/lib/components/restorePassword/RestorePassword.js +22 -0
  60. package/lib/components/restorePassword/RestorePassword.js.map +1 -0
  61. package/lib/components/restorePassword/ResultDialog.d.ts +4 -0
  62. package/lib/components/restorePassword/ResultDialog.js +11 -0
  63. package/lib/components/restorePassword/ResultDialog.js.map +1 -0
  64. package/lib/components/restorePassword/styles.d.ts +33 -0
  65. package/lib/components/restorePassword/styles.js +36 -0
  66. package/lib/components/restorePassword/styles.js.map +1 -0
  67. package/lib/components/restorePassword/types.d.ts +48 -0
  68. package/lib/components/restorePassword/types.js +3 -0
  69. package/lib/components/restorePassword/types.js.map +1 -0
  70. package/lib/containers/billingInfo/Billing.js +8 -3
  71. package/lib/containers/billingInfo/Billing.js.map +1 -1
  72. package/lib/containers/billingInfo/styles.d.ts +4 -0
  73. package/lib/containers/billingInfo/styles.js +4 -0
  74. package/lib/containers/billingInfo/styles.js.map +1 -1
  75. package/lib/containers/billingInfo/types.d.ts +1 -0
  76. package/lib/containers/checkout/Checkout.js +1 -1
  77. package/lib/containers/checkout/Checkout.js.map +1 -1
  78. package/lib/containers/index.d.ts +1 -0
  79. package/lib/containers/index.js +1 -0
  80. package/lib/containers/index.js.map +1 -1
  81. package/lib/containers/resetPassword/ResetPassword.d.ts +4 -0
  82. package/lib/containers/resetPassword/ResetPassword.js +63 -0
  83. package/lib/containers/resetPassword/ResetPassword.js.map +1 -0
  84. package/lib/containers/resetPassword/ResetPasswordView.d.ts +4 -0
  85. package/lib/containers/resetPassword/ResetPasswordView.js +24 -0
  86. package/lib/containers/resetPassword/ResetPasswordView.js.map +1 -0
  87. package/lib/containers/resetPassword/styles.d.ts +32 -0
  88. package/lib/containers/resetPassword/styles.js +34 -0
  89. package/lib/containers/resetPassword/styles.js.map +1 -0
  90. package/lib/containers/resetPassword/types.d.ts +47 -0
  91. package/lib/containers/resetPassword/types.js +2 -0
  92. package/lib/containers/resetPassword/types.js.map +1 -0
  93. package/lib/containers/tickets/Tickets.js +102 -18
  94. package/lib/containers/tickets/Tickets.js.map +1 -1
  95. package/lib/containers/tickets/TicketsView.d.ts +1 -1
  96. package/lib/containers/tickets/TicketsView.js +17 -6
  97. package/lib/containers/tickets/TicketsView.js.map +1 -1
  98. package/lib/containers/tickets/components/TicketGroupListHeader.d.ts +4 -0
  99. package/lib/containers/tickets/components/TicketGroupListHeader.js +5 -0
  100. package/lib/containers/tickets/components/TicketGroupListHeader.js.map +1 -0
  101. package/lib/containers/tickets/components/types.d.ts +8 -0
  102. package/lib/containers/tickets/components/types.js +1 -0
  103. package/lib/containers/tickets/components/types.js.map +1 -1
  104. package/lib/containers/tickets/types.d.ts +31 -3
  105. package/lib/core/LoginCore/LoginCore.js +16 -1
  106. package/lib/core/LoginCore/LoginCore.js.map +1 -1
  107. package/lib/core/LoginCore/LoginCoreTypes.d.ts +3 -1
  108. package/lib/core/ResetPasswordCore/ResetPasswordCore.d.ts +5 -0
  109. package/lib/core/ResetPasswordCore/ResetPasswordCore.js +12 -0
  110. package/lib/core/ResetPasswordCore/ResetPasswordCore.js.map +1 -0
  111. package/lib/core/ResetPasswordCore/ResetPasswordCoreTypes.d.ts +4 -0
  112. package/lib/core/ResetPasswordCore/ResetPasswordCoreTypes.js +2 -0
  113. package/lib/core/ResetPasswordCore/ResetPasswordCoreTypes.js.map +1 -0
  114. package/lib/core/TicketsCore/TicketsCore.js +83 -3
  115. package/lib/core/TicketsCore/TicketsCore.js.map +1 -1
  116. package/lib/core/TicketsCore/TicketsCoreTypes.d.ts +22 -3
  117. package/lib/core/index.d.ts +2 -0
  118. package/lib/core/index.js +1 -0
  119. package/lib/core/index.js.map +1 -1
  120. package/lib/helpers/Config.d.ts +9 -2
  121. package/lib/helpers/Config.js +9 -1
  122. package/lib/helpers/Config.js.map +1 -1
  123. package/lib/helpers/LocalStorage.d.ts +3 -0
  124. package/lib/helpers/LocalStorage.js +9 -0
  125. package/lib/helpers/LocalStorage.js.map +1 -1
  126. package/lib/index.d.ts +3 -3
  127. package/lib/index.js +3 -3
  128. package/lib/index.js.map +1 -1
  129. package/lib/res/icons.d.ts +2 -0
  130. package/lib/res/icons.js +2 -0
  131. package/lib/res/icons.js.map +1 -1
  132. package/lib/res/index.d.ts +2 -0
  133. package/lib/types/ITicket.d.ts +4 -1
  134. package/package.json +1 -1
package/README.md CHANGED
@@ -11,7 +11,7 @@ Configure [ReactNative environment](https://reactnative.dev/docs/environment-set
11
11
  - Suggested ReactNative version `0.66.3`
12
12
  - Suggested Flipper version `0.99.0`
13
13
  - React version `0.17.1`
14
-
14
+ - Node version `16.10.0`
15
15
  ### Android
16
16
 
17
17
  - Android 5.0 (API level 21) and above
@@ -99,16 +99,41 @@ Import the function from the library.
99
99
  import { setConfig } from 'tf-checkout-react-native'
100
100
  ```
101
101
 
102
- Use it in your initial useEffect function:
102
+ Use it in your initial useEffect function, please keep in mind this is an `async` function. It is highly recommended that you track when `setConfig` is finished, and pass that control prop to the Tickets component.
103
103
 
104
104
  ```ts
105
- useEffect(() => {
106
- setConfig({
107
- EVENT_ID: '4344',
108
- CLIENT: 'ttf',
109
- ENV: 'STAG'
110
- })
111
- }, [])
105
+
106
+ const YourComponent: FC () => {
107
+ const [isCheckingCurrentSession, setIsCheckingCurrentSession] = useState(true)
108
+
109
+ useEffect(() => {
110
+ const initConfig = async () => {
111
+ setIsCheckingCurrentSession(true)
112
+
113
+ await setConfig({
114
+ EVENT_ID: '4344',
115
+ CLIENT: 'ttf',
116
+ ENV: 'STAG',
117
+ CLIENT_ID: '3emd9023349dfn',
118
+ CLIENT_SECRET: 'CCEw33o4030e4df',
119
+ AUTH: {
120
+ ACCESS_TOKEN: 'token393939',
121
+ REFRESH_TOKEN: 'dee2030edmd',
122
+ TOKEN_TYPE: 'bearer',
123
+ SCOPE: 'scope',
124
+ }
125
+ })
126
+
127
+ setIsCheckingCurrentSession(false)
128
+ }
129
+
130
+ initConfig()
131
+ }, [])
132
+
133
+ return <Tickets
134
+ isCheckingCurrentSession
135
+ />
136
+ }
112
137
  ```
113
138
 
114
139
  `setConfig` set your event's configuration, with the following options:
@@ -123,6 +148,12 @@ useEffect(() => {
123
148
  TIMEOUT?: number,
124
149
  BRAND?: string,
125
150
  ARE_SUB_BRANDS_INCLUDED?: boolean
151
+ AUTH?: {
152
+ ACCESS_TOKEN: string
153
+ REFRESH_TOKEN: string
154
+ TOKEN_TYPE: string
155
+ SCOPE: string
156
+ }
126
157
  }
127
158
  ````
128
159
  ### Props
@@ -136,6 +167,7 @@ useEffect(() => {
136
167
  | BRAND | Set your BRAND so users can only see this brand in their orders. |
137
168
  | TIMEOUT | Set custom timeout for the APIs requests. |
138
169
  | ARE_SUB_BRANDS_INCLUDED | If true will include orders from the `BRAND` sub-brands. Default `false`. |
170
+ | AUTH | Object that receives data for Single Sign On (SSO).|
139
171
 
140
172
  # Run the example app
141
173
 
@@ -147,13 +179,13 @@ useEffect(() => {
147
179
  5. Run `yarn ios` or `npm run ios` to initialize and run in the iPhone simulator.
148
180
  6. If running on Android, run `yarn android` or `npm run android` to run it in the Android emulator or connected physical device.
149
181
 
150
- # Features [🚧 WIP 🚧]
182
+ # Features
151
183
 
152
184
  This library exports the following components:
153
185
 
154
186
  ### Login
155
187
 
156
- Used to authenticate the user.
188
+ Used to authenticate the user and request password restore.
157
189
 
158
190
  ### Tickets
159
191
 
@@ -187,6 +219,10 @@ Will show the details for the selected Order, it also allows the user to downloa
187
219
 
188
220
  Let the user to resale their tickets. They can choose between selling them to a friend or to any other user.
189
221
 
222
+ ### Reset Password
223
+
224
+ After opening and URL with the corresponding schema, use this component to let the user reset its password.
225
+
190
226
  # Component styling
191
227
  ### Button
192
228
  ```ts
@@ -249,6 +285,8 @@ Depending on your needs, you can use the UI Components or the Core Components.
249
285
 
250
286
  [Resale](#resale-tickets-ui)
251
287
 
288
+ [Reset Password](#reset-password-ui)
289
+
252
290
  ---
253
291
  ## Login UI
254
292
 
@@ -301,6 +339,12 @@ Then add it to the render function.
301
339
  }
302
340
  styles?: ILoginViewStyles
303
341
  texts?: ILoginViewTexts
342
+
343
+ isShowPasswordButtonVisible?: boolean
344
+
345
+ //Restore password
346
+ onRestorePasswordError?: (error: IError) => void
347
+ onRestorePasswordSuccess?: () => void
304
348
  />
305
349
  ```
306
350
 
@@ -320,6 +364,8 @@ Then add it to the render function.
320
364
  |texts?: ILoginViewTexts | Use this to change some texts that appear in this component. |
321
365
  |userFirstName?: string | Once authenticated send the received firstName data to this prop, so the component can render the Logged in view. |
322
366
  |brandImages?: ILoginBrandImages | Receives up to 2 images with their styles and the container style for the images. |
367
+ | onRestorePasswordError?: (error: string) | When restore password fails will return the error received. |
368
+ | onRestorePasswordSuccess? | Called when restore password request was successful |
323
369
 
324
370
  ### styles
325
371
 
@@ -347,6 +393,33 @@ interface ILoginViewStyles {
347
393
  button?: IButtonStyles
348
394
  message?: StyleProp<TextStyle>
349
395
  }
396
+ restorePassword?: {
397
+ rootContainer?: StyleProp<ViewStyle>
398
+ restorePasswordButton?: {
399
+ container?: StyleProp<ViewStyle>
400
+ button?: StyleProp<ViewStyle>
401
+ text?: StyleProp<TextStyle>
402
+ }
403
+ cancelRestorePasswordButton?: {
404
+ container?: StyleProp<ViewStyle>
405
+ button?: StyleProp<ViewStyle>
406
+ text?: StyleProp<TextStyle>
407
+ }
408
+ input?: IInputStyles
409
+ title?: StyleProp<TextStyle>
410
+ message?: StyleProp<TextStyle>
411
+ apiError?: StyleProp<TextStyle>
412
+ }
413
+ restorePasswordSuccess?: {
414
+ rootContainer?: StyleProp<ViewStyle>
415
+ title?: StyleProp<TextStyle>
416
+ message?: StyleProp<TextStyle>
417
+ button?: {
418
+ container?: StyleProp<ViewStyle>
419
+ button?: StyleProp<ViewStyle>
420
+ text?: StyleProp<TextStyle>
421
+ }
422
+ }
350
423
  }
351
424
  ```
352
425
 
@@ -375,12 +448,30 @@ interface ILoginViewStyles {
375
448
  loggedAs?: string
376
449
  notYou?: string
377
450
  }
378
-
451
+ restorePassword?: {
452
+ restorePasswordButton?: string
453
+ cancelButton?: string
454
+ message?: string
455
+ inputLabel?: string
456
+ title?: string
457
+ }
458
+ restorePasswordSuccess?: {
459
+ title?: string
460
+ message?: string
461
+ button?: string
462
+ }
463
+ }
379
464
  ```
380
465
  ---
381
466
  ## Tickets UI
382
467
 
383
- Import the component from the library
468
+ This component will first fetch for the Event's data, if data is ok, then will fetch the tickets for this event.
469
+
470
+ ### Password protected event
471
+
472
+ If the Event's response returns a `401` error, then it means it's password protected and need to authenticate with a password. Then the `EnterPassword` component will be shown for the user to enter the password.
473
+
474
+ Import the component from the library.
384
475
 
385
476
  ```js
386
477
  import { Tickets } from 'tf-checkout-react-native'
@@ -396,8 +487,6 @@ Then add it to the render function.
396
487
 
397
488
  ```js
398
489
  {
399
- eventId: number
400
-
401
490
  // Callbacks for when user taps on GET Tickets button
402
491
  onAddToCartSuccess: (data: {
403
492
  isBillingRequired: boolean
@@ -452,12 +541,27 @@ Then add it to the render function.
452
541
  onPressMyOrders: () => void
453
542
  onPressLogout?: () => void
454
543
 
455
- // With the following 3 props you can control the visibility of the stock loading indicators and alerts, so you can use your own.
456
- onLoadingChange?: (isLoading: boolean) => void
457
- areAlertsEnabled?: boolean
458
- areLoadingIndicatorsEnabled?: boolean
459
-
544
+ onLoadingChange?: (isLoading: boolean) => void
460
545
  promoCodeCloseIcon?: ImageSourcePropType
546
+
547
+ // Event password protected
548
+ onPressSubmitEventPassword?: (password: string) => void
549
+ passwordProtectedEventData?: {
550
+ isPasswordProtected?: boolean
551
+ message?: string
552
+ apiError?: string
553
+ isLoading?: boolean
554
+ }
555
+
556
+ config: {
557
+ areActivityIndicatorsEnabled?: boolean
558
+ areAlertsEnabled?: boolean
559
+ areTicketsSortedBySoldOut?: boolean
560
+ areTicketsGrouped?: boolean
561
+ }
562
+
563
+ // For SSO
564
+ isCheckingCurrentSession?: boolean
461
565
  }
462
566
  ```
463
567
 
@@ -487,8 +591,8 @@ You can then call the `BillingInfo` component and pass them as props in the `car
487
591
  getTicketsButtonDisabled?: IButtonStyles
488
592
  getTicketsButtonActive?: IButtonStyles
489
593
  promoCode?: {
490
- rootContainer?: StyleProp<ViewStyle>
491
- contentWrapper?: StyleProp<ViewStyle>
594
+ rootContainer?: ViewStyle
595
+ contentWrapper?: ViewStyle
492
596
  content?: StyleProp<ViewStyle>
493
597
  input?: TextInputProps['style']
494
598
  inputPlaceholderColor?: string
@@ -504,6 +608,10 @@ You can then call the `BillingInfo` component and pass them as props in the `car
504
608
  cancelIcon?: StyleProp<ImageStyle>
505
609
  }
506
610
  ticketList?: {
611
+ sectionHeader?: {
612
+ container?: StyleProp<ViewStyle>
613
+ title?: StyleProp<TextStyle>
614
+ }
507
615
  listContainer?: ViewStyle
508
616
  item?: {
509
617
  container?: ViewStyle
@@ -542,6 +650,14 @@ You can then call the `BillingInfo` component and pass them as props in the `car
542
650
  myOrdersButton?: IButtonStyles
543
651
  logOutButton?: IButtonStyles
544
652
  }
653
+ enterPassword?: {
654
+ input?: IInputStyles
655
+ title?: StyleProp<TextStyle>
656
+ error?: StyleProp<TextStyle>
657
+ button?: IButtonStyles
658
+ rootContainer?: StyleProp<ViewStyle>
659
+ contentContainer?: StyleProp<ViewStyle>
660
+ }
545
661
  }
546
662
  ```
547
663
 
@@ -586,6 +702,11 @@ You can then call the `BillingInfo` component and pass them as props in the `car
586
702
  free?: string
587
703
  ticket?: string
588
704
  }
705
+ enterPassword?: {
706
+ inputLabel?: string
707
+ title?: string
708
+ buttonText?: string
709
+ }
589
710
  }
590
711
  ```
591
712
  ---
@@ -718,9 +839,10 @@ interface IBillingInfoViewTexts {
718
839
  label?: string
719
840
  customError?: string
720
841
  }
721
- cartTimer?: {
722
- message?: string
723
- }
842
+ ttfPrivacyPolicyRequiredError?: string
843
+ }
844
+ cartTimer?: {
845
+ message?: string
724
846
  }
725
847
  }
726
848
  ```
@@ -753,7 +875,17 @@ interface IBillingInfoViewStyles {
753
875
  }
754
876
  input?: IInputStyles
755
877
  }
756
- checkboxStyles?: ICheckboxStyles
878
+
879
+ checkboxStyles?: {
880
+ container?: StyleProp<ViewStyle>
881
+ content?: StyleProp<ViewStyle>
882
+ indicator?: StyleProp<ViewStyle>
883
+ indicatorDisabled?: StyleProp<ViewStyle>
884
+ text?: StyleProp<TextStyle>
885
+ box?: StyleProp<ViewStyle>
886
+ icon?: StyleProp<ImageStyle>
887
+ error?: StyleProp<TextStyle>
888
+ }
757
889
 
758
890
  screenTitle?: StyleProp<TextStyle>
759
891
  ticketHoldersTitle?: StyleProp<TextStyle>
@@ -784,6 +916,8 @@ interface IBillingInfoViewStyles {
784
916
  message?: StyleProp<TextStyle>
785
917
  time?: StyleProp<TextStyle>
786
918
  }
919
+
920
+ privacyPolicyLinkStyle?: StyleProp<TextStyle>
787
921
  }
788
922
  ```
789
923
  ---
@@ -1369,7 +1503,64 @@ import { ResaleTickets } from 'tf-checkout-react-native'
1369
1503
  }
1370
1504
  ```
1371
1505
 
1506
+ ## Reset Password UI
1507
+
1508
+ After opening and URL with the corresponding schema and token, use this component to let the user reset its password.
1509
+
1510
+ ### Usage
1511
+ Import the component from the library.
1512
+ ```ts
1513
+ import { ResetPassword } from 'tf-checkout-react-native'
1514
+ ```
1515
+
1516
+ Then add it to the render function.
1517
+
1518
+ ```xml
1519
+ <ResetPassword
1520
+ styles={myStyles}
1521
+ token={resetToken}
1522
+ onPressResetButton={handleOnPressResetButton}
1523
+ onPressCancelButton={handleOnPressCancelButton}
1524
+ onResetPasswordSuccess={handleOnResetPasswordSuccess}
1525
+ onResetPasswordError={handleOnResetPasswordError}
1526
+ />
1527
+ ```
1528
+
1529
+ ### Props
1372
1530
 
1531
+ ```ts
1532
+ {
1533
+ token: string
1534
+ styles?: {
1535
+ rootContainer?: StyleProp<ViewStyle>
1536
+ contentContainer?: StyleProp<ViewStyle>
1537
+ title?: StyleProp<TextStyle>
1538
+ resetButton?: IButtonStyles
1539
+ cancelButton?: IButtonStyles
1540
+ input?: IInputStyles
1541
+ apiError?: StyleProp<TextStyle>
1542
+ apiSuccess?: StyleProp<TextStyle>
1543
+ }
1544
+ texts?: {
1545
+ title?: string
1546
+ resetButton?: string
1547
+ cancelButton?: string
1548
+ newPasswordLabel?: string
1549
+ confirmNewPasswordLabel?: string
1550
+ }
1551
+ onResetPasswordSuccess?: (data: {
1552
+ message: string
1553
+ status?: number
1554
+ }) => void
1555
+ onResetPasswordError?: (error: {
1556
+ code?: number
1557
+ message: string
1558
+ extraData?: any
1559
+ }) => void
1560
+ onPressResetButton?: () => void
1561
+ onPressCancelButton?: () => void
1562
+ }
1563
+ ```
1373
1564
 
1374
1565
 
1375
1566
  # Core Components
@@ -1393,6 +1584,8 @@ import { ResaleTickets } from 'tf-checkout-react-native'
1393
1584
  [OrderDetailsCore](#orderdetailscore)
1394
1585
 
1395
1586
  [LoginCore](#logincore)
1587
+
1588
+ [ResetPasswordCore](#resetpasswordcore)
1396
1589
 
1397
1590
  ---
1398
1591
 
@@ -1608,6 +1801,7 @@ const handleGetTickets = async () => {
1608
1801
  }
1609
1802
 
1610
1803
  ```
1804
+ ---
1611
1805
 
1612
1806
  ## WaitingListCore
1613
1807
  This component *must* appear after getting the response from **getTickets()** and the property `isInWaitingList` is set to true.
@@ -1692,6 +1886,7 @@ const handleAddToWaitingList = async (params: IAddToWaitingListCoreParams) => {
1692
1886
  const res = await waitingListCoreRef.current.addToWaitingList(params)
1693
1887
  }
1694
1888
  ```
1889
+ ---
1695
1890
 
1696
1891
  ## BillingCore
1697
1892
  This component collects user's billing information and checks the order out. If the entered user data is already in the system it will perform checkout, other wise it will perform a registration and then the checkout.
@@ -1810,6 +2005,7 @@ Exposes the following functions:
1810
2005
  }
1811
2006
 
1812
2007
  ```
2008
+ ---
1813
2009
 
1814
2010
  ## CheckoutCore
1815
2011
  Shows the event conditions, purchase details and process the payment and free registration to an event.
@@ -1936,7 +2132,7 @@ freeRegistration(orderHash: string): Promise<{
1936
2132
  // Payment success.
1937
2133
  paymentSuccess(orderHash: string): Promise<any>
1938
2134
  ```
1939
-
2135
+ ---
1940
2136
  ## PurchaseConfirmationCore
1941
2137
  Shows the purchase confirmation information.
1942
2138
 
@@ -1982,7 +2178,7 @@ getPurchaseConfirmation(
1982
2178
  }
1983
2179
  }>
1984
2180
  ```
1985
-
2181
+ ---
1986
2182
  ## MyOrdersCore
1987
2183
  Shows the purchased orders from the user. It can also show the sub-brands if the `ARE_SUB_BRANDS_INCLUDED` was set to true and the `BRAND` was set to an existing brand.
1988
2184
 
@@ -2062,7 +2258,7 @@ getOrderDetails(orderId: string): Promise<{
2062
2258
  }
2063
2259
  }>
2064
2260
  ```
2065
-
2261
+ ---
2066
2262
  ## OrderDetailsCore
2067
2263
  Allows to re-sale the tickets or to remove them from the re-sale system.
2068
2264
 
@@ -2130,7 +2326,7 @@ resaleTicket(
2130
2326
  }
2131
2327
  }>
2132
2328
  ```
2133
-
2329
+ ---
2134
2330
  ## LoginCore
2135
2331
  Handles the login and logout process.
2136
2332
 
@@ -2169,13 +2365,78 @@ login(fields?: {
2169
2365
 
2170
2366
  logout(): Promise<void>
2171
2367
  ```
2368
+ ---
2369
+ ## ResetPasswordCore
2370
+ Will allow the user to reset its password.
2371
+
2372
+ Exposes the following function:
2172
2373
 
2374
+ `postResetPassword` Sends the reset token and the new password values.
2375
+
2376
+ postResetPassword parameters:
2377
+ ```
2378
+ token: string,
2379
+ password: string,
2380
+ password_confirmation: string,
2381
+ ```
2382
+ postResetPassword returning data:
2383
+
2384
+ ```ts
2385
+ {
2386
+ data?: {
2387
+ message: string
2388
+ status?: number
2389
+ }
2390
+ error?: {
2391
+ code?: number
2392
+ message: string
2393
+ extraData?: any
2394
+ }
2395
+ }
2396
+ ```
2397
+
2398
+ ### Usage
2399
+ Import it from the library.
2400
+
2401
+ ```ts
2402
+ import { ResetPasswordCore, ResetPasswordCoreHandle } from 'tf-checkout-react-native'
2403
+ ```
2404
+ Wrap your component with the Core component.
2405
+
2406
+ ```xml
2407
+ <ResetPasswordCore ref={resetPasswordCoreRef}>
2408
+ {yourComponent}
2409
+ </ResetPasswordCore>
2410
+ ```
2173
2411
 
2174
2412
  # Utils
2175
2413
 
2176
2414
  `deleteAllData` asynchronously deletes all the data stored in the local storage. Use this with caution, only in an edge case.
2177
2415
 
2178
2416
  # Changelog
2417
+
2418
+ ## Version 1.0.24
2419
+ - Add **SingleSignOn** feature.
2420
+ - Add show Tickets in groups and the option to sort them by sold out.
2421
+ - Add config prop to Tickets component:
2422
+
2423
+ ```
2424
+ config: {
2425
+ areActivityIndicatorsEnabled?: boolean
2426
+ areAlertsEnabled?: boolean
2427
+ areTicketsSortedBySoldOut?: boolean
2428
+ areTicketsGrouped?: boolean
2429
+ }
2430
+ ```
2431
+ - Updated Tickets styles prop to include Ticket Section Header.
2432
+ - Moved `areActivityIndicatorsEnabled` and `areAlertsEnabled` to the `config` prop.
2433
+ - Made TTF Privacy Policy mandatory.
2434
+ - Added `styles` and `texts` props for TTF Privacy Policy checkbox.
2435
+ - Added **Password Protected** event feature.
2436
+
2437
+ ## Version 1.0.23
2438
+ - Fix Checkout not allowing free registrations
2439
+
2179
2440
  ## Version 1.0.22
2180
2441
  - Added cartTimer component, that will show the cart's remaining expiration time in the Billing screen.
2181
2442
  - setConfig not longer receives the `DOMAIN` prop, instead it receives the `CLIENT`
File without changes
@@ -0,0 +1,2 @@
1
+ #Mon Nov 07 12:56:44 CST 2022
2
+ gradle.version=7.4.2
File without changes
Binary file
Binary file
@@ -0,0 +1,67 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "1240"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "FA0EFF5F236CC8FB00069FA8"
18
+ BuildableName = "libTFCheckoutRNModule.a"
19
+ BlueprintName = "TFCheckoutRNModule"
20
+ ReferencedContainer = "container:TFCheckoutRNModule.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ buildConfiguration = "Debug"
27
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+ shouldUseLaunchSchemeArgsEnv = "YES">
30
+ <Testables>
31
+ </Testables>
32
+ </TestAction>
33
+ <LaunchAction
34
+ buildConfiguration = "Debug"
35
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
+ launchStyle = "0"
38
+ useCustomWorkingDirectory = "NO"
39
+ ignoresPersistentStateOnLaunch = "NO"
40
+ debugDocumentVersioning = "YES"
41
+ debugServiceExtension = "internal"
42
+ allowLocationSimulation = "YES">
43
+ </LaunchAction>
44
+ <ProfileAction
45
+ buildConfiguration = "Release"
46
+ shouldUseLaunchSchemeArgsEnv = "YES"
47
+ savedToolIdentifier = ""
48
+ useCustomWorkingDirectory = "NO"
49
+ debugDocumentVersioning = "YES">
50
+ <MacroExpansion>
51
+ <BuildableReference
52
+ BuildableIdentifier = "primary"
53
+ BlueprintIdentifier = "FA0EFF5F236CC8FB00069FA8"
54
+ BuildableName = "libTFCheckoutRNModule.a"
55
+ BlueprintName = "TFCheckoutRNModule"
56
+ ReferencedContainer = "container:TFCheckoutRNModule.xcodeproj">
57
+ </BuildableReference>
58
+ </MacroExpansion>
59
+ </ProfileAction>
60
+ <AnalyzeAction
61
+ buildConfiguration = "Debug">
62
+ </AnalyzeAction>
63
+ <ArchiveAction
64
+ buildConfiguration = "Release"
65
+ revealArchiveInOrganizer = "YES">
66
+ </ArchiveAction>
67
+ </Scheme>
@@ -1,7 +1,7 @@
1
1
  import { IWaitingListFields } from '../components/waitingList/types';
2
2
  import { IError } from '../types';
3
3
  import { IAddToCartResponse } from '../types/ITicket';
4
- import { IAddToCartParams, IAddToWaitingListResponse, IAuthorizeResponse, ICartResponse, ICheckoutBody, ICheckoutResponse, IClientRequest, ICloseSessionResponse, ICountriesResponse, IEventResponse, IFetchTicketsResponse, IFreeRegistrationResponse, IMyOrderDetailsResponse, IMyOrdersResponse, IOrderReviewResponse, IPostReferralResponse, IPurchaseConfirmationResponse, IRegisterNewUserResponse, IRemoveTicketFromResaleResponse, IResaleTicketResponse, IStatesResponse, IUserProfileResponse } from './types';
4
+ import { IAddToCartParams, IAddToWaitingListResponse, IAuthorizeResponse, ICartResponse, ICheckoutBody, ICheckoutResponse, IClientRequest, ICloseSessionResponse, ICountriesResponse, IEventResponse, IFetchTicketsResponse, IFreeRegistrationResponse, IMyOrderDetailsResponse, IMyOrdersResponse, IOrderReviewResponse, IPostReferralResponse, IPurchaseConfirmationResponse, IRegisterNewUserResponse, IRemoveTicketFromResaleResponse, IResaleTicketResponse, IResetPasswordRequestData, IResetPasswordResponse, IRestorePasswordResponse, IStatesResponse, IUserProfileResponse } from './types';
5
5
  export declare const Client: IClientRequest;
6
6
  export declare const setCustomHeader: (response: any) => void;
7
7
  export declare const setAccessTokenHandler: (accessToken: string) => Promise<void>;
@@ -19,6 +19,7 @@ export declare const fetchTickets: (promoCode?: string | undefined) => Promise<I
19
19
  export declare const addToCart: (data: IAddToCartParams) => Promise<IAddToCartResponse>;
20
20
  export declare const fetchEvent: () => Promise<IEventResponse>;
21
21
  export declare const postReferralVisit: (referralId: string) => Promise<IPostReferralResponse>;
22
+ export declare const unlockPasswordProtectedEvent: (password: string) => Promise<IEventResponse>;
22
23
  export declare const fetchCountries: () => Promise<ICountriesResponse>;
23
24
  export declare const fetchStates: (countryId: string) => Promise<IStatesResponse>;
24
25
  export declare const fetchCart: () => Promise<ICartResponse>;
@@ -37,3 +38,5 @@ export declare const fetchPurchaseConfirmation: (orderHash: string) => Promise<I
37
38
  export declare const resaleTicket: (data: FormData, orderHash: string) => Promise<IResaleTicketResponse>;
38
39
  export declare const removeTicketFromResale: (orderHash: string) => Promise<IRemoveTicketFromResaleResponse>;
39
40
  export declare const closeSession: () => Promise<ICloseSessionResponse>;
41
+ export declare const requestRestorePassword: (email: string) => Promise<IRestorePasswordResponse>;
42
+ export declare const requestResetPassword: (data: IResetPasswordRequestData) => Promise<IResetPasswordResponse>;