fge-auth-component 5.2.0 → 5.2.1

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.
package/dist/main.d.ts CHANGED
@@ -3,11 +3,14 @@ import type { AxiosInstance } from 'axios';
3
3
  import type { ComponentOptionsMixin } from 'vue';
4
4
  import type { DefineComponent } from 'vue';
5
5
  import type { ExtractPropTypes } from 'vue';
6
+ import type { InternalAxiosRequestConfig } from 'axios';
6
7
  import type { PublicProps } from 'vue';
7
8
  import type { Ref } from 'vue';
8
9
  import type { StoreDefinition } from 'pinia';
9
10
  import type { _UnwrapAll } from 'pinia';
10
11
 
12
+ export declare function applyBearerTokenToConfig(config: InternalAxiosRequestConfig, token: string | undefined): void;
13
+
11
14
  /**
12
15
  * Interceptor 401 → refresh → retry para la rama ms-seguridad-v2 (sin baseUrlAuthNv).
13
16
  * El single-flight HTTP vive en store.onRefreshToken().
@@ -77,16 +80,23 @@ export declare const FgeLoginComponent: DefineComponent<{}, {}, {}, {}, {}, Comp
77
80
 
78
81
  export declare const FgePerfilSidebar: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{}>>, {}, {}>;
79
82
 
83
+ export declare function getErrorRequestConfig(error: unknown): InternalAxiosRequestConfig | undefined;
84
+
80
85
  export declare class InvalidRefreshResponseError extends Error {
81
86
  readonly code = "INVALID_REFRESH_RESPONSE";
82
87
  constructor(message?: string);
83
88
  }
84
89
 
90
+ export declare function isUnauthorizedError(error: unknown): boolean;
91
+
85
92
  export declare class MissingRefreshTokenError extends Error {
86
93
  readonly code = "MISSING_REFRESH_TOKEN";
87
94
  constructor(message?: string);
88
95
  }
89
96
 
97
+ /** Rutas de auth que no deben disparar refresh automático ante 401. */
98
+ export declare function shouldSkipAuthRefresh(config?: InternalAxiosRequestConfig): boolean;
99
+
90
100
  declare type ShowPage = 'login' | 'registrar' | 'recuperar-password';
91
101
 
92
102
  export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _UnwrapAll<Pick<{
@@ -249,7 +259,9 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
249
259
  value: string;
250
260
  days?: number | undefined;
251
261
  }) => Promise<void>;
252
- clearUserData: () => void;
262
+ clearUserData: (options?: {
263
+ fromTabSync?: boolean;
264
+ }) => void;
253
265
  updateUserData: (values: {
254
266
  [key: string]: any;
255
267
  }) => void;
@@ -419,7 +431,9 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
419
431
  value: string;
420
432
  days?: number | undefined;
421
433
  }) => Promise<void>;
422
- clearUserData: () => void;
434
+ clearUserData: (options?: {
435
+ fromTabSync?: boolean;
436
+ }) => void;
423
437
  updateUserData: (values: {
424
438
  [key: string]: any;
425
439
  }) => void;
@@ -589,7 +603,9 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
589
603
  value: string;
590
604
  days?: number | undefined;
591
605
  }) => Promise<void>;
592
- clearUserData: () => void;
606
+ clearUserData: (options?: {
607
+ fromTabSync?: boolean;
608
+ }) => void;
593
609
  updateUserData: (values: {
594
610
  [key: string]: any;
595
611
  }) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fge-auth-component",
3
3
  "private": false,
4
- "version": "5.2.0",
4
+ "version": "5.2.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"