- Add JapanAddressForm component for complete Japanese address input. - Integrate ZipCodeInput for automatic address population via Japan Post API. - Create hooks for ZIP code lookup and address service status. - Define address-related types and constants in the domain package. - Document the feature, including environment variables and API endpoints. - Implement mapping functions for WHMCS and Salesforce address formats.
26 lines
573 B
TypeScript
26 lines
573 B
TypeScript
/**
|
|
* Address Domain - Contract
|
|
*
|
|
* Constants and provider-agnostic types for address lookup.
|
|
*/
|
|
|
|
/**
|
|
* Supported residence types for Japanese addresses
|
|
*/
|
|
export const RESIDENCE_TYPE = {
|
|
HOUSE: "house",
|
|
APARTMENT: "apartment",
|
|
} as const;
|
|
|
|
export type ResidenceType = (typeof RESIDENCE_TYPE)[keyof typeof RESIDENCE_TYPE];
|
|
|
|
/**
|
|
* Address lookup provider identifiers
|
|
*/
|
|
export const ADDRESS_LOOKUP_PROVIDER = {
|
|
JAPAN_POST: "japan_post",
|
|
} as const;
|
|
|
|
export type AddressLookupProvider =
|
|
(typeof ADDRESS_LOOKUP_PROVIDER)[keyof typeof ADDRESS_LOOKUP_PROVIDER];
|