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.
- package/README.md +1 -1
- package/dist/Endpoints.d.ts +112 -0
- package/dist/Endpoints.js +276 -0
- package/dist/api/APIBase.d.ts +12 -0
- package/dist/api/APIBase.js +17 -0
- package/dist/api/AccessRestrictionGroupsAPI.d.ts +11 -0
- package/dist/api/AccessRestrictionGroupsAPI.js +37 -0
- package/dist/api/AccessRestrictionsAPI.d.ts +11 -0
- package/dist/api/AccessRestrictionsAPI.js +37 -0
- package/dist/api/AreasAPI.d.ts +11 -0
- package/dist/api/AreasAPI.js +37 -0
- package/dist/api/BuildingsAPI.d.ts +11 -0
- package/dist/api/BuildingsAPI.js +37 -0
- package/dist/api/ChangesetsAPI.d.ts +11 -0
- package/dist/api/ChangesetsAPI.js +37 -0
- package/dist/api/ColumnsAPI.d.ts +11 -0
- package/dist/api/ColumnsAPI.js +37 -0
- package/dist/api/CrossDescriptionsAPI.d.ts +11 -0
- package/dist/api/CrossDescriptionsAPI.js +37 -0
- package/dist/api/DoorsAPI.d.ts +11 -0
- package/dist/api/DoorsAPI.js +37 -0
- package/dist/api/EditorAPI.d.ts +13 -0
- package/dist/api/EditorAPI.js +72 -0
- package/dist/api/HolesAPI.d.ts +11 -0
- package/dist/api/HolesAPI.js +37 -0
- package/dist/api/LeaveDescriptionsAPI.d.ts +11 -0
- package/dist/api/LeaveDescriptionsAPI.js +37 -0
- package/dist/api/LevelListAPI.d.ts +11 -0
- package/dist/api/LevelListAPI.js +37 -0
- package/dist/api/LineObstaclesAPI.d.ts +11 -0
- package/dist/api/LineObstaclesAPI.js +37 -0
- package/dist/api/LocationGroupCategoriesAPI.d.ts +11 -0
- package/dist/api/LocationGroupCategoriesAPI.js +37 -0
- package/dist/api/LocationGroupsAPI.d.ts +11 -0
- package/dist/api/LocationGroupsAPI.js +37 -0
- package/dist/api/LocationsAPI.d.ts +23 -0
- package/dist/api/LocationsAPI.js +65 -0
- package/dist/api/MapAPI.d.ts +23 -0
- package/dist/api/MapAPI.js +173 -0
- package/dist/api/MeshAPI.d.ts +10 -0
- package/dist/api/MeshAPI.js +64 -0
- package/dist/api/ObstaclesAPI.d.ts +11 -0
- package/dist/api/ObstaclesAPI.js +37 -0
- package/dist/api/POIs.d.ts +11 -0
- package/dist/api/POIs.js +37 -0
- package/dist/api/PositioningAPI.d.ts +8 -0
- package/dist/api/PositioningAPI.js +34 -0
- package/dist/api/RampsAPI.d.ts +11 -0
- package/dist/api/RampsAPI.js +37 -0
- package/dist/api/RoutingAPI.d.ts +15 -0
- package/dist/api/RoutingAPI.js +65 -0
- package/dist/api/SessionAPI.d.ts +10 -0
- package/dist/api/SessionAPI.js +45 -0
- package/dist/api/SourcesAPI.d.ts +11 -0
- package/dist/api/SourcesAPI.js +37 -0
- package/dist/api/SpacesAPI.d.ts +11 -0
- package/dist/api/SpacesAPI.js +37 -0
- package/dist/api/StairsAPI.d.ts +11 -0
- package/dist/api/StairsAPI.js +37 -0
- package/dist/api/UpdatesAPI.d.ts +9 -0
- package/dist/api/UpdatesAPI.js +38 -0
- package/dist/api/index.d.ts +28 -0
- package/dist/api/index.js +44 -0
- package/dist/c3nav.d.ts +14 -0
- package/dist/c3nav.js +54 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/interfaces/API.d.ts +31 -0
- package/dist/interfaces/API.js +2 -0
- package/dist/interfaces/AccessRestrictionGroups.d.ts +2 -0
- package/dist/interfaces/AccessRestrictionGroups.js +2 -0
- package/dist/interfaces/AccessRestrictions.d.ts +2 -0
- package/dist/interfaces/AccessRestrictions.js +2 -0
- package/dist/interfaces/Areas.d.ts +2 -0
- package/dist/interfaces/Areas.js +2 -0
- package/dist/interfaces/Bounds.d.ts +3 -0
- package/dist/interfaces/Bounds.js +2 -0
- package/dist/interfaces/Buildings.d.ts +2 -0
- package/dist/interfaces/Buildings.js +2 -0
- package/dist/interfaces/Changesets.d.ts +2 -0
- package/dist/interfaces/Changesets.js +2 -0
- package/dist/interfaces/Columns.d.ts +2 -0
- package/dist/interfaces/Columns.js +2 -0
- package/dist/interfaces/CrossDescriptions.d.ts +2 -0
- package/dist/interfaces/CrossDescriptions.js +2 -0
- package/dist/interfaces/Doors.d.ts +2 -0
- package/dist/interfaces/Doors.js +2 -0
- package/dist/interfaces/Editor.d.ts +9 -0
- package/dist/interfaces/Editor.js +2 -0
- package/dist/interfaces/Holes.d.ts +2 -0
- package/dist/interfaces/Holes.js +2 -0
- package/dist/interfaces/LeaveDescriptions.d.ts +2 -0
- package/dist/interfaces/LeaveDescriptions.js +2 -0
- package/dist/interfaces/Level.d.ts +19 -0
- package/dist/interfaces/Level.js +2 -0
- package/dist/interfaces/LineObstacles.d.ts +2 -0
- package/dist/interfaces/LineObstacles.js +2 -0
- package/dist/interfaces/Location.d.ts +28 -0
- package/dist/interfaces/Location.js +2 -0
- package/dist/interfaces/LocationGroupCategories.d.ts +2 -0
- package/dist/interfaces/LocationGroupCategories.js +2 -0
- package/dist/interfaces/LocationGroups.d.ts +2 -0
- package/dist/interfaces/LocationGroups.js +2 -0
- 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/Obstacles.d.ts +2 -0
- package/dist/interfaces/Obstacles.js +2 -0
- package/dist/interfaces/Options.d.ts +11 -0
- package/dist/interfaces/Options.js +2 -0
- package/dist/interfaces/POIs.d.ts +2 -0
- package/dist/interfaces/POIs.js +2 -0
- package/dist/interfaces/Positioning.d.ts +13 -0
- package/dist/interfaces/Positioning.js +2 -0
- package/dist/interfaces/Ramps.d.ts +2 -0
- package/dist/interfaces/Ramps.js +2 -0
- package/dist/interfaces/Root.d.ts +135 -0
- package/dist/interfaces/Root.js +2 -0
- package/dist/interfaces/Routing.d.ts +48 -0
- package/dist/interfaces/Routing.js +2 -0
- package/dist/interfaces/Session.d.ts +8 -0
- package/dist/interfaces/Session.js +2 -0
- package/dist/interfaces/Sources.d.ts +2 -0
- package/dist/interfaces/Sources.js +2 -0
- package/dist/interfaces/Spaces.d.ts +2 -0
- package/dist/interfaces/Spaces.js +2 -0
- package/dist/interfaces/Stairs.d.ts +2 -0
- package/dist/interfaces/Stairs.js +2 -0
- package/dist/interfaces/Updates.d.ts +5 -0
- package/dist/interfaces/Updates.js +2 -0
- package/dist/interfaces/index.d.ts +32 -0
- package/dist/interfaces/index.js +48 -0
- package/package.json +10 -6
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MapAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class MapAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
/** /bounds/ returns the maximum bounds of the map */
|
|
20
|
+
getBounds() {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const endpoint = Endpoints_1.Endpoint.Map.bounds();
|
|
23
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
24
|
+
return data;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
getLegend(themeId) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const endpoint = Endpoints_1.Endpoint.Map.legend(themeId);
|
|
30
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
31
|
+
return data;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
getLoad() {
|
|
35
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
36
|
+
const endpoint = Endpoints_1.Endpoint.Map.load();
|
|
37
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
38
|
+
return data;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
getLocation(idOrSlug_1) {
|
|
42
|
+
return __awaiter(this, arguments, void 0, function* (idOrSlug, options = {}) {
|
|
43
|
+
const params = new URLSearchParams();
|
|
44
|
+
if (options.geometry !== undefined) {
|
|
45
|
+
params.set('geometry', String(options.geometry));
|
|
46
|
+
}
|
|
47
|
+
if (options.showRedirects !== undefined) {
|
|
48
|
+
params.set('show_redirects', String(options.showRedirects));
|
|
49
|
+
}
|
|
50
|
+
const endpoint = typeof idOrSlug === 'string'
|
|
51
|
+
? Endpoints_1.Endpoint.Map.locationBySlug(idOrSlug, options.full)
|
|
52
|
+
: Endpoints_1.Endpoint.Map.locationById(idOrSlug, options.full);
|
|
53
|
+
const requestPath = params.size > 0 ? `${endpoint}?${params.toString()}` : endpoint;
|
|
54
|
+
const { data } = yield this.apiClient.get(requestPath);
|
|
55
|
+
return data;
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
getLocationDisplay(idOrSlug) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const endpoint = typeof idOrSlug === 'string'
|
|
61
|
+
? Endpoints_1.Endpoint.Map.locationDisplayBySlug(idOrSlug)
|
|
62
|
+
: Endpoints_1.Endpoint.Map.locationDisplayById(idOrSlug);
|
|
63
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
64
|
+
return data;
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
getLocationGeometry(idOrSlug) {
|
|
68
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
69
|
+
const endpoint = typeof idOrSlug === 'string'
|
|
70
|
+
? Endpoints_1.Endpoint.Map.locationGeometryBySlug(idOrSlug)
|
|
71
|
+
: Endpoints_1.Endpoint.Map.locationGeometryById(idOrSlug);
|
|
72
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
73
|
+
return data;
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
getLocations() {
|
|
77
|
+
return __awaiter(this, arguments, void 0, function* (options = {}) {
|
|
78
|
+
const params = new URLSearchParams();
|
|
79
|
+
if (options.geometry !== undefined) {
|
|
80
|
+
params.set('geometry', String(options.geometry));
|
|
81
|
+
}
|
|
82
|
+
if (options.searchable !== undefined) {
|
|
83
|
+
params.set('searchable', String(options.searchable));
|
|
84
|
+
}
|
|
85
|
+
const endpoint = Endpoints_1.Endpoint.Map.locations(false);
|
|
86
|
+
const requestPath = params.size > 0 ? `${endpoint}?${params.toString()}` : endpoint;
|
|
87
|
+
const { data } = yield this.apiClient.get(requestPath);
|
|
88
|
+
return data;
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
getLocationsFull() {
|
|
92
|
+
return __awaiter(this, arguments, void 0, function* (options = {}) {
|
|
93
|
+
const params = new URLSearchParams();
|
|
94
|
+
if (options.geometry !== undefined) {
|
|
95
|
+
params.set('geometry', String(options.geometry));
|
|
96
|
+
}
|
|
97
|
+
if (options.searchable !== undefined) {
|
|
98
|
+
params.set('searchable', String(options.searchable));
|
|
99
|
+
}
|
|
100
|
+
const endpoint = Endpoints_1.Endpoint.Map.locations(true);
|
|
101
|
+
const requestPath = params.size > 0 ? `${endpoint}?${params.toString()}` : endpoint;
|
|
102
|
+
const { data } = yield this.apiClient.get(requestPath);
|
|
103
|
+
return data;
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
getMyPositions() {
|
|
107
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const endpoint = Endpoints_1.Endpoint.Map.myPositions();
|
|
109
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
110
|
+
return data;
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
getPositionById(positionId) {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
const endpoint = Endpoints_1.Endpoint.Map.position(positionId);
|
|
116
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
117
|
+
return data;
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
getProjection() {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
const endpoint = Endpoints_1.Endpoint.Map.projection();
|
|
123
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
124
|
+
return data;
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
getQuests(questType, level) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
const params = new URLSearchParams();
|
|
130
|
+
if (questType) {
|
|
131
|
+
params.set('quest_type', questType);
|
|
132
|
+
}
|
|
133
|
+
if (level !== undefined) {
|
|
134
|
+
params.set('level', String(level));
|
|
135
|
+
}
|
|
136
|
+
const endpoint = Endpoints_1.Endpoint.Map.quests();
|
|
137
|
+
const requestPath = params.size > 0 ? `${endpoint}?${params.toString()}` : endpoint;
|
|
138
|
+
const { data } = yield this.apiClient.get(requestPath);
|
|
139
|
+
return data;
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
getSettings() {
|
|
143
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
const endpoint = Endpoints_1.Endpoint.Map.settings();
|
|
145
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
146
|
+
return data;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
getWifiData() {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
const endpoint = Endpoints_1.Endpoint.Map.wifidata();
|
|
152
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
153
|
+
return data;
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
setPosition(positionId, coordinatesId, timeout) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
const endpoint = Endpoints_1.Endpoint.Map.position(positionId);
|
|
159
|
+
const { data } = yield this.apiClient.put(endpoint, {
|
|
160
|
+
coordinates_id: coordinatesId,
|
|
161
|
+
timeout,
|
|
162
|
+
});
|
|
163
|
+
return data;
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
updateLoad(aps) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
const endpoint = Endpoints_1.Endpoint.Map.load();
|
|
169
|
+
yield this.apiClient.post(endpoint, { aps });
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
exports.MapAPI = MapAPI;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, MeshFirmware, MeshListResponse, MeshMap, MeshMessage } from '../interfaces';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class MeshAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
getFirmwareById(firmwareId: number): Promise<MeshFirmware>;
|
|
7
|
+
getMap(levelId: number): Promise<MeshMap>;
|
|
8
|
+
listFirmwares(limit?: number, offset?: number): Promise<MeshListResponse<MeshFirmware>>;
|
|
9
|
+
listMessages(limit?: number, offset?: number): Promise<MeshListResponse<MeshMessage>>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MeshAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class MeshAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
getFirmwareById(firmwareId) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const endpoint = Endpoints_1.Endpoint.Mesh.firmwareById(firmwareId);
|
|
22
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
23
|
+
return data;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
getMap(levelId) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const endpoint = Endpoints_1.Endpoint.Mesh.map(levelId);
|
|
29
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
30
|
+
return data;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
listFirmwares(limit, offset) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const params = new URLSearchParams();
|
|
36
|
+
if (limit !== undefined) {
|
|
37
|
+
params.set('limit', String(limit));
|
|
38
|
+
}
|
|
39
|
+
if (offset !== undefined) {
|
|
40
|
+
params.set('offset', String(offset));
|
|
41
|
+
}
|
|
42
|
+
const endpoint = Endpoints_1.Endpoint.Mesh.firmwares();
|
|
43
|
+
const requestPath = params.size > 0 ? `${endpoint}?${params.toString()}` : endpoint;
|
|
44
|
+
const { data } = yield this.apiClient.get(requestPath);
|
|
45
|
+
return data;
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
listMessages(limit, offset) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const params = new URLSearchParams();
|
|
51
|
+
if (limit !== undefined) {
|
|
52
|
+
params.set('limit', String(limit));
|
|
53
|
+
}
|
|
54
|
+
if (offset !== undefined) {
|
|
55
|
+
params.set('offset', String(offset));
|
|
56
|
+
}
|
|
57
|
+
const endpoint = Endpoints_1.Endpoint.Mesh.messages();
|
|
58
|
+
const requestPath = params.size > 0 ? `${endpoint}?${params.toString()}` : endpoint;
|
|
59
|
+
const { data } = yield this.apiClient.get(requestPath);
|
|
60
|
+
return data;
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.MeshAPI = MeshAPI;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, Obstacles } from '../interfaces/';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class ObstaclesAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* @param id The id to get
|
|
8
|
+
*/
|
|
9
|
+
getById(id: number): Promise<Obstacles>;
|
|
10
|
+
getList(): Promise<Obstacles[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ObstaclesAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class ObstaclesAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @param id The id to get
|
|
21
|
+
*/
|
|
22
|
+
getById(id) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const endpoint = Endpoints_1.Endpoint.obstacles(id);
|
|
25
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
26
|
+
return data;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
getList() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const endpoint = Endpoints_1.Endpoint.obstacles();
|
|
32
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.ObstaclesAPI = ObstaclesAPI;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, POIs } from '../interfaces';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class PoisAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* @param id The id to get
|
|
8
|
+
*/
|
|
9
|
+
getById(id: number): Promise<POIs>;
|
|
10
|
+
getList(): Promise<POIs[]>;
|
|
11
|
+
}
|
package/dist/api/POIs.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PoisAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class PoisAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @param id The id to get
|
|
21
|
+
*/
|
|
22
|
+
getById(id) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const endpoint = Endpoints_1.Endpoint.pois(id);
|
|
25
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
26
|
+
return data;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
getList() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const endpoint = Endpoints_1.Endpoint.pois();
|
|
32
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.PoisAPI = PoisAPI;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, PositioningLocateRequest, PositioningLocateResponse } from '../interfaces';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class PositioningAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
locate(payload: PositioningLocateRequest): Promise<PositioningLocateResponse>;
|
|
7
|
+
locateTest(): Promise<PositioningLocateResponse>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PositioningAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class PositioningAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
locate(payload) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const endpoint = Endpoints_1.Endpoint.Positioning.locate();
|
|
22
|
+
const { data } = yield this.apiClient.post(endpoint, payload);
|
|
23
|
+
return data;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
locateTest() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const endpoint = Endpoints_1.Endpoint.Positioning.locateTest();
|
|
29
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
30
|
+
return data;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.PositioningAPI = PositioningAPI;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, Ramps } from '../interfaces/';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class RampsAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* @param id The id to get
|
|
8
|
+
*/
|
|
9
|
+
getById(id: number): Promise<Ramps>;
|
|
10
|
+
getList(): Promise<Ramps[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RampsAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class RampsAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @param id The id to get
|
|
21
|
+
*/
|
|
22
|
+
getById(id) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const endpoint = Endpoints_1.Endpoint.ramps(id);
|
|
25
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
26
|
+
return data;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
getList() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const endpoint = Endpoints_1.Endpoint.ramps();
|
|
32
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.RampsAPI = RampsAPI;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, Routing, RoutingOptions, RoutingOptionsFormItem, RoutingRequest } from '../interfaces/';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class RoutingAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* @param id The id to get
|
|
8
|
+
*/
|
|
9
|
+
getById(id: number): Promise<Routing>;
|
|
10
|
+
getList(): Promise<Routing[]>;
|
|
11
|
+
getOptions(): Promise<RoutingOptions>;
|
|
12
|
+
getOptionsForm(): Promise<RoutingOptionsFormItem[]>;
|
|
13
|
+
postRoute(request: RoutingRequest): Promise<Routing>;
|
|
14
|
+
setOptions(options: Partial<RoutingOptions>): Promise<RoutingOptions>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RoutingAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class RoutingAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @param id The id to get
|
|
21
|
+
*/
|
|
22
|
+
getById(id) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const endpoint = Endpoints_1.Endpoint.routing(id);
|
|
25
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
26
|
+
return data;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
getList() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const endpoint = Endpoints_1.Endpoint.routing();
|
|
32
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
getOptions() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
const endpoint = Endpoints_1.Endpoint.Routing.options();
|
|
39
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
40
|
+
return data;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
getOptionsForm() {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
const endpoint = Endpoints_1.Endpoint.Routing.optionsForm();
|
|
46
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
47
|
+
return data;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
postRoute(request) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
const endpoint = Endpoints_1.Endpoint.Routing.route();
|
|
53
|
+
const { data } = yield this.apiClient.post(endpoint, request);
|
|
54
|
+
return data;
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
setOptions(options) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
const endpoint = Endpoints_1.Endpoint.Routing.options();
|
|
60
|
+
const { data } = yield this.apiClient.put(endpoint, options);
|
|
61
|
+
return data;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.RoutingAPI = RoutingAPI;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, Session, SessionKey } from '../interfaces/';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class SessionAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
getById(_id: number): Promise<Session>;
|
|
7
|
+
getList(): Promise<Session[]>;
|
|
8
|
+
getSessionKey(): Promise<SessionKey>;
|
|
9
|
+
getStatus(): Promise<Session>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SessionAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class SessionAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
getById(_id) {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
return this.getStatus();
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
getList() {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
const status = yield this.getStatus();
|
|
27
|
+
return [status];
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
getSessionKey() {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
const endpoint = Endpoints_1.Endpoint.Session.key();
|
|
33
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
34
|
+
return data;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
getStatus() {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const endpoint = Endpoints_1.Endpoint.Session.status();
|
|
40
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
41
|
+
return data;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.SessionAPI = SessionAPI;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, Sources } from '../interfaces/';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class SourcesAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* @param id The id to get
|
|
8
|
+
*/
|
|
9
|
+
getById(id: number): Promise<Sources>;
|
|
10
|
+
getList(): Promise<Sources[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SourcesAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class SourcesAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @param id The id to get
|
|
21
|
+
*/
|
|
22
|
+
getById(id) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
const endpoint = Endpoints_1.Endpoint.sources(id);
|
|
25
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
26
|
+
return data;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
getList() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
const endpoint = Endpoints_1.Endpoint.sources();
|
|
32
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.SourcesAPI = SourcesAPI;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, Spaces } from '../interfaces/';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class SpacesAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* @param id The id to get
|
|
8
|
+
*/
|
|
9
|
+
getById(id: number): Promise<Spaces>;
|
|
10
|
+
getList(): Promise<Spaces[]>;
|
|
11
|
+
}
|