template-common 1.1.5 → 1.1.6

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.
@@ -1395,6 +1395,8 @@ export declare type CoreAuthUser = {
1395
1395
  lastname: string;
1396
1396
  image?: string;
1397
1397
  provider?: string;
1398
+ /** Claim `cognito:username`: con el que los comentarios firman y comparan autoría. */
1399
+ username?: string;
1398
1400
  };
1399
1401
 
1400
1402
  /**
@@ -1840,7 +1842,11 @@ export declare type FetchConfig = {
1840
1842
  newsType: string;
1841
1843
  };
1842
1844
 
1843
- /** Lectura con datos frescos: `/api/auth/user` (lee el idToken httpOnly del server). */
1845
+ /**
1846
+ * Usuario resuelto. Pega a `/api/auth/user` SOLO si hay sesión y no hay datos
1847
+ * ni en la cookie ni en el cache de la pestaña (sesión vieja o sitio sin
1848
+ * `userInfo`), y como mucho una vez en vuelo por pestaña.
1849
+ */
1844
1850
  export declare const fetchCoreAuthUser: (cfg?: CoreAuthConfig) => Promise<CoreAuthUser | null>;
1845
1851
 
1846
1852
  declare type FetchMoreArgs = {
@@ -3106,7 +3112,8 @@ export declare type LibraryConfig = {
3106
3112
  ANALYTICS_marfeel?: string | undefined;
3107
3113
  ANALYTICS_gtm?: string | undefined;
3108
3114
  ANALYTICS_comscore?: string | undefined;
3109
- COGNITO_AUTH_PREFIX?: string;
3115
+ /** `''` o `null` = cookies de login sin prefijo (ver `authPrefix` en `coreAuth.ts`). */
3116
+ COGNITO_AUTH_PREFIX?: string | null;
3110
3117
  COGNITO_CLIENT_ID?: string;
3111
3118
  COGNITO_DOMAIN?: string;
3112
3119
  COGNITO_REDIRECT_URI?: string;
@@ -4353,7 +4360,8 @@ declare type Props_14 = {
4353
4360
 
4354
4361
  declare type Props_15 = {
4355
4362
  API_ENV: {
4356
- COGNITO_AUTH_PREFIX: string;
4363
+ /** `''` o `null` = cookies de login sin prefijo. */
4364
+ COGNITO_AUTH_PREFIX: string | null;
4357
4365
  PUBLIC_ENV: string;
4358
4366
  CAPTCHA_KEY: string;
4359
4367
  /** Kill switch de reCAPTCHA. Sin definir: captcha activo (como hoy). */
@@ -4368,7 +4376,8 @@ declare type Props_15 = {
4368
4376
  declare type Props_16 = {
4369
4377
  texts?: textsType;
4370
4378
  API_ENV: {
4371
- COGNITO_AUTH_PREFIX: string;
4379
+ /** `''` o `null` = cookies de login sin prefijo. */
4380
+ COGNITO_AUTH_PREFIX: string | null;
4372
4381
  PUBLIC_ENV: string;
4373
4382
  CAPTCHA_KEY: string;
4374
4383
  /** Kill switch de reCAPTCHA. Sin definir: captcha activo (como hoy). */
@@ -4980,9 +4989,8 @@ declare type Props_9 = {
4980
4989
  };
4981
4990
 
4982
4991
  /**
4983
- * Lectura SINCRÓNICA (para pintar sin esperar la red): mock de dev, o el
4984
- * usuario cacheado en esta pestaña si la cookie de sesión sigue presente.
4985
- * Sin cookie => deslogueado.
4992
+ * Lectura SINCRÓNICA, sin red: mock de dev, la cookie `<prefix>userInfo`, o
4993
+ * el usuario cacheado en esta pestaña. Sin cookie de sesión => deslogueado.
4986
4994
  */
4987
4995
  export declare const readCoreAuthUser: (cfg?: CoreAuthConfig) => CoreAuthUser | null;
4988
4996
 
@@ -5995,6 +6003,13 @@ export declare const urlReplaces: (internalPath: string) => string;
5995
6003
  */
5996
6004
  export declare function usePlayIcon(): ComponentType<SVGProps<SVGSVGElement>>;
5997
6005
 
6006
+ /**
6007
+ * Cookie NO httpOnly con los datos visibles del usuario (JSON, URL-encoded por
6008
+ * `cookies.set` de Astro). Forma: {@link CoreAuthUser}. Señal visual, igual que
6009
+ * `IS_AUTH`: no es prueba de sesión.
6010
+ */
6011
+ export declare const userInfoCookieName: (cfg: CoreAuthConfig) => string;
6012
+
5998
6013
  export declare interface UserType {
5999
6014
  username: string;
6000
6015
  firstname: string;