souravio 1.0.0 → 1.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,88 @@
1
+ interface Division {
2
+ id: string;
3
+ name: string;
4
+ bn_name: string;
5
+ url: string;
6
+ }
7
+ interface District {
8
+ id: string;
9
+ division_id: string;
10
+ name: string;
11
+ bn_name: string;
12
+ lat: string;
13
+ lon: string;
14
+ url: string;
15
+ }
16
+ interface Upazila {
17
+ id: string;
18
+ district_id: string;
19
+ name: string;
20
+ bn_name: string;
21
+ url: string;
22
+ }
23
+
24
+ /**
25
+ * Get all divisions of Bangladesh.
26
+ * @returns {Division[]} Array of divisions.
27
+ */
28
+ declare function getAllDivisions(): Division[];
29
+ /**
30
+ * Get all districts of Bangladesh.
31
+ * @returns {District[]} Array of districts.
32
+ */
33
+ declare function getAllDistricts(): District[];
34
+ /**
35
+ * Get all upazilas (sub-districts) of Bangladesh.
36
+ * @returns {Upazila[]} Array of upazilas.
37
+ */
38
+ declare function getAllUpazilas(): Upazila[];
39
+ /**
40
+ * Get a division by its ID.
41
+ * @param {string|number} id - Division ID.
42
+ * @returns {Division|null} Division object or null.
43
+ */
44
+ declare function getDivisionById(id: string | number): Division | null;
45
+ /**
46
+ * Get a district by its ID.
47
+ * @param {string|number} id - District ID.
48
+ * @returns {District|null} District object or null.
49
+ */
50
+ declare function getDistrictById(id: string | number): District | null;
51
+ /**
52
+ * Get an upazila by its ID.
53
+ * @param {string|number} id - Upazila ID.
54
+ * @returns {Upazila|null} Upazila object or null.
55
+ */
56
+ declare function getUpazilaById(id: string | number): Upazila | null;
57
+ /**
58
+ * Get districts belonging to a specific division.
59
+ * @param {string|number} divisionId - Division ID.
60
+ * @returns {District[]} Array of districts.
61
+ */
62
+ declare function getDistrictsByDivisionId(divisionId: string | number): District[];
63
+ /**
64
+ * Get upazilas belonging to a specific district.
65
+ * @param {string|number} districtId - District ID.
66
+ * @returns {Upazila[]} Array of upazilas.
67
+ */
68
+ declare function getUpazilasByDistrictId(districtId: string | number): Upazila[];
69
+ /**
70
+ * Search for a division by name (case-insensitive).
71
+ * @param {string} name - Division name.
72
+ * @returns {Division|null} Division object or null.
73
+ */
74
+ declare function searchDivision(name: string): Division | null;
75
+ /**
76
+ * Search for a district by name (case-insensitive).
77
+ * @param {string} name - District name.
78
+ * @returns {District|null} District object or null.
79
+ */
80
+ declare function searchDistrict(name: string): District | null;
81
+ /**
82
+ * Search for an upazila by name (case-insensitive).
83
+ * @param {string} name - Upazila name.
84
+ * @returns {Upazila|null} Upazila object or null.
85
+ */
86
+ declare function searchUpazila(name: string): Upazila | null;
87
+
88
+ export { getAllDistricts, getAllDivisions, getAllUpazilas, getDistrictById, getDistrictsByDivisionId, getDivisionById, getUpazilaById, getUpazilasByDistrictId, searchDistrict, searchDivision, searchUpazila };
@@ -0,0 +1,88 @@
1
+ interface Division {
2
+ id: string;
3
+ name: string;
4
+ bn_name: string;
5
+ url: string;
6
+ }
7
+ interface District {
8
+ id: string;
9
+ division_id: string;
10
+ name: string;
11
+ bn_name: string;
12
+ lat: string;
13
+ lon: string;
14
+ url: string;
15
+ }
16
+ interface Upazila {
17
+ id: string;
18
+ district_id: string;
19
+ name: string;
20
+ bn_name: string;
21
+ url: string;
22
+ }
23
+
24
+ /**
25
+ * Get all divisions of Bangladesh.
26
+ * @returns {Division[]} Array of divisions.
27
+ */
28
+ declare function getAllDivisions(): Division[];
29
+ /**
30
+ * Get all districts of Bangladesh.
31
+ * @returns {District[]} Array of districts.
32
+ */
33
+ declare function getAllDistricts(): District[];
34
+ /**
35
+ * Get all upazilas (sub-districts) of Bangladesh.
36
+ * @returns {Upazila[]} Array of upazilas.
37
+ */
38
+ declare function getAllUpazilas(): Upazila[];
39
+ /**
40
+ * Get a division by its ID.
41
+ * @param {string|number} id - Division ID.
42
+ * @returns {Division|null} Division object or null.
43
+ */
44
+ declare function getDivisionById(id: string | number): Division | null;
45
+ /**
46
+ * Get a district by its ID.
47
+ * @param {string|number} id - District ID.
48
+ * @returns {District|null} District object or null.
49
+ */
50
+ declare function getDistrictById(id: string | number): District | null;
51
+ /**
52
+ * Get an upazila by its ID.
53
+ * @param {string|number} id - Upazila ID.
54
+ * @returns {Upazila|null} Upazila object or null.
55
+ */
56
+ declare function getUpazilaById(id: string | number): Upazila | null;
57
+ /**
58
+ * Get districts belonging to a specific division.
59
+ * @param {string|number} divisionId - Division ID.
60
+ * @returns {District[]} Array of districts.
61
+ */
62
+ declare function getDistrictsByDivisionId(divisionId: string | number): District[];
63
+ /**
64
+ * Get upazilas belonging to a specific district.
65
+ * @param {string|number} districtId - District ID.
66
+ * @returns {Upazila[]} Array of upazilas.
67
+ */
68
+ declare function getUpazilasByDistrictId(districtId: string | number): Upazila[];
69
+ /**
70
+ * Search for a division by name (case-insensitive).
71
+ * @param {string} name - Division name.
72
+ * @returns {Division|null} Division object or null.
73
+ */
74
+ declare function searchDivision(name: string): Division | null;
75
+ /**
76
+ * Search for a district by name (case-insensitive).
77
+ * @param {string} name - District name.
78
+ * @returns {District|null} District object or null.
79
+ */
80
+ declare function searchDistrict(name: string): District | null;
81
+ /**
82
+ * Search for an upazila by name (case-insensitive).
83
+ * @param {string} name - Upazila name.
84
+ * @returns {Upazila|null} Upazila object or null.
85
+ */
86
+ declare function searchUpazila(name: string): Upazila | null;
87
+
88
+ export { getAllDistricts, getAllDivisions, getAllUpazilas, getDistrictById, getDistrictsByDivisionId, getDivisionById, getUpazilaById, getUpazilasByDistrictId, searchDistrict, searchDivision, searchUpazila };