@onairos/react-native 3.0.0 → 3.0.1
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/lib/commonjs/components/OnairosButton.js +2 -2
- package/lib/commonjs/components/OnairosButton.js.map +1 -1
- package/lib/commonjs/index.js +367 -12
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/services/oauthService.js +101 -192
- package/lib/commonjs/services/oauthService.js.map +1 -1
- package/lib/module/components/OnairosButton.js +1 -1
- package/lib/module/components/OnairosButton.js.map +1 -1
- package/lib/module/index.js +11 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/oauthService.js +83 -192
- package/lib/module/services/oauthService.js.map +1 -1
- package/package.json +1 -1
- package/src/components/OnairosButton.tsx +1 -1
- package/src/index.ts +1 -2
- package/src/services/oauthService.ts +419 -534
- package/src/types/index.ts +5 -0
|
@@ -58,7 +58,7 @@ const OnairosButton = ({
|
|
|
58
58
|
const credentials = await (0, _secureStorage.getCredentials)();
|
|
59
59
|
if (!credentials || !credentials.username || !credentials.userPin) {
|
|
60
60
|
// Invalid credentials, clear and start fresh
|
|
61
|
-
await (0, _secureStorage.
|
|
61
|
+
await (0, _secureStorage.deleteCredentials)();
|
|
62
62
|
setShowOnboarding(true);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
@@ -67,7 +67,7 @@ const OnairosButton = ({
|
|
|
67
67
|
const isValid = await _api.onairosApi.validateCredentials(credentials.username);
|
|
68
68
|
if (!isValid) {
|
|
69
69
|
// Clear invalid credentials
|
|
70
|
-
await (0, _secureStorage.
|
|
70
|
+
await (0, _secureStorage.deleteCredentials)();
|
|
71
71
|
setShowOnboarding(true);
|
|
72
72
|
return;
|
|
73
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_UniversalOnboarding","_Overlay","_secureStorage","_api","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","OnairosButton","returnLink","prefillUrl","AppName","buttonType","requestData","buttonWidth","buttonHeight","hasStroke","enabled","buttonForm","onRejection","onResolved","preCheck","color","swerv","debug","preferredPlatform","testMode","showOnboarding","setShowOnboarding","useState","showOverlay","setShowOverlay","storedCredentials","setStoredCredentials","isLoading","setIsLoading","isDarkMode","handlePress","shouldProceed","hasStoredCreds","hasCredentials","credentials","getCredentials","username","userPin","clearCredentials","isValid","onairosApi","validateCredentials","error","console","Alert","alert","Error","message","handleOnboardingComplete","useCallback","apiUrl","token","data","handleOverlayResolved","buttonStyle","styles","button","pillButton","strokedButton","width","height","backgroundColor","darkButton","lightButton","swervButton","disabledButton","filter","Boolean","textStyle","buttonText","lightText","darkText","disabledText","createElement","View","TouchableOpacity","style","onPress","disabled","accessibilityLabel","ActivityIndicator","size","Fragment","Text","UniversalOnboarding","visible","onClose","onComplete","test","Overlay","modelKey","exports","StyleSheet","create","flexDirection","alignItems","justifyContent","paddingVertical","paddingHorizontal","borderRadius","borderWidth","borderColor","transform","rotate","opacity","fontSize","fontWeight","textAlign"],"sourceRoot":"..\\..\\..\\src","sources":["components/OnairosButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAWA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAGA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAAoC,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA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eAAQ,EAAC,KAAK,CAAC;EACrD,MAAM,CAACG,iBAAiB,EAAEC,oBAAoB,CAAC,GAAG,IAAAJ,eAAQ,EAAM,IAAI,CAAC;EACrE,MAAM,CAACK,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAN,eAAQ,EAAC,KAAK,CAAC;EAEjD,MAAMO,UAAU,GAAGd,KAAK,KAAK,OAAO,IAAK,CAACA,KAAK,IAAI,CAACN,SAAU;EAE9D,MAAMqB,WAAW,GAAG,MAAAA,CAAA,KAAY;IAC9B,IAAI,CAACpB,OAAO,IAAIiB,SAAS,EAAE;IAE3BC,YAAY,CAAC,IAAI,CAAC;IAElB,IAAI;MACF,IAAId,QAAQ,EAAE;QACZ,MAAMiB,aAAa,GAAG,MAAMjB,QAAQ,CAAC,CAAC;QACtC,IAAI,CAACiB,aAAa,EAAE;UAClBnB,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAG,4BAA4B,CAAC;UAC3C;QACF;MACF;;MAEA;MACA,MAAMoB,cAAc,GAAG,MAAM,IAAAC,6BAAc,EAAC,CAAC;MAE7C,IAAID,cAAc,EAAE;QAClB;QACA,MAAME,WAAW,GAAG,MAAM,IAAAC,6BAAc,EAAC,CAAC;QAE1C,IAAI,CAACD,WAAW,IAAI,CAACA,WAAW,CAACE,QAAQ,IAAI,CAACF,WAAW,CAACG,OAAO,EAAE;UACjE;UACA,MAAM,IAAAC
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_UniversalOnboarding","_Overlay","_secureStorage","_api","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","OnairosButton","returnLink","prefillUrl","AppName","buttonType","requestData","buttonWidth","buttonHeight","hasStroke","enabled","buttonForm","onRejection","onResolved","preCheck","color","swerv","debug","preferredPlatform","testMode","showOnboarding","setShowOnboarding","useState","showOverlay","setShowOverlay","storedCredentials","setStoredCredentials","isLoading","setIsLoading","isDarkMode","handlePress","shouldProceed","hasStoredCreds","hasCredentials","credentials","getCredentials","username","userPin","clearCredentials","isValid","onairosApi","validateCredentials","error","console","Alert","alert","Error","message","handleOnboardingComplete","useCallback","apiUrl","token","data","handleOverlayResolved","buttonStyle","styles","button","pillButton","strokedButton","width","height","backgroundColor","darkButton","lightButton","swervButton","disabledButton","filter","Boolean","textStyle","buttonText","lightText","darkText","disabledText","createElement","View","TouchableOpacity","style","onPress","disabled","accessibilityLabel","ActivityIndicator","size","Fragment","Text","UniversalOnboarding","visible","onClose","onComplete","test","Overlay","modelKey","exports","StyleSheet","create","flexDirection","alignItems","justifyContent","paddingVertical","paddingHorizontal","borderRadius","borderWidth","borderColor","transform","rotate","opacity","fontSize","fontWeight","textAlign"],"sourceRoot":"..\\..\\..\\src","sources":["components/OnairosButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAWA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAGA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAAoC,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,G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Q,EAAE;IACRxD,KAAK,EAAE;EACT,CAAC;EACDyD,YAAY,EAAE;IACZgC,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -3,16 +3,371 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
Onairos: true,
|
|
8
|
+
OnairosButton: true,
|
|
9
|
+
OnairosOverlay: true,
|
|
10
|
+
UniversalOnboarding: true,
|
|
11
|
+
ConnectorScreen: true,
|
|
12
|
+
PinCreationScreen: true,
|
|
13
|
+
LoadingScreen: true,
|
|
14
|
+
OAuthWebView: true,
|
|
15
|
+
PlatformConnector: true,
|
|
16
|
+
OnboardingHeader: true,
|
|
17
|
+
PinInput: true,
|
|
18
|
+
useCredentials: true,
|
|
19
|
+
useConnections: true,
|
|
20
|
+
storeCredentials: true,
|
|
21
|
+
getCredentials: true,
|
|
22
|
+
hasCredentials: true,
|
|
23
|
+
deleteCredentials: true,
|
|
24
|
+
updateCredentials: true,
|
|
25
|
+
generateDeviceUsername: true,
|
|
26
|
+
verifyCredentials: true,
|
|
27
|
+
validateCredentials: true,
|
|
28
|
+
createAccount: true,
|
|
29
|
+
authenticate: true,
|
|
30
|
+
refreshToken: true,
|
|
31
|
+
getPlatformData: true,
|
|
32
|
+
getUserProfile: true,
|
|
33
|
+
updatePlatformConnections: true,
|
|
34
|
+
rsaEncrypt: true,
|
|
35
|
+
sha256: true,
|
|
36
|
+
base64ToBuffer: true,
|
|
37
|
+
logDebug: true,
|
|
38
|
+
logError: true,
|
|
39
|
+
isDebugMode: true,
|
|
40
|
+
connectPlatform: true,
|
|
41
|
+
disconnectPlatform: true,
|
|
42
|
+
initializeOAuthService: true,
|
|
43
|
+
cleanupOAuthService: true,
|
|
44
|
+
storePlatformConnection: true,
|
|
45
|
+
OAuthService: true,
|
|
46
|
+
COLORS: true,
|
|
47
|
+
PLATFORMS: true,
|
|
48
|
+
API_ENDPOINTS: true,
|
|
49
|
+
STORAGE_KEYS: true,
|
|
50
|
+
PIN_REQUIREMENTS: true,
|
|
51
|
+
DEEP_LINK_CONFIG: true,
|
|
52
|
+
onairosApi: true
|
|
53
|
+
};
|
|
54
|
+
Object.defineProperty(exports, "API_ENDPOINTS", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _constants.API_ENDPOINTS;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "COLORS", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _constants.COLORS;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "ConnectorScreen", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _ConnectorScreen.ConnectorScreen;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "DEEP_LINK_CONFIG", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _constants.DEEP_LINK_CONFIG;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "LoadingScreen", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _LoadingScreen.LoadingScreen;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "OAuthService", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _oauthService.OAuthService;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "OAuthWebView", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _OAuthWebView.OAuthWebView;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "Onairos", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _Onairos.Onairos;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "OnairosButton", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _OnairosButton.OnairosButton;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "OnairosOverlay", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _Overlay.Overlay;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "OnboardingHeader", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _OnboardingHeader.OnboardingHeader;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "PIN_REQUIREMENTS", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _constants.PIN_REQUIREMENTS;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
Object.defineProperty(exports, "PLATFORMS", {
|
|
127
|
+
enumerable: true,
|
|
128
|
+
get: function () {
|
|
129
|
+
return _constants.PLATFORMS;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
Object.defineProperty(exports, "PinCreationScreen", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _PinCreationScreen.PinCreationScreen;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(exports, "PinInput", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function () {
|
|
141
|
+
return _PinInput.PinInput;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
Object.defineProperty(exports, "PlatformConnector", {
|
|
145
|
+
enumerable: true,
|
|
146
|
+
get: function () {
|
|
147
|
+
return _PlatformConnector.PlatformConnector;
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
Object.defineProperty(exports, "STORAGE_KEYS", {
|
|
151
|
+
enumerable: true,
|
|
152
|
+
get: function () {
|
|
153
|
+
return _constants.STORAGE_KEYS;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
Object.defineProperty(exports, "UniversalOnboarding", {
|
|
157
|
+
enumerable: true,
|
|
158
|
+
get: function () {
|
|
159
|
+
return _UniversalOnboarding.UniversalOnboarding;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
Object.defineProperty(exports, "authenticate", {
|
|
163
|
+
enumerable: true,
|
|
164
|
+
get: function () {
|
|
165
|
+
return _onairosApi.authenticate;
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
Object.defineProperty(exports, "base64ToBuffer", {
|
|
169
|
+
enumerable: true,
|
|
170
|
+
get: function () {
|
|
171
|
+
return _crypto.base64ToBuffer;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
Object.defineProperty(exports, "cleanupOAuthService", {
|
|
175
|
+
enumerable: true,
|
|
176
|
+
get: function () {
|
|
177
|
+
return _oauthService.cleanupOAuthService;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
Object.defineProperty(exports, "connectPlatform", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function () {
|
|
183
|
+
return _oauthService.connectPlatform;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
Object.defineProperty(exports, "createAccount", {
|
|
187
|
+
enumerable: true,
|
|
188
|
+
get: function () {
|
|
189
|
+
return _onairosApi.createAccount;
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
Object.defineProperty(exports, "deleteCredentials", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function () {
|
|
195
|
+
return _secureStorage.deleteCredentials;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(exports, "disconnectPlatform", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function () {
|
|
201
|
+
return _oauthService.disconnectPlatform;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "generateDeviceUsername", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function () {
|
|
207
|
+
return _secureStorage.generateDeviceUsername;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "getCredentials", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function () {
|
|
213
|
+
return _secureStorage.getCredentials;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "getPlatformData", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function () {
|
|
219
|
+
return _onairosApi.getPlatformData;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
Object.defineProperty(exports, "getUserProfile", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function () {
|
|
225
|
+
return _onairosApi.getUserProfile;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(exports, "hasCredentials", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function () {
|
|
231
|
+
return _secureStorage.hasCredentials;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "initializeOAuthService", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function () {
|
|
237
|
+
return _oauthService.initializeOAuthService;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
Object.defineProperty(exports, "isDebugMode", {
|
|
241
|
+
enumerable: true,
|
|
242
|
+
get: function () {
|
|
243
|
+
return _debugHelper.isDebugMode;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
Object.defineProperty(exports, "logDebug", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function () {
|
|
249
|
+
return _debugHelper.logDebug;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
Object.defineProperty(exports, "logError", {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function () {
|
|
255
|
+
return _debugHelper.logError;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(exports, "onairosApi", {
|
|
259
|
+
enumerable: true,
|
|
260
|
+
get: function () {
|
|
261
|
+
return _api.onairosApi;
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
Object.defineProperty(exports, "refreshToken", {
|
|
265
|
+
enumerable: true,
|
|
266
|
+
get: function () {
|
|
267
|
+
return _onairosApi.refreshToken;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
Object.defineProperty(exports, "rsaEncrypt", {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
get: function () {
|
|
273
|
+
return _crypto.rsaEncrypt;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
Object.defineProperty(exports, "sha256", {
|
|
277
|
+
enumerable: true,
|
|
278
|
+
get: function () {
|
|
279
|
+
return _crypto.sha256;
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
Object.defineProperty(exports, "storeCredentials", {
|
|
283
|
+
enumerable: true,
|
|
284
|
+
get: function () {
|
|
285
|
+
return _secureStorage.storeCredentials;
|
|
286
|
+
}
|
|
287
|
+
});
|
|
288
|
+
Object.defineProperty(exports, "storePlatformConnection", {
|
|
289
|
+
enumerable: true,
|
|
290
|
+
get: function () {
|
|
291
|
+
return _oauthService.storePlatformConnection;
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
Object.defineProperty(exports, "updateCredentials", {
|
|
295
|
+
enumerable: true,
|
|
296
|
+
get: function () {
|
|
297
|
+
return _secureStorage.updateCredentials;
|
|
298
|
+
}
|
|
299
|
+
});
|
|
300
|
+
Object.defineProperty(exports, "updatePlatformConnections", {
|
|
301
|
+
enumerable: true,
|
|
302
|
+
get: function () {
|
|
303
|
+
return _onairosApi.updatePlatformConnections;
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
Object.defineProperty(exports, "useConnections", {
|
|
307
|
+
enumerable: true,
|
|
308
|
+
get: function () {
|
|
309
|
+
return _useConnections.useConnections;
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
Object.defineProperty(exports, "useCredentials", {
|
|
313
|
+
enumerable: true,
|
|
314
|
+
get: function () {
|
|
315
|
+
return _useCredentials.useCredentials;
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
Object.defineProperty(exports, "validateCredentials", {
|
|
319
|
+
enumerable: true,
|
|
320
|
+
get: function () {
|
|
321
|
+
return _onairosApi.validateCredentials;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
Object.defineProperty(exports, "verifyCredentials", {
|
|
325
|
+
enumerable: true,
|
|
326
|
+
get: function () {
|
|
327
|
+
return _secureStorage.verifyCredentials;
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
var _Onairos = require("./components/Onairos");
|
|
331
|
+
var _OnairosButton = require("./components/OnairosButton");
|
|
332
|
+
var _Overlay = require("./components/Overlay");
|
|
333
|
+
var _UniversalOnboarding = require("./components/UniversalOnboarding");
|
|
334
|
+
var _ConnectorScreen = require("./components/screens/ConnectorScreen");
|
|
335
|
+
var _PinCreationScreen = require("./components/screens/PinCreationScreen");
|
|
336
|
+
var _LoadingScreen = require("./components/screens/LoadingScreen");
|
|
337
|
+
var _OAuthWebView = require("./components/onboarding/OAuthWebView");
|
|
338
|
+
var _PlatformConnector = require("./components/onboarding/PlatformConnector");
|
|
339
|
+
var _OnboardingHeader = require("./components/onboarding/OnboardingHeader");
|
|
340
|
+
var _PinInput = require("./components/onboarding/PinInput");
|
|
341
|
+
var _useCredentials = require("./hooks/useCredentials");
|
|
342
|
+
var _useConnections = require("./hooks/useConnections");
|
|
343
|
+
var _secureStorage = require("./utils/secureStorage");
|
|
344
|
+
Object.keys(_secureStorage).forEach(function (key) {
|
|
345
|
+
if (key === "default" || key === "__esModule") return;
|
|
346
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
347
|
+
if (key in exports && exports[key] === _secureStorage[key]) return;
|
|
348
|
+
Object.defineProperty(exports, key, {
|
|
349
|
+
enumerable: true,
|
|
350
|
+
get: function () {
|
|
351
|
+
return _secureStorage[key];
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
var _onairosApi = require("./utils/onairosApi");
|
|
356
|
+
var _crypto = require("./utils/crypto");
|
|
357
|
+
var _debugHelper = require("./utils/debugHelper");
|
|
358
|
+
var _oauthService = require("./services/oauthService");
|
|
359
|
+
var _constants = require("./constants");
|
|
360
|
+
var _api = require("./api");
|
|
361
|
+
var _encryption = require("./utils/encryption");
|
|
362
|
+
Object.keys(_encryption).forEach(function (key) {
|
|
363
|
+
if (key === "default" || key === "__esModule") return;
|
|
364
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
365
|
+
if (key in exports && exports[key] === _encryption[key]) return;
|
|
366
|
+
Object.defineProperty(exports, key, {
|
|
367
|
+
enumerable: true,
|
|
368
|
+
get: function () {
|
|
369
|
+
return _encryption[key];
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
});
|
|
18
373
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_OnairosButton","
|
|
1
|
+
{"version":3,"names":["_Onairos","require","_OnairosButton","_Overlay","_UniversalOnboarding","_ConnectorScreen","_PinCreationScreen","_LoadingScreen","_OAuthWebView","_PlatformConnector","_OnboardingHeader","_PinInput","_useCredentials","_useConnections","_secureStorage","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_onairosApi","_crypto","_debugHelper","_oauthService","_constants","_api","_encryption"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":";;;;;;;;;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