c3nav 3.4.7 → 3.5.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/README.md +1 -1
- package/dist/Endpoints.d.ts +44 -0
- package/dist/Endpoints.js +165 -126
- package/dist/api/EditorAPI.d.ts +7 -5
- package/dist/api/EditorAPI.js +42 -7
- package/dist/api/LocationsAPI.d.ts +1 -1
- package/dist/api/LocationsAPI.js +3 -2
- package/dist/api/MapAPI.d.ts +16 -1
- package/dist/api/MapAPI.js +145 -0
- package/dist/api/MeshAPI.d.ts +10 -0
- package/dist/api/MeshAPI.js +64 -0
- package/dist/api/PositioningAPI.d.ts +8 -0
- package/dist/api/PositioningAPI.js +34 -0
- package/dist/api/RoutingAPI.d.ts +5 -1
- package/dist/api/RoutingAPI.js +28 -0
- package/dist/api/SessionAPI.d.ts +4 -5
- package/dist/api/SessionAPI.js +15 -7
- package/dist/api/UpdatesAPI.d.ts +2 -4
- package/dist/api/UpdatesAPI.js +9 -8
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/c3nav.d.ts +3 -1
- package/dist/c3nav.js +8 -3
- package/dist/interfaces/API.d.ts +3 -1
- package/dist/interfaces/Editor.d.ts +8 -1
- package/dist/interfaces/Map.d.ts +54 -0
- package/dist/interfaces/Map.js +2 -0
- package/dist/interfaces/Mesh.d.ts +24 -0
- package/dist/interfaces/Mesh.js +2 -0
- package/dist/interfaces/Positioning.d.ts +13 -0
- package/dist/interfaces/Positioning.js +2 -0
- package/dist/interfaces/Routing.d.ts +46 -0
- package/dist/interfaces/Session.d.ts +6 -0
- package/dist/interfaces/Updates.d.ts +3 -0
- package/dist/interfaces/index.d.ts +3 -0
- package/dist/interfaces/index.js +3 -0
- package/package.json +14 -7
|
@@ -1,2 +1,48 @@
|
|
|
1
|
+
import type { Location } from './Location';
|
|
1
2
|
export interface Routing {
|
|
3
|
+
options?: RoutingOptions;
|
|
4
|
+
report_issue_url?: string;
|
|
5
|
+
request?: RoutingRequest;
|
|
6
|
+
result?: RoutingResult;
|
|
7
|
+
}
|
|
8
|
+
export interface RoutingOptions {
|
|
9
|
+
mode: 'fastest' | 'shortest';
|
|
10
|
+
restrictions: 'avoid' | 'normal' | 'prefer';
|
|
11
|
+
walk_speed: 'default' | 'fast' | 'slow';
|
|
12
|
+
way_types: Record<string, 'allow' | 'avoid' | 'restrict'>;
|
|
13
|
+
}
|
|
14
|
+
export interface RoutingOptionsFormItem {
|
|
15
|
+
choices: Array<{
|
|
16
|
+
name: string;
|
|
17
|
+
title: string;
|
|
18
|
+
}>;
|
|
19
|
+
label: string;
|
|
20
|
+
name: string;
|
|
21
|
+
type: string;
|
|
22
|
+
value: string;
|
|
23
|
+
value_display: string;
|
|
24
|
+
}
|
|
25
|
+
export interface RoutingRequest {
|
|
26
|
+
destination: number | string;
|
|
27
|
+
options_override?: Partial<RoutingOptions>;
|
|
28
|
+
origin: number | string;
|
|
29
|
+
}
|
|
30
|
+
export interface RoutingResult {
|
|
31
|
+
destination: Location;
|
|
32
|
+
distance: number;
|
|
33
|
+
distance_str: string;
|
|
34
|
+
duration: number;
|
|
35
|
+
duration_str: string;
|
|
36
|
+
items: RoutingResultItem[];
|
|
37
|
+
options_summary?: string;
|
|
38
|
+
origin: Location;
|
|
39
|
+
summary?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface RoutingResultItem {
|
|
42
|
+
coordinates: [number, number, number];
|
|
43
|
+
descriptions?: unknown[];
|
|
44
|
+
id: number;
|
|
45
|
+
level?: Record<string, unknown>;
|
|
46
|
+
space?: Record<string, unknown>;
|
|
47
|
+
waytype?: Record<string, unknown>;
|
|
2
48
|
}
|
|
@@ -16,9 +16,12 @@ export * from './LineObstacles';
|
|
|
16
16
|
export * from './Location';
|
|
17
17
|
export * from './LocationGroupCategories';
|
|
18
18
|
export * from './LocationGroups';
|
|
19
|
+
export * from './Map';
|
|
20
|
+
export * from './Mesh';
|
|
19
21
|
export * from './Obstacles';
|
|
20
22
|
export * from './Options';
|
|
21
23
|
export * from './POIs';
|
|
24
|
+
export * from './Positioning';
|
|
22
25
|
export * from './Ramps';
|
|
23
26
|
export * from './Root';
|
|
24
27
|
export * from './Routing';
|
package/dist/interfaces/index.js
CHANGED
|
@@ -32,9 +32,12 @@ __exportStar(require("./LineObstacles"), exports);
|
|
|
32
32
|
__exportStar(require("./Location"), exports);
|
|
33
33
|
__exportStar(require("./LocationGroupCategories"), exports);
|
|
34
34
|
__exportStar(require("./LocationGroups"), exports);
|
|
35
|
+
__exportStar(require("./Map"), exports);
|
|
36
|
+
__exportStar(require("./Mesh"), exports);
|
|
35
37
|
__exportStar(require("./Obstacles"), exports);
|
|
36
38
|
__exportStar(require("./Options"), exports);
|
|
37
39
|
__exportStar(require("./POIs"), exports);
|
|
40
|
+
__exportStar(require("./Positioning"), exports);
|
|
38
41
|
__exportStar(require("./Ramps"), exports);
|
|
39
42
|
__exportStar(require("./Root"), exports);
|
|
40
43
|
__exportStar(require("./Routing"), exports);
|
package/package.json
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Florian Imdahl <git@ffflorian.de>",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"@ffflorian/api-client": "2.5.
|
|
4
|
+
"@ffflorian/api-client": "2.5.3"
|
|
5
5
|
},
|
|
6
6
|
"description": "A c3nav API client",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@types/node": "~
|
|
8
|
+
"@types/node": "~26",
|
|
9
|
+
"http-status-codes": "2.3.0",
|
|
10
|
+
"nock": "14.0.17",
|
|
9
11
|
"rimraf": "6.1.3",
|
|
10
|
-
"typedoc": "0.28.
|
|
11
|
-
"typescript": "
|
|
12
|
+
"typedoc": "0.28.20",
|
|
13
|
+
"typescript": "7.0.2",
|
|
14
|
+
"vite": "8.2.2",
|
|
15
|
+
"vitest": "5.0.0"
|
|
12
16
|
},
|
|
13
17
|
"engines": {
|
|
14
18
|
"node": ">= 21"
|
|
@@ -26,15 +30,18 @@
|
|
|
26
30
|
"license": "GPL-3.0",
|
|
27
31
|
"name": "c3nav",
|
|
28
32
|
"readme": "https://github.com/ffflorian/api-clients#readme",
|
|
29
|
-
"repository":
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/ffflorian/api-clients.git"
|
|
36
|
+
},
|
|
30
37
|
"scripts": {
|
|
31
38
|
"build": "yarn build:ts",
|
|
32
39
|
"build:ts": "tsc -p tsconfig.build.json",
|
|
33
40
|
"build:docs": "typedoc --tsconfig tsconfig.build.json --options ../../typedoc.json --out ../../docs/packages/c3nav src/index.ts",
|
|
34
41
|
"clean": "rimraf dist",
|
|
35
42
|
"dist": "yarn clean && yarn build",
|
|
36
|
-
"test": "
|
|
43
|
+
"test": "vitest"
|
|
37
44
|
},
|
|
38
45
|
"types": "dist/index.d.ts",
|
|
39
|
-
"version": "3.
|
|
46
|
+
"version": "3.5.1"
|
|
40
47
|
}
|