@wemap/routers 13.0.0 → 13.1.1
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.
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +120 -0
- package/dist/index.mjs.map +1 -1
- package/dist/src/graph/Edge.d.ts +1 -1
- package/dist/src/model/Step.d.ts +1 -1
- package/dist/src/remote/RemoteRouterManager.d.ts +11 -12
- package/dist/src/remote/tictactrip/TictactripRemoteRouter.d.ts +18 -0
- package/dist/src/remote/tictactrip/type.d.ts +73 -0
- package/package.json +4 -4
package/dist/src/graph/Edge.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Level_t } from '@wemap/geo';
|
|
|
2
2
|
import { default as Vertex } from './Vertex.js';
|
|
3
3
|
export type EdgeSmoothness = 'excellent' | 'good' | 'intermediate' | 'bad' | 'horrible';
|
|
4
4
|
export type EdgeSurface = 'asphalt' | 'compacted' | 'concrete' | 'grass' | 'gravel' | 'ground' | 'metal' | 'paving_stones' | 'wood';
|
|
5
|
-
export type EdgeWheelchair = 'yes' | 'no' | 'designated';
|
|
5
|
+
export type EdgeWheelchair = 'yes' | 'no' | 'limited' | 'designated';
|
|
6
6
|
export type EdgeProperties = {
|
|
7
7
|
name?: string;
|
|
8
8
|
externalId?: string | number;
|
package/dist/src/model/Step.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ interface BaseStep {
|
|
|
27
27
|
}
|
|
28
28
|
interface VerticalStep extends BaseStep {
|
|
29
29
|
type: VerticalStepType | null;
|
|
30
|
-
direction: VerticalDirection
|
|
30
|
+
direction: VerticalDirection;
|
|
31
31
|
}
|
|
32
32
|
interface HorizontalStep extends BaseStep {
|
|
33
33
|
type: HorizontalStepType | null;
|
|
@@ -53,9 +53,6 @@ declare const remoteRouters: readonly [{
|
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
55
|
Arrival: {
|
|
56
|
-
/**
|
|
57
|
-
* Singleton
|
|
58
|
-
*/
|
|
59
56
|
Time: string;
|
|
60
57
|
Site: {
|
|
61
58
|
Name: string;
|
|
@@ -118,9 +115,6 @@ declare const remoteRouters: readonly [{
|
|
|
118
115
|
};
|
|
119
116
|
};
|
|
120
117
|
Arrival: {
|
|
121
|
-
/**
|
|
122
|
-
* Singleton
|
|
123
|
-
*/
|
|
124
118
|
Time: string;
|
|
125
119
|
Site: {
|
|
126
120
|
Name: string;
|
|
@@ -561,14 +555,14 @@ declare const remoteRouters: readonly [{
|
|
|
561
555
|
distance: number;
|
|
562
556
|
duration: number;
|
|
563
557
|
steps: {
|
|
564
|
-
/**
|
|
565
|
-
* Singleton
|
|
566
|
-
*/
|
|
567
558
|
geometry: import('geojson').LineString;
|
|
568
559
|
distance: number;
|
|
569
560
|
duration: number;
|
|
570
561
|
name?: string | undefined;
|
|
571
562
|
maneuver: {
|
|
563
|
+
/**
|
|
564
|
+
* Singleton
|
|
565
|
+
*/
|
|
572
566
|
bearing_before: number;
|
|
573
567
|
bearing_after: number;
|
|
574
568
|
location: import('geojson').Position;
|
|
@@ -594,14 +588,14 @@ declare const remoteRouters: readonly [{
|
|
|
594
588
|
distance: number;
|
|
595
589
|
duration: number;
|
|
596
590
|
steps: {
|
|
597
|
-
/**
|
|
598
|
-
* Singleton
|
|
599
|
-
*/
|
|
600
591
|
geometry: import('geojson').LineString;
|
|
601
592
|
distance: number;
|
|
602
593
|
duration: number;
|
|
603
594
|
name?: string | undefined;
|
|
604
595
|
maneuver: {
|
|
596
|
+
/**
|
|
597
|
+
* Singleton
|
|
598
|
+
*/
|
|
605
599
|
bearing_before: number;
|
|
606
600
|
bearing_after: number;
|
|
607
601
|
location: import('geojson').Position;
|
|
@@ -715,6 +709,11 @@ declare const remoteRouters: readonly [{
|
|
|
715
709
|
}[];
|
|
716
710
|
};
|
|
717
711
|
}): import('../model/Itinerary.js').default[];
|
|
712
|
+
}, {
|
|
713
|
+
readonly rname: "tictactrip";
|
|
714
|
+
getItineraries(endpointUrl: string, routerRequest: RouterRequest): Promise<import('../model/Itinerary.js').default[]>;
|
|
715
|
+
getBodyParams(routerRequest: RouterRequest): import('./tictactrip/type.js').TictactripRequest;
|
|
716
|
+
parseResponse(json: import('./tictactrip/type.js').TictactripResponse): import('../model/Itinerary.js').default[];
|
|
718
717
|
}, {
|
|
719
718
|
readonly rname: "wemap-multi";
|
|
720
719
|
getItineraries(endpointUrl: string, routerRequest: Omit<RouterRequest, "origin" | "destination" | "waypoints"> & {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as Itinerary } from '../../model/Itinerary.js';
|
|
2
|
+
import { default as RemoteRouter } from '../RemoteRouter.js';
|
|
3
|
+
import { RouterRequest } from '../../model/RouterRequest.js';
|
|
4
|
+
import { TictactripResponse, TictactripRequest } from './type.js';
|
|
5
|
+
/**
|
|
6
|
+
* Singleton.
|
|
7
|
+
*/
|
|
8
|
+
declare class TictactripRemoteRouter extends RemoteRouter {
|
|
9
|
+
/**
|
|
10
|
+
* @override
|
|
11
|
+
*/
|
|
12
|
+
get rname(): "tictactrip";
|
|
13
|
+
getItineraries(endpointUrl: string, routerRequest: RouterRequest): Promise<Itinerary[]>;
|
|
14
|
+
getBodyParams(routerRequest: RouterRequest): TictactripRequest;
|
|
15
|
+
parseResponse(json: TictactripResponse): Itinerary[];
|
|
16
|
+
}
|
|
17
|
+
declare const _default: TictactripRemoteRouter;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
export type TictactripRequest = {
|
|
2
|
+
origin: {
|
|
3
|
+
latitude: number;
|
|
4
|
+
longitude: number;
|
|
5
|
+
};
|
|
6
|
+
destination: {
|
|
7
|
+
latitude: number;
|
|
8
|
+
longitude: number;
|
|
9
|
+
};
|
|
10
|
+
outbound_date: string;
|
|
11
|
+
passengers: {
|
|
12
|
+
age: number;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
export interface TictactripProvider {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
company: string;
|
|
19
|
+
transportType: string;
|
|
20
|
+
}
|
|
21
|
+
export interface TictactripLocation {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
city: string;
|
|
25
|
+
region: string;
|
|
26
|
+
country: string;
|
|
27
|
+
address: string;
|
|
28
|
+
latitude: number;
|
|
29
|
+
longitude: number;
|
|
30
|
+
}
|
|
31
|
+
export interface TictactripSegment {
|
|
32
|
+
id: string;
|
|
33
|
+
provider: TictactripProvider;
|
|
34
|
+
origin: TictactripLocation;
|
|
35
|
+
destination: TictactripLocation;
|
|
36
|
+
priceCents: number;
|
|
37
|
+
durationMinutes: number;
|
|
38
|
+
departureUTC: number;
|
|
39
|
+
arrivalUTC: number;
|
|
40
|
+
originOffset: string;
|
|
41
|
+
destinationOffset: string;
|
|
42
|
+
arrivalLocalISO: string;
|
|
43
|
+
departureLocalISO: string;
|
|
44
|
+
transportType: 'bus' | 'train';
|
|
45
|
+
vehicleIdentifier: string;
|
|
46
|
+
co2g: number;
|
|
47
|
+
bookingClass: string;
|
|
48
|
+
fareName: string;
|
|
49
|
+
notAvailableReason: string | null;
|
|
50
|
+
includedBaggage: boolean;
|
|
51
|
+
}
|
|
52
|
+
export interface TictactripTrip {
|
|
53
|
+
id: string;
|
|
54
|
+
direction: string;
|
|
55
|
+
origin: TictactripLocation;
|
|
56
|
+
destination: TictactripLocation;
|
|
57
|
+
available: boolean;
|
|
58
|
+
priceCents: number;
|
|
59
|
+
durationMinutes: number;
|
|
60
|
+
departureUTC: number;
|
|
61
|
+
arrivalUTC: number;
|
|
62
|
+
originOffset: string;
|
|
63
|
+
isIdentityDocumentRequired: boolean;
|
|
64
|
+
arrivalLocalISO: string;
|
|
65
|
+
departureLocalISO: string;
|
|
66
|
+
destinationOffset: string;
|
|
67
|
+
transportType: 'TRAIN' | 'BUS' | 'MULTIMODAL';
|
|
68
|
+
providers: TictactripProvider[];
|
|
69
|
+
segments: TictactripSegment[];
|
|
70
|
+
}
|
|
71
|
+
export type TictactripResponse = {
|
|
72
|
+
trips: Record<string, TictactripTrip>;
|
|
73
|
+
};
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/routers"
|
|
13
13
|
},
|
|
14
14
|
"name": "@wemap/routers",
|
|
15
|
-
"version": "13.
|
|
15
|
+
"version": "13.1.1",
|
|
16
16
|
"bugs": {
|
|
17
17
|
"url": "https://github.com/wemap/wemap-modules-js/issues"
|
|
18
18
|
},
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"@turf/convex": "^6.5.0",
|
|
35
35
|
"@turf/helpers": "^6.5.0",
|
|
36
36
|
"@types/mapbox__polyline": "^1.0.2",
|
|
37
|
-
"@wemap/geo": "^13.
|
|
37
|
+
"@wemap/geo": "^13.1.0",
|
|
38
38
|
"@wemap/logger": "^13.0.0",
|
|
39
39
|
"@wemap/maths": "^13.0.0",
|
|
40
|
-
"@wemap/osm": "^13.
|
|
40
|
+
"@wemap/osm": "^13.1.1",
|
|
41
41
|
"@wemap/salesman.js": "^2.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"types": "./dist/helpers/*.d.ts"
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "3952cee175654450c2f0c89219c17aaeb7c70395"
|
|
66
66
|
}
|