@oxyhq/core 1.11.24 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -6
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/AuthManager.js +678 -4
- package/dist/cjs/AuthManagerTypes.js +13 -0
- package/dist/cjs/CrossDomainAuth.js +45 -3
- package/dist/cjs/OxyServices.base.js +16 -0
- package/dist/cjs/i18n/locales/ar-SA.json +83 -0
- package/dist/cjs/i18n/locales/ca-ES.json +83 -0
- package/dist/cjs/i18n/locales/de-DE.json +83 -0
- package/dist/cjs/i18n/locales/en-US.json +83 -0
- package/dist/cjs/i18n/locales/es-ES.json +99 -4
- package/dist/cjs/i18n/locales/fr-FR.json +83 -0
- package/dist/cjs/i18n/locales/it-IT.json +83 -0
- package/dist/cjs/i18n/locales/ja-JP.json +83 -0
- package/dist/cjs/i18n/locales/ko-KR.json +83 -0
- package/dist/cjs/i18n/locales/locales/ar-SA.json +83 -1
- package/dist/cjs/i18n/locales/locales/ca-ES.json +83 -1
- package/dist/cjs/i18n/locales/locales/de-DE.json +83 -1
- package/dist/cjs/i18n/locales/locales/en-US.json +83 -0
- package/dist/cjs/i18n/locales/locales/es-ES.json +99 -4
- package/dist/cjs/i18n/locales/locales/fr-FR.json +83 -1
- package/dist/cjs/i18n/locales/locales/it-IT.json +83 -1
- package/dist/cjs/i18n/locales/locales/ja-JP.json +200 -117
- package/dist/cjs/i18n/locales/locales/ko-KR.json +83 -1
- package/dist/cjs/i18n/locales/locales/pt-PT.json +83 -1
- package/dist/cjs/i18n/locales/locales/zh-CN.json +83 -1
- package/dist/cjs/i18n/locales/pt-PT.json +83 -0
- package/dist/cjs/i18n/locales/zh-CN.json +83 -0
- package/dist/cjs/index.js +121 -57
- package/dist/cjs/mixins/OxyServices.auth.js +235 -0
- package/dist/cjs/mixins/OxyServices.fedcm.js +36 -0
- package/dist/cjs/mixins/OxyServices.popup.js +61 -1
- package/dist/cjs/mixins/OxyServices.user.js +18 -0
- package/dist/cjs/utils/accountUtils.js +64 -1
- package/dist/cjs/utils/coldBoot.js +71 -0
- package/dist/cjs/utils/fapiAutoDetect.js +88 -0
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/AuthManager.js +678 -4
- package/dist/esm/AuthManagerTypes.js +12 -0
- package/dist/esm/CrossDomainAuth.js +45 -3
- package/dist/esm/OxyServices.base.js +16 -0
- package/dist/esm/i18n/locales/ar-SA.json +83 -0
- package/dist/esm/i18n/locales/ca-ES.json +83 -0
- package/dist/esm/i18n/locales/de-DE.json +83 -0
- package/dist/esm/i18n/locales/en-US.json +83 -0
- package/dist/esm/i18n/locales/es-ES.json +99 -4
- package/dist/esm/i18n/locales/fr-FR.json +83 -0
- package/dist/esm/i18n/locales/it-IT.json +83 -0
- package/dist/esm/i18n/locales/ja-JP.json +83 -0
- package/dist/esm/i18n/locales/ko-KR.json +83 -0
- package/dist/esm/i18n/locales/locales/ar-SA.json +83 -1
- package/dist/esm/i18n/locales/locales/ca-ES.json +83 -1
- package/dist/esm/i18n/locales/locales/de-DE.json +83 -1
- package/dist/esm/i18n/locales/locales/en-US.json +83 -0
- package/dist/esm/i18n/locales/locales/es-ES.json +99 -4
- package/dist/esm/i18n/locales/locales/fr-FR.json +83 -1
- package/dist/esm/i18n/locales/locales/it-IT.json +83 -1
- package/dist/esm/i18n/locales/locales/ja-JP.json +200 -117
- package/dist/esm/i18n/locales/locales/ko-KR.json +83 -1
- package/dist/esm/i18n/locales/locales/pt-PT.json +83 -1
- package/dist/esm/i18n/locales/locales/zh-CN.json +83 -1
- package/dist/esm/i18n/locales/pt-PT.json +83 -0
- package/dist/esm/i18n/locales/zh-CN.json +83 -0
- package/dist/esm/index.js +74 -26
- package/dist/esm/mixins/OxyServices.auth.js +235 -0
- package/dist/esm/mixins/OxyServices.fedcm.js +36 -0
- package/dist/esm/mixins/OxyServices.popup.js +61 -1
- package/dist/esm/mixins/OxyServices.user.js +18 -0
- package/dist/esm/utils/accountUtils.js +61 -0
- package/dist/esm/utils/coldBoot.js +68 -0
- package/dist/esm/utils/fapiAutoDetect.js +85 -0
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/AuthManager.d.ts +243 -3
- package/dist/types/AuthManagerTypes.d.ts +68 -0
- package/dist/types/CrossDomainAuth.d.ts +23 -0
- package/dist/types/OxyServices.base.d.ts +14 -0
- package/dist/types/OxyServices.d.ts +7 -0
- package/dist/types/index.d.ts +31 -17
- package/dist/types/mixins/OxyServices.analytics.d.ts +1 -0
- package/dist/types/mixins/OxyServices.appData.d.ts +1 -0
- package/dist/types/mixins/OxyServices.assets.d.ts +4 -1
- package/dist/types/mixins/OxyServices.auth.d.ts +73 -1
- package/dist/types/mixins/OxyServices.contacts.d.ts +1 -0
- package/dist/types/mixins/OxyServices.developer.d.ts +1 -0
- package/dist/types/mixins/OxyServices.devices.d.ts +1 -0
- package/dist/types/mixins/OxyServices.features.d.ts +2 -5
- package/dist/types/mixins/OxyServices.fedcm.d.ts +34 -0
- package/dist/types/mixins/OxyServices.karma.d.ts +1 -0
- package/dist/types/mixins/OxyServices.language.d.ts +1 -0
- package/dist/types/mixins/OxyServices.location.d.ts +1 -0
- package/dist/types/mixins/OxyServices.managedAccounts.d.ts +1 -0
- package/dist/types/mixins/OxyServices.payment.d.ts +1 -0
- package/dist/types/mixins/OxyServices.popup.d.ts +40 -0
- package/dist/types/mixins/OxyServices.privacy.d.ts +1 -0
- package/dist/types/mixins/OxyServices.redirect.d.ts +1 -0
- package/dist/types/mixins/OxyServices.security.d.ts +1 -0
- package/dist/types/mixins/OxyServices.topics.d.ts +1 -0
- package/dist/types/mixins/OxyServices.user.d.ts +16 -1
- package/dist/types/mixins/OxyServices.utility.d.ts +1 -0
- package/dist/types/models/interfaces.d.ts +98 -0
- package/dist/types/models/session.d.ts +8 -0
- package/dist/types/utils/accountUtils.d.ts +33 -0
- package/dist/types/utils/coldBoot.d.ts +102 -0
- package/dist/types/utils/fapiAutoDetect.d.ts +37 -0
- package/package.json +9 -18
- package/src/AuthManager.ts +776 -7
- package/src/AuthManagerTypes.ts +72 -0
- package/src/CrossDomainAuth.ts +54 -3
- package/src/OxyServices.base.ts +17 -0
- package/src/OxyServices.ts +7 -0
- package/src/__tests__/authManager.cookiePath.test.ts +339 -0
- package/src/__tests__/authManager.security.test.ts +342 -0
- package/src/__tests__/crossDomainAuth.test.ts +191 -0
- package/src/i18n/locales/ar-SA.json +83 -1
- package/src/i18n/locales/ca-ES.json +83 -1
- package/src/i18n/locales/de-DE.json +83 -1
- package/src/i18n/locales/en-US.json +83 -0
- package/src/i18n/locales/es-ES.json +99 -4
- package/src/i18n/locales/fr-FR.json +83 -1
- package/src/i18n/locales/it-IT.json +83 -1
- package/src/i18n/locales/ja-JP.json +200 -117
- package/src/i18n/locales/ko-KR.json +83 -1
- package/src/i18n/locales/pt-PT.json +83 -1
- package/src/i18n/locales/zh-CN.json +83 -1
- package/src/index.ts +309 -112
- package/src/mixins/OxyServices.auth.ts +268 -1
- package/src/mixins/OxyServices.fedcm.ts +63 -0
- package/src/mixins/OxyServices.popup.ts +79 -1
- package/src/mixins/OxyServices.user.ts +33 -1
- package/src/mixins/__tests__/popup.test.ts +307 -0
- package/src/mixins/__tests__/sessionBaseUrl.test.ts +61 -0
- package/src/models/interfaces.ts +116 -0
- package/src/models/session.ts +8 -0
- package/src/utils/__tests__/coldBoot.test.ts +226 -0
- package/src/utils/__tests__/fapiAutoDetect.test.ts +93 -0
- package/src/utils/accountUtils.ts +84 -0
- package/src/utils/coldBoot.ts +136 -0
- package/src/utils/fapiAutoDetect.ts +82 -0
- package/dist/cjs/crypto/index.js +0 -22
- package/dist/cjs/shared/index.js +0 -70
- package/dist/cjs/utils/index.js +0 -26
- package/dist/esm/crypto/index.js +0 -13
- package/dist/esm/shared/index.js +0 -31
- package/dist/esm/utils/index.js +0 -7
- package/dist/types/crypto/index.d.ts +0 -11
- package/dist/types/shared/index.d.ts +0 -28
- package/dist/types/utils/index.d.ts +0 -6
- package/src/crypto/index.ts +0 -30
- package/src/shared/index.ts +0 -82
- package/src/utils/index.ts +0 -21
package/src/index.ts
CHANGED
|
@@ -12,183 +12,380 @@
|
|
|
12
12
|
*
|
|
13
13
|
* const user = await oxyClient.signIn(publicKey);
|
|
14
14
|
* ```
|
|
15
|
+
*
|
|
16
|
+
* Every export below is NOMINAL — no `export *`, no barrels, no compat shims.
|
|
17
|
+
* If a symbol does not appear here, it is NOT part of the public API.
|
|
15
18
|
*/
|
|
16
19
|
|
|
17
20
|
// Ensure crypto polyfills are loaded before anything else
|
|
18
21
|
import './crypto/polyfill';
|
|
19
22
|
|
|
20
|
-
//
|
|
23
|
+
// ---------------------------------------------------------------------------
|
|
24
|
+
// API client
|
|
25
|
+
// ---------------------------------------------------------------------------
|
|
21
26
|
export { OxyServices, OxyAuthenticationError, OxyAuthenticationTimeoutError } from './OxyServices';
|
|
22
27
|
export { OXY_CLOUD_URL, oxyClient } from './OxyServices';
|
|
23
28
|
|
|
24
|
-
//
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
// Authentication
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
25
32
|
export { AuthManager, createAuthManager } from './AuthManager';
|
|
26
|
-
export type {
|
|
33
|
+
export type {
|
|
34
|
+
StorageAdapter,
|
|
35
|
+
AuthStateChangeCallback,
|
|
36
|
+
AuthMethod,
|
|
37
|
+
AuthManagerConfig,
|
|
38
|
+
} from './AuthManager';
|
|
39
|
+
export type {
|
|
40
|
+
AuthManagerAccount,
|
|
41
|
+
RestoreFromCookiesResult,
|
|
42
|
+
SwitchAuthuserResult,
|
|
43
|
+
} from './AuthManagerTypes';
|
|
27
44
|
|
|
28
45
|
export { CrossDomainAuth, createCrossDomainAuth } from './CrossDomainAuth';
|
|
29
46
|
export type { CrossDomainAuthOptions } from './CrossDomainAuth';
|
|
30
|
-
export type { FedCMAuthOptions, FedCMConfig } from './mixins/OxyServices.fedcm';
|
|
47
|
+
export type { FedCMAuthOptions, FedCMConfig, AuthorizedApp } from './mixins/OxyServices.fedcm';
|
|
31
48
|
export type { PopupAuthOptions } from './mixins/OxyServices.popup';
|
|
32
49
|
export type { RedirectAuthOptions } from './mixins/OxyServices.redirect';
|
|
33
50
|
export { ServiceCredentialMismatchError } from './mixins/OxyServices.auth';
|
|
34
51
|
export type { ServiceTokenResponse } from './mixins/OxyServices.auth';
|
|
35
52
|
export type { ServiceApp, ServiceActingAsVerification } from './mixins/OxyServices.utility';
|
|
36
|
-
export type {
|
|
37
|
-
|
|
53
|
+
export type {
|
|
54
|
+
CreateManagedAccountInput,
|
|
55
|
+
ManagedAccountManager,
|
|
56
|
+
ManagedAccount,
|
|
57
|
+
} from './mixins/OxyServices.managedAccounts';
|
|
58
|
+
export type {
|
|
59
|
+
ContactDiscoveryMatch,
|
|
60
|
+
ContactDiscoveryResponse,
|
|
61
|
+
} from './mixins/OxyServices.contacts';
|
|
38
62
|
export { OxyAppDataIdentifierError } from './mixins/OxyServices.appData';
|
|
39
63
|
|
|
40
|
-
//
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
// Auth helpers (token refresh, error normalisation, retry policies)
|
|
66
|
+
// ---------------------------------------------------------------------------
|
|
41
67
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
export {
|
|
68
|
+
SessionSyncRequiredError,
|
|
69
|
+
AuthenticationFailedError,
|
|
70
|
+
ensureValidToken,
|
|
71
|
+
isAuthenticationError,
|
|
72
|
+
withAuthErrorHandling,
|
|
73
|
+
authenticatedApiCall,
|
|
74
|
+
} from './utils/authHelpers';
|
|
75
|
+
export type { HandleApiErrorOptions } from './utils/authHelpers';
|
|
76
|
+
|
|
77
|
+
// ---------------------------------------------------------------------------
|
|
78
|
+
// Sessions
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
80
|
+
export {
|
|
81
|
+
mergeSessions,
|
|
82
|
+
normalizeAndSortSessions,
|
|
83
|
+
sessionsArraysEqual,
|
|
84
|
+
} from './utils/sessionUtils';
|
|
85
|
+
export type {
|
|
86
|
+
ClientSession,
|
|
87
|
+
StorageKeys,
|
|
88
|
+
MinimalUserData,
|
|
89
|
+
SessionLoginResponse,
|
|
90
|
+
} from './models/session';
|
|
55
91
|
|
|
56
|
-
//
|
|
92
|
+
// ---------------------------------------------------------------------------
|
|
93
|
+
// Multi-account refresh-all (Google-style)
|
|
94
|
+
// ---------------------------------------------------------------------------
|
|
95
|
+
export type {
|
|
96
|
+
RefreshAllResponse,
|
|
97
|
+
RefreshAllAccount,
|
|
98
|
+
RefreshAllAccountUser,
|
|
99
|
+
RefreshCookieResponse,
|
|
100
|
+
} from './models/interfaces';
|
|
101
|
+
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// Crypto / identity
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
export {
|
|
106
|
+
KeyManager,
|
|
107
|
+
IdentityAlreadyExistsError,
|
|
108
|
+
IdentityPersistError,
|
|
109
|
+
} from './crypto/keyManager';
|
|
110
|
+
export type { KeyPair } from './crypto/keyManager';
|
|
111
|
+
export { SignatureService } from './crypto/signatureService';
|
|
112
|
+
export type { SignedMessage, AuthChallenge } from './crypto/signatureService';
|
|
113
|
+
export { RecoveryPhraseService } from './crypto/recoveryPhrase';
|
|
114
|
+
export type { RecoveryPhraseResult } from './crypto/recoveryPhrase';
|
|
115
|
+
|
|
116
|
+
// ---------------------------------------------------------------------------
|
|
117
|
+
// Devices
|
|
118
|
+
// ---------------------------------------------------------------------------
|
|
57
119
|
export { DeviceManager } from './utils/deviceManager';
|
|
58
120
|
export type { DeviceFingerprint, StoredDeviceInfo } from './utils/deviceManager';
|
|
59
121
|
|
|
60
|
-
//
|
|
122
|
+
// ---------------------------------------------------------------------------
|
|
123
|
+
// Domain models / wire types
|
|
124
|
+
// ---------------------------------------------------------------------------
|
|
125
|
+
export type {
|
|
126
|
+
OxyConfig,
|
|
127
|
+
PrivacySettings,
|
|
128
|
+
NotificationPreferences,
|
|
129
|
+
UserPreferences,
|
|
130
|
+
User,
|
|
131
|
+
LoginResponse,
|
|
132
|
+
Notification,
|
|
133
|
+
Wallet,
|
|
134
|
+
Transaction,
|
|
135
|
+
BlockedUser,
|
|
136
|
+
RestrictedUser,
|
|
137
|
+
TransferFundsRequest,
|
|
138
|
+
PurchaseRequest,
|
|
139
|
+
WithdrawalRequest,
|
|
140
|
+
TransactionResponse,
|
|
141
|
+
PaginationInfo,
|
|
142
|
+
SearchProfilesResponse,
|
|
143
|
+
KarmaRule,
|
|
144
|
+
KarmaHistory,
|
|
145
|
+
KarmaLeaderboardEntry,
|
|
146
|
+
KarmaAwardRequest,
|
|
147
|
+
ApiError,
|
|
148
|
+
PaymentMethod,
|
|
149
|
+
PaymentRequest,
|
|
150
|
+
PaymentResponse,
|
|
151
|
+
AnalyticsData,
|
|
152
|
+
FollowerDetails,
|
|
153
|
+
ContentViewer,
|
|
154
|
+
FileMetadata,
|
|
155
|
+
FileUploadResponse,
|
|
156
|
+
FileListResponse,
|
|
157
|
+
FileUpdateRequest,
|
|
158
|
+
FileDeleteResponse,
|
|
159
|
+
RNFileDescriptor,
|
|
160
|
+
AssetUploadInput,
|
|
161
|
+
FileVisibility,
|
|
162
|
+
AssetLink,
|
|
163
|
+
AssetMetadata,
|
|
164
|
+
AssetVariant,
|
|
165
|
+
Asset,
|
|
166
|
+
AssetInitRequest,
|
|
167
|
+
AssetInitResponse,
|
|
168
|
+
AssetCompleteRequest,
|
|
169
|
+
AssetLinkRequest,
|
|
170
|
+
AssetUnlinkRequest,
|
|
171
|
+
AssetUrlResponse,
|
|
172
|
+
AssetDeleteSummary,
|
|
173
|
+
AssetUpdateVisibilityRequest,
|
|
174
|
+
AssetUpdateVisibilityResponse,
|
|
175
|
+
AccountStorageCategoryUsage,
|
|
176
|
+
AccountStorageUsageResponse,
|
|
177
|
+
SecurityEventType,
|
|
178
|
+
SecurityEventSeverity,
|
|
179
|
+
SecurityActivity,
|
|
180
|
+
SecurityActivityResponse,
|
|
181
|
+
AssetUploadProgress,
|
|
182
|
+
DeviceSession,
|
|
183
|
+
DeviceSessionsResponse,
|
|
184
|
+
DeviceSessionLogoutResponse,
|
|
185
|
+
UpdateDeviceNameResponse,
|
|
186
|
+
} from './models/interfaces';
|
|
187
|
+
export { SECURITY_EVENT_SEVERITY_MAP } from './models/interfaces';
|
|
188
|
+
|
|
189
|
+
// Topic enums + type
|
|
190
|
+
export { TopicType, TopicSource } from './models/Topic';
|
|
191
|
+
export type { TopicData, TopicTranslation } from './models/Topic';
|
|
192
|
+
|
|
193
|
+
// ---------------------------------------------------------------------------
|
|
194
|
+
// Languages
|
|
195
|
+
// ---------------------------------------------------------------------------
|
|
61
196
|
export {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
197
|
+
SUPPORTED_LANGUAGES,
|
|
198
|
+
getLanguageMetadata,
|
|
199
|
+
getLanguageName,
|
|
200
|
+
getNativeLanguageName,
|
|
201
|
+
normalizeLanguageCode,
|
|
202
|
+
isRTLLocale,
|
|
68
203
|
} from './utils/languageUtils';
|
|
69
204
|
export type { LanguageMetadata } from './utils/languageUtils';
|
|
70
205
|
|
|
71
|
-
//
|
|
206
|
+
// ---------------------------------------------------------------------------
|
|
207
|
+
// Platform detection
|
|
208
|
+
// ---------------------------------------------------------------------------
|
|
72
209
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
210
|
+
getPlatformOS,
|
|
211
|
+
setPlatformOS,
|
|
212
|
+
isWeb,
|
|
213
|
+
isNative,
|
|
214
|
+
isIOS,
|
|
215
|
+
isAndroid,
|
|
79
216
|
} from './utils/platform';
|
|
80
217
|
export type { PlatformOS } from './utils/platform';
|
|
81
218
|
|
|
82
|
-
//
|
|
219
|
+
// ---------------------------------------------------------------------------
|
|
220
|
+
// Colour / theme utilities
|
|
221
|
+
// ---------------------------------------------------------------------------
|
|
83
222
|
export {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
223
|
+
darkenColor,
|
|
224
|
+
lightenColor,
|
|
225
|
+
hexToRgb,
|
|
226
|
+
rgbToHex,
|
|
227
|
+
withOpacity,
|
|
228
|
+
isLightColor,
|
|
229
|
+
getContrastTextColor,
|
|
91
230
|
} from './shared/utils/colorUtils';
|
|
92
231
|
|
|
93
232
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
233
|
+
normalizeTheme,
|
|
234
|
+
normalizeColorScheme,
|
|
235
|
+
getOppositeTheme,
|
|
236
|
+
systemPrefersDarkMode,
|
|
237
|
+
getSystemColorScheme,
|
|
99
238
|
} from './shared/utils/themeUtils';
|
|
100
239
|
export type { ThemeValue } from './shared/utils/themeUtils';
|
|
101
240
|
|
|
241
|
+
// ---------------------------------------------------------------------------
|
|
242
|
+
// HTTP / error / network helpers
|
|
243
|
+
// ---------------------------------------------------------------------------
|
|
102
244
|
export {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
245
|
+
HttpStatus,
|
|
246
|
+
getErrorStatus,
|
|
247
|
+
getErrorMessage,
|
|
248
|
+
isAlreadyRegisteredError,
|
|
249
|
+
isUnauthorizedError,
|
|
250
|
+
isForbiddenError,
|
|
251
|
+
isNotFoundError,
|
|
252
|
+
isRateLimitError,
|
|
253
|
+
isServerError,
|
|
254
|
+
isNetworkError,
|
|
255
|
+
isRetryableError,
|
|
114
256
|
} from './shared/utils/errorUtils';
|
|
115
257
|
|
|
116
258
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
259
|
+
DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
260
|
+
createCircuitBreakerState,
|
|
261
|
+
calculateBackoffInterval,
|
|
262
|
+
recordFailure,
|
|
263
|
+
recordSuccess,
|
|
264
|
+
shouldAllowRequest,
|
|
265
|
+
delay,
|
|
266
|
+
withRetry,
|
|
125
267
|
} from './shared/utils/networkUtils';
|
|
126
268
|
export type { CircuitBreakerState, CircuitBreakerConfig } from './shared/utils/networkUtils';
|
|
127
269
|
|
|
128
270
|
export {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
271
|
+
isDev,
|
|
272
|
+
debugLog,
|
|
273
|
+
debugWarn,
|
|
274
|
+
debugError,
|
|
275
|
+
createDebugLogger,
|
|
134
276
|
} from './shared/utils/debugUtils';
|
|
135
277
|
|
|
136
|
-
//
|
|
278
|
+
// ---------------------------------------------------------------------------
|
|
279
|
+
// i18n
|
|
280
|
+
// ---------------------------------------------------------------------------
|
|
137
281
|
export { translate } from './i18n';
|
|
138
282
|
|
|
139
|
-
//
|
|
283
|
+
// ---------------------------------------------------------------------------
|
|
284
|
+
// API request / URL helpers
|
|
285
|
+
// ---------------------------------------------------------------------------
|
|
140
286
|
export {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
export { mergeSessions, normalizeAndSortSessions, sessionsArraysEqual } from './utils/sessionUtils';
|
|
287
|
+
buildSearchParams,
|
|
288
|
+
buildUrl,
|
|
289
|
+
buildPaginationParams,
|
|
290
|
+
safeJsonParse,
|
|
291
|
+
} from './utils/apiUtils';
|
|
292
|
+
export type {
|
|
293
|
+
PaginationParams,
|
|
294
|
+
ApiResponse,
|
|
295
|
+
ErrorResponse,
|
|
296
|
+
} from './utils/apiUtils';
|
|
152
297
|
|
|
153
|
-
// --- Constants ---
|
|
154
|
-
export { packageInfo } from './constants/version';
|
|
155
|
-
|
|
156
|
-
// --- API & Error Utilities ---
|
|
157
|
-
export * from './utils/apiUtils';
|
|
158
298
|
export {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
299
|
+
ErrorCodes,
|
|
300
|
+
createApiError,
|
|
301
|
+
handleHttpError,
|
|
302
|
+
validateRequiredFields,
|
|
163
303
|
} from './utils/errorUtils';
|
|
304
|
+
|
|
164
305
|
export { retryAsync } from './utils/asyncUtils';
|
|
165
|
-
|
|
306
|
+
|
|
307
|
+
// ---------------------------------------------------------------------------
|
|
308
|
+
// Validation
|
|
309
|
+
// ---------------------------------------------------------------------------
|
|
310
|
+
export {
|
|
311
|
+
EMAIL_REGEX,
|
|
312
|
+
USERNAME_REGEX,
|
|
313
|
+
PASSWORD_REGEX,
|
|
314
|
+
isValidEmail,
|
|
315
|
+
isValidUsername,
|
|
316
|
+
isValidPassword,
|
|
317
|
+
isRequiredString,
|
|
318
|
+
isRequiredNumber,
|
|
319
|
+
isRequiredBoolean,
|
|
320
|
+
isValidArray,
|
|
321
|
+
isValidObject,
|
|
322
|
+
isValidUUID,
|
|
323
|
+
isValidURL,
|
|
324
|
+
isValidDate,
|
|
325
|
+
isValidFileSize,
|
|
326
|
+
isValidFileType,
|
|
327
|
+
sanitizeString,
|
|
328
|
+
sanitizeHTML,
|
|
329
|
+
isValidObjectId,
|
|
330
|
+
validateAndSanitizeUserInput,
|
|
331
|
+
} from './utils/validationUtils';
|
|
332
|
+
|
|
333
|
+
// ---------------------------------------------------------------------------
|
|
334
|
+
// Logging
|
|
335
|
+
// ---------------------------------------------------------------------------
|
|
166
336
|
export {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
337
|
+
logger,
|
|
338
|
+
LogLevel,
|
|
339
|
+
logAuth,
|
|
340
|
+
logApi,
|
|
341
|
+
logSession,
|
|
342
|
+
logUser,
|
|
343
|
+
logDevice,
|
|
344
|
+
logPayment,
|
|
345
|
+
logPerformance,
|
|
176
346
|
} from './utils/loggerUtils';
|
|
177
347
|
export type { LogContext } from './utils/loggerUtils';
|
|
178
348
|
|
|
179
|
-
//
|
|
349
|
+
// ---------------------------------------------------------------------------
|
|
350
|
+
// Avatars
|
|
351
|
+
// ---------------------------------------------------------------------------
|
|
180
352
|
export { updateAvatarVisibility } from './utils/avatarUtils';
|
|
181
353
|
|
|
182
|
-
//
|
|
354
|
+
// ---------------------------------------------------------------------------
|
|
355
|
+
// Accounts
|
|
356
|
+
// ---------------------------------------------------------------------------
|
|
183
357
|
export {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
358
|
+
buildAccountsArray,
|
|
359
|
+
createQuickAccount,
|
|
360
|
+
getAccountDisplayName,
|
|
361
|
+
getAccountFallbackHandle,
|
|
362
|
+
formatPublicKeyHandle,
|
|
363
|
+
mergeAccountsFromRefreshAll,
|
|
364
|
+
getAccountColor,
|
|
189
365
|
} from './utils/accountUtils';
|
|
190
366
|
export type { QuickAccount, DisplayNameUserShape } from './utils/accountUtils';
|
|
191
367
|
|
|
192
|
-
//
|
|
368
|
+
// ---------------------------------------------------------------------------
|
|
369
|
+
// Cross-domain SSO infrastructure
|
|
370
|
+
// ---------------------------------------------------------------------------
|
|
371
|
+
export { autoDetectAuthWebUrl } from './utils/fapiAutoDetect';
|
|
372
|
+
export { runColdBoot } from './utils/coldBoot';
|
|
373
|
+
export type {
|
|
374
|
+
ColdBootStep,
|
|
375
|
+
ColdBootStepResult,
|
|
376
|
+
ColdBootSession,
|
|
377
|
+
ColdBootSkip,
|
|
378
|
+
ColdBootOutcome,
|
|
379
|
+
RunColdBootOptions,
|
|
380
|
+
} from './utils/coldBoot';
|
|
381
|
+
|
|
382
|
+
// ---------------------------------------------------------------------------
|
|
383
|
+
// Constants
|
|
384
|
+
// ---------------------------------------------------------------------------
|
|
385
|
+
export { packageInfo } from './constants/version';
|
|
386
|
+
|
|
387
|
+
// ---------------------------------------------------------------------------
|
|
388
|
+
// Default export (back-compat — OxyServices is the most common consumer entry)
|
|
389
|
+
// ---------------------------------------------------------------------------
|
|
193
390
|
import { OxyServices } from './OxyServices';
|
|
194
391
|
export default OxyServices;
|