@oxyhq/services 5.26.3 → 5.27.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 (263) hide show
  1. package/dist/web/oxy-services.esm.js +2 -0
  2. package/dist/web/oxy-services.esm.js.map +1 -0
  3. package/dist/web/types/assets/icons/OxyServices.d.ts +28 -0
  4. package/dist/web/types/assets/illustrations/HighFive.d.ts +8 -0
  5. package/dist/web/types/constants/version.d.ts +13 -0
  6. package/dist/web/types/core/AuthManager.d.ts +143 -0
  7. package/dist/web/types/core/CrossDomainAuth.d.ts +160 -0
  8. package/dist/web/types/core/HttpService.d.ts +163 -0
  9. package/dist/web/types/core/OxyServices.base.d.ts +126 -0
  10. package/dist/web/types/core/OxyServices.d.ts +81 -0
  11. package/dist/web/types/core/OxyServices.errors.d.ts +11 -0
  12. package/dist/web/types/core/index.d.ts +20 -0
  13. package/dist/web/types/core/mixins/OxyServices.analytics.d.ts +66 -0
  14. package/dist/web/types/core/mixins/OxyServices.assets.d.ts +135 -0
  15. package/dist/web/types/core/mixins/OxyServices.auth.d.ts +186 -0
  16. package/dist/web/types/core/mixins/OxyServices.developer.d.ts +99 -0
  17. package/dist/web/types/core/mixins/OxyServices.devices.d.ts +96 -0
  18. package/dist/web/types/core/mixins/OxyServices.features.d.ts +228 -0
  19. package/dist/web/types/core/mixins/OxyServices.fedcm.d.ts +200 -0
  20. package/dist/web/types/core/mixins/OxyServices.karma.d.ts +85 -0
  21. package/dist/web/types/core/mixins/OxyServices.language.d.ts +81 -0
  22. package/dist/web/types/core/mixins/OxyServices.location.d.ts +64 -0
  23. package/dist/web/types/core/mixins/OxyServices.payment.d.ts +111 -0
  24. package/dist/web/types/core/mixins/OxyServices.popup.d.ts +205 -0
  25. package/dist/web/types/core/mixins/OxyServices.privacy.d.ts +122 -0
  26. package/dist/web/types/core/mixins/OxyServices.redirect.d.ts +245 -0
  27. package/dist/web/types/core/mixins/OxyServices.security.d.ts +78 -0
  28. package/dist/web/types/core/mixins/OxyServices.user.d.ts +184 -0
  29. package/dist/web/types/core/mixins/OxyServices.utility.d.ts +93 -0
  30. package/dist/web/types/core/mixins/index.d.ts +30 -0
  31. package/dist/web/types/core/mixins/mixinHelpers.d.ts +31 -0
  32. package/dist/web/types/crypto/index.d.ts +11 -0
  33. package/dist/web/types/crypto/keyManager.d.ts +189 -0
  34. package/dist/web/types/crypto/polyfill.d.ts +12 -0
  35. package/dist/web/types/crypto/recoveryPhrase.d.ts +58 -0
  36. package/dist/web/types/crypto/signatureService.d.ts +86 -0
  37. package/dist/web/types/i18n/index.d.ts +3 -0
  38. package/dist/web/types/index.d.ts +62 -0
  39. package/dist/web/types/lib/sonner-safe.d.ts +8 -0
  40. package/dist/web/types/lib/sonner.d.ts +11 -0
  41. package/dist/web/types/lib/sonner.web.d.ts +14 -0
  42. package/dist/web/types/models/interfaces.d.ts +415 -0
  43. package/dist/web/types/models/session.d.ts +27 -0
  44. package/dist/web/types/node/index.d.ts +9 -0
  45. package/dist/web/types/shared/index.d.ts +28 -0
  46. package/dist/web/types/shared/utils/colorUtils.d.ts +104 -0
  47. package/dist/web/types/shared/utils/debugUtils.d.ts +48 -0
  48. package/dist/web/types/shared/utils/errorUtils.d.ts +97 -0
  49. package/dist/web/types/shared/utils/index.d.ts +13 -0
  50. package/dist/web/types/shared/utils/networkUtils.d.ts +139 -0
  51. package/dist/web/types/shared/utils/themeUtils.d.ts +90 -0
  52. package/dist/web/types/ui/client.d.ts +33 -0
  53. package/dist/web/types/ui/components/ActivityIndicator.d.ts +44 -0
  54. package/dist/web/types/ui/components/AnimationExample.d.ts +3 -0
  55. package/dist/web/types/ui/components/AutoHeightScrollView.d.ts +22 -0
  56. package/dist/web/types/ui/components/Avatar.d.ts +60 -0
  57. package/dist/web/types/ui/components/BottomSheet.d.ts +28 -0
  58. package/dist/web/types/ui/components/BottomSheetRouter.d.ts +8 -0
  59. package/dist/web/types/ui/components/CrossFadeIcon.d.ts +26 -0
  60. package/dist/web/types/ui/components/EmptyState.d.ts +7 -0
  61. package/dist/web/types/ui/components/ErrorBoundary.d.ts +30 -0
  62. package/dist/web/types/ui/components/FollowButton.d.ts +17 -0
  63. package/dist/web/types/ui/components/FontLoader.d.ts +14 -0
  64. package/dist/web/types/ui/components/GroupedItem.d.ts +23 -0
  65. package/dist/web/types/ui/components/GroupedSection.d.ts +24 -0
  66. package/dist/web/types/ui/components/Header.d.ts +37 -0
  67. package/dist/web/types/ui/components/HelperText.d.ts +46 -0
  68. package/dist/web/types/ui/components/Icon.d.ts +59 -0
  69. package/dist/web/types/ui/components/IconButton/IconButton.d.ts +98 -0
  70. package/dist/web/types/ui/components/IconButton/utils.d.ts +18 -0
  71. package/dist/web/types/ui/components/LoadingState.d.ts +8 -0
  72. package/dist/web/types/ui/components/OxyLogo.d.ts +28 -0
  73. package/dist/web/types/ui/components/OxyPayButton.d.ts +28 -0
  74. package/dist/web/types/ui/components/OxyProvider.d.ts +33 -0
  75. package/dist/web/types/ui/components/OxySignInButton.d.ts +64 -0
  76. package/dist/web/types/ui/components/ProfileCard.d.ts +17 -0
  77. package/dist/web/types/ui/components/QuickActions.d.ts +14 -0
  78. package/dist/web/types/ui/components/Section.d.ts +11 -0
  79. package/dist/web/types/ui/components/SectionTitle.d.ts +9 -0
  80. package/dist/web/types/ui/components/SettingRow.d.ts +19 -0
  81. package/dist/web/types/ui/components/SignInModal.d.ts +17 -0
  82. package/dist/web/types/ui/components/StepBasedScreen.d.ts +25 -0
  83. package/dist/web/types/ui/components/Surface.d.ts +75 -0
  84. package/dist/web/types/ui/components/TextField/Addons/Outline.d.ts +15 -0
  85. package/dist/web/types/ui/components/TextField/Addons/Underline.d.ts +18 -0
  86. package/dist/web/types/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +44 -0
  87. package/dist/web/types/ui/components/TextField/Adornment/TextFieldAffix.d.ts +72 -0
  88. package/dist/web/types/ui/components/TextField/Adornment/TextFieldIcon.d.ts +77 -0
  89. package/dist/web/types/ui/components/TextField/Adornment/enums.d.ts +12 -0
  90. package/dist/web/types/ui/components/TextField/Adornment/types.d.ts +11 -0
  91. package/dist/web/types/ui/components/TextField/Adornment/utils.d.ts +11 -0
  92. package/dist/web/types/ui/components/TextField/Label/InputLabel.d.ts +4 -0
  93. package/dist/web/types/ui/components/TextField/Label/LabelBackground.d.ts +3 -0
  94. package/dist/web/types/ui/components/TextField/TextFieldFlat.d.ts +3 -0
  95. package/dist/web/types/ui/components/TextField/TextFieldOutlined.d.ts +3 -0
  96. package/dist/web/types/ui/components/TextField/constants.d.ts +31 -0
  97. package/dist/web/types/ui/components/TextField/helpers.d.ts +96 -0
  98. package/dist/web/types/ui/components/TextField/types.d.ts +155 -0
  99. package/dist/web/types/ui/components/TextField.d.ts +191 -0
  100. package/dist/web/types/ui/components/TouchableRipple/Pressable.d.ts +12 -0
  101. package/dist/web/types/ui/components/TouchableRipple/TouchableRipple.d.ts +61 -0
  102. package/dist/web/types/ui/components/TouchableRipple/utils.d.ts +10 -0
  103. package/dist/web/types/ui/components/Typography/AnimatedText.d.ts +34 -0
  104. package/dist/web/types/ui/components/Typography/types.d.ts +18 -0
  105. package/dist/web/types/ui/components/WebOxyProvider.d.ts +51 -0
  106. package/dist/web/types/ui/components/feedback/FormInput.d.ts +19 -0
  107. package/dist/web/types/ui/components/feedback/ProgressIndicator.d.ts +10 -0
  108. package/dist/web/types/ui/components/feedback/constants.d.ts +4 -0
  109. package/dist/web/types/ui/components/feedback/feedbackStyles.d.ts +279 -0
  110. package/dist/web/types/ui/components/feedback/index.d.ts +6 -0
  111. package/dist/web/types/ui/components/feedback/types.d.ts +45 -0
  112. package/dist/web/types/ui/components/feedback/useFeedbackForm.d.ts +8 -0
  113. package/dist/web/types/ui/components/fileManagement/AnimatedButton.d.ts +15 -0
  114. package/dist/web/types/ui/components/fileManagement/FileDetailsModal.d.ts +14 -0
  115. package/dist/web/types/ui/components/fileManagement/FileViewer.d.ts +17 -0
  116. package/dist/web/types/ui/components/fileManagement/UploadPreview.d.ts +20 -0
  117. package/dist/web/types/ui/components/fileManagement/styles.d.ts +859 -0
  118. package/dist/web/types/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
  119. package/dist/web/types/ui/components/icon/OxyIcon.d.ts +9 -0
  120. package/dist/web/types/ui/components/icon/index.d.ts +3 -0
  121. package/dist/web/types/ui/components/index.d.ts +16 -0
  122. package/dist/web/types/ui/components/internal/GroupedPillButtons.d.ts +17 -0
  123. package/dist/web/types/ui/components/internal/PinInput.d.ts +22 -0
  124. package/dist/web/types/ui/components/modals/DeleteAccountModal.d.ts +18 -0
  125. package/dist/web/types/ui/components/modals/index.d.ts +1 -0
  126. package/dist/web/types/ui/components/payment/PaymentDetailsStep.d.ts +20 -0
  127. package/dist/web/types/ui/components/payment/PaymentMethodStep.d.ts +13 -0
  128. package/dist/web/types/ui/components/payment/PaymentReviewStep.d.ts +15 -0
  129. package/dist/web/types/ui/components/payment/PaymentSuccessStep.d.ts +9 -0
  130. package/dist/web/types/ui/components/payment/PaymentSummaryStep.d.ts +14 -0
  131. package/dist/web/types/ui/components/payment/constants.d.ts +6 -0
  132. package/dist/web/types/ui/components/payment/index.d.ts +8 -0
  133. package/dist/web/types/ui/components/payment/paymentStyles.d.ts +395 -0
  134. package/dist/web/types/ui/components/payment/types.d.ts +39 -0
  135. package/dist/web/types/ui/components/photogrid/JustifiedPhotoGrid.d.ts +26 -0
  136. package/dist/web/types/ui/components/styles/overlay.d.ts +3 -0
  137. package/dist/web/types/ui/components/styles/shadow.d.ts +2 -0
  138. package/dist/web/types/ui/components/theming.d.ts +7 -0
  139. package/dist/web/types/ui/components/types.d.ts +79 -0
  140. package/dist/web/types/ui/components/utils/forwardRef.d.ts +11 -0
  141. package/dist/web/types/ui/components/utils/hasTouchHandler.d.ts +5 -0
  142. package/dist/web/types/ui/components/utils/roundLayoutSize.d.ts +1 -0
  143. package/dist/web/types/ui/components/utils/splitStyles.d.ts +19 -0
  144. package/dist/web/types/ui/constants/iconColors.d.ts +129 -0
  145. package/dist/web/types/ui/constants/spacing.d.ts +32 -0
  146. package/dist/web/types/ui/constants/theme.d.ts +96 -0
  147. package/dist/web/types/ui/context/OxyContext.d.ts +74 -0
  148. package/dist/web/types/ui/context/ThemeContext.d.ts +18 -0
  149. package/dist/web/types/ui/context/hooks/useAuthOperations.d.ts +39 -0
  150. package/dist/web/types/ui/context/hooks/useDeviceManagement.d.ts +26 -0
  151. package/dist/web/types/ui/context/hooks/useLanguageManagement.d.ts +24 -0
  152. package/dist/web/types/ui/context/hooks/useSessionManagement.d.ts +40 -0
  153. package/dist/web/types/ui/hooks/index.d.ts +6 -0
  154. package/dist/web/types/ui/hooks/mutations/index.d.ts +8 -0
  155. package/dist/web/types/ui/hooks/mutations/mutationFactory.d.ts +75 -0
  156. package/dist/web/types/ui/hooks/mutations/useAccountMutations.d.ts +68 -0
  157. package/dist/web/types/ui/hooks/mutations/useServicesMutations.d.ts +22 -0
  158. package/dist/web/types/ui/hooks/queries/index.d.ts +10 -0
  159. package/dist/web/types/ui/hooks/queries/queryKeys.d.ts +64 -0
  160. package/dist/web/types/ui/hooks/queries/useAccountQueries.d.ts +42 -0
  161. package/dist/web/types/ui/hooks/queries/useSecurityQueries.d.ts +14 -0
  162. package/dist/web/types/ui/hooks/queries/useServicesQueries.d.ts +31 -0
  163. package/dist/web/types/ui/hooks/queryClient.d.ts +18 -0
  164. package/dist/web/types/ui/hooks/useAssets.d.ts +34 -0
  165. package/dist/web/types/ui/hooks/useAsyncAction.d.ts +50 -0
  166. package/dist/web/types/ui/hooks/useAuth.d.ts +73 -0
  167. package/dist/web/types/ui/hooks/useColorScheme.d.ts +7 -0
  168. package/dist/web/types/ui/hooks/useDeviceManagement.d.ts +26 -0
  169. package/dist/web/types/ui/hooks/useFileDownloadUrl.d.ts +18 -0
  170. package/dist/web/types/ui/hooks/useFileFiltering.d.ts +28 -0
  171. package/dist/web/types/ui/hooks/useFollow.d.ts +61 -0
  172. package/dist/web/types/ui/hooks/useFollow.types.d.ts +32 -0
  173. package/dist/web/types/ui/hooks/useI18n.d.ts +4 -0
  174. package/dist/web/types/ui/hooks/useLanguageManagement.d.ts +24 -0
  175. package/dist/web/types/ui/hooks/useProfileEditing.d.ts +35 -0
  176. package/dist/web/types/ui/hooks/useQueryClient.d.ts +6 -0
  177. package/dist/web/types/ui/hooks/useSessionManagement.d.ts +40 -0
  178. package/dist/web/types/ui/hooks/useSessionSocket.d.ts +13 -0
  179. package/dist/web/types/ui/hooks/useSettingToggle.d.ts +56 -0
  180. package/dist/web/types/ui/hooks/useStorage.d.ts +15 -0
  181. package/dist/web/types/ui/hooks/useThemeColors.d.ts +93 -0
  182. package/dist/web/types/ui/hooks/useThemeStyles.d.ts +44 -0
  183. package/dist/web/types/ui/hooks/useWebSSO.d.ts +57 -0
  184. package/dist/web/types/ui/index.d.ts +7 -0
  185. package/dist/web/types/ui/isFrontend.d.ts +2 -0
  186. package/dist/web/types/ui/navigation/bottomSheetManager.d.ts +26 -0
  187. package/dist/web/types/ui/navigation/routes.d.ts +5 -0
  188. package/dist/web/types/ui/screens/AccountCenterScreen.d.ts +4 -0
  189. package/dist/web/types/ui/screens/AccountOverviewScreen.d.ts +4 -0
  190. package/dist/web/types/ui/screens/AccountSettingsScreen.d.ts +7 -0
  191. package/dist/web/types/ui/screens/AccountSwitcherScreen.d.ts +4 -0
  192. package/dist/web/types/ui/screens/AccountVerificationScreen.d.ts +4 -0
  193. package/dist/web/types/ui/screens/AppInfoScreen.d.ts +4 -0
  194. package/dist/web/types/ui/screens/EditProfileFieldScreen.d.ts +12 -0
  195. package/dist/web/types/ui/screens/FAQScreen.d.ts +4 -0
  196. package/dist/web/types/ui/screens/FeedbackScreen.d.ts +4 -0
  197. package/dist/web/types/ui/screens/FileManagementScreen.d.ts +4 -0
  198. package/dist/web/types/ui/screens/FollowersListScreen.d.ts +8 -0
  199. package/dist/web/types/ui/screens/FollowingListScreen.d.ts +8 -0
  200. package/dist/web/types/ui/screens/HelpSupportScreen.d.ts +4 -0
  201. package/dist/web/types/ui/screens/HistoryViewScreen.d.ts +4 -0
  202. package/dist/web/types/ui/screens/LanguageSelectorScreen.d.ts +6 -0
  203. package/dist/web/types/ui/screens/LearnMoreUsernamesScreen.d.ts +4 -0
  204. package/dist/web/types/ui/screens/LegalDocumentsScreen.d.ts +4 -0
  205. package/dist/web/types/ui/screens/OxyAuthScreen.d.ts +16 -0
  206. package/dist/web/types/ui/screens/PaymentGatewayScreen.d.ts +14 -0
  207. package/dist/web/types/ui/screens/PremiumSubscriptionScreen.d.ts +4 -0
  208. package/dist/web/types/ui/screens/PrivacySettingsScreen.d.ts +4 -0
  209. package/dist/web/types/ui/screens/ProfileScreen.d.ts +8 -0
  210. package/dist/web/types/ui/screens/SavesCollectionsScreen.d.ts +4 -0
  211. package/dist/web/types/ui/screens/SearchSettingsScreen.d.ts +4 -0
  212. package/dist/web/types/ui/screens/SessionManagementScreen.d.ts +4 -0
  213. package/dist/web/types/ui/screens/UserLinksScreen.d.ts +14 -0
  214. package/dist/web/types/ui/screens/UserListScreen.d.ts +10 -0
  215. package/dist/web/types/ui/screens/WelcomeNewUserScreen.d.ts +12 -0
  216. package/dist/web/types/ui/screens/karma/KarmaAboutScreen.d.ts +4 -0
  217. package/dist/web/types/ui/screens/karma/KarmaCenterScreen.d.ts +4 -0
  218. package/dist/web/types/ui/screens/karma/KarmaFAQScreen.d.ts +4 -0
  219. package/dist/web/types/ui/screens/karma/KarmaLeaderboardScreen.d.ts +4 -0
  220. package/dist/web/types/ui/screens/karma/KarmaRewardsScreen.d.ts +4 -0
  221. package/dist/web/types/ui/screens/karma/KarmaRulesScreen.d.ts +4 -0
  222. package/dist/web/types/ui/server.d.ts +42 -0
  223. package/dist/web/types/ui/stores/accountStore.d.ts +33 -0
  224. package/dist/web/types/ui/stores/assetStore.d.ts +53 -0
  225. package/dist/web/types/ui/stores/authStore.d.ts +16 -0
  226. package/dist/web/types/ui/stores/fileStore.d.ts +30 -0
  227. package/dist/web/types/ui/stores/followStore.d.ts +24 -0
  228. package/dist/web/types/ui/styles/authStyles.d.ts +331 -0
  229. package/dist/web/types/ui/styles/fonts.d.ts +20 -0
  230. package/dist/web/types/ui/styles/index.d.ts +4 -0
  231. package/dist/web/types/ui/styles/spacing.d.ts +48 -0
  232. package/dist/web/types/ui/styles/theme.d.ts +67 -0
  233. package/dist/web/types/ui/types/fileManagement.d.ts +40 -0
  234. package/dist/web/types/ui/types/navigation.d.ts +36 -0
  235. package/dist/web/types/ui/utils/authHelpers.d.ts +98 -0
  236. package/dist/web/types/ui/utils/avatarUtils.d.ts +33 -0
  237. package/dist/web/types/ui/utils/colorUtils.d.ts +9 -0
  238. package/dist/web/types/ui/utils/confirmAction.d.ts +6 -0
  239. package/dist/web/types/ui/utils/errorHandlers.d.ts +34 -0
  240. package/dist/web/types/ui/utils/fileManagement.d.ts +86 -0
  241. package/dist/web/types/ui/utils/iconNames.d.ts +111 -0
  242. package/dist/web/types/ui/utils/sessionHelpers.d.ts +63 -0
  243. package/dist/web/types/ui/utils/storageHelpers.d.ts +27 -0
  244. package/dist/web/types/ui/utils/themeUtils.d.ts +10 -0
  245. package/dist/web/types/ui/utils/userUtils.d.ts +28 -0
  246. package/dist/web/types/utils/apiUtils.d.ts +53 -0
  247. package/dist/web/types/utils/asyncUtils.d.ts +58 -0
  248. package/dist/web/types/utils/cache.d.ts +127 -0
  249. package/dist/web/types/utils/deviceManager.d.ts +65 -0
  250. package/dist/web/types/utils/errorUtils.d.ts +46 -0
  251. package/dist/web/types/utils/hookUtils.d.ts +101 -0
  252. package/dist/web/types/utils/index.d.ts +6 -0
  253. package/dist/web/types/utils/languageUtils.d.ts +37 -0
  254. package/dist/web/types/utils/loggerUtils.d.ts +48 -0
  255. package/dist/web/types/utils/platform.d.ts +40 -0
  256. package/dist/web/types/utils/platformInit.d.ts +8 -0
  257. package/dist/web/types/utils/requestUtils.d.ts +123 -0
  258. package/dist/web/types/utils/sessionUtils.d.ts +54 -0
  259. package/dist/web/types/utils/validationUtils.d.ts +85 -0
  260. package/dist/web/types/web/WebOxyContext.d.ts +151 -0
  261. package/dist/web/types/web/index.d.ts +52 -0
  262. package/dist/web/types/web.d.ts +53 -0
  263. package/package.json +77 -35
@@ -0,0 +1,415 @@
1
+ export interface OxyConfig {
2
+ baseURL: string;
3
+ cloudURL?: string;
4
+ authWebUrl?: string;
5
+ authRedirectUri?: string;
6
+ enableCache?: boolean;
7
+ cacheTTL?: number;
8
+ enableRequestDeduplication?: boolean;
9
+ enableRetry?: boolean;
10
+ maxRetries?: number;
11
+ retryDelay?: number;
12
+ requestTimeout?: number;
13
+ maxConcurrentRequests?: number;
14
+ requestQueueSize?: number;
15
+ enableLogging?: boolean;
16
+ logLevel?: 'none' | 'error' | 'warn' | 'info' | 'debug';
17
+ onRequestStart?: (url: string, method: string) => void;
18
+ onRequestEnd?: (url: string, method: string, duration: number, success: boolean) => void;
19
+ onRequestError?: (url: string, method: string, error: Error) => void;
20
+ }
21
+ export interface User {
22
+ id: string;
23
+ publicKey: string;
24
+ username: string;
25
+ email?: string;
26
+ avatar?: string;
27
+ privacySettings?: {
28
+ [key: string]: unknown;
29
+ };
30
+ name?: {
31
+ first?: string;
32
+ last?: string;
33
+ full?: string;
34
+ [key: string]: unknown;
35
+ };
36
+ bio?: string;
37
+ karma?: number;
38
+ location?: string;
39
+ website?: string;
40
+ createdAt?: string;
41
+ updatedAt?: string;
42
+ links?: Array<{
43
+ title?: string;
44
+ description?: string;
45
+ image?: string;
46
+ link: string;
47
+ }>;
48
+ _count?: {
49
+ followers?: number;
50
+ following?: number;
51
+ };
52
+ accountExpiresAfterInactivityDays?: number | null;
53
+ [key: string]: unknown;
54
+ }
55
+ export interface LoginResponse {
56
+ accessToken?: string;
57
+ refreshToken?: string;
58
+ token?: string;
59
+ user: User;
60
+ message?: string;
61
+ }
62
+ export interface Notification {
63
+ id: string;
64
+ message: string;
65
+ }
66
+ export interface Wallet {
67
+ id: string;
68
+ balance: number;
69
+ }
70
+ export interface Transaction {
71
+ id: string;
72
+ amount: number;
73
+ type: string;
74
+ timestamp: string;
75
+ }
76
+ export interface BlockedUser {
77
+ _id?: string;
78
+ blockedId: string | {
79
+ _id: string;
80
+ username: string;
81
+ avatar?: string;
82
+ };
83
+ userId: string;
84
+ createdAt?: string;
85
+ blockedAt?: string;
86
+ username?: string;
87
+ avatar?: string;
88
+ }
89
+ export interface RestrictedUser {
90
+ _id?: string;
91
+ restrictedId: string | {
92
+ _id: string;
93
+ username: string;
94
+ avatar?: string;
95
+ };
96
+ userId: string;
97
+ createdAt?: string;
98
+ restrictedAt?: string;
99
+ username?: string;
100
+ avatar?: string;
101
+ }
102
+ export interface TransferFundsRequest {
103
+ fromUserId: string;
104
+ toUserId: string;
105
+ amount: number;
106
+ }
107
+ export interface PurchaseRequest {
108
+ userId: string;
109
+ itemId: string;
110
+ amount: number;
111
+ }
112
+ export interface WithdrawalRequest {
113
+ userId: string;
114
+ amount: number;
115
+ address: string;
116
+ }
117
+ export interface TransactionResponse {
118
+ success: boolean;
119
+ transaction: Transaction;
120
+ }
121
+ export interface PaginationInfo {
122
+ total: number;
123
+ limit: number;
124
+ offset: number;
125
+ hasMore: boolean;
126
+ }
127
+ export interface SearchProfilesResponse {
128
+ data: User[];
129
+ pagination: PaginationInfo;
130
+ }
131
+ export interface KarmaRule {
132
+ id: string;
133
+ description: string;
134
+ }
135
+ export interface KarmaHistory {
136
+ id: string;
137
+ userId: string;
138
+ points: number;
139
+ }
140
+ export interface KarmaLeaderboardEntry {
141
+ userId: string;
142
+ total: number;
143
+ }
144
+ export interface KarmaAwardRequest {
145
+ userId: string;
146
+ points: number;
147
+ reason?: string;
148
+ }
149
+ export interface ApiError {
150
+ message: string;
151
+ code: string;
152
+ status: number;
153
+ details?: Record<string, unknown>;
154
+ }
155
+ export interface PaymentMethod {
156
+ id: string;
157
+ type: string;
158
+ }
159
+ export interface PaymentRequest {
160
+ userId: string;
161
+ planId: string;
162
+ paymentMethodId: string;
163
+ }
164
+ export interface PaymentResponse {
165
+ transactionId: string;
166
+ status: string;
167
+ }
168
+ export interface AnalyticsData {
169
+ userId: string;
170
+ }
171
+ export interface FollowerDetails {
172
+ userId: string;
173
+ followers: number;
174
+ }
175
+ export interface ContentViewer {
176
+ userId: string;
177
+ viewedAt: string;
178
+ }
179
+ /**
180
+ * File management interfaces
181
+ */
182
+ export interface FileMetadata {
183
+ id: string;
184
+ filename: string;
185
+ contentType: string;
186
+ length: number;
187
+ chunkSize: number;
188
+ uploadDate: string;
189
+ metadata?: {
190
+ userId?: string;
191
+ description?: string;
192
+ title?: string;
193
+ tags?: string[];
194
+ [key: string]: unknown;
195
+ };
196
+ variants?: Array<{
197
+ type: string;
198
+ key: string;
199
+ width?: number;
200
+ height?: number;
201
+ readyAt?: string;
202
+ metadata?: Record<string, unknown>;
203
+ }>;
204
+ }
205
+ export interface FileUploadResponse {
206
+ files: FileMetadata[];
207
+ }
208
+ export interface FileListResponse {
209
+ files: FileMetadata[];
210
+ total: number;
211
+ hasMore: boolean;
212
+ }
213
+ export interface FileUpdateRequest {
214
+ filename?: string;
215
+ metadata?: {
216
+ description?: string;
217
+ title?: string;
218
+ tags?: string[];
219
+ [key: string]: unknown;
220
+ };
221
+ }
222
+ export interface FileDeleteResponse {
223
+ success: boolean;
224
+ message: string;
225
+ fileId: string;
226
+ }
227
+ /**
228
+ * Central Asset Service interfaces
229
+ */
230
+ /**
231
+ * File visibility levels
232
+ * - private: Only accessible by owner (default)
233
+ * - public: Accessible by anyone without authentication (e.g., avatars, public profile content)
234
+ * - unlisted: Accessible with direct link but not listed publicly
235
+ */
236
+ export type FileVisibility = 'private' | 'public' | 'unlisted';
237
+ export interface AssetLink {
238
+ app: string;
239
+ entityType: string;
240
+ entityId: string;
241
+ createdBy: string;
242
+ createdAt: string;
243
+ }
244
+ export type AssetMetadata = Record<string, string | number | boolean | null | undefined>;
245
+ export interface AssetVariant {
246
+ type: string;
247
+ key: string;
248
+ width?: number;
249
+ height?: number;
250
+ readyAt?: string;
251
+ size?: number;
252
+ metadata?: AssetMetadata;
253
+ }
254
+ export interface Asset {
255
+ id: string;
256
+ sha256: string;
257
+ size: number;
258
+ mime: string;
259
+ ext: string;
260
+ originalName?: string;
261
+ ownerUserId: string;
262
+ status: 'active' | 'trash' | 'deleted';
263
+ visibility: FileVisibility;
264
+ usageCount: number;
265
+ createdAt: string;
266
+ updatedAt: string;
267
+ links: AssetLink[];
268
+ variants: AssetVariant[];
269
+ metadata?: AssetMetadata;
270
+ }
271
+ export interface AssetInitRequest {
272
+ sha256: string;
273
+ size: number;
274
+ mime: string;
275
+ }
276
+ export interface AssetInitResponse {
277
+ uploadUrl: string;
278
+ fileId: string;
279
+ sha256: string;
280
+ }
281
+ export interface AssetCompleteRequest {
282
+ fileId: string;
283
+ originalName: string;
284
+ size: number;
285
+ mime: string;
286
+ visibility?: FileVisibility;
287
+ metadata?: AssetMetadata;
288
+ }
289
+ export interface AssetLinkRequest {
290
+ app: string;
291
+ entityType: string;
292
+ entityId: string;
293
+ visibility?: FileVisibility;
294
+ }
295
+ export interface AssetUnlinkRequest {
296
+ app: string;
297
+ entityType: string;
298
+ entityId: string;
299
+ }
300
+ export interface AssetUrlResponse {
301
+ success: boolean;
302
+ url: string;
303
+ variant?: string;
304
+ expiresIn: number;
305
+ }
306
+ export interface AssetDeleteSummary {
307
+ fileId: string;
308
+ wouldDelete: boolean;
309
+ affectedApps: string[];
310
+ remainingLinks: number;
311
+ variants: string[];
312
+ }
313
+ export interface AssetUpdateVisibilityRequest {
314
+ visibility: FileVisibility;
315
+ }
316
+ export interface AssetUpdateVisibilityResponse {
317
+ success: boolean;
318
+ file: {
319
+ id: string;
320
+ visibility: FileVisibility;
321
+ updatedAt: string;
322
+ };
323
+ }
324
+ /**
325
+ * Account storage usage (server-side usage, not local AsyncStorage)
326
+ */
327
+ export interface AccountStorageCategoryUsage {
328
+ bytes: number;
329
+ count: number;
330
+ }
331
+ export interface AccountStorageUsageResponse {
332
+ plan: 'basic' | 'pro' | 'business';
333
+ totalUsedBytes: number;
334
+ totalLimitBytes: number;
335
+ categories: {
336
+ documents: AccountStorageCategoryUsage;
337
+ mail: AccountStorageCategoryUsage;
338
+ photosVideos: AccountStorageCategoryUsage;
339
+ recordings: AccountStorageCategoryUsage;
340
+ family: AccountStorageCategoryUsage;
341
+ other: AccountStorageCategoryUsage;
342
+ };
343
+ updatedAt: string;
344
+ }
345
+ /**
346
+ * Security activity event types
347
+ */
348
+ export type SecurityEventType = 'sign_in' | 'sign_out' | 'email_changed' | 'profile_updated' | 'device_added' | 'device_removed' | 'account_recovery' | 'security_settings_changed' | 'private_key_exported' | 'backup_created' | 'suspicious_activity';
349
+ /**
350
+ * Security event severity levels
351
+ */
352
+ export type SecurityEventSeverity = 'low' | 'medium' | 'high' | 'critical';
353
+ /**
354
+ * Security event severity mapping (single source of truth)
355
+ * Maps each event type to its default severity level
356
+ */
357
+ export declare const SECURITY_EVENT_SEVERITY_MAP: Record<SecurityEventType, SecurityEventSeverity>;
358
+ /**
359
+ * Security activity event
360
+ */
361
+ export interface SecurityActivity {
362
+ id: string;
363
+ userId: string;
364
+ eventType: SecurityEventType;
365
+ eventDescription: string;
366
+ metadata?: Record<string, any>;
367
+ ipAddress?: string;
368
+ userAgent?: string;
369
+ deviceId?: string;
370
+ timestamp: string;
371
+ severity: SecurityEventSeverity;
372
+ createdAt: string;
373
+ }
374
+ /**
375
+ * Security activity response with pagination
376
+ */
377
+ export interface SecurityActivityResponse {
378
+ data: SecurityActivity[];
379
+ total: number;
380
+ limit: number;
381
+ offset: number;
382
+ hasMore: boolean;
383
+ }
384
+ export interface AssetUploadProgress {
385
+ fileId: string;
386
+ uploaded: number;
387
+ total: number;
388
+ percentage: number;
389
+ status: 'uploading' | 'processing' | 'complete' | 'error';
390
+ error?: string;
391
+ }
392
+ export interface DeviceSession {
393
+ sessionId: string;
394
+ deviceId: string;
395
+ deviceName: string;
396
+ isActive: boolean;
397
+ lastActive: string;
398
+ expiresAt: string;
399
+ isCurrent: boolean;
400
+ user?: User;
401
+ createdAt?: string;
402
+ }
403
+ export interface DeviceSessionsResponse {
404
+ deviceId: string;
405
+ sessions: DeviceSession[];
406
+ }
407
+ export interface DeviceSessionLogoutResponse {
408
+ message: string;
409
+ deviceId: string;
410
+ sessionsTerminated: number;
411
+ }
412
+ export interface UpdateDeviceNameResponse {
413
+ message: string;
414
+ deviceName: string;
415
+ }
@@ -0,0 +1,27 @@
1
+ export interface ClientSession {
2
+ sessionId: string;
3
+ deviceId: string;
4
+ expiresAt: string;
5
+ lastActive: string;
6
+ userId?: string;
7
+ isCurrent?: boolean;
8
+ }
9
+ export interface StorageKeys {
10
+ sessions: string;
11
+ activeSessionId: string;
12
+ }
13
+ export interface MinimalUserData {
14
+ id: string;
15
+ username: string;
16
+ avatar?: string;
17
+ }
18
+ export interface SessionLoginResponse {
19
+ sessionId: string;
20
+ deviceId: string;
21
+ expiresAt: string;
22
+ user: MinimalUserData;
23
+ /** JWT access token for API authentication */
24
+ accessToken?: string;
25
+ /** Refresh token for obtaining new access tokens */
26
+ refreshToken?: string;
27
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * OxyHQServices Node.js Entry Point
3
+ */
4
+ import { OxyServices, OXY_CLOUD_URL, oxyClient } from '../core';
5
+ import * as Models from '../models/interfaces';
6
+ export { OxyServices, OXY_CLOUD_URL, oxyClient };
7
+ export { Models };
8
+ export * from '../models/interfaces';
9
+ export default OxyServices;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * OxyServices Shared Module
3
+ *
4
+ * Platform-agnostic utilities and helpers that work everywhere:
5
+ * - Browser (Web, Expo Web)
6
+ * - React Native (iOS, Android)
7
+ * - Node.js (Backend)
8
+ *
9
+ * This module contains NO React Native or browser-specific dependencies.
10
+ *
11
+ * @module shared
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * import { darkenColor, normalizeTheme, withRetry } from '@oxyhq/services/shared';
16
+ *
17
+ * const darkBlue = darkenColor('#0066FF', 0.3);
18
+ * const theme = normalizeTheme(userPreference);
19
+ * const data = await withRetry(() => fetchData(), { maxRetries: 3 });
20
+ * ```
21
+ */
22
+ export { darkenColor, lightenColor, hexToRgb, rgbToHex, withOpacity, isLightColor, getContrastTextColor, } from './utils/colorUtils';
23
+ export { normalizeTheme, normalizeColorScheme, getOppositeTheme, systemPrefersDarkMode, getSystemColorScheme, } from './utils/themeUtils';
24
+ export type { ThemeValue } from './utils/themeUtils';
25
+ export { HttpStatus, getErrorStatus, getErrorMessage, isAlreadyRegisteredError, isUnauthorizedError, isForbiddenError, isNotFoundError, isRateLimitError, isServerError, isNetworkError, isRetryableError, } from './utils/errorUtils';
26
+ export { DEFAULT_CIRCUIT_BREAKER_CONFIG, createCircuitBreakerState, calculateBackoffInterval, recordFailure, recordSuccess, shouldAllowRequest, delay, withRetry, } from './utils/networkUtils';
27
+ export type { CircuitBreakerState, CircuitBreakerConfig, } from './utils/networkUtils';
28
+ export { isDev, debugLog, debugWarn, debugError, createDebugLogger, } from './utils/debugUtils';
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Color Utility Functions
3
+ *
4
+ * Consolidated color manipulation utilities used across the OxyServices ecosystem.
5
+ * These functions work in any JavaScript environment (browser, Node.js, React Native).
6
+ *
7
+ * @module shared/utils/colorUtils
8
+ */
9
+ /**
10
+ * Darkens a hex color by a specified factor.
11
+ *
12
+ * @param color - Hex color string (with or without #)
13
+ * @param factor - Amount to darken (0-1). Default: 0.6
14
+ * @returns Darkened hex color string with # prefix
15
+ *
16
+ * @example
17
+ * ```ts
18
+ * darkenColor('#FF0000', 0.5); // Returns a darker red
19
+ * darkenColor('FF0000', 0.3); // Also works without #
20
+ * ```
21
+ */
22
+ export declare const darkenColor: (color: string, factor?: number) => string;
23
+ /**
24
+ * Lightens a hex color by a specified factor.
25
+ *
26
+ * @param color - Hex color string (with or without #)
27
+ * @param factor - Amount to lighten (0-1). Default: 0.3
28
+ * @returns Lightened hex color string with # prefix
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * lightenColor('#0000FF', 0.5); // Returns a lighter blue
33
+ * ```
34
+ */
35
+ export declare const lightenColor: (color: string, factor?: number) => string;
36
+ /**
37
+ * Converts a hex color to RGB values.
38
+ *
39
+ * @param hex - Hex color string (with or without #)
40
+ * @returns Object with r, g, b values (0-255)
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * hexToRgb('#FF5733'); // { r: 255, g: 87, b: 51 }
45
+ * ```
46
+ */
47
+ export declare const hexToRgb: (hex: string) => {
48
+ r: number;
49
+ g: number;
50
+ b: number;
51
+ } | null;
52
+ /**
53
+ * Converts RGB values to a hex color string.
54
+ *
55
+ * @param r - Red value (0-255)
56
+ * @param g - Green value (0-255)
57
+ * @param b - Blue value (0-255)
58
+ * @returns Hex color string with # prefix
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * rgbToHex(255, 87, 51); // '#ff5733'
63
+ * ```
64
+ */
65
+ export declare const rgbToHex: (r: number, g: number, b: number) => string;
66
+ /**
67
+ * Adjusts the opacity of a hex color, returning an rgba string.
68
+ *
69
+ * @param hex - Hex color string
70
+ * @param opacity - Opacity value (0-1)
71
+ * @returns RGBA color string
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * withOpacity('#FF0000', 0.5); // 'rgba(255, 0, 0, 0.5)'
76
+ * ```
77
+ */
78
+ export declare const withOpacity: (hex: string, opacity: number) => string;
79
+ /**
80
+ * Checks if a color is considered "light" (for determining text contrast).
81
+ *
82
+ * @param hex - Hex color string
83
+ * @returns true if the color is light, false if dark
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * isLightColor('#FFFFFF'); // true
88
+ * isLightColor('#000000'); // false
89
+ * ```
90
+ */
91
+ export declare const isLightColor: (hex: string) => boolean;
92
+ /**
93
+ * Gets a contrasting text color (black or white) for a given background color.
94
+ *
95
+ * @param backgroundColor - Hex color string of the background
96
+ * @returns '#000000' for light backgrounds, '#ffffff' for dark backgrounds
97
+ *
98
+ * @example
99
+ * ```ts
100
+ * getContrastTextColor('#FFFF00'); // '#000000' (black text on yellow)
101
+ * getContrastTextColor('#000080'); // '#ffffff' (white text on navy)
102
+ * ```
103
+ */
104
+ export declare const getContrastTextColor: (backgroundColor: string) => string;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Debug Utilities
3
+ *
4
+ * Provides safe logging functions that only output in development mode.
5
+ * All logs are stripped in production builds.
6
+ *
7
+ * @module shared/utils/debugUtils
8
+ */
9
+ /**
10
+ * Check if running in development mode
11
+ */
12
+ export declare const isDev: () => boolean;
13
+ /**
14
+ * Log a debug message (only in development)
15
+ * @param prefix - Log prefix (e.g., '[FedCM]')
16
+ * @param args - Arguments to log
17
+ */
18
+ export declare const debugLog: (prefix: string, ...args: unknown[]) => void;
19
+ /**
20
+ * Log a debug warning (only in development)
21
+ * @param prefix - Log prefix
22
+ * @param args - Arguments to log
23
+ */
24
+ export declare const debugWarn: (prefix: string, ...args: unknown[]) => void;
25
+ /**
26
+ * Log a debug error (only in development)
27
+ * @param prefix - Log prefix
28
+ * @param args - Arguments to log
29
+ */
30
+ export declare const debugError: (prefix: string, ...args: unknown[]) => void;
31
+ /**
32
+ * Create a namespaced debug logger
33
+ * @param namespace - Logger namespace (e.g., 'FedCM', 'PopupAuth')
34
+ * @returns Object with log, warn, error methods
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const debug = createDebugLogger('FedCM');
39
+ * debug.log('Starting authentication');
40
+ * debug.warn('Token expires soon');
41
+ * debug.error('Authentication failed', error);
42
+ * ```
43
+ */
44
+ export declare const createDebugLogger: (namespace: string) => {
45
+ log: (...args: unknown[]) => void;
46
+ warn: (...args: unknown[]) => void;
47
+ error: (...args: unknown[]) => void;
48
+ };