@pretto/places 0.33.0 → 0.35.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -7
- package/dist/module.js +2 -7
- package/dist/searchByAddress.d.ts +1 -1
- package/dist/searchByAddress.d.ts.map +1 -1
- package/dist/searchByCoordinates.d.ts +1 -1
- package/dist/searchByCoordinates.d.ts.map +1 -1
- package/dist/searchByCountry.d.ts +2 -2
- package/dist/searchByCountry.d.ts.map +1 -1
- package/dist/searchByDepartment.d.ts +1 -1
- package/dist/searchByDepartment.d.ts.map +1 -1
- package/dist/searchByMunicipality.d.ts +1 -1
- package/dist/searchByMunicipality.d.ts.map +1 -1
- package/dist/searchByZipcode.d.ts +1 -1
- package/dist/searchByZipcode.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
import { CustomFetchOptions, LongLat, MunicipalitySearchResult } from './types';
|
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[]>;
|
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[]>;
|
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, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
|
10
|
+
export declare const municipalitySearch: (searchValue: string | LongLat, options?: CustomFetchOptions | undefined, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
|
11
11
|
/**
|
12
12
|
* @deprecated Use searchPlaces instead
|
13
13
|
*/
|
14
|
-
export declare const geolocSearch: (searchValue: string | LongLat, options?: CustomFetchOptions, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
|
14
|
+
export declare const geolocSearch: (searchValue: string | LongLat, options?: CustomFetchOptions | undefined, searchType?: SearchType[]) => Promise<MunicipalitySearchResult[]>;
|
15
15
|
/**
|
16
16
|
* @deprecated Use searchByCoordinates instead
|
17
17
|
*/
|
package/dist/index.d.ts.map
CHANGED
@@ -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,
|
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"}
|
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,12 +31,7 @@ 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
|
-
}
|
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
|
-
};
|
34
|
+
}
|
40
35
|
|
41
36
|
const MUNICIPALITY_API_URL = 'https://geo.api.gouv.fr/communes';
|
42
37
|
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,12 +23,7 @@ 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
|
-
}
|
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
|
-
};
|
26
|
+
}
|
32
27
|
|
33
28
|
const MUNICIPALITY_API_URL = 'https://geo.api.gouv.fr/communes';
|
34
29
|
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) => Promise<AddressSearchResult[]>;
|
2
|
+
export declare const searchByAddress: (searchValue: string, options?: CustomFetchOptions | undefined) => 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,
|
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,3 +1,3 @@
|
|
1
1
|
import { CustomFetchOptions, LongLat, MunicipalitySearchResult } from './types';
|
2
|
-
export declare const searchByCoordinates: ({ latitude, longitude }: LongLat, options?: CustomFetchOptions) => Promise<MunicipalitySearchResult[]>;
|
2
|
+
export declare const searchByCoordinates: ({ latitude, longitude }: LongLat, options?: CustomFetchOptions | undefined) => 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,
|
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"}
|
@@ -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) => "An error occurred." | {
|
8
|
-
get(search: string, options?: Options): Promise<CountriesSearchResult[]>;
|
7
|
+
export declare const init: (appId: string, apiKey: string, options?: AlgoliaSearchOptions | undefined) => "An error occurred." | {
|
8
|
+
get(search: string, options?: Options | undefined): 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
|
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,3 +1,3 @@
|
|
1
1
|
import { CustomFetchOptions, DepartmentSearchResult } from './types';
|
2
|
-
export declare const searchByDepartment: (searchValue: string, options?: CustomFetchOptions) => Promise<DepartmentSearchResult[]>;
|
2
|
+
export declare const searchByDepartment: (searchValue: string, options?: CustomFetchOptions | undefined) => 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,
|
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,3 +1,3 @@
|
|
1
1
|
import { CustomFetchOptions, MunicipalitySearchResult } from './types';
|
2
|
-
export declare const searchByMunicipality: (searchValue: string, options?: CustomFetchOptions) => Promise<MunicipalitySearchResult[]>;
|
2
|
+
export declare const searchByMunicipality: (searchValue: string, options?: CustomFetchOptions | undefined) => 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,
|
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,3 +1,3 @@
|
|
1
1
|
import { CustomFetchOptions, MunicipalitySearchResult } from './types';
|
2
|
-
export declare const searchByZipcode: (searchValue: string, options?: CustomFetchOptions) => Promise<MunicipalitySearchResult[]>;
|
2
|
+
export declare const searchByZipcode: (searchValue: string, options?: CustomFetchOptions | undefined) => 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,
|
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"}
|