@mtnmanager/sdk 1.4.3 → 1.4.5
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 +3 -2
- package/dist/apis/MtnManagerApi.d.ts +43 -1
- package/dist/apis/MtnManagerApi.js +61 -14
- package/dist/esm/apis/MtnManagerApi.d.ts +43 -1
- package/dist/esm/apis/MtnManagerApi.js +49 -2
- package/dist/esm/models/Amenity.d.ts +15 -6
- package/dist/esm/models/Amenity.js +5 -0
- package/dist/esm/models/TrailMap.d.ts +7 -0
- package/dist/esm/models/TrailMap.js +4 -0
- package/dist/esm/models/TrailMapSummary.d.ts +7 -0
- package/dist/esm/models/TrailMapSummary.js +4 -0
- package/dist/models/Amenity.d.ts +15 -6
- package/dist/models/Amenity.js +5 -0
- package/dist/models/TrailMap.d.ts +7 -0
- package/dist/models/TrailMap.js +4 -0
- package/dist/models/TrailMapSummary.d.ts +7 -0
- package/dist/models/TrailMapSummary.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
Configuration,
|
|
21
21
|
MtnManagerApi,
|
|
22
22
|
} from '@mtnmanager/sdk';
|
|
23
|
-
import type {
|
|
23
|
+
import type { GetAmenitiesRequest } from '@mtnmanager/sdk';
|
|
24
24
|
|
|
25
25
|
async function example() {
|
|
26
26
|
console.log("🚀 Testing @mtnmanager/sdk SDK...");
|
|
@@ -30,7 +30,7 @@ async function example() {
|
|
|
30
30
|
const api = new MtnManagerApi(config);
|
|
31
31
|
|
|
32
32
|
try {
|
|
33
|
-
const data = await api.
|
|
33
|
+
const data = await api.getAmenities();
|
|
34
34
|
console.log(data);
|
|
35
35
|
} catch (error) {
|
|
36
36
|
console.error(error);
|
|
@@ -50,6 +50,7 @@ All URIs are relative to *https://your-resort.mtnmanager.com*
|
|
|
50
50
|
|
|
51
51
|
| Class | Method | HTTP request | Description
|
|
52
52
|
| ----- | ------ | ------------ | -------------
|
|
53
|
+
*MtnManagerApi* | [**getAmenities**](docs/MtnManagerApi.md#getamenities) | **GET** /api/v1/report/amenities | Get amenities
|
|
53
54
|
*MtnManagerApi* | [**getFullReport**](docs/MtnManagerApi.md#getfullreport) | **GET** /api/v1/report | Get full report
|
|
54
55
|
*MtnManagerApi* | [**getHours**](docs/MtnManagerApi.md#gethours) | **GET** /api/v1/report/hours | Get operating hours
|
|
55
56
|
*MtnManagerApi* | [**getLifts**](docs/MtnManagerApi.md#getlifts) | **GET** /api/v1/report/lifts | Get lifts
|
|
@@ -10,7 +10,19 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import
|
|
13
|
+
import { type Amenity } from '../models/Amenity';
|
|
14
|
+
import { type FullReport } from '../models/FullReport';
|
|
15
|
+
import { type Lift } from '../models/Lift';
|
|
16
|
+
import { type OperatingHours } from '../models/OperatingHours';
|
|
17
|
+
import { type Overview } from '../models/Overview';
|
|
18
|
+
import { type ParkingLot } from '../models/ParkingLot';
|
|
19
|
+
import { type Run } from '../models/Run';
|
|
20
|
+
import { type SnowReport } from '../models/SnowReport';
|
|
21
|
+
import { type SummerTrail } from '../models/SummerTrail';
|
|
22
|
+
import { type TerrainPark } from '../models/TerrainPark';
|
|
23
|
+
import { type TrailMap } from '../models/TrailMap';
|
|
24
|
+
import { type TrailMapSummary } from '../models/TrailMapSummary';
|
|
25
|
+
import { type Weather } from '../models/Weather';
|
|
14
26
|
export interface GetTrailMapRequest {
|
|
15
27
|
uuid: string;
|
|
16
28
|
}
|
|
@@ -21,6 +33,24 @@ export interface GetTrailMapRequest {
|
|
|
21
33
|
* @interface MtnManagerApiInterface
|
|
22
34
|
*/
|
|
23
35
|
export interface MtnManagerApiInterface {
|
|
36
|
+
/**
|
|
37
|
+
* Creates request options for getAmenities without sending the request
|
|
38
|
+
* @throws {RequiredError}
|
|
39
|
+
* @memberof MtnManagerApiInterface
|
|
40
|
+
*/
|
|
41
|
+
getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @summary Get amenities
|
|
45
|
+
* @param {*} [options] Override http request option.
|
|
46
|
+
* @throws {RequiredError}
|
|
47
|
+
* @memberof MtnManagerApiInterface
|
|
48
|
+
*/
|
|
49
|
+
getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
|
|
50
|
+
/**
|
|
51
|
+
* Get amenities
|
|
52
|
+
*/
|
|
53
|
+
getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
|
|
24
54
|
/**
|
|
25
55
|
* Creates request options for getFullReport without sending the request
|
|
26
56
|
* @throws {RequiredError}
|
|
@@ -244,6 +274,18 @@ export interface MtnManagerApiInterface {
|
|
|
244
274
|
*
|
|
245
275
|
*/
|
|
246
276
|
export declare class MtnManagerApi extends runtime.BaseAPI implements MtnManagerApiInterface {
|
|
277
|
+
/**
|
|
278
|
+
* Creates request options for getAmenities without sending the request
|
|
279
|
+
*/
|
|
280
|
+
getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
281
|
+
/**
|
|
282
|
+
* Get amenities
|
|
283
|
+
*/
|
|
284
|
+
getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
|
|
285
|
+
/**
|
|
286
|
+
* Get amenities
|
|
287
|
+
*/
|
|
288
|
+
getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
|
|
247
289
|
/**
|
|
248
290
|
* Creates request options for getFullReport without sending the request
|
|
249
291
|
*/
|
|
@@ -24,11 +24,58 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.MtnManagerApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
|
-
const
|
|
27
|
+
const Amenity_1 = require("../models/Amenity");
|
|
28
|
+
const FullReport_1 = require("../models/FullReport");
|
|
29
|
+
const Lift_1 = require("../models/Lift");
|
|
30
|
+
const OperatingHours_1 = require("../models/OperatingHours");
|
|
31
|
+
const Overview_1 = require("../models/Overview");
|
|
32
|
+
const ParkingLot_1 = require("../models/ParkingLot");
|
|
33
|
+
const Run_1 = require("../models/Run");
|
|
34
|
+
const SnowReport_1 = require("../models/SnowReport");
|
|
35
|
+
const SummerTrail_1 = require("../models/SummerTrail");
|
|
36
|
+
const TerrainPark_1 = require("../models/TerrainPark");
|
|
37
|
+
const TrailMap_1 = require("../models/TrailMap");
|
|
38
|
+
const TrailMapSummary_1 = require("../models/TrailMapSummary");
|
|
39
|
+
const Weather_1 = require("../models/Weather");
|
|
28
40
|
/**
|
|
29
41
|
*
|
|
30
42
|
*/
|
|
31
43
|
class MtnManagerApi extends runtime.BaseAPI {
|
|
44
|
+
/**
|
|
45
|
+
* Creates request options for getAmenities without sending the request
|
|
46
|
+
*/
|
|
47
|
+
getAmenitiesRequestOpts() {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
const queryParameters = {};
|
|
50
|
+
const headerParameters = {};
|
|
51
|
+
let urlPath = `/api/v1/report/amenities`;
|
|
52
|
+
return {
|
|
53
|
+
path: urlPath,
|
|
54
|
+
method: 'GET',
|
|
55
|
+
headers: headerParameters,
|
|
56
|
+
query: queryParameters,
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get amenities
|
|
62
|
+
*/
|
|
63
|
+
getAmenitiesRaw(initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const requestOptions = yield this.getAmenitiesRequestOpts();
|
|
66
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
67
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(Amenity_1.AmenityFromJSON));
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Get amenities
|
|
72
|
+
*/
|
|
73
|
+
getAmenities(initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const response = yield this.getAmenitiesRaw(initOverrides);
|
|
76
|
+
return yield response.value();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
32
79
|
/**
|
|
33
80
|
* Creates request options for getFullReport without sending the request
|
|
34
81
|
*/
|
|
@@ -52,7 +99,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
52
99
|
return __awaiter(this, void 0, void 0, function* () {
|
|
53
100
|
const requestOptions = yield this.getFullReportRequestOpts();
|
|
54
101
|
const response = yield this.request(requestOptions, initOverrides);
|
|
55
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
102
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, FullReport_1.FullReportFromJSON)(jsonValue));
|
|
56
103
|
});
|
|
57
104
|
}
|
|
58
105
|
/**
|
|
@@ -87,7 +134,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
87
134
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
135
|
const requestOptions = yield this.getHoursRequestOpts();
|
|
89
136
|
const response = yield this.request(requestOptions, initOverrides);
|
|
90
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
137
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, OperatingHours_1.OperatingHoursFromJSON)(jsonValue));
|
|
91
138
|
});
|
|
92
139
|
}
|
|
93
140
|
/**
|
|
@@ -122,7 +169,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
122
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
170
|
const requestOptions = yield this.getLiftsRequestOpts();
|
|
124
171
|
const response = yield this.request(requestOptions, initOverrides);
|
|
125
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(Lift_1.LiftFromJSON));
|
|
126
173
|
});
|
|
127
174
|
}
|
|
128
175
|
/**
|
|
@@ -157,7 +204,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
157
204
|
return __awaiter(this, void 0, void 0, function* () {
|
|
158
205
|
const requestOptions = yield this.getOverviewRequestOpts();
|
|
159
206
|
const response = yield this.request(requestOptions, initOverrides);
|
|
160
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
207
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Overview_1.OverviewFromJSON)(jsonValue));
|
|
161
208
|
});
|
|
162
209
|
}
|
|
163
210
|
/**
|
|
@@ -192,7 +239,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
192
239
|
return __awaiter(this, void 0, void 0, function* () {
|
|
193
240
|
const requestOptions = yield this.getParkingLotsRequestOpts();
|
|
194
241
|
const response = yield this.request(requestOptions, initOverrides);
|
|
195
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(
|
|
242
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(ParkingLot_1.ParkingLotFromJSON));
|
|
196
243
|
});
|
|
197
244
|
}
|
|
198
245
|
/**
|
|
@@ -227,7 +274,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
227
274
|
return __awaiter(this, void 0, void 0, function* () {
|
|
228
275
|
const requestOptions = yield this.getRunsRequestOpts();
|
|
229
276
|
const response = yield this.request(requestOptions, initOverrides);
|
|
230
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(
|
|
277
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(Run_1.RunFromJSON));
|
|
231
278
|
});
|
|
232
279
|
}
|
|
233
280
|
/**
|
|
@@ -262,7 +309,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
262
309
|
return __awaiter(this, void 0, void 0, function* () {
|
|
263
310
|
const requestOptions = yield this.getSnowRequestOpts();
|
|
264
311
|
const response = yield this.request(requestOptions, initOverrides);
|
|
265
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(
|
|
312
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SnowReport_1.SnowReportFromJSON));
|
|
266
313
|
});
|
|
267
314
|
}
|
|
268
315
|
/**
|
|
@@ -297,7 +344,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
297
344
|
return __awaiter(this, void 0, void 0, function* () {
|
|
298
345
|
const requestOptions = yield this.getSummerTrailsRequestOpts();
|
|
299
346
|
const response = yield this.request(requestOptions, initOverrides);
|
|
300
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(
|
|
347
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(SummerTrail_1.SummerTrailFromJSON));
|
|
301
348
|
});
|
|
302
349
|
}
|
|
303
350
|
/**
|
|
@@ -332,7 +379,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
332
379
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
380
|
const requestOptions = yield this.getTerrainParksRequestOpts();
|
|
334
381
|
const response = yield this.request(requestOptions, initOverrides);
|
|
335
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(
|
|
382
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TerrainPark_1.TerrainParkFromJSON));
|
|
336
383
|
});
|
|
337
384
|
}
|
|
338
385
|
/**
|
|
@@ -355,7 +402,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
355
402
|
const queryParameters = {};
|
|
356
403
|
const headerParameters = {};
|
|
357
404
|
let urlPath = `/api/v1/report/trail-map/{uuid}`;
|
|
358
|
-
urlPath = urlPath.replace(
|
|
405
|
+
urlPath = urlPath.replace('{uuid}', encodeURIComponent(String(requestParameters['uuid'])));
|
|
359
406
|
return {
|
|
360
407
|
path: urlPath,
|
|
361
408
|
method: 'GET',
|
|
@@ -371,7 +418,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
371
418
|
return __awaiter(this, void 0, void 0, function* () {
|
|
372
419
|
const requestOptions = yield this.getTrailMapRequestOpts(requestParameters);
|
|
373
420
|
const response = yield this.request(requestOptions, initOverrides);
|
|
374
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
421
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, TrailMap_1.TrailMapFromJSON)(jsonValue));
|
|
375
422
|
});
|
|
376
423
|
}
|
|
377
424
|
/**
|
|
@@ -406,7 +453,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
406
453
|
return __awaiter(this, void 0, void 0, function* () {
|
|
407
454
|
const requestOptions = yield this.getTrailMapsRequestOpts();
|
|
408
455
|
const response = yield this.request(requestOptions, initOverrides);
|
|
409
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(
|
|
456
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrailMapSummary_1.TrailMapSummaryFromJSON));
|
|
410
457
|
});
|
|
411
458
|
}
|
|
412
459
|
/**
|
|
@@ -441,7 +488,7 @@ class MtnManagerApi extends runtime.BaseAPI {
|
|
|
441
488
|
return __awaiter(this, void 0, void 0, function* () {
|
|
442
489
|
const requestOptions = yield this.getWeatherRequestOpts();
|
|
443
490
|
const response = yield this.request(requestOptions, initOverrides);
|
|
444
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0,
|
|
491
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, Weather_1.WeatherFromJSON)(jsonValue));
|
|
445
492
|
});
|
|
446
493
|
}
|
|
447
494
|
/**
|
|
@@ -10,7 +10,19 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import
|
|
13
|
+
import { type Amenity } from '../models/Amenity';
|
|
14
|
+
import { type FullReport } from '../models/FullReport';
|
|
15
|
+
import { type Lift } from '../models/Lift';
|
|
16
|
+
import { type OperatingHours } from '../models/OperatingHours';
|
|
17
|
+
import { type Overview } from '../models/Overview';
|
|
18
|
+
import { type ParkingLot } from '../models/ParkingLot';
|
|
19
|
+
import { type Run } from '../models/Run';
|
|
20
|
+
import { type SnowReport } from '../models/SnowReport';
|
|
21
|
+
import { type SummerTrail } from '../models/SummerTrail';
|
|
22
|
+
import { type TerrainPark } from '../models/TerrainPark';
|
|
23
|
+
import { type TrailMap } from '../models/TrailMap';
|
|
24
|
+
import { type TrailMapSummary } from '../models/TrailMapSummary';
|
|
25
|
+
import { type Weather } from '../models/Weather';
|
|
14
26
|
export interface GetTrailMapRequest {
|
|
15
27
|
uuid: string;
|
|
16
28
|
}
|
|
@@ -21,6 +33,24 @@ export interface GetTrailMapRequest {
|
|
|
21
33
|
* @interface MtnManagerApiInterface
|
|
22
34
|
*/
|
|
23
35
|
export interface MtnManagerApiInterface {
|
|
36
|
+
/**
|
|
37
|
+
* Creates request options for getAmenities without sending the request
|
|
38
|
+
* @throws {RequiredError}
|
|
39
|
+
* @memberof MtnManagerApiInterface
|
|
40
|
+
*/
|
|
41
|
+
getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @summary Get amenities
|
|
45
|
+
* @param {*} [options] Override http request option.
|
|
46
|
+
* @throws {RequiredError}
|
|
47
|
+
* @memberof MtnManagerApiInterface
|
|
48
|
+
*/
|
|
49
|
+
getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
|
|
50
|
+
/**
|
|
51
|
+
* Get amenities
|
|
52
|
+
*/
|
|
53
|
+
getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
|
|
24
54
|
/**
|
|
25
55
|
* Creates request options for getFullReport without sending the request
|
|
26
56
|
* @throws {RequiredError}
|
|
@@ -244,6 +274,18 @@ export interface MtnManagerApiInterface {
|
|
|
244
274
|
*
|
|
245
275
|
*/
|
|
246
276
|
export declare class MtnManagerApi extends runtime.BaseAPI implements MtnManagerApiInterface {
|
|
277
|
+
/**
|
|
278
|
+
* Creates request options for getAmenities without sending the request
|
|
279
|
+
*/
|
|
280
|
+
getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
281
|
+
/**
|
|
282
|
+
* Get amenities
|
|
283
|
+
*/
|
|
284
|
+
getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
|
|
285
|
+
/**
|
|
286
|
+
* Get amenities
|
|
287
|
+
*/
|
|
288
|
+
getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
|
|
247
289
|
/**
|
|
248
290
|
* Creates request options for getFullReport without sending the request
|
|
249
291
|
*/
|
|
@@ -21,11 +21,58 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import {
|
|
24
|
+
import { AmenityFromJSON, } from '../models/Amenity';
|
|
25
|
+
import { FullReportFromJSON, } from '../models/FullReport';
|
|
26
|
+
import { LiftFromJSON, } from '../models/Lift';
|
|
27
|
+
import { OperatingHoursFromJSON, } from '../models/OperatingHours';
|
|
28
|
+
import { OverviewFromJSON, } from '../models/Overview';
|
|
29
|
+
import { ParkingLotFromJSON, } from '../models/ParkingLot';
|
|
30
|
+
import { RunFromJSON, } from '../models/Run';
|
|
31
|
+
import { SnowReportFromJSON, } from '../models/SnowReport';
|
|
32
|
+
import { SummerTrailFromJSON, } from '../models/SummerTrail';
|
|
33
|
+
import { TerrainParkFromJSON, } from '../models/TerrainPark';
|
|
34
|
+
import { TrailMapFromJSON, } from '../models/TrailMap';
|
|
35
|
+
import { TrailMapSummaryFromJSON, } from '../models/TrailMapSummary';
|
|
36
|
+
import { WeatherFromJSON, } from '../models/Weather';
|
|
25
37
|
/**
|
|
26
38
|
*
|
|
27
39
|
*/
|
|
28
40
|
export class MtnManagerApi extends runtime.BaseAPI {
|
|
41
|
+
/**
|
|
42
|
+
* Creates request options for getAmenities without sending the request
|
|
43
|
+
*/
|
|
44
|
+
getAmenitiesRequestOpts() {
|
|
45
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
+
const queryParameters = {};
|
|
47
|
+
const headerParameters = {};
|
|
48
|
+
let urlPath = `/api/v1/report/amenities`;
|
|
49
|
+
return {
|
|
50
|
+
path: urlPath,
|
|
51
|
+
method: 'GET',
|
|
52
|
+
headers: headerParameters,
|
|
53
|
+
query: queryParameters,
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Get amenities
|
|
59
|
+
*/
|
|
60
|
+
getAmenitiesRaw(initOverrides) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const requestOptions = yield this.getAmenitiesRequestOpts();
|
|
63
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
64
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AmenityFromJSON));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Get amenities
|
|
69
|
+
*/
|
|
70
|
+
getAmenities(initOverrides) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const response = yield this.getAmenitiesRaw(initOverrides);
|
|
73
|
+
return yield response.value();
|
|
74
|
+
});
|
|
75
|
+
}
|
|
29
76
|
/**
|
|
30
77
|
* Creates request options for getFullReport without sending the request
|
|
31
78
|
*/
|
|
@@ -352,7 +399,7 @@ export class MtnManagerApi extends runtime.BaseAPI {
|
|
|
352
399
|
const queryParameters = {};
|
|
353
400
|
const headerParameters = {};
|
|
354
401
|
let urlPath = `/api/v1/report/trail-map/{uuid}`;
|
|
355
|
-
urlPath = urlPath.replace(
|
|
402
|
+
urlPath = urlPath.replace('{uuid}', encodeURIComponent(String(requestParameters['uuid'])));
|
|
356
403
|
return {
|
|
357
404
|
path: urlPath,
|
|
358
405
|
method: 'GET',
|
|
@@ -10,38 +10,40 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { AmenityCategory } from './AmenityCategory';
|
|
13
|
+
import type { Schedule } from './Schedule';
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* Represents an amenity at the resort (e.g. lodge, restaurant, ski school)
|
|
16
|
+
* with its category, description, website, and hours.
|
|
15
17
|
* @export
|
|
16
18
|
* @interface Amenity
|
|
17
19
|
*/
|
|
18
20
|
export interface Amenity {
|
|
19
21
|
/**
|
|
20
|
-
*
|
|
22
|
+
* Description of the amenity.
|
|
21
23
|
* @type {string}
|
|
22
24
|
* @memberof Amenity
|
|
23
25
|
*/
|
|
24
26
|
description: string;
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
28
|
+
* Unique identifier for the amenity.
|
|
27
29
|
* @type {string}
|
|
28
30
|
* @memberof Amenity
|
|
29
31
|
*/
|
|
30
32
|
uuid: string;
|
|
31
33
|
/**
|
|
32
|
-
*
|
|
34
|
+
* Display name of the amenity.
|
|
33
35
|
* @type {string}
|
|
34
36
|
* @memberof Amenity
|
|
35
37
|
*/
|
|
36
38
|
name: string;
|
|
37
39
|
/**
|
|
38
|
-
*
|
|
40
|
+
* Category classification (e.g. restaurant, lodge, ski_school).
|
|
39
41
|
* @type {AmenityCategory}
|
|
40
42
|
* @memberof Amenity
|
|
41
43
|
*/
|
|
42
44
|
category: AmenityCategory;
|
|
43
45
|
/**
|
|
44
|
-
*
|
|
46
|
+
* Website URL for the amenity, if available.
|
|
45
47
|
* @type {string}
|
|
46
48
|
* @memberof Amenity
|
|
47
49
|
*/
|
|
@@ -58,6 +60,13 @@ export interface Amenity {
|
|
|
58
60
|
* @memberof Amenity
|
|
59
61
|
*/
|
|
60
62
|
closesAt?: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Recurring operating schedules for this amenity (e.g. "Saturday & Sunday,
|
|
65
|
+
* 9:00 a.m. to 4:00 p.m."), with both human-readable and structured fields.
|
|
66
|
+
* @type {Array<Schedule>}
|
|
67
|
+
* @memberof Amenity
|
|
68
|
+
*/
|
|
69
|
+
schedules: Array<Schedule>;
|
|
61
70
|
}
|
|
62
71
|
/**
|
|
63
72
|
* Check if a given object implements the Amenity interface.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { AmenityCategoryFromJSON, AmenityCategoryToJSON, } from './AmenityCategory';
|
|
15
|
+
import { ScheduleFromJSON, ScheduleToJSON, } from './Schedule';
|
|
15
16
|
/**
|
|
16
17
|
* Check if a given object implements the Amenity interface.
|
|
17
18
|
*/
|
|
@@ -26,6 +27,8 @@ export function instanceOfAmenity(value) {
|
|
|
26
27
|
return false;
|
|
27
28
|
if (!('website' in value) || value['website'] === undefined)
|
|
28
29
|
return false;
|
|
30
|
+
if (!('schedules' in value) || value['schedules'] === undefined)
|
|
31
|
+
return false;
|
|
29
32
|
return true;
|
|
30
33
|
}
|
|
31
34
|
export function AmenityFromJSON(json) {
|
|
@@ -43,6 +46,7 @@ export function AmenityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
46
|
'website': json['website'],
|
|
44
47
|
'opensAt': json['opens_at'] == null ? undefined : json['opens_at'],
|
|
45
48
|
'closesAt': json['closes_at'] == null ? undefined : json['closes_at'],
|
|
49
|
+
'schedules': (json['schedules'].map(ScheduleFromJSON)),
|
|
46
50
|
};
|
|
47
51
|
}
|
|
48
52
|
export function AmenityToJSON(json) {
|
|
@@ -60,5 +64,6 @@ export function AmenityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
60
64
|
'website': value['website'],
|
|
61
65
|
'opens_at': value['opensAt'],
|
|
62
66
|
'closes_at': value['closesAt'],
|
|
67
|
+
'schedules': (value['schedules'].map(ScheduleToJSON)),
|
|
63
68
|
};
|
|
64
69
|
}
|
|
@@ -49,6 +49,13 @@ export interface TrailMap {
|
|
|
49
49
|
* @memberof TrailMap
|
|
50
50
|
*/
|
|
51
51
|
displayOrder: number;
|
|
52
|
+
/**
|
|
53
|
+
* Monotonically incremented on every update. Clients can compare this
|
|
54
|
+
* against a cached value to decide whether to reload the trail map.
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof TrailMap
|
|
57
|
+
*/
|
|
58
|
+
version: number;
|
|
52
59
|
/**
|
|
53
60
|
*
|
|
54
61
|
* @type {string}
|
|
@@ -29,6 +29,8 @@ export function instanceOfTrailMap(value) {
|
|
|
29
29
|
return false;
|
|
30
30
|
if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
|
|
31
31
|
return false;
|
|
32
|
+
if (!('version' in value) || value['version'] === undefined)
|
|
33
|
+
return false;
|
|
32
34
|
if ((!('backgroundImageUrl' in value) && !('background_image_url' in value)) || (value['backgroundImageUrl'] === undefined && value['background_image_url'] === undefined))
|
|
33
35
|
return false;
|
|
34
36
|
if (!('resort' in value) || value['resort'] === undefined)
|
|
@@ -50,6 +52,7 @@ export function TrailMapFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
52
|
'slug': json['slug'],
|
|
51
53
|
'season': SeasonTypeFromJSON(json['season']),
|
|
52
54
|
'displayOrder': json['display_order'],
|
|
55
|
+
'version': json['version'],
|
|
53
56
|
'backgroundImageUrl': json['background_image_url'],
|
|
54
57
|
'resort': ResortInfoFromJSON(json['resort']),
|
|
55
58
|
'elements': (json['elements'].map(TrailMapElementFromJSON)),
|
|
@@ -69,6 +72,7 @@ export function TrailMapToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
69
72
|
'slug': value['slug'],
|
|
70
73
|
'season': SeasonTypeToJSON(value['season']),
|
|
71
74
|
'display_order': value['displayOrder'],
|
|
75
|
+
'version': value['version'],
|
|
72
76
|
'background_image_url': value['backgroundImageUrl'],
|
|
73
77
|
'resort': ResortInfoToJSON(value['resort']),
|
|
74
78
|
'elements': (value['elements'].map(TrailMapElementToJSON)),
|
|
@@ -41,6 +41,13 @@ export interface TrailMapSummary {
|
|
|
41
41
|
* @memberof TrailMapSummary
|
|
42
42
|
*/
|
|
43
43
|
displayOrder: number;
|
|
44
|
+
/**
|
|
45
|
+
* Monotonically incremented on every update. Clients can compare this
|
|
46
|
+
* against a cached value to decide whether to reload the trail map.
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @memberof TrailMapSummary
|
|
49
|
+
*/
|
|
50
|
+
version: number;
|
|
44
51
|
/**
|
|
45
52
|
*
|
|
46
53
|
* @type {string}
|
|
@@ -25,6 +25,8 @@ export function instanceOfTrailMapSummary(value) {
|
|
|
25
25
|
return false;
|
|
26
26
|
if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
|
|
27
27
|
return false;
|
|
28
|
+
if (!('version' in value) || value['version'] === undefined)
|
|
29
|
+
return false;
|
|
28
30
|
if ((!('hostedUrl' in value) && !('hosted_url' in value)) || (value['hostedUrl'] === undefined && value['hosted_url'] === undefined))
|
|
29
31
|
return false;
|
|
30
32
|
if ((!('entityUuids' in value) && !('entity_uuids' in value)) || (value['entityUuids'] === undefined && value['entity_uuids'] === undefined))
|
|
@@ -43,6 +45,7 @@ export function TrailMapSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
43
45
|
'name': json['name'],
|
|
44
46
|
'season': SeasonTypeFromJSON(json['season']),
|
|
45
47
|
'displayOrder': json['display_order'],
|
|
48
|
+
'version': json['version'],
|
|
46
49
|
'hostedUrl': json['hosted_url'],
|
|
47
50
|
'geoBounds': json['geo_bounds'] == null ? undefined : GeoBoundsFromJSON(json['geo_bounds']),
|
|
48
51
|
'entityUuids': json['entity_uuids'],
|
|
@@ -60,6 +63,7 @@ export function TrailMapSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
60
63
|
'name': value['name'],
|
|
61
64
|
'season': SeasonTypeToJSON(value['season']),
|
|
62
65
|
'display_order': value['displayOrder'],
|
|
66
|
+
'version': value['version'],
|
|
63
67
|
'hosted_url': value['hostedUrl'],
|
|
64
68
|
'geo_bounds': GeoBoundsToJSON(value['geoBounds']),
|
|
65
69
|
'entity_uuids': value['entityUuids'],
|
package/dist/models/Amenity.d.ts
CHANGED
|
@@ -10,38 +10,40 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { AmenityCategory } from './AmenityCategory';
|
|
13
|
+
import type { Schedule } from './Schedule';
|
|
13
14
|
/**
|
|
14
|
-
*
|
|
15
|
+
* Represents an amenity at the resort (e.g. lodge, restaurant, ski school)
|
|
16
|
+
* with its category, description, website, and hours.
|
|
15
17
|
* @export
|
|
16
18
|
* @interface Amenity
|
|
17
19
|
*/
|
|
18
20
|
export interface Amenity {
|
|
19
21
|
/**
|
|
20
|
-
*
|
|
22
|
+
* Description of the amenity.
|
|
21
23
|
* @type {string}
|
|
22
24
|
* @memberof Amenity
|
|
23
25
|
*/
|
|
24
26
|
description: string;
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
28
|
+
* Unique identifier for the amenity.
|
|
27
29
|
* @type {string}
|
|
28
30
|
* @memberof Amenity
|
|
29
31
|
*/
|
|
30
32
|
uuid: string;
|
|
31
33
|
/**
|
|
32
|
-
*
|
|
34
|
+
* Display name of the amenity.
|
|
33
35
|
* @type {string}
|
|
34
36
|
* @memberof Amenity
|
|
35
37
|
*/
|
|
36
38
|
name: string;
|
|
37
39
|
/**
|
|
38
|
-
*
|
|
40
|
+
* Category classification (e.g. restaurant, lodge, ski_school).
|
|
39
41
|
* @type {AmenityCategory}
|
|
40
42
|
* @memberof Amenity
|
|
41
43
|
*/
|
|
42
44
|
category: AmenityCategory;
|
|
43
45
|
/**
|
|
44
|
-
*
|
|
46
|
+
* Website URL for the amenity, if available.
|
|
45
47
|
* @type {string}
|
|
46
48
|
* @memberof Amenity
|
|
47
49
|
*/
|
|
@@ -58,6 +60,13 @@ export interface Amenity {
|
|
|
58
60
|
* @memberof Amenity
|
|
59
61
|
*/
|
|
60
62
|
closesAt?: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* Recurring operating schedules for this amenity (e.g. "Saturday & Sunday,
|
|
65
|
+
* 9:00 a.m. to 4:00 p.m."), with both human-readable and structured fields.
|
|
66
|
+
* @type {Array<Schedule>}
|
|
67
|
+
* @memberof Amenity
|
|
68
|
+
*/
|
|
69
|
+
schedules: Array<Schedule>;
|
|
61
70
|
}
|
|
62
71
|
/**
|
|
63
72
|
* Check if a given object implements the Amenity interface.
|
package/dist/models/Amenity.js
CHANGED
|
@@ -19,6 +19,7 @@ exports.AmenityFromJSONTyped = AmenityFromJSONTyped;
|
|
|
19
19
|
exports.AmenityToJSON = AmenityToJSON;
|
|
20
20
|
exports.AmenityToJSONTyped = AmenityToJSONTyped;
|
|
21
21
|
const AmenityCategory_1 = require("./AmenityCategory");
|
|
22
|
+
const Schedule_1 = require("./Schedule");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the Amenity interface.
|
|
24
25
|
*/
|
|
@@ -33,6 +34,8 @@ function instanceOfAmenity(value) {
|
|
|
33
34
|
return false;
|
|
34
35
|
if (!('website' in value) || value['website'] === undefined)
|
|
35
36
|
return false;
|
|
37
|
+
if (!('schedules' in value) || value['schedules'] === undefined)
|
|
38
|
+
return false;
|
|
36
39
|
return true;
|
|
37
40
|
}
|
|
38
41
|
function AmenityFromJSON(json) {
|
|
@@ -50,6 +53,7 @@ function AmenityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
53
|
'website': json['website'],
|
|
51
54
|
'opensAt': json['opens_at'] == null ? undefined : json['opens_at'],
|
|
52
55
|
'closesAt': json['closes_at'] == null ? undefined : json['closes_at'],
|
|
56
|
+
'schedules': (json['schedules'].map(Schedule_1.ScheduleFromJSON)),
|
|
53
57
|
};
|
|
54
58
|
}
|
|
55
59
|
function AmenityToJSON(json) {
|
|
@@ -67,5 +71,6 @@ function AmenityToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
67
71
|
'website': value['website'],
|
|
68
72
|
'opens_at': value['opensAt'],
|
|
69
73
|
'closes_at': value['closesAt'],
|
|
74
|
+
'schedules': (value['schedules'].map(Schedule_1.ScheduleToJSON)),
|
|
70
75
|
};
|
|
71
76
|
}
|
|
@@ -49,6 +49,13 @@ export interface TrailMap {
|
|
|
49
49
|
* @memberof TrailMap
|
|
50
50
|
*/
|
|
51
51
|
displayOrder: number;
|
|
52
|
+
/**
|
|
53
|
+
* Monotonically incremented on every update. Clients can compare this
|
|
54
|
+
* against a cached value to decide whether to reload the trail map.
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof TrailMap
|
|
57
|
+
*/
|
|
58
|
+
version: number;
|
|
52
59
|
/**
|
|
53
60
|
*
|
|
54
61
|
* @type {string}
|
package/dist/models/TrailMap.js
CHANGED
|
@@ -36,6 +36,8 @@ function instanceOfTrailMap(value) {
|
|
|
36
36
|
return false;
|
|
37
37
|
if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
|
|
38
38
|
return false;
|
|
39
|
+
if (!('version' in value) || value['version'] === undefined)
|
|
40
|
+
return false;
|
|
39
41
|
if ((!('backgroundImageUrl' in value) && !('background_image_url' in value)) || (value['backgroundImageUrl'] === undefined && value['background_image_url'] === undefined))
|
|
40
42
|
return false;
|
|
41
43
|
if (!('resort' in value) || value['resort'] === undefined)
|
|
@@ -57,6 +59,7 @@ function TrailMapFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
59
|
'slug': json['slug'],
|
|
58
60
|
'season': (0, SeasonType_1.SeasonTypeFromJSON)(json['season']),
|
|
59
61
|
'displayOrder': json['display_order'],
|
|
62
|
+
'version': json['version'],
|
|
60
63
|
'backgroundImageUrl': json['background_image_url'],
|
|
61
64
|
'resort': (0, ResortInfo_1.ResortInfoFromJSON)(json['resort']),
|
|
62
65
|
'elements': (json['elements'].map(TrailMapElement_1.TrailMapElementFromJSON)),
|
|
@@ -76,6 +79,7 @@ function TrailMapToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
76
79
|
'slug': value['slug'],
|
|
77
80
|
'season': (0, SeasonType_1.SeasonTypeToJSON)(value['season']),
|
|
78
81
|
'display_order': value['displayOrder'],
|
|
82
|
+
'version': value['version'],
|
|
79
83
|
'background_image_url': value['backgroundImageUrl'],
|
|
80
84
|
'resort': (0, ResortInfo_1.ResortInfoToJSON)(value['resort']),
|
|
81
85
|
'elements': (value['elements'].map(TrailMapElement_1.TrailMapElementToJSON)),
|
|
@@ -41,6 +41,13 @@ export interface TrailMapSummary {
|
|
|
41
41
|
* @memberof TrailMapSummary
|
|
42
42
|
*/
|
|
43
43
|
displayOrder: number;
|
|
44
|
+
/**
|
|
45
|
+
* Monotonically incremented on every update. Clients can compare this
|
|
46
|
+
* against a cached value to decide whether to reload the trail map.
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @memberof TrailMapSummary
|
|
49
|
+
*/
|
|
50
|
+
version: number;
|
|
44
51
|
/**
|
|
45
52
|
*
|
|
46
53
|
* @type {string}
|
|
@@ -32,6 +32,8 @@ function instanceOfTrailMapSummary(value) {
|
|
|
32
32
|
return false;
|
|
33
33
|
if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
|
|
34
34
|
return false;
|
|
35
|
+
if (!('version' in value) || value['version'] === undefined)
|
|
36
|
+
return false;
|
|
35
37
|
if ((!('hostedUrl' in value) && !('hosted_url' in value)) || (value['hostedUrl'] === undefined && value['hosted_url'] === undefined))
|
|
36
38
|
return false;
|
|
37
39
|
if ((!('entityUuids' in value) && !('entity_uuids' in value)) || (value['entityUuids'] === undefined && value['entity_uuids'] === undefined))
|
|
@@ -50,6 +52,7 @@ function TrailMapSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
52
|
'name': json['name'],
|
|
51
53
|
'season': (0, SeasonType_1.SeasonTypeFromJSON)(json['season']),
|
|
52
54
|
'displayOrder': json['display_order'],
|
|
55
|
+
'version': json['version'],
|
|
53
56
|
'hostedUrl': json['hosted_url'],
|
|
54
57
|
'geoBounds': json['geo_bounds'] == null ? undefined : (0, GeoBounds_1.GeoBoundsFromJSON)(json['geo_bounds']),
|
|
55
58
|
'entityUuids': json['entity_uuids'],
|
|
@@ -67,6 +70,7 @@ function TrailMapSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
67
70
|
'name': value['name'],
|
|
68
71
|
'season': (0, SeasonType_1.SeasonTypeToJSON)(value['season']),
|
|
69
72
|
'display_order': value['displayOrder'],
|
|
73
|
+
'version': value['version'],
|
|
70
74
|
'hosted_url': value['hostedUrl'],
|
|
71
75
|
'geo_bounds': (0, GeoBounds_1.GeoBoundsToJSON)(value['geoBounds']),
|
|
72
76
|
'entity_uuids': value['entityUuids'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtnmanager/sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "SDK for interacting with the MtnManager API, providing real-time access to your ski resort's public operational data.",
|
|
5
5
|
"author": "OpenAPI-Generator",
|
|
6
6
|
"main": "./dist/index.js",
|