@onairos/react-native 2.0.3 → 2.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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["types/index.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["types/index.d.ts"],"mappings":"","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onairos/react-native",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Onairos React Native SDK for social media authentication and AI model training",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@gorhom/bottom-sheet": "^4",
|
|
63
63
|
"@react-native-community/netinfo": "^9.0.0",
|
|
64
|
+
"axios": "^1.6.2",
|
|
64
65
|
"react-native-crypto-js": "^1.0.0",
|
|
65
66
|
"react-native-device-info": "^10.8.0",
|
|
66
67
|
"react-native-gesture-handler": "^2.0.0",
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
declare module '@onairos/react-native' {
|
|
2
|
+
import { Component } from 'react';
|
|
3
|
+
import { ViewStyle, TextStyle } from 'react-native';
|
|
4
|
+
|
|
5
|
+
export interface DataTier {
|
|
6
|
+
type: string;
|
|
7
|
+
descriptions: string;
|
|
8
|
+
reward: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface OnairosButtonProps {
|
|
12
|
+
returnLink?: string;
|
|
13
|
+
prefillUrl?: string;
|
|
14
|
+
AppName: string;
|
|
15
|
+
buttonType?: 'normal' | 'pill';
|
|
16
|
+
requestData?: {
|
|
17
|
+
Small: DataTier;
|
|
18
|
+
Medium: DataTier;
|
|
19
|
+
Large: DataTier;
|
|
20
|
+
};
|
|
21
|
+
buttonWidth?: number;
|
|
22
|
+
buttonHeight?: number;
|
|
23
|
+
hasStroke?: boolean;
|
|
24
|
+
enabled?: boolean;
|
|
25
|
+
buttonForm?: 'default' | 'login' | 'signup';
|
|
26
|
+
onRejection?: () => void;
|
|
27
|
+
onResolved?: (apiUrl: string, token: string, userData: any) => void;
|
|
28
|
+
preCheck?: () => Promise<boolean>;
|
|
29
|
+
color?: string;
|
|
30
|
+
swerv?: boolean;
|
|
31
|
+
debug?: boolean;
|
|
32
|
+
preferredPlatform?: string;
|
|
33
|
+
testMode?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface UniversalOnboardingProps {
|
|
37
|
+
visible: boolean;
|
|
38
|
+
onClose: () => void;
|
|
39
|
+
AppName: string;
|
|
40
|
+
requestData?: {
|
|
41
|
+
Small: DataTier;
|
|
42
|
+
Medium: DataTier;
|
|
43
|
+
Large: DataTier;
|
|
44
|
+
};
|
|
45
|
+
returnLink?: string;
|
|
46
|
+
onComplete: (apiUrl: string, token: string, userData: any) => void;
|
|
47
|
+
preferredPlatform?: string;
|
|
48
|
+
debug?: boolean;
|
|
49
|
+
test?: boolean;
|
|
50
|
+
embedd?: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface ConnectionStatus {
|
|
54
|
+
[key: string]: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface PlatformListProps {
|
|
58
|
+
connections: ConnectionStatus;
|
|
59
|
+
onToggle: (platform: string, connect: boolean) => Promise<void>;
|
|
60
|
+
isLoading: boolean;
|
|
61
|
+
canProceed: boolean;
|
|
62
|
+
onProceed: () => void;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface PinInputProps {
|
|
66
|
+
onSubmit: (pin: string) => void;
|
|
67
|
+
minLength?: number;
|
|
68
|
+
requireSpecialChar?: boolean;
|
|
69
|
+
requireNumber?: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface TrainingModalProps {
|
|
73
|
+
progress: number;
|
|
74
|
+
eta: string;
|
|
75
|
+
onCancel: () => void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface OAuthWebViewProps {
|
|
79
|
+
url: string;
|
|
80
|
+
platform: string;
|
|
81
|
+
onComplete: () => void;
|
|
82
|
+
onClose: () => void;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface CredentialsResult {
|
|
86
|
+
isValid: boolean;
|
|
87
|
+
credentials?: {
|
|
88
|
+
username?: string;
|
|
89
|
+
userPin?: string;
|
|
90
|
+
accessToken?: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface PlatformConfig {
|
|
95
|
+
name: string;
|
|
96
|
+
icon: string;
|
|
97
|
+
color: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface ApiResponse<T> {
|
|
102
|
+
success: boolean;
|
|
103
|
+
data?: T;
|
|
104
|
+
error?: string;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export class OnairosButton extends Component<OnairosButtonProps> {}
|
|
108
|
+
export class UniversalOnboarding extends Component<UniversalOnboardingProps> {}
|
|
109
|
+
export class PlatformList extends Component<PlatformListProps> {}
|
|
110
|
+
export class PinInput extends Component<PinInputProps> {}
|
|
111
|
+
export class TrainingModal extends Component<TrainingModalProps> {}
|
|
112
|
+
export class OAuthWebView extends Component<OAuthWebViewProps> {}
|
|
113
|
+
}
|