c3nav 3.4.6 → 3.5.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.
Files changed (134) hide show
  1. package/README.md +1 -1
  2. package/dist/Endpoints.d.ts +112 -0
  3. package/dist/Endpoints.js +276 -0
  4. package/dist/api/APIBase.d.ts +12 -0
  5. package/dist/api/APIBase.js +17 -0
  6. package/dist/api/AccessRestrictionGroupsAPI.d.ts +11 -0
  7. package/dist/api/AccessRestrictionGroupsAPI.js +37 -0
  8. package/dist/api/AccessRestrictionsAPI.d.ts +11 -0
  9. package/dist/api/AccessRestrictionsAPI.js +37 -0
  10. package/dist/api/AreasAPI.d.ts +11 -0
  11. package/dist/api/AreasAPI.js +37 -0
  12. package/dist/api/BuildingsAPI.d.ts +11 -0
  13. package/dist/api/BuildingsAPI.js +37 -0
  14. package/dist/api/ChangesetsAPI.d.ts +11 -0
  15. package/dist/api/ChangesetsAPI.js +37 -0
  16. package/dist/api/ColumnsAPI.d.ts +11 -0
  17. package/dist/api/ColumnsAPI.js +37 -0
  18. package/dist/api/CrossDescriptionsAPI.d.ts +11 -0
  19. package/dist/api/CrossDescriptionsAPI.js +37 -0
  20. package/dist/api/DoorsAPI.d.ts +11 -0
  21. package/dist/api/DoorsAPI.js +37 -0
  22. package/dist/api/EditorAPI.d.ts +13 -0
  23. package/dist/api/EditorAPI.js +72 -0
  24. package/dist/api/HolesAPI.d.ts +11 -0
  25. package/dist/api/HolesAPI.js +37 -0
  26. package/dist/api/LeaveDescriptionsAPI.d.ts +11 -0
  27. package/dist/api/LeaveDescriptionsAPI.js +37 -0
  28. package/dist/api/LevelListAPI.d.ts +11 -0
  29. package/dist/api/LevelListAPI.js +37 -0
  30. package/dist/api/LineObstaclesAPI.d.ts +11 -0
  31. package/dist/api/LineObstaclesAPI.js +37 -0
  32. package/dist/api/LocationGroupCategoriesAPI.d.ts +11 -0
  33. package/dist/api/LocationGroupCategoriesAPI.js +37 -0
  34. package/dist/api/LocationGroupsAPI.d.ts +11 -0
  35. package/dist/api/LocationGroupsAPI.js +37 -0
  36. package/dist/api/LocationsAPI.d.ts +23 -0
  37. package/dist/api/LocationsAPI.js +65 -0
  38. package/dist/api/MapAPI.d.ts +23 -0
  39. package/dist/api/MapAPI.js +173 -0
  40. package/dist/api/MeshAPI.d.ts +10 -0
  41. package/dist/api/MeshAPI.js +64 -0
  42. package/dist/api/ObstaclesAPI.d.ts +11 -0
  43. package/dist/api/ObstaclesAPI.js +37 -0
  44. package/dist/api/POIs.d.ts +11 -0
  45. package/dist/api/POIs.js +37 -0
  46. package/dist/api/PositioningAPI.d.ts +8 -0
  47. package/dist/api/PositioningAPI.js +34 -0
  48. package/dist/api/RampsAPI.d.ts +11 -0
  49. package/dist/api/RampsAPI.js +37 -0
  50. package/dist/api/RoutingAPI.d.ts +15 -0
  51. package/dist/api/RoutingAPI.js +65 -0
  52. package/dist/api/SessionAPI.d.ts +10 -0
  53. package/dist/api/SessionAPI.js +45 -0
  54. package/dist/api/SourcesAPI.d.ts +11 -0
  55. package/dist/api/SourcesAPI.js +37 -0
  56. package/dist/api/SpacesAPI.d.ts +11 -0
  57. package/dist/api/SpacesAPI.js +37 -0
  58. package/dist/api/StairsAPI.d.ts +11 -0
  59. package/dist/api/StairsAPI.js +37 -0
  60. package/dist/api/UpdatesAPI.d.ts +9 -0
  61. package/dist/api/UpdatesAPI.js +38 -0
  62. package/dist/api/index.d.ts +28 -0
  63. package/dist/api/index.js +44 -0
  64. package/dist/c3nav.d.ts +14 -0
  65. package/dist/c3nav.js +54 -0
  66. package/dist/index.d.ts +3 -0
  67. package/dist/index.js +19 -0
  68. package/dist/interfaces/API.d.ts +31 -0
  69. package/dist/interfaces/API.js +2 -0
  70. package/dist/interfaces/AccessRestrictionGroups.d.ts +2 -0
  71. package/dist/interfaces/AccessRestrictionGroups.js +2 -0
  72. package/dist/interfaces/AccessRestrictions.d.ts +2 -0
  73. package/dist/interfaces/AccessRestrictions.js +2 -0
  74. package/dist/interfaces/Areas.d.ts +2 -0
  75. package/dist/interfaces/Areas.js +2 -0
  76. package/dist/interfaces/Bounds.d.ts +3 -0
  77. package/dist/interfaces/Bounds.js +2 -0
  78. package/dist/interfaces/Buildings.d.ts +2 -0
  79. package/dist/interfaces/Buildings.js +2 -0
  80. package/dist/interfaces/Changesets.d.ts +2 -0
  81. package/dist/interfaces/Changesets.js +2 -0
  82. package/dist/interfaces/Columns.d.ts +2 -0
  83. package/dist/interfaces/Columns.js +2 -0
  84. package/dist/interfaces/CrossDescriptions.d.ts +2 -0
  85. package/dist/interfaces/CrossDescriptions.js +2 -0
  86. package/dist/interfaces/Doors.d.ts +2 -0
  87. package/dist/interfaces/Doors.js +2 -0
  88. package/dist/interfaces/Editor.d.ts +9 -0
  89. package/dist/interfaces/Editor.js +2 -0
  90. package/dist/interfaces/Holes.d.ts +2 -0
  91. package/dist/interfaces/Holes.js +2 -0
  92. package/dist/interfaces/LeaveDescriptions.d.ts +2 -0
  93. package/dist/interfaces/LeaveDescriptions.js +2 -0
  94. package/dist/interfaces/Level.d.ts +19 -0
  95. package/dist/interfaces/Level.js +2 -0
  96. package/dist/interfaces/LineObstacles.d.ts +2 -0
  97. package/dist/interfaces/LineObstacles.js +2 -0
  98. package/dist/interfaces/Location.d.ts +28 -0
  99. package/dist/interfaces/Location.js +2 -0
  100. package/dist/interfaces/LocationGroupCategories.d.ts +2 -0
  101. package/dist/interfaces/LocationGroupCategories.js +2 -0
  102. package/dist/interfaces/LocationGroups.d.ts +2 -0
  103. package/dist/interfaces/LocationGroups.js +2 -0
  104. package/dist/interfaces/Map.d.ts +54 -0
  105. package/dist/interfaces/Map.js +2 -0
  106. package/dist/interfaces/Mesh.d.ts +24 -0
  107. package/dist/interfaces/Mesh.js +2 -0
  108. package/dist/interfaces/Obstacles.d.ts +2 -0
  109. package/dist/interfaces/Obstacles.js +2 -0
  110. package/dist/interfaces/Options.d.ts +11 -0
  111. package/dist/interfaces/Options.js +2 -0
  112. package/dist/interfaces/POIs.d.ts +2 -0
  113. package/dist/interfaces/POIs.js +2 -0
  114. package/dist/interfaces/Positioning.d.ts +13 -0
  115. package/dist/interfaces/Positioning.js +2 -0
  116. package/dist/interfaces/Ramps.d.ts +2 -0
  117. package/dist/interfaces/Ramps.js +2 -0
  118. package/dist/interfaces/Root.d.ts +135 -0
  119. package/dist/interfaces/Root.js +2 -0
  120. package/dist/interfaces/Routing.d.ts +48 -0
  121. package/dist/interfaces/Routing.js +2 -0
  122. package/dist/interfaces/Session.d.ts +8 -0
  123. package/dist/interfaces/Session.js +2 -0
  124. package/dist/interfaces/Sources.d.ts +2 -0
  125. package/dist/interfaces/Sources.js +2 -0
  126. package/dist/interfaces/Spaces.d.ts +2 -0
  127. package/dist/interfaces/Spaces.js +2 -0
  128. package/dist/interfaces/Stairs.d.ts +2 -0
  129. package/dist/interfaces/Stairs.js +2 -0
  130. package/dist/interfaces/Updates.d.ts +5 -0
  131. package/dist/interfaces/Updates.js +2 -0
  132. package/dist/interfaces/index.d.ts +32 -0
  133. package/dist/interfaces/index.js +48 -0
  134. package/package.json +10 -6
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface POIs {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ export interface PositioningLocateRequest {
2
+ ibeacon_peers: Array<Record<string, unknown>>;
3
+ wifi_peers: Array<Record<string, unknown>>;
4
+ }
5
+ export interface PositioningLocateResponse {
6
+ location: null | Record<string, unknown>;
7
+ precision: null | number;
8
+ suggested_peers: PositioningPeerSuggestion[];
9
+ }
10
+ export interface PositioningPeerSuggestion {
11
+ bssid: string;
12
+ frequencies: number[];
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface Ramps {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,135 @@
1
+ export interface Root {
2
+ accessrestrictiongroups: {
3
+ detail: string;
4
+ list: string;
5
+ };
6
+ accessrestrictions: {
7
+ detail: string;
8
+ list: string;
9
+ };
10
+ areas: {
11
+ detail: string;
12
+ list: string;
13
+ };
14
+ buildings: {
15
+ detail: string;
16
+ list: string;
17
+ };
18
+ changesets: {
19
+ activate: string;
20
+ apply: string;
21
+ changes: string;
22
+ current: string;
23
+ deactivate: string;
24
+ delete: string;
25
+ detail: string;
26
+ 'direct-editing': string;
27
+ edit: string;
28
+ list: string;
29
+ 'pending-review': string;
30
+ propose: string;
31
+ reject: string;
32
+ 'restore-object': string;
33
+ review: string;
34
+ reviewing: string;
35
+ unpropose: string;
36
+ unreject: string;
37
+ user: string;
38
+ };
39
+ columns: {
40
+ detail: string;
41
+ list: string;
42
+ };
43
+ crossdescriptions: {
44
+ detail: string;
45
+ list: string;
46
+ };
47
+ doors: {
48
+ detail: string;
49
+ list: string;
50
+ };
51
+ editor: {
52
+ api: string;
53
+ bounds: string;
54
+ geometries: string;
55
+ geometrystyles: string;
56
+ };
57
+ holes: {
58
+ detail: string;
59
+ list: string;
60
+ };
61
+ leavedescriptions: {
62
+ detail: string;
63
+ list: string;
64
+ };
65
+ levels: {
66
+ detail: string;
67
+ geometrytypes: string;
68
+ list: string;
69
+ };
70
+ lineobstacles: {
71
+ detail: string;
72
+ list: string;
73
+ };
74
+ locationgroupcategories: {
75
+ detail: string;
76
+ list: string;
77
+ };
78
+ locationgroups: {
79
+ detail: string;
80
+ list: string;
81
+ };
82
+ locations: {
83
+ 'by-slug-detail': string;
84
+ 'by-slug-details': string;
85
+ 'by-slug-geometry': string;
86
+ detail: string;
87
+ details: string;
88
+ geometry: string;
89
+ list: string;
90
+ types: string;
91
+ };
92
+ map: {
93
+ bounds: string;
94
+ };
95
+ obstacles: {
96
+ detail: string;
97
+ list: string;
98
+ };
99
+ pois: {
100
+ detail: string;
101
+ list: string;
102
+ };
103
+ ramps: {
104
+ detail: string;
105
+ list: string;
106
+ };
107
+ routing: {
108
+ locate: string;
109
+ options: string;
110
+ route: string;
111
+ };
112
+ session: {
113
+ 'get-token': string;
114
+ info: string;
115
+ login: string;
116
+ logout: string;
117
+ };
118
+ sources: {
119
+ detail: string;
120
+ image: string;
121
+ list: string;
122
+ };
123
+ spaces: {
124
+ detail: string;
125
+ geometrytypes: string;
126
+ list: string;
127
+ };
128
+ stairs: {
129
+ detail: string;
130
+ list: string;
131
+ };
132
+ updates: {
133
+ fetch: string;
134
+ };
135
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,48 @@
1
+ import type { Location } from './Location';
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>;
48
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface Session {
2
+ key_type: 'anonymous' | 'secret' | 'session';
3
+ readonly: boolean;
4
+ scopes: string[];
5
+ }
6
+ export interface SessionKey {
7
+ key: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface Sources {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface Spaces {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface Stairs {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface Updates {
2
+ last_map_update: string;
3
+ last_site_update: null | number;
4
+ user_data?: null | Record<string, unknown>;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,32 @@
1
+ export * from './AccessRestrictionGroups';
2
+ export * from './AccessRestrictions';
3
+ export * from './API';
4
+ export * from './Areas';
5
+ export * from './Bounds';
6
+ export * from './Buildings';
7
+ export * from './Changesets';
8
+ export * from './Columns';
9
+ export * from './CrossDescriptions';
10
+ export * from './Doors';
11
+ export * from './Editor';
12
+ export * from './Holes';
13
+ export * from './LeaveDescriptions';
14
+ export * from './Level';
15
+ export * from './LineObstacles';
16
+ export * from './Location';
17
+ export * from './LocationGroupCategories';
18
+ export * from './LocationGroups';
19
+ export * from './Map';
20
+ export * from './Mesh';
21
+ export * from './Obstacles';
22
+ export * from './Options';
23
+ export * from './POIs';
24
+ export * from './Positioning';
25
+ export * from './Ramps';
26
+ export * from './Root';
27
+ export * from './Routing';
28
+ export * from './Session';
29
+ export * from './Sources';
30
+ export * from './Spaces';
31
+ export * from './Stairs';
32
+ export * from './Updates';
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AccessRestrictionGroups"), exports);
18
+ __exportStar(require("./AccessRestrictions"), exports);
19
+ __exportStar(require("./API"), exports);
20
+ __exportStar(require("./Areas"), exports);
21
+ __exportStar(require("./Bounds"), exports);
22
+ __exportStar(require("./Buildings"), exports);
23
+ __exportStar(require("./Changesets"), exports);
24
+ __exportStar(require("./Columns"), exports);
25
+ __exportStar(require("./CrossDescriptions"), exports);
26
+ __exportStar(require("./Doors"), exports);
27
+ __exportStar(require("./Editor"), exports);
28
+ __exportStar(require("./Holes"), exports);
29
+ __exportStar(require("./LeaveDescriptions"), exports);
30
+ __exportStar(require("./Level"), exports);
31
+ __exportStar(require("./LineObstacles"), exports);
32
+ __exportStar(require("./Location"), exports);
33
+ __exportStar(require("./LocationGroupCategories"), exports);
34
+ __exportStar(require("./LocationGroups"), exports);
35
+ __exportStar(require("./Map"), exports);
36
+ __exportStar(require("./Mesh"), exports);
37
+ __exportStar(require("./Obstacles"), exports);
38
+ __exportStar(require("./Options"), exports);
39
+ __exportStar(require("./POIs"), exports);
40
+ __exportStar(require("./Positioning"), exports);
41
+ __exportStar(require("./Ramps"), exports);
42
+ __exportStar(require("./Root"), exports);
43
+ __exportStar(require("./Routing"), exports);
44
+ __exportStar(require("./Session"), exports);
45
+ __exportStar(require("./Sources"), exports);
46
+ __exportStar(require("./Spaces"), exports);
47
+ __exportStar(require("./Stairs"), exports);
48
+ __exportStar(require("./Updates"), exports);
package/package.json CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
2
  "author": "Florian Imdahl <git@ffflorian.de>",
3
3
  "dependencies": {
4
- "@ffflorian/api-client": "2.5.0"
4
+ "@ffflorian/api-client": "2.5.1"
5
5
  },
6
6
  "description": "A c3nav API client",
7
7
  "devDependencies": {
8
8
  "@types/node": "~24",
9
+ "http-status-codes": "2.3.0",
10
+ "nock": "14.0.12",
9
11
  "rimraf": "6.1.3",
10
- "typedoc": "0.28.18",
11
- "typescript": "6.0.2"
12
+ "typedoc": "0.28.19",
13
+ "typescript": "6.0.3",
14
+ "vitest": "4.1.4"
12
15
  },
13
16
  "engines": {
14
17
  "node": ">= 21"
@@ -28,12 +31,13 @@
28
31
  "readme": "https://github.com/ffflorian/api-clients#readme",
29
32
  "repository": "https://github.com/ffflorian/api-clients.git",
30
33
  "scripts": {
34
+ "build": "yarn build:ts",
31
35
  "build:ts": "tsc -p tsconfig.build.json",
32
36
  "build:docs": "typedoc --tsconfig tsconfig.build.json --options ../../typedoc.json --out ../../docs/packages/c3nav src/index.ts",
33
37
  "clean": "rimraf dist",
34
- "dist": "yarn clean && yarn build:ts",
35
- "test": "exit 0"
38
+ "dist": "yarn clean && yarn build",
39
+ "test": "vitest"
36
40
  },
37
41
  "types": "dist/index.d.ts",
38
- "version": "3.4.6"
42
+ "version": "3.5.0"
39
43
  }