@oxyhq/services 5.13.19 → 5.13.21

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.
@@ -56,8 +56,9 @@
56
56
  *
57
57
  * See method JSDoc for more details and options.
58
58
  */
59
- import { OxyServicesBase, type OxyConfig } from './OxyServices.base';
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,889 +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
- uploadRawFile(file: File | Blob, visibility?: "private" | "public" | "unlisted", metadata?: Record<string, any>): Promise<any>;
395
- calculateSHA256(file: File | Blob): Promise<string>;
396
- assetInit(sha256: string, size: number, mime: string): Promise<import(".").AssetInitResponse>;
397
- assetComplete(fileId: string, originalName: string, size: number, mime: string, visibility?: "private" | "public" | "unlisted", metadata?: Record<string, any>): Promise<any>;
398
- assetUpload(file: File, visibility?: "private" | "public" | "unlisted", metadata?: Record<string, any>, onProgress?: ((progress: number) => void) | undefined): Promise<any>;
399
- uploadToPresignedUrl(url: string, file: File, onProgress?: ((progress: number) => void) | undefined): Promise<void>;
400
- assetLink(fileId: string, app: string, entityType: string, entityId: string, visibility?: "private" | "public" | "unlisted", webhookUrl?: string): Promise<any>;
401
- assetUnlink(fileId: string, app: string, entityType: string, entityId: string): Promise<any>;
402
- assetGet(fileId: string): Promise<any>;
403
- assetGetUrl(fileId: string, variant?: string, expiresIn?: number): Promise<import(".").AssetUrlResponse>;
404
- assetRestore(fileId: string): Promise<any>;
405
- assetDelete(fileId: string, force?: boolean): Promise<any>;
406
- assetGetVariants(fileId: string): Promise<import(".").AssetVariant[]>;
407
- assetUpdateVisibility(fileId: string, visibility: "private" | "public" | "unlisted"): Promise<any>;
408
- uploadAvatar(file: File, userId: string, app?: string): Promise<any>;
409
- uploadProfileBanner(file: File, userId: string, app?: string): Promise<any>;
410
- httpClient: import("./HttpClient").HttpClient;
411
- requestManager: import("./RequestManager").RequestManager;
412
- cloudURL: string;
413
- config: OxyConfig;
414
- makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
415
- getBaseURL(): string;
416
- getClient(): import("./HttpClient").HttpClient;
417
- getMetrics(): {
418
- totalRequests: number;
419
- successfulRequests: number;
420
- failedRequests: number;
421
- cacheHits: number;
422
- cacheMisses: number;
423
- averageResponseTime: number;
424
- };
425
- clearCache(): void;
426
- clearCacheEntry(key: string): void;
427
- getCacheStats(): {
428
- size: number;
429
- hits: number;
430
- misses: number;
431
- hitRate: number;
432
- };
433
- getCloudURL(): string;
434
- setTokens(accessToken: string, refreshToken?: string): void;
435
- clearTokens(): void;
436
- getCurrentUserId(): string | null;
437
- hasValidToken(): boolean;
438
- getAccessToken(): string | null;
439
- waitForAuth(timeoutMs?: number): Promise<boolean>;
440
- waitForAuthentication(timeoutMs?: number): Promise<boolean>;
441
- hasAccessToken(): boolean;
442
- withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
443
- maxRetries?: number;
444
- retryDelay?: number;
445
- authTimeoutMs?: number;
446
- }): Promise<T>;
447
- validate(): Promise<boolean>;
448
- handleError(error: any): Error;
449
- healthCheck(): Promise<{
450
- status: string;
451
- users?: number;
452
- timestamp?: string;
453
- [key: string]: any;
454
- }>;
455
- };
456
- __resetTokensForTests(): void;
457
- } & {
458
- new (...args: any[]): {
459
- getUserKarma(userId: string): Promise<any>;
460
- giveKarma(userId: string, amount: number, reason?: string): Promise<any>;
461
- getUserKarmaTotal(userId: string): Promise<any>;
462
- getUserKarmaHistory(userId: string, limit?: number, offset?: number): Promise<any>;
463
- getKarmaLeaderboard(): Promise<any>;
464
- getKarmaRules(): Promise<any>;
465
- httpClient: import("./HttpClient").HttpClient;
466
- requestManager: import("./RequestManager").RequestManager;
467
- cloudURL: string;
468
- config: OxyConfig;
469
- makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
470
- getBaseURL(): string;
471
- getClient(): import("./HttpClient").HttpClient;
472
- getMetrics(): {
473
- totalRequests: number;
474
- successfulRequests: number;
475
- failedRequests: number;
476
- cacheHits: number;
477
- cacheMisses: number;
478
- averageResponseTime: number;
479
- };
480
- clearCache(): void;
481
- clearCacheEntry(key: string): void;
482
- getCacheStats(): {
483
- size: number;
484
- hits: number;
485
- misses: number;
486
- hitRate: number;
487
- };
488
- getCloudURL(): string;
489
- setTokens(accessToken: string, refreshToken?: string): void;
490
- clearTokens(): void;
491
- getCurrentUserId(): string | null;
492
- hasValidToken(): boolean;
493
- getAccessToken(): string | null;
494
- waitForAuth(timeoutMs?: number): Promise<boolean>;
495
- waitForAuthentication(timeoutMs?: number): Promise<boolean>;
496
- hasAccessToken(): boolean;
497
- withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
498
- maxRetries?: number;
499
- retryDelay?: number;
500
- authTimeoutMs?: number;
501
- }): Promise<T>;
502
- validate(): Promise<boolean>;
503
- handleError(error: any): Error;
504
- healthCheck(): Promise<{
505
- status: string;
506
- users?: number;
507
- timestamp?: string;
508
- [key: string]: any;
509
- }>;
510
- };
511
- __resetTokensForTests(): void;
512
- } & {
513
- new (...args: any[]): {
514
- createPayment(data: any): Promise<any>;
515
- getPayment(paymentId: string): Promise<any>;
516
- getUserPayments(): Promise<any[]>;
517
- httpClient: import("./HttpClient").HttpClient;
518
- requestManager: import("./RequestManager").RequestManager;
519
- cloudURL: string;
520
- config: OxyConfig;
521
- makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
522
- getBaseURL(): string;
523
- getClient(): import("./HttpClient").HttpClient;
524
- getMetrics(): {
525
- totalRequests: number;
526
- successfulRequests: number;
527
- failedRequests: number;
528
- cacheHits: number;
529
- cacheMisses: number;
530
- averageResponseTime: number;
531
- };
532
- clearCache(): void;
533
- clearCacheEntry(key: string): void;
534
- getCacheStats(): {
535
- size: number;
536
- hits: number;
537
- misses: number;
538
- hitRate: number;
539
- };
540
- getCloudURL(): string;
541
- setTokens(accessToken: string, refreshToken?: string): void;
542
- clearTokens(): void;
543
- getCurrentUserId(): string | null;
544
- hasValidToken(): boolean;
545
- getAccessToken(): string | null;
546
- waitForAuth(timeoutMs?: number): Promise<boolean>;
547
- waitForAuthentication(timeoutMs?: number): Promise<boolean>;
548
- hasAccessToken(): boolean;
549
- withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
550
- maxRetries?: number;
551
- retryDelay?: number;
552
- authTimeoutMs?: number;
553
- }): Promise<T>;
554
- validate(): Promise<boolean>;
555
- handleError(error: any): Error;
556
- healthCheck(): Promise<{
557
- status: string;
558
- users?: number;
559
- timestamp?: string;
560
- [key: string]: any;
561
- }>;
562
- };
563
- __resetTokensForTests(): void;
564
- } & {
565
- new (...args: any[]): {
566
- getStorage(): Promise<{
567
- getItem: (key: string) => Promise<string | null>;
568
- setItem: (key: string, value: string) => Promise<void>;
569
- removeItem: (key: string) => Promise<void>;
570
- }>;
571
- getCurrentLanguage(storageKeyPrefix?: string): Promise<string | null>;
572
- getCurrentLanguageMetadata(storageKeyPrefix?: string): Promise<import(".").LanguageMetadata | null>;
573
- getCurrentLanguageName(storageKeyPrefix?: string): Promise<string | null>;
574
- getCurrentNativeLanguageName(storageKeyPrefix?: string): Promise<string | null>;
575
- httpClient: import("./HttpClient").HttpClient;
576
- requestManager: import("./RequestManager").RequestManager;
577
- cloudURL: string;
578
- config: OxyConfig;
579
- makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
580
- getBaseURL(): string;
581
- getClient(): import("./HttpClient").HttpClient;
582
- getMetrics(): {
583
- totalRequests: number;
584
- successfulRequests: number;
585
- failedRequests: number;
586
- cacheHits: number;
587
- cacheMisses: number;
588
- averageResponseTime: number;
589
- };
590
- clearCache(): void;
591
- clearCacheEntry(key: string): void;
592
- getCacheStats(): {
593
- size: number;
594
- hits: number;
595
- misses: number;
596
- hitRate: number;
597
- };
598
- getCloudURL(): string;
599
- setTokens(accessToken: string, refreshToken?: string): void;
600
- clearTokens(): void;
601
- getCurrentUserId(): string | null;
602
- hasValidToken(): boolean;
603
- getAccessToken(): string | null;
604
- waitForAuth(timeoutMs?: number): Promise<boolean>;
605
- waitForAuthentication(timeoutMs?: number): Promise<boolean>;
606
- hasAccessToken(): boolean;
607
- withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
608
- maxRetries?: number;
609
- retryDelay?: number;
610
- authTimeoutMs?: number;
611
- }): Promise<T>;
612
- validate(): Promise<boolean>;
613
- handleError(error: any): Error;
614
- healthCheck(): Promise<{
615
- status: string;
616
- users?: number;
617
- timestamp?: string;
618
- [key: string]: any;
619
- }>;
620
- };
621
- __resetTokensForTests(): void;
622
- } & {
623
- new (...args: any[]): {
624
- extractUserId(userIdField: string | {
625
- _id: string;
626
- username?: string;
627
- avatar?: string;
628
- }): string;
629
- isUserInList<T extends import(".").BlockedUser | import(".").RestrictedUser>(userId: string, getUserList: () => Promise<T[]>, getIdField: (item: T) => string | {
630
- _id: string;
631
- username?: string;
632
- avatar?: string;
633
- }): Promise<boolean>;
634
- getBlockedUsers(): Promise<import(".").BlockedUser[]>;
635
- blockUser(userId: string): Promise<{
636
- message: string;
637
- }>;
638
- unblockUser(userId: string): Promise<{
639
- message: string;
640
- }>;
641
- isUserBlocked(userId: string): Promise<boolean>;
642
- getRestrictedUsers(): Promise<import(".").RestrictedUser[]>;
643
- restrictUser(userId: string): Promise<{
644
- message: string;
645
- }>;
646
- unrestrictUser(userId: string): Promise<{
647
- message: string;
648
- }>;
649
- isUserRestricted(userId: string): Promise<boolean>;
650
- httpClient: import("./HttpClient").HttpClient;
651
- requestManager: import("./RequestManager").RequestManager;
652
- cloudURL: string;
653
- config: OxyConfig;
654
- makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
655
- getBaseURL(): string;
656
- getClient(): import("./HttpClient").HttpClient;
657
- getMetrics(): {
658
- totalRequests: number;
659
- successfulRequests: number;
660
- failedRequests: number;
661
- cacheHits: number;
662
- cacheMisses: number;
663
- averageResponseTime: number;
664
- };
665
- clearCache(): void;
666
- clearCacheEntry(key: string): void;
667
- getCacheStats(): {
668
- size: number;
669
- hits: number;
670
- misses: number;
671
- hitRate: number;
672
- };
673
- getCloudURL(): string;
674
- setTokens(accessToken: string, refreshToken?: string): void;
675
- clearTokens(): void;
676
- getCurrentUserId(): string | null;
677
- hasValidToken(): boolean;
678
- getAccessToken(): string | null;
679
- waitForAuth(timeoutMs?: number): Promise<boolean>;
680
- waitForAuthentication(timeoutMs?: number): Promise<boolean>;
681
- hasAccessToken(): boolean;
682
- withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
683
- maxRetries?: number;
684
- retryDelay?: number;
685
- authTimeoutMs?: number;
686
- }): Promise<T>;
687
- validate(): Promise<boolean>;
688
- handleError(error: any): Error;
689
- healthCheck(): Promise<{
690
- status: string;
691
- users?: number;
692
- timestamp?: string;
693
- [key: string]: any;
694
- }>;
695
- };
696
- __resetTokensForTests(): void;
697
- } & {
698
- new (...args: any[]): {
699
- startTotpEnrollment(sessionId: string): Promise<{
700
- secret: string;
701
- otpauthUrl: string;
702
- issuer: string;
703
- label: string;
704
- }>;
705
- verifyTotpEnrollment(sessionId: string, code: string): Promise<{
706
- enabled: boolean;
707
- backupCodes?: string[];
708
- recoveryKey?: string;
709
- }>;
710
- disableTotp(sessionId: string, code: string): Promise<{
711
- disabled: boolean;
712
- }>;
713
- httpClient: import("./HttpClient").HttpClient;
714
- requestManager: import("./RequestManager").RequestManager;
715
- cloudURL: string;
716
- config: OxyConfig;
717
- makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
718
- getBaseURL(): string;
719
- getClient(): import("./HttpClient").HttpClient;
720
- getMetrics(): {
721
- totalRequests: number;
722
- successfulRequests: number;
723
- failedRequests: number;
724
- cacheHits: number;
725
- cacheMisses: number;
726
- averageResponseTime: number;
727
- };
728
- clearCache(): void;
729
- clearCacheEntry(key: string): void;
730
- getCacheStats(): {
731
- size: number;
732
- hits: number;
733
- misses: number;
734
- hitRate: number;
735
- };
736
- getCloudURL(): string;
737
- setTokens(accessToken: string, refreshToken?: string): void;
738
- clearTokens(): void;
739
- getCurrentUserId(): string | null;
740
- hasValidToken(): boolean;
741
- getAccessToken(): string | null;
742
- waitForAuth(timeoutMs?: number): Promise<boolean>;
743
- waitForAuthentication(timeoutMs?: number): Promise<boolean>;
744
- hasAccessToken(): boolean;
745
- withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
746
- maxRetries?: number;
747
- retryDelay?: number;
748
- authTimeoutMs?: number;
749
- }): Promise<T>;
750
- validate(): Promise<boolean>;
751
- handleError(error: any): Error;
752
- healthCheck(): Promise<{
753
- status: string;
754
- users?: number;
755
- timestamp?: string;
756
- [key: string]: any;
757
- }>;
758
- };
759
- __resetTokensForTests(): void;
760
- } & {
761
- new (...args: any[]): {
762
- getProfileByUsername(username: string): Promise<import(".").User>;
763
- searchProfiles(query: string, pagination?: import("..").PaginationParams): Promise<import(".").SearchProfilesResponse>;
764
- getProfileRecommendations(): Promise<{
765
- [key: string]: any;
766
- id: string;
767
- username: string;
768
- name?: {
769
- first?: string;
770
- last?: string;
771
- full?: string;
772
- } | undefined;
773
- description?: string;
774
- _count?: {
775
- followers: number;
776
- following: number;
777
- } | undefined;
778
- }[]>;
779
- getUserById(userId: string): Promise<import(".").User>;
780
- getCurrentUser(): Promise<import(".").User>;
781
- updateProfile(updates: Record<string, any>): Promise<import(".").User>;
782
- getPrivacySettings(userId?: string): Promise<any>;
783
- updatePrivacySettings(settings: Record<string, any>, userId?: string): Promise<any>;
784
- requestAccountVerification(reason: string, evidence?: string): Promise<{
785
- message: string;
786
- requestId: string;
787
- }>;
788
- downloadAccountData(format?: "json" | "csv"): Promise<Blob>;
789
- deleteAccount(password: string, confirmText: string): Promise<{
790
- message: string;
791
- }>;
792
- updateUser(userId: string, updates: Record<string, any>): Promise<import(".").User>;
793
- followUser(userId: string): Promise<{
794
- success: boolean;
795
- message: string;
796
- }>;
797
- unfollowUser(userId: string): Promise<{
798
- success: boolean;
799
- message: string;
800
- }>;
801
- getFollowStatus(userId: string): Promise<{
802
- isFollowing: boolean;
803
- }>;
804
- getUserFollowers(userId: string, pagination?: import("..").PaginationParams): Promise<{
805
- followers: import(".").User[];
806
- total: number;
807
- hasMore: boolean;
808
- }>;
809
- getUserFollowing(userId: string, pagination?: import("..").PaginationParams): Promise<{
810
- following: import(".").User[];
811
- total: number;
812
- hasMore: boolean;
813
- }>;
814
- getNotifications(): Promise<import(".").Notification[]>;
815
- getUnreadCount(): Promise<number>;
816
- createNotification(data: Partial<import(".").Notification>): Promise<import(".").Notification>;
817
- markNotificationAsRead(notificationId: string): Promise<void>;
818
- markAllNotificationsAsRead(): Promise<void>;
819
- deleteNotification(notificationId: string): Promise<void>;
820
- httpClient: import("./HttpClient").HttpClient;
821
- requestManager: import("./RequestManager").RequestManager;
822
- cloudURL: string;
823
- config: OxyConfig;
824
- makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
825
- getBaseURL(): string;
826
- getClient(): import("./HttpClient").HttpClient;
827
- getMetrics(): {
828
- totalRequests: number;
829
- successfulRequests: number;
830
- failedRequests: number;
831
- cacheHits: number;
832
- cacheMisses: number;
833
- averageResponseTime: number;
834
- };
835
- clearCache(): void;
836
- clearCacheEntry(key: string): void;
837
- getCacheStats(): {
838
- size: number;
839
- hits: number;
840
- misses: number;
841
- hitRate: number;
842
- };
843
- getCloudURL(): string;
844
- setTokens(accessToken: string, refreshToken?: string): void;
845
- clearTokens(): void;
846
- getCurrentUserId(): string | null;
847
- hasValidToken(): boolean;
848
- getAccessToken(): string | null;
849
- waitForAuth(timeoutMs?: number): Promise<boolean>;
850
- waitForAuthentication(timeoutMs?: number): Promise<boolean>;
851
- hasAccessToken(): boolean;
852
- withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
853
- maxRetries?: number;
854
- retryDelay?: number;
855
- authTimeoutMs?: number;
856
- }): Promise<T>;
857
- validate(): Promise<boolean>;
858
- handleError(error: any): Error;
859
- healthCheck(): Promise<{
860
- status: string;
861
- users?: number;
862
- timestamp?: string;
863
- [key: string]: any;
864
- }>;
865
- };
866
- __resetTokensForTests(): void;
867
- } & {
868
- new (...args: any[]): {
869
- signUp(username: string, email: string, password: string): Promise<{
870
- message: string;
871
- token: string;
872
- user: import(".").User;
873
- }>;
874
- requestRecovery(identifier: string): Promise<{
875
- delivery?: string;
876
- destination?: string;
877
- }>;
878
- verifyRecoveryCode(identifier: string, code: string): Promise<{
879
- verified: boolean;
880
- }>;
881
- resetPassword(identifier: string, code: string, newPassword: string): Promise<{
882
- success: boolean;
883
- }>;
884
- resetPasswordWithTotp(identifier: string, code: string, newPassword: string): Promise<{
885
- success: boolean;
886
- }>;
887
- resetPasswordWithBackupCode(identifier: string, backupCode: string, newPassword: string): Promise<{
888
- success: boolean;
889
- }>;
890
- resetPasswordWithRecoveryKey(identifier: string, recoveryKey: string, newPassword: string): Promise<{
891
- success: boolean;
892
- nextRecoveryKey?: string;
893
- }>;
894
- signIn(username: string, password: string, deviceName?: string, deviceFingerprint?: any): Promise<import(".").SessionLoginResponse | {
895
- mfaRequired: true;
896
- mfaToken: string;
897
- expiresAt: string;
898
- }>;
899
- verifyTotpLogin(mfaToken: string, code: string): Promise<import(".").SessionLoginResponse>;
900
- getUserBySession(sessionId: string): Promise<import(".").User>;
901
- getUsersBySessions(sessionIds: string[]): Promise<{
902
- sessionId: string;
903
- user: import(".").User | null;
904
- }[]>;
905
- getTokenBySession(sessionId: string): Promise<{
906
- accessToken: string;
907
- expiresAt: string;
908
- }>;
909
- getSessionsBySessionId(sessionId: string): Promise<any[]>;
910
- logoutSession(sessionId: string, targetSessionId?: string): Promise<void>;
911
- logoutAllSessions(sessionId: string): Promise<void>;
912
- validateSession(sessionId: string, options?: {
913
- deviceFingerprint?: string;
914
- useHeaderValidation?: boolean;
915
- }): Promise<{
916
- valid: boolean;
917
- expiresAt: string;
918
- lastActivity: string;
919
- user: import(".").User;
920
- sessionId?: string;
921
- source?: string;
922
- }>;
923
- checkUsernameAvailability(username: string): Promise<{
924
- available: boolean;
925
- message: string;
926
- }>;
927
- checkEmailAvailability(email: string): Promise<{
928
- available: boolean;
929
- message: string;
930
- }>;
931
- httpClient: import("./HttpClient").HttpClient;
932
- requestManager: import("./RequestManager").RequestManager;
933
- cloudURL: string;
934
- config: OxyConfig;
935
- makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("./RequestManager").RequestOptions): Promise<T>;
936
- getBaseURL(): string;
937
- getClient(): import("./HttpClient").HttpClient;
938
- getMetrics(): {
939
- totalRequests: number;
940
- successfulRequests: number;
941
- failedRequests: number;
942
- cacheHits: number;
943
- cacheMisses: number;
944
- averageResponseTime: number;
945
- };
946
- clearCache(): void;
947
- clearCacheEntry(key: string): void;
948
- getCacheStats(): {
949
- size: number;
950
- hits: number;
951
- misses: number;
952
- hitRate: number;
953
- };
954
- getCloudURL(): string;
955
- setTokens(accessToken: string, refreshToken?: string): void;
956
- clearTokens(): void;
957
- getCurrentUserId(): string | null;
958
- hasValidToken(): boolean;
959
- getAccessToken(): string | null;
960
- waitForAuth(timeoutMs?: number): Promise<boolean>;
961
- waitForAuthentication(timeoutMs?: number): Promise<boolean>;
962
- hasAccessToken(): boolean;
963
- withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
964
- maxRetries?: number;
965
- retryDelay?: number;
966
- authTimeoutMs?: number;
967
- }): Promise<T>;
968
- validate(): Promise<boolean>;
969
- handleError(error: any): Error;
970
- healthCheck(): Promise<{
971
- status: string;
972
- users?: number;
973
- timestamp?: string;
974
- [key: string]: any;
975
- }>;
976
- };
977
- __resetTokensForTests(): void;
978
- } & typeof OxyServicesBase;
97
+ declare const OxyServicesComposed: ReturnType<typeof composeOxyServices>;
979
98
  export declare class OxyServices extends OxyServicesComposed {
980
99
  constructor(config: OxyConfig);
981
100
  }