@googlemaps/google-maps-services-js
Advanced tools
Comparing version 2.4.1 to 2.4.2
@@ -1,2 +0,2 @@ | ||
## [2.4.1](https://github.com/googlemaps/google-maps-services-js/compare/v2.4.0...v2.4.1) (2020-03-26) | ||
## [2.4.2](https://github.com/googlemaps/google-maps-services-js/compare/v2.4.1...v2.4.2) (2020-03-26) | ||
@@ -6,3 +6,3 @@ | ||
* export Request and Response types at root ([#375](https://github.com/googlemaps/google-maps-services-js/issues/375)) ([07dc482](https://github.com/googlemaps/google-maps-services-js/commit/07dc4825a9a06889094094a56a4562177f276d8c)) | ||
* serialize date to seconds and not milliseconds ([#376](https://github.com/googlemaps/google-maps-services-js/issues/376)) ([4d10f6c](https://github.com/googlemaps/google-maps-services-js/commit/4d10f6ca5217fd08f7432a31074c5f096eb5cf03)) | ||
@@ -9,0 +9,0 @@ ## [2.0.2](https://github.com/googlemaps/google-maps-services-js/compare/v2.0.1...v2.0.2) (2020-02-08) |
@@ -1,3 +0,3 @@ | ||
import { DirectionsRoute, GeocodedWaypoint, TrafficModel, TransitRoutingPreference, TravelRestriction, LatLng, Language, UnitSystem, TransitMode, TravelMode, ResponseData, RequestParams } from "./common"; | ||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios"; | ||
import { DirectionsRoute, GeocodedWaypoint, Language, LatLng, RequestParams, ResponseData, TrafficModel, TransitMode, TransitRoutingPreference, TravelMode, TravelRestriction, UnitSystem } from "./common"; | ||
export interface DirectionsRequest extends Partial<AxiosRequestConfig> { | ||
@@ -4,0 +4,0 @@ params: { |
@@ -14,4 +14,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const serialize_1 = require("./serialize"); | ||
const client_1 = require("./client"); | ||
const serialize_1 = require("./serialize"); | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/directions/json"; | ||
@@ -22,4 +22,4 @@ exports.defaultParamsSerializer = serialize_1.serializer({ | ||
waypoints: o => o.map(serialize_1.latLngToString), | ||
arrival_time: Number, | ||
departure_time: Number | ||
arrival_time: serialize_1.toTimestamp, | ||
departure_time: serialize_1.toTimestamp | ||
}); | ||
@@ -26,0 +26,0 @@ function directions(_a, axiosInstance = client_1.defaultAxiosInstance) { |
@@ -1,3 +0,3 @@ | ||
import { DistanceMatrixRow, TrafficModel, TransitRoutingPreference, TravelRestriction, LatLng, UnitSystem, TransitMode, TravelMode, ResponseData, RequestParams } from "./common"; | ||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios"; | ||
import { DistanceMatrixRow, LatLng, RequestParams, ResponseData, TrafficModel, TransitMode, TransitRoutingPreference, TravelMode, TravelRestriction, UnitSystem } from "./common"; | ||
export interface DistanceMatrixRequest extends Partial<AxiosRequestConfig> { | ||
@@ -4,0 +4,0 @@ params: { |
@@ -14,4 +14,4 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const serialize_1 = require("./serialize"); | ||
const client_1 = require("./client"); | ||
const serialize_1 = require("./serialize"); | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/distancematrix/json"; | ||
@@ -21,4 +21,4 @@ exports.defaultParamsSerializer = serialize_1.serializer({ | ||
destinations: o => o.map(serialize_1.latLngToString), | ||
arrival_time: Number, | ||
departure_time: Number | ||
arrival_time: serialize_1.toTimestamp, | ||
departure_time: serialize_1.toTimestamp | ||
}); | ||
@@ -25,0 +25,0 @@ function distancematrix(_a, axiosInstance = client_1.defaultAxiosInstance) { |
@@ -14,1 +14,2 @@ import { LatLng, LatLngBounds, LatLngLiteral } from "./common"; | ||
}) => string; | ||
export declare function toTimestamp(o: number | Date): number; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const util_1 = require("./util"); | ||
const query_string_1 = require("query-string"); | ||
const util_1 = require("./util"); | ||
const separator = "|"; | ||
@@ -97,2 +97,9 @@ function latLngToString(o) { | ||
exports.serializer = serializer; | ||
function toTimestamp(o) { | ||
if (o instanceof Date) { | ||
return Number(o) / 1000; | ||
} | ||
return o; | ||
} | ||
exports.toTimestamp = toTimestamp; | ||
//# sourceMappingURL=serialize.js.map |
@@ -1,3 +0,3 @@ | ||
import { LatLng, Language, ResponseData, RequestParams } from "./common"; | ||
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios"; | ||
import { Language, LatLng, RequestParams, ResponseData } from "./common"; | ||
export interface TimeZoneRequest extends Partial<AxiosRequestConfig> { | ||
@@ -4,0 +4,0 @@ params: { |
@@ -14,7 +14,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const serialize_1 = require("./serialize"); | ||
const client_1 = require("./client"); | ||
const serialize_1 = require("./serialize"); | ||
exports.defaultUrl = "https://maps.googleapis.com/maps/api/timezone/json"; | ||
exports.defaultParamsSerializer = serialize_1.serializer({ | ||
timestamp: Number, | ||
timestamp: serialize_1.toTimestamp, | ||
location: serialize_1.latLngToString | ||
@@ -21,0 +21,0 @@ }); |
{ | ||
"name": "@googlemaps/google-maps-services-js", | ||
"version": "2.4.1", | ||
"version": "2.4.2", | ||
"description": "Node.js client library for Google Maps API Web Services", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
229670
3406