fge-auth-component 5.1.6 → 5.2.0

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
@@ -1,4 +1,5 @@
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';
@@ -7,6 +8,17 @@ import type { Ref } from 'vue';
7
8
  import type { StoreDefinition } from 'pinia';
8
9
  import type { _UnwrapAll } from 'pinia';
9
10
 
11
+ /**
12
+ * Interceptor 401 → refresh → retry para la rama ms-seguridad-v2 (sin baseUrlAuthNv).
13
+ * El single-flight HTTP vive en store.onRefreshToken().
14
+ */
15
+ export declare function attachAuthRefreshInterceptor(axiosInstance: AxiosInstance, options?: AttachAuthRefreshInterceptorOptions): void;
16
+
17
+ declare type AttachAuthRefreshInterceptorOptions = {
18
+ /** Invocado cuando el refresh falla y no hubo renovación concurrente exitosa. */
19
+ onRefreshFailed?: (error: unknown) => void;
20
+ };
21
+
10
22
  export declare type ConfigOptions = {
11
23
  useYupLocale?: boolean;
12
24
  baseUrl: string;
@@ -65,6 +77,16 @@ export declare const FgeLoginComponent: DefineComponent<{}, {}, {}, {}, {}, Comp
65
77
 
66
78
  export declare const FgePerfilSidebar: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ExtractPropTypes<{}>>, {}, {}>;
67
79
 
80
+ export declare class InvalidRefreshResponseError extends Error {
81
+ readonly code = "INVALID_REFRESH_RESPONSE";
82
+ constructor(message?: string);
83
+ }
84
+
85
+ export declare class MissingRefreshTokenError extends Error {
86
+ readonly code = "MISSING_REFRESH_TOKEN";
87
+ constructor(message?: string);
88
+ }
89
+
68
90
  declare type ShowPage = 'login' | 'registrar' | 'recuperar-password';
69
91
 
70
92
  export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _UnwrapAll<Pick<{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fge-auth-component",
3
3
  "private": false,
4
- "version": "5.1.6",
4
+ "version": "5.2.0",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"