fge-auth-component 5.1.6 → 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/README.md +31 -0
- package/dist/fge-auth-component.es.js +7029 -6684
- package/dist/fge-auth-component.umd.js +19 -19
- package/dist/main.d.ts +41 -3
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
1
|
import type { App } from 'vue';
|
|
2
|
+
import type { AxiosInstance } from 'axios';
|
|
2
3
|
import type { ComponentOptionsMixin } from 'vue';
|
|
3
4
|
import type { DefineComponent } from 'vue';
|
|
4
5
|
import type { ExtractPropTypes } from 'vue';
|
|
6
|
+
import type { InternalAxiosRequestConfig } from 'axios';
|
|
5
7
|
import type { PublicProps } from 'vue';
|
|
6
8
|
import type { Ref } from 'vue';
|
|
7
9
|
import type { StoreDefinition } from 'pinia';
|
|
8
10
|
import type { _UnwrapAll } from 'pinia';
|
|
9
11
|
|
|
12
|
+
export declare function applyBearerTokenToConfig(config: InternalAxiosRequestConfig, token: string | undefined): void;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Interceptor 401 → refresh → retry para la rama ms-seguridad-v2 (sin baseUrlAuthNv).
|
|
16
|
+
* El single-flight HTTP vive en store.onRefreshToken().
|
|
17
|
+
*/
|
|
18
|
+
export declare function attachAuthRefreshInterceptor(axiosInstance: AxiosInstance, options?: AttachAuthRefreshInterceptorOptions): void;
|
|
19
|
+
|
|
20
|
+
declare type AttachAuthRefreshInterceptorOptions = {
|
|
21
|
+
/** Invocado cuando el refresh falla y no hubo renovación concurrente exitosa. */
|
|
22
|
+
onRefreshFailed?: (error: unknown) => void;
|
|
23
|
+
};
|
|
24
|
+
|
|
10
25
|
export declare type ConfigOptions = {
|
|
11
26
|
useYupLocale?: boolean;
|
|
12
27
|
baseUrl: string;
|
|
@@ -65,6 +80,23 @@ export declare const FgeLoginComponent: DefineComponent<{}, {}, {}, {}, {}, Comp
|
|
|
65
80
|
|
|
66
81
|
export declare const FgePerfilSidebar: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{}>>, {}, {}>;
|
|
67
82
|
|
|
83
|
+
export declare function getErrorRequestConfig(error: unknown): InternalAxiosRequestConfig | undefined;
|
|
84
|
+
|
|
85
|
+
export declare class InvalidRefreshResponseError extends Error {
|
|
86
|
+
readonly code = "INVALID_REFRESH_RESPONSE";
|
|
87
|
+
constructor(message?: string);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export declare function isUnauthorizedError(error: unknown): boolean;
|
|
91
|
+
|
|
92
|
+
export declare class MissingRefreshTokenError extends Error {
|
|
93
|
+
readonly code = "MISSING_REFRESH_TOKEN";
|
|
94
|
+
constructor(message?: string);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Rutas de auth que no deben disparar refresh automático ante 401. */
|
|
98
|
+
export declare function shouldSkipAuthRefresh(config?: InternalAxiosRequestConfig): boolean;
|
|
99
|
+
|
|
68
100
|
declare type ShowPage = 'login' | 'registrar' | 'recuperar-password';
|
|
69
101
|
|
|
70
102
|
export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _UnwrapAll<Pick<{
|
|
@@ -227,7 +259,9 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
|
|
|
227
259
|
value: string;
|
|
228
260
|
days?: number | undefined;
|
|
229
261
|
}) => Promise<void>;
|
|
230
|
-
clearUserData: (
|
|
262
|
+
clearUserData: (options?: {
|
|
263
|
+
fromTabSync?: boolean;
|
|
264
|
+
}) => void;
|
|
231
265
|
updateUserData: (values: {
|
|
232
266
|
[key: string]: any;
|
|
233
267
|
}) => void;
|
|
@@ -397,7 +431,9 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
|
|
|
397
431
|
value: string;
|
|
398
432
|
days?: number | undefined;
|
|
399
433
|
}) => Promise<void>;
|
|
400
|
-
clearUserData: (
|
|
434
|
+
clearUserData: (options?: {
|
|
435
|
+
fromTabSync?: boolean;
|
|
436
|
+
}) => void;
|
|
401
437
|
updateUserData: (values: {
|
|
402
438
|
[key: string]: any;
|
|
403
439
|
}) => void;
|
|
@@ -567,7 +603,9 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
|
|
|
567
603
|
value: string;
|
|
568
604
|
days?: number | undefined;
|
|
569
605
|
}) => Promise<void>;
|
|
570
|
-
clearUserData: (
|
|
606
|
+
clearUserData: (options?: {
|
|
607
|
+
fromTabSync?: boolean;
|
|
608
|
+
}) => void;
|
|
571
609
|
updateUserData: (values: {
|
|
572
610
|
[key: string]: any;
|
|
573
611
|
}) => void;
|