sass-cms-template-common 0.0.12 → 0.0.13

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/index.d.ts CHANGED
@@ -35,7 +35,7 @@ export declare type AppMessageNode = string | {
35
35
  /** Árbol de mensajes del gestor (namespaces → claves → string anidable). */
36
36
  export declare type AppMessages = Record<string, AppMessageNode>;
37
37
 
38
- export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, editorialOpportunities, showEditorialOpportunities, copilotSuggestionsHref, onEditorialSeeMore, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, LinkComponent, permissions, locale, language, messages, appMessages, baseUrl, profileServices, }: AppShellProps): JSX.Element;
38
+ export declare function AppShell({ pathname, sites, children, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, LinkComponent, permissions, locale, language, messages, appMessages, baseUrl, profileServices, }: AppShellProps): JSX.Element;
39
39
 
40
40
  export declare type AppShellProps = {
41
41
  pathname: string;
@@ -44,14 +44,12 @@ export declare type AppShellProps = {
44
44
  notificationUnreadCount: number;
45
45
  /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
46
46
  notificationsData?: DashboardNotificationsResponse | null;
47
- /** Oportunidades editoriales copilot (card de la campanita). Si se omite, mock temporal. */
48
- editorialOpportunities?: EditorialOpportunity[];
49
- /** Muestra la card de oportunidades editoriales copilot. Por defecto `true`. */
50
- showEditorialOpportunities?: boolean;
51
- /** URL del gestor de sugerencias copilot para el "Ver más" (enlace real). */
47
+ /** Destino del "Ver más" / clic en una oportunidad copilot (página de sugerencias). */
52
48
  copilotSuggestionsHref?: string;
53
49
  /** Clic en "Ver más" cuando no hay `copilotSuggestionsHref` (fallback). */
54
50
  onEditorialSeeMore?: () => void;
51
+ /** "Recordar luego": recibe los `opportunity_id` mostrados para el snooze. */
52
+ onEditorialRemindLater?: (opportunityIds: string[]) => void;
55
53
  profile: ProfileGetResponse;
56
54
  primaryLogo: ReactNode;
57
55
  brandLogo?: ReactNode;
@@ -981,6 +979,13 @@ export declare class CmsCopilotServices {
981
979
  * oportunidad: `save` | `like` | `dislike` | `assign` (permiso COPILOT_ACTION).
982
980
  */
983
981
  executeAction: (input: CopilotActionInput) => Promise<CopilotActionResponse>;
982
+ /**
983
+ * POST /copilot/snooze — "recordar luego" de una oportunidad de la campanita
984
+ * (permiso COPILOT_VIEW). La oportunidad desaparece de la campanita para el
985
+ * usuario y reaparece sola al vencer el plazo configurado.
986
+ * @param opportunityId - Id de la oportunidad a posponer.
987
+ */
988
+ snooze: (opportunityId: string) => Promise<CopilotSnoozeResponse>;
984
989
  }
985
990
 
986
991
  /**
@@ -2683,7 +2688,8 @@ export declare interface CopilotOpportunitiesResponse extends CmsResponse {
2683
2688
  *
2684
2689
  * La doc del gateway lista `id`, `topic` y `created_at`, pero el microservicio
2685
2690
  * (observado en dev) puede omitirlos: solo `title`, `status` y `score` están
2686
- * garantizados. El consumidor debe tolerar los faltantes.
2691
+ * garantizados. El consumidor debe tolerar los faltantes. En dev (2026-07-06) el
2692
+ * micro también entrega `source`, `type`, `reasons` e `is_followed`.
2687
2693
  */
2688
2694
  export declare interface CopilotOpportunity {
2689
2695
  id?: string;
@@ -2695,8 +2701,23 @@ export declare interface CopilotOpportunity {
2695
2701
  score?: number;
2696
2702
  /** Fecha de creación (ISO 8601, p. ej. "2026-06-26T10:15:00Z"). */
2697
2703
  created_at?: string;
2704
+ /** Fuente detectada (p. ej. "rss"). Verificado en dev 2026-07-06. */
2705
+ source?: CopilotOpportunitySource;
2706
+ /** Subtipo de match del micro (p. ej. "rss_match"). */
2707
+ type?: string;
2708
+ /** Motivos por los que el micro la propuso (para tooltip/detalle). */
2709
+ reasons?: string[];
2710
+ /** Si el editor ya la siguió/guardó (acción "save" de `copilot/actions`). */
2711
+ is_followed?: boolean;
2698
2712
  }
2699
2713
 
2714
+ /**
2715
+ * Fuente de la que el microservicio detectó la oportunidad. Valor observado en
2716
+ * dev hoy: `"rss"`. Se deja abierto (passthrough) para no romper cuando el micro
2717
+ * agregue fuentes nuevas.
2718
+ */
2719
+ declare type CopilotOpportunitySource = 'rss' | 'gtrends' | 'sconsole' | 'x' | (string & {});
2720
+
2700
2721
  /**
2701
2722
  * Estado de una oportunidad tal como lo entrega el microservicio (passthrough).
2702
2723
  * El único valor documentado hoy es `"open"`; se deja abierto para no romper
@@ -2704,6 +2725,18 @@ export declare interface CopilotOpportunity {
2704
2725
  */
2705
2726
  export declare type CopilotOpportunityStatus = 'open' | (string & {});
2706
2727
 
2728
+ /**
2729
+ * Cuerpo de la respuesta de POST /copilot/snooze (NAA-4645). El "recordar luego"
2730
+ * de la campanita: la oportunidad se oculta para ese usuario y reaparece sola al
2731
+ * vencer el plazo configurado.
2732
+ */
2733
+ export declare interface CopilotSnoozeResponse extends CmsResponse {
2734
+ copilotEnabled?: boolean;
2735
+ opportunity_id?: string;
2736
+ /** Momento hasta el cual la oportunidad queda oculta (ISO 8601 o epoch). */
2737
+ snoozed_until?: string | number;
2738
+ }
2739
+
2707
2740
  /** POST /dashboard/countNotificatio */
2708
2741
  export declare interface CountNotificationsResponse {
2709
2742
  status: string;
@@ -2744,10 +2777,32 @@ export declare interface CurrentUserPhotoProviderProps {
2744
2777
  children: ReactNode;
2745
2778
  }
2746
2779
 
2780
+ /**
2781
+ * Oportunidad editorial copilot presente en POST /dashboard/notification
2782
+ * (NAA-4645). El back manda hasta 3, ordenadas por `score` desc, y solo si hay.
2783
+ */
2784
+ export declare interface DashboardCopilotOpportunity {
2785
+ /** Id de la oportunidad (opportunity_id, requerido para el snooze). */
2786
+ id?: string;
2787
+ title: string;
2788
+ /** Tema/categoría de la oportunidad. */
2789
+ topic?: string;
2790
+ /** Puntaje de coincidencia editorial (0-100). */
2791
+ score?: number;
2792
+ /** Fecha de creación (ISO 8601, p. ej. "2026-06-26T10:15:00Z"). */
2793
+ created_at?: string;
2794
+ isRead?: boolean;
2795
+ }
2796
+
2747
2797
  /** Cuerpo de la respuesta de POST /dashboard/countNotifications. */
2748
2798
  export declare interface DashboardCountNotificationsResponse extends CmsResponse {
2749
2799
  /** Total de notificaciones no leídas del usuario autenticado. */
2750
2800
  unreadNotifications?: number;
2801
+ /**
2802
+ * Oportunidades copilot no leídas (NAA-4645). Ya está **sumado** dentro de
2803
+ * `unreadNotifications`; solo aparece si copilot aplica al usuario/publicación.
2804
+ */
2805
+ copilotOpportunities?: number;
2751
2806
  }
2752
2807
 
2753
2808
  /** Actividad vencida o por vencer presente en POST /dashboard/notification. */
@@ -2792,6 +2847,8 @@ export declare interface DashboardNotificationsResponse extends CmsResponse {
2792
2847
  newsTask?: DashboardNewsTask[];
2793
2848
  /** Actividades vencidas o por vencer. */
2794
2849
  expireTask?: DashboardExpireTask[];
2850
+ /** Oportunidades editoriales copilot (hasta 3, por `score` desc). NAA-4645. */
2851
+ copilot?: DashboardCopilotOpportunity[];
2795
2852
  }
2796
2853
 
2797
2854
  /** Evento de encoder de video presente en POST /dashboard/notification. */
@@ -2918,25 +2975,6 @@ export declare type DropdownOption = {
2918
2975
  testId?: string;
2919
2976
  };
2920
2977
 
2921
- /**
2922
- * Oportunidad editorial de un tema copilot (fuente de la card de la campanita).
2923
- * Misma forma que el `getCopilotOpportunities()` del CMS Angular (NAA-4645): hoy
2924
- * datos quemados; cuando el back libere el bloque en el WS de notificaciones se
2925
- * reemplaza la fuente manteniendo esta forma.
2926
- */
2927
- export declare interface EditorialOpportunity {
2928
- id: number | string;
2929
- title: string;
2930
- /** % de coincidencia con la línea editorial. */
2931
- match: number;
2932
- trending: boolean;
2933
- isRead: boolean;
2934
- /** Momento de entrega (epoch ms), como `{ time }` o número. */
2935
- timeStamp?: {
2936
- time: number;
2937
- } | number | null;
2938
- }
2939
-
2940
2978
  export declare type EditorialOpportunityColors = typeof editorialOpportunityColors;
2941
2979
 
2942
2980
  export declare const editorialOpportunityColors: Record<"accent" | "text" | "topicBg" | "topicBorder" | "trending", string>;
@@ -3702,15 +3740,6 @@ export declare function getDefaultPublicationSlug(sites: SiteSection[]): string;
3702
3740
  /** BCP 47 tag for `Intl` / `toLocaleString` formatting. */
3703
3741
  export declare function getIntlLocaleTag(locale: Locale): string;
3704
3742
 
3705
- /**
3706
- * Oportunidades editoriales copilot QUEMADAS temporales (NAA-4837). El back aún
3707
- * no envía este bloque; cuando lo haga, el gestor pasa las oportunidades reales
3708
- * por la prop `editorialOpportunities` y este mock se elimina.
3709
- *
3710
- * @param now Instante actual (epoch ms) usado como hora de entrega de las cards.
3711
- */
3712
- export declare function getMockCopilotOpportunities(now: number): EditorialOpportunity[];
3713
-
3714
3743
  export declare function getProfileAvatarSrc(profile: ProfileGetResponse, options?: ProfileAvatarOptions): string;
3715
3744
 
3716
3745
  export declare function getProfileDisplayName(profile: ProfileGetResponse): string;
@@ -4868,7 +4897,7 @@ export declare interface NotificationsListResponse {
4868
4897
  total?: number;
4869
4898
  }
4870
4899
 
4871
- export declare function NotificationsMenu({ unreadCount, notificationsData, masterBaseUrl, currentPublicationId, gmtRedaction, editorialOpportunities, showEditorialOpportunities, copilotSuggestionsHref, onEditorialSeeMore, }: NotificationsMenuProps): JSX.Element;
4900
+ export declare function NotificationsMenu({ unreadCount, notificationsData, masterBaseUrl, currentPublicationId, gmtRedaction, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, }: NotificationsMenuProps): JSX.Element;
4872
4901
 
4873
4902
  export declare type NotificationsMenuMessageKey = keyof CmsMessages['notificationsMenu'];
4874
4903
 
@@ -4884,21 +4913,20 @@ export declare type NotificationsMenuProps = {
4884
4913
  /** Offset GMT de la publicación (para mostrar las fechas en zona de redacción). */
4885
4914
  gmtRedaction?: string | null;
4886
4915
  /**
4887
- * Oportunidades editoriales copilot (card de la campanita, NAA-4837). Si se
4888
- * omite y `showEditorialOpportunities` no es `false`, se usan datos QUEMADOS
4889
- * temporales; cuando el back libere el bloque, el gestor pasa las reales aquí.
4890
- */
4891
- editorialOpportunities?: EditorialOpportunity[];
4892
- /** Muestra la card de oportunidades editoriales copilot. Por defecto `true`. */
4893
- showEditorialOpportunities?: boolean;
4894
- /**
4895
- * URL del gestor de sugerencias copilot para el "Ver más" de la card. La arma
4896
- * el gestor con su deploy (env) + la publicación actual; si se pasa, el "Ver
4897
- * más" es un enlace real (nueva pestaña). Si no, cae al callback.
4916
+ * Destino del "Ver más" / clic en una oportunidad copilot (página de
4917
+ * sugerencias). Lo arma el gestor: URL absoluta al deploy de sugerencias
4918
+ * (env) si estás en otro gestor abre en pestaña nueva; ruta relativa si ya
4919
+ * estás en el gestor de sugerencias → navega en la misma. Sin valor, cae al callback.
4898
4920
  */
4899
4921
  copilotSuggestionsHref?: string;
4900
4922
  /** Clic en "Ver más" cuando no hay `copilotSuggestionsHref` (fallback). */
4901
4923
  onEditorialSeeMore?: () => void;
4924
+ /**
4925
+ * "Recordar luego" de la card de oportunidades: recibe los `opportunity_id` de
4926
+ * las oportunidades mostradas para que el gestor dispare `copilot/snooze` por
4927
+ * cada una. La card se oculta de inmediato (optimista).
4928
+ */
4929
+ onEditorialRemindLater?: (opportunityIds: string[]) => void;
4902
4930
  };
4903
4931
 
4904
4932
  /** Topic devuelto por notification/topics (`{ name, description }`). */
@@ -6877,7 +6905,7 @@ export declare interface ToastOptions {
6877
6905
  /** Severidad visual de un toast. */
6878
6906
  export declare type ToastSeverity = 'success' | 'error' | 'warning' | 'info';
6879
6907
 
6880
- export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, editorialOpportunities, showEditorialOpportunities, copilotSuggestionsHref, onEditorialSeeMore, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, }: TopBarProps): JSX.Element;
6908
+ export declare function TopBar({ sites, sidebarOpen, onToggleSidebar, notificationUnreadCount, notificationsData, copilotSuggestionsHref, onEditorialSeeMore, onEditorialRemindLater, profile, primaryLogo, brandLogo, selectedPublicationId, getPublicationHref, resolvePublicationImageUrl, profileAvatarOptions, legacyBaseUrl, cmsBaseUrl, legacySession, newContentGroups, previewFormats, operationPermissions, isAdmin, onNewContentSelect, onPreviewSelect, }: TopBarProps): JSX.Element;
6881
6909
 
6882
6910
  export declare type TopBarMessageKey = keyof CmsMessages['topBar'];
6883
6911
 
@@ -6889,14 +6917,12 @@ export declare type TopBarProps = {
6889
6917
  notificationUnreadCount: number;
6890
6918
  /** Respuesta cruda de `POST /dashboard/notification` (newsTask/expireTask/videos). */
6891
6919
  notificationsData?: DashboardNotificationsResponse | null;
6892
- /** Oportunidades editoriales copilot (card de la campanita). Si se omite, mock temporal. */
6893
- editorialOpportunities?: EditorialOpportunity[];
6894
- /** Muestra la card de oportunidades editoriales copilot. Por defecto `true`. */
6895
- showEditorialOpportunities?: boolean;
6896
- /** URL del gestor de sugerencias copilot para el "Ver más" (enlace real). */
6920
+ /** Destino del "Ver más" / clic en una oportunidad copilot (página de sugerencias). */
6897
6921
  copilotSuggestionsHref?: string;
6898
6922
  /** Clic en "Ver más" cuando no hay `copilotSuggestionsHref` (fallback). */
6899
6923
  onEditorialSeeMore?: () => void;
6924
+ /** "Recordar luego": recibe los `opportunity_id` mostrados para el snooze. */
6925
+ onEditorialRemindLater?: (opportunityIds: string[]) => void;
6900
6926
  profile: ProfileGetResponse;
6901
6927
  primaryLogo: ReactNode;
6902
6928
  brandLogo?: ReactNode;