@oxyhq/services 5.13.12 → 5.13.16
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 +10 -0
- package/lib/commonjs/core/OxyServices.base.js +271 -0
- package/lib/commonjs/core/OxyServices.base.js.map +1 -0
- package/lib/commonjs/core/OxyServices.errors.js +26 -0
- package/lib/commonjs/core/OxyServices.errors.js.map +1 -0
- package/lib/commonjs/core/OxyServices.js +58 -2009
- package/lib/commonjs/core/OxyServices.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.analytics.js +60 -0
- package/lib/commonjs/core/mixins/OxyServices.analytics.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.assets.js +406 -0
- package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.auth.js +303 -0
- package/lib/commonjs/core/mixins/OxyServices.auth.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.developer.js +115 -0
- package/lib/commonjs/core/mixins/OxyServices.developer.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.devices.js +119 -0
- package/lib/commonjs/core/mixins/OxyServices.devices.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.karma.js +117 -0
- package/lib/commonjs/core/mixins/OxyServices.karma.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.language.js +124 -0
- package/lib/commonjs/core/mixins/OxyServices.language.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.location.js +55 -0
- package/lib/commonjs/core/mixins/OxyServices.location.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.payment.js +66 -0
- package/lib/commonjs/core/mixins/OxyServices.payment.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.privacy.js +174 -0
- package/lib/commonjs/core/mixins/OxyServices.privacy.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.totp.js +53 -0
- package/lib/commonjs/core/mixins/OxyServices.totp.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.user.js +389 -0
- package/lib/commonjs/core/mixins/OxyServices.user.js.map +1 -0
- package/lib/commonjs/core/mixins/OxyServices.utility.js +161 -0
- package/lib/commonjs/core/mixins/OxyServices.utility.js.map +1 -0
- package/lib/commonjs/core/mixins/index.js +39 -0
- package/lib/commonjs/core/mixins/index.js.map +1 -0
- package/lib/commonjs/core/mixins/mixinHelpers.js +62 -0
- package/lib/commonjs/core/mixins/mixinHelpers.js.map +1 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +26 -47
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +239 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/utils/apiUtils.js +0 -14
- package/lib/commonjs/utils/apiUtils.js.map +1 -1
- package/lib/commonjs/utils/asyncUtils.js +0 -20
- package/lib/commonjs/utils/asyncUtils.js.map +1 -1
- package/lib/module/core/OxyServices.base.js +265 -0
- package/lib/module/core/OxyServices.base.js.map +1 -0
- package/lib/module/core/OxyServices.errors.js +20 -0
- package/lib/module/core/OxyServices.errors.js.map +1 -0
- package/lib/module/core/OxyServices.js +43 -2005
- package/lib/module/core/OxyServices.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.analytics.js +56 -0
- package/lib/module/core/mixins/OxyServices.analytics.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.assets.js +402 -0
- package/lib/module/core/mixins/OxyServices.assets.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.auth.js +299 -0
- package/lib/module/core/mixins/OxyServices.auth.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.developer.js +111 -0
- package/lib/module/core/mixins/OxyServices.developer.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.devices.js +115 -0
- package/lib/module/core/mixins/OxyServices.devices.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.karma.js +113 -0
- package/lib/module/core/mixins/OxyServices.karma.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.language.js +120 -0
- package/lib/module/core/mixins/OxyServices.language.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.location.js +51 -0
- package/lib/module/core/mixins/OxyServices.location.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.payment.js +62 -0
- package/lib/module/core/mixins/OxyServices.payment.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.privacy.js +170 -0
- package/lib/module/core/mixins/OxyServices.privacy.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.totp.js +49 -0
- package/lib/module/core/mixins/OxyServices.totp.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.user.js +385 -0
- package/lib/module/core/mixins/OxyServices.user.js.map +1 -0
- package/lib/module/core/mixins/OxyServices.utility.js +156 -0
- package/lib/module/core/mixins/OxyServices.utility.js.map +1 -0
- package/lib/module/core/mixins/index.js +36 -0
- package/lib/module/core/mixins/index.js.map +1 -0
- package/lib/module/core/mixins/mixinHelpers.js +56 -0
- package/lib/module/core/mixins/mixinHelpers.js.map +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +26 -47
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/navigation/types.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +241 -3
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/utils/apiUtils.js +0 -13
- package/lib/module/utils/apiUtils.js.map +1 -1
- package/lib/module/utils/asyncUtils.js +0 -20
- package/lib/module/utils/asyncUtils.js.map +1 -1
- package/lib/typescript/core/OxyServices.base.d.ts +123 -0
- package/lib/typescript/core/OxyServices.base.d.ts.map +1 -0
- package/lib/typescript/core/OxyServices.d.ts +969 -682
- package/lib/typescript/core/OxyServices.d.ts.map +1 -1
- package/lib/typescript/core/OxyServices.errors.d.ts +12 -0
- package/lib/typescript/core/OxyServices.errors.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts +70 -0
- package/lib/typescript/core/mixins/OxyServices.analytics.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts +159 -0
- package/lib/typescript/core/mixins/OxyServices.assets.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts +168 -0
- package/lib/typescript/core/mixins/OxyServices.auth.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts +103 -0
- package/lib/typescript/core/mixins/OxyServices.developer.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts +93 -0
- package/lib/typescript/core/mixins/OxyServices.devices.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts +89 -0
- package/lib/typescript/core/mixins/OxyServices.karma.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.language.d.ts +85 -0
- package/lib/typescript/core/mixins/OxyServices.language.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.location.d.ts +68 -0
- package/lib/typescript/core/mixins/OxyServices.location.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts +74 -0
- package/lib/typescript/core/mixins/OxyServices.payment.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts +126 -0
- package/lib/typescript/core/mixins/OxyServices.privacy.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.totp.d.ts +69 -0
- package/lib/typescript/core/mixins/OxyServices.totp.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.user.d.ts +189 -0
- package/lib/typescript/core/mixins/OxyServices.user.d.ts.map +1 -0
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts +97 -0
- package/lib/typescript/core/mixins/OxyServices.utility.d.ts.map +1 -0
- package/lib/typescript/core/mixins/index.d.ts +898 -0
- package/lib/typescript/core/mixins/index.d.ts.map +1 -0
- package/lib/typescript/core/mixins/mixinHelpers.d.ts +32 -0
- package/lib/typescript/core/mixins/mixinHelpers.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +36 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +2 -6
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +0 -1
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/utils/apiUtils.d.ts +0 -7
- package/lib/typescript/utils/apiUtils.d.ts.map +1 -1
- package/lib/typescript/utils/asyncUtils.d.ts +0 -11
- package/lib/typescript/utils/asyncUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/OxyServices.base.ts +311 -0
- package/src/core/OxyServices.errors.ts +26 -0
- package/src/core/OxyServices.ts +43 -2026
- package/src/core/mixins/OxyServices.analytics.ts +53 -0
- package/src/core/mixins/OxyServices.assets.ts +390 -0
- package/src/core/mixins/OxyServices.auth.ts +275 -0
- package/src/core/mixins/OxyServices.developer.ts +114 -0
- package/src/core/mixins/OxyServices.devices.ts +103 -0
- package/src/core/mixins/OxyServices.karma.ts +111 -0
- package/src/core/mixins/OxyServices.language.ts +127 -0
- package/src/core/mixins/OxyServices.location.ts +46 -0
- package/src/core/mixins/OxyServices.payment.ts +59 -0
- package/src/core/mixins/OxyServices.privacy.ts +182 -0
- package/src/core/mixins/OxyServices.totp.ts +36 -0
- package/src/core/mixins/OxyServices.user.ts +380 -0
- package/src/core/mixins/OxyServices.utility.ts +187 -0
- package/src/core/mixins/index.ts +58 -0
- package/src/core/mixins/mixinHelpers.ts +69 -0
- package/src/index.ts +4 -0
- package/src/models/interfaces.ts +40 -0
- package/src/ui/context/OxyContext.tsx +35 -53
- package/src/ui/navigation/types.ts +0 -1
- package/src/ui/screens/PrivacySettingsScreen.tsx +240 -2
- package/src/utils/apiUtils.ts +0 -14
- package/src/utils/asyncUtils.ts +0 -20
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +0 -192
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +0 -142
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +0 -113
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +0 -132
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js +0 -83
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js.map +0 -1
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js +0 -58
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +0 -186
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +0 -136
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +0 -108
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +0 -127
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js +0 -78
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js.map +0 -1
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js +0 -53
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js.map +0 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +0 -28
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -25
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +0 -20
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +0 -24
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +0 -15
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +0 -1
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +0 -13
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +0 -1
- package/src/ui/screens/internal/SignInPasswordStep.tsx +0 -184
- package/src/ui/screens/internal/SignInUsernameStep.tsx +0 -145
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +0 -112
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +0 -132
- package/src/ui/screens/internal/SignUpSummaryStep.tsx +0 -66
- package/src/ui/screens/internal/SignUpWelcomeStep.tsx +0 -52
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.devices.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.devices.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAExD,GAAG,EAAE;QAI1B;;;;WAIG;mCAC8B,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QAQnD;;;WAGG;0BACqB,OAAO,CAAC,GAAG,EAAE,CAAC;QAUtC;;;WAGG;+BAC0B,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;QAQnD;;;;;WAKG;qCACgC,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QAa1D;;;;;;WAMG;2CACsC,MAAM,aAAa,MAAM,mBAAmB,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC;QAW3G;;;;;WAKG;oCAC+B,MAAM,cAAc,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAU08D,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAA4wF,CAAC;qBAAwB,CAAC;;;;;MAFx3J"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Karma Methods Mixin
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for karma system management
|
|
5
|
+
*/
|
|
6
|
+
import type { OxyServicesBase } from '../OxyServices.base';
|
|
7
|
+
export declare function OxyServicesKarmaMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
8
|
+
new (...args: any[]): {
|
|
9
|
+
/**
|
|
10
|
+
* Get user karma
|
|
11
|
+
*/
|
|
12
|
+
getUserKarma(userId: string): Promise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* Give karma to user
|
|
15
|
+
*/
|
|
16
|
+
giveKarma(userId: string, amount: number, reason?: string): Promise<any>;
|
|
17
|
+
/**
|
|
18
|
+
* Get user karma total
|
|
19
|
+
* @param userId - The user ID
|
|
20
|
+
* @returns User karma total
|
|
21
|
+
*/
|
|
22
|
+
getUserKarmaTotal(userId: string): Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* Get user karma history
|
|
25
|
+
* @param userId - The user ID
|
|
26
|
+
* @param limit - Optional limit for results
|
|
27
|
+
* @param offset - Optional offset for pagination
|
|
28
|
+
* @returns User karma history
|
|
29
|
+
*/
|
|
30
|
+
getUserKarmaHistory(userId: string, limit?: number, offset?: number): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Get karma leaderboard
|
|
33
|
+
* @returns Karma leaderboard
|
|
34
|
+
*/
|
|
35
|
+
getKarmaLeaderboard(): Promise<any>;
|
|
36
|
+
/**
|
|
37
|
+
* Get karma rules
|
|
38
|
+
* @returns Karma rules
|
|
39
|
+
*/
|
|
40
|
+
getKarmaRules(): Promise<any>;
|
|
41
|
+
httpClient: import("../HttpClient").HttpClient;
|
|
42
|
+
requestManager: import("../RequestManager").RequestManager;
|
|
43
|
+
cloudURL: string;
|
|
44
|
+
config: import("../OxyServices.base").OxyConfig;
|
|
45
|
+
makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../RequestManager").RequestOptions): Promise<T_1>;
|
|
46
|
+
getBaseURL(): string;
|
|
47
|
+
getClient(): import("../HttpClient").HttpClient;
|
|
48
|
+
getMetrics(): {
|
|
49
|
+
totalRequests: number;
|
|
50
|
+
successfulRequests: number;
|
|
51
|
+
failedRequests: number;
|
|
52
|
+
cacheHits: number;
|
|
53
|
+
cacheMisses: number;
|
|
54
|
+
averageResponseTime: number;
|
|
55
|
+
};
|
|
56
|
+
clearCache(): void;
|
|
57
|
+
clearCacheEntry(key: string): void;
|
|
58
|
+
getCacheStats(): {
|
|
59
|
+
size: number;
|
|
60
|
+
hits: number;
|
|
61
|
+
misses: number;
|
|
62
|
+
hitRate: number;
|
|
63
|
+
};
|
|
64
|
+
getCloudURL(): string;
|
|
65
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
66
|
+
clearTokens(): void;
|
|
67
|
+
getCurrentUserId(): string | null;
|
|
68
|
+
hasValidToken(): boolean;
|
|
69
|
+
getAccessToken(): string | null;
|
|
70
|
+
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
71
|
+
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
72
|
+
hasAccessToken(): boolean;
|
|
73
|
+
withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
|
|
74
|
+
maxRetries?: number;
|
|
75
|
+
retryDelay?: number;
|
|
76
|
+
authTimeoutMs?: number;
|
|
77
|
+
}): Promise<T_1>;
|
|
78
|
+
validate(): Promise<boolean>;
|
|
79
|
+
handleError(error: any): Error;
|
|
80
|
+
healthCheck(): Promise<{
|
|
81
|
+
status: string;
|
|
82
|
+
users?: number;
|
|
83
|
+
timestamp?: string;
|
|
84
|
+
[key: string]: any;
|
|
85
|
+
}>;
|
|
86
|
+
};
|
|
87
|
+
__resetTokensForTests(): void;
|
|
88
|
+
} & T;
|
|
89
|
+
//# sourceMappingURL=OxyServices.karma.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.karma.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.karma.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAEtD,GAAG,EAAE;QAG1B;;WAEG;6BACwB,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAWhD;;WAEG;0BACqB,MAAM,UAAU,MAAM,WAAW,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAW9E;;;;WAIG;kCAC6B,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAWrD;;;;;;WAMG;oCAC+B,MAAM,UAAU,MAAM,WAAW,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAexF;;;WAGG;+BAC0B,OAAO,CAAC,GAAG,CAAC;QAWzC;;;WAGG;yBACoB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAa82E,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAA4wF,CAAC;qBAAwB,CAAC;;;;;MAFpvK"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { LanguageMetadata } from '../../utils/languageUtils';
|
|
2
|
+
import type { OxyServicesBase } from '../OxyServices.base';
|
|
3
|
+
export declare function OxyServicesLanguageMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
4
|
+
new (...args: any[]): {
|
|
5
|
+
/**
|
|
6
|
+
* Get appropriate storage for the platform (similar to DeviceManager)
|
|
7
|
+
*/
|
|
8
|
+
getStorage(): Promise<{
|
|
9
|
+
getItem: (key: string) => Promise<string | null>;
|
|
10
|
+
setItem: (key: string, value: string) => Promise<void>;
|
|
11
|
+
removeItem: (key: string) => Promise<void>;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* Get the current language from storage or user profile
|
|
15
|
+
* @param storageKeyPrefix - Optional prefix for storage key (default: 'oxy_session')
|
|
16
|
+
* @returns The current language code (e.g., 'en-US') or null if not set
|
|
17
|
+
*/
|
|
18
|
+
getCurrentLanguage(storageKeyPrefix?: string): Promise<string | null>;
|
|
19
|
+
/**
|
|
20
|
+
* Get the current language with metadata (name, nativeName, etc.)
|
|
21
|
+
* @param storageKeyPrefix - Optional prefix for storage key (default: 'oxy_session')
|
|
22
|
+
* @returns Language metadata object or null if not set
|
|
23
|
+
*/
|
|
24
|
+
getCurrentLanguageMetadata(storageKeyPrefix?: string): Promise<LanguageMetadata | null>;
|
|
25
|
+
/**
|
|
26
|
+
* Get the current language name (e.g., 'English')
|
|
27
|
+
* @param storageKeyPrefix - Optional prefix for storage key (default: 'oxy_session')
|
|
28
|
+
* @returns Language name or null if not set
|
|
29
|
+
*/
|
|
30
|
+
getCurrentLanguageName(storageKeyPrefix?: string): Promise<string | null>;
|
|
31
|
+
/**
|
|
32
|
+
* Get the current native language name (e.g., 'Español')
|
|
33
|
+
* @param storageKeyPrefix - Optional prefix for storage key (default: 'oxy_session')
|
|
34
|
+
* @returns Native language name or null if not set
|
|
35
|
+
*/
|
|
36
|
+
getCurrentNativeLanguageName(storageKeyPrefix?: string): Promise<string | null>;
|
|
37
|
+
httpClient: import("../HttpClient").HttpClient;
|
|
38
|
+
requestManager: import("../RequestManager").RequestManager;
|
|
39
|
+
cloudURL: string;
|
|
40
|
+
config: import("../OxyServices.base").OxyConfig;
|
|
41
|
+
makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../RequestManager").RequestOptions): Promise<T_1>;
|
|
42
|
+
getBaseURL(): string;
|
|
43
|
+
getClient(): import("../HttpClient").HttpClient;
|
|
44
|
+
getMetrics(): {
|
|
45
|
+
totalRequests: number;
|
|
46
|
+
successfulRequests: number;
|
|
47
|
+
failedRequests: number;
|
|
48
|
+
cacheHits: number;
|
|
49
|
+
cacheMisses: number;
|
|
50
|
+
averageResponseTime: number;
|
|
51
|
+
};
|
|
52
|
+
clearCache(): void;
|
|
53
|
+
clearCacheEntry(key: string): void;
|
|
54
|
+
getCacheStats(): {
|
|
55
|
+
size: number;
|
|
56
|
+
hits: number;
|
|
57
|
+
misses: number;
|
|
58
|
+
hitRate: number;
|
|
59
|
+
};
|
|
60
|
+
getCloudURL(): string;
|
|
61
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
62
|
+
clearTokens(): void;
|
|
63
|
+
getCurrentUserId(): string | null;
|
|
64
|
+
hasValidToken(): boolean;
|
|
65
|
+
getAccessToken(): string | null;
|
|
66
|
+
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
67
|
+
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
68
|
+
hasAccessToken(): boolean;
|
|
69
|
+
withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
|
|
70
|
+
maxRetries?: number;
|
|
71
|
+
retryDelay?: number;
|
|
72
|
+
authTimeoutMs?: number;
|
|
73
|
+
}): Promise<T_1>;
|
|
74
|
+
validate(): Promise<boolean>;
|
|
75
|
+
handleError(error: any): Error;
|
|
76
|
+
healthCheck(): Promise<{
|
|
77
|
+
status: string;
|
|
78
|
+
users?: number;
|
|
79
|
+
timestamp?: string;
|
|
80
|
+
[key: string]: any;
|
|
81
|
+
}>;
|
|
82
|
+
};
|
|
83
|
+
__resetTokensForTests(): void;
|
|
84
|
+
} & T;
|
|
85
|
+
//# sourceMappingURL=OxyServices.language.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.language.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.language.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAEzD,GAAG,EAAE;QAG1B;;WAEG;sBACwB,OAAO,CAAC;YACjC,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;YACjD,OAAO,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;YACvD,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;SAC5C,CAAC;QAuCF;;;;WAIG;8CACwC,MAAM,GAAmB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;QA8B1F;;;;WAIG;sDACgD,MAAM,GAAmB,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;QAK5G;;;;WAIG;kDAC4C,MAAM,GAAmB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;QAM9F;;;;WAIG;wDACkD,MAAM,GAAmB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAQsR,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAA4wF,CAAC;qBAAwB,CAAC;;;;;MAF7tG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Location Methods Mixin
|
|
3
|
+
*/
|
|
4
|
+
import type { OxyServicesBase } from '../OxyServices.base';
|
|
5
|
+
export declare function OxyServicesLocationMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
6
|
+
new (...args: any[]): {
|
|
7
|
+
/**
|
|
8
|
+
* Update user location
|
|
9
|
+
* @param latitude - Latitude coordinate
|
|
10
|
+
* @param longitude - Longitude coordinate
|
|
11
|
+
* @returns Location update result
|
|
12
|
+
*/
|
|
13
|
+
updateLocation(latitude: number, longitude: number): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* Get nearby users
|
|
16
|
+
* @param radius - Optional search radius in meters
|
|
17
|
+
* @returns Array of nearby users
|
|
18
|
+
*/
|
|
19
|
+
getNearbyUsers(radius?: number): Promise<any[]>;
|
|
20
|
+
httpClient: import("../HttpClient").HttpClient;
|
|
21
|
+
requestManager: import("../RequestManager").RequestManager;
|
|
22
|
+
cloudURL: string;
|
|
23
|
+
config: import("../OxyServices.base").OxyConfig;
|
|
24
|
+
makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../RequestManager").RequestOptions): Promise<T_1>;
|
|
25
|
+
getBaseURL(): string;
|
|
26
|
+
getClient(): import("../HttpClient").HttpClient;
|
|
27
|
+
getMetrics(): {
|
|
28
|
+
totalRequests: number;
|
|
29
|
+
successfulRequests: number;
|
|
30
|
+
failedRequests: number;
|
|
31
|
+
cacheHits: number;
|
|
32
|
+
cacheMisses: number;
|
|
33
|
+
averageResponseTime: number;
|
|
34
|
+
};
|
|
35
|
+
clearCache(): void;
|
|
36
|
+
clearCacheEntry(key: string): void;
|
|
37
|
+
getCacheStats(): {
|
|
38
|
+
size: number;
|
|
39
|
+
hits: number;
|
|
40
|
+
misses: number;
|
|
41
|
+
hitRate: number;
|
|
42
|
+
};
|
|
43
|
+
getCloudURL(): string;
|
|
44
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
45
|
+
clearTokens(): void;
|
|
46
|
+
getCurrentUserId(): string | null;
|
|
47
|
+
hasValidToken(): boolean;
|
|
48
|
+
getAccessToken(): string | null;
|
|
49
|
+
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
50
|
+
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
51
|
+
hasAccessToken(): boolean;
|
|
52
|
+
withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
|
|
53
|
+
maxRetries?: number;
|
|
54
|
+
retryDelay?: number;
|
|
55
|
+
authTimeoutMs?: number;
|
|
56
|
+
}): Promise<T_1>;
|
|
57
|
+
validate(): Promise<boolean>;
|
|
58
|
+
handleError(error: any): Error;
|
|
59
|
+
healthCheck(): Promise<{
|
|
60
|
+
status: string;
|
|
61
|
+
users?: number;
|
|
62
|
+
timestamp?: string;
|
|
63
|
+
[key: string]: any;
|
|
64
|
+
}>;
|
|
65
|
+
};
|
|
66
|
+
__resetTokensForTests(): void;
|
|
67
|
+
} & T;
|
|
68
|
+
//# sourceMappingURL=OxyServices.location.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.location.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.location.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,wBAAgB,wBAAwB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAEzD,GAAG,EAAE;QAI1B;;;;;WAKG;iCAC4B,MAAM,aAAa,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAWvE;;;;WAIG;gCAC2B,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAao/H,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAA4wF,CAAC;qBAAwB,CAAC;;;;;MAF54N"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Payment Methods Mixin
|
|
3
|
+
*
|
|
4
|
+
* Provides methods for payment processing and management
|
|
5
|
+
*/
|
|
6
|
+
import type { OxyServicesBase } from '../OxyServices.base';
|
|
7
|
+
export declare function OxyServicesPaymentMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
8
|
+
new (...args: any[]): {
|
|
9
|
+
/**
|
|
10
|
+
* Create a payment
|
|
11
|
+
* @param data - Payment data
|
|
12
|
+
* @returns Created payment object
|
|
13
|
+
*/
|
|
14
|
+
createPayment(data: any): Promise<any>;
|
|
15
|
+
/**
|
|
16
|
+
* Get payment by ID
|
|
17
|
+
* @param paymentId - The payment ID
|
|
18
|
+
* @returns Payment object
|
|
19
|
+
*/
|
|
20
|
+
getPayment(paymentId: string): Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* Get user payments
|
|
23
|
+
* @returns Array of user payments
|
|
24
|
+
*/
|
|
25
|
+
getUserPayments(): Promise<any[]>;
|
|
26
|
+
httpClient: import("../HttpClient").HttpClient;
|
|
27
|
+
requestManager: import("../RequestManager").RequestManager;
|
|
28
|
+
cloudURL: string;
|
|
29
|
+
config: import("../OxyServices.base").OxyConfig;
|
|
30
|
+
makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../RequestManager").RequestOptions): Promise<T_1>;
|
|
31
|
+
getBaseURL(): string;
|
|
32
|
+
getClient(): import("../HttpClient").HttpClient;
|
|
33
|
+
getMetrics(): {
|
|
34
|
+
totalRequests: number;
|
|
35
|
+
successfulRequests: number;
|
|
36
|
+
failedRequests: number;
|
|
37
|
+
cacheHits: number;
|
|
38
|
+
cacheMisses: number;
|
|
39
|
+
averageResponseTime: number;
|
|
40
|
+
};
|
|
41
|
+
clearCache(): void;
|
|
42
|
+
clearCacheEntry(key: string): void;
|
|
43
|
+
getCacheStats(): {
|
|
44
|
+
size: number;
|
|
45
|
+
hits: number;
|
|
46
|
+
misses: number;
|
|
47
|
+
hitRate: number;
|
|
48
|
+
};
|
|
49
|
+
getCloudURL(): string;
|
|
50
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
51
|
+
clearTokens(): void;
|
|
52
|
+
getCurrentUserId(): string | null;
|
|
53
|
+
hasValidToken(): boolean;
|
|
54
|
+
getAccessToken(): string | null;
|
|
55
|
+
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
56
|
+
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
57
|
+
hasAccessToken(): boolean;
|
|
58
|
+
withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
|
|
59
|
+
maxRetries?: number;
|
|
60
|
+
retryDelay?: number;
|
|
61
|
+
authTimeoutMs?: number;
|
|
62
|
+
}): Promise<T_1>;
|
|
63
|
+
validate(): Promise<boolean>;
|
|
64
|
+
handleError(error: any): Error;
|
|
65
|
+
healthCheck(): Promise<{
|
|
66
|
+
status: string;
|
|
67
|
+
users?: number;
|
|
68
|
+
timestamp?: string;
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
}>;
|
|
71
|
+
};
|
|
72
|
+
__resetTokensForTests(): void;
|
|
73
|
+
} & T;
|
|
74
|
+
//# sourceMappingURL=OxyServices.payment.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.payment.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.payment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAExD,GAAG,EAAE;QAI1B;;;;WAIG;4BACuB,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;QAQ5C;;;;WAIG;8BACyB,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;QAWjD;;;WAGG;2BACsB,OAAO,CAAC,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAY4vH,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAA4wF,CAAC;qBAAwB,CAAC;;;;;MAFtoN"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Privacy Methods Mixin (Blocked & Restricted Users)
|
|
3
|
+
*/
|
|
4
|
+
import type { BlockedUser, RestrictedUser } from '../../models/interfaces';
|
|
5
|
+
import type { OxyServicesBase } from '../OxyServices.base';
|
|
6
|
+
export declare function OxyServicesPrivacyMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
7
|
+
new (...args: any[]): {
|
|
8
|
+
/**
|
|
9
|
+
* Extract user ID from blocked/restricted user object
|
|
10
|
+
*/
|
|
11
|
+
extractUserId(userIdField: string | {
|
|
12
|
+
_id: string;
|
|
13
|
+
username?: string;
|
|
14
|
+
avatar?: string;
|
|
15
|
+
}): string;
|
|
16
|
+
/**
|
|
17
|
+
* Check if a user is in a list (blocked or restricted)
|
|
18
|
+
*/
|
|
19
|
+
isUserInList<T_1 extends BlockedUser | RestrictedUser>(userId: string, getUserList: () => Promise<T_1[]>, getIdField: (item: T_1) => string | {
|
|
20
|
+
_id: string;
|
|
21
|
+
username?: string;
|
|
22
|
+
avatar?: string;
|
|
23
|
+
}): Promise<boolean>;
|
|
24
|
+
/**
|
|
25
|
+
* Get list of blocked users
|
|
26
|
+
* @returns Array of blocked users
|
|
27
|
+
*/
|
|
28
|
+
getBlockedUsers(): Promise<BlockedUser[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Block a user
|
|
31
|
+
* @param userId - The user ID to block
|
|
32
|
+
* @returns Success message
|
|
33
|
+
*/
|
|
34
|
+
blockUser(userId: string): Promise<{
|
|
35
|
+
message: string;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Unblock a user
|
|
39
|
+
* @param userId - The user ID to unblock
|
|
40
|
+
* @returns Success message
|
|
41
|
+
*/
|
|
42
|
+
unblockUser(userId: string): Promise<{
|
|
43
|
+
message: string;
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* Check if a user is blocked
|
|
47
|
+
* @param userId - The user ID to check
|
|
48
|
+
* @returns True if the user is blocked, false otherwise
|
|
49
|
+
*/
|
|
50
|
+
isUserBlocked(userId: string): Promise<boolean>;
|
|
51
|
+
/**
|
|
52
|
+
* Get list of restricted users
|
|
53
|
+
* @returns Array of restricted users
|
|
54
|
+
*/
|
|
55
|
+
getRestrictedUsers(): Promise<RestrictedUser[]>;
|
|
56
|
+
/**
|
|
57
|
+
* Restrict a user (limit their interactions without fully blocking)
|
|
58
|
+
* @param userId - The user ID to restrict
|
|
59
|
+
* @returns Success message
|
|
60
|
+
*/
|
|
61
|
+
restrictUser(userId: string): Promise<{
|
|
62
|
+
message: string;
|
|
63
|
+
}>;
|
|
64
|
+
/**
|
|
65
|
+
* Unrestrict a user
|
|
66
|
+
* @param userId - The user ID to unrestrict
|
|
67
|
+
* @returns Success message
|
|
68
|
+
*/
|
|
69
|
+
unrestrictUser(userId: string): Promise<{
|
|
70
|
+
message: string;
|
|
71
|
+
}>;
|
|
72
|
+
/**
|
|
73
|
+
* Check if a user is restricted
|
|
74
|
+
* @param userId - The user ID to check
|
|
75
|
+
* @returns True if the user is restricted, false otherwise
|
|
76
|
+
*/
|
|
77
|
+
isUserRestricted(userId: string): Promise<boolean>;
|
|
78
|
+
httpClient: import("../HttpClient").HttpClient;
|
|
79
|
+
requestManager: import("../RequestManager").RequestManager;
|
|
80
|
+
cloudURL: string;
|
|
81
|
+
config: import("../OxyServices.base").OxyConfig;
|
|
82
|
+
makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../RequestManager").RequestOptions): Promise<T_1>;
|
|
83
|
+
getBaseURL(): string;
|
|
84
|
+
getClient(): import("../HttpClient").HttpClient;
|
|
85
|
+
getMetrics(): {
|
|
86
|
+
totalRequests: number;
|
|
87
|
+
successfulRequests: number;
|
|
88
|
+
failedRequests: number;
|
|
89
|
+
cacheHits: number;
|
|
90
|
+
cacheMisses: number;
|
|
91
|
+
averageResponseTime: number;
|
|
92
|
+
};
|
|
93
|
+
clearCache(): void;
|
|
94
|
+
clearCacheEntry(key: string): void;
|
|
95
|
+
getCacheStats(): {
|
|
96
|
+
size: number;
|
|
97
|
+
hits: number;
|
|
98
|
+
misses: number;
|
|
99
|
+
hitRate: number;
|
|
100
|
+
};
|
|
101
|
+
getCloudURL(): string;
|
|
102
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
103
|
+
clearTokens(): void;
|
|
104
|
+
getCurrentUserId(): string | null;
|
|
105
|
+
hasValidToken(): boolean;
|
|
106
|
+
getAccessToken(): string | null;
|
|
107
|
+
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
108
|
+
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
109
|
+
hasAccessToken(): boolean;
|
|
110
|
+
withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
|
|
111
|
+
maxRetries?: number;
|
|
112
|
+
retryDelay?: number;
|
|
113
|
+
authTimeoutMs?: number;
|
|
114
|
+
}): Promise<T_1>;
|
|
115
|
+
validate(): Promise<boolean>;
|
|
116
|
+
handleError(error: any): Error;
|
|
117
|
+
healthCheck(): Promise<{
|
|
118
|
+
status: string;
|
|
119
|
+
users?: number;
|
|
120
|
+
timestamp?: string;
|
|
121
|
+
[key: string]: any;
|
|
122
|
+
}>;
|
|
123
|
+
};
|
|
124
|
+
__resetTokensForTests(): void;
|
|
125
|
+
} & T;
|
|
126
|
+
//# sourceMappingURL=OxyServices.privacy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.privacy.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.privacy.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAExD,GAAG,EAAE;QAG1B;;WAEG;mCAC+B,MAAM,GAAG;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,GAAG,MAAM;QAIvG;;WAEG;iCACiC,WAAW,GAAG,cAAc,UACtD,MAAM,eACD,MAAM,OAAO,CAAC,GAAC,EAAE,CAAC,cACnB,CAAC,IAAI,EAAE,GAAC,KAAK,MAAM,GAAG;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;YAAC,MAAM,CAAC,EAAE,MAAM,CAAA;SAAE,GACpF,OAAO,CAAC,OAAO,CAAC;QAuBnB;;;WAGG;2BACsB,OAAO,CAAC,WAAW,EAAE,CAAC;QAW/C;;;;WAIG;0BACqB,MAAM,GAAG,OAAO,CAAC;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QAa7D;;;;WAIG;4BACuB,MAAM,GAAG,OAAO,CAAC;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QAa/D;;;;WAIG;8BACyB,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;QAYrD;;;WAGG;8BACyB,OAAO,CAAC,cAAc,EAAE,CAAC;QAWrD;;;;WAIG;6BACwB,MAAM,GAAG,OAAO,CAAC;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QAahE;;;;WAIG;+BAC0B,MAAM,GAAG,OAAO,CAAC;YAAE,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC;QAalE;;;;WAIG;iCAC4B,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAC5C,CAAC;sBACN,CAAC;yBACa,CAAC;;;;;;iBAOgqF,CAAC;qBAAwB,CAAC;;;;;MAFntF"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TOTP Enrollment Methods Mixin
|
|
3
|
+
*/
|
|
4
|
+
import type { OxyServicesBase } from '../OxyServices.base';
|
|
5
|
+
export declare function OxyServicesTotpMixin<T extends typeof OxyServicesBase>(Base: T): {
|
|
6
|
+
new (...args: any[]): {
|
|
7
|
+
startTotpEnrollment(sessionId: string): Promise<{
|
|
8
|
+
secret: string;
|
|
9
|
+
otpauthUrl: string;
|
|
10
|
+
issuer: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
verifyTotpEnrollment(sessionId: string, code: string): Promise<{
|
|
14
|
+
enabled: boolean;
|
|
15
|
+
backupCodes?: string[];
|
|
16
|
+
recoveryKey?: string;
|
|
17
|
+
}>;
|
|
18
|
+
disableTotp(sessionId: string, code: string): Promise<{
|
|
19
|
+
disabled: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
httpClient: import("../HttpClient").HttpClient;
|
|
22
|
+
requestManager: import("../RequestManager").RequestManager;
|
|
23
|
+
cloudURL: string;
|
|
24
|
+
config: import("../OxyServices.base").OxyConfig;
|
|
25
|
+
makeRequest<T_1>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../RequestManager").RequestOptions): Promise<T_1>;
|
|
26
|
+
getBaseURL(): string;
|
|
27
|
+
getClient(): import("../HttpClient").HttpClient;
|
|
28
|
+
getMetrics(): {
|
|
29
|
+
totalRequests: number;
|
|
30
|
+
successfulRequests: number;
|
|
31
|
+
failedRequests: number;
|
|
32
|
+
cacheHits: number;
|
|
33
|
+
cacheMisses: number;
|
|
34
|
+
averageResponseTime: number;
|
|
35
|
+
};
|
|
36
|
+
clearCache(): void;
|
|
37
|
+
clearCacheEntry(key: string): void;
|
|
38
|
+
getCacheStats(): {
|
|
39
|
+
size: number;
|
|
40
|
+
hits: number;
|
|
41
|
+
misses: number;
|
|
42
|
+
hitRate: number;
|
|
43
|
+
};
|
|
44
|
+
getCloudURL(): string;
|
|
45
|
+
setTokens(accessToken: string, refreshToken?: string): void;
|
|
46
|
+
clearTokens(): void;
|
|
47
|
+
getCurrentUserId(): string | null;
|
|
48
|
+
hasValidToken(): boolean;
|
|
49
|
+
getAccessToken(): string | null;
|
|
50
|
+
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
51
|
+
waitForAuthentication(timeoutMs?: number): Promise<boolean>;
|
|
52
|
+
hasAccessToken(): boolean;
|
|
53
|
+
withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
|
|
54
|
+
maxRetries?: number;
|
|
55
|
+
retryDelay?: number;
|
|
56
|
+
authTimeoutMs?: number;
|
|
57
|
+
}): Promise<T_1>;
|
|
58
|
+
validate(): Promise<boolean>;
|
|
59
|
+
handleError(error: any): Error;
|
|
60
|
+
healthCheck(): Promise<{
|
|
61
|
+
status: string;
|
|
62
|
+
users?: number;
|
|
63
|
+
timestamp?: string;
|
|
64
|
+
[key: string]: any;
|
|
65
|
+
}>;
|
|
66
|
+
};
|
|
67
|
+
__resetTokensForTests(): void;
|
|
68
|
+
} & T;
|
|
69
|
+
//# sourceMappingURL=OxyServices.totp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OxyServices.totp.d.ts","sourceRoot":"","sources":["../../../../src/core/mixins/OxyServices.totp.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,OAAO,eAAe,EAAE,IAAI,EAAE,CAAC;kBAErD,GAAG,EAAE;uCAGW,MAAM,GAAG,OAAO,CAAC;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;wCAQtF,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC;YAAE,OAAO,EAAE,OAAO,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;YAAC,WAAW,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;+BAQ3G,MAAM,QAAQ,MAAM,GAAG,OAAO,CAAC;YAAE,QAAQ,EAAE,OAAO,CAAA;SAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAUs+H,CAAC;sBAA0B,CAAC;yBAA6B,CAAC;;;;;;iBAA4wF,CAAC;qBAAwB,CAAC;;;;;MAF35N"}
|