FaqRepository
Component Detail
Description
Handles fetching FAQ content from the backend API and caching it locally so the screen remains usable when connectivity is intermittent. Exposes typed methods for retrieving all categories and searching items by query string. Manages cache invalidation so updated content published without an app release is surfaced to users within a reasonable TTL.
faq-repository
Sources & reasoning
Listed in the area taxonomy (line 480). Blueprint marks v1.0, consistent with the source phase matrix which shows Help & Support as a core area but FAQ as supplementary to the primary support channel. Deferred because useful FAQ content requires real usage data from MVP rollout first; the testing setup (line 57-58) confirms a coordinator-mediated feedback loop that will surface question patterns post-launch.
-
docs/source/likeperson.md · line 480| help-support | Help & Support | Contact Us, Privacy Policy, Accessibility Statement, FAQ |
-
docs/source/likeperson.md · line 57-585-8 testpersoner per plattform med spenn i kjønn, alder og digitale ferdigheter, og én dedikert kontaktperson per organisasjon som filtrerer og samler tilbakemeldinger.
Responsibilities
- Fetch the full list of FAQ categories and items from the backend REST endpoint
- Cache responses locally with a configurable TTL to support offline access
- Expose a search method that filters items by keyword against cached content
- Invalidate and refresh cache when the backend signals updated content
- Map raw API response payloads to typed FaqCategory and FaqItem models
Interfaces
getCategories(): Promise<FaqCategory[]>
searchItems(query: string): Promise<FaqItem[]>
refreshCache(): Promise<void>
clearCache(): void