15 'country' => FieldType::COUNTRY,
16 'locality' => FieldType::LOCALITY,
17 'postal_town' => FieldType::LOCALITY,
18 'route' => FieldType::STREET,
19 'street_address' => FieldType::ADDRESS_LINE_1,
20 'administrative_area_level_4' => FieldType::ADM_LEVEL_4,
21 'administrative_area_level_3' => FieldType::ADM_LEVEL_3,
22 'administrative_area_level_2' => FieldType::ADM_LEVEL_2,
23 'administrative_area_level_1' => FieldType::ADM_LEVEL_1,
24 'floor' => FieldType::FLOOR,
25 'postal_code' => FieldType::POSTAL_CODE,
26 'room' => FieldType::ROOM,
27 'sublocality' => FieldType::SUB_LOCALITY,
28 'sublocality_level_1' => FieldType::SUB_LOCALITY_LEVEL_1,
29 'sublocality_level_2' => FieldType::SUB_LOCALITY_LEVEL_2,
30 'street_number' => FieldType::BUILDING,
31 'premise' => FieldType::BUILDING,
32 'subpremise' => FieldType::ADDRESS_LINE_2,
39 public static function convert(
string $type): int
41 return self::$types[$type] ?? FieldType::UNKNOWN;