/** * Real Care Quality Commission (CQC) provider dataset, bundled as JSON. * * Source: Care Quality Commission www.cqc.org.uk, crawled into GeraClinic's * `crawled_listings` (vertical='geraclinic', country_code='GB') and snapshotted * from apps/gera-clinic-web/src/data/cqc-cluster.generated.ts. Every record * traces to a real registered provider. Public sector information licensed * under the Open Government Licence v3.0. * * CQC publishes a CATEGORICAL rating scheme * (Outstanding / Good / Requires improvement / Inadequate), never a 0–5 numeric * scale, so this dataset carries NO numeric ratings. The `lastInspected` date * is the real last-checked date for the provider record. */ export interface CqcServiceTypeBucket { type: string; count: number; pct: number; } export interface CqcStats { total: number; withPhone: number; withPhonePct: number; withWebsite: number; serviceTypes: CqcServiceTypeBucket[]; topServiceType: string | null; latestCheck: string | null; } export interface CqcProvider { cqcLocationId: string; name: string; providerName: string | null; address: string | null; postcode: string | null; phone: string | null; website: string | null; serviceTypes: string[]; lastInspected: string | null; } export interface CqcLocality { slug: string; outwardCode: string; stats: CqcStats; providers: CqcProvider[]; } export interface CqcAuthority { slug: string; name: string; region: string | null; stats: CqcStats; providers: CqcProvider[]; localities: CqcLocality[]; } export interface CqcDataset { meta: { generatedAt: string; totalProviders: number; totalLocalities: number; attribution: string; url: string; attributionUrl: string; }; authorities: CqcAuthority[]; } export declare const CQC_META: { generatedAt: string; totalProviders: number; totalLocalities: number; attribution: string; url: string; attributionUrl: string; }; export declare const CQC_AUTHORITIES: CqcAuthority[]; export declare const CQC_ATTRIBUTION: string; export declare const ALL_PROVIDERS: CqcProvider[]; /** All distinct service-type labels present in the dataset, sorted. */ export declare const SERVICE_TYPES: string[]; export interface ProviderSearchParams { query?: string; postcode?: string; serviceType?: string; authority?: string; limit: number; } export interface ProviderSearchResult { provider: CqcProvider; authoritySlug: string; authorityName: string; region: string | null; } /** * Search the real CQC dataset. All filters are AND-combined; any omitted. * Matching is case-insensitive substring for name/serviceType, and outward- or * full-postcode prefix for postcode. */ export declare function searchProviders(params: ProviderSearchParams): ProviderSearchResult[]; /** Look up one authority or locality area by slug or name. */ export declare function findArea(slugOrName: string): { kind: 'authority' | 'locality'; area: CqcAuthority | CqcLocality; authorityName: string; } | null;