@oxyhq/services 5.7.5 → 5.8.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/README.md +76 -76
- package/lib/commonjs/core/index.js +177 -102
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +88 -29
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/createAuth.js +585 -7
- package/lib/commonjs/node/createAuth.js.map +1 -1
- package/lib/commonjs/node/index.js +38 -1
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/Avatar.js +15 -6
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +58 -13
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedSection.js +7 -1
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +322 -0
- package/lib/commonjs/ui/components/Header.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +23 -7
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.js +606 -546
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/components/internal/TextField.md +436 -0
- package/lib/commonjs/ui/context/OxyContext.js +122 -78
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +5 -2
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -6
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +241 -598
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +1151 -406
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +135 -237
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +246 -463
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +3 -3
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +808 -650
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +51 -72
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +11 -29
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +30 -303
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +4 -4
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +19 -31
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +7 -10
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +11 -5
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +11 -4
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +12 -0
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +337 -0
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +11 -0
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/module/core/index.js +177 -41
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +26 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/createAuth.js +584 -7
- package/lib/module/node/createAuth.js.map +1 -1
- package/lib/module/node/index.js +7 -1
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/Avatar.js +15 -6
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +59 -14
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/GroupedSection.js +7 -1
- package/lib/module/ui/components/GroupedSection.js.map +1 -1
- package/lib/module/ui/components/Header.js +317 -0
- package/lib/module/ui/components/Header.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +25 -9
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.js +607 -547
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/components/internal/TextField.md +436 -0
- package/lib/module/ui/context/OxyContext.js +121 -77
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +5 -2
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +1 -1
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -6
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +3 -3
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +242 -597
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +1152 -407
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +135 -237
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +248 -465
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +3 -3
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +809 -651
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +53 -74
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +11 -29
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +32 -305
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +5 -5
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +19 -31
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +7 -10
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +11 -5
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +11 -4
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +12 -0
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +332 -0
- package/lib/module/ui/styles/authStyles.js.map +1 -0
- package/lib/module/ui/styles/index.js +1 -0
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/typescript/core/index.d.ts +68 -24
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +13 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/node/createAuth.d.ts +112 -0
- package/lib/typescript/node/createAuth.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +2 -0
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/Avatar.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +6 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedSection.d.ts +6 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
- package/lib/typescript/ui/components/Header.d.ts +22 -0
- package/lib/typescript/ui/components/Header.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +1 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/TextField.d.ts +31 -16
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +5 -2
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +9 -2
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +5 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/styles/authStyles.d.ts +326 -0
- package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +1 -0
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/package.json +1 -4
- package/src/core/index.ts +195 -41
- package/src/index.ts +72 -4
- package/src/node/createAuth.ts +623 -7
- package/src/node/index.ts +19 -1
- package/src/ui/components/Avatar.tsx +11 -5
- package/src/ui/components/GroupedItem.tsx +57 -9
- package/src/ui/components/GroupedSection.tsx +12 -0
- package/src/ui/components/Header.tsx +364 -0
- package/src/ui/components/OxyProvider.tsx +31 -15
- package/src/ui/components/index.ts +1 -0
- package/src/ui/components/internal/GroupedPillButtons.tsx +1 -1
- package/src/ui/components/internal/TextField.md +436 -0
- package/src/ui/components/internal/TextField.tsx +720 -620
- package/src/ui/context/OxyContext.tsx +150 -63
- package/src/ui/hooks/useSessionSocket.ts +5 -2
- package/src/ui/navigation/OxyRouter.tsx +1 -1
- package/src/ui/navigation/types.ts +10 -2
- package/src/ui/screens/AccountCenterScreen.tsx +5 -5
- package/src/ui/screens/AccountManagementDemo.tsx +9 -9
- package/src/ui/screens/AccountOverviewScreen.tsx +265 -414
- package/src/ui/screens/AccountSettingsScreen.tsx +1165 -403
- package/src/ui/screens/AccountSwitcherScreen.tsx +158 -202
- package/src/ui/screens/AppInfoScreen.tsx +270 -497
- package/src/ui/screens/FeedbackScreen.tsx +3 -3
- package/src/ui/screens/PaymentGatewayScreen.tsx +668 -365
- package/src/ui/screens/ProfileScreen.tsx +5 -5
- package/src/ui/screens/RecoverAccountScreen.tsx +46 -74
- package/src/ui/screens/SessionManagementScreen.tsx +14 -22
- package/src/ui/screens/SignInScreen.tsx +27 -294
- package/src/ui/screens/SignUpScreen.tsx +5 -5
- package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -22
- package/src/ui/screens/internal/SignInUsernameStep.tsx +3 -10
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +2 -5
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +3 -4
- package/src/ui/stores/authStore.ts +12 -0
- package/src/ui/styles/authStyles.ts +352 -0
- package/src/ui/styles/index.ts +1 -0
- package/lib/commonjs/core/auth-manager.js +0 -440
- package/lib/commonjs/core/auth-manager.js.map +0 -1
- package/lib/commonjs/core/use-auth.js +0 -244
- package/lib/commonjs/core/use-auth.js.map +0 -1
- package/lib/module/core/auth-manager.js +0 -432
- package/lib/module/core/auth-manager.js.map +0 -1
- package/lib/module/core/use-auth.js +0 -235
- package/lib/module/core/use-auth.js.map +0 -1
- package/lib/typescript/core/auth-manager.d.ts +0 -136
- package/lib/typescript/core/auth-manager.d.ts.map +0 -1
- package/lib/typescript/core/use-auth.d.ts +0 -79
- package/lib/typescript/core/use-auth.d.ts.map +0 -1
- package/src/__tests__/middleware.test.ts +0 -105
- package/src/__tests__/setup.ts +0 -10
- package/src/__tests__/zero-config-auth.test.ts +0 -607
- package/src/core/auth-manager.ts +0 -500
- package/src/core/use-auth.tsx +0 -245
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createAuthStyles = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
const createAuthStyles = (colors, theme) => _reactNative.StyleSheet.create({
|
|
9
|
+
// Container styles
|
|
10
|
+
container: {
|
|
11
|
+
flex: 1
|
|
12
|
+
},
|
|
13
|
+
scrollContent: {
|
|
14
|
+
flexGrow: 1,
|
|
15
|
+
paddingHorizontal: 24,
|
|
16
|
+
paddingTop: 4,
|
|
17
|
+
paddingBottom: 20
|
|
18
|
+
},
|
|
19
|
+
stepContainer: {
|
|
20
|
+
flex: 1,
|
|
21
|
+
justifyContent: 'flex-start',
|
|
22
|
+
alignItems: 'flex-start'
|
|
23
|
+
},
|
|
24
|
+
// Header styles
|
|
25
|
+
modernHeader: {
|
|
26
|
+
alignItems: 'flex-start',
|
|
27
|
+
width: '100%',
|
|
28
|
+
marginBottom: 24
|
|
29
|
+
},
|
|
30
|
+
modernTitle: {
|
|
31
|
+
fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
|
|
32
|
+
fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
|
|
33
|
+
fontSize: 62,
|
|
34
|
+
lineHeight: 74.4,
|
|
35
|
+
// 62 * 1.2
|
|
36
|
+
marginBottom: 18,
|
|
37
|
+
textAlign: 'left',
|
|
38
|
+
letterSpacing: -1
|
|
39
|
+
},
|
|
40
|
+
modernSubtitle: {
|
|
41
|
+
fontSize: 18,
|
|
42
|
+
lineHeight: 24,
|
|
43
|
+
textAlign: 'left',
|
|
44
|
+
opacity: 0.8
|
|
45
|
+
},
|
|
46
|
+
welcomeTitle: {
|
|
47
|
+
fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
|
|
48
|
+
fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
|
|
49
|
+
fontSize: 42,
|
|
50
|
+
lineHeight: 50.4,
|
|
51
|
+
// 42 * 1.2
|
|
52
|
+
marginBottom: 12,
|
|
53
|
+
textAlign: 'left',
|
|
54
|
+
letterSpacing: -1
|
|
55
|
+
},
|
|
56
|
+
stepTitle: {
|
|
57
|
+
fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
|
|
58
|
+
fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
|
|
59
|
+
fontSize: 42,
|
|
60
|
+
lineHeight: 50.4,
|
|
61
|
+
// 42 * 1.2
|
|
62
|
+
marginBottom: 12,
|
|
63
|
+
textAlign: 'left',
|
|
64
|
+
letterSpacing: -1
|
|
65
|
+
},
|
|
66
|
+
// Info and error cards
|
|
67
|
+
modernInfoCard: {
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
alignItems: 'center',
|
|
70
|
+
padding: 16,
|
|
71
|
+
borderRadius: 16,
|
|
72
|
+
marginBottom: 24,
|
|
73
|
+
gap: 12,
|
|
74
|
+
width: '100%'
|
|
75
|
+
},
|
|
76
|
+
modernInfoText: {
|
|
77
|
+
fontSize: 14,
|
|
78
|
+
flex: 1
|
|
79
|
+
},
|
|
80
|
+
modernErrorCard: {
|
|
81
|
+
flexDirection: 'row',
|
|
82
|
+
alignItems: 'center',
|
|
83
|
+
padding: 16,
|
|
84
|
+
borderRadius: 16,
|
|
85
|
+
marginBottom: 24,
|
|
86
|
+
gap: 12,
|
|
87
|
+
width: '100%'
|
|
88
|
+
},
|
|
89
|
+
errorText: {
|
|
90
|
+
fontSize: 14,
|
|
91
|
+
fontWeight: '500',
|
|
92
|
+
flex: 1
|
|
93
|
+
},
|
|
94
|
+
// Input styles
|
|
95
|
+
modernInputContainer: {
|
|
96
|
+
width: '100%',
|
|
97
|
+
marginBottom: 24
|
|
98
|
+
},
|
|
99
|
+
inputWrapper: {
|
|
100
|
+
flexDirection: 'row',
|
|
101
|
+
alignItems: 'center',
|
|
102
|
+
height: 56,
|
|
103
|
+
borderRadius: 16,
|
|
104
|
+
paddingHorizontal: 20,
|
|
105
|
+
borderWidth: 2,
|
|
106
|
+
backgroundColor: colors.inputBackground
|
|
107
|
+
},
|
|
108
|
+
premiumInputWrapper: {
|
|
109
|
+
flexDirection: 'row',
|
|
110
|
+
alignItems: 'center',
|
|
111
|
+
height: 56,
|
|
112
|
+
borderRadius: 16,
|
|
113
|
+
paddingHorizontal: 20,
|
|
114
|
+
borderWidth: 2,
|
|
115
|
+
backgroundColor: colors.inputBackground
|
|
116
|
+
},
|
|
117
|
+
inputIcon: {
|
|
118
|
+
marginRight: 12
|
|
119
|
+
},
|
|
120
|
+
inputContent: {
|
|
121
|
+
flex: 1
|
|
122
|
+
},
|
|
123
|
+
modernInput: {
|
|
124
|
+
flex: 1,
|
|
125
|
+
fontSize: 16,
|
|
126
|
+
height: '100%'
|
|
127
|
+
},
|
|
128
|
+
passwordToggle: {
|
|
129
|
+
padding: 4
|
|
130
|
+
},
|
|
131
|
+
// Validation styles
|
|
132
|
+
validationIndicator: {
|
|
133
|
+
marginLeft: 8
|
|
134
|
+
},
|
|
135
|
+
validationSuccessCard: {
|
|
136
|
+
flexDirection: 'row',
|
|
137
|
+
alignItems: 'center',
|
|
138
|
+
padding: 12,
|
|
139
|
+
borderRadius: 12,
|
|
140
|
+
marginTop: 8,
|
|
141
|
+
gap: 8
|
|
142
|
+
},
|
|
143
|
+
validationErrorCard: {
|
|
144
|
+
flexDirection: 'row',
|
|
145
|
+
alignItems: 'center',
|
|
146
|
+
padding: 12,
|
|
147
|
+
borderRadius: 12,
|
|
148
|
+
marginTop: 8,
|
|
149
|
+
gap: 8
|
|
150
|
+
},
|
|
151
|
+
validationCard: {
|
|
152
|
+
flexDirection: 'row',
|
|
153
|
+
alignItems: 'center',
|
|
154
|
+
padding: 12,
|
|
155
|
+
borderRadius: 12,
|
|
156
|
+
marginTop: 8,
|
|
157
|
+
gap: 8
|
|
158
|
+
},
|
|
159
|
+
validationText: {
|
|
160
|
+
fontSize: 12,
|
|
161
|
+
fontWeight: '500'
|
|
162
|
+
},
|
|
163
|
+
belowInputMessage: {
|
|
164
|
+
flexDirection: 'row',
|
|
165
|
+
alignItems: 'center',
|
|
166
|
+
marginTop: 4,
|
|
167
|
+
marginBottom: 0,
|
|
168
|
+
gap: 6
|
|
169
|
+
},
|
|
170
|
+
belowInputText: {
|
|
171
|
+
fontSize: 13,
|
|
172
|
+
fontWeight: '500'
|
|
173
|
+
},
|
|
174
|
+
// Button styles
|
|
175
|
+
modernButton: {
|
|
176
|
+
flexDirection: 'row',
|
|
177
|
+
alignItems: 'center',
|
|
178
|
+
justifyContent: 'center',
|
|
179
|
+
paddingVertical: 18,
|
|
180
|
+
paddingHorizontal: 32,
|
|
181
|
+
borderRadius: 16,
|
|
182
|
+
marginVertical: 8,
|
|
183
|
+
shadowOffset: {
|
|
184
|
+
width: 0,
|
|
185
|
+
height: 4
|
|
186
|
+
},
|
|
187
|
+
shadowOpacity: 0.3,
|
|
188
|
+
shadowRadius: 8,
|
|
189
|
+
elevation: 6,
|
|
190
|
+
gap: 8,
|
|
191
|
+
width: '100%'
|
|
192
|
+
},
|
|
193
|
+
modernButtonText: {
|
|
194
|
+
color: '#FFFFFF',
|
|
195
|
+
fontSize: 16,
|
|
196
|
+
fontWeight: '600',
|
|
197
|
+
letterSpacing: 0.5
|
|
198
|
+
},
|
|
199
|
+
buttonIcon: {
|
|
200
|
+
marginLeft: 4
|
|
201
|
+
},
|
|
202
|
+
// Label and link styles
|
|
203
|
+
modernLabel: {
|
|
204
|
+
fontSize: 12,
|
|
205
|
+
fontWeight: '500',
|
|
206
|
+
marginBottom: 2
|
|
207
|
+
},
|
|
208
|
+
modernLinkText: {
|
|
209
|
+
fontSize: 14,
|
|
210
|
+
lineHeight: 20,
|
|
211
|
+
fontWeight: '600',
|
|
212
|
+
textDecorationLine: 'underline'
|
|
213
|
+
},
|
|
214
|
+
footerTextContainer: {
|
|
215
|
+
flexDirection: 'row',
|
|
216
|
+
justifyContent: 'center',
|
|
217
|
+
marginTop: 16
|
|
218
|
+
},
|
|
219
|
+
footerText: {
|
|
220
|
+
fontSize: 15
|
|
221
|
+
},
|
|
222
|
+
// User profile styles
|
|
223
|
+
modernUserProfileContainer: {
|
|
224
|
+
alignItems: 'flex-start',
|
|
225
|
+
paddingVertical: 24
|
|
226
|
+
},
|
|
227
|
+
avatarContainer: {
|
|
228
|
+
position: 'relative',
|
|
229
|
+
marginBottom: 20
|
|
230
|
+
},
|
|
231
|
+
modernUserAvatar: {
|
|
232
|
+
borderWidth: 4,
|
|
233
|
+
borderColor: 'rgba(209, 105, 229, 0.2)'
|
|
234
|
+
},
|
|
235
|
+
statusIndicator: {
|
|
236
|
+
position: 'absolute',
|
|
237
|
+
bottom: 4,
|
|
238
|
+
right: 4,
|
|
239
|
+
width: 20,
|
|
240
|
+
height: 20,
|
|
241
|
+
borderRadius: 10,
|
|
242
|
+
borderWidth: 3,
|
|
243
|
+
borderColor: '#FFFFFF'
|
|
244
|
+
},
|
|
245
|
+
modernUserDisplayName: {
|
|
246
|
+
fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
|
|
247
|
+
fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
|
|
248
|
+
fontSize: 42,
|
|
249
|
+
marginBottom: 4,
|
|
250
|
+
textAlign: 'center',
|
|
251
|
+
letterSpacing: -0.5
|
|
252
|
+
},
|
|
253
|
+
modernUsernameSubtext: {
|
|
254
|
+
fontSize: 20,
|
|
255
|
+
textAlign: 'left',
|
|
256
|
+
marginBottom: 16,
|
|
257
|
+
opacity: 0.7
|
|
258
|
+
},
|
|
259
|
+
welcomeBackBadge: {
|
|
260
|
+
flexDirection: 'row',
|
|
261
|
+
alignItems: 'center',
|
|
262
|
+
paddingHorizontal: 12,
|
|
263
|
+
paddingVertical: 6,
|
|
264
|
+
borderRadius: 20,
|
|
265
|
+
gap: 6
|
|
266
|
+
},
|
|
267
|
+
welcomeBackText: {
|
|
268
|
+
fontSize: 12,
|
|
269
|
+
fontWeight: '600',
|
|
270
|
+
textTransform: 'uppercase',
|
|
271
|
+
letterSpacing: 0.5
|
|
272
|
+
},
|
|
273
|
+
// Navigation styles
|
|
274
|
+
modernNavigationButtons: {
|
|
275
|
+
flexDirection: 'row',
|
|
276
|
+
justifyContent: 'center',
|
|
277
|
+
marginTop: 16,
|
|
278
|
+
marginBottom: 8,
|
|
279
|
+
width: '100%',
|
|
280
|
+
gap: 8
|
|
281
|
+
},
|
|
282
|
+
modernBackButton: {
|
|
283
|
+
flexDirection: 'row',
|
|
284
|
+
alignItems: 'center',
|
|
285
|
+
paddingVertical: 12,
|
|
286
|
+
paddingHorizontal: 20,
|
|
287
|
+
borderRadius: 12,
|
|
288
|
+
borderWidth: 1,
|
|
289
|
+
gap: 8
|
|
290
|
+
},
|
|
291
|
+
modernBackButtonText: {
|
|
292
|
+
fontSize: 16,
|
|
293
|
+
fontWeight: '500'
|
|
294
|
+
},
|
|
295
|
+
// Security notice
|
|
296
|
+
securityNotice: {
|
|
297
|
+
flexDirection: 'row',
|
|
298
|
+
alignItems: 'center',
|
|
299
|
+
justifyContent: 'center',
|
|
300
|
+
marginTop: 20,
|
|
301
|
+
gap: 6
|
|
302
|
+
},
|
|
303
|
+
securityText: {
|
|
304
|
+
fontSize: 12,
|
|
305
|
+
fontWeight: '500'
|
|
306
|
+
},
|
|
307
|
+
// Welcome image container
|
|
308
|
+
welcomeImageContainer: {
|
|
309
|
+
alignItems: 'center',
|
|
310
|
+
justifyContent: 'center',
|
|
311
|
+
marginVertical: 20
|
|
312
|
+
},
|
|
313
|
+
welcomeText: {
|
|
314
|
+
fontSize: 18,
|
|
315
|
+
lineHeight: 24,
|
|
316
|
+
textAlign: 'left',
|
|
317
|
+
opacity: 0.8,
|
|
318
|
+
marginBottom: 24
|
|
319
|
+
},
|
|
320
|
+
// Success styles
|
|
321
|
+
successCard: {
|
|
322
|
+
flexDirection: 'row',
|
|
323
|
+
alignItems: 'center',
|
|
324
|
+
padding: 16,
|
|
325
|
+
borderRadius: 16,
|
|
326
|
+
marginBottom: 24,
|
|
327
|
+
gap: 12,
|
|
328
|
+
width: '100%'
|
|
329
|
+
},
|
|
330
|
+
successText: {
|
|
331
|
+
fontSize: 14,
|
|
332
|
+
fontWeight: '500',
|
|
333
|
+
flex: 1
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
exports.createAuthStyles = createAuthStyles;
|
|
337
|
+
//# sourceMappingURL=authStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","createAuthStyles","colors","theme","StyleSheet","create","container","flex","scrollContent","flexGrow","paddingHorizontal","paddingTop","paddingBottom","stepContainer","justifyContent","alignItems","modernHeader","width","marginBottom","modernTitle","fontFamily","Platform","OS","fontWeight","undefined","fontSize","lineHeight","textAlign","letterSpacing","modernSubtitle","opacity","welcomeTitle","stepTitle","modernInfoCard","flexDirection","padding","borderRadius","gap","modernInfoText","modernErrorCard","errorText","modernInputContainer","inputWrapper","height","borderWidth","backgroundColor","inputBackground","premiumInputWrapper","inputIcon","marginRight","inputContent","modernInput","passwordToggle","validationIndicator","marginLeft","validationSuccessCard","marginTop","validationErrorCard","validationCard","validationText","belowInputMessage","belowInputText","modernButton","paddingVertical","marginVertical","shadowOffset","shadowOpacity","shadowRadius","elevation","modernButtonText","color","buttonIcon","modernLabel","modernLinkText","textDecorationLine","footerTextContainer","footerText","modernUserProfileContainer","avatarContainer","position","modernUserAvatar","borderColor","statusIndicator","bottom","right","modernUserDisplayName","modernUsernameSubtext","welcomeBackBadge","welcomeBackText","textTransform","modernNavigationButtons","modernBackButton","modernBackButtonText","securityNotice","securityText","welcomeImageContainer","welcomeText","successCard","successText","exports"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C;AAAC4F,OAAA,CAAAlG,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -25,4 +25,15 @@ Object.keys(_theme).forEach(function (key) {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
|
+
var _authStyles = require("./authStyles");
|
|
29
|
+
Object.keys(_authStyles).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _authStyles[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _authStyles[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
28
39
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_fonts","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_theme"],"sourceRoot":"../../../../src","sources":["ui/styles/index.ts"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_fonts","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_theme","_authStyles"],"sourceRoot":"../../../../src","sources":["ui/styles/index.ts"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,MAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,MAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,MAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,MAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,WAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,WAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,WAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,WAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
package/lib/module/core/index.js
CHANGED
|
@@ -3,16 +3,10 @@
|
|
|
3
3
|
import axios from 'axios';
|
|
4
4
|
import { jwtDecode } from 'jwt-decode';
|
|
5
5
|
|
|
6
|
-
// Zero-Config Authentication Exports
|
|
7
|
-
export { AuthenticationManager, initializeAuth, getAuthManager } from './auth-manager';
|
|
8
|
-
export { AuthProvider, useAuth, useOxyClient, useAuthStatus, useCurrentUser, withAuth } from './use-auth';
|
|
9
|
-
|
|
10
6
|
// Remove all FormData, form-data, and polyfill logic. Delete uploadFile and uploadFiles methods. Add a comment to use the new raw upload approach instead.
|
|
11
7
|
|
|
12
8
|
// Import secure session types
|
|
13
9
|
|
|
14
|
-
import { initializeAuth } from './auth-manager';
|
|
15
|
-
|
|
16
10
|
/**
|
|
17
11
|
* Default cloud URL for Oxy services, cloud is where the user files are. (e.g. images, videos, etc.). Not the API.
|
|
18
12
|
*/
|
|
@@ -23,54 +17,24 @@ export { DeviceManager } from '../utils/deviceManager';
|
|
|
23
17
|
/**
|
|
24
18
|
* OxyServices - Client library for interacting with the Oxy API
|
|
25
19
|
*
|
|
26
|
-
*
|
|
27
|
-
* Use the new AuthProvider and useAuth hooks for automatic authentication management:
|
|
28
|
-
*
|
|
29
|
-
* import { AuthProvider, useAuth } from '@oxyhq/services';
|
|
30
|
-
*
|
|
31
|
-
* <AuthProvider baseURL="https://api.oxy.so">
|
|
32
|
-
* <App />
|
|
33
|
-
* </AuthProvider>
|
|
34
|
-
*
|
|
35
|
-
* Then in components:
|
|
36
|
-
* const { login, user, isAuthenticated } = useAuth();
|
|
37
|
-
*
|
|
38
|
-
* LEGACY MODE:
|
|
39
|
-
* The OxyServices class below is maintained for backward compatibility
|
|
40
|
-
* but we recommend migrating to the new zero-config approach.
|
|
41
|
-
*
|
|
42
|
-
* Note: For authentication status in UI components, use `isAuthenticated` from useAuth() context
|
|
20
|
+
* Note: For authentication status in UI components, use `isAuthenticated` from useOxy() context
|
|
43
21
|
* instead of checking token status directly on this service.
|
|
44
22
|
*/
|
|
45
23
|
export class OxyServices {
|
|
46
24
|
accessToken = null;
|
|
47
25
|
refreshToken = null;
|
|
48
26
|
refreshPromise = null;
|
|
49
|
-
authManager = null;
|
|
50
27
|
|
|
51
28
|
/**
|
|
52
29
|
* Creates a new instance of the OxyServices client
|
|
53
30
|
* @param config - Configuration for the client
|
|
54
31
|
*/
|
|
55
32
|
constructor(config) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
} catch {
|
|
61
|
-
// Fall back to legacy implementation
|
|
62
|
-
this.client = axios.create({
|
|
63
|
-
baseURL: config.baseURL,
|
|
64
|
-
timeout: 10000 // 10 second timeout
|
|
65
|
-
});
|
|
66
|
-
this.setupLegacyInterceptors();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
33
|
+
this.client = axios.create({
|
|
34
|
+
baseURL: config.baseURL,
|
|
35
|
+
timeout: 10000 // 10 second timeout
|
|
36
|
+
});
|
|
69
37
|
|
|
70
|
-
/**
|
|
71
|
-
* Setup legacy interceptors (only used if auth manager is not available)
|
|
72
|
-
*/
|
|
73
|
-
setupLegacyInterceptors() {
|
|
74
38
|
// Interceptor for adding auth header and handling token refresh
|
|
75
39
|
this.client.interceptors.request.use(async req => {
|
|
76
40
|
if (!this.accessToken) {
|
|
@@ -512,9 +476,17 @@ export class OxyServices {
|
|
|
512
476
|
*/
|
|
513
477
|
async getCurrentUser() {
|
|
514
478
|
try {
|
|
479
|
+
console.log('OxyServices: Fetching current user...');
|
|
515
480
|
const res = await this.client.get('/users/me');
|
|
481
|
+
console.log('OxyServices: Current user response:', {
|
|
482
|
+
hasUser: !!res.data,
|
|
483
|
+
userLinksMetadata: res.data?.linksMetadata,
|
|
484
|
+
userLinks: res.data?.links,
|
|
485
|
+
userWebsite: res.data?.website
|
|
486
|
+
});
|
|
516
487
|
return res.data;
|
|
517
488
|
} catch (error) {
|
|
489
|
+
console.error('OxyServices: Error fetching current user:', error);
|
|
518
490
|
throw this.handleError(error);
|
|
519
491
|
}
|
|
520
492
|
}
|
|
@@ -526,9 +498,12 @@ export class OxyServices {
|
|
|
526
498
|
*/
|
|
527
499
|
async updateProfile(updates) {
|
|
528
500
|
try {
|
|
501
|
+
console.log('OxyServices: Updating profile with:', updates);
|
|
529
502
|
const res = await this.client.put('/users/me', updates);
|
|
503
|
+
console.log('OxyServices: Profile update response:', res.data);
|
|
530
504
|
return res.data;
|
|
531
505
|
} catch (error) {
|
|
506
|
+
console.error('OxyServices: Error updating profile:', error);
|
|
532
507
|
throw this.handleError(error);
|
|
533
508
|
}
|
|
534
509
|
}
|
|
@@ -1242,10 +1217,13 @@ export class OxyServices {
|
|
|
1242
1217
|
* @returns Array of user sessions
|
|
1243
1218
|
*/
|
|
1244
1219
|
async getSessionsBySessionId(sessionId) {
|
|
1220
|
+
console.log('getSessionsBySessionId called with sessionId:', sessionId);
|
|
1245
1221
|
try {
|
|
1246
1222
|
const res = await this.client.get(`/secure-session/sessions/${sessionId}`);
|
|
1223
|
+
console.log('getSessionsBySessionId response:', res.data);
|
|
1247
1224
|
return res.data.sessions;
|
|
1248
1225
|
} catch (error) {
|
|
1226
|
+
console.error('getSessionsBySessionId error:', error);
|
|
1249
1227
|
throw this.handleError(error);
|
|
1250
1228
|
}
|
|
1251
1229
|
}
|
|
@@ -1714,6 +1692,164 @@ export class OxyServices {
|
|
|
1714
1692
|
throw this.handleError(error);
|
|
1715
1693
|
}
|
|
1716
1694
|
}
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* Fetch metadata for a URL (title, description, image)
|
|
1698
|
+
* @param url - The URL to fetch metadata for
|
|
1699
|
+
* @returns Promise with metadata object
|
|
1700
|
+
*/
|
|
1701
|
+
async fetchLinkMetadata(url) {
|
|
1702
|
+
try {
|
|
1703
|
+
const response = await this.client.post('/link-metadata/fetch-metadata', {
|
|
1704
|
+
url
|
|
1705
|
+
});
|
|
1706
|
+
return response.data;
|
|
1707
|
+
} catch (error) {
|
|
1708
|
+
throw this.handleError(error);
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
/**
|
|
1713
|
+
* Search for locations using the enhanced location search API
|
|
1714
|
+
* @param query - Search query string
|
|
1715
|
+
* @param limit - Maximum number of results (default: 5)
|
|
1716
|
+
* @param countrycodes - Optional country codes filter (e.g., "us,ca")
|
|
1717
|
+
* @returns Promise with array of location results
|
|
1718
|
+
*/
|
|
1719
|
+
async searchLocations(query, limit = 5, countrycodes) {
|
|
1720
|
+
try {
|
|
1721
|
+
const params = new URLSearchParams({
|
|
1722
|
+
query,
|
|
1723
|
+
limit: limit.toString()
|
|
1724
|
+
});
|
|
1725
|
+
if (countrycodes) {
|
|
1726
|
+
params.append('countrycodes', countrycodes);
|
|
1727
|
+
}
|
|
1728
|
+
const res = await this.client.get(`/location-search/search?${params.toString()}`);
|
|
1729
|
+
return res.data.results;
|
|
1730
|
+
} catch (error) {
|
|
1731
|
+
throw this.handleError(error);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
/**
|
|
1736
|
+
* Get detailed information about a specific location by coordinates
|
|
1737
|
+
* @param lat - Latitude
|
|
1738
|
+
* @param lon - Longitude
|
|
1739
|
+
* @returns Promise with detailed location information
|
|
1740
|
+
*/
|
|
1741
|
+
async getLocationDetails(lat, lon) {
|
|
1742
|
+
try {
|
|
1743
|
+
const res = await this.client.get(`/location-search/details?lat=${lat}&lon=${lon}`);
|
|
1744
|
+
return res.data.result;
|
|
1745
|
+
} catch (error) {
|
|
1746
|
+
throw this.handleError(error);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* Find locations near a point using geospatial queries
|
|
1752
|
+
* @param lat - Latitude
|
|
1753
|
+
* @param lon - Longitude
|
|
1754
|
+
* @param maxDistance - Maximum distance in meters (default: 10000)
|
|
1755
|
+
* @param limit - Maximum number of results (default: 10)
|
|
1756
|
+
* @param skip - Number of results to skip (default: 0)
|
|
1757
|
+
* @returns Promise with nearby locations
|
|
1758
|
+
*/
|
|
1759
|
+
async findLocationsNear(lat, lon, maxDistance = 10000, limit = 10, skip = 0) {
|
|
1760
|
+
try {
|
|
1761
|
+
const params = new URLSearchParams({
|
|
1762
|
+
lat: lat.toString(),
|
|
1763
|
+
lon: lon.toString(),
|
|
1764
|
+
maxDistance: maxDistance.toString(),
|
|
1765
|
+
limit: limit.toString(),
|
|
1766
|
+
skip: skip.toString()
|
|
1767
|
+
});
|
|
1768
|
+
const res = await this.client.get(`/location-search/near?${params.toString()}`);
|
|
1769
|
+
return res.data;
|
|
1770
|
+
} catch (error) {
|
|
1771
|
+
throw this.handleError(error);
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
/**
|
|
1776
|
+
* Search locations in database by text
|
|
1777
|
+
* @param query - Search query
|
|
1778
|
+
* @param limit - Maximum number of results (default: 10)
|
|
1779
|
+
* @param skip - Number of results to skip (default: 0)
|
|
1780
|
+
* @param type - Filter by location type
|
|
1781
|
+
* @param country - Filter by country
|
|
1782
|
+
* @param city - Filter by city
|
|
1783
|
+
* @returns Promise with search results
|
|
1784
|
+
*/
|
|
1785
|
+
async searchLocationsInDB(query, limit = 10, skip = 0, type, country, city) {
|
|
1786
|
+
try {
|
|
1787
|
+
const params = new URLSearchParams({
|
|
1788
|
+
query,
|
|
1789
|
+
limit: limit.toString(),
|
|
1790
|
+
skip: skip.toString()
|
|
1791
|
+
});
|
|
1792
|
+
if (type) params.append('type', type);
|
|
1793
|
+
if (country) params.append('country', country);
|
|
1794
|
+
if (city) params.append('city', city);
|
|
1795
|
+
const res = await this.client.get(`/location-search/db-search?${params.toString()}`);
|
|
1796
|
+
return res.data;
|
|
1797
|
+
} catch (error) {
|
|
1798
|
+
throw this.handleError(error);
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
/**
|
|
1803
|
+
* Get location statistics
|
|
1804
|
+
* @returns Promise with location statistics
|
|
1805
|
+
*/
|
|
1806
|
+
async getLocationStats() {
|
|
1807
|
+
try {
|
|
1808
|
+
const res = await this.client.get('/location-search/stats');
|
|
1809
|
+
return res.data.stats;
|
|
1810
|
+
} catch (error) {
|
|
1811
|
+
throw this.handleError(error);
|
|
1812
|
+
}
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
/**
|
|
1816
|
+
* Get cache statistics
|
|
1817
|
+
* @returns Promise with cache statistics
|
|
1818
|
+
*/
|
|
1819
|
+
async getLocationCacheStats() {
|
|
1820
|
+
try {
|
|
1821
|
+
const res = await this.client.get('/location-search/cache/stats');
|
|
1822
|
+
return res.data.stats;
|
|
1823
|
+
} catch (error) {
|
|
1824
|
+
throw this.handleError(error);
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* Clear location cache
|
|
1830
|
+
* @returns Promise with success status
|
|
1831
|
+
*/
|
|
1832
|
+
async clearLocationCache() {
|
|
1833
|
+
try {
|
|
1834
|
+
const res = await this.client.delete('/location-search/cache');
|
|
1835
|
+
return res.data;
|
|
1836
|
+
} catch (error) {
|
|
1837
|
+
throw this.handleError(error);
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
/**
|
|
1842
|
+
* Get performance statistics
|
|
1843
|
+
* @returns Promise with performance statistics
|
|
1844
|
+
*/
|
|
1845
|
+
async getLocationPerformanceStats() {
|
|
1846
|
+
try {
|
|
1847
|
+
const res = await this.client.get('/location-search/performance');
|
|
1848
|
+
return res.data;
|
|
1849
|
+
} catch (error) {
|
|
1850
|
+
throw this.handleError(error);
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1717
1853
|
}
|
|
1718
1854
|
|
|
1719
1855
|
// Default export for backward compatibility
|