c3nav 3.4.7 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # c3nav [![npm version](https://img.shields.io/npm/v/c3nav.svg)](https://www.npmjs.com/package/c3nav)
2
2
 
3
- A [c3nav](https://c3nav.de) API client. For a documentation on the API see https://c3nav.de/api/.
3
+ A [c3nav](https://c3nav.de) API client. For a documentation on the API see [the c3nav API reference](https://39c3.c3nav.de/api/v2/).
4
4
 
5
5
  ### Installation
6
6
 
@@ -19,6 +19,13 @@ export declare const Endpoint: {
19
19
  doors(id?: number | string): string;
20
20
  EDITOR: string;
21
21
  editor(id?: number | string): string;
22
+ Editor: {
23
+ beaconsLookup(): string;
24
+ bounds(): string;
25
+ geometryStyles(): string;
26
+ levelGeometries(levelId: number | string): string;
27
+ spaceGeometries(spaceId: number | string): string;
28
+ };
22
29
  GEOMETRY: string;
23
30
  HOLES: string;
24
31
  holes(id?: number | string): string;
@@ -45,17 +52,51 @@ export declare const Endpoint: {
45
52
  MAP: string;
46
53
  Map: {
47
54
  bounds(): string;
55
+ legend(themeId: number | string): string;
56
+ load(): string;
57
+ locationById(locationId: number | string, full?: boolean): string;
58
+ locationBySlug(locationSlug: string, full?: boolean): string;
59
+ locationDisplayById(locationId: number | string): string;
60
+ locationDisplayBySlug(locationSlug: string): string;
61
+ locationGeometryById(locationId: number | string): string;
62
+ locationGeometryBySlug(locationSlug: string): string;
63
+ locations(full?: boolean): string;
64
+ myPositions(): string;
65
+ position(positionId: number | string): string;
66
+ projection(): string;
67
+ quests(): string;
68
+ settings(): string;
69
+ wifidata(): string;
70
+ };
71
+ Mesh: {
72
+ firmwareById(firmwareId: number): string;
73
+ firmwares(): string;
74
+ map(levelId: number): string;
75
+ messages(): string;
48
76
  };
49
77
  OBSTACLES: string;
50
78
  obstacles(id?: number | string): string;
51
79
  POIS: string;
52
80
  pois(id?: number | string): string;
81
+ Positioning: {
82
+ locate(): string;
83
+ locateTest(): string;
84
+ };
53
85
  RAMPS: string;
54
86
  ramps(id?: number | string): string;
55
87
  ROUTING: string;
56
88
  routing(id?: number | string): string;
89
+ Routing: {
90
+ options(): string;
91
+ optionsForm(): string;
92
+ route(): string;
93
+ };
57
94
  SESSION: string;
58
95
  session(id?: number | string): string;
96
+ Session: {
97
+ key(): string;
98
+ status(): string;
99
+ };
59
100
  SOURCES: string;
60
101
  sources(id?: number | string): string;
61
102
  SPACES: string;
@@ -65,4 +106,7 @@ export declare const Endpoint: {
65
106
  TYPES: string;
66
107
  UPDATES: string;
67
108
  updates(id?: number | string): string;
109
+ Updates: {
110
+ fetch(): string;
111
+ };
68
112
  };
package/dist/Endpoints.js CHANGED
@@ -2,236 +2,275 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Endpoint = void 0;
4
4
  const encode = encodeURIComponent;
5
+ function mapDataEndpoint(path, id) {
6
+ let endpoint = `/api/v2/mapdata/${path}/`;
7
+ if (id !== undefined) {
8
+ endpoint += `${encode(String(id))}/`;
9
+ }
10
+ return endpoint;
11
+ }
5
12
  exports.Endpoint = {
6
13
  ACCESSRESTRICTIONGROUPS: 'accessrestrictiongroups',
7
14
  accessRestrictionGroups(id) {
8
- let endpoint = `/${exports.Endpoint.ACCESSRESTRICTIONGROUPS}/`;
9
- if (id) {
10
- endpoint += `${encode(String(id))}/`;
11
- }
12
- return endpoint;
15
+ return mapDataEndpoint('accessrestrictiongroups', id);
13
16
  },
14
17
  ACCESSRESTRICTIONS: 'accessrestrictions',
15
18
  accessRestrictions(id) {
16
- let endpoint = `/${exports.Endpoint.ACCESSRESTRICTIONS}/`;
17
- if (id) {
18
- endpoint += `${encode(String(id))}/`;
19
- }
20
- return endpoint;
19
+ return mapDataEndpoint('accessrestrictions', id);
21
20
  },
22
21
  AREAS: 'areas',
23
22
  areas(id) {
24
- let endpoint = `/${exports.Endpoint.AREAS}/`;
25
- if (id) {
26
- endpoint += `${encode(String(id))}/`;
27
- }
28
- return endpoint;
23
+ return mapDataEndpoint('areas', id);
29
24
  },
30
25
  BOUNDS: 'bounds',
31
26
  BUILDINGS: 'buildings',
32
27
  buildings(id) {
33
- let endpoint = `/${exports.Endpoint.BUILDINGS}/`;
34
- if (id) {
35
- endpoint += `${encode(String(id))}/`;
36
- }
37
- return endpoint;
28
+ return mapDataEndpoint('buildings', id);
38
29
  },
39
30
  CHANGESETS: 'changesets',
40
31
  changesets(id) {
41
- let endpoint = `/${exports.Endpoint.CHANGESETS}/`;
42
- if (id) {
43
- endpoint += `${encode(String(id))}/`;
44
- }
45
- return endpoint;
32
+ return mapDataEndpoint('changesets', id);
46
33
  },
47
34
  COLUMNS: 'columns',
48
35
  columns(id) {
49
- let endpoint = `/${exports.Endpoint.COLUMNS}/`;
50
- if (id) {
51
- endpoint += `${encode(String(id))}/`;
52
- }
53
- return endpoint;
36
+ return mapDataEndpoint('columns', id);
54
37
  },
55
- CROSSDESCRIPTIONS: 'crossdescriptions',
38
+ CROSSDESCRIPTIONS: 'cross_descriptions',
56
39
  crossDescriptions(id) {
57
- let endpoint = `/${exports.Endpoint.CROSSDESCRIPTIONS}/`;
58
- if (id) {
59
- endpoint += `${encode(String(id))}/`;
60
- }
61
- return endpoint;
40
+ return mapDataEndpoint('cross_descriptions', id);
62
41
  },
63
- DETAILS: 'details',
42
+ DETAILS: 'display',
64
43
  DOORS: 'doors',
65
44
  doors(id) {
66
- let endpoint = `/${exports.Endpoint.DOORS}/`;
67
- if (id) {
68
- endpoint += `${encode(String(id))}/`;
69
- }
70
- return endpoint;
45
+ return mapDataEndpoint('doors', id);
71
46
  },
72
47
  EDITOR: 'editor',
73
48
  editor(id) {
74
- let endpoint = `/${exports.Endpoint.EDITOR}/`;
75
- if (id) {
49
+ let endpoint = '/api/v2/editor/';
50
+ if (id !== undefined) {
76
51
  endpoint += `${encode(String(id))}/`;
77
52
  }
78
53
  return endpoint;
79
54
  },
55
+ Editor: {
56
+ beaconsLookup() {
57
+ return '/api/v2/editor/beacons-lookup/';
58
+ },
59
+ bounds() {
60
+ return '/api/v2/editor/bounds/';
61
+ },
62
+ geometryStyles() {
63
+ return '/api/v2/editor/geometrystyles/';
64
+ },
65
+ levelGeometries(levelId) {
66
+ return `/api/v2/editor/geometries/level/${encode(String(levelId))}/`;
67
+ },
68
+ spaceGeometries(spaceId) {
69
+ return `/api/v2/editor/geometries/space/${encode(String(spaceId))}/`;
70
+ },
71
+ },
80
72
  GEOMETRY: 'geometry',
81
73
  HOLES: 'holes',
82
74
  holes(id) {
83
- let endpoint = `/${exports.Endpoint.HOLES}/`;
84
- if (id) {
85
- endpoint += `${encode(String(id))}/`;
86
- }
87
- return endpoint;
75
+ return mapDataEndpoint('holes', id);
88
76
  },
89
- LEAVEDESCRIPTIONS: 'leavedescriptions',
77
+ LEAVEDESCRIPTIONS: 'leave_descriptions',
90
78
  leaveDescriptions(id) {
91
- let endpoint = `/${exports.Endpoint.LEAVEDESCRIPTIONS}/`;
92
- if (id) {
93
- endpoint += `${encode(String(id))}/`;
94
- }
95
- return endpoint;
79
+ return mapDataEndpoint('leave_descriptions', id);
96
80
  },
97
81
  Level: {
98
82
  levels(id) {
99
- let endpoint = `/${exports.Endpoint.LEVELS}/`;
100
- if (id) {
101
- endpoint += `${encode(String(id))}/`;
102
- }
103
- return endpoint;
83
+ return mapDataEndpoint('levels', id);
104
84
  },
105
85
  },
106
86
  LEVELS: 'levels',
107
87
  LINEOBSTACLES: 'lineobstacles',
108
88
  lineObstacles(id) {
109
- let endpoint = `/${exports.Endpoint.LINEOBSTACLES}/`;
110
- if (id) {
111
- endpoint += `${encode(String(id))}/`;
112
- }
113
- return endpoint;
89
+ return mapDataEndpoint('lineobstacles', id);
114
90
  },
115
91
  Location: {
116
92
  detail(id) {
117
- let endpoint = `/${exports.Endpoint.LOCATIONS}/`;
118
- endpoint += typeof id === 'string' ? 'by_slug/' : '';
119
- endpoint += `${encode(String(id))}/`;
120
- return endpoint;
93
+ if (typeof id === 'string') {
94
+ return `/api/v2/map/locations/by-slug/${encode(String(id))}/`;
95
+ }
96
+ return `/api/v2/map/locations/${encode(String(id))}/`;
121
97
  },
122
98
  details(id) {
123
- let endpoint = `/${exports.Endpoint.LOCATIONS}/`;
124
- endpoint += typeof id === 'string' ? 'by_slug/' : '';
125
- endpoint += `${encode(String(id))}/${exports.Endpoint.DETAILS}/`;
126
- return endpoint;
99
+ if (typeof id === 'string') {
100
+ return `/api/v2/map/locations/by-slug/${encode(String(id))}/display/`;
101
+ }
102
+ return `/api/v2/map/locations/${encode(String(id))}/display/`;
127
103
  },
128
104
  geometry(id) {
129
- let endpoint = `/${exports.Endpoint.LOCATIONS}/`;
130
- endpoint += typeof id === 'string' ? 'by_slug/' : '';
131
- endpoint += `${encode(String(id))}/${exports.Endpoint.GEOMETRY}/`;
132
- return endpoint;
105
+ if (typeof id === 'string') {
106
+ return `/api/v2/map/locations/by-slug/${encode(String(id))}/geometry/`;
107
+ }
108
+ return `/api/v2/map/locations/${encode(String(id))}/geometry/`;
133
109
  },
134
110
  locations() {
135
- return `/${exports.Endpoint.LOCATIONS}/`;
111
+ return '/api/v2/map/locations/';
136
112
  },
137
113
  types() {
138
- return `/${exports.Endpoint.LOCATIONS}/${exports.Endpoint.TYPES}/`;
114
+ return '/api/v2/locations/types/';
139
115
  },
140
116
  },
141
117
  LOCATIONGROUPCATEGORIES: 'locationgroupcategories',
142
118
  locationGroupCategories(id) {
143
- let endpoint = `/${exports.Endpoint.LOCATIONGROUPCATEGORIES}/`;
144
- if (id) {
145
- endpoint += `${encode(String(id))}/`;
146
- }
147
- return endpoint;
119
+ return mapDataEndpoint('locationgroupcategories', id);
148
120
  },
149
121
  LOCATIONGROUPS: 'locationgroups',
150
122
  locationGroups(id) {
151
- let endpoint = `/${exports.Endpoint.LOCATIONGROUPS}/`;
152
- if (id) {
153
- endpoint += `${encode(String(id))}/`;
154
- }
155
- return endpoint;
123
+ return mapDataEndpoint('locationgroups', id);
156
124
  },
157
125
  LOCATIONS: 'locations',
158
126
  MAP: 'map',
159
127
  Map: {
160
128
  bounds() {
161
- return `/${exports.Endpoint.MAP}/${exports.Endpoint.BOUNDS}/`;
129
+ return '/api/v2/map/bounds/';
130
+ },
131
+ legend(themeId) {
132
+ return `/api/v2/map/legend/${encode(String(themeId))}/`;
133
+ },
134
+ load() {
135
+ return '/api/v2/map/load/';
136
+ },
137
+ locationById(locationId, full = false) {
138
+ return full
139
+ ? `/api/v2/map/locations/${encode(String(locationId))}/full/`
140
+ : `/api/v2/map/locations/${encode(String(locationId))}/`;
141
+ },
142
+ locationBySlug(locationSlug, full = false) {
143
+ return full
144
+ ? `/api/v2/map/locations/by-slug/${encode(String(locationSlug))}/full/`
145
+ : `/api/v2/map/locations/by-slug/${encode(String(locationSlug))}/`;
146
+ },
147
+ locationDisplayById(locationId) {
148
+ return `/api/v2/map/locations/${encode(String(locationId))}/display/`;
149
+ },
150
+ locationDisplayBySlug(locationSlug) {
151
+ return `/api/v2/map/locations/by-slug/${encode(String(locationSlug))}/display/`;
152
+ },
153
+ locationGeometryById(locationId) {
154
+ return `/api/v2/map/locations/${encode(String(locationId))}/geometry/`;
155
+ },
156
+ locationGeometryBySlug(locationSlug) {
157
+ return `/api/v2/map/locations/by-slug/${encode(String(locationSlug))}/geometry/`;
158
+ },
159
+ locations(full = false) {
160
+ return full ? '/api/v2/map/locations/full/' : '/api/v2/map/locations/';
161
+ },
162
+ myPositions() {
163
+ return '/api/v2/map/positions/my/';
164
+ },
165
+ position(positionId) {
166
+ return `/api/v2/map/positions/${encode(String(positionId))}/`;
167
+ },
168
+ projection() {
169
+ return '/api/v2/map/projection/';
170
+ },
171
+ quests() {
172
+ return '/api/v2/map/quests/';
173
+ },
174
+ settings() {
175
+ return '/api/v2/map/settings/';
176
+ },
177
+ wifidata() {
178
+ return '/api/v2/map/wifidata/';
179
+ },
180
+ },
181
+ Mesh: {
182
+ firmwareById(firmwareId) {
183
+ return `/api/v2/mesh/firmwares/${encode(String(firmwareId))}/`;
184
+ },
185
+ firmwares() {
186
+ return '/api/v2/mesh/firmwares/';
187
+ },
188
+ map(levelId) {
189
+ return `/api/v2/mesh/map/${encode(String(levelId))}/`;
190
+ },
191
+ messages() {
192
+ return '/api/v2/mesh/messages/';
162
193
  },
163
194
  },
164
195
  OBSTACLES: 'obstacles',
165
196
  obstacles(id) {
166
- let endpoint = `/${exports.Endpoint.OBSTACLES}/`;
167
- if (id) {
168
- endpoint += `${encode(String(id))}/`;
169
- }
170
- return endpoint;
197
+ return mapDataEndpoint('obstacles', id);
171
198
  },
172
199
  POIS: 'pois',
173
200
  pois(id) {
174
- let endpoint = `/${exports.Endpoint.POIS}/`;
175
- if (id) {
176
- endpoint += `${encode(String(id))}/`;
177
- }
178
- return endpoint;
201
+ return mapDataEndpoint('pois', id);
202
+ },
203
+ Positioning: {
204
+ locate() {
205
+ return '/api/v2/positioning/locate/';
206
+ },
207
+ locateTest() {
208
+ return '/api/v2/positioning/locate-test/';
209
+ },
179
210
  },
180
211
  RAMPS: 'ramps',
181
212
  ramps(id) {
182
- let endpoint = `/${exports.Endpoint.RAMPS}/`;
183
- if (id) {
184
- endpoint += `${encode(String(id))}/`;
185
- }
186
- return endpoint;
213
+ return mapDataEndpoint('ramps', id);
187
214
  },
188
215
  ROUTING: 'routing',
189
216
  routing(id) {
190
- let endpoint = `/${exports.Endpoint.ROUTING}/`;
191
- if (id) {
217
+ let endpoint = '/api/v2/routing/';
218
+ if (id !== undefined) {
192
219
  endpoint += `${encode(String(id))}/`;
193
220
  }
194
221
  return endpoint;
195
222
  },
223
+ Routing: {
224
+ options() {
225
+ return '/api/v2/routing/options/';
226
+ },
227
+ optionsForm() {
228
+ return '/api/v2/routing/options/form/';
229
+ },
230
+ route() {
231
+ return '/api/v2/routing/route/';
232
+ },
233
+ },
196
234
  SESSION: 'session',
197
235
  session(id) {
198
- let endpoint = `/${exports.Endpoint.SESSION}/`;
199
- if (id) {
236
+ let endpoint = '/api/v2/auth/session/';
237
+ if (id !== undefined) {
200
238
  endpoint += `${encode(String(id))}/`;
201
239
  }
202
240
  return endpoint;
203
241
  },
242
+ Session: {
243
+ key() {
244
+ return '/api/v2/auth/session/';
245
+ },
246
+ status() {
247
+ return '/api/v2/auth/status/';
248
+ },
249
+ },
204
250
  SOURCES: 'sources',
205
251
  sources(id) {
206
- let endpoint = `/${exports.Endpoint.SOURCES}/`;
207
- if (id) {
208
- endpoint += `${encode(String(id))}/`;
209
- }
210
- return endpoint;
252
+ return mapDataEndpoint('sources', id);
211
253
  },
212
254
  SPACES: 'spaces',
213
255
  spaces(id) {
214
- let endpoint = `/${exports.Endpoint.SPACES}/`;
215
- if (id) {
216
- endpoint += `${encode(String(id))}/`;
217
- }
218
- return endpoint;
256
+ return mapDataEndpoint('spaces', id);
219
257
  },
220
258
  STAIRS: 'stairs',
221
259
  stairs(id) {
222
- let endpoint = `/${exports.Endpoint.STAIRS}/`;
223
- if (id) {
224
- endpoint += `${encode(String(id))}/`;
225
- }
226
- return endpoint;
260
+ return mapDataEndpoint('stairs', id);
227
261
  },
228
262
  TYPES: 'types',
229
263
  UPDATES: 'updates',
230
264
  updates(id) {
231
- let endpoint = `/${exports.Endpoint.UPDATES}/`;
232
- if (id) {
265
+ let endpoint = '/api/v2/updates/';
266
+ if (id !== undefined) {
233
267
  endpoint += `${encode(String(id))}/`;
234
268
  }
235
269
  return endpoint;
236
270
  },
271
+ Updates: {
272
+ fetch() {
273
+ return '/api/v2/updates/fetch/';
274
+ },
275
+ },
237
276
  };
@@ -1,11 +1,13 @@
1
1
  import type { APIClient } from '@ffflorian/api-client';
2
- import type { ClientOptions, Editor } from '../interfaces/';
2
+ import type { ClientOptions, Editor, EditorBeaconsLookup, EditorGeometries, GeometryStyles } from '../interfaces/';
3
3
  import { APIBase } from './APIBase';
4
4
  export declare class EditorAPI extends APIBase {
5
5
  constructor(apiClient: APIClient, options: ClientOptions);
6
- /**
7
- * @param id The id to get
8
- */
9
- getById(id: number): Promise<Editor>;
6
+ getBeaconsLookup(): Promise<EditorBeaconsLookup>;
7
+ getBounds(): Promise<Editor>;
8
+ getById(_id: number): Promise<Editor>;
9
+ getGeometryStyles(): Promise<GeometryStyles>;
10
+ getLevelGeometries(levelId: number | string, updateCacheKey?: string): Promise<EditorGeometries>;
10
11
  getList(): Promise<Editor[]>;
12
+ getSpaceGeometries(spaceId: number | string, updateCacheKey?: string): Promise<EditorGeometries>;
11
13
  }
@@ -16,22 +16,57 @@ class EditorAPI extends APIBase_1.APIBase {
16
16
  constructor(apiClient, options) {
17
17
  super(apiClient, options);
18
18
  }
19
- /**
20
- * @param id The id to get
21
- */
22
- getById(id) {
19
+ getBeaconsLookup() {
23
20
  return __awaiter(this, void 0, void 0, function* () {
24
- const endpoint = Endpoints_1.Endpoint.editor(id);
21
+ const endpoint = Endpoints_1.Endpoint.Editor.beaconsLookup();
25
22
  const { data } = yield this.apiClient.get(endpoint);
26
23
  return data;
27
24
  });
28
25
  }
29
- getList() {
26
+ getBounds() {
30
27
  return __awaiter(this, void 0, void 0, function* () {
31
- const endpoint = Endpoints_1.Endpoint.editor();
28
+ const endpoint = Endpoints_1.Endpoint.Editor.bounds();
32
29
  const { data } = yield this.apiClient.get(endpoint);
33
30
  return data;
34
31
  });
35
32
  }
33
+ getById(_id) {
34
+ return __awaiter(this, void 0, void 0, function* () {
35
+ return this.getBounds();
36
+ });
37
+ }
38
+ getGeometryStyles() {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ const endpoint = Endpoints_1.Endpoint.Editor.geometryStyles();
41
+ const { data } = yield this.apiClient.get(endpoint);
42
+ return data;
43
+ });
44
+ }
45
+ getLevelGeometries(levelId, updateCacheKey) {
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ const endpoint = Endpoints_1.Endpoint.Editor.levelGeometries(levelId);
48
+ const requestPath = updateCacheKey
49
+ ? `${endpoint}?update_cache_key=${encodeURIComponent(updateCacheKey)}`
50
+ : endpoint;
51
+ const { data } = yield this.apiClient.get(requestPath);
52
+ return data;
53
+ });
54
+ }
55
+ getList() {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ const bounds = yield this.getBounds();
58
+ return [bounds];
59
+ });
60
+ }
61
+ getSpaceGeometries(spaceId, updateCacheKey) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const endpoint = Endpoints_1.Endpoint.Editor.spaceGeometries(spaceId);
64
+ const requestPath = updateCacheKey
65
+ ? `${endpoint}?update_cache_key=${encodeURIComponent(updateCacheKey)}`
66
+ : endpoint;
67
+ const { data } = yield this.apiClient.get(requestPath);
68
+ return data;
69
+ });
70
+ }
36
71
  }
37
72
  exports.EditorAPI = EditorAPI;
@@ -16,7 +16,7 @@ export declare class LocationsAPI extends APIBase {
16
16
  getDetails(slug: string): Promise<LocationDetails>;
17
17
  getGeometry(id: number): Promise<LocationGeometry>;
18
18
  getGeometry(slug: string): Promise<LocationGeometry>;
19
- getList(): Promise<Location[]>;
19
+ getList(geometry?: boolean): Promise<Location[]>;
20
20
  getLocation(id: number): Promise<Location>;
21
21
  getLocation(slug: string): Promise<Location>;
22
22
  getTypes(): Promise<LocationType[]>;
@@ -39,10 +39,11 @@ class LocationsAPI extends APIBase_1.APIBase {
39
39
  return data;
40
40
  });
41
41
  }
42
- getList() {
42
+ getList(geometry) {
43
43
  return __awaiter(this, void 0, void 0, function* () {
44
44
  const endpoint = Endpoints_1.Endpoint.Location.locations();
45
- const { data } = yield this.apiClient.get(endpoint);
45
+ const requestPath = geometry === undefined ? endpoint : `${endpoint}?geometry=${String(geometry)}`;
46
+ const { data } = yield this.apiClient.get(requestPath);
46
47
  return data;
47
48
  });
48
49
  }
@@ -1,8 +1,23 @@
1
1
  import type { APIClient } from '@ffflorian/api-client';
2
- import type { Bounds, ClientOptions } from '../interfaces/';
2
+ import type { Bounds, ClientOptions, MapLegend, MapLocation, MapLocationDisplay, MapLocationGeometry, MapLocationOptions, MapLocationQueryOptions, MapSettings, Position, Projection, Quest } from '../interfaces/';
3
3
  import { APIBase } from './APIBase';
4
4
  export declare class MapAPI extends APIBase {
5
5
  constructor(apiClient: APIClient, options: ClientOptions);
6
6
  /** /bounds/ returns the maximum bounds of the map */
7
7
  getBounds(): Promise<Bounds>;
8
+ getLegend(themeId: number | string): Promise<MapLegend>;
9
+ getLoad(): Promise<Record<string, number>>;
10
+ getLocation(idOrSlug: number | string, options?: MapLocationOptions): Promise<MapLocation>;
11
+ getLocationDisplay(idOrSlug: number | string): Promise<MapLocationDisplay>;
12
+ getLocationGeometry(idOrSlug: number | string): Promise<MapLocationGeometry>;
13
+ getLocations(options?: MapLocationQueryOptions): Promise<MapLocation[]>;
14
+ getLocationsFull(options?: MapLocationQueryOptions): Promise<MapLocation[]>;
15
+ getMyPositions(): Promise<Position[]>;
16
+ getPositionById(positionId: number | string): Promise<Position>;
17
+ getProjection(): Promise<Projection>;
18
+ getQuests(questType?: string, level?: number): Promise<Quest[]>;
19
+ getSettings(): Promise<MapSettings>;
20
+ getWifiData(): Promise<Record<string, unknown>>;
21
+ setPosition(positionId: number | string, coordinatesId: null | string, timeout?: null | number): Promise<Position>;
22
+ updateLoad(aps: Record<string, number>): Promise<void>;
8
23
  }