fge-auth-component 5.2.10 → 5.2.12

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.
Files changed (36) hide show
  1. package/dist/components/2Fa/Fge2FActivator.vue.d.ts.map +1 -1
  2. package/dist/components/ConfirmationDialog.vue.d.ts.map +1 -1
  3. package/dist/components/FgeButtonCounter.vue.d.ts.map +1 -1
  4. package/dist/components/FgeDispositivos.vue.d.ts.map +1 -1
  5. package/dist/components/FgeEnviarCodigo.vue.d.ts.map +1 -1
  6. package/dist/components/FgeErrorMessage.vue.d.ts.map +1 -1
  7. package/dist/components/FgeFooter.vue.d.ts.map +1 -1
  8. package/dist/components/FgeHeader.vue.d.ts.map +1 -1
  9. package/dist/components/FgeLoadingComponent.vue.d.ts.map +1 -1
  10. package/dist/components/FgeLogin.vue.d.ts.map +1 -1
  11. package/dist/components/FgeMenuItems.vue.d.ts.map +1 -1
  12. package/dist/components/FgeOtpInput.vue.d.ts.map +1 -1
  13. package/dist/components/FgePassword.vue.d.ts.map +1 -1
  14. package/dist/components/FgePerfil.vue.d.ts.map +1 -1
  15. package/dist/components/FgePerfilHeader.vue.d.ts.map +1 -1
  16. package/dist/components/FgePerfilSidebar.vue.d.ts.map +1 -1
  17. package/dist/components/FgeRecuperarPassword.vue.d.ts.map +1 -1
  18. package/dist/components/FgeRegistrarPage.vue.d.ts.map +1 -1
  19. package/dist/components/FgeSesiones.vue.d.ts.map +1 -1
  20. package/dist/components/FgeStepComponent.vue.d.ts.map +1 -1
  21. package/dist/components/PasswordDialog.vue.d.ts.map +1 -1
  22. package/dist/components/PrincipalLoginComp.vue.d.ts.map +1 -1
  23. package/dist/components/Sidebar.vue.d.ts.map +1 -1
  24. package/dist/components/TelegramDialog.vue.d.ts.map +1 -1
  25. package/dist/components/UpdateImageDialog.vue.d.ts.map +1 -1
  26. package/dist/components/dialogs/Message2faDialog.vue.d.ts.map +1 -1
  27. package/dist/components/svgIcons/CheckMarkIcon.vue.d.ts.map +1 -1
  28. package/dist/components/svgIcons/DefaultUserIcon.vue.d.ts.map +1 -1
  29. package/dist/components/svgIcons/ErrorIcon.vue.d.ts.map +1 -1
  30. package/dist/components/svgIcons/ExclamationIcon.vue.d.ts.map +1 -1
  31. package/dist/components/svgIcons/LoaderIcon.vue.d.ts.map +1 -1
  32. package/dist/fge-auth-component.css +1 -1
  33. package/dist/fge-auth-component.es.js +6849 -6824
  34. package/dist/fge-auth-component.umd.js +19 -19
  35. package/dist/main.d.ts +35 -4
  36. package/package.json +1 -1
package/dist/main.d.ts CHANGED
@@ -22,6 +22,12 @@ declare type AttachAuthRefreshInterceptorOptions = {
22
22
  onRefreshFailed?: (error: unknown) => void;
23
23
  };
24
24
 
25
+ /**
26
+ * Elimina la URL de redirección guardada.
27
+ * Llamar después de redirigir al usuario.
28
+ */
29
+ export declare function clearRedirectUrl(): void;
30
+
25
31
  declare type ClearUserDataOptions = {
26
32
  /** logout: borra perfil y propaga session-cleared. invalidate: solo tokens (default). */
27
33
  reason?: 'logout' | 'invalidate';
@@ -46,6 +52,7 @@ export declare type ConfigOptions = {
46
52
  MS_WEBSOCKET_URL: string;
47
53
  ENABLE_CHANGE_PASSWORD?: boolean;
48
54
  ENABLE_FORCE_CHANGE_PASSWORD?: boolean;
55
+ defaultRedirectPath?: string;
49
56
  };
50
57
 
51
58
  declare const _default: {
@@ -88,6 +95,17 @@ export declare const FgePerfilSidebar: DefineComponent<{}, {}, {}, {}, {}, Compo
88
95
 
89
96
  export declare function getErrorRequestConfig(error: unknown): InternalAxiosRequestConfig | undefined;
90
97
 
98
+ /**
99
+ * Obtiene la URL de redirección guardada.
100
+ * @returns URL guardada o null si no existe
101
+ */
102
+ export declare function getRedirectUrl(): string | null;
103
+
104
+ /**
105
+ * Verifica si existe una URL de redirección guardada.
106
+ */
107
+ export declare function hasRedirectUrl(): boolean;
108
+
91
109
  export declare class InvalidRefreshResponseError extends Error {
92
110
  readonly code = "INVALID_REFRESH_RESPONSE";
93
111
  constructor(message?: string);
@@ -100,6 +118,13 @@ export declare class MissingRefreshTokenError extends Error {
100
118
  constructor(message?: string);
101
119
  }
102
120
 
121
+ /**
122
+ * Guarda la URL de redirección después del login.
123
+ * Usar en router guards cuando el usuario no esté autenticado.
124
+ * @param url - URL completa a la que se redirigirá después del login (ej: /ausencias/horas)
125
+ */
126
+ export declare function saveRedirectUrl(url: string): void;
127
+
103
128
  /** Rutas de auth que no deben disparar refresh automático ante 401. */
104
129
  export declare function shouldSkipAuthRefresh(config?: InternalAxiosRequestConfig): boolean;
105
130
 
@@ -118,6 +143,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
118
143
  aplicacion: Ref<string>;
119
144
  enableChangePassword: Ref<boolean>;
120
145
  enableForceChangePwd: Ref<boolean>;
146
+ defaultRedirectPath: Ref<string>;
121
147
  userState: Ref<{
122
148
  token?: string | undefined;
123
149
  refreshToken?: string | undefined;
@@ -246,7 +272,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
246
272
  usuario: string;
247
273
  }) => Promise<void>;
248
274
  onLoginCiudadania: (values: any) => Promise<void>;
249
- setConfigs: ({ newBaseURL, newBaseURLAuthNv, newIsRegister, newWebSocketUrl, newWebSocketToken, newAplicacion, newRrhhUrl, verificarSiFuncionario, telegramBot, systemVersion, enableChangePasswordMsg, enableForceChangePassword, }: {
275
+ setConfigs: ({ newBaseURL, newBaseURLAuthNv, newIsRegister, newWebSocketUrl, newWebSocketToken, newAplicacion, newRrhhUrl, verificarSiFuncionario, telegramBot, systemVersion, enableChangePasswordMsg, enableForceChangePassword, newDefaultRedirectPath, }: {
250
276
  newBaseURL: string;
251
277
  newAplicacion: string;
252
278
  newIsRegister?: boolean | undefined;
@@ -259,6 +285,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
259
285
  systemVersion?: string | undefined;
260
286
  enableChangePasswordMsg?: boolean | undefined;
261
287
  enableForceChangePassword?: boolean | undefined;
288
+ newDefaultRedirectPath?: string | undefined;
262
289
  }) => void;
263
290
  setDispositivoConfianzaCookie: ({ usuario, value, days, }: {
264
291
  usuario: string;
@@ -276,7 +303,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
276
303
  on2AuthNuevoServicioLogin: (values: any) => Promise<void>;
277
304
  logoutStore: () => void;
278
305
  resolveDeviceIdFromCookie: (usuario: string) => string;
279
- }, "id" | "binnacleId" | "currentPage" | "apiBaseURL" | "isRegister" | "apiBaseURLAuthNv" | "apiWebSocketURL" | "webSocketToken" | "deviceId" | "aplicacion" | "enableChangePassword" | "enableForceChangePwd" | "userState" | "tgBot" | "systemVer" | "verificarFunc">>, Pick<{
306
+ }, "id" | "binnacleId" | "currentPage" | "apiBaseURL" | "isRegister" | "apiBaseURLAuthNv" | "apiWebSocketURL" | "webSocketToken" | "deviceId" | "aplicacion" | "enableChangePassword" | "enableForceChangePwd" | "defaultRedirectPath" | "userState" | "tgBot" | "systemVer" | "verificarFunc">>, Pick<{
280
307
  id: Ref<string>;
281
308
  currentPage: Ref<ShowPage>;
282
309
  binnacleId: Ref<string | null>;
@@ -289,6 +316,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
289
316
  aplicacion: Ref<string>;
290
317
  enableChangePassword: Ref<boolean>;
291
318
  enableForceChangePwd: Ref<boolean>;
319
+ defaultRedirectPath: Ref<string>;
292
320
  userState: Ref<{
293
321
  token?: string | undefined;
294
322
  refreshToken?: string | undefined;
@@ -417,7 +445,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
417
445
  usuario: string;
418
446
  }) => Promise<void>;
419
447
  onLoginCiudadania: (values: any) => Promise<void>;
420
- setConfigs: ({ newBaseURL, newBaseURLAuthNv, newIsRegister, newWebSocketUrl, newWebSocketToken, newAplicacion, newRrhhUrl, verificarSiFuncionario, telegramBot, systemVersion, enableChangePasswordMsg, enableForceChangePassword, }: {
448
+ setConfigs: ({ newBaseURL, newBaseURLAuthNv, newIsRegister, newWebSocketUrl, newWebSocketToken, newAplicacion, newRrhhUrl, verificarSiFuncionario, telegramBot, systemVersion, enableChangePasswordMsg, enableForceChangePassword, newDefaultRedirectPath, }: {
421
449
  newBaseURL: string;
422
450
  newAplicacion: string;
423
451
  newIsRegister?: boolean | undefined;
@@ -430,6 +458,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
430
458
  systemVersion?: string | undefined;
431
459
  enableChangePasswordMsg?: boolean | undefined;
432
460
  enableForceChangePassword?: boolean | undefined;
461
+ newDefaultRedirectPath?: string | undefined;
433
462
  }) => void;
434
463
  setDispositivoConfianzaCookie: ({ usuario, value, days, }: {
435
464
  usuario: string;
@@ -460,6 +489,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
460
489
  aplicacion: Ref<string>;
461
490
  enableChangePassword: Ref<boolean>;
462
491
  enableForceChangePwd: Ref<boolean>;
492
+ defaultRedirectPath: Ref<string>;
463
493
  userState: Ref<{
464
494
  token?: string | undefined;
465
495
  refreshToken?: string | undefined;
@@ -588,7 +618,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
588
618
  usuario: string;
589
619
  }) => Promise<void>;
590
620
  onLoginCiudadania: (values: any) => Promise<void>;
591
- setConfigs: ({ newBaseURL, newBaseURLAuthNv, newIsRegister, newWebSocketUrl, newWebSocketToken, newAplicacion, newRrhhUrl, verificarSiFuncionario, telegramBot, systemVersion, enableChangePasswordMsg, enableForceChangePassword, }: {
621
+ setConfigs: ({ newBaseURL, newBaseURLAuthNv, newIsRegister, newWebSocketUrl, newWebSocketToken, newAplicacion, newRrhhUrl, verificarSiFuncionario, telegramBot, systemVersion, enableChangePasswordMsg, enableForceChangePassword, newDefaultRedirectPath, }: {
592
622
  newBaseURL: string;
593
623
  newAplicacion: string;
594
624
  newIsRegister?: boolean | undefined;
@@ -601,6 +631,7 @@ export declare const useFgeAuthLoginStore: StoreDefinition<"LOGIN_STORE", _Unwra
601
631
  systemVersion?: string | undefined;
602
632
  enableChangePasswordMsg?: boolean | undefined;
603
633
  enableForceChangePassword?: boolean | undefined;
634
+ newDefaultRedirectPath?: string | undefined;
604
635
  }) => void;
605
636
  setDispositivoConfianzaCookie: ({ usuario, value, days, }: {
606
637
  usuario: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fge-auth-component",
3
3
  "private": false,
4
- "version": "5.2.10",
4
+ "version": "5.2.12",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"