import { ServiceTier } from '../shared/config'; export type AdditionalPatterns4TitleAndSnippetSearchability = { /** * A list of extra matching patterns for location matching. * * @example * ``` * ["New York", "Los Angeles"] * ``` */ matchingPatternsLocation: string[]; /** * A list of extra rejected patterns for location matching. * * @example * ``` * ["Unknown", "Unknown Location"] * ``` */ rejectedPatternsLocation: string[]; /** * A list of extra matching patterns for source matching. * * @example * ``` * ["NOAA", "Department of Energy"] * ``` */ matchingPatternsSource: string[]; /** * A list of extra rejected patterns for source matching. * * @example * ``` * ["Unknown", "Unknown Source"] * ``` */ rejectedPatternsSource: string[]; /** * A list of extra matching patterns for topic matching. * * @example * ``` * ["Climate Change", "Renewable Energy"] * ``` */ matchingPatternsTopic: string[]; /** * A list of extra rejected patterns for topic matching. * * @example * ``` * ["Unknown", "Unknown Topic"] * ``` */ rejectedPatternsTopic: string[]; /** * A list of extra matching patterns for title matching. * * @example * ``` * ["bi-weekly", "monthly"] * ``` */ matchingPatternsYearVintage: string[]; /** * A list of extra rejected patterns for year vintage matching. * * @example * ``` * ["Unknown", "Unknown Year Vintage"] * ``` */ rejectedPatternsYearVintage: string[]; /** * The timestamp when the data was last updated. */ updatedAt?: string; }; type FetchAdditonalPatterns4TitleAndSnippetSearchabilityOptions = { language?: string; /** * The service tier, either 'dev' or 'prod'. * This is needed to construct the correct asset folder path when in a Node.js environment. * The browser environment can determine the tier based on the hostname. */ tier?: ServiceTier; }; /** * Fetches additional pattern rules for validating the searchability of titles and snippets. * * This function retrieves additional matching and rejected patterns for different categories, * including location, source, topic, and year vintage. These patterns help determine whether * a title or snippet is valid for searchability. * * @param {string} params.language - The language code (e.g., "en", "es", "fr") to fetch the appropriate localized patterns. The default is "en". * @param {ServiceTier} params.tier - The service tier, either 'dev' or 'prod'. This is needed to construct the correct asset folder path when in a Node.js environment. * If not provided, defaults to 'dev'. the browser environment can determine the tier based on the hostname. * @returns {Promise} A promise resolving to an object containing categorized matching and rejected patterns. * * @example * ```typescript * const patterns = await fetchPatternRulesForTitleSearchability({ * language: 'en', * tier: 'dev' * }); * console.log(patterns.matchingPatternsLocation); // ["New York", "Los Angeles"] * ``` */ export declare const fetchAdditonalPatterns4TitleAndSnippetSearchability: ({ language, tier, }?: FetchAdditonalPatterns4TitleAndSnippetSearchabilityOptions) => Promise; export {};