@aptly-as/types
Version:
Aptly types and enums
38 lines (37 loc) • 1.09 kB
TypeScript
import { AptlyUnitSchema } from './unit.js';
export interface AptlyAddress {
line1?: string;
line2?: string;
street?: string;
zip?: string;
city?: string;
county?: string;
country?: string;
number?: number;
letter?: string;
unitNumber?: string;
cadastre?: AptlyAddressCadastre | null;
location?: AptlyAddressLocation | null;
}
export interface AptlyAddressCadastre {
knr?: string;
gnr?: number;
bnr?: number;
fnr?: number;
snr?: number;
}
export interface AptlyAddressLocation {
type: 'Point';
coordinates: [lng: number, lat: number];
}
export interface AptlyAddressSearchQuery {
q?: string;
lat?: number;
lng?: number;
}
export type AptlySearchAddress = AptlySearchAddressSchema<string, string>;
export interface AptlySearchAddressSchema<ID, DATE> extends Pick<AptlyUnitSchema<ID, DATE>, 'shipping' | 'houseNumber' | 'entrance' | 'unitNumber' | 'countyNumber' | 'holdingNumber' | 'subHoldingNumber' | 'leaseNumber' | 'sectionNumber'> {
_id: string;
name: string;
unitNumbers?: string[];
}