@types/mapbox__mapbox-sdk 0.14.0 → 0.15.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.
- mapbox__mapbox-sdk/README.md +1 -1
- mapbox__mapbox-sdk/index.d.ts +102 -0
- mapbox__mapbox-sdk/package.json +3 -3
mapbox__mapbox-sdk/README.md
CHANGED
|
@@ -8,7 +8,7 @@ This package contains type definitions for @mapbox/mapbox-sdk (https://github.co
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-sdk.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 12 Jul 2024 21:35:59 GMT
|
|
12
12
|
* Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson), [@types/mapbox-gl](https://npmjs.com/package/@types/mapbox-gl), [@types/node](https://npmjs.com/package/@types/node)
|
|
13
13
|
|
|
14
14
|
# Credits
|
mapbox__mapbox-sdk/index.d.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
|
|
3
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
4
|
+
declare module "@mapbox/mapbox-sdk" {
|
|
5
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
6
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
7
|
+
|
|
8
|
+
export default function createNodeClient(config: SdkConfig): MapiClient;
|
|
9
|
+
}
|
|
10
|
+
|
|
3
11
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
4
12
|
declare module "@mapbox/mapbox-sdk/lib/classes/mapi-client" {
|
|
5
13
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
@@ -1227,6 +1235,100 @@ declare module "@mapbox/mapbox-sdk/services/geocoding-v6" {
|
|
|
1227
1235
|
}
|
|
1228
1236
|
}
|
|
1229
1237
|
|
|
1238
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1239
|
+
declare module "@mapbox/mapbox-sdk/services/isochrone" {
|
|
1240
|
+
import * as GeoJSON from "geojson";
|
|
1241
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1242
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1243
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1244
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1245
|
+
|
|
1246
|
+
export default function Isochrone(config: SdkConfig | MapiClient): IsochroneService;
|
|
1247
|
+
|
|
1248
|
+
interface IsochroneService {
|
|
1249
|
+
getContours(
|
|
1250
|
+
request: IsochroneRequest<false | undefined>,
|
|
1251
|
+
): MapiRequest<GeoJSON.FeatureCollection<GeoJSON.LineString>>;
|
|
1252
|
+
getContours(
|
|
1253
|
+
request: IsochroneRequest<true>,
|
|
1254
|
+
): MapiRequest<GeoJSON.FeatureCollection<GeoJSON.Polygon>>;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
interface IsochroneDistance {
|
|
1258
|
+
/**
|
|
1259
|
+
* The times in minutes to use for each isochrone contour. You can specify up to four contours.
|
|
1260
|
+
* Times must be in increasing order. The maximum time that can be specified is 60 minutes.
|
|
1261
|
+
* Setting minutes and meters in the same time is an error.
|
|
1262
|
+
*/
|
|
1263
|
+
minutes?: never;
|
|
1264
|
+
/**
|
|
1265
|
+
* The distances in meters to use for each isochrone contour. You can specify up to four contours.
|
|
1266
|
+
* Distances must be in increasing order. The maximum distance that can be specified is
|
|
1267
|
+
* 100000 meters. Setting minutes and meters in the same time is an error.
|
|
1268
|
+
*/
|
|
1269
|
+
meters: [number, number?, number?, number?];
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
interface IsochroneTime {
|
|
1273
|
+
/**
|
|
1274
|
+
* The times in minutes to use for each isochrone contour. You can specify up to four contours.
|
|
1275
|
+
* Times must be in increasing order. The maximum time that can be specified is 60 minutes.
|
|
1276
|
+
* Setting minutes and meters in the same time is an error.
|
|
1277
|
+
*/
|
|
1278
|
+
minutes: [number, number?, number?, number?];
|
|
1279
|
+
/**
|
|
1280
|
+
* The distances in meters to use for each isochrone contour. You can specify up to four contours.
|
|
1281
|
+
* Distances must be in increasing order. The maximum distance that can be specified is
|
|
1282
|
+
* 100000 meters. Setting minutes and meters in the same time is an error.
|
|
1283
|
+
*/
|
|
1284
|
+
meters?: never;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
type IsochroneRequest<T extends boolean | undefined = false> = (IsochroneDistance | IsochroneTime) & {
|
|
1288
|
+
/**
|
|
1289
|
+
* The colors to use for each isochrone contour, specified as hex values without a leading
|
|
1290
|
+
* `#`(for example, `ff0000` for red). If this parameter is used, there must be the same
|
|
1291
|
+
* number of colors as there are entries in contours_minutes or contours_meters. If no
|
|
1292
|
+
* colors are specified, the Isochrone API will assign a default rainbow color scheme to
|
|
1293
|
+
* the output.
|
|
1294
|
+
*/
|
|
1295
|
+
colors?: [string?, string?, string?, string?];
|
|
1296
|
+
/** A {longitude,latitude} coordinate pair around which to center the isochrone lines. */
|
|
1297
|
+
coordinates: [number, number];
|
|
1298
|
+
/**
|
|
1299
|
+
* A floating point value from 0.0 to 1.0 that can be used to remove smaller contours. The
|
|
1300
|
+
* default is 1.0. A value of 1.0 will only return the largest contour for a given time
|
|
1301
|
+
* value. A value of 0.5 drops any contours that are less than half the area of the largest
|
|
1302
|
+
* contour in the set of contours for that same time value.
|
|
1303
|
+
*
|
|
1304
|
+
* @default 1.0
|
|
1305
|
+
*/
|
|
1306
|
+
denoise?: number;
|
|
1307
|
+
/**
|
|
1308
|
+
* A positive floating point value in meters used as the tolerance for Douglas-Peucker
|
|
1309
|
+
* generalization. There is no upper bound. If no value is specified in the request, the
|
|
1310
|
+
* Isochrone API will choose the most optimized generalization to use for the request.
|
|
1311
|
+
* Note that the generalization of contours can lead to self-intersections, as well as
|
|
1312
|
+
* intersections of adjacent contours.
|
|
1313
|
+
*/
|
|
1314
|
+
generalize?: number;
|
|
1315
|
+
/**
|
|
1316
|
+
* Specify whether to return the contours as GeoJSON polygons (`true`) or linestrings
|
|
1317
|
+
* (`false`, default). When polygons=`true`, any contour that forms a ring is returned as a
|
|
1318
|
+
* polygon.
|
|
1319
|
+
*
|
|
1320
|
+
* @default false
|
|
1321
|
+
*/
|
|
1322
|
+
polygons?: T;
|
|
1323
|
+
/**
|
|
1324
|
+
* A Mapbox Directions routing profile ID.
|
|
1325
|
+
*
|
|
1326
|
+
* @default 'driving'
|
|
1327
|
+
*/
|
|
1328
|
+
profile?: "driving" | "driving-traffic" | "walking" | "cycling";
|
|
1329
|
+
};
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1230
1332
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1231
1333
|
declare module "@mapbox/mapbox-sdk/services/geocoding" {
|
|
1232
1334
|
import { LngLatLike } from "mapbox-gl";
|
mapbox__mapbox-sdk/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/mapbox__mapbox-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "TypeScript definitions for @mapbox/mapbox-sdk",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-sdk",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,6 +44,6 @@
|
|
|
44
44
|
"@types/mapbox-gl": "*",
|
|
45
45
|
"@types/node": "*"
|
|
46
46
|
},
|
|
47
|
-
"typesPublisherContentHash": "
|
|
48
|
-
"typeScriptVersion": "4.
|
|
47
|
+
"typesPublisherContentHash": "b1738034479cde9f36ebab60d799341c061bf5e9a3b97b1002db17d3ac1dcbac",
|
|
48
|
+
"typeScriptVersion": "4.8"
|
|
49
49
|
}
|