import type { SeededRandom } from "@mailwoman/core/math/random"; import type { PathBuilderLike } from "path-ts"; /** * A row as the table stores it: street, number, postcode, locality. */ export type AddressPoint = readonly [street: string, number: string, postcode: string, locality: string]; /** * Probes per requested row before the sampler stops. * A rowid range is sparse after deletes, so some probes miss. */ export declare const ADDRESS_POINT_PROBE_BUDGET = 8; /** * Options for {@linkcode sampleAddressPoints}. */ export interface SampleAddressPointsOptions { /** * Keeps only rows whose `source` column is one of these. * * A probe that lands on another source's row counts against the budget. */ sources?: ReadonlySet; /** * @defaultValue {@linkcode ADDRESS_POINT_PROBE_BUDGET} */ probeBudget?: number; } /** * Up to `count` rows, each with all four fields, in probe order. * * `ORDER BY RANDOM()` scans the whole table, so the sample is drawn by rowid probe. * A row missing a field is skipped. * * @throws When `path` doesn't exist, naming it. */ export declare function sampleAddressPoints(path: PathBuilderLike, count: number, rng: SeededRandom, options?: SampleAddressPointsOptions): Promise; //# sourceMappingURL=address-points.d.ts.map