@bzync/ph-address-intel 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,47 @@
1
+ interface Region {
2
+ code: string;
3
+ name: string;
4
+ }
5
+ interface Province {
6
+ code: string;
7
+ name: string;
8
+ regionCode: string;
9
+ }
10
+ interface Municipality {
11
+ code: string;
12
+ name: string;
13
+ regionCode: string;
14
+ provinceCode: string | null;
15
+ isCity: boolean;
16
+ zipCodes: string[];
17
+ }
18
+ interface Barangay {
19
+ code: string;
20
+ name: string;
21
+ municipalityCode: string;
22
+ }
23
+ interface ZipLookupResult {
24
+ zip: string;
25
+ region: Region;
26
+ province: Province | null;
27
+ municipality: Municipality;
28
+ barangays: Barangay[];
29
+ }
30
+ interface SearchResult {
31
+ type: 'region' | 'province' | 'municipality' | 'barangay';
32
+ code: string;
33
+ name: string;
34
+ regionCode?: string;
35
+ provinceCode?: string | null;
36
+ municipalityCode?: string;
37
+ }
38
+
39
+ declare function getRegions(): Region[];
40
+ declare function getProvinces(regionCode: string): Province[];
41
+ declare function getMunicipalities(provinceCode: string): Municipality[];
42
+ declare function getBarangays(municipalityCode: string): Barangay[];
43
+ declare function search(query: string): SearchResult[];
44
+
45
+ declare function lookupByZip(zip: string): ZipLookupResult | null;
46
+
47
+ export { type Barangay, type Municipality, type Province, type Region, type SearchResult, type ZipLookupResult, getBarangays, getMunicipalities, getProvinces, getRegions, lookupByZip, search };
@@ -0,0 +1,47 @@
1
+ interface Region {
2
+ code: string;
3
+ name: string;
4
+ }
5
+ interface Province {
6
+ code: string;
7
+ name: string;
8
+ regionCode: string;
9
+ }
10
+ interface Municipality {
11
+ code: string;
12
+ name: string;
13
+ regionCode: string;
14
+ provinceCode: string | null;
15
+ isCity: boolean;
16
+ zipCodes: string[];
17
+ }
18
+ interface Barangay {
19
+ code: string;
20
+ name: string;
21
+ municipalityCode: string;
22
+ }
23
+ interface ZipLookupResult {
24
+ zip: string;
25
+ region: Region;
26
+ province: Province | null;
27
+ municipality: Municipality;
28
+ barangays: Barangay[];
29
+ }
30
+ interface SearchResult {
31
+ type: 'region' | 'province' | 'municipality' | 'barangay';
32
+ code: string;
33
+ name: string;
34
+ regionCode?: string;
35
+ provinceCode?: string | null;
36
+ municipalityCode?: string;
37
+ }
38
+
39
+ declare function getRegions(): Region[];
40
+ declare function getProvinces(regionCode: string): Province[];
41
+ declare function getMunicipalities(provinceCode: string): Municipality[];
42
+ declare function getBarangays(municipalityCode: string): Barangay[];
43
+ declare function search(query: string): SearchResult[];
44
+
45
+ declare function lookupByZip(zip: string): ZipLookupResult | null;
46
+
47
+ export { type Barangay, type Municipality, type Province, type Region, type SearchResult, type ZipLookupResult, getBarangays, getMunicipalities, getProvinces, getRegions, lookupByZip, search };