@pretto/places 0.30.0 → 0.31.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.ts CHANGED
@@ -1,17 +1,17 @@
1
1
  import { CustomFetchOptions, LongLat, MunicipalitySearchResult } from './types';
2
- declare type SearchType = 'city' | 'zipcode' | 'coordinates';
3
- export declare const searchPlaces: (searchValue: string | LongLat, options?: CustomFetchOptions | undefined, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
4
- export declare const searchDepartment: (searchValue: string, options?: CustomFetchOptions | undefined) => Promise<import("./types").DepartmentSearchResult[]>;
5
- export declare const searchAddress: (searchValue: string, options?: CustomFetchOptions | undefined) => Promise<import("./types").AddressSearchResult[]>;
2
+ type SearchType = 'city' | 'zipcode' | 'coordinates';
3
+ export declare const searchPlaces: (searchValue: string | LongLat, options?: CustomFetchOptions, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
4
+ export declare const searchDepartment: (searchValue: string, options?: CustomFetchOptions) => Promise<import("./types").DepartmentSearchResult[]>;
5
+ export declare const searchAddress: (searchValue: string, options?: CustomFetchOptions) => Promise<import("./types").AddressSearchResult[]>;
6
6
  export * as searchCountry from './searchByCountry';
7
7
  /**
8
8
  * @deprecated Use searchPlaces instead
9
9
  */
10
- export declare const municipalitySearch: (searchValue: string | LongLat, options?: CustomFetchOptions | undefined, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
10
+ export declare const municipalitySearch: (searchValue: string | LongLat, options?: CustomFetchOptions, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
11
11
  /**
12
12
  * @deprecated Use searchPlaces instead
13
13
  */
14
- export declare const geolocSearch: (searchValue: string | LongLat, options?: CustomFetchOptions | undefined, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
14
+ export declare const geolocSearch: (searchValue: string | LongLat, options?: CustomFetchOptions, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
15
15
  /**
16
16
  * @deprecated Use searchByCoordinates instead
17
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEhF,aAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,CAAA;AAEpD,eAAO,MAAM,YAAY,gBACV,MAAM,GAAG,OAAO,yDAEjB,UAAU,EAAE,KACvB,QAAQ,wBAAwB,EAAE,CAkCpC,CAAA;AAED,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,kGACV,CAAA;AAE1C,eAAO,MAAM,aAAa,gBAAiB,MAAM,+FACV,CAAA;AAEvC,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAA;AAIlD;;GAEG;AACH,eAAO,MAAM,kBAAkB,gBApDhB,MAAM,GAAG,OAAO,yDAEjB,UAAU,EAAE,KACvB,QAAQ,wBAAwB,EAAE,CAiDS,CAAA;AAE9C;;GAEG;AACH,eAAO,MAAM,YAAY,gBAzDV,MAAM,GAAG,OAAO,yDAEjB,UAAU,EAAE,KACvB,QAAQ,wBAAwB,EAAE,CAsDG,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,mBAAmB,qHAAsB,CAAA;AAEtD;;GAEG;AACH,eAAO,MAAM,aAAa,qHAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAEhF,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,aAAa,CAAA;AAEpD,eAAO,MAAM,YAAY,gBACV,MAAM,GAAG,OAAO,YACnB,kBAAkB,eAChB,UAAU,EAAE,KACvB,QAAQ,wBAAwB,EAAE,CAkCpC,CAAA;AAED,eAAO,MAAM,gBAAgB,gBAAiB,MAAM,YAAY,kBAAkB,wDACxC,CAAA;AAE1C,eAAO,MAAM,aAAa,gBAAiB,MAAM,YAAY,kBAAkB,qDACxC,CAAA;AAEvC,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAA;AAIlD;;GAEG;AACH,eAAO,MAAM,kBAAkB,gBApDhB,MAAM,GAAG,OAAO,YACnB,kBAAkB,eAChB,UAAU,EAAE,KACvB,QAAQ,wBAAwB,EAAE,CAiDS,CAAA;AAE9C;;GAEG;AACH,eAAO,MAAM,YAAY,gBAzDV,MAAM,GAAG,OAAO,YACnB,kBAAkB,eAChB,UAAU,EAAE,KACvB,QAAQ,wBAAwB,EAAE,CAsDG,CAAA;AAExC;;GAEG;AACH,eAAO,MAAM,mBAAmB,qHAAsB,CAAA;AAEtD;;GAEG;AACH,eAAO,MAAM,aAAa,qHAAkB,CAAA"}
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
8
8
 
9
9
  var algoliasearch__default = /*#__PURE__*/_interopDefaultLegacy(algoliasearch);
10
10
 
11
- /*! *****************************************************************************
11
+ /******************************************************************************
12
12
  Copyright (c) Microsoft Corporation.
13
13
 
14
14
  Permission to use, copy, modify, and/or distribute this software for any
@@ -31,7 +31,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
31
31
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
32
32
  step((generator = generator.apply(thisArg, _arguments || [])).next());
33
33
  });
34
- }
34
+ }
35
+
36
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
37
+ var e = new Error(message);
38
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
39
+ };
35
40
 
36
41
  const MUNICIPALITY_API_URL = 'https://geo.api.gouv.fr/communes';
37
42
  const DEPARTMENT_API_URL = 'https://geo.api.gouv.fr/departements';
package/dist/module.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import algoliasearch from 'algoliasearch';
2
2
 
3
- /*! *****************************************************************************
3
+ /******************************************************************************
4
4
  Copyright (c) Microsoft Corporation.
5
5
 
6
6
  Permission to use, copy, modify, and/or distribute this software for any
@@ -23,7 +23,12 @@ function __awaiter(thisArg, _arguments, P, generator) {
23
23
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
24
24
  step((generator = generator.apply(thisArg, _arguments || [])).next());
25
25
  });
26
- }
26
+ }
27
+
28
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
29
+ var e = new Error(message);
30
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
31
+ };
27
32
 
28
33
  const MUNICIPALITY_API_URL = 'https://geo.api.gouv.fr/communes';
29
34
  const DEPARTMENT_API_URL = 'https://geo.api.gouv.fr/departements';
@@ -1,3 +1,3 @@
1
1
  import { AddressSearchResult, CustomFetchOptions } from './types';
2
- export declare const searchByAddress: (searchValue: string, options?: CustomFetchOptions | undefined) => Promise<AddressSearchResult[]>;
2
+ export declare const searchByAddress: (searchValue: string, options?: CustomFetchOptions) => Promise<AddressSearchResult[]>;
3
3
  //# sourceMappingURL=searchByAddress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchByAddress.d.ts","sourceRoot":"","sources":["../src/searchByAddress.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAelE,eAAO,MAAM,eAAe,gBACb,MAAM,+CAElB,QAAQ,mBAAmB,EAAE,CAuB/B,CAAA"}
1
+ {"version":3,"file":"searchByAddress.d.ts","sourceRoot":"","sources":["../src/searchByAddress.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAelE,eAAO,MAAM,eAAe,gBACb,MAAM,YACT,kBAAkB,KAC3B,QAAQ,mBAAmB,EAAE,CAuB/B,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { CustomFetchOptions, LongLat, MunicipalitySearchResult } from './types';
2
- export declare const searchByCoordinates: ({ latitude, longitude }: LongLat, options?: CustomFetchOptions | undefined) => Promise<MunicipalitySearchResult[]>;
2
+ export declare const searchByCoordinates: ({ latitude, longitude }: LongLat, options?: CustomFetchOptions) => Promise<MunicipalitySearchResult[]>;
3
3
  //# sourceMappingURL=searchByCoordinates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchByCoordinates.d.ts","sourceRoot":"","sources":["../src/searchByCoordinates.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAgB,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAI9F,eAAO,MAAM,mBAAmB,4BACL,OAAO,+CAE/B,QAAQ,wBAAwB,EAAE,CAiBpC,CAAA"}
1
+ {"version":3,"file":"searchByCoordinates.d.ts","sourceRoot":"","sources":["../src/searchByCoordinates.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAgB,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAI9F,eAAO,MAAM,mBAAmB,4BACL,OAAO,YACtB,kBAAkB,KAC3B,QAAQ,wBAAwB,EAAE,CAiBpC,CAAA"}
@@ -4,8 +4,8 @@ interface Options {
4
4
  limit?: number;
5
5
  language?: 'fr' | 'en';
6
6
  }
7
- export declare const init: (appId: string, apiKey: string, options?: AlgoliaSearchOptions | undefined) => "An error occurred." | {
8
- get(search: string, options?: Options | undefined): Promise<CountriesSearchResult[]>;
7
+ export declare const init: (appId: string, apiKey: string, options?: AlgoliaSearchOptions) => "An error occurred." | {
8
+ get(search: string, options?: Options): Promise<CountriesSearchResult[]>;
9
9
  };
10
10
  export {};
11
11
  //# sourceMappingURL=searchByCountry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchByCountry.d.ts","sourceRoot":"","sources":["../src/searchByCountry.ts"],"names":[],"mappings":"AAAA,OAAsB,EAAE,oBAAoB,EAAgB,MAAM,eAAe,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAShD,UAAU,OAAO;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;CACvB;AAyBD,eAAO,MAAM,IAAI,UAAW,MAAM,UAAU,MAAM;gBAK1B,MAAM;CAS7B,CAAA"}
1
+ {"version":3,"file":"searchByCountry.d.ts","sourceRoot":"","sources":["../src/searchByCountry.ts"],"names":[],"mappings":"AAAA,OAAsB,EAAE,oBAAoB,EAAgB,MAAM,eAAe,CAAC;AAGlF,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAShD,UAAU,OAAO;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;CACvB;AAyBD,eAAO,MAAM,IAAI,UAAW,MAAM,UAAU,MAAM,YAAY,oBAAoB;gBAK1D,MAAM,YAAY,OAAO;CAShD,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { CustomFetchOptions, DepartmentSearchResult } from './types';
2
- export declare const searchByDepartment: (searchValue: string, options?: CustomFetchOptions | undefined) => Promise<DepartmentSearchResult[]>;
2
+ export declare const searchByDepartment: (searchValue: string, options?: CustomFetchOptions) => Promise<DepartmentSearchResult[]>;
3
3
  //# sourceMappingURL=searchByDepartment.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchByDepartment.d.ts","sourceRoot":"","sources":["../src/searchByDepartment.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,kBAAkB,EAAE,sBAAsB,EAC7C,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,kBAAkB,gBAChB,MAAM,+CAElB,QAAQ,sBAAsB,EAAE,CA4BlC,CAAA"}
1
+ {"version":3,"file":"searchByDepartment.d.ts","sourceRoot":"","sources":["../src/searchByDepartment.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,kBAAkB,EAAE,sBAAsB,EAC7C,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,kBAAkB,gBAChB,MAAM,YACT,kBAAkB,KAC3B,QAAQ,sBAAsB,EAAE,CA4BlC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { CustomFetchOptions, MunicipalitySearchResult } from './types';
2
- export declare const searchByMunicipality: (searchValue: string, options?: CustomFetchOptions | undefined) => Promise<MunicipalitySearchResult[]>;
2
+ export declare const searchByMunicipality: (searchValue: string, options?: CustomFetchOptions) => Promise<MunicipalitySearchResult[]>;
3
3
  //# sourceMappingURL=searchByMunicipality.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchByMunicipality.d.ts","sourceRoot":"","sources":["../src/searchByMunicipality.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAgB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAqBrF,eAAO,MAAM,oBAAoB,gBAClB,MAAM,+CAElB,QAAQ,wBAAwB,EAAE,CAqCpC,CAAA"}
1
+ {"version":3,"file":"searchByMunicipality.d.ts","sourceRoot":"","sources":["../src/searchByMunicipality.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,kBAAkB,EAAgB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAqBrF,eAAO,MAAM,oBAAoB,gBAClB,MAAM,YACT,kBAAkB,KAC3B,QAAQ,wBAAwB,EAAE,CAqCpC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { CustomFetchOptions, MunicipalitySearchResult } from './types';
2
- export declare const searchByZipcode: (searchValue: string, options?: CustomFetchOptions | undefined) => Promise<MunicipalitySearchResult[]>;
2
+ export declare const searchByZipcode: (searchValue: string, options?: CustomFetchOptions) => Promise<MunicipalitySearchResult[]>;
3
3
  //# sourceMappingURL=searchByZipcode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"searchByZipcode.d.ts","sourceRoot":"","sources":["../src/searchByZipcode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAgB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAIrF,eAAO,MAAM,eAAe,gBACb,MAAM,+CAElB,QAAQ,wBAAwB,EAAE,CAUpC,CAAA"}
1
+ {"version":3,"file":"searchByZipcode.d.ts","sourceRoot":"","sources":["../src/searchByZipcode.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAgB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAIrF,eAAO,MAAM,eAAe,gBACb,MAAM,YACT,kBAAkB,KAC3B,QAAQ,wBAAwB,EAAE,CAUpC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pretto/places",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",