@onairos/react-native 3.0.1 → 3.0.4
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 +23 -3
- package/lib/commonjs/api/index.js +109 -86
- package/lib/commonjs/api/index.js.map +1 -1
- package/lib/commonjs/components/OnairosButton.js +20 -13
- package/lib/commonjs/components/OnairosButton.js.map +1 -1
- package/lib/commonjs/components/Overlay.js +260 -108
- package/lib/commonjs/components/Overlay.js.map +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +30 -0
- package/lib/commonjs/components/UniversalOnboarding.js.map +1 -1
- package/lib/commonjs/components/onboarding/OAuthWebView.js +28 -9
- package/lib/commonjs/components/onboarding/OAuthWebView.js.map +1 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js +6 -1
- package/lib/commonjs/components/onboarding/PlatformConnector.js.map +1 -1
- package/lib/commonjs/components/screens/ConnectorScreen.js +3 -2
- package/lib/commonjs/components/screens/ConnectorScreen.js.map +1 -1
- package/lib/commonjs/constants/index.js +1 -1
- package/lib/commonjs/hooks/useConnections.js +77 -15
- package/lib/commonjs/hooks/useConnections.js.map +1 -1
- package/lib/commonjs/hooks/useCredentials.js +2 -0
- package/lib/commonjs/hooks/useCredentials.js.map +1 -1
- package/lib/commonjs/index.js +38 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/services/oauthService.js +26 -51
- package/lib/commonjs/services/oauthService.js.map +1 -1
- package/lib/commonjs/types/ambient.d.js +2 -0
- package/lib/commonjs/types/ambient.d.js.map +1 -0
- package/lib/commonjs/types/node-fix.d.js +2 -0
- package/lib/commonjs/types/node-fix.d.js.map +1 -0
- package/lib/commonjs/types/node-override.d.js +2 -0
- package/lib/commonjs/types/node-override.d.js.map +1 -0
- package/lib/commonjs/types/types.d.js +2 -0
- package/lib/commonjs/types/types.d.js.map +1 -0
- package/lib/commonjs/utils/encryption.js +8 -2
- package/lib/commonjs/utils/encryption.js.map +1 -1
- package/lib/commonjs/utils/secureStorage.js +148 -42
- package/lib/commonjs/utils/secureStorage.js.map +1 -1
- package/lib/module/api/index.js +109 -86
- package/lib/module/api/index.js.map +1 -1
- package/lib/module/components/OnairosButton.js +21 -14
- package/lib/module/components/OnairosButton.js.map +1 -1
- package/lib/module/components/Overlay.js +260 -110
- package/lib/module/components/Overlay.js.map +1 -1
- package/lib/module/components/UniversalOnboarding.js +31 -1
- package/lib/module/components/UniversalOnboarding.js.map +1 -1
- package/lib/module/components/onboarding/OAuthWebView.js +28 -9
- package/lib/module/components/onboarding/OAuthWebView.js.map +1 -1
- package/lib/module/components/onboarding/PlatformConnector.js +6 -1
- package/lib/module/components/onboarding/PlatformConnector.js.map +1 -1
- package/lib/module/components/screens/ConnectorScreen.js +3 -2
- package/lib/module/components/screens/ConnectorScreen.js.map +1 -1
- package/lib/module/constants/index.js +1 -1
- package/lib/module/hooks/useConnections.js +77 -14
- package/lib/module/hooks/useConnections.js.map +1 -1
- package/lib/module/hooks/useCredentials.js +2 -0
- package/lib/module/hooks/useCredentials.js.map +1 -1
- package/lib/module/index.js +27 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/oauthService.js +26 -33
- package/lib/module/services/oauthService.js.map +1 -1
- package/lib/module/types/ambient.d.js +2 -0
- package/lib/module/types/ambient.d.js.map +1 -0
- package/lib/module/types/node-fix.d.js +2 -0
- package/lib/module/types/node-fix.d.js.map +1 -0
- package/lib/module/types/node-override.d.js +2 -0
- package/lib/module/types/node-override.d.js.map +1 -0
- package/lib/module/types/types.d.js +2 -0
- package/lib/module/types/types.d.js.map +1 -0
- package/lib/module/utils/encryption.js +8 -2
- package/lib/module/utils/encryption.js.map +1 -1
- package/lib/module/utils/secureStorage.js +149 -42
- package/lib/module/utils/secureStorage.js.map +1 -1
- package/lib/typescript/api/index.d.ts +8 -0
- package/lib/typescript/api/index.d.ts.map +1 -0
- package/lib/typescript/components/DataRequestModal.d.ts +11 -0
- package/lib/typescript/components/DataRequestModal.d.ts.map +1 -0
- package/lib/typescript/components/Onairos.d.ts +29 -0
- package/lib/typescript/components/Onairos.d.ts.map +1 -0
- package/lib/typescript/components/OnairosButton.d.ts +7 -0
- package/lib/typescript/components/OnairosButton.d.ts.map +1 -0
- package/lib/typescript/components/Overlay.d.ts +18 -0
- package/lib/typescript/components/Overlay.d.ts.map +1 -0
- package/lib/typescript/components/PinInput.d.ts +4 -0
- package/lib/typescript/components/PinInput.d.ts.map +1 -0
- package/lib/typescript/components/PlatformList.d.ts +4 -0
- package/lib/typescript/components/PlatformList.d.ts.map +1 -0
- package/lib/typescript/components/TrainingModal.d.ts +4 -0
- package/lib/typescript/components/TrainingModal.d.ts.map +1 -0
- package/lib/typescript/components/UniversalOnboarding.d.ts +4 -0
- package/lib/typescript/components/UniversalOnboarding.d.ts.map +1 -0
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts +4 -0
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +1 -0
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts +11 -0
- package/lib/typescript/components/onboarding/OnboardingHeader.d.ts.map +1 -0
- package/lib/typescript/components/onboarding/PinInput.d.ts +4 -0
- package/lib/typescript/components/onboarding/PinInput.d.ts.map +1 -0
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts +13 -0
- package/lib/typescript/components/onboarding/PlatformConnector.d.ts.map +1 -0
- package/lib/typescript/components/screens/ConnectorScreen.d.ts +9 -0
- package/lib/typescript/components/screens/ConnectorScreen.d.ts.map +1 -0
- package/lib/typescript/components/screens/LoadingScreen.d.ts +9 -0
- package/lib/typescript/components/screens/LoadingScreen.d.ts.map +1 -0
- package/lib/typescript/components/screens/PinCreationScreen.d.ts +10 -0
- package/lib/typescript/components/screens/PinCreationScreen.d.ts.map +1 -0
- package/lib/typescript/constants/index.d.ts +52 -0
- package/lib/typescript/constants/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useConnections.d.ts +9 -0
- package/lib/typescript/hooks/useConnections.d.ts.map +1 -0
- package/lib/typescript/hooks/useCredentials.d.ts +9 -0
- package/lib/typescript/hooks/useCredentials.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +45 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/services/oauthService.d.ts +50 -0
- package/lib/typescript/services/oauthService.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +145 -0
- package/lib/typescript/types/index.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +135 -0
- package/lib/typescript/types.d.ts.map +1 -0
- package/lib/typescript/utils/api.d.ts +6 -0
- package/lib/typescript/utils/api.d.ts.map +1 -0
- package/lib/typescript/utils/auth.d.ts +6 -0
- package/lib/typescript/utils/auth.d.ts.map +1 -0
- package/lib/typescript/utils/crypto.d.ts +4 -0
- package/lib/typescript/utils/crypto.d.ts.map +1 -0
- package/lib/typescript/utils/debugHelper.d.ts +29 -0
- package/lib/typescript/utils/debugHelper.d.ts.map +1 -0
- package/lib/typescript/utils/encryption.d.ts +19 -0
- package/lib/typescript/utils/encryption.d.ts.map +1 -0
- package/lib/typescript/utils/onairosApi.d.ts +72 -0
- package/lib/typescript/utils/onairosApi.d.ts.map +1 -0
- package/lib/typescript/utils/secureStorage.d.ts +63 -0
- package/lib/typescript/utils/secureStorage.d.ts.map +1 -0
- package/package.json +16 -4
- package/src/api/index.ts +86 -101
- package/src/components/OnairosButton.tsx +22 -14
- package/src/components/Overlay.tsx +303 -138
- package/src/components/UniversalOnboarding.tsx +25 -0
- package/src/components/onboarding/OAuthWebView.tsx +27 -7
- package/src/components/onboarding/PlatformConnector.tsx +5 -0
- package/src/components/screens/ConnectorScreen.tsx +3 -2
- package/src/constants/index.ts +81 -81
- package/src/hooks/useConnections.ts +76 -16
- package/src/hooks/useCredentials.ts +5 -1
- package/src/index.ts +30 -3
- package/src/services/oauthService.ts +412 -419
- package/src/types/ambient.d.ts +29 -0
- package/src/types/index.d.ts +48 -8
- package/src/types/index.ts +21 -15
- package/src/types/node-fix.d.ts +19 -0
- package/src/types/node-override.d.ts +24 -0
- package/src/types/types.d.ts +18 -0
- package/src/types.ts +121 -1
- package/src/utils/encryption.ts +7 -2
- package/src/utils/secureStorage.ts +155 -56
- package/types/index.d.ts +210 -0
- package/types/node-env.d.ts +15 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface OverlayProps {
|
|
3
|
+
data: {
|
|
4
|
+
[key: string]: {
|
|
5
|
+
type: string;
|
|
6
|
+
descriptions: string;
|
|
7
|
+
reward: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
username: string;
|
|
11
|
+
modelKey: string;
|
|
12
|
+
onResolved: (apiUrl: string, accessToken: string, loginDetails: any) => void;
|
|
13
|
+
appName?: string;
|
|
14
|
+
darkMode?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const Overlay: React.FC<OverlayProps>;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=Overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../src/components/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAkBxE,UAAU,YAAY;IACpB,IAAI,EAAE;QACJ,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,IAAI,EAAE,MAAM,CAAC;YACb,YAAY,EAAE,MAAM,CAAC;YACrB,MAAM,EAAE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA4O1C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PinInput.d.ts","sourceRoot":"","sources":["../../../src/components/PinInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAWrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0G5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformList.d.ts","sourceRoot":"","sources":["../../../src/components/PlatformList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA8DpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrainingModal.d.ts","sourceRoot":"","sources":["../../../src/components/TrainingModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6CtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UniversalOnboarding.d.ts","sourceRoot":"","sources":["../../../src/components/UniversalOnboarding.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAiBjF,OAAO,KAAK,EAAE,wBAAwB,EAAoB,MAAM,UAAU,CAAC;AAI3E,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAqKlE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OAuthWebView.d.ts","sourceRoot":"","sources":["../../../../src/components/onboarding/OAuthWebView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAKrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2EpD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface OnboardingHeaderProps {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
showBackButton?: boolean;
|
|
6
|
+
onBack?: () => void;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const OnboardingHeader: React.FC<OnboardingHeaderProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=OnboardingHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OnboardingHeader.d.ts","sourceRoot":"","sources":["../../../../src/components/onboarding/OnboardingHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAyB5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PinInput.d.ts","sourceRoot":"","sources":["../../../../src/components/onboarding/PinInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAahE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwO5C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ConnectionStatus } from '../../types';
|
|
3
|
+
interface PlatformConnectorProps {
|
|
4
|
+
connections: ConnectionStatus;
|
|
5
|
+
onConnect: (platform: string) => Promise<void>;
|
|
6
|
+
onDisconnect: (platform: string) => Promise<void>;
|
|
7
|
+
isLoading: boolean;
|
|
8
|
+
canProceed: boolean;
|
|
9
|
+
onProceed: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const PlatformConnector: React.FC<PlatformConnectorProps>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=PlatformConnector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformConnector.d.ts","sourceRoot":"","sources":["../../../../src/components/onboarding/PlatformConnector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAYxC,OAAO,KAAK,EAAE,gBAAgB,EAAkB,MAAM,aAAa,CAAC;AAEpE,UAAU,sBAAsB;IAC9B,WAAW,EAAE,gBAAgB,CAAC;IAC9B,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,YAAY,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AA8BD,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA2I9D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ConnectorScreenProps {
|
|
3
|
+
onComplete: () => void;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
AppName: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const ConnectorScreen: React.FC<ConnectorScreenProps>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ConnectorScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConnectorScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/ConnectorScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAQhE,UAAU,oBAAoB;IAC5B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmI1D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/LoadingScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkCtD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PinCreationScreenProps {
|
|
3
|
+
onComplete: () => void;
|
|
4
|
+
onBack: () => void;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
AppName: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const PinCreationScreen: React.FC<PinCreationScreenProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=PinCreationScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PinCreationScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/PinCreationScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAM3C,UAAU,sBAAsB;IAC9B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA8C9D,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { PlatformConfig } from '../types';
|
|
2
|
+
export declare const COLORS: {
|
|
3
|
+
primary: string;
|
|
4
|
+
headerBg: string;
|
|
5
|
+
text: {
|
|
6
|
+
primary: string;
|
|
7
|
+
secondary: string;
|
|
8
|
+
};
|
|
9
|
+
border: string;
|
|
10
|
+
success: string;
|
|
11
|
+
error: string;
|
|
12
|
+
instagram: string;
|
|
13
|
+
pinterest: string;
|
|
14
|
+
reddit: string;
|
|
15
|
+
youtube: string;
|
|
16
|
+
white: string;
|
|
17
|
+
black: string;
|
|
18
|
+
gray: string;
|
|
19
|
+
lightGray: string;
|
|
20
|
+
};
|
|
21
|
+
export declare const PLATFORMS: Record<string, PlatformConfig>;
|
|
22
|
+
export declare const API_ENDPOINTS: {
|
|
23
|
+
base: string;
|
|
24
|
+
oauth: {
|
|
25
|
+
instagram: string;
|
|
26
|
+
pinterest: string;
|
|
27
|
+
reddit: string;
|
|
28
|
+
youtube: string;
|
|
29
|
+
};
|
|
30
|
+
callback: {
|
|
31
|
+
instagram: string;
|
|
32
|
+
pinterest: string;
|
|
33
|
+
reddit: string;
|
|
34
|
+
youtube: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const STORAGE_KEYS: {
|
|
38
|
+
credentials: string;
|
|
39
|
+
connections: string;
|
|
40
|
+
};
|
|
41
|
+
export declare const PIN_REQUIREMENTS: {
|
|
42
|
+
minLength: number;
|
|
43
|
+
requireUppercase: boolean;
|
|
44
|
+
requireLowercase: boolean;
|
|
45
|
+
requireNumber: boolean;
|
|
46
|
+
requireSpecialChar: boolean;
|
|
47
|
+
};
|
|
48
|
+
export declare const DEEP_LINK_CONFIG: {
|
|
49
|
+
scheme: string;
|
|
50
|
+
host: string;
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAkBlB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAyBpD,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;;;;;;;;;;CAczB,CAAC;AAEF,eAAO,MAAM,YAAY;;;CAGxB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;CAM5B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ConnectionStatus } from '../types';
|
|
2
|
+
export declare const useConnections: () => {
|
|
3
|
+
isConnecting: boolean;
|
|
4
|
+
connectPlatform: (platform: string) => Promise<void>;
|
|
5
|
+
disconnectPlatform: (platform: string) => Promise<void>;
|
|
6
|
+
getConnectionStatus: () => Promise<ConnectionStatus>;
|
|
7
|
+
handleOAuthCallback: (platform: string, data: any) => Promise<boolean>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useConnections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConnections.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConnections.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAuBjD,eAAO,MAAM,cAAc;;gCAmD4B,MAAM;mCAqCH,MAAM;+BArFZ,QAAQ,gBAAgB,CAAC;oCAqGlB,MAAM,QAAQ,GAAG;CAuB3E,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CredentialsResult } from '../types';
|
|
2
|
+
export declare const useCredentials: () => {
|
|
3
|
+
hasCredentials: () => Promise<boolean>;
|
|
4
|
+
getCredentials: () => Promise<any>;
|
|
5
|
+
storeCredentials: (username: string, userPin: string, accessToken: string) => Promise<boolean>;
|
|
6
|
+
clearCredentials: () => Promise<void>;
|
|
7
|
+
validateCredentials: (username: string) => Promise<CredentialsResult>;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=useCredentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCredentials.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCredentials.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,eAAO,MAAM,cAAc;0BACoB,QAAQ,OAAO,CAAC;;iCA4BjD,MAAM,WACP,MAAM,eACF,MAAM,KAClB,QAAQ,OAAO,CAAC;4BAoB4B,QAAQ,IAAI,CAAC;oCAUH,MAAM,KAAG,QAAQ,iBAAiB,CAAC;CAgC7F,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Onairos React Native SDK
|
|
3
|
+
* A React Native implementation for Onairos personalized data integration
|
|
4
|
+
*/
|
|
5
|
+
export { Onairos } from './components/Onairos';
|
|
6
|
+
export { OnairosButton } from './components/OnairosButton';
|
|
7
|
+
export { Overlay as OnairosOverlay } from './components/Overlay';
|
|
8
|
+
export { UniversalOnboarding } from './components/UniversalOnboarding';
|
|
9
|
+
export { ConnectorScreen } from './components/screens/ConnectorScreen';
|
|
10
|
+
export { PinCreationScreen } from './components/screens/PinCreationScreen';
|
|
11
|
+
export { LoadingScreen } from './components/screens/LoadingScreen';
|
|
12
|
+
export { OAuthWebView } from './components/onboarding/OAuthWebView';
|
|
13
|
+
export { PlatformConnector } from './components/onboarding/PlatformConnector';
|
|
14
|
+
export { OnboardingHeader } from './components/onboarding/OnboardingHeader';
|
|
15
|
+
export { PinInput } from './components/onboarding/PinInput';
|
|
16
|
+
export { useCredentials } from './hooks/useCredentials';
|
|
17
|
+
export { useConnections } from './hooks/useConnections';
|
|
18
|
+
export { storeCredentials, getCredentials, hasCredentials, deleteCredentials, updateCredentials, generateDeviceUsername, verifyCredentials, } from './utils/secureStorage';
|
|
19
|
+
export { validateCredentials, createAccount, authenticate, refreshToken, getPlatformData, getUserProfile, updatePlatformConnections, } from './utils/onairosApi';
|
|
20
|
+
export { rsaEncrypt, sha256, base64ToBuffer, } from './utils/crypto';
|
|
21
|
+
export { logDebug, logError, isDebugMode, } from './utils/debugHelper';
|
|
22
|
+
export { connectPlatform, disconnectPlatform, initializeOAuthService, cleanupOAuthService, storePlatformConnection, } from './services/oauthService';
|
|
23
|
+
export type { OnairosButtonProps, DataTier, UniversalOnboardingProps, ConnectionStatus, PlatformListProps, PinInputProps, TrainingModalProps, OAuthWebViewProps, PlatformConfig, ApiResponse, CredentialsResult, OverlayProps, BiometricOptions, PinRequirements, } from './types';
|
|
24
|
+
export type { StorageOptions, OnairosCredentials } from './utils/secureStorage';
|
|
25
|
+
export type { OAuthConfig } from './services/oauthService';
|
|
26
|
+
export type { ApiErrorType, ApiError } from './utils/onairosApi';
|
|
27
|
+
export { COLORS, PLATFORMS, API_ENDPOINTS, STORAGE_KEYS, PIN_REQUIREMENTS, DEEP_LINK_CONFIG } from './constants';
|
|
28
|
+
export { onairosApi } from './api';
|
|
29
|
+
export { OAuthService } from './services/oauthService';
|
|
30
|
+
export * from './utils/secureStorage';
|
|
31
|
+
export * from './utils/encryption';
|
|
32
|
+
import * as React from 'react';
|
|
33
|
+
import type { OnairosButtonProps, UniversalOnboardingProps } from './types';
|
|
34
|
+
interface OverlayComponent extends React.FC<any> {
|
|
35
|
+
}
|
|
36
|
+
interface OnairosComponent extends React.FC<any> {
|
|
37
|
+
}
|
|
38
|
+
declare const components: {
|
|
39
|
+
Onairos: OnairosComponent;
|
|
40
|
+
OnairosButton: React.ComponentType<OnairosButtonProps>;
|
|
41
|
+
OnairosOverlay: OverlayComponent;
|
|
42
|
+
UniversalOnboarding: React.ComponentType<UniversalOnboardingProps>;
|
|
43
|
+
};
|
|
44
|
+
export default components;
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAGnE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAG5D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,iBAA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,gBAAiB,SAAQ,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC;CAAG;AACnD,UAAU,gBAAiB,SAAQ,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC;CAAG;AAGnD,QAAA,MAAM,UAAU;;;;;CAKf,CAAC;AAGF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { OnairosCredentials } from '../utils/secureStorage';
|
|
2
|
+
export interface OAuthConfig {
|
|
3
|
+
clientId: string;
|
|
4
|
+
redirectUri: string;
|
|
5
|
+
scope: string;
|
|
6
|
+
authorizationEndpoint: string;
|
|
7
|
+
tokenEndpoint: string;
|
|
8
|
+
responseType: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Initialize OAuth service handlers and listeners
|
|
12
|
+
*/
|
|
13
|
+
export declare const initializeOAuthService: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* Clean up OAuth service handlers and listeners
|
|
16
|
+
*/
|
|
17
|
+
export declare const cleanupOAuthService: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* Connect to a platform using OAuth
|
|
20
|
+
*/
|
|
21
|
+
export declare const connectPlatform: (platform: string) => Promise<any>;
|
|
22
|
+
/**
|
|
23
|
+
* Disconnect from a platform
|
|
24
|
+
*/
|
|
25
|
+
export declare const disconnectPlatform: (platform: string, credentials: OnairosCredentials) => Promise<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* Store platform connection data in user credentials
|
|
28
|
+
*/
|
|
29
|
+
export declare const storePlatformConnection: (platform: string, connectionData: any, credentials: OnairosCredentials) => Promise<boolean>;
|
|
30
|
+
export interface AuthorizationData {
|
|
31
|
+
accountName: string;
|
|
32
|
+
authUrl: string;
|
|
33
|
+
}
|
|
34
|
+
export interface PlatformConnectionResult {
|
|
35
|
+
success: boolean;
|
|
36
|
+
userName?: string;
|
|
37
|
+
error?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Service for handling OAuth connections to various platforms
|
|
41
|
+
*/
|
|
42
|
+
export declare const OAuthService: {
|
|
43
|
+
initializeOAuthService: () => void;
|
|
44
|
+
cleanupOAuthService: () => void;
|
|
45
|
+
connectPlatform: (platform: string) => Promise<any>;
|
|
46
|
+
disconnectPlatform: (platform: string, credentials: OnairosCredentials) => Promise<boolean>;
|
|
47
|
+
storePlatformConnection: (platform: string, connectionData: any, credentials: OnairosCredentials) => Promise<boolean>;
|
|
48
|
+
_apiBaseUrl: string;
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=oauthService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauthService.d.ts","sourceRoot":"","sources":["../../../src/services/oauthService.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAK/E,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB,EAAE,MAAM,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB;AA8CD;;GAEG;AACH,eAAO,MAAM,sBAAsB,QAAO,IAGzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAO,IAKtC,CAAC;AA0LF;;GAEG;AACH,eAAO,MAAM,eAAe,aAAc,MAAM,KAAG,QAAQ,GAAG,CAgC7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,aACnB,MAAM,eACH,kBAAkB,KAC9B,QAAQ,OAAO,CA0BjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,aACxB,MAAM,kBACA,GAAG,eACN,kBAAkB,KAC9B,QAAQ,OAAO,CAgDjB,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;kCArViB,IAAI;+BAQP,IAAI;gCAkMD,MAAM,KAAG,QAAQ,GAAG,CAAC;mCAsCnD,MAAM,eACH,kBAAkB,KAC9B,QAAQ,OAAO,CAAC;wCAgCP,MAAM,kBACA,GAAG,eACN,kBAAkB,KAC9B,QAAQ,OAAO,CAAC;;CAwElB,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export interface DataTier {
|
|
2
|
+
type: string;
|
|
3
|
+
descriptions: string;
|
|
4
|
+
reward: string;
|
|
5
|
+
}
|
|
6
|
+
export interface OnairosButtonProps {
|
|
7
|
+
returnLink?: string;
|
|
8
|
+
prefillUrl?: string;
|
|
9
|
+
AppName?: string;
|
|
10
|
+
buttonType?: 'normal' | 'pill';
|
|
11
|
+
requestData?: {
|
|
12
|
+
[key: string]: {
|
|
13
|
+
type: string;
|
|
14
|
+
descriptions: string;
|
|
15
|
+
reward: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
buttonWidth?: number | string;
|
|
19
|
+
buttonHeight?: number;
|
|
20
|
+
hasStroke?: boolean;
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
buttonForm?: 'default' | 'login' | 'signup';
|
|
23
|
+
onRejection?: (error?: string) => void;
|
|
24
|
+
onResolved?: (apiUrl: string, token: string, userData: any) => void;
|
|
25
|
+
preCheck?: () => Promise<boolean>;
|
|
26
|
+
color?: string;
|
|
27
|
+
swerv?: boolean;
|
|
28
|
+
debug?: boolean;
|
|
29
|
+
preferredPlatform?: string;
|
|
30
|
+
testMode?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface UniversalOnboardingProps {
|
|
33
|
+
visible: boolean;
|
|
34
|
+
onClose: () => void;
|
|
35
|
+
AppName: string;
|
|
36
|
+
requestData?: {
|
|
37
|
+
[key: string]: {
|
|
38
|
+
type: string;
|
|
39
|
+
descriptions: string;
|
|
40
|
+
reward: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
returnLink?: string;
|
|
44
|
+
onComplete: (apiUrl: string, token: string, userData: any) => void;
|
|
45
|
+
preferredPlatform?: string;
|
|
46
|
+
debug?: boolean;
|
|
47
|
+
test?: boolean;
|
|
48
|
+
embedd?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface ConnectionStatus {
|
|
51
|
+
[key: string]: {
|
|
52
|
+
userName: string;
|
|
53
|
+
connected: boolean;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface PlatformListProps {
|
|
57
|
+
connections: ConnectionStatus;
|
|
58
|
+
onToggle: (platform: string, connect: boolean) => Promise<void>;
|
|
59
|
+
isLoading: boolean;
|
|
60
|
+
canProceed: boolean;
|
|
61
|
+
onProceed: () => void;
|
|
62
|
+
}
|
|
63
|
+
export interface PinInputProps {
|
|
64
|
+
onSubmit: (pin: string) => void;
|
|
65
|
+
minLength?: number;
|
|
66
|
+
requireSpecialChar?: boolean;
|
|
67
|
+
requireNumber?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export interface TrainingModalProps {
|
|
70
|
+
progress: number;
|
|
71
|
+
eta: string;
|
|
72
|
+
onCancel: () => void;
|
|
73
|
+
}
|
|
74
|
+
export interface OAuthWebViewProps {
|
|
75
|
+
url: string;
|
|
76
|
+
platform: string;
|
|
77
|
+
onComplete: () => void;
|
|
78
|
+
onClose: () => void;
|
|
79
|
+
}
|
|
80
|
+
export interface PlatformConfig {
|
|
81
|
+
name: string;
|
|
82
|
+
icon: string;
|
|
83
|
+
color: string;
|
|
84
|
+
description?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface OnairosCredentials {
|
|
87
|
+
username: string;
|
|
88
|
+
accessToken?: string;
|
|
89
|
+
refreshToken?: string;
|
|
90
|
+
userPin?: string;
|
|
91
|
+
platforms?: {
|
|
92
|
+
instagram?: {
|
|
93
|
+
token: string;
|
|
94
|
+
username: string;
|
|
95
|
+
};
|
|
96
|
+
youtube?: {
|
|
97
|
+
token: string;
|
|
98
|
+
username: string;
|
|
99
|
+
};
|
|
100
|
+
pinterest?: {
|
|
101
|
+
token: string;
|
|
102
|
+
username: string;
|
|
103
|
+
};
|
|
104
|
+
reddit?: {
|
|
105
|
+
token: string;
|
|
106
|
+
username: string;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
createdAt: number;
|
|
110
|
+
}
|
|
111
|
+
export interface OverlayProps {
|
|
112
|
+
data: {
|
|
113
|
+
[key: string]: {
|
|
114
|
+
type: string;
|
|
115
|
+
descriptions: string;
|
|
116
|
+
reward: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
username: string;
|
|
120
|
+
modelKey: string;
|
|
121
|
+
onResolved: (apiUrl: string, accessToken: string, loginDetails: any) => void;
|
|
122
|
+
appName?: string;
|
|
123
|
+
darkMode?: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface BiometricOptions {
|
|
126
|
+
title: string;
|
|
127
|
+
subtitle?: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
cancelText?: string;
|
|
130
|
+
}
|
|
131
|
+
export interface PinRequirements {
|
|
132
|
+
minLength: number;
|
|
133
|
+
requireSpecialChar: boolean;
|
|
134
|
+
requireNumber: boolean;
|
|
135
|
+
}
|
|
136
|
+
export interface ApiResponse<T> {
|
|
137
|
+
success: boolean;
|
|
138
|
+
data?: T;
|
|
139
|
+
error?: string;
|
|
140
|
+
}
|
|
141
|
+
export interface CredentialsResult {
|
|
142
|
+
isValid: boolean;
|
|
143
|
+
credentials?: any;
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,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W,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,GAAG,CAAC;CACnB"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
export interface DataTier {
|
|
2
|
+
type: string;
|
|
3
|
+
descriptions: string;
|
|
4
|
+
reward: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UniversalOnboardingProps {
|
|
7
|
+
visible: boolean;
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
AppName: string;
|
|
10
|
+
requestData: {
|
|
11
|
+
Small: DataTier;
|
|
12
|
+
Medium: DataTier;
|
|
13
|
+
Large: DataTier;
|
|
14
|
+
};
|
|
15
|
+
returnLink: string;
|
|
16
|
+
onComplete: (apiUrl: string, token: string, data: any) => void;
|
|
17
|
+
embedd?: boolean;
|
|
18
|
+
debug?: boolean;
|
|
19
|
+
test?: boolean;
|
|
20
|
+
buttonType?: 'default' | 'pill';
|
|
21
|
+
buttonForm?: 'signup' | 'login';
|
|
22
|
+
preferredPlatform?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ConnectionStatus {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
userName: string;
|
|
27
|
+
connected: boolean;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface OnairosButtonProps {
|
|
31
|
+
returnLink?: string;
|
|
32
|
+
prefillUrl?: string;
|
|
33
|
+
AppName: string;
|
|
34
|
+
buttonType?: 'normal' | 'pill';
|
|
35
|
+
requestData?: {
|
|
36
|
+
Small: DataTier;
|
|
37
|
+
Medium: DataTier;
|
|
38
|
+
Large: DataTier;
|
|
39
|
+
};
|
|
40
|
+
buttonWidth?: number;
|
|
41
|
+
buttonHeight?: number;
|
|
42
|
+
hasStroke?: boolean;
|
|
43
|
+
enabled?: boolean;
|
|
44
|
+
buttonForm?: 'default' | 'login' | 'signup';
|
|
45
|
+
onRejection?: (error?: string) => void;
|
|
46
|
+
onResolved?: (apiUrl: string, token: string, userData: any) => void;
|
|
47
|
+
preCheck?: () => Promise<boolean>;
|
|
48
|
+
color?: string;
|
|
49
|
+
swerv?: boolean;
|
|
50
|
+
debug?: boolean;
|
|
51
|
+
preferredPlatform?: string;
|
|
52
|
+
testMode?: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface PlatformListProps {
|
|
55
|
+
platforms?: string[];
|
|
56
|
+
onSelect?: (platform: string) => void;
|
|
57
|
+
selectedPlatform?: string;
|
|
58
|
+
connections?: ConnectionStatus;
|
|
59
|
+
onToggle?: (platform: string, connect: boolean) => void;
|
|
60
|
+
isLoading?: boolean;
|
|
61
|
+
canProceed?: boolean;
|
|
62
|
+
onProceed?: () => void;
|
|
63
|
+
}
|
|
64
|
+
export interface PinInputProps {
|
|
65
|
+
onComplete?: (pin: string) => void;
|
|
66
|
+
length?: number;
|
|
67
|
+
secure?: boolean;
|
|
68
|
+
title?: string;
|
|
69
|
+
subtitle?: string;
|
|
70
|
+
verification?: boolean;
|
|
71
|
+
initialPin?: string;
|
|
72
|
+
onSubmit: (pin: string) => void;
|
|
73
|
+
minLength?: number;
|
|
74
|
+
requireSpecialChar?: boolean;
|
|
75
|
+
requireNumber?: boolean;
|
|
76
|
+
}
|
|
77
|
+
export interface TrainingModalProps {
|
|
78
|
+
visible: boolean;
|
|
79
|
+
onClose: () => void;
|
|
80
|
+
onComplete: () => void;
|
|
81
|
+
modelKey: string;
|
|
82
|
+
username: string;
|
|
83
|
+
progress?: number;
|
|
84
|
+
eta?: string;
|
|
85
|
+
onCancel?: () => void;
|
|
86
|
+
}
|
|
87
|
+
export interface OAuthWebViewProps {
|
|
88
|
+
url: string;
|
|
89
|
+
onClose: () => void;
|
|
90
|
+
onSuccess: (code: string) => void;
|
|
91
|
+
platform?: string;
|
|
92
|
+
onComplete?: () => void;
|
|
93
|
+
}
|
|
94
|
+
export interface PlatformConfig {
|
|
95
|
+
name: string;
|
|
96
|
+
icon: string;
|
|
97
|
+
color: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface ApiResponse<T> {
|
|
101
|
+
success: boolean;
|
|
102
|
+
data?: T;
|
|
103
|
+
error?: string;
|
|
104
|
+
publicKey?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface CredentialsResult {
|
|
107
|
+
success: boolean;
|
|
108
|
+
credentials?: any;
|
|
109
|
+
error?: string;
|
|
110
|
+
isValid?: boolean;
|
|
111
|
+
}
|
|
112
|
+
export interface OverlayProps {
|
|
113
|
+
data: {
|
|
114
|
+
[key: string]: {
|
|
115
|
+
type: string;
|
|
116
|
+
descriptions: string;
|
|
117
|
+
reward: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
username: string;
|
|
121
|
+
modelKey: string;
|
|
122
|
+
onResolved: (apiUrl: string, accessToken: string, loginDetails: any) => void;
|
|
123
|
+
}
|
|
124
|
+
export interface BiometricOptions {
|
|
125
|
+
enableBiometrics?: boolean;
|
|
126
|
+
biometricPrompt?: string;
|
|
127
|
+
}
|
|
128
|
+
export interface PinRequirements {
|
|
129
|
+
minLength: number;
|
|
130
|
+
requireUppercase: boolean;
|
|
131
|
+
requireLowercase: boolean;
|
|
132
|
+
requireNumber: boolean;
|
|
133
|
+
requireSpecialChar: boolean;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=types.d.ts.map
|