import type { HomePageProps } from "./HomePage.types"; import type { ProfileCompletenessData } from "../../components/molecules/ProfileCompletenessCard/ProfileCompletenessCard.types"; import type { CompletenessData } from "../../components/molecules/CompletenessCard/CompletenessCard.types"; import type { HomeDashboardSummary, HomeDashboardWeeklySummary } from "./HomeDashboardSummary.types"; /** * Subset of `HomePageProps["user"]["profile"]` the dashboard summary can * currently populate. `documentType`/`document`/`address`/`contact`/`medium` * are not part of the HomeDashboardSummary contract (Fase 1-2) and are left * to whatever already sets them in the app layer. */ export interface HomeDashboardMappedUserProfile { firstName: string; lastName: string; avatarUrl: string; } /** * Result of `mapHomeDashboardSummaryToHomePageProps`. * * This is a named result type rather than `Partial` because * `user.profile` on `HomePageProps` requires fields (documentType, document, * ...) that the HomeDashboardSummary contract does not carry yet; narrowing * just that nested shape keeps the rest of the props aligned with * `HomePageProps` so spreading the result onto `HomePage` stays type-safe. */ export type HomeDashboardSummaryMappedProps = Omit, "user" | "profileCompletenessData" | "terreiroCompletenessData"> & { user?: { profile: HomeDashboardMappedUserProfile; }; profileCompletenessData?: ProfileCompletenessData | null; terreiroCompletenessData?: CompletenessData | null; }; /** * Raw weekly engagement flags for the app layer to turn into `WeeklyTask[]`. * * The flags on `HomeDashboardSummary.weeklySummary` (createdEventWeek, * rsvpWeek, ...) don't map cleanly onto `WeeklyTask[]` without inventing * Portuguese CTA copy and routes, which this contract does not own. This * helper is a documented passthrough so the mapper doesn't silently drop the * data; the app (or a later Fase 3 PR) is responsible for turning it into * `weeklyTasks`. */ export declare function getHomeDashboardWeeklySummaryFlags(summary: HomeDashboardSummary): HomeDashboardWeeklySummary | undefined; /** * Maps a `HomeDashboardSummary` (components#433 / ilovemacumba-api#418) onto * the subset of `HomePageProps` it can populate. * * This mapper is pure and has no side effects. As of Fase 1-2, nothing in * the app calls it yet — it exists so the contract and its translation layer * ship ahead of the endpoint and the app wiring (Fase 3+). */ export declare function mapHomeDashboardSummaryToHomePageProps(summary: HomeDashboardSummary): HomeDashboardSummaryMappedProps; export default mapHomeDashboardSummaryToHomePageProps;