@oxyhq/services 5.13.25 → 5.13.27
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 +5 -6
- package/lib/commonjs/core/HttpService.js +481 -0
- package/lib/commonjs/core/HttpService.js.map +1 -0
- package/lib/commonjs/core/OxyServices.base.js +29 -26
- package/lib/commonjs/core/OxyServices.base.js.map +1 -1
- package/lib/commonjs/core/OxyServices.js +3 -4
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.assets.js +3 -9
- package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.user.js +9 -5
- package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.utility.js +1 -0
- package/lib/commonjs/core/mixins/OxyServices.utility.js.map +1 -1
- package/lib/commonjs/index.js +15 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +5 -1
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +13 -0
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js +103 -0
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +0 -3
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/utils/errorUtils.js +35 -15
- package/lib/commonjs/utils/errorUtils.js.map +1 -1
- package/lib/module/core/HttpService.js +476 -0
- package/lib/module/core/HttpService.js.map +1 -0
- package/lib/module/core/OxyServices.base.js +29 -26
- package/lib/module/core/OxyServices.base.js.map +1 -1
- package/lib/module/core/OxyServices.js +3 -4
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.assets.js +3 -9
- package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.user.js +9 -5
- package/lib/module/core/mixins/OxyServices.user.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.utility.js +1 -0
- package/lib/module/core/mixins/OxyServices.utility.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +5 -1
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -0
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFileDownloadUrl.js +97 -0
- package/lib/module/ui/hooks/useFileDownloadUrl.js.map +1 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +1 -4
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/utils/errorUtils.js +36 -15
- package/lib/module/utils/errorUtils.js.map +1 -1
- package/lib/typescript/core/HttpService.d.ts +111 -0
- package/lib/typescript/core/HttpService.d.ts.map +1 -0
- package/lib/typescript/core/OxyServices.base.d.ts +6 -8
- package/lib/typescript/core/OxyServices.base.d.ts.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +3 -4
- package/lib/typescript/core/OxyServices.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts +4 -9
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.language.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.language.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.location.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.location.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.totp.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.totp.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.user.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts +4 -5
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts.map +1 -1
- package/lib/typescript/core/mixins/index.d.ts +52 -66
- package/lib/typescript/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -0
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFileDownloadUrl.d.ts +19 -0
- package/lib/typescript/ui/hooks/useFileDownloadUrl.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/utils/errorUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/HttpService.ts +523 -0
- package/src/core/OxyServices.base.ts +36 -34
- package/src/core/OxyServices.ts +3 -4
- package/src/core/mixins/OxyServices.assets.ts +2 -8
- package/src/core/mixins/OxyServices.user.ts +7 -6
- package/src/core/mixins/OxyServices.utility.ts +1 -0
- package/src/index.ts +1 -0
- package/src/ui/components/ProfileCard.tsx +4 -1
- package/src/ui/hooks/index.ts +2 -1
- package/src/ui/hooks/useFileDownloadUrl.ts +118 -0
- package/src/ui/screens/AccountOverviewScreen.tsx +4 -1
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +1 -5
- package/src/utils/errorUtils.ts +65 -19
- package/lib/commonjs/core/HttpClient.js +0 -317
- package/lib/commonjs/core/HttpClient.js.map +0 -1
- package/lib/commonjs/core/RequestManager.js +0 -170
- package/lib/commonjs/core/RequestManager.js.map +0 -1
- package/lib/module/core/HttpClient.js +0 -311
- package/lib/module/core/HttpClient.js.map +0 -1
- package/lib/module/core/RequestManager.js +0 -165
- package/lib/module/core/RequestManager.js.map +0 -1
- package/lib/typescript/core/HttpClient.d.ts +0 -110
- package/lib/typescript/core/HttpClient.d.ts.map +0 -1
- package/lib/typescript/core/RequestManager.d.ts +0 -63
- package/lib/typescript/core/RequestManager.d.ts.map +0 -1
- package/src/core/HttpClient.ts +0 -346
- package/src/core/RequestManager.ts +0 -205
|
@@ -1,311 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* HTTP Client Service
|
|
5
|
-
*
|
|
6
|
-
* Handles all HTTP communication with authentication, interceptors, and error handling.
|
|
7
|
-
* This is the single source of truth for making authenticated HTTP requests.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import axios from 'axios';
|
|
11
|
-
import { jwtDecode } from 'jwt-decode';
|
|
12
|
-
import { handleHttpError } from '../utils/errorUtils';
|
|
13
|
-
import { SimpleLogger } from '../utils/requestUtils';
|
|
14
|
-
/**
|
|
15
|
-
* Token store for authentication
|
|
16
|
-
*/
|
|
17
|
-
class TokenStore {
|
|
18
|
-
accessToken = null;
|
|
19
|
-
refreshToken = null;
|
|
20
|
-
constructor() {}
|
|
21
|
-
static getInstance() {
|
|
22
|
-
if (!TokenStore.instance) {
|
|
23
|
-
TokenStore.instance = new TokenStore();
|
|
24
|
-
}
|
|
25
|
-
return TokenStore.instance;
|
|
26
|
-
}
|
|
27
|
-
setTokens(accessToken, refreshToken = '') {
|
|
28
|
-
this.accessToken = accessToken;
|
|
29
|
-
this.refreshToken = refreshToken;
|
|
30
|
-
}
|
|
31
|
-
getAccessToken() {
|
|
32
|
-
return this.accessToken;
|
|
33
|
-
}
|
|
34
|
-
getRefreshToken() {
|
|
35
|
-
return this.refreshToken;
|
|
36
|
-
}
|
|
37
|
-
clearTokens() {
|
|
38
|
-
this.accessToken = null;
|
|
39
|
-
this.refreshToken = null;
|
|
40
|
-
}
|
|
41
|
-
hasAccessToken() {
|
|
42
|
-
return !!this.accessToken;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* HTTP Client Service
|
|
48
|
-
*
|
|
49
|
-
* Manages Axios instance with authentication interceptors.
|
|
50
|
-
* All HTTP requests should go through this service to ensure authentication.
|
|
51
|
-
*/
|
|
52
|
-
export class HttpClient {
|
|
53
|
-
constructor(config) {
|
|
54
|
-
this.baseURL = config.baseURL;
|
|
55
|
-
this.tokenStore = TokenStore.getInstance();
|
|
56
|
-
this.logger = new SimpleLogger(config.enableLogging || false, config.logLevel || 'error', 'HttpClient');
|
|
57
|
-
const timeout = config.requestTimeout || 5000;
|
|
58
|
-
|
|
59
|
-
// Create Axios instance with optimized configuration
|
|
60
|
-
this.client = axios.create({
|
|
61
|
-
baseURL: config.baseURL,
|
|
62
|
-
timeout,
|
|
63
|
-
headers: {
|
|
64
|
-
'Accept': 'application/json'
|
|
65
|
-
},
|
|
66
|
-
// Enable HTTP keep-alive for connection reuse (Node.js only)
|
|
67
|
-
...(typeof process !== 'undefined' && process.env && typeof window === 'undefined' && typeof require !== 'undefined' ? {
|
|
68
|
-
httpAgent: new (require('http').Agent)({
|
|
69
|
-
keepAlive: true,
|
|
70
|
-
keepAliveMsecs: 1000,
|
|
71
|
-
maxSockets: 50
|
|
72
|
-
}),
|
|
73
|
-
httpsAgent: new (require('https').Agent)({
|
|
74
|
-
keepAlive: true,
|
|
75
|
-
keepAliveMsecs: 1000,
|
|
76
|
-
maxSockets: 50
|
|
77
|
-
})
|
|
78
|
-
} : {})
|
|
79
|
-
});
|
|
80
|
-
this.setupInterceptors();
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Setup axios interceptors for authentication and error handling
|
|
85
|
-
*/
|
|
86
|
-
setupInterceptors() {
|
|
87
|
-
// Request interceptor: Add authentication header
|
|
88
|
-
this.client.interceptors.request.use(async req => {
|
|
89
|
-
const accessToken = this.tokenStore.getAccessToken();
|
|
90
|
-
if (!accessToken) {
|
|
91
|
-
return req;
|
|
92
|
-
}
|
|
93
|
-
try {
|
|
94
|
-
const decoded = jwtDecode(accessToken);
|
|
95
|
-
const currentTime = Math.floor(Date.now() / 1000);
|
|
96
|
-
|
|
97
|
-
// If token expires in less than 60 seconds, refresh it
|
|
98
|
-
if (decoded.exp && decoded.exp - currentTime < 60) {
|
|
99
|
-
if (decoded.sessionId) {
|
|
100
|
-
try {
|
|
101
|
-
// Create a new axios instance to avoid interceptor recursion
|
|
102
|
-
const refreshClient = axios.create({
|
|
103
|
-
baseURL: this.client.defaults.baseURL,
|
|
104
|
-
timeout: this.client.defaults.timeout
|
|
105
|
-
});
|
|
106
|
-
const res = await refreshClient.get(`/api/session/token/${decoded.sessionId}`);
|
|
107
|
-
this.tokenStore.setTokens(res.data.accessToken);
|
|
108
|
-
req.headers.Authorization = `Bearer ${res.data.accessToken}`;
|
|
109
|
-
this.logger.debug('Token refreshed');
|
|
110
|
-
} catch (refreshError) {
|
|
111
|
-
// If refresh fails, use current token anyway
|
|
112
|
-
req.headers.Authorization = `Bearer ${accessToken}`;
|
|
113
|
-
this.logger.warn('Token refresh failed, using current token');
|
|
114
|
-
}
|
|
115
|
-
} else {
|
|
116
|
-
req.headers.Authorization = `Bearer ${accessToken}`;
|
|
117
|
-
}
|
|
118
|
-
} else {
|
|
119
|
-
req.headers.Authorization = `Bearer ${accessToken}`;
|
|
120
|
-
}
|
|
121
|
-
} catch (error) {
|
|
122
|
-
this.logger.error('Error processing token:', error);
|
|
123
|
-
// Even if there's an error, still try to use the token
|
|
124
|
-
req.headers.Authorization = `Bearer ${accessToken}`;
|
|
125
|
-
}
|
|
126
|
-
return req;
|
|
127
|
-
}, error => {
|
|
128
|
-
this.logger.error('Request interceptor error:', error);
|
|
129
|
-
return Promise.reject(error);
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
// Response interceptor: Handle auth errors
|
|
133
|
-
this.client.interceptors.response.use(response => response, error => {
|
|
134
|
-
if (error.response?.status === 401) {
|
|
135
|
-
this.logger.warn('401 Unauthorized, clearing tokens');
|
|
136
|
-
this.tokenStore.clearTokens();
|
|
137
|
-
}
|
|
138
|
-
return Promise.reject(error);
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Get the underlying Axios instance
|
|
144
|
-
* Use this only when you need direct access to Axios features
|
|
145
|
-
*/
|
|
146
|
-
getAxiosInstance() {
|
|
147
|
-
return this.client;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Make a raw HTTP request (no caching, deduplication, etc.)
|
|
152
|
-
* Use this for requests that need to bypass performance features
|
|
153
|
-
*/
|
|
154
|
-
async request(config) {
|
|
155
|
-
try {
|
|
156
|
-
const response = await this.client.request({
|
|
157
|
-
method: config.method,
|
|
158
|
-
url: config.url,
|
|
159
|
-
data: config.data,
|
|
160
|
-
params: config.params,
|
|
161
|
-
timeout: config.timeout,
|
|
162
|
-
signal: config.signal
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
// Unwrap standardized API response format: { data: ... }
|
|
166
|
-
// This handles responses from sendSuccess() and sendPaginated() helpers
|
|
167
|
-
const responseData = response.data;
|
|
168
|
-
|
|
169
|
-
// Handle paginated responses: { data: [...], pagination: {...} }
|
|
170
|
-
// Return the data array directly - the calling method will wrap it appropriately
|
|
171
|
-
if (responseData && typeof responseData === 'object' && 'data' in responseData && 'pagination' in responseData) {
|
|
172
|
-
// For paginated responses, return the data array directly
|
|
173
|
-
// The calling methods like getUserFollowers/getUserFollowing will handle wrapping
|
|
174
|
-
// We return the whole response so methods can access both data and pagination
|
|
175
|
-
return responseData;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// Handle regular success responses: { data: ... }
|
|
179
|
-
if (responseData && typeof responseData === 'object' && 'data' in responseData && !Array.isArray(responseData)) {
|
|
180
|
-
return responseData.data;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// Return as-is for responses that don't use sendSuccess wrapper
|
|
184
|
-
return responseData;
|
|
185
|
-
} catch (error) {
|
|
186
|
-
throw handleHttpError(error);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* GET request convenience method
|
|
192
|
-
*/
|
|
193
|
-
async get(url, config) {
|
|
194
|
-
const response = await this.request({
|
|
195
|
-
method: 'GET',
|
|
196
|
-
url,
|
|
197
|
-
params: config?.params,
|
|
198
|
-
timeout: config?.timeout,
|
|
199
|
-
signal: config?.signal
|
|
200
|
-
});
|
|
201
|
-
return {
|
|
202
|
-
data: response
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* POST request convenience method
|
|
208
|
-
*/
|
|
209
|
-
async post(url, data, config) {
|
|
210
|
-
const response = await this.request({
|
|
211
|
-
method: 'POST',
|
|
212
|
-
url,
|
|
213
|
-
data,
|
|
214
|
-
timeout: config?.timeout,
|
|
215
|
-
signal: config?.signal
|
|
216
|
-
});
|
|
217
|
-
return {
|
|
218
|
-
data: response
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* PUT request convenience method
|
|
224
|
-
*/
|
|
225
|
-
async put(url, data, config) {
|
|
226
|
-
const response = await this.request({
|
|
227
|
-
method: 'PUT',
|
|
228
|
-
url,
|
|
229
|
-
data,
|
|
230
|
-
timeout: config?.timeout,
|
|
231
|
-
signal: config?.signal
|
|
232
|
-
});
|
|
233
|
-
return {
|
|
234
|
-
data: response
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* PATCH request convenience method
|
|
240
|
-
*/
|
|
241
|
-
async patch(url, data, config) {
|
|
242
|
-
const response = await this.request({
|
|
243
|
-
method: 'PATCH',
|
|
244
|
-
url,
|
|
245
|
-
data,
|
|
246
|
-
timeout: config?.timeout,
|
|
247
|
-
signal: config?.signal
|
|
248
|
-
});
|
|
249
|
-
return {
|
|
250
|
-
data: response
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* DELETE request convenience method
|
|
256
|
-
*/
|
|
257
|
-
async delete(url, config) {
|
|
258
|
-
const response = await this.request({
|
|
259
|
-
method: 'DELETE',
|
|
260
|
-
url,
|
|
261
|
-
timeout: config?.timeout,
|
|
262
|
-
signal: config?.signal
|
|
263
|
-
});
|
|
264
|
-
return {
|
|
265
|
-
data: response
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
/**
|
|
270
|
-
* Get base URL
|
|
271
|
-
*/
|
|
272
|
-
getBaseURL() {
|
|
273
|
-
return this.baseURL;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* Set authentication tokens
|
|
278
|
-
*/
|
|
279
|
-
setTokens(accessToken, refreshToken = '') {
|
|
280
|
-
this.tokenStore.setTokens(accessToken, refreshToken);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Clear authentication tokens
|
|
285
|
-
*/
|
|
286
|
-
clearTokens() {
|
|
287
|
-
this.tokenStore.clearTokens();
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* Get access token
|
|
292
|
-
*/
|
|
293
|
-
getAccessToken() {
|
|
294
|
-
return this.tokenStore.getAccessToken();
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/**
|
|
298
|
-
* Check if has access token
|
|
299
|
-
*/
|
|
300
|
-
hasAccessToken() {
|
|
301
|
-
return this.tokenStore.hasAccessToken();
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
// Test-only utility to reset global tokens between jest tests
|
|
305
|
-
static __resetTokensForTests() {
|
|
306
|
-
try {
|
|
307
|
-
TokenStore.getInstance().clearTokens();
|
|
308
|
-
} catch {}
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
//# sourceMappingURL=HttpClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["axios","jwtDecode","handleHttpError","SimpleLogger","TokenStore","accessToken","refreshToken","constructor","getInstance","instance","setTokens","getAccessToken","getRefreshToken","clearTokens","hasAccessToken","HttpClient","config","baseURL","tokenStore","logger","enableLogging","logLevel","timeout","requestTimeout","client","create","headers","process","env","window","require","httpAgent","Agent","keepAlive","keepAliveMsecs","maxSockets","httpsAgent","setupInterceptors","interceptors","request","use","req","decoded","currentTime","Math","floor","Date","now","exp","sessionId","refreshClient","defaults","res","get","data","Authorization","debug","refreshError","warn","error","Promise","reject","response","status","getAxiosInstance","method","url","params","signal","responseData","Array","isArray","post","put","patch","delete","getBaseURL","__resetTokensForTests"],"sourceRoot":"../../../src","sources":["core/HttpClient.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAA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CAACJ,cAAc,CAAC,CAAC;EACzC;;EAEA;EACA,OAAO+D,qBAAqBA,CAAA,EAAS;IACnC,IAAI;MACFzE,UAAU,CAACI,WAAW,CAAC,CAAC,CAACK,WAAW,CAAC,CAAC;IACxC,CAAC,CAAC,MAAM,CAAC;EACX;AACF","ignoreList":[]}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Request Manager
|
|
5
|
-
*
|
|
6
|
-
* Handles request-level optimizations: caching, deduplication, queuing, and retry.
|
|
7
|
-
* Works on top of HttpClient to add performance features.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { TTLCache, registerCacheForCleanup } from '../utils/cache';
|
|
11
|
-
import { RequestDeduplicator, RequestQueue, SimpleLogger } from '../utils/requestUtils';
|
|
12
|
-
import { retryAsync } from '../utils/asyncUtils';
|
|
13
|
-
/**
|
|
14
|
-
* Request Manager
|
|
15
|
-
*
|
|
16
|
-
* Manages request-level optimizations while delegating actual HTTP calls to HttpClient.
|
|
17
|
-
*/
|
|
18
|
-
export class RequestManager {
|
|
19
|
-
// Performance monitoring
|
|
20
|
-
requestMetrics = {
|
|
21
|
-
totalRequests: 0,
|
|
22
|
-
successfulRequests: 0,
|
|
23
|
-
failedRequests: 0,
|
|
24
|
-
cacheHits: 0,
|
|
25
|
-
cacheMisses: 0,
|
|
26
|
-
averageResponseTime: 0
|
|
27
|
-
};
|
|
28
|
-
constructor(httpClient, config) {
|
|
29
|
-
this.httpClient = httpClient;
|
|
30
|
-
this.config = config;
|
|
31
|
-
|
|
32
|
-
// Initialize performance infrastructure
|
|
33
|
-
this.cache = new TTLCache(config.cacheTTL || 5 * 60 * 1000);
|
|
34
|
-
registerCacheForCleanup(this.cache);
|
|
35
|
-
this.deduplicator = new RequestDeduplicator();
|
|
36
|
-
this.requestQueue = new RequestQueue(config.maxConcurrentRequests || 10, config.requestQueueSize || 100);
|
|
37
|
-
this.logger = new SimpleLogger(config.enableLogging || false, config.logLevel || 'error', 'RequestManager');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Make a request with all performance optimizations
|
|
42
|
-
*/
|
|
43
|
-
async request(method, url, data, options = {}) {
|
|
44
|
-
const {
|
|
45
|
-
cache = method === 'GET',
|
|
46
|
-
// Cache GET requests by default
|
|
47
|
-
cacheTTL,
|
|
48
|
-
deduplicate = true,
|
|
49
|
-
retry = this.config.enableRetry !== false,
|
|
50
|
-
maxRetries = this.config.maxRetries || 3,
|
|
51
|
-
timeout,
|
|
52
|
-
signal
|
|
53
|
-
} = options;
|
|
54
|
-
|
|
55
|
-
// Generate cache key
|
|
56
|
-
const cacheKey = cache ? `${method}:${url}:${JSON.stringify(data || {})}` : null;
|
|
57
|
-
|
|
58
|
-
// Check cache first
|
|
59
|
-
if (cache && cacheKey) {
|
|
60
|
-
const cached = this.cache.get(cacheKey);
|
|
61
|
-
if (cached !== null) {
|
|
62
|
-
this.requestMetrics.cacheHits++;
|
|
63
|
-
this.logger.debug('Cache hit:', url);
|
|
64
|
-
return cached;
|
|
65
|
-
}
|
|
66
|
-
this.requestMetrics.cacheMisses++;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// Request function that uses HttpClient
|
|
70
|
-
const requestFn = async () => {
|
|
71
|
-
const startTime = Date.now();
|
|
72
|
-
try {
|
|
73
|
-
const result = await this.httpClient.request({
|
|
74
|
-
method,
|
|
75
|
-
url,
|
|
76
|
-
data: method !== 'GET' ? data : undefined,
|
|
77
|
-
params: method === 'GET' ? data : undefined,
|
|
78
|
-
timeout: timeout || this.config.requestTimeout || 5000,
|
|
79
|
-
signal
|
|
80
|
-
});
|
|
81
|
-
const duration = Date.now() - startTime;
|
|
82
|
-
this.updateMetrics(true, duration);
|
|
83
|
-
this.config.onRequestEnd?.(url, method, duration, true);
|
|
84
|
-
return result;
|
|
85
|
-
} catch (error) {
|
|
86
|
-
const duration = Date.now() - startTime;
|
|
87
|
-
this.updateMetrics(false, duration);
|
|
88
|
-
this.config.onRequestEnd?.(url, method, duration, false);
|
|
89
|
-
this.config.onRequestError?.(url, method, error);
|
|
90
|
-
throw error;
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
// Wrap with retry if enabled
|
|
95
|
-
const requestWithRetry = retry ? () => retryAsync(requestFn, maxRetries, this.config.retryDelay || 1000) : requestFn;
|
|
96
|
-
|
|
97
|
-
// Wrap with deduplication if enabled
|
|
98
|
-
const dedupeKey = deduplicate ? `${method}:${url}:${JSON.stringify(data || {})}` : null;
|
|
99
|
-
const finalRequest = dedupeKey ? () => this.deduplicator.deduplicate(dedupeKey, requestWithRetry) : requestWithRetry;
|
|
100
|
-
|
|
101
|
-
// Execute request (with queue if needed)
|
|
102
|
-
const result = await this.requestQueue.enqueue(finalRequest);
|
|
103
|
-
|
|
104
|
-
// Cache the result if caching is enabled
|
|
105
|
-
if (cache && cacheKey && result) {
|
|
106
|
-
this.cache.set(cacheKey, result, cacheTTL);
|
|
107
|
-
}
|
|
108
|
-
return result;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Update request metrics
|
|
113
|
-
*/
|
|
114
|
-
updateMetrics(success, duration) {
|
|
115
|
-
this.requestMetrics.totalRequests++;
|
|
116
|
-
if (success) {
|
|
117
|
-
this.requestMetrics.successfulRequests++;
|
|
118
|
-
} else {
|
|
119
|
-
this.requestMetrics.failedRequests++;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Update average response time (exponential moving average)
|
|
123
|
-
const alpha = 0.1; // Smoothing factor
|
|
124
|
-
this.requestMetrics.averageResponseTime = this.requestMetrics.averageResponseTime * (1 - alpha) + duration * alpha;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Get performance metrics
|
|
129
|
-
*/
|
|
130
|
-
getMetrics() {
|
|
131
|
-
return {
|
|
132
|
-
...this.requestMetrics
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Clear request cache
|
|
138
|
-
*/
|
|
139
|
-
clearCache() {
|
|
140
|
-
this.cache.clear();
|
|
141
|
-
this.logger.debug('Cache cleared');
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Clear specific cache entry
|
|
146
|
-
*/
|
|
147
|
-
clearCacheEntry(key) {
|
|
148
|
-
this.cache.delete(key);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Get cache statistics
|
|
153
|
-
*/
|
|
154
|
-
getCacheStats() {
|
|
155
|
-
const cacheStats = this.cache.getStats();
|
|
156
|
-
const total = this.requestMetrics.cacheHits + this.requestMetrics.cacheMisses;
|
|
157
|
-
return {
|
|
158
|
-
size: cacheStats.size,
|
|
159
|
-
hits: this.requestMetrics.cacheHits,
|
|
160
|
-
misses: this.requestMetrics.cacheMisses,
|
|
161
|
-
hitRate: total > 0 ? this.requestMetrics.cacheHits / total : 0
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
//# sourceMappingURL=RequestManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["TTLCache","registerCacheForCleanup","RequestDeduplicator","RequestQueue","SimpleLogger","retryAsync","RequestManager","requestMetrics","totalRequests","successfulRequests","failedRequests","cacheHits","cacheMisses","averageResponseTime","constructor","httpClient","config","cache","cacheTTL","deduplicator","requestQueue","maxConcurrentRequests","requestQueueSize","logger","enableLogging","logLevel","request","method","url","data","options","deduplicate","retry","enableRetry","maxRetries","timeout","signal","cacheKey","JSON","stringify","cached","get","debug","requestFn","startTime","Date","now","result","undefined","params","requestTimeout","duration","updateMetrics","onRequestEnd","error","onRequestError","requestWithRetry","retryDelay","dedupeKey","finalRequest","enqueue","set","success","alpha","getMetrics","clearCache","clear","clearCacheEntry","key","delete","getCacheStats","cacheStats","getStats","total","size","hits","misses","hitR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AI,CAACrE,cAAc,CAACK,WAAW;MACvCiE,OAAO,EAAEJ,KAAK,GAAG,CAAC,GAAG,IAAI,CAAClE,cAAc,CAACI,SAAS,GAAG8D,KAAK,GAAG;IAC/D,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HTTP Client Service
|
|
3
|
-
*
|
|
4
|
-
* Handles all HTTP communication with authentication, interceptors, and error handling.
|
|
5
|
-
* This is the single source of truth for making authenticated HTTP requests.
|
|
6
|
-
*/
|
|
7
|
-
import { type AxiosInstance } from 'axios';
|
|
8
|
-
import type { OxyConfig } from '../models/interfaces';
|
|
9
|
-
/**
|
|
10
|
-
* HTTP Client Service
|
|
11
|
-
*
|
|
12
|
-
* Manages Axios instance with authentication interceptors.
|
|
13
|
-
* All HTTP requests should go through this service to ensure authentication.
|
|
14
|
-
*/
|
|
15
|
-
export declare class HttpClient {
|
|
16
|
-
private client;
|
|
17
|
-
private tokenStore;
|
|
18
|
-
private logger;
|
|
19
|
-
private baseURL;
|
|
20
|
-
constructor(config: OxyConfig);
|
|
21
|
-
/**
|
|
22
|
-
* Setup axios interceptors for authentication and error handling
|
|
23
|
-
*/
|
|
24
|
-
private setupInterceptors;
|
|
25
|
-
/**
|
|
26
|
-
* Get the underlying Axios instance
|
|
27
|
-
* Use this only when you need direct access to Axios features
|
|
28
|
-
*/
|
|
29
|
-
getAxiosInstance(): AxiosInstance;
|
|
30
|
-
/**
|
|
31
|
-
* Make a raw HTTP request (no caching, deduplication, etc.)
|
|
32
|
-
* Use this for requests that need to bypass performance features
|
|
33
|
-
*/
|
|
34
|
-
request<T = any>(config: {
|
|
35
|
-
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
36
|
-
url: string;
|
|
37
|
-
data?: any;
|
|
38
|
-
params?: any;
|
|
39
|
-
timeout?: number;
|
|
40
|
-
signal?: AbortSignal;
|
|
41
|
-
}): Promise<T>;
|
|
42
|
-
/**
|
|
43
|
-
* GET request convenience method
|
|
44
|
-
*/
|
|
45
|
-
get<T = any>(url: string, config?: {
|
|
46
|
-
params?: any;
|
|
47
|
-
timeout?: number;
|
|
48
|
-
signal?: AbortSignal;
|
|
49
|
-
}): Promise<{
|
|
50
|
-
data: T;
|
|
51
|
-
}>;
|
|
52
|
-
/**
|
|
53
|
-
* POST request convenience method
|
|
54
|
-
*/
|
|
55
|
-
post<T = any>(url: string, data?: any, config?: {
|
|
56
|
-
timeout?: number;
|
|
57
|
-
signal?: AbortSignal;
|
|
58
|
-
}): Promise<{
|
|
59
|
-
data: T;
|
|
60
|
-
}>;
|
|
61
|
-
/**
|
|
62
|
-
* PUT request convenience method
|
|
63
|
-
*/
|
|
64
|
-
put<T = any>(url: string, data?: any, config?: {
|
|
65
|
-
timeout?: number;
|
|
66
|
-
signal?: AbortSignal;
|
|
67
|
-
}): Promise<{
|
|
68
|
-
data: T;
|
|
69
|
-
}>;
|
|
70
|
-
/**
|
|
71
|
-
* PATCH request convenience method
|
|
72
|
-
*/
|
|
73
|
-
patch<T = any>(url: string, data?: any, config?: {
|
|
74
|
-
timeout?: number;
|
|
75
|
-
signal?: AbortSignal;
|
|
76
|
-
}): Promise<{
|
|
77
|
-
data: T;
|
|
78
|
-
}>;
|
|
79
|
-
/**
|
|
80
|
-
* DELETE request convenience method
|
|
81
|
-
*/
|
|
82
|
-
delete<T = any>(url: string, config?: {
|
|
83
|
-
timeout?: number;
|
|
84
|
-
signal?: AbortSignal;
|
|
85
|
-
}): Promise<{
|
|
86
|
-
data: T;
|
|
87
|
-
}>;
|
|
88
|
-
/**
|
|
89
|
-
* Get base URL
|
|
90
|
-
*/
|
|
91
|
-
getBaseURL(): string;
|
|
92
|
-
/**
|
|
93
|
-
* Set authentication tokens
|
|
94
|
-
*/
|
|
95
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
96
|
-
/**
|
|
97
|
-
* Clear authentication tokens
|
|
98
|
-
*/
|
|
99
|
-
clearTokens(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Get access token
|
|
102
|
-
*/
|
|
103
|
-
getAccessToken(): string | null;
|
|
104
|
-
/**
|
|
105
|
-
* Check if has access token
|
|
106
|
-
*/
|
|
107
|
-
hasAccessToken(): boolean;
|
|
108
|
-
static __resetTokensForTests(): void;
|
|
109
|
-
}
|
|
110
|
-
//# sourceMappingURL=HttpClient.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../../src/core/HttpClient.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAc,EAAE,KAAK,aAAa,EAAuD,MAAM,OAAO,CAAC;AAEvG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAoDtD;;;;;GAKG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,OAAO,CAAS;gBAEZ,MAAM,EAAE,SAAS;IAuC7B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAgEzB;;;OAGG;IACH,gBAAgB,IAAI,aAAa;IAIjC;;;OAGG;IACG,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,MAAM,EAAE;QAC7B,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;QACpD,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC;QACX,MAAM,CAAC,EAAE,GAAG,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,MAAM,CAAC,EAAE,WAAW,CAAC;KACtB,GAAG,OAAO,CAAC,CAAC,CAAC;IAoCd;;OAEG;IACG,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,MAAM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M;IAIpB;;OAEG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,SAAK,GAAG,IAAI;IAIvD;;OAEG;IACH,WAAW,IAAI,IAAI;IAInB;;OAEG;IACH,cAAc,IAAI,MAAM,GAAG,IAAI;IAI/B;;OAEG;IACH,cAAc,IAAI,OAAO;IAKzB,MAAM,CAAC,qBAAqB,IAAI,IAAI;CAKrC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Request Manager
|
|
3
|
-
*
|
|
4
|
-
* Handles request-level optimizations: caching, deduplication, queuing, and retry.
|
|
5
|
-
* Works on top of HttpClient to add performance features.
|
|
6
|
-
*/
|
|
7
|
-
import type { OxyConfig } from '../models/interfaces';
|
|
8
|
-
export interface RequestOptions {
|
|
9
|
-
cache?: boolean;
|
|
10
|
-
cacheTTL?: number;
|
|
11
|
-
deduplicate?: boolean;
|
|
12
|
-
retry?: boolean;
|
|
13
|
-
maxRetries?: number;
|
|
14
|
-
timeout?: number;
|
|
15
|
-
signal?: AbortSignal;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Request Manager
|
|
19
|
-
*
|
|
20
|
-
* Manages request-level optimizations while delegating actual HTTP calls to HttpClient.
|
|
21
|
-
*/
|
|
22
|
-
export declare class RequestManager {
|
|
23
|
-
private cache;
|
|
24
|
-
private deduplicator;
|
|
25
|
-
private requestQueue;
|
|
26
|
-
private logger;
|
|
27
|
-
private config;
|
|
28
|
-
private httpClient;
|
|
29
|
-
private requestMetrics;
|
|
30
|
-
constructor(httpClient: {
|
|
31
|
-
request: (config: any) => Promise<any>;
|
|
32
|
-
}, config: OxyConfig);
|
|
33
|
-
/**
|
|
34
|
-
* Make a request with all performance optimizations
|
|
35
|
-
*/
|
|
36
|
-
request<T>(method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE', url: string, data?: any, options?: RequestOptions): Promise<T>;
|
|
37
|
-
/**
|
|
38
|
-
* Update request metrics
|
|
39
|
-
*/
|
|
40
|
-
private updateMetrics;
|
|
41
|
-
/**
|
|
42
|
-
* Get performance metrics
|
|
43
|
-
*/
|
|
44
|
-
getMetrics(): typeof this.requestMetrics;
|
|
45
|
-
/**
|
|
46
|
-
* Clear request cache
|
|
47
|
-
*/
|
|
48
|
-
clearCache(): void;
|
|
49
|
-
/**
|
|
50
|
-
* Clear specific cache entry
|
|
51
|
-
*/
|
|
52
|
-
clearCacheEntry(key: string): void;
|
|
53
|
-
/**
|
|
54
|
-
* Get cache statistics
|
|
55
|
-
*/
|
|
56
|
-
getCacheStats(): {
|
|
57
|
-
size: number;
|
|
58
|
-
hits: number;
|
|
59
|
-
misses: number;
|
|
60
|
-
hitRate: number;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=RequestManager.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RequestManager.d.ts","sourceRoot":"","sources":["../../../src/core/RequestManager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;GAIG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,YAAY,CAAsB;IAC1C,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,UAAU,CAA6C;IAG/D,OAAO,CAAC,cAAc,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