import { TsPostalCodeRepository, TsRepoConfig } from './infrastructure/repositories/TsPostalCodeRepository.js'; import { RemotePostalCodeRepository } from './infrastructure/repositories/RemotePostalCodeRepository.js'; import { PostalCode } from './domain/models/PostalCode.js'; import { PostalCodeFilter } from './domain/repositories/PostalCodeRepository.js'; export * from './domain/models/PostalCode.js'; export { type SearchableRepository, type ScrapableRepository, type PostalCodeRepository, type PostalCodeFilter } from './domain/repositories/PostalCodeRepository.js'; export * from './domain/services/PostalCodeMatcher.js'; export * from './domain/services/Logger.js'; export * from './domain/errors/PostalCodeError.js'; export * from './application/use-cases/SearchPostalCode.js'; export { TsPostalCodeRepository, type TsRepoConfig }; export { RemotePostalCodeRepository }; export { TsDataProvider } from './infrastructure/data-providers/TsDataProvider.js'; export * from './types.js'; export interface SearchOptions { province?: string; provinceCode?: string; useFuzzy?: boolean; /** * Data source to use for searching. * - 'local': Fast, offline search using static data (Default). * - 'remote': Real-time search by scraping Pos Indonesia website (Requires internet). * @default 'local' */ source?: 'local' | 'remote'; } /** * Searches for postal codes based on various criteria. * This is the primary, recommended function for all search operations. * * @example * // Search by keywords (Local) * await search(['Gambir', 'Jakarta Pusat']); * * @example * // Real-time search from Pos Indonesia (Remote) * await search('Gambir', { source: 'remote' }); * * @example * // Fuzzy search for a typo * await search('Gmbir', { useFuzzy: true }); * * @example * // Structured search for a specific village and city * await search({ village: 'Gambir', city: 'Jakarta Pusat' }); * * @example * // Search within a specific province by name (more intuitive) * await search('Bandung', { province: 'Jawa Barat' }); * * @param keywords - A search term, an array of terms, or a structured filter object. * @param options - Configuration for the search, such as province filter, fuzzy mode, or source. * @returns A promise that resolves to an array of `PostalCode` instances. */ export declare function search(keywords: string | string[] | PostalCodeFilter, options?: SearchOptions): Promise; /** * A quick-access helper to find postal codes by a specific code. * This is optimized for searching by a 5-digit postal code or administrative codes. * * @example * // Find by postal code (Local) * await searchByCode('10110'); * * @example * // Find by postal code (Remote) * await searchByCode('10110', { source: 'remote' }); * * @example * // Find by village code within a specific province * await searchByCode('3171010001', { province: 'DKI Jakarta' }); * * @param code - The code to search for (e.g., '10110'). * @param options - Optional configuration to narrow down the search by province or specify source. * @returns A promise that resolves to an array of `PostalCode` instances. */ export declare function searchByCode(code: string, options?: { province?: string; provinceCode?: string; source?: 'local' | 'remote'; }): Promise; //# sourceMappingURL=main.d.ts.map