@types/mapbox__mapbox-sdk 0.13.5 → 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 +219 -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
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
/// <reference types="node" />
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
14
|
+
declare module "@mapbox/mapbox-sdk/lib/classes/mapi-client" {
|
|
15
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
16
|
+
import { MapiRequest, MapiRequestOptions } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
15
17
|
export default class MapiClient {
|
|
16
18
|
constructor(config: SdkConfig);
|
|
17
19
|
accessToken: string;
|
|
@@ -25,10 +27,14 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-client' {
|
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
import {
|
|
30
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
31
|
+
declare module "@mapbox/mapbox-sdk/lib/classes/mapi-request" {
|
|
32
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
33
|
+
import { MapiResponse } from "@mapbox/mapbox-sdk/lib/classes/mapi-response";
|
|
34
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
35
|
+
import MapiClient from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
36
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
37
|
+
import { MapiError } from "@mapbox/mapbox-sdk/lib/classes/mapi-error";
|
|
32
38
|
|
|
33
39
|
interface EventEmitter<T> {
|
|
34
40
|
response: MapiResponse<T>;
|
|
@@ -77,7 +83,7 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-request' {
|
|
|
77
83
|
/**
|
|
78
84
|
* The method to send the `file`. Options are `data` (x-www-form-urlencoded) or `form` (multipart/form-data)
|
|
79
85
|
*/
|
|
80
|
-
sendFileAs:
|
|
86
|
+
sendFileAs: "data" | "form";
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
type MapiRequest<T = any> = MapiRequestOptions & {
|
|
@@ -122,13 +128,15 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-request' {
|
|
|
122
128
|
|
|
123
129
|
type Coordinates = [number, number];
|
|
124
130
|
|
|
125
|
-
type MapboxProfile =
|
|
131
|
+
type MapboxProfile = "driving" | "walking" | "cycling" | "driving-traffic";
|
|
126
132
|
|
|
127
|
-
type DirectionsApproach =
|
|
133
|
+
type DirectionsApproach = "unrestricted" | "curb";
|
|
128
134
|
}
|
|
129
135
|
|
|
130
|
-
|
|
131
|
-
|
|
136
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
137
|
+
declare module "@mapbox/mapbox-sdk/lib/classes/mapi-response" {
|
|
138
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
139
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
132
140
|
|
|
133
141
|
interface MapiResponse<T = any> {
|
|
134
142
|
/**
|
|
@@ -160,8 +168,10 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-response' {
|
|
|
160
168
|
}
|
|
161
169
|
}
|
|
162
170
|
|
|
163
|
-
|
|
164
|
-
|
|
171
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
172
|
+
declare module "@mapbox/mapbox-sdk/lib/classes/mapi-error" {
|
|
173
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
174
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
165
175
|
|
|
166
176
|
interface MapiError<T = any> {
|
|
167
177
|
/**
|
|
@@ -188,9 +198,12 @@ declare module '@mapbox/mapbox-sdk/lib/classes/mapi-error' {
|
|
|
188
198
|
}
|
|
189
199
|
}
|
|
190
200
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
201
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
202
|
+
declare module "@mapbox/mapbox-sdk/services/datasets" {
|
|
203
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
204
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
205
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
206
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
194
207
|
|
|
195
208
|
/*********************************************************************************************************************
|
|
196
209
|
* Datasets Types
|
|
@@ -201,7 +214,7 @@ declare module '@mapbox/mapbox-sdk/services/datasets' {
|
|
|
201
214
|
/**
|
|
202
215
|
* List datasets in your account.
|
|
203
216
|
*/
|
|
204
|
-
listDatasets(config?: { sortby?:
|
|
217
|
+
listDatasets(config?: { sortby?: "created" | "modified" | undefined }): MapiRequest;
|
|
205
218
|
/**
|
|
206
219
|
* Create a new, empty dataset.
|
|
207
220
|
* @param config Object
|
|
@@ -216,7 +229,9 @@ declare module '@mapbox/mapbox-sdk/services/datasets' {
|
|
|
216
229
|
* Update user-defined properties of a dataset's metadata.
|
|
217
230
|
* @param config
|
|
218
231
|
*/
|
|
219
|
-
updateMetadata(
|
|
232
|
+
updateMetadata(
|
|
233
|
+
config: { datasetId?: string | undefined; name?: string | undefined; description?: string | undefined },
|
|
234
|
+
): MapiRequest;
|
|
220
235
|
/**
|
|
221
236
|
* Delete a dataset, including all features it contains.
|
|
222
237
|
* @param config
|
|
@@ -227,7 +242,9 @@ declare module '@mapbox/mapbox-sdk/services/datasets' {
|
|
|
227
242
|
* This endpoint supports pagination. Use MapiRequest#eachPage or manually specify the limit and start options.
|
|
228
243
|
* @param config
|
|
229
244
|
*/
|
|
230
|
-
listFeatures(
|
|
245
|
+
listFeatures(
|
|
246
|
+
config: { datasetId: string; limit?: number | undefined; start?: string | undefined },
|
|
247
|
+
): MapiRequest;
|
|
231
248
|
/**
|
|
232
249
|
* Add a feature to a dataset or update an existing one.
|
|
233
250
|
* @param config
|
|
@@ -298,63 +315,70 @@ declare module '@mapbox/mapbox-sdk/services/datasets' {
|
|
|
298
315
|
}
|
|
299
316
|
}
|
|
300
317
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
import
|
|
304
|
-
import
|
|
318
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
319
|
+
declare module "@mapbox/mapbox-sdk/services/directions" {
|
|
320
|
+
import * as GeoJSON from "geojson";
|
|
321
|
+
import { LngLatLike } from "mapbox-gl";
|
|
322
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
323
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
324
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
305
325
|
import {
|
|
306
|
-
MapiRequest,
|
|
307
|
-
MapboxProfile,
|
|
308
|
-
DirectionsApproach,
|
|
309
326
|
Coordinates,
|
|
310
|
-
|
|
327
|
+
DirectionsApproach,
|
|
328
|
+
MapboxProfile,
|
|
329
|
+
MapiRequest,
|
|
330
|
+
} from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
311
331
|
|
|
312
332
|
export default function Directions(config: SdkConfig | MapiClient): DirectionsService;
|
|
313
333
|
|
|
314
334
|
interface DirectionsService {
|
|
315
|
-
getDirections(
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
type
|
|
324
|
-
type
|
|
325
|
-
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";
|
|
326
350
|
type ManeuverModifier =
|
|
327
|
-
|
|
|
328
|
-
|
|
|
329
|
-
|
|
|
330
|
-
|
|
|
331
|
-
|
|
|
332
|
-
|
|
|
333
|
-
|
|
|
334
|
-
|
|
|
335
|
-
|
|
|
336
|
-
|
|
|
351
|
+
| "uturn"
|
|
352
|
+
| "sharp right"
|
|
353
|
+
| "right"
|
|
354
|
+
| "slight right"
|
|
355
|
+
| "straight"
|
|
356
|
+
| "slight left"
|
|
357
|
+
| "left"
|
|
358
|
+
| "sharp left"
|
|
359
|
+
| "depart"
|
|
360
|
+
| "arrive";
|
|
337
361
|
type ManeuverType =
|
|
338
|
-
|
|
|
339
|
-
|
|
|
340
|
-
|
|
|
341
|
-
|
|
|
342
|
-
|
|
|
343
|
-
|
|
|
344
|
-
|
|
|
345
|
-
|
|
|
346
|
-
|
|
|
347
|
-
|
|
|
348
|
-
|
|
|
349
|
-
|
|
|
350
|
-
|
|
|
351
|
-
|
|
|
352
|
-
|
|
|
353
|
-
|
|
|
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";
|
|
354
378
|
type Polyline = string;
|
|
355
379
|
type RouteGeometry = GeoJSON.LineString | GeoJSON.MultiLineString | Polyline;
|
|
356
380
|
|
|
357
|
-
interface CommonDirectionsRequest<T extends DirectionsGeometry =
|
|
381
|
+
interface CommonDirectionsRequest<T extends DirectionsGeometry = "polyline"> {
|
|
358
382
|
waypoints: DirectionsWaypoint[];
|
|
359
383
|
/**
|
|
360
384
|
* Whether to try to return alternative routes. An alternative is classified as a route that is significantly
|
|
@@ -417,19 +441,21 @@ declare module '@mapbox/mapbox-sdk/services/directions' {
|
|
|
417
441
|
|
|
418
442
|
type DirectionsProfileExclusion =
|
|
419
443
|
| {
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
444
|
+
profile: "walking";
|
|
445
|
+
exclude?: [] | undefined;
|
|
446
|
+
}
|
|
423
447
|
| {
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
448
|
+
profile: "cycling";
|
|
449
|
+
exclude?: Array<"ferry"> | undefined;
|
|
450
|
+
}
|
|
427
451
|
| {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
452
|
+
profile: "driving" | "driving-traffic";
|
|
453
|
+
exclude?: Array<"ferry" | "toll" | "motorway"> | undefined;
|
|
454
|
+
};
|
|
431
455
|
|
|
432
|
-
type DirectionsRequest<T extends DirectionsGeometry = "polyline"> =
|
|
456
|
+
type DirectionsRequest<T extends DirectionsGeometry = "polyline"> =
|
|
457
|
+
& CommonDirectionsRequest<T>
|
|
458
|
+
& DirectionsProfileExclusion;
|
|
433
459
|
|
|
434
460
|
interface Waypoint {
|
|
435
461
|
/**
|
|
@@ -457,7 +483,7 @@ declare module '@mapbox/mapbox-sdk/services/directions' {
|
|
|
457
483
|
* Values can be any number greater than 0 or the string 'unlimited'.
|
|
458
484
|
* A NoSegment error is returned if no routable road is found within the radius.
|
|
459
485
|
*/
|
|
460
|
-
radius?: number |
|
|
486
|
+
radius?: number | "unlimited" | undefined;
|
|
461
487
|
}
|
|
462
488
|
|
|
463
489
|
type DirectionsWaypoint = Waypoint & {
|
|
@@ -804,10 +830,13 @@ declare module '@mapbox/mapbox-sdk/services/directions' {
|
|
|
804
830
|
}
|
|
805
831
|
}
|
|
806
832
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
import {
|
|
810
|
-
|
|
833
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
834
|
+
declare module "@mapbox/mapbox-sdk/services/geocoding" {
|
|
835
|
+
import { LngLatLike } from "mapbox-gl";
|
|
836
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
837
|
+
import { Coordinates, MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
838
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
839
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
811
840
|
|
|
812
841
|
/*********************************************************************************************************************
|
|
813
842
|
* Geocoder Types
|
|
@@ -822,19 +851,19 @@ declare module '@mapbox/mapbox-sdk/services/geocoding' {
|
|
|
822
851
|
|
|
823
852
|
type BoundingBox = [number, number, number, number];
|
|
824
853
|
|
|
825
|
-
type GeocodeMode =
|
|
854
|
+
type GeocodeMode = "mapbox.places" | "mapbox.places-permanent";
|
|
826
855
|
|
|
827
856
|
type GeocodeQueryType =
|
|
828
|
-
|
|
|
829
|
-
|
|
|
830
|
-
|
|
|
831
|
-
|
|
|
832
|
-
|
|
|
833
|
-
|
|
|
834
|
-
|
|
|
835
|
-
|
|
|
836
|
-
|
|
|
837
|
-
|
|
|
857
|
+
| "country"
|
|
858
|
+
| "region"
|
|
859
|
+
| "postcode"
|
|
860
|
+
| "district"
|
|
861
|
+
| "place"
|
|
862
|
+
| "locality"
|
|
863
|
+
| "neighborhood"
|
|
864
|
+
| "address"
|
|
865
|
+
| "poi"
|
|
866
|
+
| "poi.landmark";
|
|
838
867
|
|
|
839
868
|
interface GeocodeRequest {
|
|
840
869
|
/**
|
|
@@ -1023,20 +1052,24 @@ declare module '@mapbox/mapbox-sdk/services/geocoding' {
|
|
|
1023
1052
|
}
|
|
1024
1053
|
}
|
|
1025
1054
|
|
|
1026
|
-
|
|
1055
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1056
|
+
declare module "@mapbox/mapbox-sdk/services/map-matching" {
|
|
1057
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1027
1058
|
import {
|
|
1028
1059
|
DirectionsAnnotation,
|
|
1029
1060
|
DirectionsGeometry,
|
|
1030
1061
|
DirectionsOverview,
|
|
1031
1062
|
Leg,
|
|
1032
|
-
} from
|
|
1063
|
+
} from "@mapbox/mapbox-sdk/services/directions";
|
|
1064
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1033
1065
|
import {
|
|
1034
|
-
MapiRequest,
|
|
1035
|
-
MapboxProfile,
|
|
1036
|
-
DirectionsApproach,
|
|
1037
1066
|
Coordinates,
|
|
1038
|
-
|
|
1039
|
-
|
|
1067
|
+
DirectionsApproach,
|
|
1068
|
+
MapboxProfile,
|
|
1069
|
+
MapiRequest,
|
|
1070
|
+
} from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1071
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1072
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1040
1073
|
|
|
1041
1074
|
/*********************************************************************************************************************
|
|
1042
1075
|
* Map Matching Types
|
|
@@ -1159,11 +1192,16 @@ declare module '@mapbox/mapbox-sdk/services/map-matching' {
|
|
|
1159
1192
|
}
|
|
1160
1193
|
}
|
|
1161
1194
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
import {
|
|
1166
|
-
|
|
1195
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1196
|
+
declare module "@mapbox/mapbox-sdk/services/matrix" {
|
|
1197
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1198
|
+
import { DirectionsAnnotation } from "@mapbox/mapbox-sdk/services/directions";
|
|
1199
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1200
|
+
import { Point } from "@mapbox/mapbox-sdk/services/map-matching";
|
|
1201
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1202
|
+
import { MapboxProfile, MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1203
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1204
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1167
1205
|
|
|
1168
1206
|
/*********************************************************************************************************************
|
|
1169
1207
|
* Matrix Types
|
|
@@ -1181,8 +1219,8 @@ declare module '@mapbox/mapbox-sdk/services/matrix' {
|
|
|
1181
1219
|
interface MatrixRequest {
|
|
1182
1220
|
points: Point[];
|
|
1183
1221
|
profile?: MapboxProfile | undefined;
|
|
1184
|
-
sources?: number[] |
|
|
1185
|
-
destinations?: number[] |
|
|
1222
|
+
sources?: number[] | "all" | undefined;
|
|
1223
|
+
destinations?: number[] | "all" | undefined;
|
|
1186
1224
|
annotations?: DirectionsAnnotation[] | undefined;
|
|
1187
1225
|
}
|
|
1188
1226
|
|
|
@@ -1200,10 +1238,14 @@ declare module '@mapbox/mapbox-sdk/services/matrix' {
|
|
|
1200
1238
|
}
|
|
1201
1239
|
}
|
|
1202
1240
|
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
import
|
|
1241
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1242
|
+
declare module "@mapbox/mapbox-sdk/services/optimization" {
|
|
1243
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1244
|
+
import { Waypoint } from "@mapbox/mapbox-sdk/services/directions";
|
|
1245
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1246
|
+
import { DirectionsApproach, MapboxProfile, MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1247
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1248
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1207
1249
|
|
|
1208
1250
|
/*********************************************************************************************************************
|
|
1209
1251
|
* Optimization Types
|
|
@@ -1230,7 +1272,7 @@ declare module '@mapbox/mapbox-sdk/services/optimization' {
|
|
|
1230
1272
|
/**
|
|
1231
1273
|
* Specify the destination coordinate of the returned route. Accepts any (default) or last .
|
|
1232
1274
|
*/
|
|
1233
|
-
destination?:
|
|
1275
|
+
destination?: "any" | "last" | undefined;
|
|
1234
1276
|
/**
|
|
1235
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.
|
|
1236
1278
|
* The first number of a pair indicates the index to the coordinate of the pick-up location in the coordinates list,
|
|
@@ -1242,7 +1284,7 @@ declare module '@mapbox/mapbox-sdk/services/optimization' {
|
|
|
1242
1284
|
/**
|
|
1243
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).
|
|
1244
1286
|
*/
|
|
1245
|
-
geometries?:
|
|
1287
|
+
geometries?: "geojson" | "polyline" | "polyline6" | undefined;
|
|
1246
1288
|
/**
|
|
1247
1289
|
* The language of returned turn-by-turn text instructions. See supported languages . The default is en (English).
|
|
1248
1290
|
*/
|
|
@@ -1251,11 +1293,11 @@ declare module '@mapbox/mapbox-sdk/services/optimization' {
|
|
|
1251
1293
|
* The type of the returned overview geometry.
|
|
1252
1294
|
* Can be 'full' (the most detailed geometry available), 'simplified' (default, a simplified version of the full geometry), or 'false' (no overview geometry).
|
|
1253
1295
|
*/
|
|
1254
|
-
overview?:
|
|
1296
|
+
overview?: "full" | "simplified" | "false" | undefined;
|
|
1255
1297
|
/**
|
|
1256
1298
|
* The coordinate at which to start the returned route. Accepts any (default) or first .
|
|
1257
1299
|
*/
|
|
1258
|
-
source?:
|
|
1300
|
+
source?: "any" | "first" | undefined;
|
|
1259
1301
|
/**
|
|
1260
1302
|
* Whether to return steps and turn-by-turn instructions ( true ) or not ( false , default).
|
|
1261
1303
|
*/
|
|
@@ -1279,13 +1321,16 @@ declare module '@mapbox/mapbox-sdk/services/optimization' {
|
|
|
1279
1321
|
dropoff: number;
|
|
1280
1322
|
}
|
|
1281
1323
|
|
|
1282
|
-
type OptimizationAnnotation =
|
|
1324
|
+
type OptimizationAnnotation = "duration" | "speed" | "distance";
|
|
1283
1325
|
}
|
|
1284
1326
|
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
import {
|
|
1288
|
-
|
|
1327
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1328
|
+
declare module "@mapbox/mapbox-sdk/services/static" {
|
|
1329
|
+
import { AnyLayer, LngLatBoundsLike, LngLatLike } from "mapbox-gl";
|
|
1330
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1331
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1332
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1333
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1289
1334
|
|
|
1290
1335
|
/*********************************************************************************************************************
|
|
1291
1336
|
* Static Map Types
|
|
@@ -1307,12 +1352,12 @@ declare module '@mapbox/mapbox-sdk/services/static' {
|
|
|
1307
1352
|
height: number;
|
|
1308
1353
|
position:
|
|
1309
1354
|
| {
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
|
1355
|
+
coordinates: LngLatLike | "auto";
|
|
1356
|
+
zoom: number;
|
|
1357
|
+
bearing?: number | undefined;
|
|
1358
|
+
pitch?: number | undefined;
|
|
1359
|
+
}
|
|
1360
|
+
| "auto";
|
|
1316
1361
|
padding?: string | undefined;
|
|
1317
1362
|
overlays?: Array<CustomMarkerOverlay | SimpleMarkerOverlay | PathOverlay | GeoJsonOverlay> | undefined;
|
|
1318
1363
|
highRes?: boolean | undefined;
|
|
@@ -1341,7 +1386,7 @@ declare module '@mapbox/mapbox-sdk/services/static' {
|
|
|
1341
1386
|
coordinates: LngLatLike;
|
|
1342
1387
|
label?: string | undefined;
|
|
1343
1388
|
color?: string | undefined;
|
|
1344
|
-
size?:
|
|
1389
|
+
size?: "large" | "small" | undefined;
|
|
1345
1390
|
}
|
|
1346
1391
|
|
|
1347
1392
|
interface PathOverlay {
|
|
@@ -1374,9 +1419,12 @@ declare module '@mapbox/mapbox-sdk/services/static' {
|
|
|
1374
1419
|
}
|
|
1375
1420
|
}
|
|
1376
1421
|
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1422
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1423
|
+
declare module "@mapbox/mapbox-sdk/services/styles" {
|
|
1424
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1425
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1426
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1427
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1380
1428
|
|
|
1381
1429
|
/*********************************************************************************************************************
|
|
1382
1430
|
* Style Types
|
|
@@ -1427,7 +1475,9 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1427
1475
|
* @param start
|
|
1428
1476
|
* @param ownerId
|
|
1429
1477
|
*/
|
|
1430
|
-
listStyles(
|
|
1478
|
+
listStyles(
|
|
1479
|
+
config: { start?: string | undefined; ownerId?: string | undefined; fresh?: boolean | undefined },
|
|
1480
|
+
): MapiRequest;
|
|
1431
1481
|
/**
|
|
1432
1482
|
* Add an icon to a style, or update an existing one.
|
|
1433
1483
|
* @param styleId
|
|
@@ -1448,7 +1498,9 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1448
1498
|
* @param ownerId
|
|
1449
1499
|
*/
|
|
1450
1500
|
// implicit any
|
|
1451
|
-
deleteStyleIcon(
|
|
1501
|
+
deleteStyleIcon(
|
|
1502
|
+
config: { styleId: string; iconId: string; ownerId?: string | undefined; draft?: boolean | undefined },
|
|
1503
|
+
): void;
|
|
1452
1504
|
/**
|
|
1453
1505
|
* Get a style sprite's image or JSON document.
|
|
1454
1506
|
* @param styleId
|
|
@@ -1458,7 +1510,7 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1458
1510
|
*/
|
|
1459
1511
|
getStyleSprite(config: {
|
|
1460
1512
|
styleId: string;
|
|
1461
|
-
format?:
|
|
1513
|
+
format?: "json" | "png" | undefined;
|
|
1462
1514
|
highRes?: boolean | undefined;
|
|
1463
1515
|
ownerId?: string | undefined;
|
|
1464
1516
|
draft?: boolean | undefined;
|
|
@@ -1471,7 +1523,9 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1471
1523
|
* @param end
|
|
1472
1524
|
* @param ownerId
|
|
1473
1525
|
*/
|
|
1474
|
-
getFontGlyphRange(
|
|
1526
|
+
getFontGlyphRange(
|
|
1527
|
+
config: { fonts: string[]; start: number; end: number; ownerId?: string | undefined },
|
|
1528
|
+
): MapiRequest;
|
|
1475
1529
|
/**
|
|
1476
1530
|
* Get embeddable HTML displaying a map.
|
|
1477
1531
|
* @param config
|
|
@@ -1532,10 +1586,13 @@ declare module '@mapbox/mapbox-sdk/services/styles' {
|
|
|
1532
1586
|
}
|
|
1533
1587
|
}
|
|
1534
1588
|
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
import
|
|
1538
|
-
|
|
1589
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1590
|
+
declare module "@mapbox/mapbox-sdk/services/tilequery" {
|
|
1591
|
+
import * as mapboxgl from "mapbox-gl";
|
|
1592
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1593
|
+
import { Coordinates, MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1594
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1595
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1539
1596
|
|
|
1540
1597
|
/*********************************************************************************************************************
|
|
1541
1598
|
* Tile Query (Places) Types
|
|
@@ -1578,12 +1635,15 @@ declare module '@mapbox/mapbox-sdk/services/tilequery' {
|
|
|
1578
1635
|
layers?: string[] | undefined;
|
|
1579
1636
|
}
|
|
1580
1637
|
|
|
1581
|
-
type GeometryType =
|
|
1638
|
+
type GeometryType = "polygon" | "linestring" | "point";
|
|
1582
1639
|
}
|
|
1583
1640
|
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1641
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1642
|
+
declare module "@mapbox/mapbox-sdk/services/tilesets" {
|
|
1643
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1644
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1645
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1646
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1587
1647
|
|
|
1588
1648
|
/*********************************************************************************************************************
|
|
1589
1649
|
* Tileset Types
|
|
@@ -1593,11 +1653,11 @@ declare module '@mapbox/mapbox-sdk/services/tilesets' {
|
|
|
1593
1653
|
interface TilesetsService {
|
|
1594
1654
|
listTilesets(config: {
|
|
1595
1655
|
ownerId: string;
|
|
1596
|
-
type?:
|
|
1656
|
+
type?: "raster" | "vector" | undefined;
|
|
1597
1657
|
limit?: number | undefined;
|
|
1598
|
-
sortBy?:
|
|
1658
|
+
sortBy?: "created" | "modified" | undefined;
|
|
1599
1659
|
start?: string | undefined;
|
|
1600
|
-
visibility?:
|
|
1660
|
+
visibility?: "public" | "private" | undefined;
|
|
1601
1661
|
}): MapiRequest;
|
|
1602
1662
|
deleteTileset(config: { tilesetId: string }): MapiRequest;
|
|
1603
1663
|
tileJSONMetadata(config: { tilesetId: string }): MapiRequest;
|
|
@@ -1607,7 +1667,9 @@ declare module '@mapbox/mapbox-sdk/services/tilesets' {
|
|
|
1607
1667
|
ownerId?: string | undefined;
|
|
1608
1668
|
}): MapiRequest;
|
|
1609
1669
|
getTilesetSource(config: { id: string; ownerId?: string | undefined }): MapiRequest;
|
|
1610
|
-
listTilesetSources(
|
|
1670
|
+
listTilesetSources(
|
|
1671
|
+
config: { ownerId?: string | undefined; limit?: number | undefined; start?: string | undefined },
|
|
1672
|
+
): MapiRequest;
|
|
1611
1673
|
deleteTilesetSource(config: { id: string; ownerId?: string | undefined }): MapiRequest;
|
|
1612
1674
|
createTileset(config: {
|
|
1613
1675
|
tilesetId: string;
|
|
@@ -1628,7 +1690,7 @@ declare module '@mapbox/mapbox-sdk/services/tilesets' {
|
|
|
1628
1690
|
tilesetJob(config: { tilesetId: string; jobId: string }): MapiRequest;
|
|
1629
1691
|
listTilesetJobs(config: {
|
|
1630
1692
|
tilesetId: string;
|
|
1631
|
-
stage?:
|
|
1693
|
+
stage?: "processing" | "queued" | "success" | "failed" | undefined;
|
|
1632
1694
|
limit?: number | undefined;
|
|
1633
1695
|
start?: string | undefined;
|
|
1634
1696
|
}): MapiRequest;
|
|
@@ -1652,9 +1714,12 @@ declare module '@mapbox/mapbox-sdk/services/tilesets' {
|
|
|
1652
1714
|
}
|
|
1653
1715
|
}
|
|
1654
1716
|
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1717
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1718
|
+
declare module "@mapbox/mapbox-sdk/services/tokens" {
|
|
1719
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1720
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1721
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1722
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1658
1723
|
|
|
1659
1724
|
/*********************************************************************************************************************
|
|
1660
1725
|
* Token Types
|
|
@@ -1763,9 +1828,12 @@ declare module '@mapbox/mapbox-sdk/services/tokens' {
|
|
|
1763
1828
|
}
|
|
1764
1829
|
}
|
|
1765
1830
|
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1831
|
+
// eslint-disable-next-line @definitelytyped/no-declare-current-package
|
|
1832
|
+
declare module "@mapbox/mapbox-sdk/services/uploads" {
|
|
1833
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1834
|
+
import { MapiRequest } from "@mapbox/mapbox-sdk/lib/classes/mapi-request";
|
|
1835
|
+
// eslint-disable-next-line @definitelytyped/no-self-import
|
|
1836
|
+
import MapiClient, { SdkConfig } from "@mapbox/mapbox-sdk/lib/classes/mapi-client";
|
|
1769
1837
|
|
|
1770
1838
|
/*********************************************************************************************************************
|
|
1771
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
|
}
|