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,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.SpacesAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class SpacesAPI 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.spaces(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.spaces();
|
|
32
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.SpacesAPI = SpacesAPI;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, Stairs } from '../interfaces/';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class StairsAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
/**
|
|
7
|
+
* @param id The id to get
|
|
8
|
+
*/
|
|
9
|
+
getById(id: number): Promise<Stairs>;
|
|
10
|
+
getList(): Promise<Stairs[]>;
|
|
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.StairsAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class StairsAPI 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.stairs(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.stairs();
|
|
32
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.StairsAPI = StairsAPI;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { APIClient } from '@ffflorian/api-client';
|
|
2
|
+
import type { ClientOptions, Updates } from '../interfaces/';
|
|
3
|
+
import { APIBase } from './APIBase';
|
|
4
|
+
export declare class UpdatesAPI extends APIBase {
|
|
5
|
+
constructor(apiClient: APIClient, options: ClientOptions);
|
|
6
|
+
fetchUpdates(): Promise<Updates>;
|
|
7
|
+
getById(_id: number): Promise<Updates>;
|
|
8
|
+
getList(): Promise<Updates[]>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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.UpdatesAPI = void 0;
|
|
13
|
+
const Endpoints_1 = require("../Endpoints");
|
|
14
|
+
const APIBase_1 = require("./APIBase");
|
|
15
|
+
class UpdatesAPI extends APIBase_1.APIBase {
|
|
16
|
+
constructor(apiClient, options) {
|
|
17
|
+
super(apiClient, options);
|
|
18
|
+
}
|
|
19
|
+
fetchUpdates() {
|
|
20
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21
|
+
const endpoint = Endpoints_1.Endpoint.Updates.fetch();
|
|
22
|
+
const { data } = yield this.apiClient.get(endpoint);
|
|
23
|
+
return data;
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
getById(_id) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
return this.fetchUpdates();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
getList() {
|
|
32
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
const updates = yield this.fetchUpdates();
|
|
34
|
+
return [updates];
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.UpdatesAPI = UpdatesAPI;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export * from './AccessRestrictionGroupsAPI';
|
|
2
|
+
export * from './AccessRestrictionsAPI';
|
|
3
|
+
export * from './AreasAPI';
|
|
4
|
+
export * from './BuildingsAPI';
|
|
5
|
+
export * from './ChangesetsAPI';
|
|
6
|
+
export * from './ColumnsAPI';
|
|
7
|
+
export * from './CrossDescriptionsAPI';
|
|
8
|
+
export * from './DoorsAPI';
|
|
9
|
+
export * from './EditorAPI';
|
|
10
|
+
export * from './HolesAPI';
|
|
11
|
+
export * from './LeaveDescriptionsAPI';
|
|
12
|
+
export * from './LevelListAPI';
|
|
13
|
+
export * from './LineObstaclesAPI';
|
|
14
|
+
export * from './LocationGroupCategoriesAPI';
|
|
15
|
+
export * from './LocationGroupsAPI';
|
|
16
|
+
export * from './LocationsAPI';
|
|
17
|
+
export * from './MapAPI';
|
|
18
|
+
export * from './MeshAPI';
|
|
19
|
+
export * from './ObstaclesAPI';
|
|
20
|
+
export * from './POIs';
|
|
21
|
+
export * from './PositioningAPI';
|
|
22
|
+
export * from './RampsAPI';
|
|
23
|
+
export * from './RoutingAPI';
|
|
24
|
+
export * from './SessionAPI';
|
|
25
|
+
export * from './SourcesAPI';
|
|
26
|
+
export * from './SpacesAPI';
|
|
27
|
+
export * from './StairsAPI';
|
|
28
|
+
export * from './UpdatesAPI';
|
|
@@ -0,0 +1,44 @@
|
|
|
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("./AccessRestrictionGroupsAPI"), exports);
|
|
18
|
+
__exportStar(require("./AccessRestrictionsAPI"), exports);
|
|
19
|
+
__exportStar(require("./AreasAPI"), exports);
|
|
20
|
+
__exportStar(require("./BuildingsAPI"), exports);
|
|
21
|
+
__exportStar(require("./ChangesetsAPI"), exports);
|
|
22
|
+
__exportStar(require("./ColumnsAPI"), exports);
|
|
23
|
+
__exportStar(require("./CrossDescriptionsAPI"), exports);
|
|
24
|
+
__exportStar(require("./DoorsAPI"), exports);
|
|
25
|
+
__exportStar(require("./EditorAPI"), exports);
|
|
26
|
+
__exportStar(require("./HolesAPI"), exports);
|
|
27
|
+
__exportStar(require("./LeaveDescriptionsAPI"), exports);
|
|
28
|
+
__exportStar(require("./LevelListAPI"), exports);
|
|
29
|
+
__exportStar(require("./LineObstaclesAPI"), exports);
|
|
30
|
+
__exportStar(require("./LocationGroupCategoriesAPI"), exports);
|
|
31
|
+
__exportStar(require("./LocationGroupsAPI"), exports);
|
|
32
|
+
__exportStar(require("./LocationsAPI"), exports);
|
|
33
|
+
__exportStar(require("./MapAPI"), exports);
|
|
34
|
+
__exportStar(require("./MeshAPI"), exports);
|
|
35
|
+
__exportStar(require("./ObstaclesAPI"), exports);
|
|
36
|
+
__exportStar(require("./POIs"), exports);
|
|
37
|
+
__exportStar(require("./PositioningAPI"), exports);
|
|
38
|
+
__exportStar(require("./RampsAPI"), exports);
|
|
39
|
+
__exportStar(require("./RoutingAPI"), exports);
|
|
40
|
+
__exportStar(require("./SessionAPI"), exports);
|
|
41
|
+
__exportStar(require("./SourcesAPI"), exports);
|
|
42
|
+
__exportStar(require("./SpacesAPI"), exports);
|
|
43
|
+
__exportStar(require("./StairsAPI"), exports);
|
|
44
|
+
__exportStar(require("./UpdatesAPI"), exports);
|
package/dist/c3nav.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { API, ClientOptions } from './interfaces';
|
|
2
|
+
export declare class c3nav {
|
|
3
|
+
readonly api: API;
|
|
4
|
+
private readonly apiClient;
|
|
5
|
+
constructor(apiUrl: string);
|
|
6
|
+
constructor(options: ClientOptions);
|
|
7
|
+
/**
|
|
8
|
+
* Set a new API URL.
|
|
9
|
+
* @param newURL The new API URL
|
|
10
|
+
*/
|
|
11
|
+
setApiUrl(newURL: string): void;
|
|
12
|
+
}
|
|
13
|
+
export declare class LibrariesIO extends c3nav {
|
|
14
|
+
}
|
package/dist/c3nav.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LibrariesIO = exports.c3nav = void 0;
|
|
4
|
+
const api_client_1 = require("@ffflorian/api-client");
|
|
5
|
+
const api_1 = require("./api");
|
|
6
|
+
class c3nav {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
if (typeof options === 'string') {
|
|
9
|
+
options = { apiUrl: options };
|
|
10
|
+
}
|
|
11
|
+
this.apiClient = new api_client_1.APIClient(options.apiUrl || 'https://c3nav.de');
|
|
12
|
+
this.api = {
|
|
13
|
+
accessRestrictionGroups: new api_1.AccessRestrictionGroupsAPI(this.apiClient, options),
|
|
14
|
+
accessRestrictions: new api_1.AccessRestrictionsAPI(this.apiClient, options),
|
|
15
|
+
areas: new api_1.AreasAPI(this.apiClient, options),
|
|
16
|
+
buildings: new api_1.BuildingsAPI(this.apiClient, options),
|
|
17
|
+
changesets: new api_1.ChangesetsAPI(this.apiClient, options),
|
|
18
|
+
columns: new api_1.ColumnsAPI(this.apiClient, options),
|
|
19
|
+
crossDescriptions: new api_1.CrossDescriptionsAPI(this.apiClient, options),
|
|
20
|
+
doors: new api_1.DoorsAPI(this.apiClient, options),
|
|
21
|
+
editor: new api_1.EditorAPI(this.apiClient, options),
|
|
22
|
+
holes: new api_1.HolesAPI(this.apiClient, options),
|
|
23
|
+
leaveDescriptions: new api_1.LeaveDescriptionsAPI(this.apiClient, options),
|
|
24
|
+
levels: new api_1.LevelListAPI(this.apiClient, options),
|
|
25
|
+
lineObstacles: new api_1.LineObstaclesAPI(this.apiClient, options),
|
|
26
|
+
locationGroupCategories: new api_1.LocationGroupCategoriesAPI(this.apiClient, options),
|
|
27
|
+
locationGroups: new api_1.LocationGroupsAPI(this.apiClient, options),
|
|
28
|
+
locations: new api_1.LocationsAPI(this.apiClient, options),
|
|
29
|
+
map: new api_1.MapAPI(this.apiClient, options),
|
|
30
|
+
mesh: new api_1.MeshAPI(this.apiClient, options),
|
|
31
|
+
obstacles: new api_1.ObstaclesAPI(this.apiClient, options),
|
|
32
|
+
pois: new api_1.PoisAPI(this.apiClient, options),
|
|
33
|
+
positioning: new api_1.PositioningAPI(this.apiClient, options),
|
|
34
|
+
ramps: new api_1.RampsAPI(this.apiClient, options),
|
|
35
|
+
routing: new api_1.RoutingAPI(this.apiClient, options),
|
|
36
|
+
session: new api_1.SessionAPI(this.apiClient, options),
|
|
37
|
+
sources: new api_1.SourcesAPI(this.apiClient, options),
|
|
38
|
+
spaces: new api_1.SpacesAPI(this.apiClient, options),
|
|
39
|
+
stairs: new api_1.StairsAPI(this.apiClient, options),
|
|
40
|
+
updates: new api_1.UpdatesAPI(this.apiClient, options),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Set a new API URL.
|
|
45
|
+
* @param newURL The new API URL
|
|
46
|
+
*/
|
|
47
|
+
setApiUrl(newURL) {
|
|
48
|
+
this.apiClient.setBaseURL(newURL);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.c3nav = c3nav;
|
|
52
|
+
class LibrariesIO extends c3nav {
|
|
53
|
+
}
|
|
54
|
+
exports.LibrariesIO = LibrariesIO;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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("./api/"), exports);
|
|
18
|
+
__exportStar(require("./c3nav"), exports);
|
|
19
|
+
__exportStar(require("./interfaces/"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { AccessRestrictionGroupsAPI, AccessRestrictionsAPI, AreasAPI, BuildingsAPI, ChangesetsAPI, ColumnsAPI, CrossDescriptionsAPI, DoorsAPI, EditorAPI, HolesAPI, LeaveDescriptionsAPI, LevelListAPI, LineObstaclesAPI, LocationGroupCategoriesAPI, LocationGroupsAPI, LocationsAPI, MapAPI, MeshAPI, ObstaclesAPI, PoisAPI, PositioningAPI, RampsAPI, RoutingAPI, SessionAPI, SourcesAPI, SpacesAPI, StairsAPI, UpdatesAPI } from '../api/';
|
|
2
|
+
export interface API {
|
|
3
|
+
accessRestrictionGroups: AccessRestrictionGroupsAPI;
|
|
4
|
+
accessRestrictions: AccessRestrictionsAPI;
|
|
5
|
+
areas: AreasAPI;
|
|
6
|
+
buildings: BuildingsAPI;
|
|
7
|
+
changesets: ChangesetsAPI;
|
|
8
|
+
columns: ColumnsAPI;
|
|
9
|
+
crossDescriptions: CrossDescriptionsAPI;
|
|
10
|
+
doors: DoorsAPI;
|
|
11
|
+
editor: EditorAPI;
|
|
12
|
+
holes: HolesAPI;
|
|
13
|
+
leaveDescriptions: LeaveDescriptionsAPI;
|
|
14
|
+
levels: LevelListAPI;
|
|
15
|
+
lineObstacles: LineObstaclesAPI;
|
|
16
|
+
locationGroupCategories: LocationGroupCategoriesAPI;
|
|
17
|
+
locationGroups: LocationGroupsAPI;
|
|
18
|
+
locations: LocationsAPI;
|
|
19
|
+
map: MapAPI;
|
|
20
|
+
mesh: MeshAPI;
|
|
21
|
+
obstacles: ObstaclesAPI;
|
|
22
|
+
pois: PoisAPI;
|
|
23
|
+
positioning: PositioningAPI;
|
|
24
|
+
ramps: RampsAPI;
|
|
25
|
+
routing: RoutingAPI;
|
|
26
|
+
session: SessionAPI;
|
|
27
|
+
sources: SourcesAPI;
|
|
28
|
+
spaces: SpacesAPI;
|
|
29
|
+
stairs: StairsAPI;
|
|
30
|
+
updates: UpdatesAPI;
|
|
31
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Bounds } from './Bounds';
|
|
2
|
+
export interface Editor extends Bounds {
|
|
3
|
+
}
|
|
4
|
+
export interface EditorBeaconsLookup {
|
|
5
|
+
ibeacons: Record<string, unknown>;
|
|
6
|
+
wifi_beacons: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export type EditorGeometries = Array<[string, string] | Record<string, unknown>>;
|
|
9
|
+
export type GeometryStyles = Record<string, string>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface Level {
|
|
2
|
+
access_restriction: null;
|
|
3
|
+
base_altitude: number;
|
|
4
|
+
can_describe: boolean;
|
|
5
|
+
can_search: boolean;
|
|
6
|
+
default_height: number;
|
|
7
|
+
door_height: number;
|
|
8
|
+
groups: {};
|
|
9
|
+
icon: string;
|
|
10
|
+
id: number;
|
|
11
|
+
on_top_of: null | number;
|
|
12
|
+
short_label: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
subtitle: string;
|
|
15
|
+
title: string;
|
|
16
|
+
titles: {
|
|
17
|
+
[lang: string]: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface Location {
|
|
2
|
+
icon: string;
|
|
3
|
+
id: number;
|
|
4
|
+
on_top_of: null | number;
|
|
5
|
+
slug: string;
|
|
6
|
+
subtitle: string;
|
|
7
|
+
title: string;
|
|
8
|
+
type: string;
|
|
9
|
+
}
|
|
10
|
+
export interface LocationDetails {
|
|
11
|
+
display: Array<[string, null | number | string]>;
|
|
12
|
+
editor_url: string;
|
|
13
|
+
id: number;
|
|
14
|
+
}
|
|
15
|
+
export interface LocationGeometry {
|
|
16
|
+
geometry: {
|
|
17
|
+
coordinates: number[] | number[][];
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
id: number;
|
|
21
|
+
level: null | number;
|
|
22
|
+
}
|
|
23
|
+
export interface LocationType {
|
|
24
|
+
name: string;
|
|
25
|
+
name_plural: string;
|
|
26
|
+
title: string;
|
|
27
|
+
title_plural: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Location, LocationDetails, LocationGeometry } from './Location';
|
|
2
|
+
export interface MapLegend {
|
|
3
|
+
base: MapLegendItem[];
|
|
4
|
+
groups: MapLegendItem[];
|
|
5
|
+
obstacles: MapLegendItem[];
|
|
6
|
+
}
|
|
7
|
+
export interface MapLegendItem {
|
|
8
|
+
border: string;
|
|
9
|
+
fill: string;
|
|
10
|
+
title: string;
|
|
11
|
+
}
|
|
12
|
+
export type MapLocation = Location;
|
|
13
|
+
export type MapLocationDisplay = LocationDetails;
|
|
14
|
+
export type MapLocationGeometry = LocationGeometry;
|
|
15
|
+
export interface MapLocationOptions extends MapLocationQueryOptions {
|
|
16
|
+
full?: boolean;
|
|
17
|
+
showRedirects?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface MapLocationQueryOptions {
|
|
20
|
+
geometry?: boolean;
|
|
21
|
+
searchable?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface MapSettings {
|
|
24
|
+
grid?: null | Record<string, unknown>;
|
|
25
|
+
initial_bounds: Array<[number, number]> | null;
|
|
26
|
+
initial_level: null | number;
|
|
27
|
+
tile_server?: null | string;
|
|
28
|
+
}
|
|
29
|
+
export interface Position {
|
|
30
|
+
available: boolean;
|
|
31
|
+
effective_slug: string;
|
|
32
|
+
icon: null | string;
|
|
33
|
+
id: number | string;
|
|
34
|
+
short_name: string;
|
|
35
|
+
slug: string;
|
|
36
|
+
subtitle: string;
|
|
37
|
+
title: string;
|
|
38
|
+
}
|
|
39
|
+
export interface Projection {
|
|
40
|
+
pipeline?: null | string;
|
|
41
|
+
proj4: string;
|
|
42
|
+
rotation: number;
|
|
43
|
+
rotation_matrix?: null | number[];
|
|
44
|
+
zero_point: [number, number];
|
|
45
|
+
}
|
|
46
|
+
export interface Quest {
|
|
47
|
+
identifier: string;
|
|
48
|
+
level_id: number;
|
|
49
|
+
point: {
|
|
50
|
+
coordinates: [number, number];
|
|
51
|
+
type: 'Point';
|
|
52
|
+
};
|
|
53
|
+
quest_type: string;
|
|
54
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface MeshFirmware {
|
|
2
|
+
builds: Array<Record<string, unknown>>;
|
|
3
|
+
created: string;
|
|
4
|
+
id: number;
|
|
5
|
+
idf_version: string;
|
|
6
|
+
project_name: string;
|
|
7
|
+
version: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MeshListResponse<T> {
|
|
10
|
+
count: number;
|
|
11
|
+
items: T[];
|
|
12
|
+
}
|
|
13
|
+
export interface MeshMap {
|
|
14
|
+
connections: Array<Record<string, unknown>>;
|
|
15
|
+
ranges: Array<Record<string, unknown>>;
|
|
16
|
+
ranging_beacons: Array<Record<string, unknown>>;
|
|
17
|
+
}
|
|
18
|
+
export interface MeshMessage {
|
|
19
|
+
data: Record<string, unknown>;
|
|
20
|
+
datetime: string;
|
|
21
|
+
id: number;
|
|
22
|
+
message_type: string;
|
|
23
|
+
src_node: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ClientOptions {
|
|
2
|
+
apiUrl?: string;
|
|
3
|
+
}
|
|
4
|
+
export type HttpMethod = 'get' | 'head' | 'options' | 'post' | 'put';
|
|
5
|
+
export interface LevelListOptions {
|
|
6
|
+
/** filter by group */
|
|
7
|
+
group?: number | string;
|
|
8
|
+
/** filter by on_top_of */
|
|
9
|
+
on_top_of?: null | number | string;
|
|
10
|
+
}
|
|
11
|
+
export type RequestOptions = LevelListOptions;
|