@oxyhq/core 3.4.9 → 3.4.10

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.
@@ -71,13 +71,13 @@ export declare function OxyServicesFedCMMixin<T extends typeof OxyServicesBase>(
71
71
  * @throws {OxyAuthenticationError} If FedCM not supported or user cancels
72
72
  *
73
73
  * @example
74
- * ```typescript
75
- * try {
76
- * const session = await oxyServices.signInWithFedCM();
77
- * console.log('Signed in:', session.user);
78
- * } catch (error) {
79
- * // Fallback to redirect auth
80
- * oxyServices.signInWithRedirect();
74
+ * ```typescript
75
+ * try {
76
+ * const session = await oxyServices.signInWithFedCM();
77
+ * const user = session.user;
78
+ * } catch (error) {
79
+ * // Fallback to redirect auth
80
+ * oxyServices.signInWithRedirect();
81
81
  * }
82
82
  * ```
83
83
  */
@@ -262,9 +262,7 @@ export declare function OxyServicesUserMixin<T extends typeof OxyServicesBase>(B
262
262
  getActingAs(): string | null;
263
263
  waitForAuth(timeoutMs?: number): Promise<boolean>;
264
264
  withAuthRetry<T_1>(operation: () => Promise<T_1>, operationName: string, options?: {
265
- maxRetries? /**
266
- * Download account data export
267
- */: number;
265
+ maxRetries?: number;
268
266
  retryDelay?: number;
269
267
  authTimeoutMs?: number;
270
268
  }): Promise<T_1>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxyhq/core",
3
- "version": "3.4.9",
3
+ "version": "3.4.10",
4
4
  "description": "OxyHQ SDK Foundation — API client, authentication, cryptographic identity, and shared utilities",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -255,13 +255,13 @@ export function OxyServicesFedCMMixin<T extends typeof OxyServicesBase>(Base: T)
255
255
  * @throws {OxyAuthenticationError} If FedCM not supported or user cancels
256
256
  *
257
257
  * @example
258
- * ```typescript
259
- * try {
260
- * const session = await oxyServices.signInWithFedCM();
261
- * console.log('Signed in:', session.user);
262
- * } catch (error) {
263
- * // Fallback to redirect auth
264
- * oxyServices.signInWithRedirect();
258
+ * ```typescript
259
+ * try {
260
+ * const session = await oxyServices.signInWithFedCM();
261
+ * const user = session.user;
262
+ * } catch (error) {
263
+ * // Fallback to redirect auth
264
+ * oxyServices.signInWithRedirect();
265
265
  * }
266
266
  * ```
267
267
  */
@@ -243,12 +243,18 @@ export function OxyServicesUserMixin<T extends typeof OxyServicesBase>(Base: T)
243
243
 
244
244
  return result;
245
245
  } catch (error) {
246
- const errorAny = error as any;
247
246
  const errorMessage = error instanceof Error ? error.message : String(error);
248
- const status = errorAny?.status || errorAny?.response?.status;
249
-
247
+ const errorRecord = error && typeof error === 'object'
248
+ ? error as { status?: unknown; response?: { status?: unknown } }
249
+ : null;
250
+ const status = typeof errorRecord?.status === 'number'
251
+ ? errorRecord.status
252
+ : typeof errorRecord?.response?.status === 'number'
253
+ ? errorRecord.response.status
254
+ : undefined;
255
+
250
256
  // Check if it's an authentication error (401)
251
- const isAuthError = status === 401 ||
257
+ const isAuthError = status === 401 ||
252
258
  errorMessage.includes('Authentication required') ||
253
259
  errorMessage.includes('Invalid or missing authorization header');
254
260