@oxyhq/services 13.0.0 → 13.0.2

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 (111) hide show
  1. package/lib/commonjs/ui/context/OxyContext.js +8 -1
  2. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  3. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +5 -2
  4. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  5. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +12 -12
  6. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  7. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +8 -5
  8. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  9. package/lib/commonjs/ui/screens/FileManagementScreen.js +16 -13
  10. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  11. package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -7
  12. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  13. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +6 -4
  14. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  15. package/lib/commonjs/ui/screens/ManageAccountScreen.js +18 -12
  16. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  17. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +5 -4
  18. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  19. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +12 -7
  20. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  21. package/lib/commonjs/ui/screens/ProfileScreen.js +5 -2
  22. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  23. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +6 -5
  24. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  25. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +7 -4
  26. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  27. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +10 -7
  28. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  29. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +6 -5
  30. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  31. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +6 -4
  32. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  33. package/lib/module/ui/context/OxyContext.js +8 -1
  34. package/lib/module/ui/context/OxyContext.js.map +1 -1
  35. package/lib/module/ui/hooks/queries/useAccountQueries.js +5 -2
  36. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  37. package/lib/module/ui/hooks/queries/usePaymentQueries.js +12 -12
  38. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  39. package/lib/module/ui/screens/EditProfileFieldScreen.js +8 -5
  40. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  41. package/lib/module/ui/screens/FileManagementScreen.js +16 -13
  42. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  43. package/lib/module/ui/screens/HistoryViewScreen.js +9 -7
  44. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  45. package/lib/module/ui/screens/LanguageSelectorScreen.js +6 -4
  46. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  47. package/lib/module/ui/screens/ManageAccountScreen.js +18 -12
  48. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  49. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +5 -4
  50. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  51. package/lib/module/ui/screens/PrivacySettingsScreen.js +12 -7
  52. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  53. package/lib/module/ui/screens/ProfileScreen.js +5 -2
  54. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  55. package/lib/module/ui/screens/SavesCollectionsScreen.js +6 -5
  56. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  57. package/lib/module/ui/screens/SearchSettingsScreen.js +7 -4
  58. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  59. package/lib/module/ui/screens/WelcomeNewUserScreen.js +10 -7
  60. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  61. package/lib/module/ui/screens/trust/TrustCenterScreen.js +6 -5
  62. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  63. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +6 -4
  64. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  65. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  66. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  68. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  70. package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  72. package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  74. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  75. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  80. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  81. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  82. package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
  83. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  84. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  85. package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
  86. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  87. package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
  88. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  89. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  90. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  91. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  92. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  93. package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
  94. package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
  95. package/package.json +1 -1
  96. package/src/ui/context/OxyContext.tsx +8 -1
  97. package/src/ui/hooks/queries/useAccountQueries.ts +5 -2
  98. package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
  99. package/src/ui/screens/EditProfileFieldScreen.tsx +8 -5
  100. package/src/ui/screens/FileManagementScreen.tsx +16 -13
  101. package/src/ui/screens/HistoryViewScreen.tsx +9 -7
  102. package/src/ui/screens/LanguageSelectorScreen.tsx +6 -4
  103. package/src/ui/screens/ManageAccountScreen.tsx +18 -12
  104. package/src/ui/screens/PremiumSubscriptionScreen.tsx +5 -4
  105. package/src/ui/screens/PrivacySettingsScreen.tsx +12 -7
  106. package/src/ui/screens/ProfileScreen.tsx +5 -2
  107. package/src/ui/screens/SavesCollectionsScreen.tsx +7 -6
  108. package/src/ui/screens/SearchSettingsScreen.tsx +7 -4
  109. package/src/ui/screens/WelcomeNewUserScreen.tsx +10 -7
  110. package/src/ui/screens/trust/TrustCenterScreen.tsx +7 -6
  111. package/src/ui/screens/trust/TrustRewardsScreen.tsx +6 -4
@@ -642,9 +642,12 @@ const FileManagementScreen = ({
642
642
  defaultVisibility = 'private',
643
643
  linkContext
644
644
  }) => {
645
- // Use useOxy() hook for OxyContext values
645
+ // Use useOxy() hook for OxyContext values. Files are owned by the ACTIVE
646
+ // account (the org/project/bot when switched, else the personal user): the
647
+ // default file owner and every "is this mine?" ownership check resolve
648
+ // against `activeAccount`, so switching shows/manages that account's files.
646
649
  const {
647
- user,
650
+ activeAccount,
648
651
  oxyServices
649
652
  } = (0, _OxyContext.useOxy)();
650
653
  const {
@@ -881,7 +884,7 @@ const FileManagementScreen = ({
881
884
  // FileManagementScreen uses a slightly elevated page background.
882
885
  const backgroundColor = colors.backgroundSecondary;
883
886
  const borderColor = colors.border;
884
- const targetUserId = userId || user?.id;
887
+ const targetUserId = userId || activeAccount?.id;
885
888
  const storeSetUploading = (0, _fileStore.useFileStore)(s => s.setUploading);
886
889
  const storeSetUploadProgress = (0, _fileStore.useFileStore)(s => s.setUploadProgress);
887
890
  const storeSetDeleting = (0, _fileStore.useFileStore)(s => s.setDeleting);
@@ -2222,8 +2225,8 @@ const FileManagementScreen = ({
2222
2225
  style: [_styles.fileManagementStyles.emptyStateDescription, {
2223
2226
  color: colors.textSecondary
2224
2227
  }],
2225
- children: [" ", user?.id === targetUserId ? t('fileManagement.emptyPhotos.ownDescription') : t('fileManagement.emptyPhotos.otherDescription'), " "]
2226
- }), user?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2228
+ children: [" ", activeAccount?.id === targetUserId ? t('fileManagement.emptyPhotos.ownDescription') : t('fileManagement.emptyPhotos.otherDescription'), " "]
2229
+ }), activeAccount?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2227
2230
  style: [_styles.fileManagementStyles.emptyStateButton, {
2228
2231
  backgroundColor: colors.primary
2229
2232
  }],
@@ -2294,7 +2297,7 @@ const FileManagementScreen = ({
2294
2297
  containerWidth: safeContainerWidth
2295
2298
  })]
2296
2299
  });
2297
- }, [filteredFiles, colors, user?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, renderPhotoItem, safeContainerWidth]);
2300
+ }, [filteredFiles, colors, activeAccount?.id, targetUserId, uploading, handleFileUpload, refreshing, loadFiles, loadingDimensions, photoDimensions, loadPhotoDimensions, createJustifiedRows, renderJustifiedPhotoItem, renderPhotoItem, safeContainerWidth]);
2298
2301
 
2299
2302
  // Inline justified grid removed (moved to components/photogrid/JustifiedPhotoGrid.tsx)
2300
2303
 
@@ -2313,8 +2316,8 @@ const FileManagementScreen = ({
2313
2316
  style: [_styles.fileManagementStyles.emptyStateDescription, {
2314
2317
  color: colors.textSecondary
2315
2318
  }],
2316
- children: user?.id === targetUserId ? t('fileManagement.emptyFiles.ownDescription') : t('fileManagement.emptyFiles.otherDescription')
2317
- }), user?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2319
+ children: activeAccount?.id === targetUserId ? t('fileManagement.emptyFiles.ownDescription') : t('fileManagement.emptyFiles.otherDescription')
2320
+ }), activeAccount?.id === targetUserId && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2318
2321
  style: [_styles.fileManagementStyles.emptyStateButton, {
2319
2322
  backgroundColor: colors.primary
2320
2323
  }],
@@ -2554,7 +2557,7 @@ const FileManagementScreen = ({
2554
2557
  // standalone file manager (non-picker browse) keeps the existing UI.
2555
2558
  if (isImageOnlyPicker && !showUploadPreview) {
2556
2559
  const photosOnly = filteredFiles.filter(file => file.contentType.startsWith('image/'));
2557
- const isOwner = user?.id === targetUserId;
2560
+ const isOwner = activeAccount?.id === targetUserId;
2558
2561
  const allowUpload = isOwner && allowUploadInSelectMode;
2559
2562
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
2560
2563
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(PhotoPickerView, {
@@ -2605,13 +2608,13 @@ const FileManagementScreen = ({
2605
2608
  onClose: handleCloseFile,
2606
2609
  onDownload: handleFileDownload,
2607
2610
  onDelete: confirmFileDelete,
2608
- isOwner: user?.id === targetUserId
2611
+ isOwner: activeAccount?.id === targetUserId
2609
2612
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FileDetailsModal.FileDetailsModal, {
2610
2613
  control: fileDetailsControl,
2611
2614
  file: selectedFile,
2612
2615
  onDownload: handleFileDownload,
2613
2616
  onDelete: confirmFileDelete,
2614
- isOwner: user?.id === targetUserId
2617
+ isOwner: activeAccount?.id === targetUserId
2615
2618
  })]
2616
2619
  });
2617
2620
  }
@@ -2772,7 +2775,7 @@ const FileManagementScreen = ({
2772
2775
  size: 14,
2773
2776
  color: colors.textSecondary
2774
2777
  })]
2775
- }), user?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2778
+ }), activeAccount?.id === targetUserId && (!selectMode || selectMode && allowUploadInSelectMode) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
2776
2779
  style: [_styles.fileManagementStyles.uploadButton, isImageOnlyPicker && _styles.fileManagementStyles.uploadButtonExtended, {
2777
2780
  backgroundColor: colors.primary
2778
2781
  }],
@@ -2964,7 +2967,7 @@ const FileManagementScreen = ({
2964
2967
  file: selectedFile,
2965
2968
  onDownload: handleFileDownload,
2966
2969
  onDelete: confirmFileDelete,
2967
- isOwner: user?.id === targetUserId
2970
+ isOwner: activeAccount?.id === targetUserId
2968
2971
  }), !selectMode && uploading && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
2969
2972
  style: [_styles.fileManagementStyles.uploadBannerContainer, {
2970
2973
  pointerEvents: 'none'