@oxyhq/services 5.4.8 → 5.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/core/index.js +0 -59
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +174 -17
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +8 -23
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +49 -38
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +2 -8
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +15 -2
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuthFetch.js +182 -0
- package/lib/commonjs/ui/hooks/useAuthFetch.js.map +1 -0
- package/lib/commonjs/ui/hooks/useFollow.js +10 -29
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOxyFollow.js +190 -0
- package/lib/commonjs/ui/hooks/useOxyFollow.js.map +1 -0
- package/lib/commonjs/ui/index.js +183 -0
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -14
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +37 -19
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +27 -9
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +2 -8
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/store/index.js +51 -255
- package/lib/commonjs/ui/store/index.js.map +1 -1
- package/lib/commonjs/ui/store/setupOxyStore.js +63 -0
- package/lib/commonjs/ui/store/setupOxyStore.js.map +1 -0
- package/lib/commonjs/ui/store/slices/authSlice.js +56 -0
- package/lib/commonjs/ui/store/slices/authSlice.js.map +1 -0
- package/lib/commonjs/ui/store/slices/followSlice.js +238 -0
- package/lib/commonjs/ui/store/slices/followSlice.js.map +1 -0
- package/lib/commonjs/ui/store/slices/index.js +129 -0
- package/lib/commonjs/ui/store/slices/index.js.map +1 -0
- package/lib/commonjs/ui/store/slices/types.js +19 -0
- package/lib/commonjs/ui/store/slices/types.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/commonjs/ui/styles/shadows.js +123 -0
- package/lib/commonjs/ui/styles/shadows.js.map +1 -0
- package/lib/module/core/index.js +0 -59
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +14 -10
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +8 -23
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +49 -38
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +2 -8
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/hooks/index.js +2 -1
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useAuthFetch.js +177 -0
- package/lib/module/ui/hooks/useAuthFetch.js.map +1 -0
- package/lib/module/ui/hooks/useFollow.js +10 -29
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useOxyFollow.js +186 -0
- package/lib/module/ui/hooks/useOxyFollow.js.map +1 -0
- package/lib/module/ui/index.js +12 -2
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +5 -1
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +37 -19
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +27 -9
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +2 -8
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/store/index.js +23 -249
- package/lib/module/ui/store/index.js.map +1 -1
- package/lib/module/ui/store/setupOxyStore.js +59 -0
- package/lib/module/ui/store/setupOxyStore.js.map +1 -0
- package/lib/module/ui/store/slices/authSlice.js +48 -0
- package/lib/module/ui/store/slices/authSlice.js.map +1 -0
- package/lib/module/ui/store/slices/followSlice.js +232 -0
- package/lib/module/ui/store/slices/followSlice.js.map +1 -0
- package/lib/module/ui/store/slices/index.js +11 -0
- package/lib/module/ui/store/slices/index.js.map +1 -0
- package/lib/module/ui/store/slices/types.js +15 -0
- package/lib/module/ui/store/slices/types.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/module/ui/styles/shadows.js +119 -0
- package/lib/module/ui/styles/shadows.js.map +1 -0
- package/lib/typescript/core/index.d.ts +0 -28
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -5
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +2 -1
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts +33 -0
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +1 -0
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts +81 -0
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +3 -1
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +22 -4
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/store/index.d.ts +19 -58
- package/lib/typescript/ui/store/index.d.ts.map +1 -1
- package/lib/typescript/ui/store/setupOxyStore.d.ts +29 -0
- package/lib/typescript/ui/store/setupOxyStore.d.ts.map +1 -0
- package/lib/typescript/ui/store/slices/authSlice.d.ts +32 -0
- package/lib/typescript/ui/store/slices/authSlice.d.ts.map +1 -0
- package/lib/typescript/ui/store/slices/followSlice.d.ts +120 -0
- package/lib/typescript/ui/store/slices/followSlice.d.ts.map +1 -0
- package/lib/typescript/ui/store/slices/index.d.ts +9 -0
- package/lib/typescript/ui/store/slices/index.d.ts.map +1 -0
- package/lib/typescript/ui/store/slices/types.d.ts +16 -0
- package/lib/typescript/ui/store/slices/types.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/lib/typescript/ui/styles/shadows.d.ts +233 -0
- package/lib/typescript/ui/styles/shadows.d.ts.map +1 -0
- package/package.json +14 -15
- package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +92 -0
- package/src/__tests__/ui/store/setupOxyStore.test.ts +50 -0
- package/src/__tests__/validate-structure.js +91 -0
- package/src/__tests__/validation.js +42 -0
- package/src/core/index.ts +0 -66
- package/src/index.ts +36 -4
- package/src/ui/components/FollowButton.tsx +11 -25
- package/src/ui/components/OxyProvider.tsx +48 -33
- package/src/ui/components/OxySignInButton.tsx +2 -6
- package/src/ui/hooks/index.ts +2 -1
- package/src/ui/hooks/useAuthFetch.ts +200 -0
- package/src/ui/hooks/useFollow.ts +10 -30
- package/src/ui/hooks/useOxyFollow.ts +188 -0
- package/src/ui/index.ts +34 -2
- package/src/ui/navigation/types.ts +24 -4
- package/src/ui/screens/AccountCenterScreen.tsx +5 -7
- package/src/ui/screens/AppInfoScreen.tsx +40 -23
- package/src/ui/screens/FileManagementScreen.tsx +268 -248
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +2 -5
- package/src/ui/store/index.ts +31 -245
- package/src/ui/store/setupOxyStore.ts +58 -0
- package/src/ui/store/slices/authSlice.ts +43 -0
- package/src/ui/store/slices/followSlice.ts +207 -0
- package/src/ui/store/slices/index.ts +31 -0
- package/src/ui/store/slices/types.ts +33 -0
- package/src/ui/styles/index.ts +1 -0
- package/src/ui/styles/shadows.ts +112 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toggleFollowUser = exports.setFollowingStatus = exports.resetFollowState = exports.followThunks = exports.followSlice = exports.followSelectors = exports.followReducer = exports.followActions = exports.fetchFollowStatus = exports.clearFollowError = void 0;
|
|
7
|
+
var _toolkit = require("@reduxjs/toolkit");
|
|
8
|
+
var _types = require("./types");
|
|
9
|
+
// Define thunk state interface for dependency injection
|
|
10
|
+
|
|
11
|
+
// Async thunk for fetching follow status from backend with deduplication
|
|
12
|
+
const fetchFollowStatus = exports.fetchFollowStatus = (0, _toolkit.createAsyncThunk)('follow/fetchFollowStatus', async ({
|
|
13
|
+
userId,
|
|
14
|
+
oxyServices
|
|
15
|
+
}, {
|
|
16
|
+
rejectWithValue
|
|
17
|
+
}) => {
|
|
18
|
+
try {
|
|
19
|
+
// Use the proper core service method
|
|
20
|
+
const response = await oxyServices.getFollowStatus(userId);
|
|
21
|
+
return {
|
|
22
|
+
userId,
|
|
23
|
+
isFollowing: response.isFollowing
|
|
24
|
+
};
|
|
25
|
+
} catch (error) {
|
|
26
|
+
// Ignore authentication errors when user isn't signed in - don't update state
|
|
27
|
+
if (error?.status === 401 || error?.message?.includes('Authentication')) {
|
|
28
|
+
return rejectWithValue('Not authenticated');
|
|
29
|
+
}
|
|
30
|
+
// Log other failures and reject to not update state
|
|
31
|
+
console.warn(`Failed to fetch follow status for user ${userId}:`, error);
|
|
32
|
+
return rejectWithValue(error?.message || 'Failed to fetch follow status');
|
|
33
|
+
}
|
|
34
|
+
}, {
|
|
35
|
+
// Prevent duplicate requests for the same user ID
|
|
36
|
+
condition: ({
|
|
37
|
+
userId
|
|
38
|
+
}, {
|
|
39
|
+
getState
|
|
40
|
+
}) => {
|
|
41
|
+
const state = getState();
|
|
42
|
+
const isAlreadyFetching = state.follow.fetchingUsers[userId];
|
|
43
|
+
if (isAlreadyFetching) {
|
|
44
|
+
console.log(`⚡ Deduplicating fetch request for user ${userId} - already in progress`);
|
|
45
|
+
return false; // Cancel this request
|
|
46
|
+
}
|
|
47
|
+
return true; // Allow this request
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// Async thunk for following/unfollowing users using core services
|
|
52
|
+
const toggleFollowUser = exports.toggleFollowUser = (0, _toolkit.createAsyncThunk)('follow/toggleFollowUser', async ({
|
|
53
|
+
userId,
|
|
54
|
+
oxyServices,
|
|
55
|
+
isCurrentlyFollowing
|
|
56
|
+
}, {
|
|
57
|
+
rejectWithValue,
|
|
58
|
+
dispatch
|
|
59
|
+
}) => {
|
|
60
|
+
try {
|
|
61
|
+
let response;
|
|
62
|
+
let newFollowState;
|
|
63
|
+
if (isCurrentlyFollowing) {
|
|
64
|
+
// Use the core service to unfollow user
|
|
65
|
+
response = await oxyServices.unfollowUser(userId);
|
|
66
|
+
newFollowState = false;
|
|
67
|
+
} else {
|
|
68
|
+
// Use the core service to follow user
|
|
69
|
+
response = await oxyServices.followUser(userId);
|
|
70
|
+
newFollowState = true;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Check if the response indicates success (different APIs might return different formats)
|
|
74
|
+
const isSuccess = response.success !== false && response.action !== 'error';
|
|
75
|
+
if (isSuccess) {
|
|
76
|
+
return {
|
|
77
|
+
userId,
|
|
78
|
+
isFollowing: newFollowState,
|
|
79
|
+
message: response.message || `Successfully ${newFollowState ? 'followed' : 'unfollowed'} user`
|
|
80
|
+
};
|
|
81
|
+
} else {
|
|
82
|
+
return rejectWithValue(response.message || `Failed to ${newFollowState ? 'follow' : 'unfollow'} user`);
|
|
83
|
+
}
|
|
84
|
+
} catch (error) {
|
|
85
|
+
// Enhanced error handling with state mismatch detection
|
|
86
|
+
let errorMessage = 'Network error occurred';
|
|
87
|
+
if (error?.message) {
|
|
88
|
+
errorMessage = error.message;
|
|
89
|
+
} else if (error?.response?.data?.message) {
|
|
90
|
+
errorMessage = error.response.data.message;
|
|
91
|
+
} else if (error?.data?.message) {
|
|
92
|
+
errorMessage = error.data.message;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Handle state mismatch errors by syncing with backend
|
|
96
|
+
if (errorMessage.includes('Not following this user') && isCurrentlyFollowing) {
|
|
97
|
+
console.warn(`State mismatch detected for user ${userId}: Frontend thinks following, backend says not following. Syncing state...`);
|
|
98
|
+
// Auto-sync with backend state
|
|
99
|
+
try {
|
|
100
|
+
const actualStatus = await oxyServices.getFollowStatus(userId);
|
|
101
|
+
dispatch({
|
|
102
|
+
type: 'follow/setFollowingStatus',
|
|
103
|
+
payload: {
|
|
104
|
+
userId,
|
|
105
|
+
isFollowing: actualStatus.isFollowing
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return rejectWithValue('State synced with backend. Please try again.');
|
|
109
|
+
} catch (syncError) {
|
|
110
|
+
console.error('Failed to sync state with backend:', syncError);
|
|
111
|
+
}
|
|
112
|
+
} else if (errorMessage.includes('Already following this user') && !isCurrentlyFollowing) {
|
|
113
|
+
console.warn(`State mismatch detected for user ${userId}: Frontend thinks not following, backend says following. Syncing state...`);
|
|
114
|
+
// Auto-sync with backend state
|
|
115
|
+
try {
|
|
116
|
+
const actualStatus = await oxyServices.getFollowStatus(userId);
|
|
117
|
+
dispatch({
|
|
118
|
+
type: 'follow/setFollowingStatus',
|
|
119
|
+
payload: {
|
|
120
|
+
userId,
|
|
121
|
+
isFollowing: actualStatus.isFollowing
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return rejectWithValue('State synced with backend. Please try again.');
|
|
125
|
+
} catch (syncError) {
|
|
126
|
+
console.error('Failed to sync state with backend:', syncError);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return rejectWithValue(errorMessage);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
const followSlice = exports.followSlice = (0, _toolkit.createSlice)({
|
|
133
|
+
name: 'follow',
|
|
134
|
+
initialState: _types.initialFollowState,
|
|
135
|
+
reducers: {
|
|
136
|
+
setFollowingStatus(state, action) {
|
|
137
|
+
const {
|
|
138
|
+
userId,
|
|
139
|
+
isFollowing
|
|
140
|
+
} = action.payload;
|
|
141
|
+
state.followingUsers[userId] = isFollowing;
|
|
142
|
+
state.errors[userId] = null;
|
|
143
|
+
},
|
|
144
|
+
clearFollowError(state, action) {
|
|
145
|
+
const userId = action.payload;
|
|
146
|
+
state.errors[userId] = null;
|
|
147
|
+
},
|
|
148
|
+
resetFollowState(state) {
|
|
149
|
+
state.followingUsers = {};
|
|
150
|
+
state.loadingUsers = {};
|
|
151
|
+
state.fetchingUsers = {};
|
|
152
|
+
state.errors = {};
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
extraReducers: builder => {
|
|
156
|
+
builder
|
|
157
|
+
// Handle fetchFollowStatus
|
|
158
|
+
.addCase(fetchFollowStatus.pending, (state, action) => {
|
|
159
|
+
const {
|
|
160
|
+
userId
|
|
161
|
+
} = action.meta.arg;
|
|
162
|
+
state.fetchingUsers[userId] = true;
|
|
163
|
+
state.errors[userId] = null;
|
|
164
|
+
}).addCase(fetchFollowStatus.fulfilled, (state, action) => {
|
|
165
|
+
const {
|
|
166
|
+
userId,
|
|
167
|
+
isFollowing
|
|
168
|
+
} = action.payload;
|
|
169
|
+
state.followingUsers[userId] = isFollowing;
|
|
170
|
+
state.fetchingUsers[userId] = false;
|
|
171
|
+
state.errors[userId] = null;
|
|
172
|
+
}).addCase(fetchFollowStatus.rejected, (state, action) => {
|
|
173
|
+
const {
|
|
174
|
+
userId
|
|
175
|
+
} = action.meta.arg;
|
|
176
|
+
state.fetchingUsers[userId] = false;
|
|
177
|
+
// Don't update follow state on fetch errors - preserve existing/initial state
|
|
178
|
+
if (action.payload !== 'Not authenticated') {
|
|
179
|
+
console.warn(`Failed to fetch follow status for user ${userId}:`, action.payload);
|
|
180
|
+
}
|
|
181
|
+
})
|
|
182
|
+
// Handle toggleFollowUser
|
|
183
|
+
.addCase(toggleFollowUser.pending, (state, action) => {
|
|
184
|
+
const {
|
|
185
|
+
userId
|
|
186
|
+
} = action.meta.arg;
|
|
187
|
+
state.loadingUsers[userId] = true;
|
|
188
|
+
state.errors[userId] = null;
|
|
189
|
+
}).addCase(toggleFollowUser.fulfilled, (state, action) => {
|
|
190
|
+
const {
|
|
191
|
+
userId,
|
|
192
|
+
isFollowing
|
|
193
|
+
} = action.payload;
|
|
194
|
+
state.followingUsers[userId] = isFollowing;
|
|
195
|
+
state.loadingUsers[userId] = false;
|
|
196
|
+
state.errors[userId] = null;
|
|
197
|
+
}).addCase(toggleFollowUser.rejected, (state, action) => {
|
|
198
|
+
const {
|
|
199
|
+
userId
|
|
200
|
+
} = action.meta.arg;
|
|
201
|
+
state.loadingUsers[userId] = false;
|
|
202
|
+
state.errors[userId] = action.error.message || 'Failed to update follow status';
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// Export actions
|
|
208
|
+
const followActions = exports.followActions = followSlice.actions;
|
|
209
|
+
const {
|
|
210
|
+
setFollowingStatus,
|
|
211
|
+
clearFollowError,
|
|
212
|
+
resetFollowState
|
|
213
|
+
} = followSlice.actions;
|
|
214
|
+
|
|
215
|
+
// Export thunks
|
|
216
|
+
exports.resetFollowState = resetFollowState;
|
|
217
|
+
exports.clearFollowError = clearFollowError;
|
|
218
|
+
exports.setFollowingStatus = setFollowingStatus;
|
|
219
|
+
const followThunks = exports.followThunks = {
|
|
220
|
+
fetchFollowStatus,
|
|
221
|
+
toggleFollowUser
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
// Export selectors
|
|
225
|
+
const followSelectors = exports.followSelectors = {
|
|
226
|
+
selectFollowingUsers: state => state.follow.followingUsers,
|
|
227
|
+
selectLoadingUsers: state => state.follow.loadingUsers,
|
|
228
|
+
selectFetchingUsers: state => state.follow.fetchingUsers,
|
|
229
|
+
selectFollowErrors: state => state.follow.errors,
|
|
230
|
+
selectIsUserFollowed: (state, userId) => state.follow.followingUsers[userId] ?? false,
|
|
231
|
+
selectIsUserLoading: (state, userId) => state.follow.loadingUsers[userId] ?? false,
|
|
232
|
+
selectIsUserBeingFetched: (state, userId) => state.follow.fetchingUsers[userId] ?? false,
|
|
233
|
+
selectUserError: (state, userId) => state.follow.errors[userId] ?? null
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
// Export reducer
|
|
237
|
+
const followReducer = exports.followReducer = followSlice.reducer;
|
|
238
|
+
//# sourceMappingURL=followSlice.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_toolkit","require","_types","fetchFollowStatus","exports","createAsyncThunk","userId","oxyServices","rejectWithValue","response","getFollowStatus","isFollowing","error","status","message","includes","console","warn","condition","getState","state","isAlreadyFetching","follow","fetchingUsers","log","toggleFollowUser","isCurrentlyFollowing","dispatch","newFollowState","unfollowUser","followUser","isSuccess","success","action","errorMessage","data","actualStatus","type","payload","syncError","followSlice","createSlice","name","initialState","initialFollowState","reducers","setFollowingStatus","followingUsers","errors","clearFollowError","resetFollowState","loadingUsers","extraReducers","builder","addCase","pending","meta","arg","fulfilled","rejected","followActions","actions","followThunks","followSelectors","selectFollowingUsers","selectLoadingUsers","selectFetchingUsers","selectFollowErrors","selectIsUserFollowed","selectIsUserLoading","selectIsUserBeingFetched","selectUserError","followReducer","reducer"],"sourceRoot":"../../../../../src","sources":["ui/store/slices/followSlice.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AAEA;;AAKA;AACO,MAAME,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,yBAAgB,EAC/C,0BAA0B,EAC1B,OAAO;EAAEC,MAAM;EAAEC;AAAkD,CAAC,EAAE;EAAEC;AAAgB,CAAC,KAAK;EAC5F,IAAI;IACF;IACA,MAAMC,QAAQ,GAAG,MAAMF,WAAW,CAACG,eAAe,CAACJ,MAAM,CAAC;IAC1D,OAAO;MAAEA,MAAM;MAAEK,WAAW,EAAEF,QAAQ,CAACE;IAAY,CAAC;EACtD,CAAC,CAAC,OAAOC,KAAU,EAAE;IACnB;IACA,IAAIA,KAAK,EAAEC,MAAM,KAAK,GAAG,IAAID,KAAK,EAAEE,OAAO,EAAEC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;MACvE,OAAOP,eAAe,CAAC,mBAAmB,CAAC;IAC7C;IACA;IACAQ,OAAO,CAACC,IAAI,CAAC,0CAA0CX,MAAM,GAAG,EAAEM,KAAK,CAAC;IACxE,OAAOJ,eAAe,CAACI,KAAK,EAAEE,OAAO,IAAI,+BAA+B,CAAC;EAC3E;AACF,CAAC,EACD;EACE;EACAI,SAAS,EAAEA,CAAC;IAAEZ;EAAO,CAAC,EAAE;IAAEa;EAAS,CAAC,KAAK;IACvC,MAAMC,KAAK,GAAGD,QAAQ,CAAC,CAAc;IACrC,MAAME,iBAAiB,GAAGD,KAAK,CAACE,MAAM,CAACC,aAAa,CAACjB,MAAM,CAAC;IAE5D,IAAIe,iBAAiB,EAAE;MACrBL,OAAO,CAACQ,GA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AK,CAACE,MAAM,CAACC,aAAa;EACnF4C,kBAAkB,EAAG/C,KAA8B,IAAKA,KAAK,CAACE,MAAM,CAAC0B,MAAM;EAC3EoB,oBAAoB,EAAEA,CAAChD,KAA8B,EAAEd,MAAc,KACnEc,KAAK,CAACE,MAAM,CAACyB,cAAc,CAACzC,MAAM,CAAC,IAAI,KAAK;EAC9C+D,mBAAmB,EAAEA,CAACjD,KAA8B,EAAEd,MAAc,KAClEc,KAAK,CAACE,MAAM,CAAC6B,YAAY,CAAC7C,MAAM,CAAC,IAAI,KAAK;EAC5CgE,wBAAwB,EAAEA,CAAClD,KAA8B,EAAEd,MAAc,KACvEc,KAAK,CAACE,MAAM,CAACC,aAAa,CAACjB,MAAM,CAAC,IAAI,KAAK;EAC7CiE,eAAe,EAAEA,CAACnD,KAA8B,EAAEd,MAAc,KAC9Dc,KAAK,CAACE,MAAM,CAAC0B,MAAM,CAAC1C,MAAM,CAAC,IAAI;AACnC,CAAC;;AAED;AACO,MAAMkE,aAAa,GAAApE,OAAA,CAAAoE,aAAA,GAAGhC,WAAW,CAACiC,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "authActions", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _authSlice.authActions;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "authReducer", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _authSlice.authReducer;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "authSelectors", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _authSlice.authSelectors;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "authSlice", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _authSlice.authSlice;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "clearFollowError", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _followSlice.clearFollowError;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "fetchFollowStatus", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _followSlice.fetchFollowStatus;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "followActions", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _followSlice.followActions;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "followReducer", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _followSlice.followReducer;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "followSelectors", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _followSlice.followSelectors;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "followSlice", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _followSlice.followSlice;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "followThunks", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _followSlice.followThunks;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "initialAuthState", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _types.initialAuthState;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "initialFollowState", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _types.initialFollowState;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "loginFailure", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function () {
|
|
87
|
+
return _authSlice.loginFailure;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "loginStart", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _authSlice.loginStart;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
Object.defineProperty(exports, "loginSuccess", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
get: function () {
|
|
99
|
+
return _authSlice.loginSuccess;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
Object.defineProperty(exports, "logout", {
|
|
103
|
+
enumerable: true,
|
|
104
|
+
get: function () {
|
|
105
|
+
return _authSlice.logout;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
Object.defineProperty(exports, "resetFollowState", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _followSlice.resetFollowState;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(exports, "setFollowingStatus", {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
get: function () {
|
|
117
|
+
return _followSlice.setFollowingStatus;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
Object.defineProperty(exports, "toggleFollowUser", {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _followSlice.toggleFollowUser;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
var _authSlice = require("./authSlice");
|
|
127
|
+
var _followSlice = require("./followSlice");
|
|
128
|
+
var _types = require("./types");
|
|
129
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_authSlice","require","_followSlice","_types"],"sourceRoot":"../../../../../src","sources":["ui/store/slices/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAAA,UAAA,GAAAC,OAAA;AAWA,IAAAC,YAAA,GAAAD,OAAA;AAcA,IAAAE,MAAA,GAAAF,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.initialFollowState = exports.initialAuthState = void 0;
|
|
7
|
+
const initialAuthState = exports.initialAuthState = {
|
|
8
|
+
user: null,
|
|
9
|
+
isAuthenticated: false,
|
|
10
|
+
isLoading: false,
|
|
11
|
+
error: null
|
|
12
|
+
};
|
|
13
|
+
const initialFollowState = exports.initialFollowState = {
|
|
14
|
+
followingUsers: {},
|
|
15
|
+
loadingUsers: {},
|
|
16
|
+
fetchingUsers: {},
|
|
17
|
+
errors: {}
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["initialAuthState","exports","user","isAuthenticated","isLoading","error","initialFollowState","followingUsers","loadingUsers","fetchingUsers","errors"],"sourceRoot":"../../../../../src","sources":["ui/store/slices/types.ts"],"mappings":";;;;;;AAoBO,MAAMA,gBAA2B,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EACzCE,IAAI,EAAE,IAAI;EACVC,eAAe,EAAE,KAAK;EACtBC,SAAS,EAAE,KAAK;EAChBC,KAAK,EAAE;AACT,CAAC;AAEM,MAAMC,kBAA+B,GAAAL,OAAA,CAAAK,kBAAA,GAAG;EAC7CC,cAAc,EAAE,CAAC,CAAC;EAClBC,YAAY,EAAE,CAAC,CAAC;EAChBC,aAAa,EAAE,CAAC,CAAC;EACjBC,MAAM,EAAE,CAAC;AACX,CAAC","ignoreList":[]}
|
|
@@ -25,4 +25,15 @@ Object.keys(_theme).forEach(function (key) {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
});
|
|
28
|
+
var _shadows = require("./shadows");
|
|
29
|
+
Object.keys(_shadows).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _shadows[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _shadows[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","_shadows"],"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,QAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,QAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,QAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAE,QAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createShadow = createShadow;
|
|
7
|
+
exports.shadows = void 0;
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
/**
|
|
10
|
+
* Cross-platform shadow utility that eliminates "shadow*" deprecation warnings
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates cross-platform shadow styles
|
|
15
|
+
* Uses boxShadow for web and native shadow props for iOS/Android
|
|
16
|
+
*/
|
|
17
|
+
function createShadow(config) {
|
|
18
|
+
const {
|
|
19
|
+
shadowColor = '#000',
|
|
20
|
+
shadowOffset = {
|
|
21
|
+
width: 0,
|
|
22
|
+
height: 2
|
|
23
|
+
},
|
|
24
|
+
shadowOpacity = 0.1,
|
|
25
|
+
shadowRadius = 4,
|
|
26
|
+
elevation = 2
|
|
27
|
+
} = config;
|
|
28
|
+
return _reactNative.Platform.select({
|
|
29
|
+
web: {
|
|
30
|
+
boxShadow: `${shadowOffset.width}px ${shadowOffset.height}px ${shadowRadius}px rgba(${hexToRgb(shadowColor)}, ${shadowOpacity})`
|
|
31
|
+
},
|
|
32
|
+
ios: {
|
|
33
|
+
shadowColor,
|
|
34
|
+
shadowOffset,
|
|
35
|
+
shadowOpacity,
|
|
36
|
+
shadowRadius
|
|
37
|
+
},
|
|
38
|
+
android: {
|
|
39
|
+
elevation
|
|
40
|
+
},
|
|
41
|
+
default: {
|
|
42
|
+
shadowColor,
|
|
43
|
+
shadowOffset,
|
|
44
|
+
shadowOpacity,
|
|
45
|
+
shadowRadius,
|
|
46
|
+
elevation
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Helper function to convert hex color to RGB
|
|
53
|
+
*/
|
|
54
|
+
function hexToRgb(hex) {
|
|
55
|
+
// Remove # if present
|
|
56
|
+
hex = hex.replace('#', '');
|
|
57
|
+
|
|
58
|
+
// Handle shorthand hex colors (e.g., #fff)
|
|
59
|
+
if (hex.length === 3) {
|
|
60
|
+
hex = hex.split('').map(char => char + char).join('');
|
|
61
|
+
}
|
|
62
|
+
const r = parseInt(hex.substr(0, 2), 16);
|
|
63
|
+
const g = parseInt(hex.substr(2, 2), 16);
|
|
64
|
+
const b = parseInt(hex.substr(4, 2), 16);
|
|
65
|
+
return `${r}, ${g}, ${b}`;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Predefined shadow presets
|
|
70
|
+
*/
|
|
71
|
+
const shadows = exports.shadows = {
|
|
72
|
+
small: createShadow({
|
|
73
|
+
shadowColor: '#000',
|
|
74
|
+
shadowOffset: {
|
|
75
|
+
width: 0,
|
|
76
|
+
height: 1
|
|
77
|
+
},
|
|
78
|
+
shadowOpacity: 0.05,
|
|
79
|
+
shadowRadius: 2,
|
|
80
|
+
elevation: 1
|
|
81
|
+
}),
|
|
82
|
+
medium: createShadow({
|
|
83
|
+
shadowColor: '#000',
|
|
84
|
+
shadowOffset: {
|
|
85
|
+
width: 0,
|
|
86
|
+
height: 2
|
|
87
|
+
},
|
|
88
|
+
shadowOpacity: 0.1,
|
|
89
|
+
shadowRadius: 4,
|
|
90
|
+
elevation: 2
|
|
91
|
+
}),
|
|
92
|
+
large: createShadow({
|
|
93
|
+
shadowColor: '#000',
|
|
94
|
+
shadowOffset: {
|
|
95
|
+
width: 0,
|
|
96
|
+
height: 4
|
|
97
|
+
},
|
|
98
|
+
shadowOpacity: 0.15,
|
|
99
|
+
shadowRadius: 8,
|
|
100
|
+
elevation: 4
|
|
101
|
+
}),
|
|
102
|
+
card: createShadow({
|
|
103
|
+
shadowColor: '#000',
|
|
104
|
+
shadowOffset: {
|
|
105
|
+
width: 0,
|
|
106
|
+
height: 2
|
|
107
|
+
},
|
|
108
|
+
shadowOpacity: 0.08,
|
|
109
|
+
shadowRadius: 8,
|
|
110
|
+
elevation: 3
|
|
111
|
+
}),
|
|
112
|
+
button: createShadow({
|
|
113
|
+
shadowColor: '#000',
|
|
114
|
+
shadowOffset: {
|
|
115
|
+
width: 0,
|
|
116
|
+
height: 2
|
|
117
|
+
},
|
|
118
|
+
shadowOpacity: 0.1,
|
|
119
|
+
shadowRadius: 4,
|
|
120
|
+
elevation: 2
|
|
121
|
+
})
|
|
122
|
+
};
|
|
123
|
+
//# sourceMappingURL=shadows.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","createShadow","config","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","Platform","select","web","boxShadow","hexToRgb","ios","android","default","hex","replace","length","split","map","char","join","r","parseInt","substr","g","b","shadows","exports","small","medium","large","card","button"],"sourceRoot":"../../../../src","sources":["ui/styles/shadows.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA;AACA;AACA;;AASA;AACA;AACA;AACA;AACO,SAASC,YAAYA,CAACC,MAAoB,EAAE;EACjD,MAAM;IACJC,WAAW,GAAG,MAAM;IACpBC,YAAY,GAAG;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACtCC,aAAa,GAAG,GAAG;IACnBC,YAAY,GAAG,CAAC;IAChBC,SAAS,GAAG;EACd,CAAC,GAAGP,MAAM;EAEV,OAAOQ,qBAAQ,CAACC,MAAM,CAAC;IACrBC,GAAG,EAAE;MACHC,SAAS,EAAE,GAAGT,YAAY,CAACC,KAAK,MAAMD,YAAY,CAACE,MAAM,MAAME,YAAY,WAAWM,QAAQ,CAACX,WAAW,CAAC,KAAKI,aAAa;IAC/H,CAAC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C,YAAY,CAAC;IACnBE,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC,CAAC;EAEFyB,KAAK,EAAEjC,YAAY,CAAC;IAClBE,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF0B,IAAI,EAAElC,YAAY,CAAC;IACjBE,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF2B,MAAM,EAAEnC,YAAY,CAAC;IACnBE,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC;AACH,CAAC","ignoreList":[]}
|
package/lib/module/core/index.js
CHANGED
|
@@ -1648,65 +1648,6 @@ export class OxyServices {
|
|
|
1648
1648
|
throw this.handleError(error);
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
|
-
|
|
1652
|
-
/**
|
|
1653
|
-
* Health check endpoint to verify API connectivity
|
|
1654
|
-
* @returns Health status and basic server info
|
|
1655
|
-
*/
|
|
1656
|
-
async healthCheck() {
|
|
1657
|
-
try {
|
|
1658
|
-
const res = await this.client.get('/');
|
|
1659
|
-
return res.data;
|
|
1660
|
-
} catch (error) {
|
|
1661
|
-
throw this.handleError(error);
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
/**
|
|
1666
|
-
* Download file content using authenticated request
|
|
1667
|
-
* @param fileId - The file ID to download
|
|
1668
|
-
* @returns Response object for further processing
|
|
1669
|
-
*/
|
|
1670
|
-
async downloadFileContent(fileId) {
|
|
1671
|
-
try {
|
|
1672
|
-
const downloadUrl = this.getFileDownloadUrl(fileId);
|
|
1673
|
-
const response = await fetch(downloadUrl);
|
|
1674
|
-
if (!response.ok) {
|
|
1675
|
-
throw new Error(`Download failed: ${response.status} ${response.statusText}`);
|
|
1676
|
-
}
|
|
1677
|
-
return response;
|
|
1678
|
-
} catch (error) {
|
|
1679
|
-
throw this.handleError(error);
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
/**
|
|
1684
|
-
* Get file content as text using authenticated request
|
|
1685
|
-
* @param fileId - The file ID to get content for
|
|
1686
|
-
* @returns File content as string
|
|
1687
|
-
*/
|
|
1688
|
-
async getFileContentAsText(fileId) {
|
|
1689
|
-
try {
|
|
1690
|
-
const response = await this.downloadFileContent(fileId);
|
|
1691
|
-
return await response.text();
|
|
1692
|
-
} catch (error) {
|
|
1693
|
-
throw this.handleError(error);
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
/**
|
|
1698
|
-
* Get file content as blob using authenticated request
|
|
1699
|
-
* @param fileId - The file ID to get content for
|
|
1700
|
-
* @returns File content as blob
|
|
1701
|
-
*/
|
|
1702
|
-
async getFileContentAsBlob(fileId) {
|
|
1703
|
-
try {
|
|
1704
|
-
const response = await this.downloadFileContent(fileId);
|
|
1705
|
-
return await response.blob();
|
|
1706
|
-
} catch (error) {
|
|
1707
|
-
throw this.handleError(error);
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
1651
|
}
|
|
1711
1652
|
export default OxyServices;
|
|
1712
1653
|
//# sourceMappingURL=index.js.map
|