@oxyhq/services 5.18.2 → 5.18.4
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/mixins/index.js +36 -13
- package/lib/commonjs/core/mixins/index.js.map +1 -1
- package/lib/commonjs/index.js +16 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/client.js +177 -0
- package/lib/commonjs/ui/client.js.map +1 -0
- package/lib/commonjs/ui/components/WebOxyProvider.js +98 -0
- package/lib/commonjs/ui/components/WebOxyProvider.js.map +1 -0
- package/lib/commonjs/ui/components/profile/EditFieldModal.js +412 -0
- package/lib/commonjs/ui/components/profile/EditFieldModal.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +63 -1
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +115 -0
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSettingToggle.js +7 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/hooks/useWebSSO.js +75 -0
- package/lib/commonjs/ui/hooks/useWebSSO.js.map +1 -0
- package/lib/commonjs/ui/index.js +17 -2
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +59 -65
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +38 -58
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/server.js +105 -0
- package/lib/commonjs/ui/server.js.map +1 -0
- package/lib/commonjs/ui/utils/iconNames.js +133 -0
- package/lib/commonjs/ui/utils/iconNames.js.map +1 -0
- package/lib/commonjs/ui/utils/sessionHelpers.js +7 -0
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/commonjs/utils/requestUtils.js +4 -3
- package/lib/commonjs/utils/requestUtils.js.map +1 -1
- package/lib/module/core/mixins/index.js +36 -13
- package/lib/module/core/mixins/index.js.map +1 -1
- package/lib/module/index.js +5 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/client.js +48 -0
- package/lib/module/ui/client.js.map +1 -0
- package/lib/module/ui/components/WebOxyProvider.js +94 -0
- package/lib/module/ui/components/WebOxyProvider.js.map +1 -0
- package/lib/module/ui/components/profile/EditFieldModal.js +406 -0
- package/lib/module/ui/components/profile/EditFieldModal.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +63 -1
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +106 -0
- package/lib/module/ui/hooks/useAuth.js.map +1 -0
- package/lib/module/ui/hooks/useSettingToggle.js +7 -1
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/module/ui/hooks/useWebSSO.js +71 -0
- package/lib/module/ui/hooks/useWebSSO.js.map +1 -0
- package/lib/module/ui/index.js +17 -3
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +59 -65
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +39 -59
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/server.js +65 -0
- package/lib/module/ui/server.js.map +1 -0
- package/lib/module/ui/utils/iconNames.js +124 -0
- package/lib/module/ui/utils/iconNames.js.map +1 -0
- package/lib/module/ui/utils/sessionHelpers.js +7 -0
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/utils/requestUtils.js +4 -2
- package/lib/module/utils/requestUtils.js.map +1 -1
- package/lib/typescript/commonjs/core/mixins/index.d.ts +18 -1115
- package/lib/typescript/commonjs/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +34 -0
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/WebOxyProvider.d.ts +44 -0
- package/lib/typescript/commonjs/ui/components/WebOxyProvider.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts +110 -0
- package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +3 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +3 -3
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +6 -10
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +3 -5
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +69 -0
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSettingToggle.d.ts +4 -2
- package/lib/typescript/commonjs/ui/hooks/useSettingToggle.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts +34 -0
- package/lib/typescript/commonjs/ui/hooks/useWebSSO.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/index.d.ts +2 -2
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/server.d.ts +43 -0
- package/lib/typescript/commonjs/ui/server.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/iconNames.d.ts +112 -0
- package/lib/typescript/commonjs/ui/utils/iconNames.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts +8 -3
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/requestUtils.d.ts +3 -1
- package/lib/typescript/commonjs/utils/requestUtils.d.ts.map +1 -1
- package/lib/typescript/module/core/mixins/index.d.ts +18 -1115
- package/lib/typescript/module/core/mixins/index.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +34 -0
- package/lib/typescript/module/ui/client.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/WebOxyProvider.d.ts +44 -0
- package/lib/typescript/module/ui/components/WebOxyProvider.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts +110 -0
- package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts +3 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +3 -3
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +6 -10
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +3 -5
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +69 -0
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSettingToggle.d.ts +4 -2
- package/lib/typescript/module/ui/hooks/useSettingToggle.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts +34 -0
- package/lib/typescript/module/ui/hooks/useWebSSO.d.ts.map +1 -0
- package/lib/typescript/module/ui/index.d.ts +2 -2
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +43 -0
- package/lib/typescript/module/ui/server.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/iconNames.d.ts +112 -0
- package/lib/typescript/module/ui/utils/iconNames.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts +8 -3
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/module/utils/requestUtils.d.ts +3 -1
- package/lib/typescript/module/utils/requestUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/core/mixins/index.ts +57 -43
- package/src/index.ts +6 -1
- package/src/ui/client.ts +56 -0
- package/src/ui/components/WebOxyProvider.tsx +109 -0
- package/src/ui/components/profile/EditFieldModal.tsx +465 -0
- package/src/ui/context/OxyContext.tsx +69 -0
- package/src/ui/hooks/useAuth.ts +159 -0
- package/src/ui/hooks/useSettingToggle.ts +7 -3
- package/src/ui/hooks/useWebSSO.ts +93 -0
- package/src/ui/index.ts +17 -2
- package/src/ui/screens/PrivacySettingsScreen.tsx +54 -63
- package/src/ui/screens/SearchSettingsScreen.tsx +42 -64
- package/src/ui/server.ts +70 -0
- package/src/ui/utils/iconNames.ts +136 -0
- package/src/ui/utils/sessionHelpers.ts +10 -3
- package/src/utils/requestUtils.ts +10 -7
|
@@ -4,1125 +4,28 @@
|
|
|
4
4
|
* This module provides a clean way to compose all mixins
|
|
5
5
|
* and ensures consistent ordering for better maintainability
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
type MixinFunction = (Base: any) => any;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Mixin pipeline - applied in order from first to last.
|
|
10
10
|
*
|
|
11
|
-
* Order matters for
|
|
12
|
-
*
|
|
11
|
+
* Order matters for dependencies:
|
|
12
|
+
* 1. Base auth mixin first (required by all others)
|
|
13
|
+
* 2. Cross-domain auth mixins (FedCM, Popup, Redirect)
|
|
14
|
+
* 3. User mixin (requires auth)
|
|
15
|
+
* 4. Feature mixins (can depend on user)
|
|
16
|
+
* 5. Utility mixin last (augments all)
|
|
13
17
|
*
|
|
14
|
-
*
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
* To add a new mixin: insert it at the appropriate position in this array.
|
|
19
|
+
*/
|
|
20
|
+
declare const MIXIN_PIPELINE: MixinFunction[];
|
|
21
|
+
/**
|
|
22
|
+
* Composes all OxyServices mixins using a pipeline pattern.
|
|
23
|
+
*
|
|
24
|
+
* This is equivalent to the nested calls but more readable and maintainable.
|
|
25
|
+
* Adding a new mixin: just add it to MIXIN_PIPELINE at the appropriate position.
|
|
18
26
|
*
|
|
19
27
|
* @returns The fully composed OxyServices class with all mixins applied
|
|
20
28
|
*/
|
|
21
|
-
export declare function composeOxyServices():
|
|
22
|
-
|
|
23
|
-
fetchLinkMetadata(url: string): Promise<{
|
|
24
|
-
url: string;
|
|
25
|
-
title: string;
|
|
26
|
-
description: string;
|
|
27
|
-
image?: string;
|
|
28
|
-
}>;
|
|
29
|
-
auth(options?: {
|
|
30
|
-
debug?: boolean;
|
|
31
|
-
onError?: ((error: import("..").ApiError) => any) | undefined;
|
|
32
|
-
loadUser?: boolean;
|
|
33
|
-
session?: boolean;
|
|
34
|
-
}): (req: any, res: any, // Base authentication mixin
|
|
35
|
-
next: any) => any;
|
|
36
|
-
httpService: import("../HttpService").HttpService;
|
|
37
|
-
cloudURL: string;
|
|
38
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
39
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
40
|
-
getBaseURL(): string;
|
|
41
|
-
getClient(): import("../HttpService").HttpService;
|
|
42
|
-
getMetrics(): {
|
|
43
|
-
totalRequests: number;
|
|
44
|
-
successfulRequests: number;
|
|
45
|
-
failedRequests: number;
|
|
46
|
-
cacheHits: number;
|
|
47
|
-
cacheMisses: number;
|
|
48
|
-
averageResponseTime: number;
|
|
49
|
-
};
|
|
50
|
-
clearCache(): void;
|
|
51
|
-
clearCacheEntry(key: string): void;
|
|
52
|
-
getCacheStats(): {
|
|
53
|
-
size: number;
|
|
54
|
-
hits: number;
|
|
55
|
-
misses: number;
|
|
56
|
-
hitRate: number;
|
|
57
|
-
};
|
|
58
|
-
getCloudURL(): string;
|
|
59
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
60
|
-
clearTokens(): void;
|
|
61
|
-
getCurrentUserId(): string | null;
|
|
62
|
-
hasValidToken(): boolean;
|
|
63
|
-
getAccessToken(): string | null;
|
|
64
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
65
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
66
|
-
maxRetries?: number;
|
|
67
|
-
retryDelay?: number;
|
|
68
|
-
authTimeoutMs?: number;
|
|
69
|
-
}): Promise<T>;
|
|
70
|
-
validate(): Promise<boolean>;
|
|
71
|
-
handleError(error: unknown): Error;
|
|
72
|
-
healthCheck(): Promise<{
|
|
73
|
-
status: string;
|
|
74
|
-
users?: number;
|
|
75
|
-
timestamp?: string;
|
|
76
|
-
[key: string]: any;
|
|
77
|
-
}>;
|
|
78
|
-
};
|
|
79
|
-
__resetTokensForTests(): void;
|
|
80
|
-
} & {
|
|
81
|
-
new (...args: any[]): {
|
|
82
|
-
submitFeedback(payload: import("./OxyServices.features").FeedbackPayload): Promise<import("./OxyServices.features").FeedbackResult>;
|
|
83
|
-
getSubscriptionPlans(): Promise<import("./OxyServices.features").SubscriptionPlan[]>;
|
|
84
|
-
getIndividualFeatures(): Promise<any[]>;
|
|
85
|
-
subscribe(planId: string, paymentMethodId?: string): Promise<import("./OxyServices.features").SubscriptionResult>;
|
|
86
|
-
subscribeToFeature(featureId: string, paymentMethodId?: string): Promise<import("./OxyServices.features").SubscriptionResult>;
|
|
87
|
-
cancelSubscription(subscriptionId: string): Promise<void>;
|
|
88
|
-
reactivateSubscription(subscriptionId: string): Promise<void>;
|
|
89
|
-
getCurrentSubscription(): Promise<import("./OxyServices.features").SubscriptionResult | null>;
|
|
90
|
-
getSavedItems(userId?: string): Promise<import("./OxyServices.features").SavedItem[]>;
|
|
91
|
-
getCollections(userId?: string): Promise<import("./OxyServices.features").Collection[]>;
|
|
92
|
-
saveItem(itemId: string, itemType: string, collectionId?: string): Promise<import("./OxyServices.features").SavedItem>;
|
|
93
|
-
removeSavedItem(saveId: string): Promise<void>;
|
|
94
|
-
createCollection(name: string, description?: string): Promise<import("./OxyServices.features").Collection>;
|
|
95
|
-
deleteCollection(collectionId: string): Promise<void>;
|
|
96
|
-
getUserStats(userId: string): Promise<import("./OxyServices.features").UserStats>;
|
|
97
|
-
getUserHistory(userId?: string, limit?: number, offset?: number): Promise<import("./OxyServices.features").HistoryItem[]>;
|
|
98
|
-
clearUserHistory(): Promise<void>;
|
|
99
|
-
deleteHistoryItem(itemId: string): Promise<void>;
|
|
100
|
-
getFAQs(category?: string): Promise<import("./OxyServices.features").FAQ[]>;
|
|
101
|
-
searchFAQs(query: string): Promise<import("./OxyServices.features").FAQ[]>;
|
|
102
|
-
getUserAchievements(userId?: string): Promise<import("./OxyServices.features").Achievement[]>;
|
|
103
|
-
getAllAchievements(): Promise<import("./OxyServices.features").Achievement[]>;
|
|
104
|
-
deleteAccount(password: string): Promise<void>;
|
|
105
|
-
httpService: import("../HttpService").HttpService;
|
|
106
|
-
cloudURL: string;
|
|
107
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
108
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
109
|
-
getBaseURL(): string;
|
|
110
|
-
getClient(): import("../HttpService").HttpService;
|
|
111
|
-
getMetrics(): {
|
|
112
|
-
totalRequests: number;
|
|
113
|
-
successfulRequests: number;
|
|
114
|
-
failedRequests: number;
|
|
115
|
-
cacheHits: number;
|
|
116
|
-
cacheMisses: number;
|
|
117
|
-
averageResponseTime: number;
|
|
118
|
-
};
|
|
119
|
-
clearCache(): void;
|
|
120
|
-
clearCacheEntry(key: string): void;
|
|
121
|
-
getCacheStats(): {
|
|
122
|
-
size: number;
|
|
123
|
-
hits: number;
|
|
124
|
-
misses: number;
|
|
125
|
-
hitRate: number;
|
|
126
|
-
};
|
|
127
|
-
getCloudURL(): string;
|
|
128
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
129
|
-
clearTokens(): void;
|
|
130
|
-
getCurrentUserId(): string | null;
|
|
131
|
-
hasValidToken(): boolean;
|
|
132
|
-
getAccessToken(): string | null;
|
|
133
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
134
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
135
|
-
maxRetries?: number;
|
|
136
|
-
retryDelay?: number;
|
|
137
|
-
authTimeoutMs?: number;
|
|
138
|
-
}): Promise<T>;
|
|
139
|
-
validate(): Promise<boolean>;
|
|
140
|
-
handleError(error: unknown): Error;
|
|
141
|
-
healthCheck(): Promise<{
|
|
142
|
-
status: string;
|
|
143
|
-
users?: number;
|
|
144
|
-
timestamp?: string;
|
|
145
|
-
[key: string]: any;
|
|
146
|
-
}>;
|
|
147
|
-
};
|
|
148
|
-
__resetTokensForTests(): void;
|
|
149
|
-
} & {
|
|
150
|
-
new (...args: any[]): {
|
|
151
|
-
getSecurityActivity(limit?: number, offset?: number, eventType?: import("..").SecurityEventType): Promise<import("..").SecurityActivityResponse>;
|
|
152
|
-
getRecentSecurityActivity(limit?: number): Promise<import("..").SecurityActivity[]>;
|
|
153
|
-
logPrivateKeyExported(deviceId?: string): Promise<void>;
|
|
154
|
-
logBackupCreated(deviceId?: string): Promise<void>;
|
|
155
|
-
httpService: import("../HttpService").HttpService;
|
|
156
|
-
cloudURL: string;
|
|
157
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
158
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
159
|
-
getBaseURL(): string;
|
|
160
|
-
getClient(): import("../HttpService").HttpService;
|
|
161
|
-
getMetrics(): {
|
|
162
|
-
totalRequests: number;
|
|
163
|
-
successfulRequests: number;
|
|
164
|
-
failedRequests: number;
|
|
165
|
-
cacheHits: number;
|
|
166
|
-
cacheMisses: number;
|
|
167
|
-
averageResponseTime: number;
|
|
168
|
-
};
|
|
169
|
-
clearCache(): void;
|
|
170
|
-
clearCacheEntry(key: string): void;
|
|
171
|
-
getCacheStats(): {
|
|
172
|
-
size: number;
|
|
173
|
-
hits: number;
|
|
174
|
-
misses: number;
|
|
175
|
-
hitRate: number;
|
|
176
|
-
};
|
|
177
|
-
getCloudURL(): string;
|
|
178
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
179
|
-
clearTokens(): void;
|
|
180
|
-
getCurrentUserId(): string | null;
|
|
181
|
-
hasValidToken(): boolean;
|
|
182
|
-
getAccessToken(): string | null;
|
|
183
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
184
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
185
|
-
maxRetries?: number;
|
|
186
|
-
retryDelay?: number;
|
|
187
|
-
authTimeoutMs?: number;
|
|
188
|
-
}): Promise<T>;
|
|
189
|
-
validate(): Promise<boolean>;
|
|
190
|
-
handleError(error: unknown): Error;
|
|
191
|
-
healthCheck(): Promise<{
|
|
192
|
-
status: string;
|
|
193
|
-
users?: number;
|
|
194
|
-
timestamp?: string;
|
|
195
|
-
[key: string]: any;
|
|
196
|
-
}>;
|
|
197
|
-
};
|
|
198
|
-
__resetTokensForTests(): void;
|
|
199
|
-
} & {
|
|
200
|
-
new (...args: any[]): {
|
|
201
|
-
registerDevice(deviceData: any): Promise<any>;
|
|
202
|
-
getUserDevices(): Promise<any[]>;
|
|
203
|
-
removeDevice(deviceId: string): Promise<void>;
|
|
204
|
-
getDeviceSessions(sessionId: string): Promise<any[]>;
|
|
205
|
-
logoutAllDeviceSessions(sessionId: string, deviceId?: string, excludeCurrent?: boolean): Promise<any>;
|
|
206
|
-
updateDeviceName(sessionId: string, deviceName: string): Promise<any>;
|
|
207
|
-
getSecurityInfo(): Promise<{
|
|
208
|
-
recoveryEmail: string | null;
|
|
209
|
-
}>;
|
|
210
|
-
httpService: import("../HttpService").HttpService;
|
|
211
|
-
cloudURL: string;
|
|
212
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
213
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
214
|
-
getBaseURL(): string;
|
|
215
|
-
getClient(): import("../HttpService").HttpService;
|
|
216
|
-
getMetrics(): {
|
|
217
|
-
totalRequests: number;
|
|
218
|
-
successfulRequests: number;
|
|
219
|
-
failedRequests: number;
|
|
220
|
-
cacheHits: number;
|
|
221
|
-
cacheMisses: number;
|
|
222
|
-
averageResponseTime: number;
|
|
223
|
-
};
|
|
224
|
-
clearCache(): void;
|
|
225
|
-
clearCacheEntry(key: string): void;
|
|
226
|
-
getCacheStats(): {
|
|
227
|
-
size: number;
|
|
228
|
-
hits: number;
|
|
229
|
-
misses: number;
|
|
230
|
-
hitRate: number;
|
|
231
|
-
};
|
|
232
|
-
getCloudURL(): string;
|
|
233
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
234
|
-
clearTokens(): void;
|
|
235
|
-
getCurrentUserId(): string | null;
|
|
236
|
-
hasValidToken(): boolean;
|
|
237
|
-
getAccessToken(): string | null;
|
|
238
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
239
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
240
|
-
maxRetries?: number;
|
|
241
|
-
retryDelay?: number;
|
|
242
|
-
authTimeoutMs?: number;
|
|
243
|
-
}): Promise<T>;
|
|
244
|
-
validate(): Promise<boolean>;
|
|
245
|
-
handleError(error: unknown): Error;
|
|
246
|
-
healthCheck(): Promise<{
|
|
247
|
-
status: string;
|
|
248
|
-
users?: number;
|
|
249
|
-
timestamp?: string;
|
|
250
|
-
[key: string]: any;
|
|
251
|
-
}>;
|
|
252
|
-
};
|
|
253
|
-
__resetTokensForTests(): void;
|
|
254
|
-
} & {
|
|
255
|
-
new (...args: any[]): {
|
|
256
|
-
trackEvent(eventName: string, properties?: Record<string, any>): Promise<void>;
|
|
257
|
-
getAnalytics(startDate?: string, endDate?: string): Promise<any>;
|
|
258
|
-
httpService: import("../HttpService").HttpService;
|
|
259
|
-
cloudURL: string;
|
|
260
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
261
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
262
|
-
getBaseURL(): string;
|
|
263
|
-
getClient(): import("../HttpService").HttpService;
|
|
264
|
-
getMetrics(): {
|
|
265
|
-
totalRequests: number;
|
|
266
|
-
successfulRequests: number;
|
|
267
|
-
failedRequests: number;
|
|
268
|
-
cacheHits: number;
|
|
269
|
-
cacheMisses: number;
|
|
270
|
-
averageResponseTime: number;
|
|
271
|
-
};
|
|
272
|
-
clearCache(): void;
|
|
273
|
-
clearCacheEntry(key: string): void;
|
|
274
|
-
getCacheStats(): {
|
|
275
|
-
size: number;
|
|
276
|
-
hits: number;
|
|
277
|
-
misses: number;
|
|
278
|
-
hitRate: number;
|
|
279
|
-
};
|
|
280
|
-
getCloudURL(): string;
|
|
281
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
282
|
-
clearTokens(): void;
|
|
283
|
-
getCurrentUserId(): string | null;
|
|
284
|
-
hasValidToken(): boolean;
|
|
285
|
-
getAccessToken(): string | null;
|
|
286
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
287
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
288
|
-
maxRetries?: number;
|
|
289
|
-
retryDelay?: number;
|
|
290
|
-
authTimeoutMs?: number;
|
|
291
|
-
}): Promise<T>;
|
|
292
|
-
validate(): Promise<boolean>;
|
|
293
|
-
handleError(error: unknown): Error;
|
|
294
|
-
healthCheck(): Promise<{
|
|
295
|
-
status: string;
|
|
296
|
-
users?: number;
|
|
297
|
-
timestamp?: string;
|
|
298
|
-
[key: string]: any;
|
|
299
|
-
}>;
|
|
300
|
-
};
|
|
301
|
-
__resetTokensForTests(): void;
|
|
302
|
-
} & {
|
|
303
|
-
new (...args: any[]): {
|
|
304
|
-
updateLocation(latitude: number, longitude: number): Promise<any>;
|
|
305
|
-
getNearbyUsers(radius?: number): Promise<any[]>;
|
|
306
|
-
httpService: import("../HttpService").HttpService;
|
|
307
|
-
cloudURL: string;
|
|
308
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
309
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
310
|
-
getBaseURL(): string;
|
|
311
|
-
getClient(): import("../HttpService").HttpService;
|
|
312
|
-
getMetrics(): {
|
|
313
|
-
totalRequests: number;
|
|
314
|
-
successfulRequests: number;
|
|
315
|
-
failedRequests: number;
|
|
316
|
-
cacheHits: number;
|
|
317
|
-
cacheMisses: number;
|
|
318
|
-
averageResponseTime: number;
|
|
319
|
-
};
|
|
320
|
-
clearCache(): void;
|
|
321
|
-
clearCacheEntry(key: string): void;
|
|
322
|
-
getCacheStats(): {
|
|
323
|
-
size: number;
|
|
324
|
-
hits: number;
|
|
325
|
-
misses: number;
|
|
326
|
-
hitRate: number;
|
|
327
|
-
};
|
|
328
|
-
getCloudURL(): string;
|
|
329
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
330
|
-
clearTokens(): void;
|
|
331
|
-
getCurrentUserId(): string | null;
|
|
332
|
-
hasValidToken(): boolean;
|
|
333
|
-
getAccessToken(): string | null;
|
|
334
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
335
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
336
|
-
maxRetries?: number;
|
|
337
|
-
retryDelay?: number;
|
|
338
|
-
authTimeoutMs?: number;
|
|
339
|
-
}): Promise<T>;
|
|
340
|
-
validate(): Promise<boolean>;
|
|
341
|
-
handleError(error: unknown): Error;
|
|
342
|
-
healthCheck(): Promise<{
|
|
343
|
-
status: string;
|
|
344
|
-
users?: number;
|
|
345
|
-
timestamp?: string;
|
|
346
|
-
[key: string]: any;
|
|
347
|
-
}>;
|
|
348
|
-
};
|
|
349
|
-
__resetTokensForTests(): void;
|
|
350
|
-
} & {
|
|
351
|
-
new (...args: any[]): {
|
|
352
|
-
getDeveloperApps(): Promise<any[]>;
|
|
353
|
-
createDeveloperApp(data: {
|
|
354
|
-
name: string;
|
|
355
|
-
description?: string;
|
|
356
|
-
webhookUrl: string;
|
|
357
|
-
devWebhookUrl?: string;
|
|
358
|
-
scopes?: string[];
|
|
359
|
-
}): Promise<any>;
|
|
360
|
-
getDeveloperApp(appId: string): Promise<any>;
|
|
361
|
-
updateDeveloperApp(appId: string, data: {
|
|
362
|
-
name?: string;
|
|
363
|
-
description?: string;
|
|
364
|
-
webhookUrl?: string;
|
|
365
|
-
devWebhookUrl?: string;
|
|
366
|
-
scopes?: string[];
|
|
367
|
-
}): Promise<any>;
|
|
368
|
-
regenerateDeveloperAppSecret(appId: string): Promise<any>;
|
|
369
|
-
deleteDeveloperApp(appId: string): Promise<any>;
|
|
370
|
-
httpService: import("../HttpService").HttpService;
|
|
371
|
-
cloudURL: string;
|
|
372
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
373
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
374
|
-
getBaseURL(): string;
|
|
375
|
-
getClient(): import("../HttpService").HttpService;
|
|
376
|
-
getMetrics(): {
|
|
377
|
-
totalRequests: number;
|
|
378
|
-
successfulRequests: number;
|
|
379
|
-
failedRequests: number;
|
|
380
|
-
cacheHits: number;
|
|
381
|
-
cacheMisses: number;
|
|
382
|
-
averageResponseTime: number;
|
|
383
|
-
};
|
|
384
|
-
clearCache(): void;
|
|
385
|
-
clearCacheEntry(key: string): void;
|
|
386
|
-
getCacheStats(): {
|
|
387
|
-
size: number;
|
|
388
|
-
hits: number;
|
|
389
|
-
misses: number;
|
|
390
|
-
hitRate: number;
|
|
391
|
-
};
|
|
392
|
-
getCloudURL(): string;
|
|
393
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
394
|
-
clearTokens(): void;
|
|
395
|
-
getCurrentUserId(): string | null;
|
|
396
|
-
hasValidToken(): boolean;
|
|
397
|
-
getAccessToken(): string | null;
|
|
398
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
399
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
400
|
-
maxRetries?: number;
|
|
401
|
-
retryDelay?: number;
|
|
402
|
-
authTimeoutMs?: number;
|
|
403
|
-
}): Promise<T>;
|
|
404
|
-
validate(): Promise<boolean>;
|
|
405
|
-
handleError(error: unknown): Error;
|
|
406
|
-
healthCheck(): Promise<{
|
|
407
|
-
status: string;
|
|
408
|
-
users?: number;
|
|
409
|
-
timestamp?: string;
|
|
410
|
-
[key: string]: any;
|
|
411
|
-
}>;
|
|
412
|
-
};
|
|
413
|
-
__resetTokensForTests(): void;
|
|
414
|
-
} & {
|
|
415
|
-
new (...args: any[]): {
|
|
416
|
-
deleteFile(fileId: string): Promise<any>;
|
|
417
|
-
getFileDownloadUrl(fileId: string, variant?: string, expiresIn?: number): string;
|
|
418
|
-
getFileDownloadUrlAsync(fileId: string, variant?: string, expiresIn?: number): Promise<string>;
|
|
419
|
-
listUserFiles(limit?: number, offset?: number): Promise<{
|
|
420
|
-
files: any[];
|
|
421
|
-
total: number;
|
|
422
|
-
hasMore: boolean;
|
|
423
|
-
}>;
|
|
424
|
-
getAccountStorageUsage(): Promise<import("..").AccountStorageUsageResponse>;
|
|
425
|
-
getFileContentAsText(fileId: string, variant?: string): Promise<string>;
|
|
426
|
-
getFileContentAsBlob(fileId: string, variant?: string): Promise<Blob>;
|
|
427
|
-
getBatchFileAccess(fileIds: string[], context?: string): Promise<Record<string, any>>;
|
|
428
|
-
getFileDownloadUrls(fileIds: string[], context?: string): Promise<Record<string, string>>;
|
|
429
|
-
uploadRawFile(file: File | Blob, visibility?: "private" | "public" | "unlisted", metadata?: Record<string, any>): Promise<any>;
|
|
430
|
-
assetUpload(file: File, visibility?: "private" | "public" | "unlisted", metadata?: Record<string, any>, onProgress?: ((progress: number) => void) | undefined): Promise<any>;
|
|
431
|
-
assetLink(fileId: string, app: string, entityType: string, entityId: string, visibility?: "private" | "public" | "unlisted", webhookUrl?: string): Promise<any>;
|
|
432
|
-
assetUnlink(fileId: string, app: string, entityType: string, entityId: string): Promise<any>;
|
|
433
|
-
assetGet(fileId: string): Promise<any>;
|
|
434
|
-
assetGetUrl(fileId: string, variant?: string, expiresIn?: number): Promise<import("..").AssetUrlResponse>;
|
|
435
|
-
assetRestore(fileId: string): Promise<any>;
|
|
436
|
-
assetDelete(fileId: string, force?: boolean): Promise<any>;
|
|
437
|
-
assetGetVariants(fileId: string): Promise<import("..").AssetVariant[]>;
|
|
438
|
-
assetUpdateVisibility(fileId: string, visibility: "private" | "public" | "unlisted"): Promise<any>;
|
|
439
|
-
uploadAvatar(file: File, userId: string, app?: string): Promise<any>;
|
|
440
|
-
uploadProfileBanner(file: File, userId: string, app?: string): Promise<any>;
|
|
441
|
-
getAssetUrlCacheTTL(expiresIn?: number): number;
|
|
442
|
-
fetchAssetDownloadUrl(fileId: string, variant?: string, cacheTTL?: number, expiresIn?: number): Promise<string | null>;
|
|
443
|
-
fetchAssetContent(url: string, type: "text"): Promise<string>;
|
|
444
|
-
fetchAssetContent(url: string, type: "blob"): Promise<Blob>;
|
|
445
|
-
httpService: import("../HttpService").HttpService;
|
|
446
|
-
cloudURL: string;
|
|
447
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
448
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
449
|
-
getBaseURL(): string;
|
|
450
|
-
getClient(): import("../HttpService").HttpService;
|
|
451
|
-
getMetrics(): {
|
|
452
|
-
totalRequests: number;
|
|
453
|
-
successfulRequests: number;
|
|
454
|
-
failedRequests: number;
|
|
455
|
-
cacheHits: number;
|
|
456
|
-
cacheMisses: number;
|
|
457
|
-
averageResponseTime: number;
|
|
458
|
-
};
|
|
459
|
-
clearCache(): void;
|
|
460
|
-
clearCacheEntry(key: string): void;
|
|
461
|
-
getCacheStats(): {
|
|
462
|
-
size: number;
|
|
463
|
-
hits: number;
|
|
464
|
-
misses: number;
|
|
465
|
-
hitRate: number;
|
|
466
|
-
};
|
|
467
|
-
getCloudURL(): string;
|
|
468
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
469
|
-
clearTokens(): void;
|
|
470
|
-
getCurrentUserId(): string | null;
|
|
471
|
-
hasValidToken(): boolean;
|
|
472
|
-
getAccessToken(): string | null;
|
|
473
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
474
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
475
|
-
maxRetries?: number;
|
|
476
|
-
retryDelay?: number;
|
|
477
|
-
authTimeoutMs?: number;
|
|
478
|
-
}): Promise<T>;
|
|
479
|
-
validate(): Promise<boolean>;
|
|
480
|
-
handleError(error: unknown): Error;
|
|
481
|
-
healthCheck(): Promise<{
|
|
482
|
-
status: string;
|
|
483
|
-
users?: number;
|
|
484
|
-
timestamp?: string;
|
|
485
|
-
[key: string]: any;
|
|
486
|
-
}>;
|
|
487
|
-
};
|
|
488
|
-
__resetTokensForTests(): void;
|
|
489
|
-
} & {
|
|
490
|
-
new (...args: any[]): {
|
|
491
|
-
getUserKarma(userId: string): Promise<any>;
|
|
492
|
-
giveKarma(userId: string, amount: number, reason?: string): Promise<any>;
|
|
493
|
-
getUserKarmaTotal(userId: string): Promise<any>;
|
|
494
|
-
getUserKarmaHistory(userId: string, limit?: number, offset?: number): Promise<any>;
|
|
495
|
-
getKarmaLeaderboard(): Promise<any>;
|
|
496
|
-
getKarmaRules(): Promise<any>;
|
|
497
|
-
httpService: import("../HttpService").HttpService;
|
|
498
|
-
cloudURL: string;
|
|
499
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
500
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
501
|
-
getBaseURL(): string;
|
|
502
|
-
getClient(): import("../HttpService").HttpService;
|
|
503
|
-
getMetrics(): {
|
|
504
|
-
totalRequests: number;
|
|
505
|
-
successfulRequests: number;
|
|
506
|
-
failedRequests: number;
|
|
507
|
-
cacheHits: number;
|
|
508
|
-
cacheMisses: number;
|
|
509
|
-
averageResponseTime: number;
|
|
510
|
-
};
|
|
511
|
-
clearCache(): void;
|
|
512
|
-
clearCacheEntry(key: string): void;
|
|
513
|
-
getCacheStats(): {
|
|
514
|
-
size: number;
|
|
515
|
-
hits: number;
|
|
516
|
-
misses: number;
|
|
517
|
-
hitRate: number;
|
|
518
|
-
};
|
|
519
|
-
getCloudURL(): string;
|
|
520
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
521
|
-
clearTokens(): void;
|
|
522
|
-
getCurrentUserId(): string | null;
|
|
523
|
-
hasValidToken(): boolean;
|
|
524
|
-
getAccessToken(): string | null;
|
|
525
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
526
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
527
|
-
maxRetries?: number;
|
|
528
|
-
retryDelay?: number;
|
|
529
|
-
authTimeoutMs?: number;
|
|
530
|
-
}): Promise<T>;
|
|
531
|
-
validate(): Promise<boolean>;
|
|
532
|
-
handleError(error: unknown): Error;
|
|
533
|
-
healthCheck(): Promise<{
|
|
534
|
-
status: string;
|
|
535
|
-
users?: number;
|
|
536
|
-
timestamp?: string;
|
|
537
|
-
[key: string]: any;
|
|
538
|
-
}>;
|
|
539
|
-
};
|
|
540
|
-
__resetTokensForTests(): void;
|
|
541
|
-
} & {
|
|
542
|
-
new (...args: any[]): {
|
|
543
|
-
createPayment(data: any): Promise<any>;
|
|
544
|
-
getPayment(paymentId: string): Promise<any>;
|
|
545
|
-
getUserPayments(): Promise<any[]>;
|
|
546
|
-
getSubscription(userId: string): Promise<any>;
|
|
547
|
-
getCurrentUserSubscription(): Promise<any>;
|
|
548
|
-
getWallet(userId: string): Promise<any>;
|
|
549
|
-
getCurrentUserWallet(): Promise<any>;
|
|
550
|
-
getWalletTransactions(userId: string, options?: {
|
|
551
|
-
limit?: number;
|
|
552
|
-
offset?: number;
|
|
553
|
-
} | undefined): Promise<any>;
|
|
554
|
-
getCurrentUserWalletTransactions(options?: {
|
|
555
|
-
limit?: number;
|
|
556
|
-
offset?: number;
|
|
557
|
-
} | undefined): Promise<any>;
|
|
558
|
-
httpService: import("../HttpService").HttpService;
|
|
559
|
-
cloudURL: string;
|
|
560
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
561
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
562
|
-
getBaseURL(): string;
|
|
563
|
-
getClient(): import("../HttpService").HttpService;
|
|
564
|
-
getMetrics(): {
|
|
565
|
-
totalRequests: number;
|
|
566
|
-
successfulRequests: number;
|
|
567
|
-
failedRequests: number;
|
|
568
|
-
cacheHits: number;
|
|
569
|
-
cacheMisses: number;
|
|
570
|
-
averageResponseTime: number;
|
|
571
|
-
};
|
|
572
|
-
clearCache(): void;
|
|
573
|
-
clearCacheEntry(key: string): void;
|
|
574
|
-
getCacheStats(): {
|
|
575
|
-
size: number;
|
|
576
|
-
hits: number;
|
|
577
|
-
misses: number;
|
|
578
|
-
hitRate: number;
|
|
579
|
-
};
|
|
580
|
-
getCloudURL(): string;
|
|
581
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
582
|
-
clearTokens(): void;
|
|
583
|
-
getCurrentUserId(): string | null;
|
|
584
|
-
hasValidToken(): boolean;
|
|
585
|
-
getAccessToken(): string | null;
|
|
586
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
587
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
588
|
-
maxRetries?: number;
|
|
589
|
-
retryDelay?: number;
|
|
590
|
-
authTimeoutMs?: number;
|
|
591
|
-
}): Promise<T>;
|
|
592
|
-
validate(): Promise<boolean>;
|
|
593
|
-
handleError(error: unknown): Error;
|
|
594
|
-
healthCheck(): Promise<{
|
|
595
|
-
status: string;
|
|
596
|
-
users?: number;
|
|
597
|
-
timestamp?: string;
|
|
598
|
-
[key: string]: any;
|
|
599
|
-
}>;
|
|
600
|
-
};
|
|
601
|
-
__resetTokensForTests(): void;
|
|
602
|
-
} & {
|
|
603
|
-
new (...args: any[]): {
|
|
604
|
-
getStorage(): Promise<{
|
|
605
|
-
getItem: (key: string) => Promise<string | null>;
|
|
606
|
-
setItem: (key: string, value: string) => Promise<void>;
|
|
607
|
-
removeItem: (key: string) => Promise<void>;
|
|
608
|
-
}>;
|
|
609
|
-
getCurrentLanguage(storageKeyPrefix?: string): Promise<string | null>;
|
|
610
|
-
getCurrentLanguageMetadata(storageKeyPrefix?: string): Promise<import("..").LanguageMetadata | null>;
|
|
611
|
-
getCurrentLanguageName(storageKeyPrefix?: string): Promise<string | null>;
|
|
612
|
-
getCurrentNativeLanguageName(storageKeyPrefix?: string): Promise<string | null>;
|
|
613
|
-
httpService: import("../HttpService").HttpService;
|
|
614
|
-
cloudURL: string;
|
|
615
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
616
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
617
|
-
getBaseURL(): string;
|
|
618
|
-
getClient(): import("../HttpService").HttpService;
|
|
619
|
-
getMetrics(): {
|
|
620
|
-
totalRequests: number;
|
|
621
|
-
successfulRequests: number;
|
|
622
|
-
failedRequests: number;
|
|
623
|
-
cacheHits: number;
|
|
624
|
-
cacheMisses: number;
|
|
625
|
-
averageResponseTime: number;
|
|
626
|
-
};
|
|
627
|
-
clearCache(): void;
|
|
628
|
-
clearCacheEntry(key: string): void;
|
|
629
|
-
getCacheStats(): {
|
|
630
|
-
size: number;
|
|
631
|
-
hits: number;
|
|
632
|
-
misses: number;
|
|
633
|
-
hitRate: number;
|
|
634
|
-
};
|
|
635
|
-
getCloudURL(): string;
|
|
636
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
637
|
-
clearTokens(): void;
|
|
638
|
-
getCurrentUserId(): string | null;
|
|
639
|
-
hasValidToken(): boolean;
|
|
640
|
-
getAccessToken(): string | null;
|
|
641
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
642
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
643
|
-
maxRetries?: number;
|
|
644
|
-
retryDelay?: number;
|
|
645
|
-
authTimeoutMs?: number;
|
|
646
|
-
}): Promise<T>;
|
|
647
|
-
validate(): Promise<boolean>;
|
|
648
|
-
handleError(error: unknown): Error;
|
|
649
|
-
healthCheck(): Promise<{
|
|
650
|
-
status: string;
|
|
651
|
-
users?: number;
|
|
652
|
-
timestamp?: string;
|
|
653
|
-
[key: string]: any;
|
|
654
|
-
}>;
|
|
655
|
-
};
|
|
656
|
-
__resetTokensForTests(): void;
|
|
657
|
-
} & {
|
|
658
|
-
new (...args: any[]): {
|
|
659
|
-
extractUserId(userIdField: string | {
|
|
660
|
-
_id: string;
|
|
661
|
-
username?: string;
|
|
662
|
-
avatar?: string;
|
|
663
|
-
}): string;
|
|
664
|
-
isUserInList<T extends import("..").BlockedUser | import("..").RestrictedUser>(userId: string, getUserList: () => Promise<T[]>, getIdField: (item: T) => string | {
|
|
665
|
-
_id: string;
|
|
666
|
-
username?: string;
|
|
667
|
-
avatar?: string;
|
|
668
|
-
}): Promise<boolean>;
|
|
669
|
-
getBlockedUsers(): Promise<import("..").BlockedUser[]>;
|
|
670
|
-
blockUser(userId: string): Promise<{
|
|
671
|
-
message: string;
|
|
672
|
-
}>;
|
|
673
|
-
unblockUser(userId: string): Promise<{
|
|
674
|
-
message: string;
|
|
675
|
-
}>;
|
|
676
|
-
isUserBlocked(userId: string): Promise<boolean>;
|
|
677
|
-
getRestrictedUsers(): Promise<import("..").RestrictedUser[]>;
|
|
678
|
-
restrictUser(userId: string): Promise<{
|
|
679
|
-
message: string;
|
|
680
|
-
}>;
|
|
681
|
-
unrestrictUser(userId: string): Promise<{
|
|
682
|
-
message: string;
|
|
683
|
-
}>;
|
|
684
|
-
isUserRestricted(userId: string): Promise<boolean>;
|
|
685
|
-
httpService: import("../HttpService").HttpService;
|
|
686
|
-
cloudURL: string;
|
|
687
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
688
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
689
|
-
getBaseURL(): string;
|
|
690
|
-
getClient(): import("../HttpService").HttpService;
|
|
691
|
-
getMetrics(): {
|
|
692
|
-
totalRequests: number;
|
|
693
|
-
successfulRequests: number;
|
|
694
|
-
failedRequests: number;
|
|
695
|
-
cacheHits: number;
|
|
696
|
-
cacheMisses: number;
|
|
697
|
-
averageResponseTime: number;
|
|
698
|
-
};
|
|
699
|
-
clearCache(): void;
|
|
700
|
-
clearCacheEntry(key: string): void;
|
|
701
|
-
getCacheStats(): {
|
|
702
|
-
size: number;
|
|
703
|
-
hits: number;
|
|
704
|
-
misses: number;
|
|
705
|
-
hitRate: number;
|
|
706
|
-
};
|
|
707
|
-
getCloudURL(): string;
|
|
708
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
709
|
-
clearTokens(): void;
|
|
710
|
-
getCurrentUserId(): string | null;
|
|
711
|
-
hasValidToken(): boolean;
|
|
712
|
-
getAccessToken(): string | null;
|
|
713
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
714
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
715
|
-
maxRetries?: number;
|
|
716
|
-
retryDelay?: number;
|
|
717
|
-
authTimeoutMs?: number;
|
|
718
|
-
}): Promise<T>;
|
|
719
|
-
validate(): Promise<boolean>;
|
|
720
|
-
handleError(error: unknown): Error;
|
|
721
|
-
healthCheck(): Promise<{
|
|
722
|
-
status: string;
|
|
723
|
-
users?: number;
|
|
724
|
-
timestamp?: string;
|
|
725
|
-
[key: string]: any;
|
|
726
|
-
}>;
|
|
727
|
-
};
|
|
728
|
-
__resetTokensForTests(): void;
|
|
729
|
-
} & {
|
|
730
|
-
new (...args: any[]): {
|
|
731
|
-
getProfileByUsername(username: string): Promise<import("..").User>;
|
|
732
|
-
searchProfiles(query: string, pagination?: import("../..").PaginationParams): Promise<import("..").SearchProfilesResponse>;
|
|
733
|
-
getProfileRecommendations(): Promise<{
|
|
734
|
-
[key: string]: any;
|
|
735
|
-
id: string;
|
|
736
|
-
username: string;
|
|
737
|
-
name?: {
|
|
738
|
-
first?: string;
|
|
739
|
-
last?: string;
|
|
740
|
-
full?: string;
|
|
741
|
-
} | undefined;
|
|
742
|
-
description?: string;
|
|
743
|
-
_count?: {
|
|
744
|
-
followers: number;
|
|
745
|
-
following: number;
|
|
746
|
-
} | undefined;
|
|
747
|
-
}[]>;
|
|
748
|
-
getUserById(userId: string): Promise<import("..").User>;
|
|
749
|
-
getCurrentUser(): Promise<import("..").User>;
|
|
750
|
-
updateProfile(updates: Record<string, any>): Promise<import("..").User>;
|
|
751
|
-
getPrivacySettings(userId?: string): Promise<any>;
|
|
752
|
-
updatePrivacySettings(settings: Record<string, any>, userId?: string): Promise<any>;
|
|
753
|
-
requestAccountVerification(reason: string, evidence?: string): Promise<{
|
|
754
|
-
message: string;
|
|
755
|
-
requestId: string;
|
|
756
|
-
}>;
|
|
757
|
-
downloadAccountData(format?: "json" | "csv"): Promise<Blob>;
|
|
758
|
-
deleteAccount(password: string, confirmText: string): Promise<{
|
|
759
|
-
message: string;
|
|
760
|
-
}>;
|
|
761
|
-
followUser(userId: string): Promise<{
|
|
762
|
-
success: boolean;
|
|
763
|
-
message: string;
|
|
764
|
-
}>;
|
|
765
|
-
unfollowUser(userId: string): Promise<{
|
|
766
|
-
success: boolean;
|
|
767
|
-
message: string;
|
|
768
|
-
}>;
|
|
769
|
-
getFollowStatus(userId: string): Promise<{
|
|
770
|
-
isFollowing: boolean;
|
|
771
|
-
}>;
|
|
772
|
-
getUserFollowers(userId: string, pagination?: import("../..").PaginationParams): Promise<{
|
|
773
|
-
followers: import("..").User[];
|
|
774
|
-
total: number;
|
|
775
|
-
hasMore: boolean;
|
|
776
|
-
}>;
|
|
777
|
-
getUserFollowing(userId: string, pagination?: import("../..").PaginationParams): Promise<{
|
|
778
|
-
following: import("..").User[];
|
|
779
|
-
total: number;
|
|
780
|
-
hasMore: boolean;
|
|
781
|
-
}>;
|
|
782
|
-
getNotifications(): Promise<import("..").Notification[]>;
|
|
783
|
-
getUnreadCount(): Promise<number>;
|
|
784
|
-
createNotification(data: Partial<import("..").Notification>): Promise<import("..").Notification>;
|
|
785
|
-
markNotificationAsRead(notificationId: string): Promise<void>;
|
|
786
|
-
markAllNotificationsAsRead(): Promise<void>;
|
|
787
|
-
deleteNotification(notificationId: string): Promise<void>;
|
|
788
|
-
httpService: import("../HttpService").HttpService;
|
|
789
|
-
cloudURL: string;
|
|
790
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
791
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
792
|
-
getBaseURL(): string;
|
|
793
|
-
getClient(): import("../HttpService").HttpService;
|
|
794
|
-
getMetrics(): {
|
|
795
|
-
totalRequests: number;
|
|
796
|
-
successfulRequests: number;
|
|
797
|
-
failedRequests: number;
|
|
798
|
-
cacheHits: number;
|
|
799
|
-
cacheMisses: number;
|
|
800
|
-
averageResponseTime: number;
|
|
801
|
-
};
|
|
802
|
-
clearCache(): void;
|
|
803
|
-
clearCacheEntry(key: string): void;
|
|
804
|
-
getCacheStats(): {
|
|
805
|
-
size: number;
|
|
806
|
-
hits: number;
|
|
807
|
-
misses: number;
|
|
808
|
-
hitRate: number;
|
|
809
|
-
};
|
|
810
|
-
getCloudURL(): string;
|
|
811
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
812
|
-
clearTokens(): void;
|
|
813
|
-
getCurrentUserId(): string | null;
|
|
814
|
-
hasValidToken(): boolean;
|
|
815
|
-
getAccessToken(): string | null;
|
|
816
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
817
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
818
|
-
maxRetries?: number;
|
|
819
|
-
retryDelay?: number;
|
|
820
|
-
authTimeoutMs?: number;
|
|
821
|
-
}): Promise<T>;
|
|
822
|
-
validate(): Promise<boolean>;
|
|
823
|
-
handleError(error: unknown): Error;
|
|
824
|
-
healthCheck(): Promise<{
|
|
825
|
-
status: string;
|
|
826
|
-
users?: number;
|
|
827
|
-
timestamp?: string;
|
|
828
|
-
[key: string]: any;
|
|
829
|
-
}>;
|
|
830
|
-
};
|
|
831
|
-
__resetTokensForTests(): void;
|
|
832
|
-
} & {
|
|
833
|
-
new (...args: any[]): {
|
|
834
|
-
signInWithRedirect(options?: import("./OxyServices.redirect").RedirectAuthOptions): void;
|
|
835
|
-
signUpWithRedirect(options?: import("./OxyServices.redirect").RedirectAuthOptions): void;
|
|
836
|
-
handleAuthCallback(): import("..").SessionLoginResponse | null;
|
|
837
|
-
restoreSession(): boolean;
|
|
838
|
-
clearStoredSession(): void;
|
|
839
|
-
getStoredSessionId(): string | null;
|
|
840
|
-
buildAuthUrl(params: {
|
|
841
|
-
mode: string;
|
|
842
|
-
redirectUri: string;
|
|
843
|
-
state: string;
|
|
844
|
-
nonce: string;
|
|
845
|
-
clientId: string;
|
|
846
|
-
}): string;
|
|
847
|
-
storeTokens(accessToken: string, sessionId: string): void;
|
|
848
|
-
generateState(): string;
|
|
849
|
-
generateNonce(): string;
|
|
850
|
-
storeAuthState(state: string, nonce: string): void;
|
|
851
|
-
getStoredState(): string | null;
|
|
852
|
-
clearAuthState(): void;
|
|
853
|
-
savePreAuthUrl(url: string): void;
|
|
854
|
-
cleanAuthCallbackUrl(url: URL): void;
|
|
855
|
-
httpService: import("../HttpService").HttpService;
|
|
856
|
-
cloudURL: string;
|
|
857
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
858
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
859
|
-
getBaseURL(): string;
|
|
860
|
-
getClient(): import("../HttpService").HttpService;
|
|
861
|
-
getMetrics(): {
|
|
862
|
-
totalRequests: number;
|
|
863
|
-
successfulRequests: number;
|
|
864
|
-
failedRequests: number;
|
|
865
|
-
cacheHits: number;
|
|
866
|
-
cacheMisses: number;
|
|
867
|
-
averageResponseTime: number;
|
|
868
|
-
};
|
|
869
|
-
clearCache(): void;
|
|
870
|
-
clearCacheEntry(key: string): void;
|
|
871
|
-
getCacheStats(): {
|
|
872
|
-
size: number;
|
|
873
|
-
hits: number;
|
|
874
|
-
misses: number;
|
|
875
|
-
hitRate: number;
|
|
876
|
-
};
|
|
877
|
-
getCloudURL(): string;
|
|
878
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
879
|
-
clearTokens(): void;
|
|
880
|
-
getCurrentUserId(): string | null;
|
|
881
|
-
hasValidToken(): boolean;
|
|
882
|
-
getAccessToken(): string | null;
|
|
883
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
884
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
885
|
-
maxRetries?: number;
|
|
886
|
-
retryDelay?: number;
|
|
887
|
-
authTimeoutMs?: number;
|
|
888
|
-
}): Promise<T>;
|
|
889
|
-
validate(): Promise<boolean>;
|
|
890
|
-
handleError(error: unknown): Error;
|
|
891
|
-
healthCheck(): Promise<{
|
|
892
|
-
status: string;
|
|
893
|
-
users?: number;
|
|
894
|
-
timestamp?: string;
|
|
895
|
-
[key: string]: any;
|
|
896
|
-
}>;
|
|
897
|
-
};
|
|
898
|
-
readonly AUTH_URL: "https://auth.oxy.so";
|
|
899
|
-
readonly TOKEN_STORAGE_KEY: "oxy_access_token";
|
|
900
|
-
readonly SESSION_STORAGE_KEY: "oxy_session_id";
|
|
901
|
-
readonly STATE_STORAGE_KEY: "oxy_auth_state";
|
|
902
|
-
readonly PRE_AUTH_URL_KEY: "oxy_pre_auth_url";
|
|
903
|
-
readonly NONCE_STORAGE_KEY: "oxy_auth_nonce";
|
|
904
|
-
__resetTokensForTests(): void;
|
|
905
|
-
} & {
|
|
906
|
-
new (...args: any[]): {
|
|
907
|
-
signInWithPopup(options?: import("./OxyServices.popup").PopupAuthOptions): Promise<import("..").SessionLoginResponse>;
|
|
908
|
-
signUpWithPopup(options?: import("./OxyServices.popup").PopupAuthOptions): Promise<import("..").SessionLoginResponse>;
|
|
909
|
-
silentSignIn(options?: import("./OxyServices.popup").SilentAuthOptions): Promise<import("..").SessionLoginResponse | null>;
|
|
910
|
-
openCenteredPopup(url: string, title: string, width: number, height: number): Window | null;
|
|
911
|
-
waitForPopupAuth(popup: Window, expectedState: string, timeout: number): Promise<import("..").SessionLoginResponse>;
|
|
912
|
-
waitForIframeAuth(iframe: HTMLIFrameElement, timeout: number, expectedOrigin: string): Promise<import("..").SessionLoginResponse | null>;
|
|
913
|
-
buildAuthUrl(params: {
|
|
914
|
-
mode: string;
|
|
915
|
-
state: string;
|
|
916
|
-
nonce: string;
|
|
917
|
-
clientId: string;
|
|
918
|
-
redirectUri: string;
|
|
919
|
-
}): string;
|
|
920
|
-
generateState(): string;
|
|
921
|
-
generateNonce(): string;
|
|
922
|
-
storeAuthState(state: string, nonce: string): void;
|
|
923
|
-
clearAuthState(state: string): void;
|
|
924
|
-
httpService: import("../HttpService").HttpService;
|
|
925
|
-
cloudURL: string;
|
|
926
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
927
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
928
|
-
getBaseURL(): string;
|
|
929
|
-
getClient(): import("../HttpService").HttpService;
|
|
930
|
-
getMetrics(): {
|
|
931
|
-
totalRequests: number;
|
|
932
|
-
successfulRequests: number;
|
|
933
|
-
failedRequests: number;
|
|
934
|
-
cacheHits: number;
|
|
935
|
-
cacheMisses: number;
|
|
936
|
-
averageResponseTime: number;
|
|
937
|
-
};
|
|
938
|
-
clearCache(): void;
|
|
939
|
-
clearCacheEntry(key: string): void;
|
|
940
|
-
getCacheStats(): {
|
|
941
|
-
size: number;
|
|
942
|
-
hits: number;
|
|
943
|
-
misses: number;
|
|
944
|
-
hitRate: number;
|
|
945
|
-
};
|
|
946
|
-
getCloudURL(): string;
|
|
947
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
948
|
-
clearTokens(): void;
|
|
949
|
-
getCurrentUserId(): string | null;
|
|
950
|
-
hasValidToken(): boolean;
|
|
951
|
-
getAccessToken(): string | null;
|
|
952
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
953
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
954
|
-
maxRetries?: number;
|
|
955
|
-
retryDelay?: number;
|
|
956
|
-
authTimeoutMs?: number;
|
|
957
|
-
}): Promise<T>;
|
|
958
|
-
validate(): Promise<boolean>;
|
|
959
|
-
handleError(error: unknown): Error;
|
|
960
|
-
healthCheck(): Promise<{
|
|
961
|
-
status: string;
|
|
962
|
-
users?: number;
|
|
963
|
-
timestamp?: string;
|
|
964
|
-
[key: string]: any;
|
|
965
|
-
}>;
|
|
966
|
-
};
|
|
967
|
-
readonly AUTH_URL: "https://auth.oxy.so";
|
|
968
|
-
readonly POPUP_WIDTH: 500;
|
|
969
|
-
readonly POPUP_HEIGHT: 700;
|
|
970
|
-
readonly POPUP_TIMEOUT: 60000;
|
|
971
|
-
readonly SILENT_TIMEOUT: 5000;
|
|
972
|
-
__resetTokensForTests(): void;
|
|
973
|
-
} & {
|
|
974
|
-
new (...args: any[]): {
|
|
975
|
-
isFedCMSupported(): boolean;
|
|
976
|
-
signInWithFedCM(options?: import("./OxyServices.fedcm").FedCMAuthOptions): Promise<import("..").SessionLoginResponse>;
|
|
977
|
-
silentSignInWithFedCM(): Promise<import("..").SessionLoginResponse | null>;
|
|
978
|
-
requestIdentityCredential(options: {
|
|
979
|
-
configURL: string;
|
|
980
|
-
clientId: string;
|
|
981
|
-
nonce: string;
|
|
982
|
-
context?: string;
|
|
983
|
-
mediation?: "silent" | "optional" | "required";
|
|
984
|
-
}): Promise<{
|
|
985
|
-
token: string;
|
|
986
|
-
} | null>;
|
|
987
|
-
exchangeIdTokenForSession(idToken: string): Promise<import("..").SessionLoginResponse>;
|
|
988
|
-
revokeFedCMCredential(): Promise<void>;
|
|
989
|
-
getFedCMConfig(): import("./OxyServices.fedcm").FedCMConfig;
|
|
990
|
-
generateNonce(): string;
|
|
991
|
-
getClientId(): string;
|
|
992
|
-
httpService: import("../HttpService").HttpService;
|
|
993
|
-
cloudURL: string;
|
|
994
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
995
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
996
|
-
getBaseURL(): string;
|
|
997
|
-
getClient(): import("../HttpService").HttpService;
|
|
998
|
-
getMetrics(): {
|
|
999
|
-
totalRequests: number;
|
|
1000
|
-
successfulRequests: number;
|
|
1001
|
-
failedRequests: number;
|
|
1002
|
-
cacheHits: number;
|
|
1003
|
-
cacheMisses: number;
|
|
1004
|
-
averageResponseTime: number;
|
|
1005
|
-
};
|
|
1006
|
-
clearCache(): void;
|
|
1007
|
-
clearCacheEntry(key: string): void;
|
|
1008
|
-
getCacheStats(): {
|
|
1009
|
-
size: number;
|
|
1010
|
-
hits: number;
|
|
1011
|
-
misses: number;
|
|
1012
|
-
hitRate: number;
|
|
1013
|
-
};
|
|
1014
|
-
getCloudURL(): string;
|
|
1015
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
1016
|
-
clearTokens(): void;
|
|
1017
|
-
getCurrentUserId(): string | null;
|
|
1018
|
-
hasValidToken(): boolean;
|
|
1019
|
-
getAccessToken(): string | null;
|
|
1020
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
1021
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
1022
|
-
maxRetries?: number;
|
|
1023
|
-
retryDelay?: number;
|
|
1024
|
-
authTimeoutMs?: number;
|
|
1025
|
-
}): Promise<T>;
|
|
1026
|
-
validate(): Promise<boolean>;
|
|
1027
|
-
handleError(error: unknown): Error;
|
|
1028
|
-
healthCheck(): Promise<{
|
|
1029
|
-
status: string;
|
|
1030
|
-
users?: number;
|
|
1031
|
-
timestamp?: string;
|
|
1032
|
-
[key: string]: any;
|
|
1033
|
-
}>;
|
|
1034
|
-
};
|
|
1035
|
-
readonly DEFAULT_CONFIG_URL: "https://auth.oxy.so/fedcm.json";
|
|
1036
|
-
readonly FEDCM_TIMEOUT: 60000;
|
|
1037
|
-
isFedCMSupported(): boolean;
|
|
1038
|
-
__resetTokensForTests(): void;
|
|
1039
|
-
} & {
|
|
1040
|
-
new (...args: any[]): {
|
|
1041
|
-
register(publicKey: string, signature: string, timestamp: number): Promise<{
|
|
1042
|
-
message: string;
|
|
1043
|
-
user: import("..").User;
|
|
1044
|
-
}>;
|
|
1045
|
-
requestChallenge(publicKey: string): Promise<import("./OxyServices.auth").ChallengeResponse>;
|
|
1046
|
-
verifyChallenge(publicKey: string, challenge: string, signature: string, timestamp: number, deviceName?: string, deviceFingerprint?: string): Promise<import("..").SessionLoginResponse>;
|
|
1047
|
-
checkPublicKeyRegistered(publicKey: string): Promise<import("./OxyServices.auth").PublicKeyCheckResponse>;
|
|
1048
|
-
getUserByPublicKey(publicKey: string): Promise<import("..").User>;
|
|
1049
|
-
getUserBySession(sessionId: string): Promise<import("..").User>;
|
|
1050
|
-
getUsersBySessions(sessionIds: string[]): Promise<{
|
|
1051
|
-
sessionId: string;
|
|
1052
|
-
user: import("..").User | null;
|
|
1053
|
-
}[]>;
|
|
1054
|
-
getTokenBySession(sessionId: string): Promise<{
|
|
1055
|
-
accessToken: string;
|
|
1056
|
-
expiresAt: string;
|
|
1057
|
-
}>;
|
|
1058
|
-
getSessionsBySessionId(sessionId: string): Promise<any[]>;
|
|
1059
|
-
logoutSession(sessionId: string, targetSessionId?: string): Promise<void>;
|
|
1060
|
-
logoutAllSessions(sessionId: string): Promise<void>;
|
|
1061
|
-
validateSession(sessionId: string, options?: {
|
|
1062
|
-
deviceFingerprint?: string;
|
|
1063
|
-
useHeaderValidation?: boolean;
|
|
1064
|
-
}): Promise<{
|
|
1065
|
-
valid: boolean;
|
|
1066
|
-
expiresAt: string;
|
|
1067
|
-
lastActivity: string;
|
|
1068
|
-
user: import("..").User;
|
|
1069
|
-
sessionId?: string;
|
|
1070
|
-
source?: string;
|
|
1071
|
-
}>;
|
|
1072
|
-
checkUsernameAvailability(username: string): Promise<{
|
|
1073
|
-
available: boolean;
|
|
1074
|
-
message: string;
|
|
1075
|
-
}>;
|
|
1076
|
-
checkEmailAvailability(email: string): Promise<{
|
|
1077
|
-
available: boolean;
|
|
1078
|
-
message: string;
|
|
1079
|
-
}>;
|
|
1080
|
-
signUp(username: string, email: string, password: string, deviceName?: string, deviceFingerprint?: any): Promise<import("..").SessionLoginResponse>;
|
|
1081
|
-
signIn(identifier: string, password: string, deviceName?: string, deviceFingerprint?: any): Promise<import("..").SessionLoginResponse>;
|
|
1082
|
-
signInWithEmail(email: string, password: string, deviceName?: string, deviceFingerprint?: any): Promise<import("..").SessionLoginResponse>;
|
|
1083
|
-
httpService: import("../HttpService").HttpService;
|
|
1084
|
-
cloudURL: string;
|
|
1085
|
-
config: import("../OxyServices.base").OxyConfig;
|
|
1086
|
-
makeRequest<T>(method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", url: string, data?: any, options?: import("../HttpService").RequestOptions): Promise<T>;
|
|
1087
|
-
getBaseURL(): string;
|
|
1088
|
-
getClient(): import("../HttpService").HttpService;
|
|
1089
|
-
getMetrics(): {
|
|
1090
|
-
totalRequests: number;
|
|
1091
|
-
successfulRequests: number;
|
|
1092
|
-
failedRequests: number;
|
|
1093
|
-
cacheHits: number;
|
|
1094
|
-
cacheMisses: number;
|
|
1095
|
-
averageResponseTime: number;
|
|
1096
|
-
};
|
|
1097
|
-
clearCache(): void;
|
|
1098
|
-
clearCacheEntry(key: string): void;
|
|
1099
|
-
getCacheStats(): {
|
|
1100
|
-
size: number;
|
|
1101
|
-
hits: number;
|
|
1102
|
-
misses: number;
|
|
1103
|
-
hitRate: number;
|
|
1104
|
-
};
|
|
1105
|
-
getCloudURL(): string;
|
|
1106
|
-
setTokens(accessToken: string, refreshToken?: string): void;
|
|
1107
|
-
clearTokens(): void;
|
|
1108
|
-
getCurrentUserId(): string | null;
|
|
1109
|
-
hasValidToken(): boolean;
|
|
1110
|
-
getAccessToken(): string | null;
|
|
1111
|
-
waitForAuth(timeoutMs?: number): Promise<boolean>;
|
|
1112
|
-
withAuthRetry<T>(operation: () => Promise<T>, operationName: string, options?: {
|
|
1113
|
-
maxRetries?: number;
|
|
1114
|
-
retryDelay?: number;
|
|
1115
|
-
authTimeoutMs?: number;
|
|
1116
|
-
}): Promise<T>;
|
|
1117
|
-
validate(): Promise<boolean>;
|
|
1118
|
-
handleError(error: unknown): Error;
|
|
1119
|
-
healthCheck(): Promise<{
|
|
1120
|
-
status: string;
|
|
1121
|
-
users?: number;
|
|
1122
|
-
timestamp?: string;
|
|
1123
|
-
[key: string]: any;
|
|
1124
|
-
}>;
|
|
1125
|
-
};
|
|
1126
|
-
__resetTokensForTests(): void;
|
|
1127
|
-
} & typeof OxyServicesBase;
|
|
29
|
+
export declare function composeOxyServices(): any;
|
|
30
|
+
export { MIXIN_PIPELINE };
|
|
1128
31
|
//# sourceMappingURL=index.d.ts.map
|