@googlemaps/google-maps-services-js
Advanced tools
Comparing version 3.2.1 to 3.2.2
@@ -53,3 +53,3 @@ "use strict"; | ||
exports.statusToCode = statusToCode; | ||
exports.customAdapter = (config) => new Promise((resolve, reject) => { | ||
const customAdapter = (config) => new Promise((resolve, reject) => { | ||
defaults | ||
@@ -67,2 +67,3 @@ .adapter(config) | ||
}); | ||
exports.customAdapter = customAdapter; | ||
//# sourceMappingURL=adapter.js.map |
@@ -35,2 +35,3 @@ /** | ||
import { HttpsAgent } from "agentkeepalive"; | ||
export declare const version: any; | ||
export declare const defaultHttpsAgent: HttpsAgent; | ||
@@ -42,3 +43,3 @@ export declare const defaultTimeout = 10000; | ||
export declare const defaultAxiosInstance: AxiosInstance; | ||
declare type Config = { | ||
export declare type Config = { | ||
raxConfig?: rax.RetryConfig; | ||
@@ -45,0 +46,0 @@ } & AxiosRequestConfig; |
@@ -18,3 +18,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Client = exports.defaultAxiosInstance = exports.X_GOOG_MAPS_EXPERIENCE_ID = exports.acceptEncoding = exports.userAgent = exports.defaultTimeout = exports.defaultHttpsAgent = void 0; | ||
exports.Client = exports.defaultAxiosInstance = exports.X_GOOG_MAPS_EXPERIENCE_ID = exports.acceptEncoding = exports.userAgent = exports.defaultTimeout = exports.defaultHttpsAgent = exports.version = void 0; | ||
const rax = require("retry-axios"); | ||
@@ -39,7 +39,8 @@ const directions_1 = require("./directions"); | ||
const agentkeepalive_1 = require("agentkeepalive"); | ||
const index_1 = require("./index"); | ||
const adapter_1 = require("./adapter"); | ||
// Cannot be `import` as it's not under TS root dir | ||
exports.version = require("../package.json").version; | ||
exports.defaultHttpsAgent = new agentkeepalive_1.HttpsAgent({ keepAlive: true }); | ||
exports.defaultTimeout = 10000; | ||
exports.userAgent = `google-maps-services-node-${index_1.version}`; | ||
exports.userAgent = `google-maps-services-node-${exports.version}`; | ||
exports.acceptEncoding = "gzip"; | ||
@@ -115,48 +116,48 @@ exports.X_GOOG_MAPS_EXPERIENCE_ID = "X-GOOG-MAPS-EXPERIENCE-ID"; | ||
directions(request) { | ||
return directions_1.directions(request, this.axiosInstance); | ||
return (0, directions_1.directions)(request, this.axiosInstance); | ||
} | ||
distancematrix(request) { | ||
return distance_1.distancematrix(request, this.axiosInstance); | ||
return (0, distance_1.distancematrix)(request, this.axiosInstance); | ||
} | ||
elevation(request) { | ||
return elevation_1.elevation(request, this.axiosInstance); | ||
return (0, elevation_1.elevation)(request, this.axiosInstance); | ||
} | ||
timezone(request) { | ||
return timezone_1.timezone(request, this.axiosInstance); | ||
return (0, timezone_1.timezone)(request, this.axiosInstance); | ||
} | ||
geolocate(request) { | ||
return geolocate_1.geolocate(request, this.axiosInstance); | ||
return (0, geolocate_1.geolocate)(request, this.axiosInstance); | ||
} | ||
geocode(request) { | ||
return geocode_1.geocode(request, this.axiosInstance); | ||
return (0, geocode_1.geocode)(request, this.axiosInstance); | ||
} | ||
reverseGeocode(request) { | ||
return reversegeocode_1.reverseGeocode(request, this.axiosInstance); | ||
return (0, reversegeocode_1.reverseGeocode)(request, this.axiosInstance); | ||
} | ||
placeAutocomplete(request) { | ||
return autocomplete_1.placeAutocomplete(request, this.axiosInstance); | ||
return (0, autocomplete_1.placeAutocomplete)(request, this.axiosInstance); | ||
} | ||
placeDetails(request) { | ||
return details_1.placeDetails(request, this.axiosInstance); | ||
return (0, details_1.placeDetails)(request, this.axiosInstance); | ||
} | ||
findPlaceFromText(request) { | ||
return findplacefromtext_1.findPlaceFromText(request, this.axiosInstance); | ||
return (0, findplacefromtext_1.findPlaceFromText)(request, this.axiosInstance); | ||
} | ||
placePhoto(request) { | ||
return photo_1.placePhoto(request, this.axiosInstance); | ||
return (0, photo_1.placePhoto)(request, this.axiosInstance); | ||
} | ||
placesNearby(request) { | ||
return placesnearby_1.placesNearby(request, this.axiosInstance); | ||
return (0, placesnearby_1.placesNearby)(request, this.axiosInstance); | ||
} | ||
placeQueryAutocomplete(request) { | ||
return queryautocomplete_1.placeQueryAutocomplete(request, this.axiosInstance); | ||
return (0, queryautocomplete_1.placeQueryAutocomplete)(request, this.axiosInstance); | ||
} | ||
textSearch(request) { | ||
return textsearch_1.textSearch(request, this.axiosInstance); | ||
return (0, textsearch_1.textSearch)(request, this.axiosInstance); | ||
} | ||
nearestRoads(request) { | ||
return nearestroads_1.nearestRoads(request, this.axiosInstance); | ||
return (0, nearestroads_1.nearestRoads)(request, this.axiosInstance); | ||
} | ||
snapToRoads(request) { | ||
return snaptoroads_1.snapToRoads(request, this.axiosInstance); | ||
return (0, snaptoroads_1.snapToRoads)(request, this.axiosInstance); | ||
} | ||
@@ -163,0 +164,0 @@ } |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/directions/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ | ||
origin: serialize_1.latLngToString, | ||
@@ -36,0 +36,0 @@ destination: serialize_1.latLngToString, |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/distancematrix/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ | ||
origins: o => o.map(serialize_1.latLngToString), | ||
@@ -36,0 +36,0 @@ destinations: o => o.map(serialize_1.latLngToString), |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/elevation/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ | ||
locations: o => o.map(serialize_1.latLngToString), | ||
@@ -36,0 +36,0 @@ path: o => o.map(serialize_1.latLngToString) |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/geocode/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ | ||
bounds: serialize_1.latLngBoundsToString, | ||
@@ -36,0 +36,0 @@ components: serialize_1.objectToString |
@@ -51,3 +51,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/geocode/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ | ||
latlng: serialize_1.latLngToString | ||
@@ -54,0 +54,0 @@ }, exports.defaultUrl); |
@@ -16,20 +16,19 @@ /** | ||
*/ | ||
export declare const version: any; | ||
export { DirectionsRequest, DirectionsResponse } from "./directions"; | ||
export { DistanceMatrixRequest, DistanceMatrixResponse } from "./distance"; | ||
export { ElevationRequest, ElevationResponse } from "./elevation"; | ||
export { FindPlaceFromTextRequest, FindPlaceFromTextResponse } from "./places/findplacefromtext"; | ||
export { GeocodeRequest, GeocodeResponse } from "./geocode/geocode"; | ||
export { GeolocateRequest, GeolocateResponse } from "./geolocate"; | ||
export { NearestRoadsRequest, NearestRoadsResponse } from "./roads/nearestroads"; | ||
export { PlaceAutocompleteRequest, PlaceAutocompleteResponse, PlaceAutocompleteResult, PlaceAutocompleteType } from "./places/autocomplete"; | ||
export { PlaceDetailsRequest, PlaceDetailsResponse } from "./places/details"; | ||
export { DirectionsRequest, DirectionsResponse, DirectionsResponseData, } from "./directions"; | ||
export { DistanceMatrixRequest, DistanceMatrixResponse, DistanceMatrixResponseData, } from "./distance"; | ||
export { ElevationRequest, ElevationResponse, PositionalElevationParams, SampledPathElevationParams, ElevationResponseData, } from "./elevation"; | ||
export { FindPlaceFromTextRequest, FindPlaceFromTextResponse, FindPlaceFromTextResponseData, } from "./places/findplacefromtext"; | ||
export { GeocodeRequest, GeocodeResponse, GeocodeResponseData, GeocodeComponents, } from "./geocode/geocode"; | ||
export { GeolocateRequest, GeolocateResponse, GeolocateResponseSuccess, GeolocateResponseError, GeolocateResponseData, GeolocateErrorReason, } from "./geolocate"; | ||
export { NearestRoadsRequest, NearestRoadsResponse, } from "./roads/nearestroads"; | ||
export { PlaceAutocompleteRequest, PlaceAutocompleteResponse, PlaceAutocompleteResult, PlaceAutocompleteType, PlaceAutocompleteResponseData, } from "./places/autocomplete"; | ||
export { PlaceDetailsRequest, PlaceDetailsResponse, PlaceDetailsResponseData, } from "./places/details"; | ||
export { PlacePhotoRequest, PlacePhotoResponse } from "./places/photo"; | ||
export { PlaceQueryAutocompleteRequest, PlaceQueryAutocompleteResponse } from "./places/queryautocomplete"; | ||
export { PlacesNearbyRequest, PlacesNearbyResponse } from "./places/placesnearby"; | ||
export { ReverseGeocodeRequest, ReverseGeocodeResponse } from "./geocode/reversegeocode"; | ||
export { PlaceQueryAutocompleteRequest, PlaceQueryAutocompleteResponse, PlaceQueryAutocompleteResponseData, PlaceQueryAutocompletePrediction, } from "./places/queryautocomplete"; | ||
export { PlacesNearbyRequest, PlacesNearbyResponse, PlacesNearbyResponseData, PlacesNearbyRanking, } from "./places/placesnearby"; | ||
export { ReverseGeocodeRequest, ReverseGeocodeResponse, ReverseGeocodeResponseData, ReverseGeocodingLocationType, } from "./geocode/reversegeocode"; | ||
export { SnapToRoadsRequest, SnapToRoadsResponse } from "./roads/snaptoroads"; | ||
export { TextSearchRequest, TextSearchResponse } from "./places/textsearch"; | ||
export { TimeZoneRequest, TimeZoneResponse } from "./timezone"; | ||
export { TextSearchRequest, TextSearchResponse, TextSearchResponseData, } from "./places/textsearch"; | ||
export { TimeZoneRequest, TimeZoneResponse, TimeZoneResponseData, } from "./timezone"; | ||
export * from "./common"; | ||
export * from "./client"; |
@@ -25,12 +25,16 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = void 0; | ||
// Cannot be `import` as it's not under TS root dir | ||
exports.version = require("../package.json").version; | ||
exports.ReverseGeocodingLocationType = exports.PlacesNearbyRanking = exports.PlaceAutocompleteType = exports.GeolocateErrorReason = void 0; | ||
var geolocate_1 = require("./geolocate"); | ||
Object.defineProperty(exports, "GeolocateErrorReason", { enumerable: true, get: function () { return geolocate_1.GeolocateErrorReason; } }); | ||
var autocomplete_1 = require("./places/autocomplete"); | ||
Object.defineProperty(exports, "PlaceAutocompleteType", { enumerable: true, get: function () { return autocomplete_1.PlaceAutocompleteType; } }); | ||
var placesnearby_1 = require("./places/placesnearby"); | ||
Object.defineProperty(exports, "PlacesNearbyRanking", { enumerable: true, get: function () { return placesnearby_1.PlacesNearbyRanking; } }); | ||
var reversegeocode_1 = require("./geocode/reversegeocode"); | ||
Object.defineProperty(exports, "ReverseGeocodingLocationType", { enumerable: true, get: function () { return reversegeocode_1.ReverseGeocodingLocationType; } }); | ||
__exportStar(require("./common"), exports); | ||
__exportStar(require("./client"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -60,3 +60,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/place/autocomplete/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ | ||
location: serialize_1.latLngToString, | ||
@@ -63,0 +63,0 @@ origin: serialize_1.latLngToString |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/place/details/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({}, exports.defaultUrl, { arrayFormat: "comma" }); | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({}, exports.defaultUrl, { arrayFormat: "comma" }); | ||
function placeDetails(_a, axiosInstance = client_1.defaultAxiosInstance) { | ||
@@ -36,0 +36,0 @@ var { params, method = "get", url = exports.defaultUrl, paramsSerializer = exports.defaultParamsSerializer } = _a, config = __rest(_a, ["params", "method", "url", "paramsSerializer"]); |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/place/findplacefromtext/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({}, exports.defaultUrl, { arrayFormat: "comma" }); | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({}, exports.defaultUrl, { arrayFormat: "comma" }); | ||
function findPlaceFromText(_a, axiosInstance = client_1.defaultAxiosInstance) { | ||
@@ -36,0 +36,0 @@ var { params, method = "get", url = exports.defaultUrl, paramsSerializer = exports.defaultParamsSerializer } = _a, config = __rest(_a, ["params", "method", "url", "paramsSerializer"]); |
@@ -46,3 +46,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/place/nearbysearch/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ location: serialize_1.latLngToString }, exports.defaultUrl); | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ location: serialize_1.latLngToString }, exports.defaultUrl); | ||
function placesNearby(_a, axiosInstance = client_1.defaultAxiosInstance) { | ||
@@ -49,0 +49,0 @@ var { params, method = "get", url = exports.defaultUrl, paramsSerializer = exports.defaultParamsSerializer } = _a, config = __rest(_a, ["params", "method", "url", "paramsSerializer"]); |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/place/queryautocomplete/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ location: serialize_1.latLngToString }, exports.defaultUrl); | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ location: serialize_1.latLngToString }, exports.defaultUrl); | ||
function placeQueryAutocomplete(_a, axiosInstance = client_1.defaultAxiosInstance) { | ||
@@ -36,0 +36,0 @@ var { params, method = "get", url = exports.defaultUrl, paramsSerializer = exports.defaultParamsSerializer } = _a, config = __rest(_a, ["params", "method", "url", "paramsSerializer"]); |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/place/textsearch/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ location: serialize_1.latLngToString }, exports.defaultUrl); | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ location: serialize_1.latLngToString }, exports.defaultUrl); | ||
function textSearch(_a, axiosInstance = client_1.defaultAxiosInstance) { | ||
@@ -36,0 +36,0 @@ var { params, method = "get", url = exports.defaultUrl, paramsSerializer = exports.defaultParamsSerializer } = _a, config = __rest(_a, ["params", "method", "url", "paramsSerializer"]); |
@@ -33,4 +33,4 @@ "use strict"; | ||
exports.defaultUrl = "https://roads.googleapis.com/v1/nearestRoads"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
points: o => o.map(latLng => serialize_1.latLngToString(latLng)) | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ | ||
points: o => o.map(latLng => (0, serialize_1.latLngToString)(latLng)) | ||
}, exports.defaultUrl); | ||
@@ -37,0 +37,0 @@ function nearestRoads(_a, axiosInstance = client_1.defaultAxiosInstance) { |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://roads.googleapis.com/v1/snapToRoads"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ | ||
path: o => o.map(serialize_1.latLngToString) | ||
@@ -36,0 +36,0 @@ }, exports.defaultUrl); |
@@ -94,3 +94,3 @@ "use strict"; | ||
const concatenated = o.map(latLngToString).join(separator); | ||
const encoded = `enc:${util_1.encodePath(o.map(toLatLngLiteral))}`; | ||
const encoded = `enc:${(0, util_1.encodePath)(o.map(toLatLngLiteral))}`; | ||
if (encoded.length < concatenated.length) { | ||
@@ -118,3 +118,3 @@ return encoded; | ||
} | ||
return query_string_1.stringify(serializedParams, queryStringOptions); | ||
return (0, query_string_1.stringify)(serializedParams, queryStringOptions); | ||
}; | ||
@@ -138,3 +138,3 @@ } | ||
delete serializedParams.client_secret; | ||
const partialQueryString = query_string_1.stringify(serializedParams, queryStringOptions); | ||
const partialQueryString = (0, query_string_1.stringify)(serializedParams, queryStringOptions); | ||
const unsignedUrl = `${baseUrl}?${partialQueryString}`; | ||
@@ -155,3 +155,3 @@ const signature = createPremiumPlanSignature(unsignedUrl, clientSecret); | ||
// Sign the url with the decoded secret | ||
const unsafeSignature = crypto_1.createHmac("sha1", decodedSecret).update(pathAndQuery).digest("base64"); | ||
const unsafeSignature = (0, crypto_1.createHmac)("sha1", decodedSecret).update(pathAndQuery).digest("base64"); | ||
// Convert from true base64 to 'web safe' base64 | ||
@@ -158,0 +158,0 @@ return unsafeSignature.replace(/\+/g, "-").replace(/\//g, "_"); |
@@ -33,3 +33,3 @@ "use strict"; | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/timezone/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
exports.defaultParamsSerializer = (0, serialize_1.serializer)({ | ||
timestamp: serialize_1.toTimestamp, | ||
@@ -36,0 +36,0 @@ location: serialize_1.latLngToString |
{ | ||
"name": "@googlemaps/google-maps-services-js", | ||
"version": "3.2.1", | ||
"version": "3.2.2", | ||
"description": "Node.js client library for Google Maps API Web Services", | ||
@@ -49,20 +49,14 @@ "keywords": [ | ||
"crypto": "^1.0.1", | ||
"query-string": "^6.11.0", | ||
"query-string": "^7.0.1", | ||
"retry-axios": "^2.2.1" | ||
}, | ||
"devDependencies": { | ||
"@semantic-release/changelog": "^5.0.0", | ||
"@semantic-release/git": "^9.0.0", | ||
"@semantic-release/github": "^7.0.3", | ||
"@semantic-release/release-notes-generator": "^9.0.1", | ||
"@types/jest": "^26.0.10", | ||
"@types/node": "^14.6.0", | ||
"codecov": ">=3.6.5", | ||
"jest": "^25.2.2", | ||
"@types/jest": "^27.0.0", | ||
"@types/node": "^16.9.6", | ||
"jest": "^27.0.0", | ||
"nock": "^13.0.4", | ||
"prettier": "^2.0.5", | ||
"semantic-release": "^17.0.2", | ||
"ts-jest": "^25.2.1", | ||
"typedoc": "^0.20.10", | ||
"typescript": "^3.7.4" | ||
"ts-jest": "^27.0.5", | ||
"typedoc": "^0.22.4", | ||
"typescript": "^4.0.0" | ||
}, | ||
@@ -72,12 +66,3 @@ "publishConfig": { | ||
"access": "public" | ||
}, | ||
"release": { | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
"@semantic-release/github" | ||
] | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
307512
8
5213
69
+ Addedquery-string@7.1.3(transitive)
- Removedquery-string@6.14.1(transitive)
Updatedquery-string@^7.0.1