@oxyhq/services 5.8.1 → 5.8.3
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/index.js +9 -27
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/createAuth.js +7 -585
- package/lib/commonjs/node/createAuth.js.map +1 -1
- package/lib/commonjs/node/index.js +1 -38
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +100 -12
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +40 -6
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +5 -0
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +63 -125
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +6 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +59 -2
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +10 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +9 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +214 -37
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +90 -0
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +9 -6
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -30
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +37 -46
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +9 -12
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +24 -6
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/stores/followStore.js +106 -1
- package/lib/commonjs/ui/stores/followStore.js.map +1 -1
- package/lib/module/index.js +1 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/createAuth.js +7 -584
- package/lib/module/node/createAuth.js.map +1 -1
- package/lib/module/node/index.js +1 -7
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +101 -13
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/Header.js +40 -6
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +5 -0
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +63 -125
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -1
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +57 -1
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +10 -0
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +9 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +214 -37
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +85 -0
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +9 -6
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -30
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +37 -46
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +9 -12
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +24 -6
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/stores/followStore.js +106 -1
- package/lib/module/ui/stores/followStore.js.map +1 -1
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/node/createAuth.d.ts +0 -112
- package/lib/typescript/node/createAuth.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +0 -2
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -0
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/Header.d.ts +2 -0
- package/lib/typescript/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -1
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts +20 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts +15 -0
- package/lib/typescript/ui/screens/UserLinksScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +3 -1
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/ui/stores/followStore.d.ts +10 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -1
- package/package.json +3 -2
- package/src/index.ts +2 -10
- package/src/node/createAuth.ts +7 -623
- package/src/node/index.ts +1 -19
- package/src/ui/components/FollowButton.tsx +95 -11
- package/src/ui/components/Header.tsx +45 -4
- package/src/ui/components/OxyProvider.tsx +6 -0
- package/src/ui/context/OxyContext.tsx +65 -136
- package/src/ui/hooks/index.ts +1 -1
- package/src/ui/hooks/useFollow.ts +63 -0
- package/src/ui/navigation/OxyRouter.tsx +10 -0
- package/src/ui/screens/AccountSettingsScreen.tsx +8 -0
- package/src/ui/screens/ProfileScreen.tsx +191 -28
- package/src/ui/screens/UserLinksScreen.tsx +96 -0
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +9 -2
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -20
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +40 -24
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +9 -3
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +9 -3
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +9 -3
- package/src/ui/stores/authStore.ts +22 -7
- package/src/ui/stores/followStore.ts +102 -1
|
@@ -6,6 +6,9 @@ export const useFollowStore = create((set, get) => ({
|
|
|
6
6
|
loadingUsers: {},
|
|
7
7
|
fetchingUsers: {},
|
|
8
8
|
errors: {},
|
|
9
|
+
followerCounts: {},
|
|
10
|
+
followingCounts: {},
|
|
11
|
+
loadingCounts: {},
|
|
9
12
|
setFollowingStatus: (userId, isFollowing) => set(state => ({
|
|
10
13
|
followingUsers: {
|
|
11
14
|
...state.followingUsers,
|
|
@@ -26,7 +29,10 @@ export const useFollowStore = create((set, get) => ({
|
|
|
26
29
|
followingUsers: {},
|
|
27
30
|
loadingUsers: {},
|
|
28
31
|
fetchingUsers: {},
|
|
29
|
-
errors: {}
|
|
32
|
+
errors: {},
|
|
33
|
+
followerCounts: {},
|
|
34
|
+
followingCounts: {},
|
|
35
|
+
loadingCounts: {}
|
|
30
36
|
}),
|
|
31
37
|
fetchFollowStatus: async (userId, oxyServices) => {
|
|
32
38
|
set(state => ({
|
|
@@ -89,6 +95,8 @@ export const useFollowStore = create((set, get) => ({
|
|
|
89
95
|
response = await oxyServices.followUser(userId);
|
|
90
96
|
newFollowState = true;
|
|
91
97
|
}
|
|
98
|
+
|
|
99
|
+
// Update follow status
|
|
92
100
|
set(state => ({
|
|
93
101
|
followingUsers: {
|
|
94
102
|
...state.followingUsers,
|
|
@@ -103,6 +111,37 @@ export const useFollowStore = create((set, get) => ({
|
|
|
103
111
|
[userId]: null
|
|
104
112
|
}
|
|
105
113
|
}));
|
|
114
|
+
|
|
115
|
+
// Update counts if the response includes them
|
|
116
|
+
// The API returns counts for both users:
|
|
117
|
+
// - followers: target user's follower count (the user being followed)
|
|
118
|
+
// - following: current user's following count (the user doing the following)
|
|
119
|
+
if (response && response.counts) {
|
|
120
|
+
const {
|
|
121
|
+
counts
|
|
122
|
+
} = response;
|
|
123
|
+
|
|
124
|
+
// Get current user ID from oxyServices
|
|
125
|
+
const currentUserId = oxyServices.getCurrentUserId();
|
|
126
|
+
set(state => {
|
|
127
|
+
const updates = {};
|
|
128
|
+
|
|
129
|
+
// Update target user's follower count (the user being followed)
|
|
130
|
+
updates.followerCounts = {
|
|
131
|
+
...state.followerCounts,
|
|
132
|
+
[userId]: counts.followers
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// Update current user's following count (the user doing the following)
|
|
136
|
+
if (currentUserId) {
|
|
137
|
+
updates.followingCounts = {
|
|
138
|
+
...state.followingCounts,
|
|
139
|
+
[currentUserId]: counts.following
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
return updates;
|
|
143
|
+
});
|
|
144
|
+
}
|
|
106
145
|
} catch (error) {
|
|
107
146
|
set(state => ({
|
|
108
147
|
loadingUsers: {
|
|
@@ -115,6 +154,72 @@ export const useFollowStore = create((set, get) => ({
|
|
|
115
154
|
}
|
|
116
155
|
}));
|
|
117
156
|
}
|
|
157
|
+
},
|
|
158
|
+
setFollowerCount: (userId, count) => set(state => ({
|
|
159
|
+
followerCounts: {
|
|
160
|
+
...state.followerCounts,
|
|
161
|
+
[userId]: count
|
|
162
|
+
}
|
|
163
|
+
})),
|
|
164
|
+
setFollowingCount: (userId, count) => set(state => ({
|
|
165
|
+
followingCounts: {
|
|
166
|
+
...state.followingCounts,
|
|
167
|
+
[userId]: count
|
|
168
|
+
}
|
|
169
|
+
})),
|
|
170
|
+
updateCountsFromFollowAction: (targetUserId, action, counts, currentUserId) => {
|
|
171
|
+
set(state => {
|
|
172
|
+
const updates = {};
|
|
173
|
+
|
|
174
|
+
// Update target user's follower count (the user being followed)
|
|
175
|
+
updates.followerCounts = {
|
|
176
|
+
...state.followerCounts,
|
|
177
|
+
[targetUserId]: counts.followers
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
// Update current user's following count (the user doing the following)
|
|
181
|
+
if (currentUserId) {
|
|
182
|
+
updates.followingCounts = {
|
|
183
|
+
...state.followingCounts,
|
|
184
|
+
[currentUserId]: counts.following
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
return updates;
|
|
188
|
+
});
|
|
189
|
+
},
|
|
190
|
+
fetchUserCounts: async (userId, oxyServices) => {
|
|
191
|
+
set(state => ({
|
|
192
|
+
loadingCounts: {
|
|
193
|
+
...state.loadingCounts,
|
|
194
|
+
[userId]: true
|
|
195
|
+
}
|
|
196
|
+
}));
|
|
197
|
+
try {
|
|
198
|
+
const user = await oxyServices.getUserById(userId);
|
|
199
|
+
if (user && user._count) {
|
|
200
|
+
set(state => ({
|
|
201
|
+
followerCounts: {
|
|
202
|
+
...state.followerCounts,
|
|
203
|
+
[userId]: user._count.followers || 0
|
|
204
|
+
},
|
|
205
|
+
followingCounts: {
|
|
206
|
+
...state.followingCounts,
|
|
207
|
+
[userId]: user._count.following || 0
|
|
208
|
+
},
|
|
209
|
+
loadingCounts: {
|
|
210
|
+
...state.loadingCounts,
|
|
211
|
+
[userId]: false
|
|
212
|
+
}
|
|
213
|
+
}));
|
|
214
|
+
}
|
|
215
|
+
} catch (error) {
|
|
216
|
+
set(state => ({
|
|
217
|
+
loadingCounts: {
|
|
218
|
+
...state.loadingCounts,
|
|
219
|
+
[userId]: false
|
|
220
|
+
}
|
|
221
|
+
}));
|
|
222
|
+
}
|
|
118
223
|
}
|
|
119
224
|
}));
|
|
120
225
|
//# sourceMappingURL=followStore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["create","useFollowStore","set","get","followingUsers","loadingUsers","fetchingUsers","errors","setFollowingStatus","userId","isFollowing","state","clearFollowError","resetFollowState","fetchFollowStatus","oxyServices","response","getFollowStatus","error","message","toggleFollowUser","isCurrentlyFollowing","newFollowState","unfollowUser","followUser"],"sourceRoot":"../../../../src","sources":["ui/stores/followStore.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;
|
|
1
|
+
{"version":3,"names":["create","useFollowStore","set","get","followingUsers","loadingUsers","fetchingUsers","errors","followerCounts","followingCounts","loadingCounts","setFollowingStatus","userId","isFollowing","state","clearFollowError","resetFollowState","fetchFollowStatus","oxyServices","response","getFollowStatus","error","message","toggleFollowUser","isCurrentlyFollowing","newFollowState","unfollowUser","followUser","counts","currentUserId","getCurrentUserId","updates","followers","following","setFollowerCount","count","setFollowingCount","updateCountsFromFollowAction","targetUserId","action","fetchUserCounts","user","getUserById","_count"],"sourceRoot":"../../../../src","sources":["ui/stores/followStore.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAyBhC,OAAO,MAAMC,cAAc,GAAGD,MAAM,CAAc,CAACE,GAAQ,EAAEC,GAAQ,MAAM;EACzEC,cAAc,EAAE,CAAC,CAAC;EAClBC,YAAY,EAAE,CAAC,CAAC;EAChBC,aAAa,EAAE,CAAC,CAAC;EACjBC,MAAM,EAAE,CAAC,CAAC;EACVC,cAAc,EAAE,CAAC,CAAC;EAClBC,eAAe,EAAE,CAAC,CAAC;EACnBC,aAAa,EAAE,CAAC,CAAC;EACjBC,kBAAkB,EAAEA,CAACC,MAAc,EAAEC,WAAoB,KAAKX,GAAG,CAAEY,KAAkB,KAAM;IACzFV,cAAc,EAAE;MAAE,GAAGU,KAAK,CAACV,cAAc;MAAE,CAACQ,MAAM,GAAGC;IAAY,CAAC;IAClEN,MAAM,EAAE;MAAE,GAAGO,KAAK,CAACP,MAAM;MAAE,CAACK,MAAM,GAAG;IAAK;EAC5C,CAAC,CAAC,CAAC;EACHG,gBAAgB,EAAGH,MAAc,IAAKV,GAAG,CAAEY,KAAkB,KAAM;IACjEP,MAAM,EAAE;MAAE,GAAGO,KAAK,CAACP,MAAM;MAAE,CAACK,MAAM,GAAG;IAAK;EAC5C,CAAC,CAAC,CAAC;EACHI,gBAAgB,E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
|
7
7
|
*/
|
|
8
8
|
export { OxyServices } from './core';
|
|
9
9
|
export { OXY_CLOUD_URL } from './core';
|
|
10
|
-
export { OxyAuth, AuthRequest, AuthOptions, AuthMiddlewareOptions, TokenValidationResult } from './node/createAuth';
|
|
11
10
|
export { OxyContextProvider, // Backward compatibility
|
|
12
11
|
useOxy } from './ui/context/OxyContext';
|
|
13
12
|
export { default as OxyProvider } from './ui/components/OxyProvider';
|
|
@@ -18,4 +17,5 @@ export type { SecureLoginResponse, SecureClientSession, MinimalUserData } from '
|
|
|
18
17
|
export { useAuthStore } from './ui/stores/authStore';
|
|
19
18
|
export { useSessionSocket } from './ui/hooks/useSessionSocket';
|
|
20
19
|
export { OxySignInButton } from './ui/components/OxySignInButton';
|
|
20
|
+
export { OxyLogo, FollowButton } from './ui';
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGvC,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGvC,OAAO,EACL,kBAAkB,EAAE,yBAAyB;AAC7C,MAAM,EACP,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGjF,YAAY,EACV,SAAS,EACT,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EACT,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,cAAc,EACd,eAAe,EACf,aAAa,EACb,eAAe,EACf,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACV,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG/D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC"}
|
|
@@ -1,119 +1,7 @@
|
|
|
1
|
-
import { Request, Response } from 'express';
|
|
2
|
-
import type { NextFunction } from 'express-serve-static-core';
|
|
3
|
-
import { OxyServices } from '../core';
|
|
4
|
-
export interface AuthRequest extends Request {
|
|
5
|
-
user?: any;
|
|
6
|
-
userId?: string;
|
|
7
|
-
accessToken?: string;
|
|
8
|
-
sessionId?: string;
|
|
9
|
-
deviceFingerprint?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface AuthOptions {
|
|
12
|
-
baseURL: string;
|
|
13
|
-
jwtSecret?: string;
|
|
14
|
-
loadFullUser?: boolean;
|
|
15
|
-
enableSessionAuth?: boolean;
|
|
16
|
-
enableDeviceAuth?: boolean;
|
|
17
|
-
cacheUserData?: boolean;
|
|
18
|
-
userCacheTTL?: number;
|
|
19
|
-
}
|
|
20
|
-
export interface AuthMiddlewareOptions {
|
|
21
|
-
required?: boolean;
|
|
22
|
-
loadFullUser?: boolean;
|
|
23
|
-
roles?: string[];
|
|
24
|
-
permissions?: string[];
|
|
25
|
-
onError?: (error: any, req: AuthRequest, res: Response) => void;
|
|
26
|
-
}
|
|
27
|
-
export interface TokenValidationResult {
|
|
28
|
-
valid: boolean;
|
|
29
|
-
userId?: string;
|
|
30
|
-
user?: any;
|
|
31
|
-
error?: string;
|
|
32
|
-
code?: string;
|
|
33
|
-
expiresAt?: number;
|
|
34
|
-
cached?: boolean;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Enhanced OxyAuth class for backend authentication
|
|
38
|
-
*/
|
|
39
|
-
export declare class OxyAuth {
|
|
40
|
-
private oxy;
|
|
41
|
-
private options;
|
|
42
|
-
private userCache;
|
|
43
|
-
constructor(options: AuthOptions);
|
|
44
|
-
/**
|
|
45
|
-
* Create authentication middleware
|
|
46
|
-
*/
|
|
47
|
-
createAuthMiddleware(options?: AuthMiddlewareOptions): (req: AuthRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* Authenticate request and populate user data
|
|
50
|
-
*/
|
|
51
|
-
private authenticateRequest;
|
|
52
|
-
/**
|
|
53
|
-
* Validate JWT token
|
|
54
|
-
*/
|
|
55
|
-
validateToken(token: string): Promise<TokenValidationResult>;
|
|
56
|
-
/**
|
|
57
|
-
* Validate session-based authentication
|
|
58
|
-
*/
|
|
59
|
-
validateSession(sessionId: string, deviceFingerprint?: string): Promise<TokenValidationResult>;
|
|
60
|
-
/**
|
|
61
|
-
* Validate device-based authentication
|
|
62
|
-
*/
|
|
63
|
-
validateDevice(userId: string, deviceFingerprint: string): Promise<TokenValidationResult>;
|
|
64
|
-
/**
|
|
65
|
-
* Create role-based middleware
|
|
66
|
-
*/
|
|
67
|
-
requireRole(roles: string | string[]): (req: AuthRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
68
|
-
/**
|
|
69
|
-
* Create permission-based middleware
|
|
70
|
-
*/
|
|
71
|
-
requirePermission(permissions: string | string[]): (req: AuthRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
72
|
-
/**
|
|
73
|
-
* Create optional authentication middleware
|
|
74
|
-
*/
|
|
75
|
-
optionalAuth(): (req: AuthRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
76
|
-
/**
|
|
77
|
-
* Clear user cache
|
|
78
|
-
*/
|
|
79
|
-
clearCache(): void;
|
|
80
|
-
/**
|
|
81
|
-
* Check if user data is cached for a given token
|
|
82
|
-
*/
|
|
83
|
-
isUserCached(token: string): boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Check if user has a specific permission
|
|
86
|
-
*/
|
|
87
|
-
hasPermission(userId: string, permission: string): Promise<boolean>;
|
|
88
|
-
/**
|
|
89
|
-
* Get OxyServices instance
|
|
90
|
-
*/
|
|
91
|
-
getOxyServices(): OxyServices;
|
|
92
|
-
}
|
|
93
1
|
export interface CreateAuthOptions {
|
|
94
2
|
baseURL: string;
|
|
95
|
-
jwtSecret?: string;
|
|
96
|
-
loadFullUser?: boolean;
|
|
97
|
-
enableSessionAuth?: boolean;
|
|
98
|
-
enableDeviceAuth?: boolean;
|
|
99
|
-
cacheUserData?: boolean;
|
|
100
|
-
userCacheTTL?: number;
|
|
101
3
|
}
|
|
102
|
-
/**
|
|
103
|
-
* Enhanced createAuth function that provides both router and middleware capabilities
|
|
104
|
-
*
|
|
105
|
-
* This is a unified authentication system that:
|
|
106
|
-
* 1. Maintains backward compatibility with the old router-based approach
|
|
107
|
-
* 2. Adds powerful new middleware capabilities
|
|
108
|
-
* 3. Includes caching, role-based access, and performance optimizations
|
|
109
|
-
* 4. Supports multiple authentication strategies
|
|
110
|
-
*/
|
|
111
4
|
export declare function createAuth(options: CreateAuthOptions): {
|
|
112
5
|
middleware: any;
|
|
113
|
-
auth: OxyAuth;
|
|
114
|
-
requireAuth: (roles?: string | string[], permissions?: string | string[]) => (req: AuthRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
115
|
-
optionalAuth: () => (req: AuthRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
116
|
-
requireRole: (roles: string | string[]) => (req: AuthRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
117
|
-
requirePermission: (permissions: string | string[]) => (req: AuthRequest, res: Response, next: NextFunction) => Promise<void>;
|
|
118
6
|
};
|
|
119
7
|
//# sourceMappingURL=createAuth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAuth.d.ts","sourceRoot":"","sources":["../../../src/node/createAuth.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createAuth.d.ts","sourceRoot":"","sources":["../../../src/node/createAuth.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB;;EA2GpD"}
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
import { OxyServices, OXY_CLOUD_URL } from '../core';
|
|
5
5
|
import { createAuth } from './createAuth';
|
|
6
6
|
import * as Models from '../models/interfaces';
|
|
7
|
-
import { OxyAuth, AuthRequest, AuthOptions, AuthMiddlewareOptions, TokenValidationResult } from './createAuth';
|
|
8
7
|
export { OxyServices, OXY_CLOUD_URL };
|
|
9
|
-
export { OxyAuth, AuthRequest, AuthOptions, AuthMiddlewareOptions, TokenValidationResult };
|
|
10
8
|
export { createAuth };
|
|
11
9
|
export { Models };
|
|
12
10
|
export * from '../models/interfaces';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAC;AAG/C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,sBAAsB,CAAC;AAG/C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,CAAC;AAGtB,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,cAAc,sBAAsB,CAAC;AAGrC,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FollowButton.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/FollowButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,EAIL,SAAS,EACT,SAAS,EACT,SAAS,EAGV,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"FollowButton.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/FollowButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAC;AACtD,OAAO,EAIL,SAAS,EACT,SAAS,EACT,SAAS,EAGV,MAAM,cAAc,CAAC;AAetB,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA4K7C,CAAC;AAwDF,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,eAAe,YAAY,CAAC"}
|
|
@@ -16,6 +16,8 @@ export interface HeaderProps {
|
|
|
16
16
|
showCloseButton?: boolean;
|
|
17
17
|
variant?: 'default' | 'large' | 'minimal' | 'gradient';
|
|
18
18
|
elevation?: 'none' | 'subtle' | 'prominent';
|
|
19
|
+
subtitleVariant?: 'default' | 'small' | 'large' | 'muted';
|
|
20
|
+
titleAlignment?: 'left' | 'center' | 'right';
|
|
19
21
|
}
|
|
20
22
|
declare const Header: React.FC<HeaderProps>;
|
|
21
23
|
export default Header;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,MAAM,WAAW,WAAW;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE;QACV,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,KAAK,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC5C,eAAe,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IAC1D,cAAc,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CAChD;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0NjC,CAAC;AAwJF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAIjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAavD;;;;;;GAMG;AACH,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAyD3C,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyProvider.d.ts","sourceRoot":"","sources":["../../../../src/ui/components/OxyProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAIjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAavD;;;;;;GAMG;AACH,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAyD3C,CAAC;AAiUF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqD,SAAS,EAA6B,MAAM,OAAO,CAAC;AACvH,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAuB,mBAAmB,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAOvG,MAAM,WAAW,eAAe;IAE9B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,WAAW,EAAE,eAAe,GAAG,IAAI,CAAC;IACpC,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAGrB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM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G,CAAC,CAAC;CACvC;AA4DD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwmBzD,CAAC;AAGF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAG9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { useFollow } from './useFollow';
|
|
1
|
+
export { useFollow, useFollowerCounts } from './useFollow';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -6,6 +6,12 @@ export declare const useFollow: (userId?: string | string[]) => {
|
|
|
6
6
|
setFollowStatus: (following: boolean) => void;
|
|
7
7
|
fetchStatus: () => Promise<void>;
|
|
8
8
|
clearError: () => void;
|
|
9
|
+
followerCount: number | null;
|
|
10
|
+
followingCount: number | null;
|
|
11
|
+
isLoadingCounts: boolean;
|
|
12
|
+
fetchUserCounts: () => Promise<void>;
|
|
13
|
+
setFollowerCount: (count: number) => void;
|
|
14
|
+
setFollowingCount: (count: number) => void;
|
|
9
15
|
followData?: undefined;
|
|
10
16
|
toggleFollowForUser?: undefined;
|
|
11
17
|
setFollowStatusForUser?: undefined;
|
|
@@ -38,5 +44,19 @@ export declare const useFollow: (userId?: string | string[]) => {
|
|
|
38
44
|
setFollowStatus?: undefined;
|
|
39
45
|
fetchStatus?: undefined;
|
|
40
46
|
clearError?: undefined;
|
|
47
|
+
followerCount?: undefined;
|
|
48
|
+
followingCount?: undefined;
|
|
49
|
+
isLoadingCounts?: undefined;
|
|
50
|
+
fetchUserCounts?: undefined;
|
|
51
|
+
setFollowerCount?: undefined;
|
|
52
|
+
setFollowingCount?: undefined;
|
|
53
|
+
};
|
|
54
|
+
export declare const useFollowerCounts: (userId: string) => {
|
|
55
|
+
followerCount: number;
|
|
56
|
+
followingCount: number;
|
|
57
|
+
isLoadingCounts: boolean;
|
|
58
|
+
fetchUserCounts: () => Promise<void>;
|
|
59
|
+
setFollowerCount: (count: number) => void;
|
|
60
|
+
setFollowingCount: (count: number) => void;
|
|
41
61
|
};
|
|
42
62
|
//# sourceMappingURL=useFollow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFollow.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/useFollow.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,GAAG,MAAM,EAAE;;;;;
|
|
1
|
+
{"version":3,"file":"useFollow.d.ts","sourceRoot":"","sources":["../../../../src/ui/hooks/useFollow.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,GAAI,SAAS,MAAM,GAAG,MAAM,EAAE;;;;;iCAuBF,OAAO;;;;;;;8BAoBV,MAAM;+BAKL,MAAM;;;;;;;;;;;;;qBAOR,OAAO;mBAAa,OAAO;eAAS,MAAM,GAAG,IAAI;;wCAWhC,MAAM;2CAKT,MAAM,aAAa,OAAO;uCAIxB,MAAM;;sCAQb,MAAM;;;;;;;;;;;;;;;;;;CA8C5D,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,QAAQ,MAAM;;;;;8BAYD,MAAM;+BAIL,MAAM;CAYrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyRouter.d.ts","sourceRoot":"","sources":["../../../../src/ui/navigation/OxyRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyRouter.d.ts","sourceRoot":"","sources":["../../../../src/ui/navigation/OxyRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAC;AA4BhE,OAAO,EAAE,cAAc,EAAe,MAAM,SAAS,CAAC;AA0FtD,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAkIvC,CAAC;AAcF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSettingsScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/AccountSettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAcjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;
|
|
1
|
+
{"version":3,"file":"AccountSettingsScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/AccountSettingsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAcjF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;;AAwjDtD,wBAAiD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProfileScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/ProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProfileScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/ProfileScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAOtD,UAAU,kBAAmB,SAAQ,eAAe;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6S/C,CAAC;AAgGF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseScreenProps } from '../navigation/types';
|
|
3
|
+
interface UserLinksScreenProps extends BaseScreenProps {
|
|
4
|
+
userId: string;
|
|
5
|
+
links: Array<{
|
|
6
|
+
url: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
image?: string;
|
|
10
|
+
id: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
declare const UserLinksScreen: React.FC<UserLinksScreenProps>;
|
|
14
|
+
export default UserLinksScreen;
|
|
15
|
+
//# sourceMappingURL=UserLinksScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserLinksScreen.d.ts","sourceRoot":"","sources":["../../../../src/ui/screens/UserLinksScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,UAAU,oBAAqB,SAAQ,eAAe;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,KAAK,CAAC;QACT,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,EAAE,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACN;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwDnD,CAAC;AAsBF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KarmaAboutScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaAboutScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"KarmaAboutScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaAboutScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4B/C,CAAC;AAkBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KarmaCenterScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaCenterScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAWnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAMzD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"KarmaCenterScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaCenterScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAWnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAMzD,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2HhD,CAAC;AA+GF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KarmaFAQScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaFAQScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;;
|
|
1
|
+
{"version":3,"file":"KarmaFAQScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaFAQScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;;AAsMzD,wBAA0C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KarmaLeaderboardScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaLeaderboardScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"KarmaLeaderboardScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaLeaderboardScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAKzD,QAAA,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwDrD,CAAC;AAqBF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KarmaRewardsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaRewardsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"KarmaRewardsScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaRewardsScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAkCjD,CAAC;AA4BF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KarmaRulesScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaRulesScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"KarmaRulesScreen.d.ts","sourceRoot":"","sources":["../../../../../src/ui/screens/karma/KarmaRulesScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAgD/C,CAAC;AAgBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -4,12 +4,14 @@ interface AuthState {
|
|
|
4
4
|
isAuthenticated: boolean;
|
|
5
5
|
isLoading: boolean;
|
|
6
6
|
error: string | null;
|
|
7
|
+
lastUserFetch: number | null;
|
|
7
8
|
loginStart: () => void;
|
|
8
9
|
loginSuccess: (user: User) => void;
|
|
9
10
|
loginFailure: (error: string) => void;
|
|
10
11
|
logout: () => void;
|
|
11
|
-
fetchUser: (oxyServices: any) => Promise<void>;
|
|
12
|
+
fetchUser: (oxyServices: any, forceRefresh?: boolean) => Promise<void>;
|
|
12
13
|
updateUser: (updates: Partial<User>, oxyServices: any) => Promise<void>;
|
|
14
|
+
setUser: (user: User) => void;
|
|
13
15
|
}
|
|
14
16
|
export declare const useAuthStore: import("zustand").UseBoundStore<import("zustand").StoreApi<AuthState>>;
|
|
15
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/stores/authStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAA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AO,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CAC/B;AAED,eAAO,MAAM,YAAY,wEAqDtB,CAAC"}
|
|
@@ -4,11 +4,21 @@ interface FollowState {
|
|
|
4
4
|
loadingUsers: Record<string, boolean>;
|
|
5
5
|
fetchingUsers: Record<string, boolean>;
|
|
6
6
|
errors: Record<string, string | null>;
|
|
7
|
+
followerCounts: Record<string, number>;
|
|
8
|
+
followingCounts: Record<string, number>;
|
|
9
|
+
loadingCounts: Record<string, boolean>;
|
|
7
10
|
setFollowingStatus: (userId: string, isFollowing: boolean) => void;
|
|
8
11
|
clearFollowError: (userId: string) => void;
|
|
9
12
|
resetFollowState: () => void;
|
|
10
13
|
fetchFollowStatus: (userId: string, oxyServices: OxyServices) => Promise<void>;
|
|
11
14
|
toggleFollowUser: (userId: string, oxyServices: OxyServices, isCurrentlyFollowing: boolean) => Promise<void>;
|
|
15
|
+
setFollowerCount: (userId: string, count: number) => void;
|
|
16
|
+
setFollowingCount: (userId: string, count: number) => void;
|
|
17
|
+
updateCountsFromFollowAction: (targetUserId: string, action: 'follow' | 'unfollow', counts: {
|
|
18
|
+
followers: number;
|
|
19
|
+
following: number;
|
|
20
|
+
}, currentUserId?: string) => void;
|
|
21
|
+
fetchUserCounts: (userId: string, oxyServices: OxyServices) => Promise<void>;
|
|
12
22
|
}
|
|
13
23
|
export declare const useFollowStore: import("zustand").UseBoundStore<import("zustand").StoreApi<FollowState>>;
|
|
14
24
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"followStore.d.ts","sourceRoot":"","sources":["../../../../src/ui/stores/followStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,UAAU,WAAW;IACnB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,aAAa,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iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,4BAA4B,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,UAAU,EAAE,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,aAAa,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtK,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9E;AAED,eAAO,MAAM,cAAc,0EA2JxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxyhq/services",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.3",
|
|
4
4
|
"description": "Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -68,7 +68,6 @@
|
|
|
68
68
|
"bootstrap": "yarn install && yarn example"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@oxyhq/services": "^5.4.0",
|
|
72
71
|
"@react-native-async-storage/async-storage": "^2.1.2",
|
|
73
72
|
"@react-navigation/native": "^7.1.14",
|
|
74
73
|
"@th3rdwave/react-navigation-bottom-sheet": "^0.3.2",
|
|
@@ -84,6 +83,8 @@
|
|
|
84
83
|
"socket.io-client": "^4.8.1",
|
|
85
84
|
"sonner": "^2.0.4",
|
|
86
85
|
"sonner-native": "^0.20.0",
|
|
86
|
+
"tailwindcss": "^4.1.11",
|
|
87
|
+
"zod": "^3.25.64",
|
|
87
88
|
"zustand": "^5.0.6"
|
|
88
89
|
},
|
|
89
90
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -10,15 +10,6 @@
|
|
|
10
10
|
export { OxyServices } from './core';
|
|
11
11
|
export { OXY_CLOUD_URL } from './core';
|
|
12
12
|
|
|
13
|
-
// Enhanced Backend Authentication (Node.js only)
|
|
14
|
-
export {
|
|
15
|
-
OxyAuth,
|
|
16
|
-
AuthRequest,
|
|
17
|
-
AuthOptions,
|
|
18
|
-
AuthMiddlewareOptions,
|
|
19
|
-
TokenValidationResult
|
|
20
|
-
} from './node/createAuth';
|
|
21
|
-
|
|
22
13
|
// React context
|
|
23
14
|
export {
|
|
24
15
|
OxyContextProvider, // Backward compatibility
|
|
@@ -77,4 +68,5 @@ export { useAuthStore } from './ui/stores/authStore';
|
|
|
77
68
|
export { useSessionSocket } from './ui/hooks/useSessionSocket';
|
|
78
69
|
|
|
79
70
|
// UI components
|
|
80
|
-
export { OxySignInButton } from './ui/components/OxySignInButton';
|
|
71
|
+
export { OxySignInButton } from './ui/components/OxySignInButton';
|
|
72
|
+
export { OxyLogo, FollowButton } from './ui';
|