@types/mapbox__mapbox-sdk 0.13.6 → 0.13.7
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/LICENSE +0 -0
- mapbox__mapbox-sdk/README.md +1 -1
- mapbox__mapbox-sdk/index.d.ts +169 -151
- mapbox__mapbox-sdk/package.json +3 -3
mapbox__mapbox-sdk/LICENSE
CHANGED
|
File without changes
|
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: Wed, 27 Sep 2023 09:42:15 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
|
* Global values: none
|
|
14
14
|
|
mapbox__mapbox-sdk/index.d.ts
CHANGED
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
/// <reference types="node" />
|
|
12
12
|
|
|
13
13
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
14
|
-
declare module
|
|
14
|
+
declare module "@mapbox/mapbox-sdk/lib/classes/mapi-client" {
|
|
15
15
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
16
|
-
import { MapiRequest, MapiRequestOptions } from
|
|
16
|
+
import { MapiRequest, MapiRequestOptions } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
17
17
|
export default class MapiClient {
|
|
18
18
|
constructor(config: SdkConfig);
|
|
19
19
|
accessToken: string;
|
|
@@ -28,13 +28,13 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-client' {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
31
|
-
declare module
|
|
31
|
+
declare module "@mapbox/mapbox-sdk/lib/classes/mapi-request" {
|
|
32
32
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
33
|
-
import { MapiResponse } from
|
|
33
|
+
import { MapiResponse } from "@mapbox/mapbox-sdk/lib/classes/mapi-response";
|
|
34
34
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
35
|
-
import MapiClient from
|
|
35
|
+
import MapiClient from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
36
36
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
37
|
-
import { MapiError } from
|
|
37
|
+
import { MapiError } from "@mapbox/mapbox-sdk/lib/classes/mapi-error";
|
|
38
38
|
|
|
39
39
|
interface EventEmitter<T> {
|
|
40
40
|
response: MapiResponse<T>;
|
|
@@ -83,7 +83,7 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-request' {
|
|
|
83
83
|
/**
|
|
84
84
|
* The method to send the `file`. Options are `data` (x-www-form-urlencoded) or `form` (multipart/form-data)
|
|
85
85
|
*/
|
|
86
|
-
sendFileAs:
|
|
86
|
+
sendFileAs: "data" | "form";
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
type MapiRequest<T = any> = MapiRequestOptions & {
|
|
@@ -128,15 +128,15 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-request' {
|
|
|
128
128
|
|
|
129
129
|
type Coordinates = [number, number];
|
|
130
130
|
|
|
131
|
-
type MapboxProfile =
|
|
131
|
+
type MapboxProfile = "driving" | "walking" | "cycling" | "driving-traffic";
|
|
132
132
|
|
|
133
|
-
type DirectionsApproach =
|
|
133
|
+
type DirectionsApproach = "unrestricted" | "curb";
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
137
|
-
declare module
|
|
137
|
+
declare module "@mapbox/mapbox-sdk/lib/classes/mapi-response" {
|
|
138
138
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
139
|
-
import { MapiRequest } from
|
|
139
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
140
140
|
|
|
141
141
|
interface MapiResponse<T = any> {
|
|
142
142
|
/**
|
|
@@ -169,9 +169,9 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-response' {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
172
|
-
declare module
|
|
172
|
+
declare module "@mapbox/mapbox-sdk/lib/classes/mapi-error" {
|
|
173
173
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
174
|
-
import { MapiRequest } from
|
|
174
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
175
175
|
|
|
176
176
|
interface MapiError<T = any> {
|
|
177
177
|
/**
|
|
@@ -199,11 +199,11 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-error' {
|
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
202
|
-
declare module
|
|
202
|
+
declare module "@mapbox/mapbox-sdk/services/datasets" {
|
|
203
203
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
204
|
-
import { MapiRequest } from
|
|
204
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
205
205
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
206
|
-
import MapiClient, { SdkConfig } from
|
|
206
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
207
207
|
|
|
208
208
|
/*********************************************************************************************************************
|
|
209
209
|
* Datasets Types
|
|
@@ -214,7 +214,7 @@ declare module '@mapbox/mapbox-sdk/services/datasets' {
|
|
|
214
214
|
/**
|
|
215
215
|
* List datasets in your account.
|
|
216
216
|
*/
|
|
217
|
-
listDatasets(config?: { sortby?:
|
|
217
|
+
listDatasets(config?: { sortby?: "created" | "modified" | undefined }): MapiRequest;
|
|
218
218
|
/**
|
|
219
219
|
* Create a new, empty dataset.
|
|
220
220
|
* @param config Object
|
|
@@ -229,7 +229,9 @@ declare module '@mapbox/mapbox-sdk/services/datasets' {
|
|
|
229
229
|
* Update user-defined properties of a dataset's metadata.
|
|
230
230
|
* @param config
|
|
231
231
|
*/
|
|
232
|
-
updateMetadata(
|
|
232
|
+
updateMetadata(
|
|
233
|
+
config: { datasetId?: string | undefined; name?: string | undefined; description?: string | undefined },
|
|
234
|
+
): MapiRequest;
|
|
233
235
|
/**
|
|
234
236
|
* Delete a dataset, including all features it contains.
|
|
235
237
|
* @param config
|
|
@@ -240,7 +242,9 @@ declare module '@mapbox/mapbox-sdk/services/datasets' {
|
|
|
240
242
|
* This endpoint supports pagination. Use MapiRequest#eachPage or manually specify the limit and start options.
|
|
241
243
|
* @param config
|
|
242
244
|
*/
|
|
243
|
-
listFeatures(
|
|
245
|
+
listFeatures(
|
|
246
|
+
config: { datasetId: string; limit?: number | undefined; start?: string | undefined },
|
|
247
|
+
): MapiRequest;
|
|
244
248
|
/**
|
|
245
249
|
* Add a feature to a dataset or update an existing one.
|
|
246
250
|
* @param config
|
|
@@ -312,65 +316,69 @@ declare module '@mapbox/mapbox-sdk/services/datasets' {
|
|
|
312
316
|
}
|
|
313
317
|
|
|
314
318
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
315
|
-
declare module
|
|
316
|
-
import * as GeoJSON from
|
|
317
|
-
import { LngLatLike } from
|
|
319
|
+
declare module "@mapbox/mapbox-sdk/services/directions" {
|
|
320
|
+
import * as GeoJSON from "geojson";
|
|
321
|
+
import { LngLatLike } from "mapbox-gl";
|
|
318
322
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
319
|
-
import MapiClient, { SdkConfig } from
|
|
323
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
320
324
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
321
325
|
import {
|
|
322
|
-
MapiRequest,
|
|
323
|
-
MapboxProfile,
|
|
324
|
-
DirectionsApproach,
|
|
325
326
|
Coordinates,
|
|
326
|
-
|
|
327
|
+
DirectionsApproach,
|
|
328
|
+
MapboxProfile,
|
|
329
|
+
MapiRequest,
|
|
330
|
+
} from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
327
331
|
|
|
328
332
|
export default function Directions(config: SdkConfig | MapiClient): DirectionsService;
|
|
329
333
|
|
|
330
334
|
interface DirectionsService {
|
|
331
|
-
getDirections(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
type
|
|
340
|
-
type
|
|
341
|
-
type
|
|
335
|
+
getDirections(
|
|
336
|
+
request: DirectionsRequest | DirectionsRequest<"polyline" | "polyline6">,
|
|
337
|
+
): MapiRequest<DirectionsResponse>;
|
|
338
|
+
getDirections(
|
|
339
|
+
request: DirectionsRequest<"geojson">,
|
|
340
|
+
): MapiRequest<DirectionsResponse<GeoJSON.MultiLineString | GeoJSON.LineString>>;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
type DirectionsAnnotation = "duration" | "distance" | "speed" | "congestion";
|
|
344
|
+
type DirectionsGeometry = "geojson" | "polyline" | "polyline6";
|
|
345
|
+
type DirectionsOverview = "full" | "simplified" | "false";
|
|
346
|
+
type DirectionsUnits = "imperial" | "metric";
|
|
347
|
+
type DirectionsSide = "left" | "right";
|
|
348
|
+
type DirectionsMode = "driving" | "ferry" | "unaccessible" | "walking" | "cycling" | "train";
|
|
349
|
+
type DirectionsClass = "toll" | "ferry" | "restricted" | "motorway" | "tunnel";
|
|
342
350
|
type ManeuverModifier =
|
|
343
|
-
|
|
|
344
|
-
|
|
|
345
|
-
|
|
|
346
|
-
|
|
|
347
|
-
|
|
|
348
|
-
|
|
|
349
|
-
|
|
|
350
|
-
|
|
|
351
|
-
|
|
|
352
|
-
|
|
|
351
|
+
| "uturn"
|
|
352
|
+
| "sharp right"
|
|
353
|
+
| "right"
|
|
354
|
+
| "slight right"
|
|
355
|
+
| "straight"
|
|
356
|
+
| "slight left"
|
|
357
|
+
| "left"
|
|
358
|
+
| "sharp left"
|
|
359
|
+
| "depart"
|
|
360
|
+
| "arrive";
|
|
353
361
|
type ManeuverType =
|
|
354
|
-
|
|
|
355
|
-
|
|
|
356
|
-
|
|
|
357
|
-
|
|
|
358
|
-
|
|
|
359
|
-
|
|
|
360
|
-
|
|
|
361
|
-
|
|
|
362
|
-
|
|
|
363
|
-
|
|
|
364
|
-
|
|
|
365
|
-
|
|
|
366
|
-
|
|
|
367
|
-
|
|
|
368
|
-
|
|
|
369
|
-
|
|
|
362
|
+
| "turn"
|
|
363
|
+
| "new name"
|
|
364
|
+
| "depart"
|
|
365
|
+
| "arrive"
|
|
366
|
+
| "merge"
|
|
367
|
+
| "on ramp"
|
|
368
|
+
| "off ramp"
|
|
369
|
+
| "fork"
|
|
370
|
+
| "end of road"
|
|
371
|
+
| "continue"
|
|
372
|
+
| "roundabout"
|
|
373
|
+
| "rotary"
|
|
374
|
+
| "roundabout turn"
|
|
375
|
+
| "notification"
|
|
376
|
+
| "exit roundabout"
|
|
377
|
+
| "exit rotary";
|
|
370
378
|
type Polyline = string;
|
|
371
379
|
type RouteGeometry = GeoJSON.LineString | GeoJSON.MultiLineString | Polyline;
|
|
372
380
|
|
|
373
|
-
interface CommonDirectionsRequest<T extends DirectionsGeometry =
|
|
381
|
+
interface CommonDirectionsRequest<T extends DirectionsGeometry = "polyline"> {
|
|
374
382
|
waypoints: DirectionsWaypoint[];
|
|
375
383
|
/**
|
|
376
384
|
* Whether to try to return alternative routes. An alternative is classified as a route that is significantly
|
|
@@ -433,19 +441,21 @@ declare module '@mapbox/mapbox-sdk/services/directions' {
|
|
|
433
441
|
|
|
434
442
|
type DirectionsProfileExclusion =
|
|
435
443
|
| {
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
444
|
+
profile: "walking";
|
|
445
|
+
exclude?: [] | undefined;
|
|
446
|
+
}
|
|
439
447
|
| {
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
448
|
+
profile: "cycling";
|
|
449
|
+
exclude?: Array<"ferry"> | undefined;
|
|
450
|
+
}
|
|
443
451
|
| {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
452
|
+
profile: "driving" | "driving-traffic";
|
|
453
|
+
exclude?: Array<"ferry" | "toll" | "motorway"> | undefined;
|
|
454
|
+
};
|
|
447
455
|
|
|
448
|
-
type DirectionsRequest<T extends DirectionsGeometry = "polyline"> =
|
|
456
|
+
type DirectionsRequest<T extends DirectionsGeometry = "polyline"> =
|
|
457
|
+
& CommonDirectionsRequest<T>
|
|
458
|
+
& DirectionsProfileExclusion;
|
|
449
459
|
|
|
450
460
|
interface Waypoint {
|
|
451
461
|
/**
|
|
@@ -473,7 +483,7 @@ declare module '@mapbox/mapbox-sdk/services/directions' {
|
|
|
473
483
|
* Values can be any number greater than 0 or the string 'unlimited'.
|
|
474
484
|
* A NoSegment error is returned if no routable road is found within the radius.
|
|
475
485
|
*/
|
|
476
|
-
radius?: number |
|
|
486
|
+
radius?: number | "unlimited" | undefined;
|
|
477
487
|
}
|
|
478
488
|
|
|
479
489
|
type DirectionsWaypoint = Waypoint & {
|
|
@@ -821,12 +831,12 @@ declare module '@mapbox/mapbox-sdk/services/directions' {
|
|
|
821
831
|
}
|
|
822
832
|
|
|
823
833
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
824
|
-
declare module
|
|
825
|
-
import { LngLatLike } from
|
|
834
|
+
declare module "@mapbox/mapbox-sdk/services/geocoding" {
|
|
835
|
+
import { LngLatLike } from "mapbox-gl";
|
|
826
836
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
827
|
-
import {
|
|
837
|
+
import { Coordinates, MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
828
838
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
829
|
-
import MapiClient, { SdkConfig } from
|
|
839
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
830
840
|
|
|
831
841
|
/*********************************************************************************************************************
|
|
832
842
|
* Geocoder Types
|
|
@@ -841,19 +851,19 @@ declare module '@mapbox/mapbox-sdk/services/geocoding' {
|
|
|
841
851
|
|
|
842
852
|
type BoundingBox = [number, number, number, number];
|
|
843
853
|
|
|
844
|
-
type GeocodeMode =
|
|
854
|
+
type GeocodeMode = "mapbox.places" | "mapbox.places-permanent";
|
|
845
855
|
|
|
846
856
|
type GeocodeQueryType =
|
|
847
|
-
|
|
|
848
|
-
|
|
|
849
|
-
|
|
|
850
|
-
|
|
|
851
|
-
|
|
|
852
|
-
|
|
|
853
|
-
|
|
|
854
|
-
|
|
|
855
|
-
|
|
|
856
|
-
|
|
|
857
|
+
| "country"
|
|
858
|
+
| "region"
|
|
859
|
+
| "postcode"
|
|
860
|
+
| "district"
|
|
861
|
+
| "place"
|
|
862
|
+
| "locality"
|
|
863
|
+
| "neighborhood"
|
|
864
|
+
| "address"
|
|
865
|
+
| "poi"
|
|
866
|
+
| "poi.landmark";
|
|
857
867
|
|
|
858
868
|
interface GeocodeRequest {
|
|
859
869
|
/**
|
|
@@ -1043,23 +1053,23 @@ declare module '@mapbox/mapbox-sdk/services/geocoding' {
|
|
|
1043
1053
|
}
|
|
1044
1054
|
|
|
1045
1055
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1046
|
-
declare module
|
|
1056
|
+
declare module "@mapbox/mapbox-sdk/services/map-matching" {
|
|
1047
1057
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1048
1058
|
import {
|
|
1049
1059
|
DirectionsAnnotation,
|
|
1050
1060
|
DirectionsGeometry,
|
|
1051
1061
|
DirectionsOverview,
|
|
1052
1062
|
Leg,
|
|
1053
|
-
} from
|
|
1063
|
+
} from "@mapbox/mapbox-sdk/services/directions";
|
|
1054
1064
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1055
1065
|
import {
|
|
1056
|
-
MapiRequest,
|
|
1057
|
-
MapboxProfile,
|
|
1058
|
-
DirectionsApproach,
|
|
1059
1066
|
Coordinates,
|
|
1060
|
-
|
|
1067
|
+
DirectionsApproach,
|
|
1068
|
+
MapboxProfile,
|
|
1069
|
+
MapiRequest,
|
|
1070
|
+
} from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1061
1071
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1062
|
-
import MapiClient, { SdkConfig } from
|
|
1072
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1063
1073
|
|
|
1064
1074
|
/*********************************************************************************************************************
|
|
1065
1075
|
* Map Matching Types
|
|
@@ -1183,15 +1193,15 @@ declare module '@mapbox/mapbox-sdk/services/map-matching' {
|
|
|
1183
1193
|
}
|
|
1184
1194
|
|
|
1185
1195
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1186
|
-
declare module
|
|
1196
|
+
declare module "@mapbox/mapbox-sdk/services/matrix" {
|
|
1187
1197
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1188
|
-
import { DirectionsAnnotation } from
|
|
1198
|
+
import { DirectionsAnnotation } from "@mapbox/mapbox-sdk/services/directions";
|
|
1189
1199
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1190
|
-
import { Point } from
|
|
1200
|
+
import { Point } from "@mapbox/mapbox-sdk/services/map-matching";
|
|
1191
1201
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1192
|
-
import {
|
|
1202
|
+
import { MapboxProfile, MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1193
1203
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1194
|
-
import MapiClient, { SdkConfig } from
|
|
1204
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1195
1205
|
|
|
1196
1206
|
/*********************************************************************************************************************
|
|
1197
1207
|
* Matrix Types
|
|
@@ -1209,8 +1219,8 @@ declare module '@mapbox/mapbox-sdk/services/matrix' {
|
|
|
1209
1219
|
interface MatrixRequest {
|
|
1210
1220
|
points: Point[];
|
|
1211
1221
|
profile?: MapboxProfile | undefined;
|
|
1212
|
-
sources?: number[] |
|
|
1213
|
-
destinations?: number[] |
|
|
1222
|
+
sources?: number[] | "all" | undefined;
|
|
1223
|
+
destinations?: number[] | "all" | undefined;
|
|
1214
1224
|
annotations?: DirectionsAnnotation[] | undefined;
|
|
1215
1225
|
}
|
|
1216
1226
|
|
|
@@ -1229,13 +1239,13 @@ declare module '@mapbox/mapbox-sdk/services/matrix' {
|
|
|
1229
1239
|
}
|
|
1230
1240
|
|
|
1231
1241
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1232
|
-
declare module
|
|
1242
|
+
declare module "@mapbox/mapbox-sdk/services/optimization" {
|
|
1233
1243
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1234
|
-
import { Waypoint } from
|
|
1244
|
+
import { Waypoint } from "@mapbox/mapbox-sdk/services/directions";
|
|
1235
1245
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1236
|
-
import {
|
|
1246
|
+
import { DirectionsApproach, MapboxProfile, MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1237
1247
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1238
|
-
import MapiClient, { SdkConfig } from
|
|
1248
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1239
1249
|
|
|
1240
1250
|
/*********************************************************************************************************************
|
|
1241
1251
|
* Optimization Types
|
|
@@ -1262,7 +1272,7 @@ declare module '@mapbox/mapbox-sdk/services/optimization' {
|
|
|
1262
1272
|
/**
|
|
1263
1273
|
* Specify the destination coordinate of the returned route. Accepts any (default) or last .
|
|
1264
1274
|
*/
|
|
1265
|
-
destination?:
|
|
1275
|
+
destination?: "any" | "last" | undefined;
|
|
1266
1276
|
/**
|
|
1267
1277
|
* Specify pick-up and drop-off locations for a trip by providing a ; delimited list of number pairs that correspond with the coordinates list.
|
|
1268
1278
|
* The first number of a pair indicates the index to the coordinate of the pick-up location in the coordinates list,
|
|
@@ -1274,7 +1284,7 @@ declare module '@mapbox/mapbox-sdk/services/optimization' {
|
|
|
1274
1284
|
/**
|
|
1275
1285
|
* The format of the returned geometry. Allowed values are: geojson (as LineString ), polyline (default, a polyline with precision 5), polyline6 (a polyline with precision 6).
|
|
1276
1286
|
*/
|
|
1277
|
-
geometries?:
|
|
1287
|
+
geometries?: "geojson" | "polyline" | "polyline6" | undefined;
|
|
1278
1288
|
/**
|
|
1279
1289
|
* The language of returned turn-by-turn text instructions. See supported languages . The default is en (English).
|
|
1280
1290
|
*/
|
|
@@ -1283,11 +1293,11 @@ declare module '@mapbox/mapbox-sdk/services/optimization' {
|
|
|
1283
1293
|
* The type of the returned overview geometry.
|
|
1284
1294
|
* Can be 'full' (the most detailed geometry available), 'simplified' (default, a simplified version of the full geometry), or 'false' (no overview geometry).
|
|
1285
1295
|
*/
|
|
1286
|
-
overview?:
|
|
1296
|
+
overview?: "full" | "simplified" | "false" | undefined;
|
|
1287
1297
|
/**
|
|
1288
1298
|
* The coordinate at which to start the returned route. Accepts any (default) or first .
|
|
1289
1299
|
*/
|
|
1290
|
-
source?:
|
|
1300
|
+
source?: "any" | "first" | undefined;
|
|
1291
1301
|
/**
|
|
1292
1302
|
* Whether to return steps and turn-by-turn instructions ( true ) or not ( false , default).
|
|
1293
1303
|
*/
|
|
@@ -1311,16 +1321,16 @@ declare module '@mapbox/mapbox-sdk/services/optimization' {
|
|
|
1311
1321
|
dropoff: number;
|
|
1312
1322
|
}
|
|
1313
1323
|
|
|
1314
|
-
type OptimizationAnnotation =
|
|
1324
|
+
type OptimizationAnnotation = "duration" | "speed" | "distance";
|
|
1315
1325
|
}
|
|
1316
1326
|
|
|
1317
1327
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1318
|
-
declare module
|
|
1319
|
-
import {
|
|
1328
|
+
declare module "@mapbox/mapbox-sdk/services/static" {
|
|
1329
|
+
import { AnyLayer, LngLatBoundsLike, LngLatLike } from "mapbox-gl";
|
|
1320
1330
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1321
|
-
import { MapiRequest } from
|
|
1331
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1322
1332
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1323
|
-
import MapiClient, { SdkConfig } from
|
|
1333
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1324
1334
|
|
|
1325
1335
|
/*********************************************************************************************************************
|
|
1326
1336
|
* Static Map Types
|
|
@@ -1342,12 +1352,12 @@ declare module '@mapbox/mapbox-sdk/services/static' {
|
|
|
1342
1352
|
height: number;
|
|
1343
1353
|
position:
|
|
1344
1354
|
| {
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
|
1355
|
+
coordinates: LngLatLike | "auto";
|
|
1356
|
+
zoom: number;
|
|
1357
|
+
bearing?: number | undefined;
|
|
1358
|
+
pitch?: number | undefined;
|
|
1359
|
+
}
|
|
1360
|
+
| "auto";
|
|
1351
1361
|
padding?: string | undefined;
|
|
1352
1362
|
overlays?: Array<CustomMarkerOverlay | SimpleMarkerOverlay | PathOverlay | GeoJsonOverlay> | undefined;
|
|
1353
1363
|
highRes?: boolean | undefined;
|
|
@@ -1376,7 +1386,7 @@ declare module '@mapbox/mapbox-sdk/services/static' {
|
|
|
1376
1386
|
coordinates: LngLatLike;
|
|
1377
1387
|
label?: string | undefined;
|
|
1378
1388
|
color?: string | undefined;
|
|
1379
|
-
size?:
|
|
1389
|
+
size?: "large" | "small" | undefined;
|
|
1380
1390
|
}
|
|
1381
1391
|
|
|
1382
1392
|
interface PathOverlay {
|
|
@@ -1410,11 +1420,11 @@ declare module '@mapbox/mapbox-sdk/services/static' {
|
|
|
1410
1420
|
}
|
|
1411
1421
|
|
|
1412
1422
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1413
|
-
declare module
|
|
1423
|
+
declare module "@mapbox/mapbox-sdk/services/styles" {
|
|
1414
1424
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1415
|
-
import { MapiRequest } from
|
|
1425
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1416
1426
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1417
|
-
import MapiClient, { SdkConfig } from
|
|
1427
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1418
1428
|
|
|
1419
1429
|
/*********************************************************************************************************************
|
|
1420
1430
|
* Style Types
|
|
@@ -1465,7 +1475,9 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1465
1475
|
* @param start
|
|
1466
1476
|
* @param ownerId
|
|
1467
1477
|
*/
|
|
1468
|
-
listStyles(
|
|
1478
|
+
listStyles(
|
|
1479
|
+
config: { start?: string | undefined; ownerId?: string | undefined; fresh?: boolean | undefined },
|
|
1480
|
+
): MapiRequest;
|
|
1469
1481
|
/**
|
|
1470
1482
|
* Add an icon to a style, or update an existing one.
|
|
1471
1483
|
* @param styleId
|
|
@@ -1486,7 +1498,9 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1486
1498
|
* @param ownerId
|
|
1487
1499
|
*/
|
|
1488
1500
|
// implicit any
|
|
1489
|
-
deleteStyleIcon(
|
|
1501
|
+
deleteStyleIcon(
|
|
1502
|
+
config: { styleId: string; iconId: string; ownerId?: string | undefined; draft?: boolean | undefined },
|
|
1503
|
+
): void;
|
|
1490
1504
|
/**
|
|
1491
1505
|
* Get a style sprite's image or JSON document.
|
|
1492
1506
|
* @param styleId
|
|
@@ -1496,7 +1510,7 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1496
1510
|
*/
|
|
1497
1511
|
getStyleSprite(config: {
|
|
1498
1512
|
styleId: string;
|
|
1499
|
-
format?:
|
|
1513
|
+
format?: "json" | "png" | undefined;
|
|
1500
1514
|
highRes?: boolean | undefined;
|
|
1501
1515
|
ownerId?: string | undefined;
|
|
1502
1516
|
draft?: boolean | undefined;
|
|
@@ -1509,7 +1523,9 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1509
1523
|
* @param end
|
|
1510
1524
|
* @param ownerId
|
|
1511
1525
|
*/
|
|
1512
|
-
getFontGlyphRange(
|
|
1526
|
+
getFontGlyphRange(
|
|
1527
|
+
config: { fonts: string[]; start: number; end: number; ownerId?: string | undefined },
|
|
1528
|
+
): MapiRequest;
|
|
1513
1529
|
/**
|
|
1514
1530
|
* Get embeddable HTML displaying a map.
|
|
1515
1531
|
* @param config
|
|
@@ -1571,12 +1587,12 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1571
1587
|
}
|
|
1572
1588
|
|
|
1573
1589
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1574
|
-
declare module
|
|
1575
|
-
import * as mapboxgl from
|
|
1590
|
+
declare module "@mapbox/mapbox-sdk/services/tilequery" {
|
|
1591
|
+
import * as mapboxgl from "mapbox-gl";
|
|
1576
1592
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1577
|
-
import {
|
|
1593
|
+
import { Coordinates, MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1578
1594
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1579
|
-
import MapiClient, { SdkConfig } from
|
|
1595
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1580
1596
|
|
|
1581
1597
|
/*********************************************************************************************************************
|
|
1582
1598
|
* Tile Query (Places) Types
|
|
@@ -1619,15 +1635,15 @@ declare module '@mapbox/mapbox-sdk/services/tilequery' {
|
|
|
1619
1635
|
layers?: string[] | undefined;
|
|
1620
1636
|
}
|
|
1621
1637
|
|
|
1622
|
-
type GeometryType =
|
|
1638
|
+
type GeometryType = "polygon" | "linestring" | "point";
|
|
1623
1639
|
}
|
|
1624
1640
|
|
|
1625
1641
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1626
|
-
declare module
|
|
1642
|
+
declare module "@mapbox/mapbox-sdk/services/tilesets" {
|
|
1627
1643
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1628
|
-
import { MapiRequest } from
|
|
1644
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1629
1645
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1630
|
-
import MapiClient, { SdkConfig } from
|
|
1646
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1631
1647
|
|
|
1632
1648
|
/*********************************************************************************************************************
|
|
1633
1649
|
* Tileset Types
|
|
@@ -1637,11 +1653,11 @@ declare module '@mapbox/mapbox-sdk/services/tilesets' {
|
|
|
1637
1653
|
interface TilesetsService {
|
|
1638
1654
|
listTilesets(config: {
|
|
1639
1655
|
ownerId: string;
|
|
1640
|
-
type?:
|
|
1656
|
+
type?: "raster" | "vector" | undefined;
|
|
1641
1657
|
limit?: number | undefined;
|
|
1642
|
-
sortBy?:
|
|
1658
|
+
sortBy?: "created" | "modified" | undefined;
|
|
1643
1659
|
start?: string | undefined;
|
|
1644
|
-
visibility?:
|
|
1660
|
+
visibility?: "public" | "private" | undefined;
|
|
1645
1661
|
}): MapiRequest;
|
|
1646
1662
|
deleteTileset(config: { tilesetId: string }): MapiRequest;
|
|
1647
1663
|
tileJSONMetadata(config: { tilesetId: string }): MapiRequest;
|
|
@@ -1651,7 +1667,9 @@ declare module '@mapbox/mapbox-sdk/services/tilesets' {
|
|
|
1651
1667
|
ownerId?: string | undefined;
|
|
1652
1668
|
}): MapiRequest;
|
|
1653
1669
|
getTilesetSource(config: { id: string; ownerId?: string | undefined }): MapiRequest;
|
|
1654
|
-
listTilesetSources(
|
|
1670
|
+
listTilesetSources(
|
|
1671
|
+
config: { ownerId?: string | undefined; limit?: number | undefined; start?: string | undefined },
|
|
1672
|
+
): MapiRequest;
|
|
1655
1673
|
deleteTilesetSource(config: { id: string; ownerId?: string | undefined }): MapiRequest;
|
|
1656
1674
|
createTileset(config: {
|
|
1657
1675
|
tilesetId: string;
|
|
@@ -1672,7 +1690,7 @@ declare module '@mapbox/mapbox-sdk/services/tilesets' {
|
|
|
1672
1690
|
tilesetJob(config: { tilesetId: string; jobId: string }): MapiRequest;
|
|
1673
1691
|
listTilesetJobs(config: {
|
|
1674
1692
|
tilesetId: string;
|
|
1675
|
-
stage?:
|
|
1693
|
+
stage?: "processing" | "queued" | "success" | "failed" | undefined;
|
|
1676
1694
|
limit?: number | undefined;
|
|
1677
1695
|
start?: string | undefined;
|
|
1678
1696
|
}): MapiRequest;
|
|
@@ -1697,11 +1715,11 @@ declare module '@mapbox/mapbox-sdk/services/tilesets' {
|
|
|
1697
1715
|
}
|
|
1698
1716
|
|
|
1699
1717
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1700
|
-
declare module
|
|
1718
|
+
declare module "@mapbox/mapbox-sdk/services/tokens" {
|
|
1701
1719
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1702
|
-
import { MapiRequest } from
|
|
1720
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1703
1721
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1704
|
-
import MapiClient, { SdkConfig } from
|
|
1722
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1705
1723
|
|
|
1706
1724
|
/*********************************************************************************************************************
|
|
1707
1725
|
* Token Types
|
|
@@ -1811,11 +1829,11 @@ declare module '@mapbox/mapbox-sdk/services/tokens' {
|
|
|
1811
1829
|
}
|
|
1812
1830
|
|
|
1813
1831
|
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1814
|
-
declare module
|
|
1832
|
+
declare module "@mapbox/mapbox-sdk/services/uploads" {
|
|
1815
1833
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1816
|
-
import { MapiRequest } from
|
|
1834
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1817
1835
|
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1818
|
-
import MapiClient, { SdkConfig } from
|
|
1836
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1819
1837
|
|
|
1820
1838
|
/*********************************************************************************************************************
|
|
1821
1839
|
* Uploads Types
|
mapbox__mapbox-sdk/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/mapbox__mapbox-sdk",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.7",
|
|
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": "7304fbf674b8aaaf797052158e9c665e6aacd03cacb2fdf514a93ba8341c1bc1",
|
|
48
|
+
"typeScriptVersion": "4.5"
|
|
49
49
|
}
|