@onairos/react-native 3.6.8 → 3.6.9
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 +423 -423
- package/lib/commonjs/api/index.js +1 -1
- 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/BodyText.js +1 -1
- package/lib/commonjs/components/BrandMark.js +1 -1
- package/lib/commonjs/components/CodeInput.js +1 -1
- package/lib/commonjs/components/EmailInput.js +1 -1
- package/lib/commonjs/components/GoogleButton.js +1 -1
- package/lib/commonjs/components/HeadingGroup.js +1 -1
- package/lib/commonjs/components/LLMDataInputModal.js +1 -1
- package/lib/commonjs/components/ModalHeader.js +1 -1
- package/lib/commonjs/components/ModalSheet.js +1 -1
- package/lib/commonjs/components/Onairos.js +1 -1
- package/lib/commonjs/components/OnairosButton.js +1 -1
- package/lib/commonjs/components/OnairosSignInButton.js +1 -1
- package/lib/commonjs/components/Overlay.js +1 -1
- package/lib/commonjs/components/PersonaImage.js +1 -1
- package/lib/commonjs/components/PersonaLoadingScreen.js +1 -1
- package/lib/commonjs/components/PersonalizationConsentScreen.js +1 -1
- package/lib/commonjs/components/PinCreationScreen.js +1 -1
- package/lib/commonjs/components/PinInput.js +1 -1
- package/lib/commonjs/components/PlatformConnectorsStep.js +1 -1
- package/lib/commonjs/components/PlatformList.js +1 -1
- package/lib/commonjs/components/PlatformToggle.js +1 -1
- package/lib/commonjs/components/PrimaryButton.js +1 -1
- package/lib/commonjs/components/SignInMatchAnimation.js +1 -1
- package/lib/commonjs/components/SignInStep.js +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +1 -1
- package/lib/commonjs/components/VerificationStep.js +1 -1
- package/lib/commonjs/components/WelcomeScreen.js +1 -1
- package/lib/commonjs/components/icons/Basicproficon.js +1 -1
- package/lib/commonjs/components/icons/Basicprofile.js +1 -1
- package/lib/commonjs/components/icons/Checkbox.js +1 -1
- package/lib/commonjs/components/icons/Checkmark.js +1 -1
- package/lib/commonjs/components/icons/Contentanalysis.js +1 -1
- package/lib/commonjs/components/icons/Contenticon.js +1 -1
- package/lib/commonjs/components/icons/EnochE.js +1 -1
- package/lib/commonjs/components/icons/Personalityicon.js +1 -1
- package/lib/commonjs/components/icons/Personalityprofile.js +1 -1
- package/lib/commonjs/components/icons/Personalitytraits.js +1 -1
- package/lib/commonjs/components/icons/Userpreferences.js +1 -1
- package/lib/commonjs/components/icons/index.js +1 -1
- package/lib/commonjs/components/onboarding/OAuthWebView.js +1 -1
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/commonjs/components/onboarding/PinInput.js +1 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js +1 -1
- package/lib/commonjs/config/PLATFORM_APIS.md +559 -0
- package/lib/commonjs/config/api.js +1 -1
- package/lib/commonjs/config/telegramConfig.js +8 -0
- package/lib/commonjs/config/webchangelog/md +607 -0
- package/lib/commonjs/constants/index.js +1 -1
- package/lib/commonjs/context/AuthContext.js +1 -1
- package/lib/commonjs/hooks/useConnectedAccounts.js +1 -1
- package/lib/commonjs/hooks/useConnections.js +1 -1
- package/lib/commonjs/hooks/useCredentials.js +1 -1
- package/lib/commonjs/hooks/useUserConnections.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/commonjs/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/commonjs/services/apiClient.js +1 -1
- package/lib/commonjs/services/apiKeyService.js +99 -99
- package/lib/commonjs/services/authService.js +72 -72
- package/lib/commonjs/services/biometricPinService.js +1 -1
- package/lib/commonjs/services/chatGPTConversationExtractor.js +1 -1
- package/lib/commonjs/services/chatGPTConversationService.js +1 -1
- package/lib/commonjs/services/claudeConversationExtractor.js +1 -1
- package/lib/commonjs/services/claudeConversationService.js +1 -1
- package/lib/commonjs/services/connectedAccountsService.js +1 -1
- package/lib/commonjs/services/googleAuthService.js +1 -1
- package/lib/commonjs/services/hingeDataExtractor.js +1 -1
- package/lib/commonjs/services/hingeDataService.js +1 -1
- package/lib/commonjs/services/imageCompressionService.js +1 -1
- package/lib/commonjs/services/instagramDataExtractor.js +1 -1
- package/lib/commonjs/services/instagramDataService.js +1 -1
- package/lib/commonjs/services/jwtStorageService.js +1 -1
- package/lib/commonjs/services/linkedinDOMExtractor.js +1 -1
- package/lib/commonjs/services/linkedinProfileService.js +1 -1
- package/lib/commonjs/services/linkedinScrapingService.js +1 -1
- package/lib/commonjs/services/llmDataStorage.js +1 -1
- package/lib/commonjs/services/mobileTrainingService.js +1 -1
- package/lib/commonjs/services/oauthService.js +20 -20
- package/lib/commonjs/services/pinEncryptionService.js +1 -1
- package/lib/commonjs/services/pinStorageUtils.js +1 -1
- package/lib/commonjs/services/platformAuthService.js +1 -1
- package/lib/commonjs/services/sephoraDataExtractor.js +1 -1
- package/lib/commonjs/services/sephoraDataService.js +1 -1
- package/lib/commonjs/services/storageService.js +1 -1
- package/lib/commonjs/services/telegramDataExtractor.js +1 -1
- package/lib/commonjs/services/telegramDataService.js +1 -1
- package/lib/commonjs/services/trainingApiHelpers.js +1 -1
- package/lib/commonjs/services/userConnectionsService.js +1 -1
- package/lib/commonjs/services/youtubeMigrationService.js +1 -1
- package/lib/commonjs/theme/index.js +1 -1
- package/lib/commonjs/types/index.js +1 -1
- package/lib/commonjs/types.js +1 -1
- package/lib/commonjs/utils/Portal.js +1 -1
- package/lib/commonjs/utils/api.js +1 -1
- package/lib/commonjs/utils/assetRegistry.js +1 -1
- package/lib/commonjs/utils/auth.js +1 -1
- package/lib/commonjs/utils/connectorTests.js +1 -1
- package/lib/commonjs/utils/crypto.js +1 -1
- package/lib/commonjs/utils/debugHelper.js +1 -1
- package/lib/commonjs/utils/encryption.js +1 -1
- package/lib/commonjs/utils/eventUtils.js +1 -1
- package/lib/commonjs/utils/haptics.js +1 -1
- package/lib/commonjs/utils/imagePreloader.js +1 -1
- package/lib/commonjs/utils/networkDiagnostics.js +1 -1
- package/lib/commonjs/utils/onairosApi.js +1 -1
- package/lib/commonjs/utils/programmaticFlow.js +1 -1
- package/lib/commonjs/utils/retryHelper.js +1 -1
- package/lib/commonjs/utils/secureStorage.js +1 -1
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/commonjs/utils/webviewScripts/claude.js +1 -1
- package/lib/commonjs/utils/webviewScripts/hinge.js +1 -1
- package/lib/commonjs/utils/webviewScripts/index.js +1 -1
- package/lib/commonjs/utils/webviewScripts/instagram.js +1 -1
- package/lib/commonjs/utils/webviewScripts/linkedin.js +1 -1
- package/lib/commonjs/utils/webviewScripts/sephora.js +1 -1
- package/lib/commonjs/utils/webviewScripts/telegram.js +1 -1
- package/lib/module/api/index.js +1 -1
- 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/BodyText.js +1 -1
- package/lib/module/components/BrandMark.js +1 -1
- package/lib/module/components/CodeInput.js +1 -1
- package/lib/module/components/EmailInput.js +1 -1
- package/lib/module/components/GoogleButton.js +1 -1
- package/lib/module/components/HeadingGroup.js +1 -1
- package/lib/module/components/LLMDataInputModal.js +1 -1
- package/lib/module/components/ModalHeader.js +1 -1
- package/lib/module/components/ModalSheet.js +1 -1
- package/lib/module/components/Onairos.js +1 -1
- package/lib/module/components/OnairosButton.js +1 -1
- package/lib/module/components/OnairosSignInButton.js +1 -1
- package/lib/module/components/Overlay.js +1 -1
- package/lib/module/components/PersonaImage.js +1 -1
- package/lib/module/components/PersonaLoadingScreen.js +1 -1
- package/lib/module/components/PersonalizationConsentScreen.js +1 -1
- package/lib/module/components/PinCreationScreen.js +1 -1
- package/lib/module/components/PinInput.js +1 -1
- package/lib/module/components/PlatformConnectorsStep.js +1 -1
- package/lib/module/components/PlatformList.js +1 -1
- package/lib/module/components/PlatformToggle.js +1 -1
- package/lib/module/components/PrimaryButton.js +1 -1
- package/lib/module/components/SignInMatchAnimation.js +1 -1
- package/lib/module/components/SignInStep.js +1 -1
- package/lib/module/components/UniversalOnboarding.js +1 -1
- package/lib/module/components/VerificationStep.js +1 -1
- package/lib/module/components/WelcomeScreen.js +1 -1
- package/lib/module/components/icons/Basicproficon.js +1 -1
- package/lib/module/components/icons/Basicprofile.js +1 -1
- package/lib/module/components/icons/Checkbox.js +1 -1
- package/lib/module/components/icons/Checkmark.js +1 -1
- package/lib/module/components/icons/Contentanalysis.js +1 -1
- package/lib/module/components/icons/Contenticon.js +1 -1
- package/lib/module/components/icons/EnochE.js +1 -1
- package/lib/module/components/icons/Personalityicon.js +1 -1
- package/lib/module/components/icons/Personalityprofile.js +1 -1
- package/lib/module/components/icons/Personalitytraits.js +1 -1
- package/lib/module/components/icons/Userpreferences.js +1 -1
- package/lib/module/components/onboarding/OAuthWebView.js +1 -1
- package/lib/module/components/onboarding/OnboardingHeader.js +1 -1
- package/lib/module/components/onboarding/PinInput.js +1 -1
- package/lib/module/components/onboarding/PlatformConnector.js +1 -1
- package/lib/module/config/PLATFORM_APIS.md +559 -0
- package/lib/module/config/api.js +1 -1
- package/lib/module/config/telegramConfig.js +8 -0
- package/lib/module/config/webchangelog/md +607 -0
- package/lib/module/constants/index.js +1 -1
- package/lib/module/context/AuthContext.js +1 -1
- package/lib/module/hooks/useConnectedAccounts.js +1 -1
- package/lib/module/hooks/useConnections.js +1 -1
- package/lib/module/hooks/useCredentials.js +1 -1
- package/lib/module/hooks/useUserConnections.js +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/services/SDK_API_KEY_VALIDATION.md +421 -421
- package/lib/module/services/apiClient.js +1 -1
- package/lib/module/services/apiKeyService.js +99 -99
- package/lib/module/services/authService.js +72 -72
- package/lib/module/services/biometricPinService.js +1 -1
- package/lib/module/services/chatGPTConversationExtractor.js +1 -1
- package/lib/module/services/chatGPTConversationService.js +1 -1
- package/lib/module/services/claudeConversationExtractor.js +1 -1
- package/lib/module/services/claudeConversationService.js +1 -1
- package/lib/module/services/connectedAccountsService.js +1 -1
- package/lib/module/services/googleAuthService.js +1 -1
- package/lib/module/services/hingeDataExtractor.js +1 -1
- package/lib/module/services/hingeDataService.js +1 -1
- package/lib/module/services/imageCompressionService.js +1 -1
- package/lib/module/services/instagramDataExtractor.js +1 -1
- package/lib/module/services/instagramDataService.js +1 -1
- package/lib/module/services/jwtStorageService.js +1 -1
- package/lib/module/services/linkedinDOMExtractor.js +1 -1
- package/lib/module/services/linkedinProfileService.js +1 -1
- package/lib/module/services/linkedinScrapingService.js +1 -1
- package/lib/module/services/llmDataStorage.js +1 -1
- package/lib/module/services/mobileTrainingService.js +1 -1
- package/lib/module/services/oauthService.js +20 -20
- package/lib/module/services/pinEncryptionService.js +1 -1
- package/lib/module/services/pinStorageUtils.js +1 -1
- package/lib/module/services/platformAuthService.js +1 -1
- package/lib/module/services/sephoraDataExtractor.js +1 -1
- package/lib/module/services/sephoraDataService.js +1 -1
- package/lib/module/services/storageService.js +1 -1
- package/lib/module/services/telegramDataExtractor.js +1 -1
- package/lib/module/services/telegramDataService.js +1 -1
- package/lib/module/services/trainingApiHelpers.js +1 -1
- package/lib/module/services/userConnectionsService.js +1 -1
- package/lib/module/services/youtubeMigrationService.js +1 -1
- package/lib/module/theme/index.js +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/utils/Portal.js +1 -1
- package/lib/module/utils/api.js +1 -1
- package/lib/module/utils/assetRegistry.js +1 -1
- package/lib/module/utils/auth.js +1 -1
- package/lib/module/utils/connectorTests.js +1 -1
- package/lib/module/utils/crypto.js +1 -1
- package/lib/module/utils/debugHelper.js +1 -1
- package/lib/module/utils/encryption.js +1 -1
- package/lib/module/utils/eventUtils.js +1 -1
- package/lib/module/utils/haptics.js +1 -1
- package/lib/module/utils/networkDiagnostics.js +1 -1
- package/lib/module/utils/onairosApi.js +1 -1
- package/lib/module/utils/programmaticFlow.js +1 -1
- package/lib/module/utils/retryHelper.js +1 -1
- package/lib/module/utils/secureStorage.js +1 -1
- package/lib/module/utils/webviewScripts/chatgpt.js +1 -1
- package/lib/module/utils/webviewScripts/claude.js +1 -1
- package/lib/module/utils/webviewScripts/hinge.js +1 -1
- package/lib/module/utils/webviewScripts/index.js +1 -1
- package/lib/module/utils/webviewScripts/instagram.js +1 -1
- package/lib/module/utils/webviewScripts/linkedin.js +1 -1
- package/lib/module/utils/webviewScripts/sephora.js +1 -1
- package/lib/module/utils/webviewScripts/telegram.js +1 -1
- package/package.json +172 -172
|
@@ -5,4 +5,4 @@ var __ONAIROS_REQ_REGISTRY__ = [
|
|
|
5
5
|
require("../config/api")
|
|
6
6
|
];
|
|
7
7
|
function __ONAIROS_REQ_FUNC__(i) { return __ONAIROS_REQ_REGISTRY__[i]; }
|
|
8
|
-
function _0xb0d7(){const _0x305906=['defineProperty','__esModule','authenticatedRequest','apiPut','apiPost','apiDelete','ApiClient','API_CONFIG','BASE_URL','request','CZGdF','OnairosSDK/1.0.0','AbortError','Request\x20cancelled','set','zLStN','log','🔗\x20[API\x20Client]\x20Starting\x20request\x20','\x20to:\x20','getTokenTypeForRoute','\x20requires\x20','\x20token','getRequestHeaders','rnBCB','qLDaX','headers','body','stringify','signal','🔐\x20[API\x20Client]\x20Request\x20','\x20using\x20','baseUrl','📡\x20[API\x20Client]\x20Response\x20','status','mXsAS','handle401Error','delete','message','authTriggers','name','\x20was\x20cancelled','KBARU','error','❌\x20[API\x20Client]\x20Request\x20','\x20failed:','No\x20','\x20token\x20available\x20for\x20route\x20','.\x20Please\x20authenticate\x20first.','getJWTForRoute','YZlsT','YhaxK','\x20requests\x20due\x20to\x20','1|4|3|0|6|5|2','oukup','split','🚫\x20[API\x20Client]\x20Request\x20','\x20token\x20on\x20route:\x20','\x20authentication\x20expired\x20for\x20','.\x20Please\x20re-authenticate.','clearJWT','\x20token\x20due\x20to\x20401\x20error','🔑\x20[API\x20Client]\x20','\x20token\x20cleared,\x20user\x20needs\x20to\x20re-authenticate','triggerReAuthForTokenType','📧\x20[API\x20Client]\x20Triggering\x20Enoch\x20email\x20re-verification','bWzCN','⚠️\x20[API\x20Client]\x20No\x20Enoch\x20re-auth\x20trigger\x20configured','🔑\x20[API\x20Client]\x20Triggering\x20Onairos\x20re-authentication','⚠️\x20[API\x20Client]\x20No\x20auth\x20token\x20refresh\x20trigger\x20configured','eCxrw','WmARF','🔄\x20[API\x20Client]\x20Triggering\x20re-auth\x20for\x20','\x20token\x20(endpoint:\x20','TokenType','ENOCH','triggerEnochReAuth','OEHVt','warn','iDxQk','triggerOnairosReAuth','wVYyG','⚠️\x20[API\x20Client]\x20No\x20Onairos\x20re-auth\x20trigger\x20configured','AUTH','OPHEK','icyYL','sVOoA','Request\x20failed\x20with\x20status\x20','🔄\x20[API\x20Client]\x20Triggering\x20auth\x20token\x20refresh','triggerAuthTokenRefresh','ydikl','AqlLt','SEhTL','🔐\x20','substring','...\x20(length:\x20','length','❌\x20[API\x20Client]\x20Failed\x20to\x20trigger\x20re-auth\x20for\x20','cancelRequestsForTokenType','JkxQW','cPyDo','MYToi','entries','PWjxV','abort','NvVPa','\x20token\x20failure','ArVlx','AjXBY','replaceTokenForType','replaceJWTAfterVerification','✅\x20[API\x20Client]\x20','\x20token\x20replaced\x20and\x20related\x20requests\x20cancelled','🔍\x20[API\x20Client]\x20Debug:\x20Current\x20token\x20status','getAllTokens','📭\x20','🔧\x20[API\x20Client]\x20Authentication\x20triggers\x20updated','get','apiClient','bind','post','put','default'];_0xb0d7=function(){return _0x305906;};return _0xb0d7();}Object[_0x39bd(0x0)](exports,_0x39bd(0x1),{'value':!![]}),exports['default']=exports[_0x39bd(0x2)]=exports[_0x39bd(0x3)]=exports[_0x39bd(0x4)]=exports['apiGet']=exports[_0x39bd(0x5)]=exports['apiClient']=exports[_0x39bd(0x6)]=void 0x0;var _jwtStorageService=__ONAIROS_REQ_FUNC__(0x0),_api=__ONAIROS_REQ_FUNC__(0x1);let currentRequestId=0x0;const activeRequests=new Map();class ApiClient{constructor(_0x3ea060=_api[_0x39bd(0x7)][_0x39bd(0x8)],_0xe655ab={}){this['baseUrl']=_0x3ea060,this['authTriggers']=_0xe655ab;}async[_0x39bd(0x9)](_0x14b6b6,_0x13ea34={}){const _0x16d636={'mXsAS':function(_0x2abbfd,_0x57f02b){return _0x2abbfd===_0x57f02b;},'zLStN':_0x39bd(0xa),'rnBCB':function(_0x28d5dd,_0x549332){return _0x28d5dd!==_0x549332;},'qLDaX':_0x39bd(0xb),'ebGHe':'uCsjB','VHBFX':function(_0x41a0ed,_0x336b92){return _0x41a0ed instanceof _0x336b92;},'IBswc':_0x39bd(0xc),'KBARU':_0x39bd(0xd),'KDkCM':'Unknown\x20error'},_0x37bf6f=++currentRequestId,_0x3d3add=new AbortController();activeRequests[_0x39bd(0xe)](_0x37bf6f,_0x3d3add);try{if(_0x16d636['mXsAS'](_0x16d636[_0x39bd(0xf)],_0x16d636[_0x39bd(0xf)])){console[_0x39bd(0x10)](_0x39bd(0x11)+_0x37bf6f+_0x39bd(0x12)+_0x14b6b6);const _0x2d2b2d=(0x0,_jwtStorageService[_0x39bd(0x13)])(_0x14b6b6);console[_0x39bd(0x10)]('🎯\x20[API\x20Client]\x20Route\x20'+_0x14b6b6+_0x39bd(0x14)+_0x2d2b2d+_0x39bd(0x15));const _0x3afb1f=await this[_0x39bd(0x16)](_0x14b6b6,_0x16d636[_0x39bd(0x17)](_0x13ea34['requiresAuth'],![])),_0x5d3d04={'method':_0x13ea34['method']||'GET','headers':{'Content-Type':'application/json','User-Agent':_0x16d636[_0x39bd(0x18)],..._0x3afb1f,..._0x13ea34[_0x39bd(0x19)]},'body':_0x13ea34[_0x39bd(0x1a)]?JSON[_0x39bd(0x1b)](_0x13ea34[_0x39bd(0x1a)]):undefined,'signal':_0x3d3add[_0x39bd(0x1c)]};console[_0x39bd(0x10)](_0x39bd(0x1d)+_0x37bf6f+_0x39bd(0x1e)+_0x2d2b2d+_0x39bd(0x15));const _0x5de2f2=await fetch(''+this[_0x39bd(0x1f)]+_0x14b6b6,_0x5d3d04);console[_0x39bd(0x10)](_0x39bd(0x20)+_0x37bf6f+'\x20status:',_0x5de2f2[_0x39bd(0x21)]);if(_0x16d636[_0x39bd(0x22)](_0x5de2f2[_0x39bd(0x21)],0x191))return await this[_0x39bd(0x23)](_0x37bf6f,_0x14b6b6,_0x2d2b2d,_0x13ea34);const _0x341901=await _0x5de2f2['json']();activeRequests[_0x39bd(0x24)](_0x37bf6f);if(!_0x5de2f2['ok'])return{'success':![],'error':_0x341901[_0x39bd(0x25)]||'Request\x20failed\x20with\x20status\x20'+_0x5de2f2['status'],'status':_0x5de2f2[_0x39bd(0x21)],'tokenType':_0x2d2b2d};return{'success':!![],'data':_0x341901,'status':_0x5de2f2[_0x39bd(0x21)],'tokenType':_0x2d2b2d};}else this[_0x39bd(0x1f)]=_0x593567,this[_0x39bd(0x26)]=_0x2ab859;}catch(_0x5b6547){if(_0x16d636[_0x39bd(0x17)](_0x16d636['ebGHe'],'Iesfm')){activeRequests[_0x39bd(0x24)](_0x37bf6f);if(_0x16d636['VHBFX'](_0x5b6547,Error)&&_0x5b6547[_0x39bd(0x27)]===_0x16d636['IBswc'])return console[_0x39bd(0x10)]('🚫\x20[API\x20Client]\x20Request\x20'+_0x37bf6f+_0x39bd(0x28)),{'success':![],'error':_0x16d636[_0x39bd(0x29)],'status':0x0};return console[_0x39bd(0x2a)](_0x39bd(0x2b)+_0x37bf6f+_0x39bd(0x2c),_0x5b6547),{'success':![],'error':_0x5b6547 instanceof Error?_0x5b6547[_0x39bd(0x25)]:_0x16d636['KDkCM'],'status':0x0};}else{const _0x532c8b=(0x0,_0x5e64f5[_0x39bd(0x13)])(_0x190025);throw new _0x5dfd82(_0x39bd(0x2d)+_0x532c8b+_0x39bd(0x2e)+_0x5df728+_0x39bd(0x2f));}}}async['getRequestHeaders'](_0x561524,_0x312a44){if(!_0x312a44)return{};const _0x3a77b7=await(0x0,_jwtStorageService[_0x39bd(0x30)])(_0x561524);if(!_0x3a77b7){if(_0x39bd(0x31)!==_0x39bd(0x32)){const _0x543c94=(0x0,_jwtStorageService[_0x39bd(0x13)])(_0x561524);throw new Error(_0x39bd(0x2d)+_0x543c94+_0x39bd(0x2e)+_0x561524+_0x39bd(0x2f));}else _0x1de1e4[_0x39bd(0x10)]('🚫\x20[API\x20Client]\x20Cancelled\x20'+_0x3f9e3e+_0x39bd(0x33)+_0xf12261+'\x20token\x20failure');}return{'Authorization':_0x3a77b7};}async[_0x39bd(0x23)](_0x2b5da6,_0x5a4811,_0x1f53e7,_0x5a0a7f){const _0x4e7370={'oukup':_0x39bd(0x34)},_0x57710b=_0x4e7370[_0x39bd(0x35)][_0x39bd(0x36)]('|');let _0x2ff7fa=0x0;while(!![]){switch(_0x57710b[_0x2ff7fa++]){case'0':this['cancelRequestsForTokenType'](_0x1f53e7,_0x2b5da6);continue;case'1':console[_0x39bd(0x2a)](_0x39bd(0x37)+_0x2b5da6+'\x20received\x20401\x20for\x20'+_0x1f53e7+_0x39bd(0x38)+_0x5a4811);continue;case'2':return{'success':![],'error':_0x1f53e7+_0x39bd(0x39)+_0x5a4811+_0x39bd(0x3a),'status':0x191,'tokenType':_0x1f53e7};case'3':await(0x0,_jwtStorageService[_0x39bd(0x3b)])(_0x1f53e7);continue;case'4':console[_0x39bd(0x10)]('🔄\x20[API\x20Client]\x20Clearing\x20'+_0x1f53e7+_0x39bd(0x3c));continue;case'5':console[_0x39bd(0x10)](_0x39bd(0x3d)+_0x1f53e7+_0x39bd(0x3e));continue;case'6':await this[_0x39bd(0x3f)](_0x1f53e7,_0x5a4811);continue;}break;}}async[_0x39bd(0x3f)](_0x29baa1,_0x212a2c){const _0x175610={'hrOjR':_0x39bd(0x40),'OEHVt':_0x39bd(0x41),'iDxQk':_0x39bd(0x42),'wVYyG':_0x39bd(0x43),'OPHEK':function(_0x373b7f,_0x4c1b50){return _0x373b7f===_0x4c1b50;},'icyYL':'oOCaf','ydikl':_0x39bd(0x44),'AqlLt':_0x39bd(0x45),'SEhTL':_0x39bd(0x46)};console['log'](_0x39bd(0x47)+_0x29baa1+_0x39bd(0x48)+_0x212a2c+')');try{switch(_0x29baa1){case _jwtStorageService[_0x39bd(0x49)][_0x39bd(0x4a)]:if(this[_0x39bd(0x26)][_0x39bd(0x4b)])console[_0x39bd(0x10)](_0x175610['hrOjR']),await this[_0x39bd(0x26)][_0x39bd(0x4b)]();else{if(_0x175610[_0x39bd(0x4c)]===_0x175610[_0x39bd(0x4c)])console[_0x39bd(0x4d)](_0x175610[_0x39bd(0x4e)]);else return this[_0x39bd(0x9)](_0x56aa52,{..._0x20be6e,'method':'POST','body':_0x5a4e2a});}break;case _jwtStorageService[_0x39bd(0x49)]['ONAIROS']:this[_0x39bd(0x26)][_0x39bd(0x4f)]?(console[_0x39bd(0x10)](_0x175610[_0x39bd(0x50)]),await this[_0x39bd(0x26)][_0x39bd(0x4f)]()):console['warn'](_0x39bd(0x51));break;case _jwtStorageService['TokenType'][_0x39bd(0x52)]:if(this[_0x39bd(0x26)]['triggerAuthTokenRefresh']){if(_0x175610[_0x39bd(0x53)](_0x175610[_0x39bd(0x54)],_0x39bd(0x55)))return{'success':![],'error':_0x2b8f5d['message']||_0x39bd(0x56)+_0x39d88f[_0x39bd(0x21)],'status':_0x341e81[_0x39bd(0x21)],'tokenType':_0x7e4592};else console[_0x39bd(0x10)](_0x39bd(0x57)),await this[_0x39bd(0x26)][_0x39bd(0x58)]();}else console[_0x39bd(0x4d)](_0x175610[_0x39bd(0x59)]);break;}}catch(_0x43aa0d){_0x175610[_0x39bd(0x5a)]===_0x175610[_0x39bd(0x5b)]?_0x48c480[_0x39bd(0x10)](_0x39bd(0x5c)+_0x3150ce+':\x20'+_0xc3b379[_0x39bd(0x5d)](0x0,0x14)+_0x39bd(0x5e)+_0x4a1620[_0x39bd(0x5f)]+')'):console[_0x39bd(0x2a)](_0x39bd(0x60)+_0x29baa1+':',_0x43aa0d);}}[_0x39bd(0x61)](_0x3bfd53,_0x2ff1d3){const _0x1b8baa={'eAYDn':function(_0x5146c2,_0x5ec53c){return _0x5146c2!==_0x5ec53c;},'NvVPa':function(_0x1216fe,_0x310e36){return _0x1216fe>_0x310e36;},'VSPgW':function(_0x39e2da,_0x2e38ea){return _0x39e2da===_0x2e38ea;},'PWjxV':_0x39bd(0x62),'noPkQ':_0x39bd(0x63),'KoOTT':'eEWwM','ArVlx':function(_0xf1cbdc,_0x321822){return _0xf1cbdc>_0x321822;},'AjXBY':_0x39bd(0x64),'TLGDA':'mulJW'};let _0x4c512c=0x0;for(const [_0x2d8476,_0x45a0e3]of activeRequests[_0x39bd(0x65)]()){if(_0x1b8baa['VSPgW'](_0x1b8baa[_0x39bd(0x66)],_0x39bd(0x62))){if(_0x2d8476!==_0x2ff1d3){if(_0x1b8baa['VSPgW'](_0x1b8baa['noPkQ'],_0x1b8baa['KoOTT'])){let _0x400c0c=0x0;for(const [_0x3873fb,_0x40f605]of _0x34273f[_0x39bd(0x65)]()){_0x1b8baa['eAYDn'](_0x3873fb,_0x2e2073)&&(_0x40f605[_0x39bd(0x67)](),_0x5adac5['delete'](_0x3873fb),_0x400c0c++);}_0x1b8baa[_0x39bd(0x68)](_0x400c0c,0x0)&&_0x503964[_0x39bd(0x10)]('🚫\x20[API\x20Client]\x20Cancelled\x20'+_0x400c0c+_0x39bd(0x33)+_0x280fe8+_0x39bd(0x69));}else _0x45a0e3[_0x39bd(0x67)](),activeRequests['delete'](_0x2d8476),_0x4c512c++;}}else return this[_0x39bd(0x9)](_0x54b5bf,{..._0x1cb75c,'method':'PUT','body':_0x7ebb33});}_0x1b8baa[_0x39bd(0x6a)](_0x4c512c,0x0)&&(_0x1b8baa['VSPgW'](_0x1b8baa[_0x39bd(0x6b)],_0x1b8baa['TLGDA'])?_0x5906b3[_0x39bd(0x4d)](_0x39bd(0x42)):console['log']('🚫\x20[API\x20Client]\x20Cancelled\x20'+_0x4c512c+_0x39bd(0x33)+_0x3bfd53+_0x39bd(0x69)));}async[_0x39bd(0x6c)](_0x169f4a,_0x14b78f){console[_0x39bd(0x10)]('🔄\x20[API\x20Client]\x20Replacing\x20'+_0x169f4a+_0x39bd(0x15)),this['cancelRequestsForTokenType'](_0x169f4a);const _0x166e54=await(0x0,_jwtStorageService[_0x39bd(0x6d)])(_0x169f4a,_0x14b78f);return _0x166e54&&console['log'](_0x39bd(0x6e)+_0x169f4a+_0x39bd(0x6f)),_0x166e54;}async['debugTokens'](){const _0x5830fc={'pwZeC':_0x39bd(0x70)};console[_0x39bd(0x10)](_0x5830fc['pwZeC']);const _0x5389c4=await(0x0,_jwtStorageService[_0x39bd(0x71)])();for(const [_0x36f9cb,_0x587ea7]of Object['entries'](_0x5389c4)){_0x587ea7?console[_0x39bd(0x10)](_0x39bd(0x5c)+_0x36f9cb+':\x20'+_0x587ea7[_0x39bd(0x5d)](0x0,0x14)+_0x39bd(0x5e)+_0x587ea7['length']+')'):console[_0x39bd(0x10)](_0x39bd(0x72)+_0x36f9cb+':\x20null');}return _0x5389c4;}['setAuthTriggers'](_0x45d924){const _0x23ca13={'PbbOw':_0x39bd(0x73)};this[_0x39bd(0x26)]={...this[_0x39bd(0x26)],..._0x45d924},console[_0x39bd(0x10)](_0x23ca13['PbbOw']);}async[_0x39bd(0x74)](_0x44ed3f,_0x53d6f6={}){return this[_0x39bd(0x9)](_0x44ed3f,{..._0x53d6f6,'method':'GET'});}async['post'](_0x5b0c05,_0x5c92c0,_0x9aa288={}){return this[_0x39bd(0x9)](_0x5b0c05,{..._0x9aa288,'method':'POST','body':_0x5c92c0});}async['put'](_0xd27f6b,_0xad1ac7,_0x30c698={}){return this[_0x39bd(0x9)](_0xd27f6b,{..._0x30c698,'method':'PUT','body':_0xad1ac7});}async[_0x39bd(0x24)](_0x1ce248,_0x1e72cc={}){return this[_0x39bd(0x9)](_0x1ce248,{..._0x1e72cc,'method':'DELETE'});}}exports[_0x39bd(0x6)]=ApiClient;function _0x39bd(_0xb0d79a,_0x39bd22){_0xb0d79a=_0xb0d79a-0x0;const _0x377e8d=_0xb0d7();let _0x3e3caa=_0x377e8d[_0xb0d79a];return _0x3e3caa;}const apiClient=exports[_0x39bd(0x75)]=new ApiClient(),authenticatedRequest=exports['authenticatedRequest']=apiClient[_0x39bd(0x9)][_0x39bd(0x76)](apiClient),apiGet=exports['apiGet']=apiClient['get'][_0x39bd(0x76)](apiClient),apiPost=exports[_0x39bd(0x4)]=apiClient[_0x39bd(0x77)][_0x39bd(0x76)](apiClient),apiPut=exports['apiPut']=apiClient[_0x39bd(0x78)][_0x39bd(0x76)](apiClient),apiDelete=exports[_0x39bd(0x5)]=apiClient[_0x39bd(0x24)][_0x39bd(0x76)](apiClient);var _default=exports[_0x39bd(0x79)]=apiClient;
|
|
8
|
+
function _0x5c4d(){const _0x3fa3da=['defineProperty','__esModule','default','authenticatedRequest','apiPut','apiPost','apiGet','apiDelete','apiClient','API_CONFIG','BASE_URL','baseUrl','authTriggers','request','OnairosSDK/1.0.0','deSwn','myhaX','iZjjV','AbortError','Request\x20cancelled','Unknown\x20error','getTokenTypeForRoute','🎯\x20[API\x20Client]\x20Route\x20','\x20requires\x20','\x20token','getRequestHeaders','requiresAuth','method','fNrsb','body','stringify','signal','log','Udvqr','\x20status:','SIdaG','status','json','delete','rEDit','GklyW','Request\x20failed\x20with\x20status\x20','iIRVT','XQJXT','hprly','KsEPY','qHmQr','eOfuZ','name','lalmV','🚫\x20[API\x20Client]\x20Request\x20','\x20was\x20cancelled','otpzy','error','❌\x20[API\x20Client]\x20Request\x20','\x20failed:','kOoOX','CfdLk','getJWTForRoute','ktLhC','\x20token\x20available\x20for\x20route\x20','.\x20Please\x20authenticate\x20first.','❌\x20[API\x20Client]\x20Failed\x20to\x20trigger\x20re-auth\x20for\x20','handle401Error','\x20received\x20401\x20for\x20','\x20token\x20on\x20route:\x20','🔄\x20[API\x20Client]\x20Clearing\x20','\x20token\x20due\x20to\x20401\x20error','clearJWT','cancelRequestsForTokenType','triggerReAuthForTokenType','🔑\x20[API\x20Client]\x20','\x20token\x20cleared,\x20user\x20needs\x20to\x20re-authenticate','\x20authentication\x20expired\x20for\x20','.\x20Please\x20re-authenticate.','vtIPi','ySmoI','🔄\x20[API\x20Client]\x20Triggering\x20auth\x20token\x20refresh','omOdR','⚠️\x20[API\x20Client]\x20No\x20auth\x20token\x20refresh\x20trigger\x20configured','🔄\x20[API\x20Client]\x20Triggering\x20re-auth\x20for\x20','\x20token\x20(endpoint:\x20','uKcuW','ENOCH','📧\x20[API\x20Client]\x20Triggering\x20Enoch\x20email\x20re-verification','triggerEnochReAuth','warn','⚠️\x20[API\x20Client]\x20No\x20Enoch\x20re-auth\x20trigger\x20configured','TokenType','triggerOnairosReAuth','Bangj','AUTH','triggerAuthTokenRefresh','Vgoit','usJps','SBWBK','Swmrw','hSkZG','AGbJq','KcUqL','📭\x20','alNzh','entries','XoBXw','🚫\x20[API\x20Client]\x20Cancelled\x20','\x20requests\x20due\x20to\x20','\x20token\x20failure','replaceTokenForType','🔄\x20[API\x20Client]\x20Replacing\x20','✅\x20[API\x20Client]\x20','\x20token\x20replaced\x20and\x20related\x20requests\x20cancelled','debugTokens','🔍\x20[API\x20Client]\x20Debug:\x20Current\x20token\x20status','wQuUc','nsmXW','getAllTokens','lMDaZ','🔐\x20','substring','...\x20(length:\x20','length','ehuVr','zQNLG',':\x20null','setAuthTriggers','🔧\x20[API\x20Client]\x20Authentication\x20triggers\x20updated','lfpSm','get','post','ApiClient','bind','put'];_0x5c4d=function(){return _0x3fa3da;};return _0x5c4d();}function _0x5ec0(_0x5c4d6e,_0x5ec07f){_0x5c4d6e=_0x5c4d6e-0x0;const _0x13d387=_0x5c4d();let _0x330149=_0x13d387[_0x5c4d6e];return _0x330149;}Object[_0x5ec0(0x0)](exports,_0x5ec0(0x1),{'value':!![]}),exports[_0x5ec0(0x2)]=exports[_0x5ec0(0x3)]=exports[_0x5ec0(0x4)]=exports[_0x5ec0(0x5)]=exports[_0x5ec0(0x6)]=exports[_0x5ec0(0x7)]=exports[_0x5ec0(0x8)]=exports['ApiClient']=void 0x0;var _jwtStorageService=__ONAIROS_REQ_FUNC__(0x0),_api=__ONAIROS_REQ_FUNC__(0x1);let currentRequestId=0x0;const activeRequests=new Map();class ApiClient{constructor(_0x4d51ec=_api[_0x5ec0(0x9)][_0x5ec0(0xa)],_0x3858e1={}){this[_0x5ec0(0xb)]=_0x4d51ec,this[_0x5ec0(0xc)]=_0x3858e1;}async[_0x5ec0(0xd)](_0x40bf75,_0x3b2af8={}){const _0x25812c={'KsEPY':'🔧\x20[API\x20Client]\x20Authentication\x20triggers\x20updated','fNrsb':_0x5ec0(0xe),'Udvqr':function(_0x4dc062,_0x9acb12,_0x5b336b){return _0x4dc062(_0x9acb12,_0x5b336b);},'SIdaG':function(_0x8660de,_0x25f116){return _0x8660de===_0x25f116;},'rEDit':_0x5ec0(0xf),'GklyW':_0x5ec0(0x10),'iIRVT':function(_0x3cc8fd,_0x41e9b2){return _0x3cc8fd===_0x41e9b2;},'hprly':_0x5ec0(0x11),'qHmQr':function(_0x621097,_0x592e70){return _0x621097 instanceof _0x592e70;},'eOfuZ':function(_0x1c3dc8,_0x3dae21){return _0x1c3dc8===_0x3dae21;},'lalmV':_0x5ec0(0x12),'otpzy':_0x5ec0(0x13),'kOoOX':_0x5ec0(0x14)},_0x207666=++currentRequestId,_0x531546=new AbortController();activeRequests['set'](_0x207666,_0x531546);try{console['log']('🔗\x20[API\x20Client]\x20Starting\x20request\x20'+_0x207666+'\x20to:\x20'+_0x40bf75);const _0x155a3e=(0x0,_jwtStorageService[_0x5ec0(0x15)])(_0x40bf75);console['log'](_0x5ec0(0x16)+_0x40bf75+_0x5ec0(0x17)+_0x155a3e+_0x5ec0(0x18));const _0x591165=await this[_0x5ec0(0x19)](_0x40bf75,_0x3b2af8[_0x5ec0(0x1a)]!==![]),_0x26520a={'method':_0x3b2af8[_0x5ec0(0x1b)]||'GET','headers':{'Content-Type':'application/json','User-Agent':_0x25812c[_0x5ec0(0x1c)],..._0x591165,..._0x3b2af8['headers']},'body':_0x3b2af8[_0x5ec0(0x1d)]?JSON[_0x5ec0(0x1e)](_0x3b2af8[_0x5ec0(0x1d)]):undefined,'signal':_0x531546[_0x5ec0(0x1f)]};console[_0x5ec0(0x20)]('🔐\x20[API\x20Client]\x20Request\x20'+_0x207666+'\x20using\x20'+_0x155a3e+'\x20token');const _0x4e3e21=await _0x25812c[_0x5ec0(0x21)](fetch,''+this[_0x5ec0(0xb)]+_0x40bf75,_0x26520a);console['log']('📡\x20[API\x20Client]\x20Response\x20'+_0x207666+_0x5ec0(0x22),_0x4e3e21['status']);if(_0x25812c[_0x5ec0(0x23)](_0x4e3e21[_0x5ec0(0x24)],0x191))return await this['handle401Error'](_0x207666,_0x40bf75,_0x155a3e,_0x3b2af8);const _0x54f236=await _0x4e3e21[_0x5ec0(0x25)]();activeRequests[_0x5ec0(0x26)](_0x207666);if(!_0x4e3e21['ok'])return _0x25812c[_0x5ec0(0x27)]===_0x25812c[_0x5ec0(0x28)]?this[_0x5ec0(0xd)](_0x1c9848,{..._0x2d3124,'method':'DELETE'}):{'success':![],'error':_0x54f236['message']||_0x5ec0(0x29)+_0x4e3e21['status'],'status':_0x4e3e21[_0x5ec0(0x24)],'tokenType':_0x155a3e};return{'success':!![],'data':_0x54f236,'status':_0x4e3e21['status'],'tokenType':_0x155a3e};}catch(_0x237c6f){if(_0x25812c[_0x5ec0(0x2a)](_0x5ec0(0x2b),_0x25812c[_0x5ec0(0x2c)]))this[_0x5ec0(0xc)]={...this['authTriggers'],..._0x332ca5},_0x2453d0[_0x5ec0(0x20)](_0x25812c[_0x5ec0(0x2d)]);else{activeRequests[_0x5ec0(0x26)](_0x207666);if(_0x25812c[_0x5ec0(0x2e)](_0x237c6f,Error)&&_0x25812c[_0x5ec0(0x2f)](_0x237c6f[_0x5ec0(0x30)],_0x25812c[_0x5ec0(0x31)]))return console[_0x5ec0(0x20)](_0x5ec0(0x32)+_0x207666+_0x5ec0(0x33)),{'success':![],'error':_0x25812c[_0x5ec0(0x34)],'status':0x0};return console[_0x5ec0(0x35)](_0x5ec0(0x36)+_0x207666+_0x5ec0(0x37),_0x237c6f),{'success':![],'error':_0x25812c['qHmQr'](_0x237c6f,Error)?_0x237c6f['message']:_0x25812c[_0x5ec0(0x38)],'status':0x0};}}}async['getRequestHeaders'](_0x392952,_0x2e7fdc){const _0x15429f={'ktLhC':_0x5ec0(0x39)};if(!_0x2e7fdc)return{};const _0x9c87c6=await(0x0,_jwtStorageService[_0x5ec0(0x3a)])(_0x392952);if(!_0x9c87c6){if(_0x15429f[_0x5ec0(0x3b)]===_0x15429f['ktLhC']){const _0x49296d=(0x0,_jwtStorageService[_0x5ec0(0x15)])(_0x392952);throw new Error('No\x20'+_0x49296d+_0x5ec0(0x3c)+_0x392952+_0x5ec0(0x3d));}else _0x684e47['error'](_0x5ec0(0x3e)+_0x44eb94+':',_0x44140d);}return{'Authorization':_0x9c87c6};}async[_0x5ec0(0x3f)](_0x2319ee,_0x4f0ac2,_0x5738f9,_0x78194d){return console[_0x5ec0(0x35)](_0x5ec0(0x32)+_0x2319ee+_0x5ec0(0x40)+_0x5738f9+_0x5ec0(0x41)+_0x4f0ac2),console[_0x5ec0(0x20)](_0x5ec0(0x42)+_0x5738f9+_0x5ec0(0x43)),await(0x0,_jwtStorageService[_0x5ec0(0x44)])(_0x5738f9),this[_0x5ec0(0x45)](_0x5738f9,_0x2319ee),await this[_0x5ec0(0x46)](_0x5738f9,_0x4f0ac2),console[_0x5ec0(0x20)](_0x5ec0(0x47)+_0x5738f9+_0x5ec0(0x48)),{'success':![],'error':_0x5738f9+_0x5ec0(0x49)+_0x4f0ac2+_0x5ec0(0x4a),'status':0x191,'tokenType':_0x5738f9};}async['triggerReAuthForTokenType'](_0x2deb2c,_0x24a554){const _0x269508={'Swmrw':function(_0x57ca8b,_0x3cf034){return _0x57ca8b instanceof _0x3cf034;},'Vgoit':function(_0xeff8b5,_0x3710db){return _0xeff8b5===_0x3710db;},'hSkZG':_0x5ec0(0x12),'AGbJq':_0x5ec0(0x13),'uKcuW':_0x5ec0(0x4b),'Bangj':'🔑\x20[API\x20Client]\x20Triggering\x20Onairos\x20re-authentication','dBHND':'⚠️\x20[API\x20Client]\x20No\x20Onairos\x20re-auth\x20trigger\x20configured','usJps':_0x5ec0(0x4c),'SBWBK':_0x5ec0(0x4d),'YFprh':function(_0x5af157,_0x339712){return _0x5af157!==_0x339712;},'KcUqL':_0x5ec0(0x4e),'alNzh':_0x5ec0(0x4f)};console[_0x5ec0(0x20)](_0x5ec0(0x50)+_0x2deb2c+_0x5ec0(0x51)+_0x24a554+')');try{if(_0x5ec0(0x4b)!==_0x269508[_0x5ec0(0x52)])return this[_0x5ec0(0xd)](_0x275c9d,{..._0xe73f9d,'method':'PUT','body':_0x59f825});else switch(_0x2deb2c){case _jwtStorageService['TokenType'][_0x5ec0(0x53)]:this[_0x5ec0(0xc)]['triggerEnochReAuth']?(console[_0x5ec0(0x20)](_0x5ec0(0x54)),await this[_0x5ec0(0xc)][_0x5ec0(0x55)]()):console[_0x5ec0(0x56)](_0x5ec0(0x57));break;case _jwtStorageService[_0x5ec0(0x58)]['ONAIROS']:this[_0x5ec0(0xc)][_0x5ec0(0x59)]?(console[_0x5ec0(0x20)](_0x269508[_0x5ec0(0x5a)]),await this['authTriggers'][_0x5ec0(0x59)]()):console['warn'](_0x269508['dBHND']);break;case _jwtStorageService[_0x5ec0(0x58)][_0x5ec0(0x5b)]:if(this[_0x5ec0(0xc)][_0x5ec0(0x5c)]){if(_0x269508[_0x5ec0(0x5d)](_0x269508[_0x5ec0(0x5e)],_0x269508[_0x5ec0(0x5e)]))console[_0x5ec0(0x20)](_0x269508[_0x5ec0(0x5f)]),await this[_0x5ec0(0xc)][_0x5ec0(0x5c)]();else{_0x239729[_0x5ec0(0x26)](_0x536faf);if(_0x269508[_0x5ec0(0x60)](_0x5c059f,_0x19a4f2)&&_0x269508[_0x5ec0(0x5d)](_0x596e64[_0x5ec0(0x30)],_0x269508[_0x5ec0(0x61)]))return _0x5ec8e8[_0x5ec0(0x20)](_0x5ec0(0x32)+_0x3cbd94+'\x20was\x20cancelled'),{'success':![],'error':_0x269508[_0x5ec0(0x62)],'status':0x0};return _0x5d4c22[_0x5ec0(0x35)](_0x5ec0(0x36)+_0x3cf0c7+'\x20failed:',_0x113607),{'success':![],'error':_0x42fa9c instanceof _0x291673?_0xb1e5b8['message']:_0x5ec0(0x14),'status':0x0};}}else _0x269508['YFprh'](_0x269508[_0x5ec0(0x63)],_0x269508[_0x5ec0(0x63)])?_0x1559b9[_0x5ec0(0x20)](_0x5ec0(0x64)+_0x4c6ec8+':\x20null'):console[_0x5ec0(0x56)](_0x269508[_0x5ec0(0x65)]);break;}}catch(_0xcf69b){console[_0x5ec0(0x35)](_0x5ec0(0x3e)+_0x2deb2c+':',_0xcf69b);}}['cancelRequestsForTokenType'](_0x3eacf4,_0x3b83fa){const _0x51d814={'OxuCj':function(_0x259af7,_0x59a600){return _0x259af7!==_0x59a600;},'XoBXw':function(_0x3ae7ab,_0x3711ec){return _0x3ae7ab>_0x3711ec;}};let _0x571717=0x0;for(const [_0x4da6a7,_0x491510]of activeRequests[_0x5ec0(0x66)]()){_0x51d814['OxuCj'](_0x4da6a7,_0x3b83fa)&&(_0x491510['abort'](),activeRequests[_0x5ec0(0x26)](_0x4da6a7),_0x571717++);}_0x51d814[_0x5ec0(0x67)](_0x571717,0x0)&&console[_0x5ec0(0x20)](_0x5ec0(0x68)+_0x571717+_0x5ec0(0x69)+_0x3eacf4+_0x5ec0(0x6a));}async[_0x5ec0(0x6b)](_0x1346c4,_0x305dc4){console['log'](_0x5ec0(0x6c)+_0x1346c4+_0x5ec0(0x18)),this[_0x5ec0(0x45)](_0x1346c4);const _0x3204d8=await(0x0,_jwtStorageService['replaceJWTAfterVerification'])(_0x1346c4,_0x305dc4);return _0x3204d8&&console[_0x5ec0(0x20)](_0x5ec0(0x6d)+_0x1346c4+_0x5ec0(0x6e)),_0x3204d8;}async[_0x5ec0(0x6f)](){const _0x21a53c={'iFtJE':_0x5ec0(0x70),'lMDaZ':_0x5ec0(0x71),'ehuVr':function(_0x2609fb,_0x41ee43){return _0x2609fb===_0x41ee43;},'zQNLG':_0x5ec0(0x72)};console[_0x5ec0(0x20)](_0x21a53c['iFtJE']);const _0x1dd79f=await(0x0,_jwtStorageService[_0x5ec0(0x73)])();for(const [_0x4ac31a,_0x16174e]of Object[_0x5ec0(0x66)](_0x1dd79f)){_0x16174e?_0x21a53c[_0x5ec0(0x74)]===_0x5ec0(0x71)?console[_0x5ec0(0x20)](_0x5ec0(0x75)+_0x4ac31a+':\x20'+_0x16174e[_0x5ec0(0x76)](0x0,0x14)+_0x5ec0(0x77)+_0x16174e[_0x5ec0(0x78)]+')'):_0x1835f6[_0x5ec0(0x20)](_0x5ec0(0x6d)+_0x4cc4e2+_0x5ec0(0x6e)):_0x21a53c[_0x5ec0(0x79)](_0x5ec0(0x72),_0x21a53c[_0x5ec0(0x7a)])?console[_0x5ec0(0x20)](_0x5ec0(0x64)+_0x4ac31a+_0x5ec0(0x7b)):_0x241299[_0x5ec0(0x20)](_0x5ec0(0x75)+_0x24825d+':\x20'+_0x4a84db[_0x5ec0(0x76)](0x0,0x14)+'...\x20(length:\x20'+_0x14996a[_0x5ec0(0x78)]+')');}return _0x1dd79f;}[_0x5ec0(0x7c)](_0x301e48){const _0x2e9856={'lfpSm':_0x5ec0(0x7d)};this[_0x5ec0(0xc)]={...this['authTriggers'],..._0x301e48},console[_0x5ec0(0x20)](_0x2e9856[_0x5ec0(0x7e)]);}async[_0x5ec0(0x7f)](_0x5d98c6,_0x4e5ee5={}){return this[_0x5ec0(0xd)](_0x5d98c6,{..._0x4e5ee5,'method':'GET'});}async[_0x5ec0(0x80)](_0x2c77bb,_0x3a819c,_0x2e7b08={}){return this[_0x5ec0(0xd)](_0x2c77bb,{..._0x2e7b08,'method':'POST','body':_0x3a819c});}async['put'](_0x5accbf,_0x2ff14c,_0x50bad8={}){return this[_0x5ec0(0xd)](_0x5accbf,{..._0x50bad8,'method':'PUT','body':_0x2ff14c});}async[_0x5ec0(0x26)](_0x176de0,_0x1d2f78={}){return this[_0x5ec0(0xd)](_0x176de0,{..._0x1d2f78,'method':'DELETE'});}}exports[_0x5ec0(0x81)]=ApiClient;const apiClient=exports[_0x5ec0(0x8)]=new ApiClient(),authenticatedRequest=exports['authenticatedRequest']=apiClient[_0x5ec0(0xd)][_0x5ec0(0x82)](apiClient),apiGet=exports[_0x5ec0(0x6)]=apiClient['get'][_0x5ec0(0x82)](apiClient),apiPost=exports[_0x5ec0(0x5)]=apiClient[_0x5ec0(0x80)][_0x5ec0(0x82)](apiClient),apiPut=exports['apiPut']=apiClient[_0x5ec0(0x83)][_0x5ec0(0x82)](apiClient),apiDelete=exports[_0x5ec0(0x7)]=apiClient[_0x5ec0(0x26)][_0x5ec0(0x82)](apiClient);var _default=exports[_0x5ec0(0x2)]=apiClient;
|
|
@@ -16,23 +16,23 @@ let ApiKeyType = exports.ApiKeyType = /*#__PURE__*/function (ApiKeyType) {
|
|
|
16
16
|
}({}); // JWT token storage key
|
|
17
17
|
const JWT_TOKEN_KEY = 'onairos_jwt_token';
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Two-Tier Authentication Service for Onairos React Native SDK
|
|
21
|
-
*
|
|
22
|
-
* This service implements the two-tier authentication system:
|
|
23
|
-
* 1. Developer API Keys: For app-level operations (email verification, app registration)
|
|
24
|
-
* 2. JWT User Tokens: For user-level operations (PIN storage, user profile)
|
|
25
|
-
*
|
|
26
|
-
* How it works:
|
|
27
|
-
* 1. Initialize with developer API key
|
|
28
|
-
* 2. Use API key for email verification requests
|
|
29
|
-
* 3. Store JWT token from email verification response
|
|
30
|
-
* 4. Use JWT token for user-authenticated requests
|
|
31
|
-
* 5. Handle token expiration gracefully
|
|
32
|
-
*
|
|
33
|
-
* Backend Integration:
|
|
34
|
-
* - Developer routes: Authorization: Bearer ${API_KEY}
|
|
35
|
-
* - User routes: Authorization: Bearer ${JWT_TOKEN}
|
|
19
|
+
/**
|
|
20
|
+
* Two-Tier Authentication Service for Onairos React Native SDK
|
|
21
|
+
*
|
|
22
|
+
* This service implements the two-tier authentication system:
|
|
23
|
+
* 1. Developer API Keys: For app-level operations (email verification, app registration)
|
|
24
|
+
* 2. JWT User Tokens: For user-level operations (PIN storage, user profile)
|
|
25
|
+
*
|
|
26
|
+
* How it works:
|
|
27
|
+
* 1. Initialize with developer API key
|
|
28
|
+
* 2. Use API key for email verification requests
|
|
29
|
+
* 3. Store JWT token from email verification response
|
|
30
|
+
* 4. Use JWT token for user-authenticated requests
|
|
31
|
+
* 5. Handle token expiration gracefully
|
|
32
|
+
*
|
|
33
|
+
* Backend Integration:
|
|
34
|
+
* - Developer routes: Authorization: Bearer ${API_KEY}
|
|
35
|
+
* - User routes: Authorization: Bearer ${JWT_TOKEN}
|
|
36
36
|
*/
|
|
37
37
|
|
|
38
38
|
// Global configuration state
|
|
@@ -44,9 +44,9 @@ let userToken = null;
|
|
|
44
44
|
// Cache duration (5 minutes)
|
|
45
45
|
const CACHE_DURATION = 5 * 60 * 1000;
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
* Check network connectivity
|
|
49
|
-
* @returns Promise<boolean> - true if connected, false otherwise
|
|
47
|
+
/**
|
|
48
|
+
* Check network connectivity
|
|
49
|
+
* @returns Promise<boolean> - true if connected, false otherwise
|
|
50
50
|
*/
|
|
51
51
|
const checkNetworkConnectivity = async () => {
|
|
52
52
|
try {
|
|
@@ -67,9 +67,9 @@ const API_ENDPOINTS = {
|
|
|
67
67
|
development: `${_api.API_CONFIG.BASE_URL}` // Fallback to production since dev-API server doesn't exist
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
/**
|
|
71
|
-
* Initialize the SDK with developer API key
|
|
72
|
-
* @param config API configuration including developer API key
|
|
70
|
+
/**
|
|
71
|
+
* Initialize the SDK with developer API key
|
|
72
|
+
* @param config API configuration including developer API key
|
|
73
73
|
*/
|
|
74
74
|
const initializeApiKey = async config => {
|
|
75
75
|
try {
|
|
@@ -154,10 +154,10 @@ const initializeApiKey = async config => {
|
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
-
/**
|
|
158
|
-
* Determine API key type
|
|
159
|
-
* @param apiKey The API key to check
|
|
160
|
-
* @returns The type of API key (only DEVELOPER or INVALID - admin keys not supported in client SDK)
|
|
157
|
+
/**
|
|
158
|
+
* Determine API key type
|
|
159
|
+
* @param apiKey The API key to check
|
|
160
|
+
* @returns The type of API key (only DEVELOPER or INVALID - admin keys not supported in client SDK)
|
|
161
161
|
*/
|
|
162
162
|
exports.initializeApiKey = initializeApiKey;
|
|
163
163
|
const getApiKeyType = apiKey => {
|
|
@@ -168,11 +168,11 @@ const getApiKeyType = apiKey => {
|
|
|
168
168
|
return ApiKeyType.INVALID;
|
|
169
169
|
};
|
|
170
170
|
|
|
171
|
-
/**
|
|
172
|
-
* Validate an API key with the Onairos backend
|
|
173
|
-
* All developer keys must be validated against the backend - no local bypass
|
|
174
|
-
* @param apiKey The API key to validate
|
|
175
|
-
* @returns Validation result with permissions and rate limits
|
|
171
|
+
/**
|
|
172
|
+
* Validate an API key with the Onairos backend
|
|
173
|
+
* All developer keys must be validated against the backend - no local bypass
|
|
174
|
+
* @param apiKey The API key to validate
|
|
175
|
+
* @returns Validation result with permissions and rate limits
|
|
176
176
|
*/
|
|
177
177
|
exports.getApiKeyType = getApiKeyType;
|
|
178
178
|
const validateApiKey = async apiKey => {
|
|
@@ -424,18 +424,18 @@ const validateApiKey = async apiKey => {
|
|
|
424
424
|
}
|
|
425
425
|
};
|
|
426
426
|
|
|
427
|
-
/**
|
|
428
|
-
* Get the current API configuration
|
|
429
|
-
* @returns Current API configuration or null if not initialized
|
|
427
|
+
/**
|
|
428
|
+
* Get the current API configuration
|
|
429
|
+
* @returns Current API configuration or null if not initialized
|
|
430
430
|
*/
|
|
431
431
|
exports.validateApiKey = validateApiKey;
|
|
432
432
|
const getApiConfig = () => {
|
|
433
433
|
return globalConfig;
|
|
434
434
|
};
|
|
435
435
|
|
|
436
|
-
/**
|
|
437
|
-
* Get the current API key
|
|
438
|
-
* @returns Current API key or null if not initialized
|
|
436
|
+
/**
|
|
437
|
+
* Get the current API key
|
|
438
|
+
* @returns Current API key or null if not initialized
|
|
439
439
|
*/
|
|
440
440
|
exports.getApiConfig = getApiConfig;
|
|
441
441
|
const getApiKey = () => {
|
|
@@ -443,18 +443,18 @@ const getApiKey = () => {
|
|
|
443
443
|
return ((_globalConfig9 = globalConfig) === null || _globalConfig9 === void 0 ? void 0 : _globalConfig9.apiKey) || null;
|
|
444
444
|
};
|
|
445
445
|
|
|
446
|
-
/**
|
|
447
|
-
* Check if the SDK is properly initialized
|
|
448
|
-
* @returns True if initialized with valid API key
|
|
446
|
+
/**
|
|
447
|
+
* Check if the SDK is properly initialized
|
|
448
|
+
* @returns True if initialized with valid API key
|
|
449
449
|
*/
|
|
450
450
|
exports.getApiKey = getApiKey;
|
|
451
451
|
const isApiKeyInitialized = () => {
|
|
452
452
|
return isInitialized && globalConfig !== null;
|
|
453
453
|
};
|
|
454
454
|
|
|
455
|
-
/**
|
|
456
|
-
* Store JWT token securely after email verification
|
|
457
|
-
* @param token JWT token from email verification response
|
|
455
|
+
/**
|
|
456
|
+
* Store JWT token securely after email verification
|
|
457
|
+
* @param token JWT token from email verification response
|
|
458
458
|
*/
|
|
459
459
|
exports.isApiKeyInitialized = isApiKeyInitialized;
|
|
460
460
|
const storeJWT = async token => {
|
|
@@ -471,9 +471,9 @@ const storeJWT = async token => {
|
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
473
|
|
|
474
|
-
/**
|
|
475
|
-
* Load JWT token from storage
|
|
476
|
-
* @returns JWT token or null if not found
|
|
474
|
+
/**
|
|
475
|
+
* Load JWT token from storage
|
|
476
|
+
* @returns JWT token or null if not found
|
|
477
477
|
*/
|
|
478
478
|
exports.storeJWT = storeJWT;
|
|
479
479
|
const loadJWT = async () => {
|
|
@@ -487,17 +487,17 @@ const loadJWT = async () => {
|
|
|
487
487
|
}
|
|
488
488
|
};
|
|
489
489
|
|
|
490
|
-
/**
|
|
491
|
-
* Get current JWT token
|
|
492
|
-
* @returns JWT token or null if not available
|
|
490
|
+
/**
|
|
491
|
+
* Get current JWT token
|
|
492
|
+
* @returns JWT token or null if not available
|
|
493
493
|
*/
|
|
494
494
|
exports.loadJWT = loadJWT;
|
|
495
495
|
const getJWT = () => {
|
|
496
496
|
return userToken;
|
|
497
497
|
};
|
|
498
498
|
|
|
499
|
-
/**
|
|
500
|
-
* Clear JWT token (on logout or token expiration)
|
|
499
|
+
/**
|
|
500
|
+
* Clear JWT token (on logout or token expiration)
|
|
501
501
|
*/
|
|
502
502
|
exports.getJWT = getJWT;
|
|
503
503
|
const clearJWT = async () => {
|
|
@@ -513,10 +513,10 @@ const clearJWT = async () => {
|
|
|
513
513
|
}
|
|
514
514
|
};
|
|
515
515
|
|
|
516
|
-
/**
|
|
517
|
-
* React Native compatible base64 decoder
|
|
518
|
-
* @param str Base64 encoded string
|
|
519
|
-
* @returns Decoded string
|
|
516
|
+
/**
|
|
517
|
+
* React Native compatible base64 decoder
|
|
518
|
+
* @param str Base64 encoded string
|
|
519
|
+
* @returns Decoded string
|
|
520
520
|
*/
|
|
521
521
|
exports.clearJWT = clearJWT;
|
|
522
522
|
const base64Decode = str => {
|
|
@@ -538,10 +538,10 @@ const base64Decode = str => {
|
|
|
538
538
|
return result;
|
|
539
539
|
};
|
|
540
540
|
|
|
541
|
-
/**
|
|
542
|
-
* Decode JWT token payload (React Native compatible)
|
|
543
|
-
* @param token JWT token string
|
|
544
|
-
* @returns Decoded payload or null if invalid
|
|
541
|
+
/**
|
|
542
|
+
* Decode JWT token payload (React Native compatible)
|
|
543
|
+
* @param token JWT token string
|
|
544
|
+
* @returns Decoded payload or null if invalid
|
|
545
545
|
*/
|
|
546
546
|
const decodeJWTPayload = token => {
|
|
547
547
|
try {
|
|
@@ -568,10 +568,10 @@ const decodeJWTPayload = token => {
|
|
|
568
568
|
}
|
|
569
569
|
};
|
|
570
570
|
|
|
571
|
-
/**
|
|
572
|
-
* Extract username from JWT token
|
|
573
|
-
* @param token JWT token (optional, uses stored token if not provided)
|
|
574
|
-
* @returns Username or null if not found
|
|
571
|
+
/**
|
|
572
|
+
* Extract username from JWT token
|
|
573
|
+
* @param token JWT token (optional, uses stored token if not provided)
|
|
574
|
+
* @returns Username or null if not found
|
|
575
575
|
*/
|
|
576
576
|
exports.decodeJWTPayload = decodeJWTPayload;
|
|
577
577
|
const extractUsernameFromJWT = token => {
|
|
@@ -599,10 +599,10 @@ const extractUsernameFromJWT = token => {
|
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
601
|
|
|
602
|
-
/**
|
|
603
|
-
* Extract user data from JWT token
|
|
604
|
-
* @param token JWT token (optional, uses stored token if not provided)
|
|
605
|
-
* @returns User data object or null if not found
|
|
602
|
+
/**
|
|
603
|
+
* Extract user data from JWT token
|
|
604
|
+
* @param token JWT token (optional, uses stored token if not provided)
|
|
605
|
+
* @returns User data object or null if not found
|
|
606
606
|
*/
|
|
607
607
|
exports.extractUsernameFromJWT = extractUsernameFromJWT;
|
|
608
608
|
const extractUserDataFromJWT = token => {
|
|
@@ -636,18 +636,18 @@ const extractUserDataFromJWT = token => {
|
|
|
636
636
|
}
|
|
637
637
|
};
|
|
638
638
|
|
|
639
|
-
/**
|
|
640
|
-
* Check if user is authenticated with JWT token
|
|
641
|
-
* @returns True if user has valid JWT token
|
|
639
|
+
/**
|
|
640
|
+
* Check if user is authenticated with JWT token
|
|
641
|
+
* @returns True if user has valid JWT token
|
|
642
642
|
*/
|
|
643
643
|
exports.extractUserDataFromJWT = extractUserDataFromJWT;
|
|
644
644
|
const isUserAuthenticated = () => {
|
|
645
645
|
return !!userToken;
|
|
646
646
|
};
|
|
647
647
|
|
|
648
|
-
/**
|
|
649
|
-
* Get authenticated headers for API requests
|
|
650
|
-
* @returns Headers object with Authorization and other required headers
|
|
648
|
+
/**
|
|
649
|
+
* Get authenticated headers for API requests
|
|
650
|
+
* @returns Headers object with Authorization and other required headers
|
|
651
651
|
*/
|
|
652
652
|
exports.isUserAuthenticated = isUserAuthenticated;
|
|
653
653
|
const getAuthHeaders = () => {
|
|
@@ -667,9 +667,9 @@ const getAuthHeaders = () => {
|
|
|
667
667
|
};
|
|
668
668
|
};
|
|
669
669
|
|
|
670
|
-
/**
|
|
671
|
-
* Get authentication headers for developer API requests
|
|
672
|
-
* @returns Headers with developer API key
|
|
670
|
+
/**
|
|
671
|
+
* Get authentication headers for developer API requests
|
|
672
|
+
* @returns Headers with developer API key
|
|
673
673
|
*/
|
|
674
674
|
exports.getAuthHeaders = getAuthHeaders;
|
|
675
675
|
const getDeveloperAuthHeaders = () => {
|
|
@@ -689,9 +689,9 @@ const getDeveloperAuthHeaders = () => {
|
|
|
689
689
|
};
|
|
690
690
|
};
|
|
691
691
|
|
|
692
|
-
/**
|
|
693
|
-
* Get authentication headers for user JWT requests
|
|
694
|
-
* @returns Headers with user JWT token
|
|
692
|
+
/**
|
|
693
|
+
* Get authentication headers for user JWT requests
|
|
694
|
+
* @returns Headers with user JWT token
|
|
695
695
|
*/
|
|
696
696
|
exports.getDeveloperAuthHeaders = getDeveloperAuthHeaders;
|
|
697
697
|
const getUserAuthHeaders = () => {
|
|
@@ -708,11 +708,11 @@ const getUserAuthHeaders = () => {
|
|
|
708
708
|
};
|
|
709
709
|
};
|
|
710
710
|
|
|
711
|
-
/**
|
|
712
|
-
* Make an authenticated API request
|
|
713
|
-
* @param endpoint The API endpoint (relative to base URL)
|
|
714
|
-
* @param options Fetch options
|
|
715
|
-
* @returns Response promise
|
|
711
|
+
/**
|
|
712
|
+
* Make an authenticated API request
|
|
713
|
+
* @param endpoint The API endpoint (relative to base URL)
|
|
714
|
+
* @param options Fetch options
|
|
715
|
+
* @returns Response promise
|
|
716
716
|
*/
|
|
717
717
|
exports.getUserAuthHeaders = getUserAuthHeaders;
|
|
718
718
|
const makeAuthenticatedRequest = async (endpoint, options = {}) => {
|
|
@@ -770,11 +770,11 @@ const makeAuthenticatedRequest = async (endpoint, options = {}) => {
|
|
|
770
770
|
}
|
|
771
771
|
};
|
|
772
772
|
|
|
773
|
-
/**
|
|
774
|
-
* Make authenticated request with developer API key
|
|
775
|
-
* @param endpoint The API endpoint
|
|
776
|
-
* @param options Fetch options
|
|
777
|
-
* @returns Response promise
|
|
773
|
+
/**
|
|
774
|
+
* Make authenticated request with developer API key
|
|
775
|
+
* @param endpoint The API endpoint
|
|
776
|
+
* @param options Fetch options
|
|
777
|
+
* @returns Response promise
|
|
778
778
|
*/
|
|
779
779
|
exports.makeAuthenticatedRequest = makeAuthenticatedRequest;
|
|
780
780
|
const makeDeveloperRequest = async (endpoint, options = {}) => {
|
|
@@ -832,11 +832,11 @@ const makeDeveloperRequest = async (endpoint, options = {}) => {
|
|
|
832
832
|
}
|
|
833
833
|
};
|
|
834
834
|
|
|
835
|
-
/**
|
|
836
|
-
* Make authenticated request with user JWT token
|
|
837
|
-
* @param endpoint The API endpoint
|
|
838
|
-
* @param options Fetch options
|
|
839
|
-
* @returns Response promise
|
|
835
|
+
/**
|
|
836
|
+
* Make authenticated request with user JWT token
|
|
837
|
+
* @param endpoint The API endpoint
|
|
838
|
+
* @param options Fetch options
|
|
839
|
+
* @returns Response promise
|
|
840
840
|
*/
|
|
841
841
|
exports.makeDeveloperRequest = makeDeveloperRequest;
|
|
842
842
|
const makeUserRequest = async (endpoint, options = {}) => {
|
|
@@ -898,8 +898,8 @@ const makeUserRequest = async (endpoint, options = {}) => {
|
|
|
898
898
|
}
|
|
899
899
|
};
|
|
900
900
|
|
|
901
|
-
/**
|
|
902
|
-
* Clear the API key validation cache
|
|
901
|
+
/**
|
|
902
|
+
* Clear the API key validation cache
|
|
903
903
|
*/
|
|
904
904
|
exports.makeUserRequest = makeUserRequest;
|
|
905
905
|
const clearValidationCache = () => {
|
|
@@ -910,8 +910,8 @@ const clearValidationCache = () => {
|
|
|
910
910
|
}
|
|
911
911
|
};
|
|
912
912
|
|
|
913
|
-
/**
|
|
914
|
-
* Reset the SDK initialization state
|
|
913
|
+
/**
|
|
914
|
+
* Reset the SDK initialization state
|
|
915
915
|
*/
|
|
916
916
|
exports.clearValidationCache = clearValidationCache;
|
|
917
917
|
const resetApiKeyService = () => {
|