paf-api
Version:
HTTP service that parses Postcode Address File records into a correctly formatted address
30 lines (29 loc) • 737 B
TypeScript
import { AddressRecord } from "uk-clear-addressing";
interface FormattedAddress {
premise: string;
line_1: string;
line_2: string;
line_3: string;
post_town: string;
postcode: string;
}
interface AddressQuery {
building_name: string;
building_number: string;
sub_building_name: string;
dependant_locality: string;
double_dependant_locality: string;
thoroughfare: string;
dependant_thoroughfare: string;
po_box: string;
post_town: string;
postcode: string;
department_name: string;
organisation_name: string;
}
interface Response {
query: AddressQuery;
formatted: FormattedAddress;
}
export declare const parse: (body: AddressRecord) => Response;
export {};