import { z } from "zod"; export type AddressToStringOptions = { includeUndefined?: boolean; }; export declare class Address { street?: string; city?: string; town?: string; parish?: string; country?: string; zipCode?: string; metropolitan?: string; district?: string; county?: string; countryCode?: string; constructor(data?: Partial
); /** * This method returns a string representation of the address. * It includes only the fields specified in the `fields` parameter. * @param fields fields to include in the string representation * If no fields are provided, all fields will be included. * @param options options to control the string representation * @param options.includeUndefined if true, undefined fields will be included in the string representation * @returns String representation of the address. * Each field is separated by a comma. * @example * let address = new Address({street: '23 Apple Drive', town: 'Apple Grove', city: 'Kingston 5', parish: 'St. Andrew'}) * echo address.toString(); //output: '23 Apple Drive, Apple Grove, Kingston 5, St. Andrew' * echo address.toString(['street','city','parish']); //output: '23 Apple Drive, Kingston 5, St. Andrew' * echo address.toString(['street','city','parish', 'zipCode'],{includeUndefined: true}); //output: '23 Apple Drive, Kingston 5, St. Andrew' */ toString(fields?: (keyof Address)[], options?: AddressToStringOptions): string; /** * This method returns an object representation of the address. * It includes only the fields specified in the `fields` parameter. * @param fields fields to include in the object representation * If no fields are provided, all fields will be included. * @returns An object representation of the address. * Each field is included only if it has a value. */ toObject(fields?: (keyof Address)[]): Partial; } export declare const AddressSchema: z.ZodOptional