@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.
Files changed (150) hide show
  1. package/README.md +5 -6
  2. package/dist/cjs/.tsbuildinfo +1 -1
  3. package/dist/cjs/AuthManager.js +678 -4
  4. package/dist/cjs/AuthManagerTypes.js +13 -0
  5. package/dist/cjs/CrossDomainAuth.js +45 -3
  6. package/dist/cjs/OxyServices.base.js +16 -0
  7. package/dist/cjs/i18n/locales/ar-SA.json +83 -0
  8. package/dist/cjs/i18n/locales/ca-ES.json +83 -0
  9. package/dist/cjs/i18n/locales/de-DE.json +83 -0
  10. package/dist/cjs/i18n/locales/en-US.json +83 -0
  11. package/dist/cjs/i18n/locales/es-ES.json +99 -4
  12. package/dist/cjs/i18n/locales/fr-FR.json +83 -0
  13. package/dist/cjs/i18n/locales/it-IT.json +83 -0
  14. package/dist/cjs/i18n/locales/ja-JP.json +83 -0
  15. package/dist/cjs/i18n/locales/ko-KR.json +83 -0
  16. package/dist/cjs/i18n/locales/locales/ar-SA.json +83 -1
  17. package/dist/cjs/i18n/locales/locales/ca-ES.json +83 -1
  18. package/dist/cjs/i18n/locales/locales/de-DE.json +83 -1
  19. package/dist/cjs/i18n/locales/locales/en-US.json +83 -0
  20. package/dist/cjs/i18n/locales/locales/es-ES.json +99 -4
  21. package/dist/cjs/i18n/locales/locales/fr-FR.json +83 -1
  22. package/dist/cjs/i18n/locales/locales/it-IT.json +83 -1
  23. package/dist/cjs/i18n/locales/locales/ja-JP.json +200 -117
  24. package/dist/cjs/i18n/locales/locales/ko-KR.json +83 -1
  25. package/dist/cjs/i18n/locales/locales/pt-PT.json +83 -1
  26. package/dist/cjs/i18n/locales/locales/zh-CN.json +83 -1
  27. package/dist/cjs/i18n/locales/pt-PT.json +83 -0
  28. package/dist/cjs/i18n/locales/zh-CN.json +83 -0
  29. package/dist/cjs/index.js +121 -57
  30. package/dist/cjs/mixins/OxyServices.auth.js +235 -0
  31. package/dist/cjs/mixins/OxyServices.fedcm.js +36 -0
  32. package/dist/cjs/mixins/OxyServices.popup.js +61 -1
  33. package/dist/cjs/mixins/OxyServices.user.js +18 -0
  34. package/dist/cjs/utils/accountUtils.js +64 -1
  35. package/dist/cjs/utils/coldBoot.js +71 -0
  36. package/dist/cjs/utils/fapiAutoDetect.js +88 -0
  37. package/dist/esm/.tsbuildinfo +1 -1
  38. package/dist/esm/AuthManager.js +678 -4
  39. package/dist/esm/AuthManagerTypes.js +12 -0
  40. package/dist/esm/CrossDomainAuth.js +45 -3
  41. package/dist/esm/OxyServices.base.js +16 -0
  42. package/dist/esm/i18n/locales/ar-SA.json +83 -0
  43. package/dist/esm/i18n/locales/ca-ES.json +83 -0
  44. package/dist/esm/i18n/locales/de-DE.json +83 -0
  45. package/dist/esm/i18n/locales/en-US.json +83 -0
  46. package/dist/esm/i18n/locales/es-ES.json +99 -4
  47. package/dist/esm/i18n/locales/fr-FR.json +83 -0
  48. package/dist/esm/i18n/locales/it-IT.json +83 -0
  49. package/dist/esm/i18n/locales/ja-JP.json +83 -0
  50. package/dist/esm/i18n/locales/ko-KR.json +83 -0
  51. package/dist/esm/i18n/locales/locales/ar-SA.json +83 -1
  52. package/dist/esm/i18n/locales/locales/ca-ES.json +83 -1
  53. package/dist/esm/i18n/locales/locales/de-DE.json +83 -1
  54. package/dist/esm/i18n/locales/locales/en-US.json +83 -0
  55. package/dist/esm/i18n/locales/locales/es-ES.json +99 -4
  56. package/dist/esm/i18n/locales/locales/fr-FR.json +83 -1
  57. package/dist/esm/i18n/locales/locales/it-IT.json +83 -1
  58. package/dist/esm/i18n/locales/locales/ja-JP.json +200 -117
  59. package/dist/esm/i18n/locales/locales/ko-KR.json +83 -1
  60. package/dist/esm/i18n/locales/locales/pt-PT.json +83 -1
  61. package/dist/esm/i18n/locales/locales/zh-CN.json +83 -1
  62. package/dist/esm/i18n/locales/pt-PT.json +83 -0
  63. package/dist/esm/i18n/locales/zh-CN.json +83 -0
  64. package/dist/esm/index.js +74 -26
  65. package/dist/esm/mixins/OxyServices.auth.js +235 -0
  66. package/dist/esm/mixins/OxyServices.fedcm.js +36 -0
  67. package/dist/esm/mixins/OxyServices.popup.js +61 -1
  68. package/dist/esm/mixins/OxyServices.user.js +18 -0
  69. package/dist/esm/utils/accountUtils.js +61 -0
  70. package/dist/esm/utils/coldBoot.js +68 -0
  71. package/dist/esm/utils/fapiAutoDetect.js +85 -0
  72. package/dist/types/.tsbuildinfo +1 -1
  73. package/dist/types/AuthManager.d.ts +243 -3
  74. package/dist/types/AuthManagerTypes.d.ts +68 -0
  75. package/dist/types/CrossDomainAuth.d.ts +23 -0
  76. package/dist/types/OxyServices.base.d.ts +14 -0
  77. package/dist/types/OxyServices.d.ts +7 -0
  78. package/dist/types/index.d.ts +31 -17
  79. package/dist/types/mixins/OxyServices.analytics.d.ts +1 -0
  80. package/dist/types/mixins/OxyServices.appData.d.ts +1 -0
  81. package/dist/types/mixins/OxyServices.assets.d.ts +4 -1
  82. package/dist/types/mixins/OxyServices.auth.d.ts +73 -1
  83. package/dist/types/mixins/OxyServices.contacts.d.ts +1 -0
  84. package/dist/types/mixins/OxyServices.developer.d.ts +1 -0
  85. package/dist/types/mixins/OxyServices.devices.d.ts +1 -0
  86. package/dist/types/mixins/OxyServices.features.d.ts +2 -5
  87. package/dist/types/mixins/OxyServices.fedcm.d.ts +34 -0
  88. package/dist/types/mixins/OxyServices.karma.d.ts +1 -0
  89. package/dist/types/mixins/OxyServices.language.d.ts +1 -0
  90. package/dist/types/mixins/OxyServices.location.d.ts +1 -0
  91. package/dist/types/mixins/OxyServices.managedAccounts.d.ts +1 -0
  92. package/dist/types/mixins/OxyServices.payment.d.ts +1 -0
  93. package/dist/types/mixins/OxyServices.popup.d.ts +40 -0
  94. package/dist/types/mixins/OxyServices.privacy.d.ts +1 -0
  95. package/dist/types/mixins/OxyServices.redirect.d.ts +1 -0
  96. package/dist/types/mixins/OxyServices.security.d.ts +1 -0
  97. package/dist/types/mixins/OxyServices.topics.d.ts +1 -0
  98. package/dist/types/mixins/OxyServices.user.d.ts +16 -1
  99. package/dist/types/mixins/OxyServices.utility.d.ts +1 -0
  100. package/dist/types/models/interfaces.d.ts +98 -0
  101. package/dist/types/models/session.d.ts +8 -0
  102. package/dist/types/utils/accountUtils.d.ts +33 -0
  103. package/dist/types/utils/coldBoot.d.ts +102 -0
  104. package/dist/types/utils/fapiAutoDetect.d.ts +37 -0
  105. package/package.json +9 -18
  106. package/src/AuthManager.ts +776 -7
  107. package/src/AuthManagerTypes.ts +72 -0
  108. package/src/CrossDomainAuth.ts +54 -3
  109. package/src/OxyServices.base.ts +17 -0
  110. package/src/OxyServices.ts +7 -0
  111. package/src/__tests__/authManager.cookiePath.test.ts +339 -0
  112. package/src/__tests__/authManager.security.test.ts +342 -0
  113. package/src/__tests__/crossDomainAuth.test.ts +191 -0
  114. package/src/i18n/locales/ar-SA.json +83 -1
  115. package/src/i18n/locales/ca-ES.json +83 -1
  116. package/src/i18n/locales/de-DE.json +83 -1
  117. package/src/i18n/locales/en-US.json +83 -0
  118. package/src/i18n/locales/es-ES.json +99 -4
  119. package/src/i18n/locales/fr-FR.json +83 -1
  120. package/src/i18n/locales/it-IT.json +83 -1
  121. package/src/i18n/locales/ja-JP.json +200 -117
  122. package/src/i18n/locales/ko-KR.json +83 -1
  123. package/src/i18n/locales/pt-PT.json +83 -1
  124. package/src/i18n/locales/zh-CN.json +83 -1
  125. package/src/index.ts +309 -112
  126. package/src/mixins/OxyServices.auth.ts +268 -1
  127. package/src/mixins/OxyServices.fedcm.ts +63 -0
  128. package/src/mixins/OxyServices.popup.ts +79 -1
  129. package/src/mixins/OxyServices.user.ts +33 -1
  130. package/src/mixins/__tests__/popup.test.ts +307 -0
  131. package/src/mixins/__tests__/sessionBaseUrl.test.ts +61 -0
  132. package/src/models/interfaces.ts +116 -0
  133. package/src/models/session.ts +8 -0
  134. package/src/utils/__tests__/coldBoot.test.ts +226 -0
  135. package/src/utils/__tests__/fapiAutoDetect.test.ts +93 -0
  136. package/src/utils/accountUtils.ts +84 -0
  137. package/src/utils/coldBoot.ts +136 -0
  138. package/src/utils/fapiAutoDetect.ts +82 -0
  139. package/dist/cjs/crypto/index.js +0 -22
  140. package/dist/cjs/shared/index.js +0 -70
  141. package/dist/cjs/utils/index.js +0 -26
  142. package/dist/esm/crypto/index.js +0 -13
  143. package/dist/esm/shared/index.js +0 -31
  144. package/dist/esm/utils/index.js +0 -7
  145. package/dist/types/crypto/index.d.ts +0 -11
  146. package/dist/types/shared/index.d.ts +0 -28
  147. package/dist/types/utils/index.d.ts +0 -6
  148. package/src/crypto/index.ts +0 -30
  149. package/src/shared/index.ts +0 -82
  150. 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
- // --- Core API Client ---
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
- // --- Authentication ---
29
+ // ---------------------------------------------------------------------------
30
+ // Authentication
31
+ // ---------------------------------------------------------------------------
25
32
  export { AuthManager, createAuthManager } from './AuthManager';
26
- export type { StorageAdapter, AuthStateChangeCallback, AuthMethod, AuthManagerConfig } from './AuthManager';
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 { CreateManagedAccountInput, ManagedAccountManager, ManagedAccount } from './mixins/OxyServices.managedAccounts';
37
- export type { ContactDiscoveryMatch, ContactDiscoveryResponse } from './mixins/OxyServices.contacts';
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
- // --- Crypto / Identity ---
64
+ // ---------------------------------------------------------------------------
65
+ // Auth helpers (token refresh, error normalisation, retry policies)
66
+ // ---------------------------------------------------------------------------
41
67
  export {
42
- KeyManager,
43
- SignatureService,
44
- RecoveryPhraseService,
45
- IdentityAlreadyExistsError,
46
- IdentityPersistError,
47
- } from './crypto';
48
- export type { KeyPair, SignedMessage, AuthChallenge, RecoveryPhraseResult } from './crypto';
49
-
50
- // --- Models & Types ---
51
- export * from './models/interfaces';
52
- export * from './models/session';
53
- export type { TopicData, TopicTranslation } from './models/Topic';
54
- export { TopicType, TopicSource } from './models/Topic';
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
- // --- Device Management ---
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
- // --- Language Utilities ---
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
- SUPPORTED_LANGUAGES,
63
- getLanguageMetadata,
64
- getLanguageName,
65
- getNativeLanguageName,
66
- normalizeLanguageCode,
67
- isRTLLocale,
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
- // --- Platform Detection ---
206
+ // ---------------------------------------------------------------------------
207
+ // Platform detection
208
+ // ---------------------------------------------------------------------------
72
209
  export {
73
- getPlatformOS,
74
- setPlatformOS,
75
- isWeb,
76
- isNative,
77
- isIOS,
78
- isAndroid,
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
- // --- Shared Utilities ---
219
+ // ---------------------------------------------------------------------------
220
+ // Colour / theme utilities
221
+ // ---------------------------------------------------------------------------
83
222
  export {
84
- darkenColor,
85
- lightenColor,
86
- hexToRgb,
87
- rgbToHex,
88
- withOpacity,
89
- isLightColor,
90
- getContrastTextColor,
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
- normalizeTheme,
95
- normalizeColorScheme,
96
- getOppositeTheme,
97
- systemPrefersDarkMode,
98
- getSystemColorScheme,
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
- HttpStatus,
104
- getErrorStatus,
105
- getErrorMessage,
106
- isAlreadyRegisteredError,
107
- isUnauthorizedError,
108
- isForbiddenError,
109
- isNotFoundError,
110
- isRateLimitError,
111
- isServerError,
112
- isNetworkError,
113
- isRetryableError,
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
- DEFAULT_CIRCUIT_BREAKER_CONFIG,
118
- createCircuitBreakerState,
119
- calculateBackoffInterval,
120
- recordFailure,
121
- recordSuccess,
122
- shouldAllowRequest,
123
- delay,
124
- withRetry,
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
- isDev,
130
- debugLog,
131
- debugWarn,
132
- debugError,
133
- createDebugLogger,
271
+ isDev,
272
+ debugLog,
273
+ debugWarn,
274
+ debugError,
275
+ createDebugLogger,
134
276
  } from './shared/utils/debugUtils';
135
277
 
136
- // --- i18n ---
278
+ // ---------------------------------------------------------------------------
279
+ // i18n
280
+ // ---------------------------------------------------------------------------
137
281
  export { translate } from './i18n';
138
282
 
139
- // --- Auth Helpers ---
283
+ // ---------------------------------------------------------------------------
284
+ // API request / URL helpers
285
+ // ---------------------------------------------------------------------------
140
286
  export {
141
- SessionSyncRequiredError,
142
- AuthenticationFailedError,
143
- ensureValidToken,
144
- isAuthenticationError,
145
- withAuthErrorHandling,
146
- authenticatedApiCall,
147
- } from './utils/authHelpers';
148
- export type { HandleApiErrorOptions } from './utils/authHelpers';
149
-
150
- // --- Session Utilities ---
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
- ErrorCodes,
160
- createApiError,
161
- handleHttpError,
162
- validateRequiredFields,
299
+ ErrorCodes,
300
+ createApiError,
301
+ handleHttpError,
302
+ validateRequiredFields,
163
303
  } from './utils/errorUtils';
304
+
164
305
  export { retryAsync } from './utils/asyncUtils';
165
- export * from './utils/validationUtils';
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
- logger,
168
- LogLevel,
169
- logAuth,
170
- logApi,
171
- logSession,
172
- logUser,
173
- logDevice,
174
- logPayment,
175
- logPerformance,
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
- // --- Avatar Utilities ---
349
+ // ---------------------------------------------------------------------------
350
+ // Avatars
351
+ // ---------------------------------------------------------------------------
180
352
  export { updateAvatarVisibility } from './utils/avatarUtils';
181
353
 
182
- // --- Account Utilities ---
354
+ // ---------------------------------------------------------------------------
355
+ // Accounts
356
+ // ---------------------------------------------------------------------------
183
357
  export {
184
- buildAccountsArray,
185
- createQuickAccount,
186
- getAccountDisplayName,
187
- getAccountFallbackHandle,
188
- formatPublicKeyHandle,
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
- // Default export
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;