@oxyhq/services 5.13.20 → 5.13.22
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/OxyServices.base.js +34 -21
- package/lib/commonjs/core/OxyServices.base.js.map +1 -1
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.assets.js +33 -28
- package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.utility.js +3 -0
- package/lib/commonjs/core/mixins/OxyServices.utility.js.map +1 -1
- package/lib/module/core/OxyServices.base.js +34 -21
- package/lib/module/core/OxyServices.base.js.map +1 -1
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.assets.js +33 -28
- package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.utility.js +3 -0
- package/lib/module/core/mixins/OxyServices.utility.js.map +1 -1
- package/lib/typescript/core/OxyServices.base.d.ts +16 -10
- package/lib/typescript/core/OxyServices.base.d.ts.map +1 -1
- package/lib/typescript/core/OxyServices.d.ts +3 -886
- package/lib/typescript/core/OxyServices.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts +4 -2
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.language.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.language.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.location.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.location.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.totp.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.totp.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.user.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -1
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts +0 -2
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts.map +1 -1
- package/lib/typescript/core/mixins/index.d.ts +4 -26
- package/lib/typescript/core/mixins/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/OxyServices.base.ts +37 -22
- package/src/core/OxyServices.ts +1 -1
- package/src/core/mixins/OxyServices.assets.ts +68 -27
- package/src/core/mixins/OxyServices.utility.ts +3 -0
|
@@ -56,8 +56,9 @@
|
|
|
56
56
|
*
|
|
57
57
|
* See method JSDoc for more details and options.
|
|
58
58
|
*/
|
|
59
|
-
import {
|
|
59
|
+
import { type OxyConfig } from './OxyServices.base';
|
|
60
60
|
import { OxyAuthenticationError, OxyAuthenticationTimeoutError } from './OxyServices.errors';
|
|
61
|
+
import { composeOxyServices } from './mixins';
|
|
61
62
|
/**
|
|
62
63
|
* OxyServices - Unified client library for interacting with the Oxy API
|
|
63
64
|
*
|
|
@@ -93,891 +94,7 @@ import { OxyAuthenticationError, OxyAuthenticationTimeoutError } from './OxyServ
|
|
|
93
94
|
* });
|
|
94
95
|
* ```
|
|
95
96
|
*/
|
|
96
|
-
declare const OxyServicesComposed:
|
|
97
|
-
new (...args: any[]): {
|
|
98
|
-
fetchLinkMetadata(url: string): Promise<{
|
|
99
|
-
url: string;
|
|
100
|
-
title: string;
|
|
101
|
-
description: string;
|
|
102
|
-
image?: string;
|
|
103
|
-
}>;
|
|
104
|
-
auth(options?: {
|
|
105
|
-
debug?: boolean;
|
|
106
|
-
onError?: ((error: import(".").ApiError) => any) | undefined;
|
|
107
|
-
loadUser?: boolean;
|
|
108
|
-
session?: boolean;
|
|
109
|
-
}): (req: any, res: any, next: any) => any;
|
|
110
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
111
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
112
|
-
cloudURL: string;
|
|
113
|
-
config: OxyConfig;
|
|
114
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
115
|
-
getBaseURL(): string;
|
|
116
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
117
|
-
getMetrics(): {
|
|
118
|
-
totalRequests: number;
|
|
119
|
-
successfulRequests: number;
|
|
120
|
-
failedRequests: number;
|
|
121
|
-
cacheHits: number;
|
|
122
|
-
cacheMisses: number;
|
|
123
|
-
averageResponseTime: number;
|
|
124
|
-
};
|
|
125
|
-
clearCache(): void;
|
|
126
|
-
clearCacheEntry(key: string): void;
|
|
127
|
-
getCacheStats(): {
|
|
128
|
-
size: number;
|
|
129
|
-
hits: number;
|
|
130
|
-
misses: number;
|
|
131
|
-
hitRate: number;
|
|
132
|
-
};
|
|
133
|
-
getCloudURL(): string;
|
|
134
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
135
|
-
clearTokens(): void;
|
|
136
|
-
getCurrentUserId(): string | null;
|
|
137
|
-
hasValidToken(): boolean;
|
|
138
|
-
getAccessToken(): string | null;
|
|
139
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
140
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
141
|
-
hasAccessToken(): boolean;
|
|
142
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
143
|
-
maxRetries?: number;
|
|
144
|
-
retryDelay?: number;
|
|
145
|
-
authTimeoutMs?: number;
|
|
146
|
-
}): Promise<T>;
|
|
147
|
-
validate(): Promise<boolean>;
|
|
148
|
-
handleError(error: any): Error;
|
|
149
|
-
healthCheck(): Promise<{
|
|
150
|
-
status: string;
|
|
151
|
-
users?: number;
|
|
152
|
-
timestamp?: string;
|
|
153
|
-
[key: string]: any;
|
|
154
|
-
}>;
|
|
155
|
-
};
|
|
156
|
-
__resetTokensForTests(): void;
|
|
157
|
-
} & {
|
|
158
|
-
new (...args: any[]): {
|
|
159
|
-
registerDevice(deviceData: any): Promise<any>;
|
|
160
|
-
getUserDevices(): Promise<any[]>;
|
|
161
|
-
removeDevice(deviceId: string): Promise<void>;
|
|
162
|
-
getDeviceSessions(sessionId: string): Promise<any[]>;
|
|
163
|
-
logoutAllDeviceSessions(sessionId: string, deviceId?: string, excludeCurrent?: boolean): Promise<any>;
|
|
164
|
-
updateDeviceName(sessionId: string, deviceName: string): Promise<any>;
|
|
165
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
166
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
167
|
-
cloudURL: string;
|
|
168
|
-
config: OxyConfig;
|
|
169
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
170
|
-
getBaseURL(): string;
|
|
171
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
172
|
-
getMetrics(): {
|
|
173
|
-
totalRequests: number;
|
|
174
|
-
successfulRequests: number;
|
|
175
|
-
failedRequests: number;
|
|
176
|
-
cacheHits: number;
|
|
177
|
-
cacheMisses: number;
|
|
178
|
-
averageResponseTime: number;
|
|
179
|
-
};
|
|
180
|
-
clearCache(): void;
|
|
181
|
-
clearCacheEntry(key: string): void;
|
|
182
|
-
getCacheStats(): {
|
|
183
|
-
size: number;
|
|
184
|
-
hits: number;
|
|
185
|
-
misses: number;
|
|
186
|
-
hitRate: number;
|
|
187
|
-
};
|
|
188
|
-
getCloudURL(): string;
|
|
189
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
190
|
-
clearTokens(): void;
|
|
191
|
-
getCurrentUserId(): string | null;
|
|
192
|
-
hasValidToken(): boolean;
|
|
193
|
-
getAccessToken(): string | null;
|
|
194
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
195
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
196
|
-
hasAccessToken(): boolean;
|
|
197
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
198
|
-
maxRetries?: number;
|
|
199
|
-
retryDelay?: number;
|
|
200
|
-
authTimeoutMs?: number;
|
|
201
|
-
}): Promise<T>;
|
|
202
|
-
validate(): Promise<boolean>;
|
|
203
|
-
handleError(error: any): Error;
|
|
204
|
-
healthCheck(): Promise<{
|
|
205
|
-
status: string;
|
|
206
|
-
users?: number;
|
|
207
|
-
timestamp?: string;
|
|
208
|
-
[key: string]: any;
|
|
209
|
-
}>;
|
|
210
|
-
};
|
|
211
|
-
__resetTokensForTests(): void;
|
|
212
|
-
} & {
|
|
213
|
-
new (...args: any[]): {
|
|
214
|
-
trackEvent(eventName: string, properties?: Record<string, any>): Promise<void>;
|
|
215
|
-
getAnalytics(startDate?: string, endDate?: string): Promise<any>;
|
|
216
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
217
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
218
|
-
cloudURL: string;
|
|
219
|
-
config: OxyConfig;
|
|
220
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
221
|
-
getBaseURL(): string;
|
|
222
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
223
|
-
getMetrics(): {
|
|
224
|
-
totalRequests: number;
|
|
225
|
-
successfulRequests: number;
|
|
226
|
-
failedRequests: number;
|
|
227
|
-
cacheHits: number;
|
|
228
|
-
cacheMisses: number;
|
|
229
|
-
averageResponseTime: number;
|
|
230
|
-
};
|
|
231
|
-
clearCache(): void;
|
|
232
|
-
clearCacheEntry(key: string): void;
|
|
233
|
-
getCacheStats(): {
|
|
234
|
-
size: number;
|
|
235
|
-
hits: number;
|
|
236
|
-
misses: number;
|
|
237
|
-
hitRate: number;
|
|
238
|
-
};
|
|
239
|
-
getCloudURL(): string;
|
|
240
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
241
|
-
clearTokens(): void;
|
|
242
|
-
getCurrentUserId(): string | null;
|
|
243
|
-
hasValidToken(): boolean;
|
|
244
|
-
getAccessToken(): string | null;
|
|
245
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
246
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
247
|
-
hasAccessToken(): boolean;
|
|
248
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
249
|
-
maxRetries?: number;
|
|
250
|
-
retryDelay?: number;
|
|
251
|
-
authTimeoutMs?: number;
|
|
252
|
-
}): Promise<T>;
|
|
253
|
-
validate(): Promise<boolean>;
|
|
254
|
-
handleError(error: any): Error;
|
|
255
|
-
healthCheck(): Promise<{
|
|
256
|
-
status: string;
|
|
257
|
-
users?: number;
|
|
258
|
-
timestamp?: string;
|
|
259
|
-
[key: string]: any;
|
|
260
|
-
}>;
|
|
261
|
-
};
|
|
262
|
-
__resetTokensForTests(): void;
|
|
263
|
-
} & {
|
|
264
|
-
new (...args: any[]): {
|
|
265
|
-
updateLocation(latitude: number, longitude: number): Promise<any>;
|
|
266
|
-
getNearbyUsers(radius?: number): Promise<any[]>;
|
|
267
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
268
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
269
|
-
cloudURL: string;
|
|
270
|
-
config: OxyConfig;
|
|
271
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
272
|
-
getBaseURL(): string;
|
|
273
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
274
|
-
getMetrics(): {
|
|
275
|
-
totalRequests: number;
|
|
276
|
-
successfulRequests: number;
|
|
277
|
-
failedRequests: number;
|
|
278
|
-
cacheHits: number;
|
|
279
|
-
cacheMisses: number;
|
|
280
|
-
averageResponseTime: number;
|
|
281
|
-
};
|
|
282
|
-
clearCache(): void;
|
|
283
|
-
clearCacheEntry(key: string): void;
|
|
284
|
-
getCacheStats(): {
|
|
285
|
-
size: number;
|
|
286
|
-
hits: number;
|
|
287
|
-
misses: number;
|
|
288
|
-
hitRate: number;
|
|
289
|
-
};
|
|
290
|
-
getCloudURL(): string;
|
|
291
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
292
|
-
clearTokens(): void;
|
|
293
|
-
getCurrentUserId(): string | null;
|
|
294
|
-
hasValidToken(): boolean;
|
|
295
|
-
getAccessToken(): string | null;
|
|
296
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
297
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
298
|
-
hasAccessToken(): boolean;
|
|
299
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
300
|
-
maxRetries?: number;
|
|
301
|
-
retryDelay?: number;
|
|
302
|
-
authTimeoutMs?: number;
|
|
303
|
-
}): Promise<T>;
|
|
304
|
-
validate(): Promise<boolean>;
|
|
305
|
-
handleError(error: any): Error;
|
|
306
|
-
healthCheck(): Promise<{
|
|
307
|
-
status: string;
|
|
308
|
-
users?: number;
|
|
309
|
-
timestamp?: string;
|
|
310
|
-
[key: string]: any;
|
|
311
|
-
}>;
|
|
312
|
-
};
|
|
313
|
-
__resetTokensForTests(): void;
|
|
314
|
-
} & {
|
|
315
|
-
new (...args: any[]): {
|
|
316
|
-
getDeveloperApps(): Promise<any[]>;
|
|
317
|
-
createDeveloperApp(data: {
|
|
318
|
-
name: string;
|
|
319
|
-
description?: string;
|
|
320
|
-
webhookUrl: string;
|
|
321
|
-
devWebhookUrl?: string;
|
|
322
|
-
scopes?: string[];
|
|
323
|
-
}): Promise<any>;
|
|
324
|
-
getDeveloperApp(appId: string): Promise<any>;
|
|
325
|
-
updateDeveloperApp(appId: string, data: {
|
|
326
|
-
name?: string;
|
|
327
|
-
description?: string;
|
|
328
|
-
webhookUrl?: string;
|
|
329
|
-
devWebhookUrl?: string;
|
|
330
|
-
scopes?: string[];
|
|
331
|
-
}): Promise<any>;
|
|
332
|
-
regenerateDeveloperAppSecret(appId: string): Promise<any>;
|
|
333
|
-
deleteDeveloperApp(appId: string): Promise<any>;
|
|
334
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
335
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
336
|
-
cloudURL: string;
|
|
337
|
-
config: OxyConfig;
|
|
338
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
339
|
-
getBaseURL(): string;
|
|
340
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
341
|
-
getMetrics(): {
|
|
342
|
-
totalRequests: number;
|
|
343
|
-
successfulRequests: number;
|
|
344
|
-
failedRequests: number;
|
|
345
|
-
cacheHits: number;
|
|
346
|
-
cacheMisses: number;
|
|
347
|
-
averageResponseTime: number;
|
|
348
|
-
};
|
|
349
|
-
clearCache(): void;
|
|
350
|
-
clearCacheEntry(key: string): void;
|
|
351
|
-
getCacheStats(): {
|
|
352
|
-
size: number;
|
|
353
|
-
hits: number;
|
|
354
|
-
misses: number;
|
|
355
|
-
hitRate: number;
|
|
356
|
-
};
|
|
357
|
-
getCloudURL(): string;
|
|
358
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
359
|
-
clearTokens(): void;
|
|
360
|
-
getCurrentUserId(): string | null;
|
|
361
|
-
hasValidToken(): boolean;
|
|
362
|
-
getAccessToken(): string | null;
|
|
363
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
364
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
365
|
-
hasAccessToken(): boolean;
|
|
366
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
367
|
-
maxRetries?: number;
|
|
368
|
-
retryDelay?: number;
|
|
369
|
-
authTimeoutMs?: number;
|
|
370
|
-
}): Promise<T>;
|
|
371
|
-
validate(): Promise<boolean>;
|
|
372
|
-
handleError(error: any): Error;
|
|
373
|
-
healthCheck(): Promise<{
|
|
374
|
-
status: string;
|
|
375
|
-
users?: number;
|
|
376
|
-
timestamp?: string;
|
|
377
|
-
[key: string]: any;
|
|
378
|
-
}>;
|
|
379
|
-
};
|
|
380
|
-
__resetTokensForTests(): void;
|
|
381
|
-
} & {
|
|
382
|
-
new (...args: any[]): {
|
|
383
|
-
deleteFile(fileId: string): Promise<any>;
|
|
384
|
-
getFileDownloadUrl(fileId: string, variant?: string, expiresIn?: number): string;
|
|
385
|
-
getFileDownloadUrlAsync(fileId: string, variant?: string, expiresIn?: number): Promise<string>;
|
|
386
|
-
getFileStreamUrl(fileId: string): string;
|
|
387
|
-
listUserFiles(limit?: number, offset?: number): Promise<{
|
|
388
|
-
files: any[];
|
|
389
|
-
total: number;
|
|
390
|
-
hasMore: boolean;
|
|
391
|
-
}>;
|
|
392
|
-
getFileContentAsText(fileId: string, variant?: string): Promise<string>;
|
|
393
|
-
getFileContentAsBlob(fileId: string, variant?: string): Promise<Blob>;
|
|
394
|
-
getBatchFileAccess(fileIds: string[], context?: string): Promise<Record<string, any>>;
|
|
395
|
-
getFileDownloadUrls(fileIds: string[], context?: string): Promise<Record<string, string>>;
|
|
396
|
-
uploadRawFile(file: File | Blob, visibility?: "private" | "public" | "unlisted", metadata?: Record<string, any>): Promise<any>;
|
|
397
|
-
calculateSHA256(file: File | Blob): Promise<string>;
|
|
398
|
-
assetInit(sha256: string, size: number, mime: string): Promise<import(".").AssetInitResponse>;
|
|
399
|
-
assetComplete(fileId: string, originalName: string, size: number, mime: string, visibility?: "private" | "public" | "unlisted", metadata?: Record<string, any>): Promise<any>;
|
|
400
|
-
assetUpload(file: File, visibility?: "private" | "public" | "unlisted", metadata?: Record<string, any>, onProgress?: ((progress: number) => void) | undefined): Promise<any>;
|
|
401
|
-
uploadToPresignedUrl(url: string, file: File, onProgress?: ((progress: number) => void) | undefined): Promise<void>;
|
|
402
|
-
assetLink(fileId: string, app: string, entityType: string, entityId: string, visibility?: "private" | "public" | "unlisted", webhookUrl?: string): Promise<any>;
|
|
403
|
-
assetUnlink(fileId: string, app: string, entityType: string, entityId: string): Promise<any>;
|
|
404
|
-
assetGet(fileId: string): Promise<any>;
|
|
405
|
-
assetGetUrl(fileId: string, variant?: string, expiresIn?: number): Promise<import(".").AssetUrlResponse>;
|
|
406
|
-
assetRestore(fileId: string): Promise<any>;
|
|
407
|
-
assetDelete(fileId: string, force?: boolean): Promise<any>;
|
|
408
|
-
assetGetVariants(fileId: string): Promise<import(".").AssetVariant[]>;
|
|
409
|
-
assetUpdateVisibility(fileId: string, visibility: "private" | "public" | "unlisted"): Promise<any>;
|
|
410
|
-
uploadAvatar(file: File, userId: string, app?: string): Promise<any>;
|
|
411
|
-
uploadProfileBanner(file: File, userId: string, app?: string): Promise<any>;
|
|
412
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
413
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
414
|
-
cloudURL: string;
|
|
415
|
-
config: OxyConfig;
|
|
416
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
417
|
-
getBaseURL(): string;
|
|
418
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
419
|
-
getMetrics(): {
|
|
420
|
-
totalRequests: number;
|
|
421
|
-
successfulRequests: number;
|
|
422
|
-
failedRequests: number;
|
|
423
|
-
cacheHits: number;
|
|
424
|
-
cacheMisses: number;
|
|
425
|
-
averageResponseTime: number;
|
|
426
|
-
};
|
|
427
|
-
clearCache(): void;
|
|
428
|
-
clearCacheEntry(key: string): void;
|
|
429
|
-
getCacheStats(): {
|
|
430
|
-
size: number;
|
|
431
|
-
hits: number;
|
|
432
|
-
misses: number;
|
|
433
|
-
hitRate: number;
|
|
434
|
-
};
|
|
435
|
-
getCloudURL(): string;
|
|
436
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
437
|
-
clearTokens(): void;
|
|
438
|
-
getCurrentUserId(): string | null;
|
|
439
|
-
hasValidToken(): boolean;
|
|
440
|
-
getAccessToken(): string | null;
|
|
441
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
442
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
443
|
-
hasAccessToken(): boolean;
|
|
444
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
445
|
-
maxRetries?: number;
|
|
446
|
-
retryDelay?: number;
|
|
447
|
-
authTimeoutMs?: number;
|
|
448
|
-
}): Promise<T>;
|
|
449
|
-
validate(): Promise<boolean>;
|
|
450
|
-
handleError(error: any): Error;
|
|
451
|
-
healthCheck(): Promise<{
|
|
452
|
-
status: string;
|
|
453
|
-
users?: number;
|
|
454
|
-
timestamp?: string;
|
|
455
|
-
[key: string]: any;
|
|
456
|
-
}>;
|
|
457
|
-
};
|
|
458
|
-
__resetTokensForTests(): void;
|
|
459
|
-
} & {
|
|
460
|
-
new (...args: any[]): {
|
|
461
|
-
getUserKarma(userId: string): Promise<any>;
|
|
462
|
-
giveKarma(userId: string, amount: number, reason?: string): Promise<any>;
|
|
463
|
-
getUserKarmaTotal(userId: string): Promise<any>;
|
|
464
|
-
getUserKarmaHistory(userId: string, limit?: number, offset?: number): Promise<any>;
|
|
465
|
-
getKarmaLeaderboard(): Promise<any>;
|
|
466
|
-
getKarmaRules(): Promise<any>;
|
|
467
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
468
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
469
|
-
cloudURL: string;
|
|
470
|
-
config: OxyConfig;
|
|
471
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
472
|
-
getBaseURL(): string;
|
|
473
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
474
|
-
getMetrics(): {
|
|
475
|
-
totalRequests: number;
|
|
476
|
-
successfulRequests: number;
|
|
477
|
-
failedRequests: number;
|
|
478
|
-
cacheHits: number;
|
|
479
|
-
cacheMisses: number;
|
|
480
|
-
averageResponseTime: number;
|
|
481
|
-
};
|
|
482
|
-
clearCache(): void;
|
|
483
|
-
clearCacheEntry(key: string): void;
|
|
484
|
-
getCacheStats(): {
|
|
485
|
-
size: number;
|
|
486
|
-
hits: number;
|
|
487
|
-
misses: number;
|
|
488
|
-
hitRate: number;
|
|
489
|
-
};
|
|
490
|
-
getCloudURL(): string;
|
|
491
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
492
|
-
clearTokens(): void;
|
|
493
|
-
getCurrentUserId(): string | null;
|
|
494
|
-
hasValidToken(): boolean;
|
|
495
|
-
getAccessToken(): string | null;
|
|
496
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
497
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
498
|
-
hasAccessToken(): boolean;
|
|
499
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
500
|
-
maxRetries?: number;
|
|
501
|
-
retryDelay?: number;
|
|
502
|
-
authTimeoutMs?: number;
|
|
503
|
-
}): Promise<T>;
|
|
504
|
-
validate(): Promise<boolean>;
|
|
505
|
-
handleError(error: any): Error;
|
|
506
|
-
healthCheck(): Promise<{
|
|
507
|
-
status: string;
|
|
508
|
-
users?: number;
|
|
509
|
-
timestamp?: string;
|
|
510
|
-
[key: string]: any;
|
|
511
|
-
}>;
|
|
512
|
-
};
|
|
513
|
-
__resetTokensForTests(): void;
|
|
514
|
-
} & {
|
|
515
|
-
new (...args: any[]): {
|
|
516
|
-
createPayment(data: any): Promise<any>;
|
|
517
|
-
getPayment(paymentId: string): Promise<any>;
|
|
518
|
-
getUserPayments(): Promise<any[]>;
|
|
519
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
520
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
521
|
-
cloudURL: string;
|
|
522
|
-
config: OxyConfig;
|
|
523
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
524
|
-
getBaseURL(): string;
|
|
525
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
526
|
-
getMetrics(): {
|
|
527
|
-
totalRequests: number;
|
|
528
|
-
successfulRequests: number;
|
|
529
|
-
failedRequests: number;
|
|
530
|
-
cacheHits: number;
|
|
531
|
-
cacheMisses: number;
|
|
532
|
-
averageResponseTime: number;
|
|
533
|
-
};
|
|
534
|
-
clearCache(): void;
|
|
535
|
-
clearCacheEntry(key: string): void;
|
|
536
|
-
getCacheStats(): {
|
|
537
|
-
size: number;
|
|
538
|
-
hits: number;
|
|
539
|
-
misses: number;
|
|
540
|
-
hitRate: number;
|
|
541
|
-
};
|
|
542
|
-
getCloudURL(): string;
|
|
543
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
544
|
-
clearTokens(): void;
|
|
545
|
-
getCurrentUserId(): string | null;
|
|
546
|
-
hasValidToken(): boolean;
|
|
547
|
-
getAccessToken(): string | null;
|
|
548
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
549
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
550
|
-
hasAccessToken(): boolean;
|
|
551
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
552
|
-
maxRetries?: number;
|
|
553
|
-
retryDelay?: number;
|
|
554
|
-
authTimeoutMs?: number;
|
|
555
|
-
}): Promise<T>;
|
|
556
|
-
validate(): Promise<boolean>;
|
|
557
|
-
handleError(error: any): Error;
|
|
558
|
-
healthCheck(): Promise<{
|
|
559
|
-
status: string;
|
|
560
|
-
users?: number;
|
|
561
|
-
timestamp?: string;
|
|
562
|
-
[key: string]: any;
|
|
563
|
-
}>;
|
|
564
|
-
};
|
|
565
|
-
__resetTokensForTests(): void;
|
|
566
|
-
} & {
|
|
567
|
-
new (...args: any[]): {
|
|
568
|
-
getStorage(): Promise<{
|
|
569
|
-
getItem: (key: string) => Promise<string | null>;
|
|
570
|
-
setItem: (key: string, value: string) => Promise<void>;
|
|
571
|
-
removeItem: (key: string) => Promise<void>;
|
|
572
|
-
}>;
|
|
573
|
-
getCurrentLanguage(storageKeyPrefix?: string): Promise<string | null>;
|
|
574
|
-
getCurrentLanguageMetadata(storageKeyPrefix?: string): Promise<import(".").LanguageMetadata | null>;
|
|
575
|
-
getCurrentLanguageName(storageKeyPrefix?: string): Promise<string | null>;
|
|
576
|
-
getCurrentNativeLanguageName(storageKeyPrefix?: string): Promise<string | null>;
|
|
577
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
578
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
579
|
-
cloudURL: string;
|
|
580
|
-
config: OxyConfig;
|
|
581
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
582
|
-
getBaseURL(): string;
|
|
583
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
584
|
-
getMetrics(): {
|
|
585
|
-
totalRequests: number;
|
|
586
|
-
successfulRequests: number;
|
|
587
|
-
failedRequests: number;
|
|
588
|
-
cacheHits: number;
|
|
589
|
-
cacheMisses: number;
|
|
590
|
-
averageResponseTime: number;
|
|
591
|
-
};
|
|
592
|
-
clearCache(): void;
|
|
593
|
-
clearCacheEntry(key: string): void;
|
|
594
|
-
getCacheStats(): {
|
|
595
|
-
size: number;
|
|
596
|
-
hits: number;
|
|
597
|
-
misses: number;
|
|
598
|
-
hitRate: number;
|
|
599
|
-
};
|
|
600
|
-
getCloudURL(): string;
|
|
601
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
602
|
-
clearTokens(): void;
|
|
603
|
-
getCurrentUserId(): string | null;
|
|
604
|
-
hasValidToken(): boolean;
|
|
605
|
-
getAccessToken(): string | null;
|
|
606
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
607
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
608
|
-
hasAccessToken(): boolean;
|
|
609
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
610
|
-
maxRetries?: number;
|
|
611
|
-
retryDelay?: number;
|
|
612
|
-
authTimeoutMs?: number;
|
|
613
|
-
}): Promise<T>;
|
|
614
|
-
validate(): Promise<boolean>;
|
|
615
|
-
handleError(error: any): Error;
|
|
616
|
-
healthCheck(): Promise<{
|
|
617
|
-
status: string;
|
|
618
|
-
users?: number;
|
|
619
|
-
timestamp?: string;
|
|
620
|
-
[key: string]: any;
|
|
621
|
-
}>;
|
|
622
|
-
};
|
|
623
|
-
__resetTokensForTests(): void;
|
|
624
|
-
} & {
|
|
625
|
-
new (...args: any[]): {
|
|
626
|
-
extractUserId(userIdField: string | {
|
|
627
|
-
_id: string;
|
|
628
|
-
username?: string;
|
|
629
|
-
avatar?: string;
|
|
630
|
-
}): string;
|
|
631
|
-
isUserInList<T extends import(".").BlockedUser | import(".").RestrictedUser>(userId: string, getUserList: () => Promise<T[]>, getIdField: (item: T) => string | {
|
|
632
|
-
_id: string;
|
|
633
|
-
username?: string;
|
|
634
|
-
avatar?: string;
|
|
635
|
-
}): Promise<boolean>;
|
|
636
|
-
getBlockedUsers(): Promise<import(".").BlockedUser[]>;
|
|
637
|
-
blockUser(userId: string): Promise<{
|
|
638
|
-
message: string;
|
|
639
|
-
}>;
|
|
640
|
-
unblockUser(userId: string): Promise<{
|
|
641
|
-
message: string;
|
|
642
|
-
}>;
|
|
643
|
-
isUserBlocked(userId: string): Promise<boolean>;
|
|
644
|
-
getRestrictedUsers(): Promise<import(".").RestrictedUser[]>;
|
|
645
|
-
restrictUser(userId: string): Promise<{
|
|
646
|
-
message: string;
|
|
647
|
-
}>;
|
|
648
|
-
unrestrictUser(userId: string): Promise<{
|
|
649
|
-
message: string;
|
|
650
|
-
}>;
|
|
651
|
-
isUserRestricted(userId: string): Promise<boolean>;
|
|
652
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
653
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
654
|
-
cloudURL: string;
|
|
655
|
-
config: OxyConfig;
|
|
656
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
657
|
-
getBaseURL(): string;
|
|
658
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
659
|
-
getMetrics(): {
|
|
660
|
-
totalRequests: number;
|
|
661
|
-
successfulRequests: number;
|
|
662
|
-
failedRequests: number;
|
|
663
|
-
cacheHits: number;
|
|
664
|
-
cacheMisses: number;
|
|
665
|
-
averageResponseTime: number;
|
|
666
|
-
};
|
|
667
|
-
clearCache(): void;
|
|
668
|
-
clearCacheEntry(key: string): void;
|
|
669
|
-
getCacheStats(): {
|
|
670
|
-
size: number;
|
|
671
|
-
hits: number;
|
|
672
|
-
misses: number;
|
|
673
|
-
hitRate: number;
|
|
674
|
-
};
|
|
675
|
-
getCloudURL(): string;
|
|
676
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
677
|
-
clearTokens(): void;
|
|
678
|
-
getCurrentUserId(): string | null;
|
|
679
|
-
hasValidToken(): boolean;
|
|
680
|
-
getAccessToken(): string | null;
|
|
681
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
682
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
683
|
-
hasAccessToken(): boolean;
|
|
684
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
685
|
-
maxRetries?: number;
|
|
686
|
-
retryDelay?: number;
|
|
687
|
-
authTimeoutMs?: number;
|
|
688
|
-
}): Promise<T>;
|
|
689
|
-
validate(): Promise<boolean>;
|
|
690
|
-
handleError(error: any): Error;
|
|
691
|
-
healthCheck(): Promise<{
|
|
692
|
-
status: string;
|
|
693
|
-
users?: number;
|
|
694
|
-
timestamp?: string;
|
|
695
|
-
[key: string]: any;
|
|
696
|
-
}>;
|
|
697
|
-
};
|
|
698
|
-
__resetTokensForTests(): void;
|
|
699
|
-
} & {
|
|
700
|
-
new (...args: any[]): {
|
|
701
|
-
startTotpEnrollment(sessionId: string): Promise<{
|
|
702
|
-
secret: string;
|
|
703
|
-
otpauthUrl: string;
|
|
704
|
-
issuer: string;
|
|
705
|
-
label: string;
|
|
706
|
-
}>;
|
|
707
|
-
verifyTotpEnrollment(sessionId: string, code: string): Promise<{
|
|
708
|
-
enabled: boolean;
|
|
709
|
-
backupCodes?: string[];
|
|
710
|
-
recoveryKey?: string;
|
|
711
|
-
}>;
|
|
712
|
-
disableTotp(sessionId: string, code: string): Promise<{
|
|
713
|
-
disabled: boolean;
|
|
714
|
-
}>;
|
|
715
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
716
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
717
|
-
cloudURL: string;
|
|
718
|
-
config: OxyConfig;
|
|
719
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
720
|
-
getBaseURL(): string;
|
|
721
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
722
|
-
getMetrics(): {
|
|
723
|
-
totalRequests: number;
|
|
724
|
-
successfulRequests: number;
|
|
725
|
-
failedRequests: number;
|
|
726
|
-
cacheHits: number;
|
|
727
|
-
cacheMisses: number;
|
|
728
|
-
averageResponseTime: number;
|
|
729
|
-
};
|
|
730
|
-
clearCache(): void;
|
|
731
|
-
clearCacheEntry(key: string): void;
|
|
732
|
-
getCacheStats(): {
|
|
733
|
-
size: number;
|
|
734
|
-
hits: number;
|
|
735
|
-
misses: number;
|
|
736
|
-
hitRate: number;
|
|
737
|
-
};
|
|
738
|
-
getCloudURL(): string;
|
|
739
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
740
|
-
clearTokens(): void;
|
|
741
|
-
getCurrentUserId(): string | null;
|
|
742
|
-
hasValidToken(): boolean;
|
|
743
|
-
getAccessToken(): string | null;
|
|
744
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
745
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
746
|
-
hasAccessToken(): boolean;
|
|
747
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
748
|
-
maxRetries?: number;
|
|
749
|
-
retryDelay?: number;
|
|
750
|
-
authTimeoutMs?: number;
|
|
751
|
-
}): Promise<T>;
|
|
752
|
-
validate(): Promise<boolean>;
|
|
753
|
-
handleError(error: any): Error;
|
|
754
|
-
healthCheck(): Promise<{
|
|
755
|
-
status: string;
|
|
756
|
-
users?: number;
|
|
757
|
-
timestamp?: string;
|
|
758
|
-
[key: string]: any;
|
|
759
|
-
}>;
|
|
760
|
-
};
|
|
761
|
-
__resetTokensForTests(): void;
|
|
762
|
-
} & {
|
|
763
|
-
new (...args: any[]): {
|
|
764
|
-
getProfileByUsername(username: string): Promise<import(".").User>;
|
|
765
|
-
searchProfiles(query: string, pagination?: import("..").PaginationParams): Promise<import(".").SearchProfilesResponse>;
|
|
766
|
-
getProfileRecommendations(): Promise<{
|
|
767
|
-
[key: string]: any;
|
|
768
|
-
id: string;
|
|
769
|
-
username: string;
|
|
770
|
-
name?: {
|
|
771
|
-
first?: string;
|
|
772
|
-
last?: string;
|
|
773
|
-
full?: string;
|
|
774
|
-
} | undefined;
|
|
775
|
-
description?: string;
|
|
776
|
-
_count?: {
|
|
777
|
-
followers: number;
|
|
778
|
-
following: number;
|
|
779
|
-
} | undefined;
|
|
780
|
-
}[]>;
|
|
781
|
-
getUserById(userId: string): Promise<import(".").User>;
|
|
782
|
-
getCurrentUser(): Promise<import(".").User>;
|
|
783
|
-
updateProfile(updates: Record<string, any>): Promise<import(".").User>;
|
|
784
|
-
getPrivacySettings(userId?: string): Promise<any>;
|
|
785
|
-
updatePrivacySettings(settings: Record<string, any>, userId?: string): Promise<any>;
|
|
786
|
-
requestAccountVerification(reason: string, evidence?: string): Promise<{
|
|
787
|
-
message: string;
|
|
788
|
-
requestId: string;
|
|
789
|
-
}>;
|
|
790
|
-
downloadAccountData(format?: "json" | "csv"): Promise<Blob>;
|
|
791
|
-
deleteAccount(password: string, confirmText: string): Promise<{
|
|
792
|
-
message: string;
|
|
793
|
-
}>;
|
|
794
|
-
updateUser(userId: string, updates: Record<string, any>): Promise<import(".").User>;
|
|
795
|
-
followUser(userId: string): Promise<{
|
|
796
|
-
success: boolean;
|
|
797
|
-
message: string;
|
|
798
|
-
}>;
|
|
799
|
-
unfollowUser(userId: string): Promise<{
|
|
800
|
-
success: boolean;
|
|
801
|
-
message: string;
|
|
802
|
-
}>;
|
|
803
|
-
getFollowStatus(userId: string): Promise<{
|
|
804
|
-
isFollowing: boolean;
|
|
805
|
-
}>;
|
|
806
|
-
getUserFollowers(userId: string, pagination?: import("..").PaginationParams): Promise<{
|
|
807
|
-
followers: import(".").User[];
|
|
808
|
-
total: number;
|
|
809
|
-
hasMore: boolean;
|
|
810
|
-
}>;
|
|
811
|
-
getUserFollowing(userId: string, pagination?: import("..").PaginationParams): Promise<{
|
|
812
|
-
following: import(".").User[];
|
|
813
|
-
total: number;
|
|
814
|
-
hasMore: boolean;
|
|
815
|
-
}>;
|
|
816
|
-
getNotifications(): Promise<import(".").Notification[]>;
|
|
817
|
-
getUnreadCount(): Promise<number>;
|
|
818
|
-
createNotification(data: Partial<import(".").Notification>): Promise<import(".").Notification>;
|
|
819
|
-
markNotificationAsRead(notificationId: string): Promise<void>;
|
|
820
|
-
markAllNotificationsAsRead(): Promise<void>;
|
|
821
|
-
deleteNotification(notificationId: string): Promise<void>;
|
|
822
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
823
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
824
|
-
cloudURL: string;
|
|
825
|
-
config: OxyConfig;
|
|
826
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
827
|
-
getBaseURL(): string;
|
|
828
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
829
|
-
getMetrics(): {
|
|
830
|
-
totalRequests: number;
|
|
831
|
-
successfulRequests: number;
|
|
832
|
-
failedRequests: number;
|
|
833
|
-
cacheHits: number;
|
|
834
|
-
cacheMisses: number;
|
|
835
|
-
averageResponseTime: number;
|
|
836
|
-
};
|
|
837
|
-
clearCache(): void;
|
|
838
|
-
clearCacheEntry(key: string): void;
|
|
839
|
-
getCacheStats(): {
|
|
840
|
-
size: number;
|
|
841
|
-
hits: number;
|
|
842
|
-
misses: number;
|
|
843
|
-
hitRate: number;
|
|
844
|
-
};
|
|
845
|
-
getCloudURL(): string;
|
|
846
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
847
|
-
clearTokens(): void;
|
|
848
|
-
getCurrentUserId(): string | null;
|
|
849
|
-
hasValidToken(): boolean;
|
|
850
|
-
getAccessToken(): string | null;
|
|
851
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
852
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
853
|
-
hasAccessToken(): boolean;
|
|
854
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
855
|
-
maxRetries?: number;
|
|
856
|
-
retryDelay?: number;
|
|
857
|
-
authTimeoutMs?: number;
|
|
858
|
-
}): Promise<T>;
|
|
859
|
-
validate(): Promise<boolean>;
|
|
860
|
-
handleError(error: any): Error;
|
|
861
|
-
healthCheck(): Promise<{
|
|
862
|
-
status: string;
|
|
863
|
-
users?: number;
|
|
864
|
-
timestamp?: string;
|
|
865
|
-
[key: string]: any;
|
|
866
|
-
}>;
|
|
867
|
-
};
|
|
868
|
-
__resetTokensForTests(): void;
|
|
869
|
-
} & {
|
|
870
|
-
new (...args: any[]): {
|
|
871
|
-
signUp(username: string, email: string, password: string): Promise<{
|
|
872
|
-
message: string;
|
|
873
|
-
token: string;
|
|
874
|
-
user: import(".").User;
|
|
875
|
-
}>;
|
|
876
|
-
requestRecovery(identifier: string): Promise<{
|
|
877
|
-
delivery?: string;
|
|
878
|
-
destination?: string;
|
|
879
|
-
}>;
|
|
880
|
-
verifyRecoveryCode(identifier: string, code: string): Promise<{
|
|
881
|
-
verified: boolean;
|
|
882
|
-
}>;
|
|
883
|
-
resetPassword(identifier: string, code: string, newPassword: string): Promise<{
|
|
884
|
-
success: boolean;
|
|
885
|
-
}>;
|
|
886
|
-
resetPasswordWithTotp(identifier: string, code: string, newPassword: string): Promise<{
|
|
887
|
-
success: boolean;
|
|
888
|
-
}>;
|
|
889
|
-
resetPasswordWithBackupCode(identifier: string, backupCode: string, newPassword: string): Promise<{
|
|
890
|
-
success: boolean;
|
|
891
|
-
}>;
|
|
892
|
-
resetPasswordWithRecoveryKey(identifier: string, recoveryKey: string, newPassword: string): Promise<{
|
|
893
|
-
success: boolean;
|
|
894
|
-
nextRecoveryKey?: string;
|
|
895
|
-
}>;
|
|
896
|
-
signIn(username: string, password: string, deviceName?: string, deviceFingerprint?: any): Promise<import(".").SessionLoginResponse | {
|
|
897
|
-
mfaRequired: true;
|
|
898
|
-
mfaToken: string;
|
|
899
|
-
expiresAt: string;
|
|
900
|
-
}>;
|
|
901
|
-
verifyTotpLogin(mfaToken: string, code: string): Promise<import(".").SessionLoginResponse>;
|
|
902
|
-
getUserBySession(sessionId: string): Promise<import(".").User>;
|
|
903
|
-
getUsersBySessions(sessionIds: string[]): Promise<{
|
|
904
|
-
sessionId: string;
|
|
905
|
-
user: import(".").User | null;
|
|
906
|
-
}[]>;
|
|
907
|
-
getTokenBySession(sessionId: string): Promise<{
|
|
908
|
-
accessToken: string;
|
|
909
|
-
expiresAt: string;
|
|
910
|
-
}>;
|
|
911
|
-
getSessionsBySessionId(sessionId: string): Promise<any[]>;
|
|
912
|
-
logoutSession(sessionId: string, targetSessionId?: string): Promise<void>;
|
|
913
|
-
logoutAllSessions(sessionId: string): Promise<void>;
|
|
914
|
-
validateSession(sessionId: string, options?: {
|
|
915
|
-
deviceFingerprint?: string;
|
|
916
|
-
useHeaderValidation?: boolean;
|
|
917
|
-
}): Promise<{
|
|
918
|
-
valid: boolean;
|
|
919
|
-
expiresAt: string;
|
|
920
|
-
lastActivity: string;
|
|
921
|
-
user: import(".").User;
|
|
922
|
-
sessionId?: string;
|
|
923
|
-
source?: string;
|
|
924
|
-
}>;
|
|
925
|
-
checkUsernameAvailability(username: string): Promise<{
|
|
926
|
-
available: boolean;
|
|
927
|
-
message: string;
|
|
928
|
-
}>;
|
|
929
|
-
checkEmailAvailability(email: string): Promise<{
|
|
930
|
-
available: boolean;
|
|
931
|
-
message: string;
|
|
932
|
-
}>;
|
|
933
|
-
httpClient: import("./HttpClient").HttpClient;
|
|
934
|
-
requestManager: import("./RequestManager").RequestManager;
|
|
935
|
-
cloudURL: string;
|
|
936
|
-
config: OxyConfig;
|
|
937
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
|
|
938
|
-
getBaseURL(): string;
|
|
939
|
-
getClient(): import("./HttpClient").HttpClient;
|
|
940
|
-
getMetrics(): {
|
|
941
|
-
totalRequests: number;
|
|
942
|
-
successfulRequests: number;
|
|
943
|
-
failedRequests: number;
|
|
944
|
-
cacheHits: number;
|
|
945
|
-
cacheMisses: number;
|
|
946
|
-
averageResponseTime: number;
|
|
947
|
-
};
|
|
948
|
-
clearCache(): void;
|
|
949
|
-
clearCacheEntry(key: string): void;
|
|
950
|
-
getCacheStats(): {
|
|
951
|
-
size: number;
|
|
952
|
-
hits: number;
|
|
953
|
-
misses: number;
|
|
954
|
-
hitRate: number;
|
|
955
|
-
};
|
|
956
|
-
getCloudURL(): string;
|
|
957
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
958
|
-
clearTokens(): void;
|
|
959
|
-
getCurrentUserId(): string | null;
|
|
960
|
-
hasValidToken(): boolean;
|
|
961
|
-
getAccessToken(): string | null;
|
|
962
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
963
|
-
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
964
|
-
hasAccessToken(): boolean;
|
|
965
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
966
|
-
maxRetries?: number;
|
|
967
|
-
retryDelay?: number;
|
|
968
|
-
authTimeoutMs?: number;
|
|
969
|
-
}): Promise<T>;
|
|
970
|
-
validate(): Promise<boolean>;
|
|
971
|
-
handleError(error: any): Error;
|
|
972
|
-
healthCheck(): Promise<{
|
|
973
|
-
status: string;
|
|
974
|
-
users?: number;
|
|
975
|
-
timestamp?: string;
|
|
976
|
-
[key: string]: any;
|
|
977
|
-
}>;
|
|
978
|
-
};
|
|
979
|
-
__resetTokensForTests(): void;
|
|
980
|
-
} & typeof OxyServicesBase;
|
|
97
|
+
declare const OxyServicesComposed: ReturnType<typeof composeOxyServices>;
|
|
981
98
|
export declare class OxyServices extends OxyServicesComposed {
|
|
982
99
|
constructor(config: OxyConfig);
|
|
983
100
|
}
|