@oxyhq/auth 2.0.1 → 2.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.
@@ -5,38 +5,9 @@ import { useAuthStore } from '../stores/authStore';
5
5
  import { QueryClient } from '@tanstack/react-query';
6
6
  import { queryKeys, invalidateUserQueries, invalidateAccountQueries } from '../hooks/queries/queryKeys';
7
7
 
8
- /**
9
- * Updates file visibility to public for avatar use.
10
- * Handles errors gracefully, only logging non-404 errors.
11
- *
12
- * @param fileId - The file ID to update visibility for
13
- * @param oxyServices - OxyServices instance
14
- * @param contextName - Optional context name for logging
15
- * @returns Promise that resolves when visibility is updated (or skipped)
16
- */
17
- export async function updateAvatarVisibility(
18
- fileId: string | undefined,
19
- oxyServices: OxyServices,
20
- contextName: string = 'AvatarUtils'
21
- ): Promise<void> {
22
- // Skip if temporary asset ID or no file ID
23
- if (!fileId || fileId.startsWith('temp-')) {
24
- return;
25
- }
26
-
27
- try {
28
- await oxyServices.assetUpdateVisibility(fileId, 'public');
29
- // Visibility update is logged by the API
30
- } catch (visError: any) {
31
- // Silently handle errors - 404 means asset doesn't exist yet (which is OK)
32
- // Other errors are logged by the API, so no need to log here
33
- // Function continues gracefully regardless of visibility update success
34
- }
35
- }
36
-
37
8
  /**
38
9
  * Refreshes avatar in accountStore with cache-busted URL to force image reload.
39
- *
10
+ *
40
11
  * @param sessionId - The session ID for the account to update
41
12
  * @param avatarFileId - The new avatar file ID
42
13
  * @param oxyServices - OxyServices instance to generate download URL
@@ -99,4 +70,3 @@ export async function updateProfileWithAvatar(
99
70
 
100
71
  return data;
101
72
  }
102
-