@onairos/react-native 3.1.15 → 3.1.17

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 (191) hide show
  1. package/README.md +404 -0
  2. package/lib/commonjs/assets/images/Checkbox.svg +3 -3
  3. package/lib/commonjs/assets/images/EnochE.svg +19 -19
  4. package/lib/commonjs/assets/images/Personalityprofile.svg +3 -3
  5. package/lib/commonjs/assets/images/Personalitytraits.svg +3 -3
  6. package/lib/commonjs/assets/images/Userpreferences.svg +3 -3
  7. package/lib/commonjs/assets/images/arrow.svg +20 -20
  8. package/lib/commonjs/assets/images/basicproficon.svg +43 -43
  9. package/lib/commonjs/assets/images/basicprofile.svg +3 -3
  10. package/lib/commonjs/assets/images/checkmark.svg +4 -4
  11. package/lib/commonjs/assets/images/contentanalysis.svg +3 -3
  12. package/lib/commonjs/assets/images/contenticon.svg +23 -23
  13. package/lib/commonjs/assets/images/personalityicon.svg +18 -18
  14. package/lib/commonjs/assets/images/x-close.svg +3 -3
  15. package/lib/commonjs/components/OnairosSignInButton.js +32 -74
  16. package/lib/commonjs/components/OnairosSignInButton.js.map +1 -1
  17. package/lib/commonjs/components/UniversalOnboarding.js +4 -4
  18. package/lib/commonjs/config/api.js +2 -2
  19. package/lib/commonjs/hooks/useConnections.js +6 -6
  20. package/lib/commonjs/hooks/useUserConnections.js +10 -10
  21. package/lib/commonjs/index.js +5 -12
  22. package/lib/commonjs/index.js.map +1 -1
  23. package/lib/commonjs/services/apiClient.js +35 -35
  24. package/lib/commonjs/services/apiKeyService.js +99 -99
  25. package/lib/commonjs/services/authService.js +82 -82
  26. package/lib/commonjs/services/biometricPinService.js +10 -10
  27. package/lib/commonjs/services/connectedAccountsService.js +32 -32
  28. package/lib/commonjs/services/googleAuthService.js +15 -15
  29. package/lib/commonjs/services/imageCompressionService.js +15 -15
  30. package/lib/commonjs/services/jwtStorageService.js +59 -59
  31. package/lib/commonjs/services/mobileTrainingService.js +14 -14
  32. package/lib/commonjs/services/pinEncryptionService.js +10 -10
  33. package/lib/commonjs/services/pinStorageUtils.js +15 -15
  34. package/lib/commonjs/services/platformAuthService.js +47 -47
  35. package/lib/commonjs/services/storageService.js +31 -31
  36. package/lib/commonjs/services/trainingApiHelpers.js +33 -33
  37. package/lib/commonjs/services/userConnectionsService.js +24 -24
  38. package/lib/commonjs/utils/Portal.js +4 -4
  39. package/lib/commonjs/utils/api.js +24 -24
  40. package/lib/commonjs/utils/auth.js +18 -18
  41. package/lib/commonjs/utils/crypto.js +13 -13
  42. package/lib/commonjs/utils/encryption.js +12 -12
  43. package/lib/commonjs/utils/eventUtils.js +52 -52
  44. package/lib/commonjs/utils/programmaticFlow.js +16 -16
  45. package/lib/commonjs/utils/retryHelper.js +27 -27
  46. package/lib/module/assets/images/Checkbox.svg +3 -3
  47. package/lib/module/assets/images/EnochE.svg +19 -19
  48. package/lib/module/assets/images/Personalityprofile.svg +3 -3
  49. package/lib/module/assets/images/Personalitytraits.svg +3 -3
  50. package/lib/module/assets/images/Userpreferences.svg +3 -3
  51. package/lib/module/assets/images/arrow.svg +20 -20
  52. package/lib/module/assets/images/basicproficon.svg +43 -43
  53. package/lib/module/assets/images/basicprofile.svg +3 -3
  54. package/lib/module/assets/images/checkmark.svg +4 -4
  55. package/lib/module/assets/images/contentanalysis.svg +3 -3
  56. package/lib/module/assets/images/contenticon.svg +23 -23
  57. package/lib/module/assets/images/personalityicon.svg +18 -18
  58. package/lib/module/assets/images/x-close.svg +3 -3
  59. package/lib/module/components/OnairosSignInButton.js +32 -74
  60. package/lib/module/components/OnairosSignInButton.js.map +1 -1
  61. package/lib/module/components/UniversalOnboarding.js +4 -4
  62. package/lib/module/config/api.js +2 -2
  63. package/lib/module/hooks/useConnections.js +6 -6
  64. package/lib/module/hooks/useUserConnections.js +10 -10
  65. package/lib/module/index.js +5 -6
  66. package/lib/module/index.js.map +1 -1
  67. package/lib/module/services/apiClient.js +35 -35
  68. package/lib/module/services/apiKeyService.js +99 -99
  69. package/lib/module/services/authService.js +82 -82
  70. package/lib/module/services/biometricPinService.js +10 -10
  71. package/lib/module/services/connectedAccountsService.js +32 -32
  72. package/lib/module/services/googleAuthService.js +15 -15
  73. package/lib/module/services/imageCompressionService.js +15 -15
  74. package/lib/module/services/jwtStorageService.js +59 -59
  75. package/lib/module/services/mobileTrainingService.js +14 -14
  76. package/lib/module/services/pinEncryptionService.js +10 -10
  77. package/lib/module/services/pinStorageUtils.js +15 -15
  78. package/lib/module/services/platformAuthService.js +47 -47
  79. package/lib/module/services/storageService.js +31 -31
  80. package/lib/module/services/trainingApiHelpers.js +33 -33
  81. package/lib/module/services/userConnectionsService.js +24 -24
  82. package/lib/module/utils/Portal.js +4 -4
  83. package/lib/module/utils/api.js +24 -24
  84. package/lib/module/utils/auth.js +18 -18
  85. package/lib/module/utils/crypto.js +13 -13
  86. package/lib/module/utils/encryption.js +12 -12
  87. package/lib/module/utils/eventUtils.js +52 -52
  88. package/lib/module/utils/programmaticFlow.js +16 -16
  89. package/lib/module/utils/retryHelper.js +27 -27
  90. package/lib/typescript/components/OnairosSignInButton.d.ts.map +1 -1
  91. package/lib/typescript/index.d.ts +0 -1
  92. package/lib/typescript/index.d.ts.map +1 -1
  93. package/package.json +163 -163
  94. package/src/api/index.ts +151 -151
  95. package/src/assets/images/Checkbox.svg +3 -3
  96. package/src/assets/images/EnochE.svg +19 -19
  97. package/src/assets/images/Personalityprofile.svg +3 -3
  98. package/src/assets/images/Personalitytraits.svg +3 -3
  99. package/src/assets/images/Userpreferences.svg +3 -3
  100. package/src/assets/images/arrow.svg +20 -20
  101. package/src/assets/images/basicproficon.svg +43 -43
  102. package/src/assets/images/basicprofile.svg +3 -3
  103. package/src/assets/images/checkmark.svg +4 -4
  104. package/src/assets/images/contentanalysis.svg +3 -3
  105. package/src/assets/images/contenticon.svg +23 -23
  106. package/src/assets/images/personalityicon.svg +18 -18
  107. package/src/assets/images/x-close.svg +3 -3
  108. package/src/components/BodyText.tsx +33 -33
  109. package/src/components/BrandMark.tsx +62 -62
  110. package/src/components/CodeInput.tsx +32 -32
  111. package/src/components/DataRequestScreen.tsx +355 -355
  112. package/src/components/EmailInput.tsx +31 -31
  113. package/src/components/EmailVerificationModal.tsx +363 -363
  114. package/src/components/ExistingUserDataConfirmation.tsx +506 -506
  115. package/src/components/GoogleButton.tsx +55 -55
  116. package/src/components/HeadingGroup.tsx +49 -49
  117. package/src/components/ModalHeader.tsx +125 -125
  118. package/src/components/ModalSheet.tsx +57 -57
  119. package/src/components/Onairos.tsx +422 -422
  120. package/src/components/OnairosButton.tsx +339 -339
  121. package/src/components/OnairosSignInButton.tsx +130 -166
  122. package/src/components/Overlay.tsx +506 -506
  123. package/src/components/PersonaImage.tsx +79 -79
  124. package/src/components/PersonaLoadingScreen.tsx +201 -201
  125. package/src/components/PersonalizationConsentScreen.tsx +410 -410
  126. package/src/components/PinCreationScreen.tsx +492 -492
  127. package/src/components/PinInput.tsx +555 -555
  128. package/src/components/PlatformConnectorsStep.tsx +891 -891
  129. package/src/components/PlatformList.tsx +144 -144
  130. package/src/components/PlatformToggle.tsx +226 -226
  131. package/src/components/PrimaryButton.tsx +213 -213
  132. package/src/components/SignInMatchAnimation.tsx +225 -225
  133. package/src/components/SignInStep.tsx +217 -217
  134. package/src/components/TrainingModal.tsx +1047 -1047
  135. package/src/components/UniversalOnboarding.tsx +2887 -2887
  136. package/src/components/VerificationStep.tsx +198 -198
  137. package/src/components/WelcomeScreen.tsx +473 -473
  138. package/src/components/icons/Basicproficon.tsx +30 -30
  139. package/src/components/icons/Basicprofile.tsx +17 -17
  140. package/src/components/icons/Checkbox.tsx +17 -17
  141. package/src/components/icons/Checkmark.tsx +24 -24
  142. package/src/components/icons/Contentanalysis.tsx +17 -17
  143. package/src/components/icons/Contenticon.tsx +30 -30
  144. package/src/components/icons/EnochE.tsx +39 -39
  145. package/src/components/icons/Personalityicon.tsx +22 -22
  146. package/src/components/icons/Personalityprofile.tsx +17 -17
  147. package/src/components/icons/Personalitytraits.tsx +17 -17
  148. package/src/components/icons/Userpreferences.tsx +17 -17
  149. package/src/components/icons/index.ts +12 -12
  150. package/src/components/onboarding/OAuthWebView.tsx +232 -232
  151. package/src/config/api.ts +25 -25
  152. package/src/context/AuthContext.tsx +393 -393
  153. package/src/hooks/useConnectedAccounts.ts +138 -138
  154. package/src/hooks/useConnections.ts +161 -161
  155. package/src/hooks/useCredentials.ts +174 -174
  156. package/src/hooks/useUserConnections.ts +165 -165
  157. package/src/index.js +14 -14
  158. package/src/index.ts +94 -95
  159. package/src/services/apiClient.ts +336 -336
  160. package/src/services/apiKeyService.ts +919 -919
  161. package/src/services/authService.ts +1008 -1008
  162. package/src/services/biometricPinService.ts +192 -192
  163. package/src/services/connectedAccountsService.ts +289 -289
  164. package/src/services/googleAuthService.ts +279 -279
  165. package/src/services/imageCompressionService.ts +302 -302
  166. package/src/services/jwtStorageService.ts +256 -256
  167. package/src/services/mobileTrainingService.ts +203 -203
  168. package/src/services/pinEncryptionService.ts +75 -75
  169. package/src/services/pinStorageUtils.ts +96 -96
  170. package/src/services/platformAuthService.ts +1346 -1346
  171. package/src/services/storageService.ts +451 -451
  172. package/src/services/trainingApiHelpers.ts +66 -66
  173. package/src/services/userConnectionsService.ts +556 -556
  174. package/src/services/youtubeMigrationService.ts +453 -453
  175. package/src/theme/index.ts +239 -239
  176. package/src/types/ambient.d.ts +28 -28
  177. package/src/types/index.ts +265 -265
  178. package/src/types/node-fix.d.ts +18 -18
  179. package/src/types/node-override.d.ts +23 -23
  180. package/src/types/opacity.d.ts +15 -15
  181. package/src/types/types.d.ts +17 -17
  182. package/src/utils/Portal.tsx +82 -82
  183. package/src/utils/api.js +111 -111
  184. package/src/utils/auth.js +103 -103
  185. package/src/utils/crypto.js +59 -59
  186. package/src/utils/encryption.ts +68 -68
  187. package/src/utils/eventUtils.ts +302 -302
  188. package/src/utils/haptics.ts +58 -58
  189. package/src/utils/imagePreloader.ts +2 -2
  190. package/src/utils/programmaticFlow.ts +112 -112
  191. package/src/utils/retryHelper.ts +274 -274
@@ -2,9 +2,9 @@ import axios from 'axios';
2
2
  import AsyncStorage from '@react-native-async-storage/async-storage';
3
3
  const API_URL = 'https://api2.onairos.uk';
4
4
 
5
- /**
6
- * Create an API instance with authorization headers
7
- * @returns {Promise<Object>} - The axios instance
5
+ /**
6
+ * Create an API instance with authorization headers
7
+ * @returns {Promise<Object>} - The axios instance
8
8
  */
9
9
  export const createApiInstance = async () => {
10
10
  const token = await AsyncStorage.getItem('onairosToken');
@@ -19,9 +19,9 @@ export const createApiInstance = async () => {
19
19
  });
20
20
  };
21
21
 
22
- /**
23
- * Validate the domain with the Onairos API
24
- * @returns {Promise<Object>} - The validation response
22
+ /**
23
+ * Validate the domain with the Onairos API
24
+ * @returns {Promise<Object>} - The validation response
25
25
  */
26
26
  export const validateDomain = async () => {
27
27
  try {
@@ -36,11 +36,11 @@ export const validateDomain = async () => {
36
36
  }
37
37
  };
38
38
 
39
- /**
40
- * Fetch account information
41
- * @param {string} identifier - The username or email
42
- * @param {boolean} isEmail - Whether the identifier is an email
43
- * @returns {Promise<Object>} - The account information
39
+ /**
40
+ * Fetch account information
41
+ * @param {string} identifier - The username or email
42
+ * @param {boolean} isEmail - Whether the identifier is an email
43
+ * @returns {Promise<Object>} - The account information
44
44
  */
45
45
  export const fetchAccountInfo = async (identifier, isEmail = false) => {
46
46
  try {
@@ -63,12 +63,12 @@ export const fetchAccountInfo = async (identifier, isEmail = false) => {
63
63
  }
64
64
  };
65
65
 
66
- /**
67
- * Get API URL for data requests
68
- * @param {Array} approvedRequests - The approved data requests
69
- * @param {string} pin - The encrypted PIN
70
- * @param {string} othentSub - The hashed Othent sub
71
- * @returns {Promise<Object>} - The API URL response
66
+ /**
67
+ * Get API URL for data requests
68
+ * @param {Array} approvedRequests - The approved data requests
69
+ * @param {string} pin - The encrypted PIN
70
+ * @param {string} othentSub - The hashed Othent sub
71
+ * @returns {Promise<Object>} - The API URL response
72
72
  */
73
73
  export const getApiUrl = async (approvedRequests, pin, othentSub) => {
74
74
  try {
@@ -91,13 +91,13 @@ export const getApiUrl = async (approvedRequests, pin, othentSub) => {
91
91
  }
92
92
  };
93
93
 
94
- /**
95
- * Create a new user account
96
- * @param {string} othentSub - The hashed Othent sub
97
- * @param {string} pin - The PIN
98
- * @param {Array} socialAccounts - The selected social accounts
99
- * @param {string} email - The user's email
100
- * @returns {Promise<Object>} - The account creation response
94
+ /**
95
+ * Create a new user account
96
+ * @param {string} othentSub - The hashed Othent sub
97
+ * @param {string} pin - The PIN
98
+ * @param {Array} socialAccounts - The selected social accounts
99
+ * @param {string} email - The user's email
100
+ * @returns {Promise<Object>} - The account creation response
101
101
  */
102
102
  export const createAccount = async (othentSub, pin, socialAccounts, email) => {
103
103
  try {
@@ -2,10 +2,10 @@ import axios from 'axios';
2
2
  import AsyncStorage from '@react-native-async-storage/async-storage';
3
3
  const API_URL = 'https://api2.onairos.uk';
4
4
 
5
- /**
6
- * Get the encrypted PIN for a user
7
- * @param {string} hashedOthentSub - The hashed Othent sub
8
- * @returns {Promise<Object>} - The response containing the encrypted PIN
5
+ /**
6
+ * Get the encrypted PIN for a user
7
+ * @param {string} hashedOthentSub - The hashed Othent sub
8
+ * @returns {Promise<Object>} - The response containing the encrypted PIN
9
9
  */
10
10
  export const getPin = async hashedOthentSub => {
11
11
  try {
@@ -19,10 +19,10 @@ export const getPin = async hashedOthentSub => {
19
19
  }
20
20
  };
21
21
 
22
- /**
23
- * Verify a token with the Onairos API
24
- * @param {string} token - The token to verify
25
- * @returns {Promise<boolean>} - Whether the token is valid
22
+ /**
23
+ * Verify a token with the Onairos API
24
+ * @param {string} token - The token to verify
25
+ * @returns {Promise<boolean>} - Whether the token is valid
26
26
  */
27
27
  export const verifyToken = async token => {
28
28
  try {
@@ -38,11 +38,11 @@ export const verifyToken = async token => {
38
38
  }
39
39
  };
40
40
 
41
- /**
42
- * Store authentication data
43
- * @param {string} token - The authentication token
44
- * @param {string} username - The username
45
- * @param {Object} othentData - The Othent user data
41
+ /**
42
+ * Store authentication data
43
+ * @param {string} token - The authentication token
44
+ * @param {string} username - The username
45
+ * @param {Object} othentData - The Othent user data
46
46
  */
47
47
  export const storeAuthData = async (token, username = null, othentData = null) => {
48
48
  try {
@@ -59,8 +59,8 @@ export const storeAuthData = async (token, username = null, othentData = null) =
59
59
  }
60
60
  };
61
61
 
62
- /**
63
- * Clear authentication data
62
+ /**
63
+ * Clear authentication data
64
64
  */
65
65
  export const clearAuthData = async () => {
66
66
  try {
@@ -73,9 +73,9 @@ export const clearAuthData = async () => {
73
73
  }
74
74
  };
75
75
 
76
- /**
77
- * Get stored authentication data
78
- * @returns {Promise<Object>} - The stored authentication data
76
+ /**
77
+ * Get stored authentication data
78
+ * @returns {Promise<Object>} - The stored authentication data
79
79
  */
80
80
  export const getStoredAuthData = async () => {
81
81
  try {
@@ -1,11 +1,11 @@
1
1
  import { RSA } from 'react-native-rsa-native';
2
2
  import { sha256 as cryptoSha256 } from 'react-native-crypto-js';
3
3
 
4
- /**
5
- * Encrypt data using RSA
6
- * @param {string} publicKey - The RSA public key
7
- * @param {string} data - The data to encrypt
8
- * @returns {Promise<string>} - The encrypted data
4
+ /**
5
+ * Encrypt data using RSA
6
+ * @param {string} publicKey - The RSA public key
7
+ * @param {string} data - The data to encrypt
8
+ * @returns {Promise<string>} - The encrypted data
9
9
  */
10
10
  export const rsaEncrypt = async (publicKey, data) => {
11
11
  try {
@@ -24,19 +24,19 @@ export const rsaEncrypt = async (publicKey, data) => {
24
24
  }
25
25
  };
26
26
 
27
- /**
28
- * Hash data using SHA-256
29
- * @param {string} data - The data to hash
30
- * @returns {string} - The hashed data
27
+ /**
28
+ * Hash data using SHA-256
29
+ * @param {string} data - The data to hash
30
+ * @returns {string} - The hashed data
31
31
  */
32
32
  export const sha256 = data => {
33
33
  return cryptoSha256(data).toString();
34
34
  };
35
35
 
36
- /**
37
- * Convert a base64 string to a buffer
38
- * @param {string} base64String - The base64 string to convert
39
- * @returns {ArrayBuffer} - The converted buffer
36
+ /**
37
+ * Convert a base64 string to a buffer
38
+ * @param {string} base64String - The base64 string to convert
39
+ * @returns {ArrayBuffer} - The converted buffer
40
40
  */
41
41
  export const base64ToBuffer = base64String => {
42
42
  try {
@@ -1,9 +1,9 @@
1
1
  import { onairosApi } from '../api';
2
- /**
3
- * Encrypt a model key using RSA with a public key
4
- * @param publicKey The public key to encrypt with
5
- * @param modelKey The model key to encrypt
6
- * @returns The encrypted model key
2
+ /**
3
+ * Encrypt a model key using RSA with a public key
4
+ * @param publicKey The public key to encrypt with
5
+ * @param modelKey The model key to encrypt
6
+ * @returns The encrypted model key
7
7
  */
8
8
  export const encryptModelKey = (publicKey, modelKey) => {
9
9
  try {
@@ -24,9 +24,9 @@ export const encryptModelKey = (publicKey, modelKey) => {
24
24
  }
25
25
  };
26
26
 
27
- /**
28
- * Get the server's public key
29
- * @returns The server's public key
27
+ /**
28
+ * Get the server's public key
29
+ * @returns The server's public key
30
30
  */
31
31
  export const getServerPublicKey = async () => {
32
32
  try {
@@ -49,10 +49,10 @@ export const getServerPublicKey = async () => {
49
49
  }
50
50
  };
51
51
 
52
- /**
53
- * Hash a string using SHA-256
54
- * @param input The string to hash
55
- * @returns The hashed string
52
+ /**
53
+ * Hash a string using SHA-256
54
+ * @param input The string to hash
55
+ * @returns The hashed string
56
56
  */
57
57
  export const hashString = async input => {
58
58
  try {
@@ -1,11 +1,11 @@
1
- /**
2
- * Event utility functions for event management
1
+ /**
2
+ * Event utility functions for event management
3
3
  */
4
4
 
5
- /**
6
- * Generate a random alphanumeric event code
7
- * @param length - Length of the code (default: 6)
8
- * @returns Random event code
5
+ /**
6
+ * Generate a random alphanumeric event code
7
+ * @param length - Length of the code (default: 6)
8
+ * @returns Random event code
9
9
  */
10
10
  export const generateEventCode = (length = 6) => {
11
11
  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
@@ -16,10 +16,10 @@ export const generateEventCode = (length = 6) => {
16
16
  return result;
17
17
  };
18
18
 
19
- /**
20
- * Generate a smart event code based on the event title
21
- * @param title - Event title
22
- * @returns Smart event code
19
+ /**
20
+ * Generate a smart event code based on the event title
21
+ * @param title - Event title
22
+ * @returns Smart event code
23
23
  */
24
24
  export const generateSmartEventCode = title => {
25
25
  if (!title.trim()) {
@@ -56,10 +56,10 @@ export const generateSmartEventCode = title => {
56
56
  return code;
57
57
  };
58
58
 
59
- /**
60
- * Validate event code format
61
- * @param code - Event code to validate
62
- * @returns Object with validation result and error message
59
+ /**
60
+ * Validate event code format
61
+ * @param code - Event code to validate
62
+ * @returns Object with validation result and error message
63
63
  */
64
64
  export const validateEventCode = code => {
65
65
  if (!code || !code.trim()) {
@@ -92,10 +92,10 @@ export const validateEventCode = code => {
92
92
  };
93
93
  };
94
94
 
95
- /**
96
- * Format event date for display
97
- * @param dateString - Date string in YYYY-MM-DD format
98
- * @returns Formatted date string
95
+ /**
96
+ * Format event date for display
97
+ * @param dateString - Date string in YYYY-MM-DD format
98
+ * @returns Formatted date string
99
99
  */
100
100
  export const formatEventDate = dateString => {
101
101
  try {
@@ -111,10 +111,10 @@ export const formatEventDate = dateString => {
111
111
  }
112
112
  };
113
113
 
114
- /**
115
- * Check if an event is happening today
116
- * @param eventDate - Event date string
117
- * @returns True if event is today
114
+ /**
115
+ * Check if an event is happening today
116
+ * @param eventDate - Event date string
117
+ * @returns True if event is today
118
118
  */
119
119
  export const isEventToday = eventDate => {
120
120
  try {
@@ -126,10 +126,10 @@ export const isEventToday = eventDate => {
126
126
  }
127
127
  };
128
128
 
129
- /**
130
- * Check if an event is in the past
131
- * @param eventDate - Event date string
132
- * @returns True if event is in the past
129
+ /**
130
+ * Check if an event is in the past
131
+ * @param eventDate - Event date string
132
+ * @returns True if event is in the past
133
133
  */
134
134
  export const isEventPast = eventDate => {
135
135
  try {
@@ -145,11 +145,11 @@ export const isEventPast = eventDate => {
145
145
  }
146
146
  };
147
147
 
148
- /**
149
- * Get event status based on date and active status
150
- * @param eventDate - Event date string
151
- * @param isActive - Whether event is active
152
- * @returns Event status string
148
+ /**
149
+ * Get event status based on date and active status
150
+ * @param eventDate - Event date string
151
+ * @param isActive - Whether event is active
152
+ * @returns Event status string
153
153
  */
154
154
  export const getEventStatus = (eventDate, isActive) => {
155
155
  if (!isActive) {
@@ -164,10 +164,10 @@ export const getEventStatus = (eventDate, isActive) => {
164
164
  return 'Upcoming';
165
165
  };
166
166
 
167
- /**
168
- * Calculate days until event
169
- * @param eventDate - Event date string
170
- * @returns Number of days until event (negative if past)
167
+ /**
168
+ * Calculate days until event
169
+ * @param eventDate - Event date string
170
+ * @returns Number of days until event (negative if past)
171
171
  */
172
172
  export const getDaysUntilEvent = eventDate => {
173
173
  try {
@@ -185,10 +185,10 @@ export const getDaysUntilEvent = eventDate => {
185
185
  }
186
186
  };
187
187
 
188
- /**
189
- * Sort events by date (upcoming first, then past events)
190
- * @param events - Array of events
191
- * @returns Sorted array of events
188
+ /**
189
+ * Sort events by date (upcoming first, then past events)
190
+ * @param events - Array of events
191
+ * @returns Sorted array of events
192
192
  */
193
193
  export const sortEventsByDate = events => {
194
194
  return events.sort((a, b) => {
@@ -214,11 +214,11 @@ export const sortEventsByDate = events => {
214
214
  });
215
215
  };
216
216
 
217
- /**
218
- * Filter events by search query
219
- * @param events - Array of events
220
- * @param query - Search query
221
- * @returns Filtered array of events
217
+ /**
218
+ * Filter events by search query
219
+ * @param events - Array of events
220
+ * @param query - Search query
221
+ * @returns Filtered array of events
222
222
  */
223
223
  export const filterEventsBySearch = (events, query) => {
224
224
  if (!query.trim()) {
@@ -231,20 +231,20 @@ export const filterEventsBySearch = (events, query) => {
231
231
  });
232
232
  };
233
233
 
234
- /**
235
- * Get unique tags from events
236
- * @param events - Array of events
237
- * @returns Array of unique tags
234
+ /**
235
+ * Get unique tags from events
236
+ * @param events - Array of events
237
+ * @returns Array of unique tags
238
238
  */
239
239
  export const getUniqueEventTags = events => {
240
240
  const allTags = events.flatMap(event => event.tags || []);
241
241
  return Array.from(new Set(allTags)).sort();
242
242
  };
243
243
 
244
- /**
245
- * Calculate event statistics
246
- * @param events - Array of events
247
- * @returns Event statistics object
244
+ /**
245
+ * Calculate event statistics
246
+ * @param events - Array of events
247
+ * @returns Event statistics object
248
248
  */
249
249
  export const calculateEventStats = events => {
250
250
  const total = events.length;
@@ -1,18 +1,18 @@
1
- /**
2
- * Programmatic Onairos Flow
3
- *
4
- * This function executes the complete Onairos authentication and onboarding flow
5
- * that can be attached to custom buttons or called programmatically.
1
+ /**
2
+ * Programmatic Onairos Flow
3
+ *
4
+ * This function executes the complete Onairos authentication and onboarding flow
5
+ * that can be attached to custom buttons or called programmatically.
6
6
  */
7
7
 
8
8
  import { initializePlatformAuthService } from '../services/platformAuthService';
9
9
 
10
- /**
11
- * Execute the complete Onairos flow programmatically
12
- * This is the same logic that the OnairosButton uses internally
13
- *
14
- * @param options Configuration options for the flow
15
- * @returns Promise that resolves when flow is complete
10
+ /**
11
+ * Execute the complete Onairos flow programmatically
12
+ * This is the same logic that the OnairosButton uses internally
13
+ *
14
+ * @param options Configuration options for the flow
15
+ * @returns Promise that resolves when flow is complete
16
16
  */
17
17
  export const executeOnairosFlow = async options => {
18
18
  try {
@@ -86,11 +86,11 @@ export const executeOnairosFlow = async options => {
86
86
  }
87
87
  };
88
88
 
89
- /**
90
- * Simple wrapper function that matches the OnairosButton click behavior
91
- *
92
- * @param options Configuration options for the flow
93
- * @returns Promise that resolves when flow is complete
89
+ /**
90
+ * Simple wrapper function that matches the OnairosButton click behavior
91
+ *
92
+ * @param options Configuration options for the flow
93
+ * @returns Promise that resolves when flow is complete
94
94
  */
95
95
  export const startOnairosFlow = async options => {
96
96
  // Pre-check if provided
@@ -1,12 +1,12 @@
1
- /**
2
- * 🔄 Retry Helper Utility
3
- *
4
- * Provides robust retry logic with exponential backoff for network operations.
5
- * Used throughout the Onairos SDK for handling transient failures gracefully.
1
+ /**
2
+ * 🔄 Retry Helper Utility
3
+ *
4
+ * Provides robust retry logic with exponential backoff for network operations.
5
+ * Used throughout the Onairos SDK for handling transient failures gracefully.
6
6
  */
7
7
 
8
- /**
9
- * Default retry options for the Onairos SDK
8
+ /**
9
+ * Default retry options for the Onairos SDK
10
10
  */
11
11
  export const DEFAULT_RETRY_OPTIONS = {
12
12
  maxRetries: 3,
@@ -33,11 +33,11 @@ export const DEFAULT_RETRY_OPTIONS = {
33
33
  }
34
34
  };
35
35
 
36
- /**
37
- * Execute a function with retry logic and exponential backoff
38
- * @param fn Function to execute (should return a Promise)
39
- * @param options Retry configuration options
40
- * @returns Promise with retry result
36
+ /**
37
+ * Execute a function with retry logic and exponential backoff
38
+ * @param fn Function to execute (should return a Promise)
39
+ * @param options Retry configuration options
40
+ * @returns Promise with retry result
41
41
  */
42
42
  export async function withRetry(fn, options = {}) {
43
43
  const config = {
@@ -100,8 +100,8 @@ export async function withRetry(fn, options = {}) {
100
100
  };
101
101
  }
102
102
 
103
- /**
104
- * Retry configuration for API calls
103
+ /**
104
+ * Retry configuration for API calls
105
105
  */
106
106
  export const API_RETRY_OPTIONS = {
107
107
  maxRetries: 3,
@@ -147,8 +147,8 @@ export const API_RETRY_OPTIONS = {
147
147
  }
148
148
  };
149
149
 
150
- /**
151
- * Specialized retry for network/connectivity issues
150
+ /**
151
+ * Specialized retry for network/connectivity issues
152
152
  */
153
153
  export const NETWORK_RETRY_OPTIONS = {
154
154
  maxRetries: 2,
@@ -161,12 +161,12 @@ export const NETWORK_RETRY_OPTIONS = {
161
161
  }
162
162
  };
163
163
 
164
- /**
165
- * Create a retry wrapper for fetch requests
166
- * @param url Request URL
167
- * @param options Fetch options
168
- * @param retryOptions Retry configuration
169
- * @returns Promise with fetch response
164
+ /**
165
+ * Create a retry wrapper for fetch requests
166
+ * @param url Request URL
167
+ * @param options Fetch options
168
+ * @param retryOptions Retry configuration
169
+ * @returns Promise with fetch response
170
170
  */
171
171
  export async function fetchWithRetry(url, options = {}, retryOptions = API_RETRY_OPTIONS) {
172
172
  const result = await withRetry(() => fetch(url, options), retryOptions);
@@ -176,11 +176,11 @@ export async function fetchWithRetry(url, options = {}, retryOptions = API_RETRY
176
176
  return result.data;
177
177
  }
178
178
 
179
- /**
180
- * Health check function with retry for testing connectivity
181
- * @param url URL to check
182
- * @param timeout Timeout in milliseconds
183
- * @returns Promise indicating if the service is reachable
179
+ /**
180
+ * Health check function with retry for testing connectivity
181
+ * @param url URL to check
182
+ * @param timeout Timeout in milliseconds
183
+ * @returns Promise indicating if the service is reachable
184
184
  */
185
185
  export async function healthCheck(url, timeout = 5000) {
186
186
  const startTime = Date.now();
@@ -1 +1 @@
1
- {"version":3,"file":"OnairosSignInButton.d.ts","sourceRoot":"","sources":["../../../src/components/OnairosSignInButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAmHlE,CAAC"}
1
+ {"version":3,"file":"OnairosSignInButton.d.ts","sourceRoot":"","sources":["../../../src/components/OnairosSignInButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAMrD,UAAU,wBAAwB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAgFlE,CAAC"}
@@ -6,7 +6,6 @@
6
6
  */
7
7
  export type { OnairosButtonProps, OnairosProps, DataTier, OnairosConfig, TestModeOptions, UniversalOnboardingProps, ConnectionStatus, PlatformConfig, } from './types';
8
8
  export { OnairosButton } from './components/OnairosButton';
9
- export { OnairosSignInButton } from './components/OnairosSignInButton';
10
9
  export { Onairos } from './components/Onairos';
11
10
  export { UniversalOnboarding } from './components/UniversalOnboarding';
12
11
  export { default as WelcomeScreen } from './components/WelcomeScreen';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,GACf,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,UAAU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