@code-plate/iran-cities 1.0.1 → 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.
package/dist/index.d.mts CHANGED
@@ -1,31 +1,25 @@
1
- import { F as FlatCity, C as City, P as Province, S as SearchOptions } from './types--eoWJy5A.mjs';
2
- export { L as Locale } from './types--eoWJy5A.mjs';
1
+ import { F as FlatCity, Q as Query, C as City, a as CityId, b as CityKey, P as Province, c as ProvinceId, d as ProvinceListItem, S as SearchOptions } from './types-DzSw8Uw2.mjs';
2
+ export { e as Coordinates, L as Locale } from './types-DzSw8Uw2.mjs';
3
3
 
4
- /** لیست کامل استان‌ها به همراه شهرهای هرکدام */
5
4
  declare function getProvinces(): Province[];
6
- /** لیست استان‌ها بدون آرایه‌ی شهرها (سبک‌تر، برای Select/Dropdown) */
7
- declare function getProvincesList(): {
8
- en: string;
9
- fa: string;
10
- }[];
11
- /** پیدا کردن یک استان با شناسه انگلیسی یا نام فارسی (دقیق، نرمال‌شده) */
12
- declare function getProvince(query: string): Province | undefined;
13
- /** لیست شهرهای یک استان بر اساس شناسه انگلیسی یا نام فارسی استان */
14
- declare function getCities(provinceQuery: string): City[];
15
- /** لیست تمام شهرهای کشور به صورت مسطح، همراه با اطلاعات استان مربوطه */
5
+ declare function getProvincesList(): ProvinceListItem[];
6
+ declare function getProvinceById(id: ProvinceId): Province | undefined;
7
+ declare function getProvince(query: Query): Province | undefined;
8
+ declare function getCities(provinceQuery: Query): City[];
16
9
  declare function getAllCities(): FlatCity[];
17
- /** پیدا کردن یک شهر با شناسه انگلیسی یا نام فارسی (اختیاری: محدود به یک استان خاص) */
18
- declare function getCity(cityQuery: string, provinceQuery?: string): FlatCity | undefined;
19
- /** استانی که یک شهر مشخص در آن قرار دارد را برمی‌گرداند */
20
- declare function getProvinceOfCity(cityQuery: string): Province | undefined;
21
- /** جستجوی fuzzy (شامل‌شونده) در بین استان‌ها بر اساس بخشی از نام */
10
+ declare function getCityById(id: CityId): FlatCity | undefined;
11
+ declare function getCityBySlug(slug: CityKey): FlatCity | undefined;
12
+ declare function getCity(cityQuery: Query, provinceQuery?: Query): FlatCity | undefined;
13
+ declare function getCitiesByName(cityQuery: string): FlatCity[];
14
+ declare function getProvinceOfCity(cityQuery: Query): Province | undefined;
15
+ declare function getCapital(provinceQuery: Query): FlatCity | undefined;
16
+ declare function getCapitals(): FlatCity[];
17
+ declare function getProvinceByPhoneCode(code: string | number): Province | undefined;
22
18
  declare function searchProvinces(query: string, options?: SearchOptions): Province[];
23
- /** جستجوی fuzzy (شامل‌شونده) در بین تمام شهرهای کشور بر اساس بخشی از نام */
24
19
  declare function searchCities(query: string, options?: SearchOptions): FlatCity[];
25
- /** آمار کلی: تعداد استان‌ها و تعداد کل شهرها */
26
20
  declare function getStats(): {
27
21
  provinceCount: number;
28
22
  cityCount: number;
29
23
  };
30
24
 
31
- export { City, FlatCity, Province, SearchOptions, getAllCities, getCities, getCity, getProvince, getProvinceOfCity, getProvinces, getProvincesList, getStats, searchCities, searchProvinces };
25
+ export { City, CityId, CityKey, FlatCity, Province, ProvinceId, ProvinceListItem, Query, SearchOptions, getAllCities, getCapital, getCapitals, getCities, getCitiesByName, getCity, getCityById, getCityBySlug, getProvince, getProvinceById, getProvinceByPhoneCode, getProvinceOfCity, getProvinces, getProvincesList, getStats, searchCities, searchProvinces };
package/dist/index.d.ts CHANGED
@@ -1,31 +1,25 @@
1
- import { F as FlatCity, C as City, P as Province, S as SearchOptions } from './types--eoWJy5A.js';
2
- export { L as Locale } from './types--eoWJy5A.js';
1
+ import { F as FlatCity, Q as Query, C as City, a as CityId, b as CityKey, P as Province, c as ProvinceId, d as ProvinceListItem, S as SearchOptions } from './types-DzSw8Uw2.js';
2
+ export { e as Coordinates, L as Locale } from './types-DzSw8Uw2.js';
3
3
 
4
- /** لیست کامل استان‌ها به همراه شهرهای هرکدام */
5
4
  declare function getProvinces(): Province[];
6
- /** لیست استان‌ها بدون آرایه‌ی شهرها (سبک‌تر، برای Select/Dropdown) */
7
- declare function getProvincesList(): {
8
- en: string;
9
- fa: string;
10
- }[];
11
- /** پیدا کردن یک استان با شناسه انگلیسی یا نام فارسی (دقیق، نرمال‌شده) */
12
- declare function getProvince(query: string): Province | undefined;
13
- /** لیست شهرهای یک استان بر اساس شناسه انگلیسی یا نام فارسی استان */
14
- declare function getCities(provinceQuery: string): City[];
15
- /** لیست تمام شهرهای کشور به صورت مسطح، همراه با اطلاعات استان مربوطه */
5
+ declare function getProvincesList(): ProvinceListItem[];
6
+ declare function getProvinceById(id: ProvinceId): Province | undefined;
7
+ declare function getProvince(query: Query): Province | undefined;
8
+ declare function getCities(provinceQuery: Query): City[];
16
9
  declare function getAllCities(): FlatCity[];
17
- /** پیدا کردن یک شهر با شناسه انگلیسی یا نام فارسی (اختیاری: محدود به یک استان خاص) */
18
- declare function getCity(cityQuery: string, provinceQuery?: string): FlatCity | undefined;
19
- /** استانی که یک شهر مشخص در آن قرار دارد را برمی‌گرداند */
20
- declare function getProvinceOfCity(cityQuery: string): Province | undefined;
21
- /** جستجوی fuzzy (شامل‌شونده) در بین استان‌ها بر اساس بخشی از نام */
10
+ declare function getCityById(id: CityId): FlatCity | undefined;
11
+ declare function getCityBySlug(slug: CityKey): FlatCity | undefined;
12
+ declare function getCity(cityQuery: Query, provinceQuery?: Query): FlatCity | undefined;
13
+ declare function getCitiesByName(cityQuery: string): FlatCity[];
14
+ declare function getProvinceOfCity(cityQuery: Query): Province | undefined;
15
+ declare function getCapital(provinceQuery: Query): FlatCity | undefined;
16
+ declare function getCapitals(): FlatCity[];
17
+ declare function getProvinceByPhoneCode(code: string | number): Province | undefined;
22
18
  declare function searchProvinces(query: string, options?: SearchOptions): Province[];
23
- /** جستجوی fuzzy (شامل‌شونده) در بین تمام شهرهای کشور بر اساس بخشی از نام */
24
19
  declare function searchCities(query: string, options?: SearchOptions): FlatCity[];
25
- /** آمار کلی: تعداد استان‌ها و تعداد کل شهرها */
26
20
  declare function getStats(): {
27
21
  provinceCount: number;
28
22
  cityCount: number;
29
23
  };
30
24
 
31
- export { City, FlatCity, Province, SearchOptions, getAllCities, getCities, getCity, getProvince, getProvinceOfCity, getProvinces, getProvincesList, getStats, searchCities, searchProvinces };
25
+ export { City, CityId, CityKey, FlatCity, Province, ProvinceId, ProvinceListItem, Query, SearchOptions, getAllCities, getCapital, getCapitals, getCities, getCitiesByName, getCity, getCityById, getCityBySlug, getProvince, getProvinceById, getProvinceByPhoneCode, getProvinceOfCity, getProvinces, getProvincesList, getStats, searchCities, searchProvinces };