@onairos/react-native 3.1.16 → 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.
- package/README.md +404 -0
- package/lib/commonjs/assets/images/Checkbox.svg +3 -3
- package/lib/commonjs/assets/images/EnochE.svg +19 -19
- package/lib/commonjs/assets/images/Personalityprofile.svg +3 -3
- package/lib/commonjs/assets/images/Personalitytraits.svg +3 -3
- package/lib/commonjs/assets/images/Userpreferences.svg +3 -3
- package/lib/commonjs/assets/images/arrow.svg +20 -20
- package/lib/commonjs/assets/images/basicproficon.svg +43 -43
- package/lib/commonjs/assets/images/basicprofile.svg +3 -3
- package/lib/commonjs/assets/images/checkmark.svg +4 -4
- package/lib/commonjs/assets/images/contentanalysis.svg +3 -3
- package/lib/commonjs/assets/images/contenticon.svg +23 -23
- package/lib/commonjs/assets/images/personalityicon.svg +18 -18
- package/lib/commonjs/assets/images/x-close.svg +3 -3
- package/lib/commonjs/components/OnairosButton.js +290 -0
- package/lib/commonjs/components/OnairosButton.js.map +1 -0
- package/lib/commonjs/components/OnairosSignInButton.js +30 -8
- package/lib/commonjs/components/OnairosSignInButton.js.map +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +4 -4
- package/lib/commonjs/config/api.js +2 -2
- package/lib/commonjs/hooks/useConnections.js +6 -6
- package/lib/commonjs/hooks/useUserConnections.js +10 -10
- package/lib/commonjs/index.js +9 -10
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/services/apiClient.js +35 -35
- package/lib/commonjs/services/apiKeyService.js +99 -99
- package/lib/commonjs/services/authService.js +82 -82
- package/lib/commonjs/services/biometricPinService.js +10 -10
- package/lib/commonjs/services/connectedAccountsService.js +32 -32
- package/lib/commonjs/services/googleAuthService.js +15 -15
- package/lib/commonjs/services/imageCompressionService.js +15 -15
- package/lib/commonjs/services/jwtStorageService.js +59 -59
- package/lib/commonjs/services/mobileTrainingService.js +14 -14
- package/lib/commonjs/services/pinEncryptionService.js +10 -10
- package/lib/commonjs/services/pinStorageUtils.js +15 -15
- package/lib/commonjs/services/platformAuthService.js +47 -47
- package/lib/commonjs/services/storageService.js +31 -31
- package/lib/commonjs/services/trainingApiHelpers.js +33 -33
- package/lib/commonjs/services/userConnectionsService.js +24 -24
- package/lib/commonjs/utils/Portal.js +4 -4
- package/lib/commonjs/utils/api.js +24 -24
- package/lib/commonjs/utils/auth.js +18 -18
- package/lib/commonjs/utils/crypto.js +13 -13
- package/lib/commonjs/utils/encryption.js +12 -12
- package/lib/commonjs/utils/eventUtils.js +52 -52
- package/lib/commonjs/utils/programmaticFlow.js +16 -16
- package/lib/commonjs/utils/retryHelper.js +27 -27
- package/lib/module/assets/images/Checkbox.svg +3 -3
- package/lib/module/assets/images/EnochE.svg +19 -19
- package/lib/module/assets/images/Personalityprofile.svg +3 -3
- package/lib/module/assets/images/Personalitytraits.svg +3 -3
- package/lib/module/assets/images/Userpreferences.svg +3 -3
- package/lib/module/assets/images/arrow.svg +20 -20
- package/lib/module/assets/images/basicproficon.svg +43 -43
- package/lib/module/assets/images/basicprofile.svg +3 -3
- package/lib/module/assets/images/checkmark.svg +4 -4
- package/lib/module/assets/images/contentanalysis.svg +3 -3
- package/lib/module/assets/images/contenticon.svg +23 -23
- package/lib/module/assets/images/personalityicon.svg +18 -18
- package/lib/module/assets/images/x-close.svg +3 -3
- package/lib/module/components/OnairosButton.js +282 -0
- package/lib/module/components/OnairosButton.js.map +1 -0
- package/lib/module/components/OnairosSignInButton.js +30 -8
- package/lib/module/components/OnairosSignInButton.js.map +1 -1
- package/lib/module/components/UniversalOnboarding.js +4 -4
- package/lib/module/config/api.js +2 -2
- package/lib/module/hooks/useConnections.js +6 -6
- package/lib/module/hooks/useUserConnections.js +10 -10
- package/lib/module/index.js +8 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/apiClient.js +35 -35
- package/lib/module/services/apiKeyService.js +99 -99
- package/lib/module/services/authService.js +82 -82
- package/lib/module/services/biometricPinService.js +10 -10
- package/lib/module/services/connectedAccountsService.js +32 -32
- package/lib/module/services/googleAuthService.js +15 -15
- package/lib/module/services/imageCompressionService.js +15 -15
- package/lib/module/services/jwtStorageService.js +59 -59
- package/lib/module/services/mobileTrainingService.js +14 -14
- package/lib/module/services/pinEncryptionService.js +10 -10
- package/lib/module/services/pinStorageUtils.js +15 -15
- package/lib/module/services/platformAuthService.js +47 -47
- package/lib/module/services/storageService.js +31 -31
- package/lib/module/services/trainingApiHelpers.js +33 -33
- package/lib/module/services/userConnectionsService.js +24 -24
- package/lib/module/utils/Portal.js +4 -4
- package/lib/module/utils/api.js +24 -24
- package/lib/module/utils/auth.js +18 -18
- package/lib/module/utils/crypto.js +13 -13
- package/lib/module/utils/encryption.js +12 -12
- package/lib/module/utils/eventUtils.js +52 -52
- package/lib/module/utils/programmaticFlow.js +16 -16
- package/lib/module/utils/retryHelper.js +27 -27
- package/lib/typescript/components/OnairosButton.d.ts +37 -0
- package/lib/typescript/components/OnairosButton.d.ts.map +1 -0
- package/lib/typescript/components/OnairosSignInButton.d.ts +2 -1
- package/lib/typescript/components/OnairosSignInButton.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +163 -163
- package/src/api/index.ts +151 -151
- package/src/assets/images/Checkbox.svg +3 -3
- package/src/assets/images/EnochE.svg +19 -19
- package/src/assets/images/Personalityprofile.svg +3 -3
- package/src/assets/images/Personalitytraits.svg +3 -3
- package/src/assets/images/Userpreferences.svg +3 -3
- package/src/assets/images/arrow.svg +20 -20
- package/src/assets/images/basicproficon.svg +43 -43
- package/src/assets/images/basicprofile.svg +3 -3
- package/src/assets/images/checkmark.svg +4 -4
- package/src/assets/images/contentanalysis.svg +3 -3
- package/src/assets/images/contenticon.svg +23 -23
- package/src/assets/images/personalityicon.svg +18 -18
- package/src/assets/images/x-close.svg +3 -3
- package/src/components/BodyText.tsx +33 -33
- package/src/components/BrandMark.tsx +62 -62
- package/src/components/CodeInput.tsx +32 -32
- package/src/components/DataRequestScreen.tsx +355 -355
- package/src/components/EmailInput.tsx +31 -31
- package/src/components/EmailVerificationModal.tsx +363 -363
- package/src/components/ExistingUserDataConfirmation.tsx +506 -506
- package/src/components/GoogleButton.tsx +55 -55
- package/src/components/HeadingGroup.tsx +49 -49
- package/src/components/ModalHeader.tsx +125 -125
- package/src/components/ModalSheet.tsx +57 -57
- package/src/components/Onairos.tsx +422 -422
- package/src/components/OnairosButton.tsx +339 -0
- package/src/components/OnairosSignInButton.tsx +30 -10
- package/src/components/Overlay.tsx +506 -506
- package/src/components/PersonaImage.tsx +79 -79
- package/src/components/PersonaLoadingScreen.tsx +201 -201
- package/src/components/PersonalizationConsentScreen.tsx +410 -410
- package/src/components/PinCreationScreen.tsx +492 -492
- package/src/components/PinInput.tsx +555 -555
- package/src/components/PlatformConnectorsStep.tsx +891 -891
- package/src/components/PlatformList.tsx +144 -144
- package/src/components/PlatformToggle.tsx +226 -226
- package/src/components/PrimaryButton.tsx +213 -213
- package/src/components/SignInMatchAnimation.tsx +225 -225
- package/src/components/SignInStep.tsx +217 -217
- package/src/components/TrainingModal.tsx +1047 -1047
- package/src/components/UniversalOnboarding.tsx +2887 -2887
- package/src/components/VerificationStep.tsx +198 -198
- package/src/components/WelcomeScreen.tsx +473 -473
- package/src/components/icons/Basicproficon.tsx +30 -30
- package/src/components/icons/Basicprofile.tsx +17 -17
- package/src/components/icons/Checkbox.tsx +17 -17
- package/src/components/icons/Checkmark.tsx +24 -24
- package/src/components/icons/Contentanalysis.tsx +17 -17
- package/src/components/icons/Contenticon.tsx +30 -30
- package/src/components/icons/EnochE.tsx +39 -39
- package/src/components/icons/Personalityicon.tsx +22 -22
- package/src/components/icons/Personalityprofile.tsx +17 -17
- package/src/components/icons/Personalitytraits.tsx +17 -17
- package/src/components/icons/Userpreferences.tsx +17 -17
- package/src/components/icons/index.ts +12 -12
- package/src/components/onboarding/OAuthWebView.tsx +232 -232
- package/src/config/api.ts +25 -25
- package/src/context/AuthContext.tsx +393 -393
- package/src/hooks/useConnectedAccounts.ts +138 -138
- package/src/hooks/useConnections.ts +161 -161
- package/src/hooks/useCredentials.ts +174 -174
- package/src/hooks/useUserConnections.ts +165 -165
- package/src/index.js +14 -0
- package/src/index.ts +94 -96
- package/src/services/apiClient.ts +336 -336
- package/src/services/apiKeyService.ts +919 -919
- package/src/services/authService.ts +1008 -1008
- package/src/services/biometricPinService.ts +192 -192
- package/src/services/connectedAccountsService.ts +289 -289
- package/src/services/googleAuthService.ts +279 -279
- package/src/services/imageCompressionService.ts +302 -302
- package/src/services/jwtStorageService.ts +256 -256
- package/src/services/mobileTrainingService.ts +203 -203
- package/src/services/pinEncryptionService.ts +75 -75
- package/src/services/pinStorageUtils.ts +96 -96
- package/src/services/platformAuthService.ts +1346 -1346
- package/src/services/storageService.ts +451 -451
- package/src/services/trainingApiHelpers.ts +66 -66
- package/src/services/userConnectionsService.ts +556 -556
- package/src/services/youtubeMigrationService.ts +453 -453
- package/src/theme/index.ts +239 -239
- package/src/types/ambient.d.ts +28 -28
- package/src/types/index.ts +265 -265
- package/src/types/node-fix.d.ts +18 -18
- package/src/types/node-override.d.ts +23 -23
- package/src/types/opacity.d.ts +15 -15
- package/src/types/types.d.ts +17 -17
- package/src/utils/Portal.tsx +82 -82
- package/src/utils/api.js +111 -111
- package/src/utils/auth.js +103 -103
- package/src/utils/crypto.js +59 -59
- package/src/utils/encryption.ts +68 -68
- package/src/utils/eventUtils.ts +302 -302
- package/src/utils/haptics.ts +58 -58
- package/src/utils/imagePreloader.ts +2 -2
- package/src/utils/programmaticFlow.ts +112 -112
- package/src/utils/retryHelper.ts +274 -274
|
@@ -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();
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface OnairosButtonProps {
|
|
3
|
+
AppName: string;
|
|
4
|
+
buttonType?: 'normal' | 'pill';
|
|
5
|
+
buttonWidth?: number;
|
|
6
|
+
buttonHeight?: number;
|
|
7
|
+
hasStroke?: boolean;
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
buttonForm?: 'default' | 'login' | 'signup' | 'connect';
|
|
10
|
+
onResolved?: (token: string, email?: string) => void;
|
|
11
|
+
onRejection?: (error: any) => void;
|
|
12
|
+
preCheck?: () => Promise<boolean>;
|
|
13
|
+
color?: string;
|
|
14
|
+
swerv?: boolean;
|
|
15
|
+
darkMode?: boolean;
|
|
16
|
+
returnLink?: string;
|
|
17
|
+
preferredPlatform?: string;
|
|
18
|
+
autoFetch?: boolean;
|
|
19
|
+
inferenceData?: any;
|
|
20
|
+
textLayout?: 'left' | 'right' | 'center';
|
|
21
|
+
textColor?: string;
|
|
22
|
+
proofMode?: boolean;
|
|
23
|
+
webpageName?: string;
|
|
24
|
+
debug?: boolean;
|
|
25
|
+
testMode?: boolean;
|
|
26
|
+
requestData?: any;
|
|
27
|
+
onPress?: () => void;
|
|
28
|
+
primaryAuthOnly?: boolean;
|
|
29
|
+
useNewWelcomeFlow?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface OnairosButtonRef {
|
|
32
|
+
trigger: () => Promise<void>;
|
|
33
|
+
reset: () => Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export declare const OnairosButton: React.ForwardRefExoticComponent<OnairosButtonProps & React.RefAttributes<OnairosButtonRef>>;
|
|
36
|
+
export default OnairosButton;
|
|
37
|
+
//# sourceMappingURL=OnairosButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnairosButton.d.ts","sourceRoot":"","sources":["../../../src/components/OnairosButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4E,MAAM,OAAO,CAAC;AAcjG,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACxD,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,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAID,eAAO,MAAM,aAAa,6FAmOxB,CAAC;AA4DH,eAAe,aAAa,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
interface OnairosSignInButtonProps {
|
|
3
3
|
AppName: string;
|
|
4
4
|
buttonWidth?: number;
|
|
5
5
|
buttonHeight?: number;
|
|
@@ -10,4 +10,5 @@ export interface OnairosSignInButtonProps {
|
|
|
10
10
|
autoFocusEmailInput?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare const OnairosSignInButton: React.FC<OnairosSignInButtonProps>;
|
|
13
|
+
export {};
|
|
13
14
|
//# sourceMappingURL=OnairosSignInButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnairosSignInButton.d.ts","sourceRoot":"","sources":["../../../src/components/OnairosSignInButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,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"}
|
|
@@ -4,9 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* PUBLIC API - Complete redesigned UI and enhanced functionality
|
|
6
6
|
*/
|
|
7
|
-
export type { OnairosProps, DataTier, OnairosConfig, TestModeOptions, UniversalOnboardingProps, ConnectionStatus, PlatformConfig, } from './types';
|
|
8
|
-
export
|
|
9
|
-
export { OnairosSignInButton } from './components/OnairosSignInButton';
|
|
7
|
+
export type { OnairosButtonProps, OnairosProps, DataTier, OnairosConfig, TestModeOptions, UniversalOnboardingProps, ConnectionStatus, PlatformConfig, } from './types';
|
|
8
|
+
export { OnairosButton } from './components/OnairosButton';
|
|
10
9
|
export { Onairos } from './components/Onairos';
|
|
11
10
|
export { UniversalOnboarding } from './components/UniversalOnboarding';
|
|
12
11
|
export { default as WelcomeScreen } from './components/WelcomeScreen';
|
|
@@ -28,7 +27,7 @@ export { initiateOAuth, initiateNativeAuth, hasNativeSDK, isOAuthCallback, } fro
|
|
|
28
27
|
export { updateGoogleClientIds, } from './services/googleAuthService';
|
|
29
28
|
export { ApiClient } from './services/apiClient';
|
|
30
29
|
declare const _default: {
|
|
31
|
-
|
|
30
|
+
OnairosButton: import("react").ForwardRefExoticComponent<import("./components/OnairosButton").OnairosButtonProps & import("react").RefAttributes<import("./components/OnairosButton").OnairosButtonRef>>;
|
|
32
31
|
Onairos: import("react").ForwardRefExoticComponent<import("./types").OnairosProps & import("react").RefAttributes<any>>;
|
|
33
32
|
UniversalOnboarding: import("react").FC<import("./components/UniversalOnboarding").UniversalOnboardingProps>;
|
|
34
33
|
WelcomeScreen: import("react").FC<import("./components/WelcomeScreen").WelcomeScreenProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,eAAe,EACf,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,GACf,MAAM,SAAS,CAAC;AAGjB,
|
|
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,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,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AASnE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAKpE,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,YAAY,EACZ,eAAe,GAChB,MAAM,gCAAgC,CAAC;AAExC,OAAO,EACL,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;;;;;;;AAcjD,wBAKE"}
|