@mtnmanager/sdk 1.4.2 → 1.4.4
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 +5 -2
- package/dist/apis/MtnManagerApi.d.ts +31 -1
- package/dist/apis/MtnManagerApi.js +35 -0
- package/dist/esm/apis/MtnManagerApi.d.ts +31 -1
- package/dist/esm/apis/MtnManagerApi.js +36 -1
- package/dist/esm/models/Amenity.d.ts +15 -6
- package/dist/esm/models/Amenity.js +5 -0
- package/dist/esm/models/GeoBounds.d.ts +57 -0
- package/dist/esm/models/GeoBounds.js +60 -0
- package/dist/esm/models/GeoPoint.d.ts +38 -0
- package/dist/esm/models/GeoPoint.js +47 -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 +23 -0
- package/dist/esm/models/TrailMapSummary.js +11 -0
- package/dist/esm/models/index.d.ts +2 -0
- package/dist/esm/models/index.js +2 -0
- package/dist/models/Amenity.d.ts +15 -6
- package/dist/models/Amenity.js +5 -0
- package/dist/models/GeoBounds.d.ts +57 -0
- package/dist/models/GeoBounds.js +67 -0
- package/dist/models/GeoPoint.d.ts +38 -0
- package/dist/models/GeoPoint.js +54 -0
- package/dist/models/TrailMap.d.ts +7 -0
- package/dist/models/TrailMap.js +4 -0
- package/dist/models/TrailMapSummary.d.ts +23 -0
- package/dist/models/TrailMapSummary.js +11 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -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
|
|
@@ -82,7 +83,9 @@ All URIs are relative to *https://your-resort.mtnmanager.com*
|
|
|
82
83
|
- [FeatureSize](docs/FeatureSize.md)
|
|
83
84
|
- [FeatureType](docs/FeatureType.md)
|
|
84
85
|
- [FullReport](docs/FullReport.md)
|
|
86
|
+
- [GeoBounds](docs/GeoBounds.md)
|
|
85
87
|
- [GeoControlPoint](docs/GeoControlPoint.md)
|
|
88
|
+
- [GeoPoint](docs/GeoPoint.md)
|
|
86
89
|
- [HourlyForecast](docs/HourlyForecast.md)
|
|
87
90
|
- [HourlyForecastImperial](docs/HourlyForecastImperial.md)
|
|
88
91
|
- [HourlyForecastMetric](docs/HourlyForecastMetric.md)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { FullReport, Lift, OperatingHours, Overview, ParkingLot, Run, SnowReport, SummerTrail, TerrainPark, TrailMap, TrailMapSummary, Weather } from '../models/index';
|
|
13
|
+
import type { Amenity, FullReport, Lift, OperatingHours, Overview, ParkingLot, Run, SnowReport, SummerTrail, TerrainPark, TrailMap, TrailMapSummary, Weather } from '../models/index';
|
|
14
14
|
export interface GetTrailMapRequest {
|
|
15
15
|
uuid: string;
|
|
16
16
|
}
|
|
@@ -21,6 +21,24 @@ export interface GetTrailMapRequest {
|
|
|
21
21
|
* @interface MtnManagerApiInterface
|
|
22
22
|
*/
|
|
23
23
|
export interface MtnManagerApiInterface {
|
|
24
|
+
/**
|
|
25
|
+
* Creates request options for getAmenities without sending the request
|
|
26
|
+
* @throws {RequiredError}
|
|
27
|
+
* @memberof MtnManagerApiInterface
|
|
28
|
+
*/
|
|
29
|
+
getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @summary Get amenities
|
|
33
|
+
* @param {*} [options] Override http request option.
|
|
34
|
+
* @throws {RequiredError}
|
|
35
|
+
* @memberof MtnManagerApiInterface
|
|
36
|
+
*/
|
|
37
|
+
getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
|
|
38
|
+
/**
|
|
39
|
+
* Get amenities
|
|
40
|
+
*/
|
|
41
|
+
getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
|
|
24
42
|
/**
|
|
25
43
|
* Creates request options for getFullReport without sending the request
|
|
26
44
|
* @throws {RequiredError}
|
|
@@ -244,6 +262,18 @@ export interface MtnManagerApiInterface {
|
|
|
244
262
|
*
|
|
245
263
|
*/
|
|
246
264
|
export declare class MtnManagerApi extends runtime.BaseAPI implements MtnManagerApiInterface {
|
|
265
|
+
/**
|
|
266
|
+
* Creates request options for getAmenities without sending the request
|
|
267
|
+
*/
|
|
268
|
+
getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
269
|
+
/**
|
|
270
|
+
* Get amenities
|
|
271
|
+
*/
|
|
272
|
+
getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
|
|
273
|
+
/**
|
|
274
|
+
* Get amenities
|
|
275
|
+
*/
|
|
276
|
+
getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
|
|
247
277
|
/**
|
|
248
278
|
* Creates request options for getFullReport without sending the request
|
|
249
279
|
*/
|
|
@@ -29,6 +29,41 @@ const index_1 = require("../models/index");
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
class MtnManagerApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Creates request options for getAmenities without sending the request
|
|
34
|
+
*/
|
|
35
|
+
getAmenitiesRequestOpts() {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
let urlPath = `/api/v1/report/amenities`;
|
|
40
|
+
return {
|
|
41
|
+
path: urlPath,
|
|
42
|
+
method: 'GET',
|
|
43
|
+
headers: headerParameters,
|
|
44
|
+
query: queryParameters,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Get amenities
|
|
50
|
+
*/
|
|
51
|
+
getAmenitiesRaw(initOverrides) {
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const requestOptions = yield this.getAmenitiesRequestOpts();
|
|
54
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
55
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AmenityFromJSON));
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Get amenities
|
|
60
|
+
*/
|
|
61
|
+
getAmenities(initOverrides) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
const response = yield this.getAmenitiesRaw(initOverrides);
|
|
64
|
+
return yield response.value();
|
|
65
|
+
});
|
|
66
|
+
}
|
|
32
67
|
/**
|
|
33
68
|
* Creates request options for getFullReport without sending the request
|
|
34
69
|
*/
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { FullReport, Lift, OperatingHours, Overview, ParkingLot, Run, SnowReport, SummerTrail, TerrainPark, TrailMap, TrailMapSummary, Weather } from '../models/index';
|
|
13
|
+
import type { Amenity, FullReport, Lift, OperatingHours, Overview, ParkingLot, Run, SnowReport, SummerTrail, TerrainPark, TrailMap, TrailMapSummary, Weather } from '../models/index';
|
|
14
14
|
export interface GetTrailMapRequest {
|
|
15
15
|
uuid: string;
|
|
16
16
|
}
|
|
@@ -21,6 +21,24 @@ export interface GetTrailMapRequest {
|
|
|
21
21
|
* @interface MtnManagerApiInterface
|
|
22
22
|
*/
|
|
23
23
|
export interface MtnManagerApiInterface {
|
|
24
|
+
/**
|
|
25
|
+
* Creates request options for getAmenities without sending the request
|
|
26
|
+
* @throws {RequiredError}
|
|
27
|
+
* @memberof MtnManagerApiInterface
|
|
28
|
+
*/
|
|
29
|
+
getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @summary Get amenities
|
|
33
|
+
* @param {*} [options] Override http request option.
|
|
34
|
+
* @throws {RequiredError}
|
|
35
|
+
* @memberof MtnManagerApiInterface
|
|
36
|
+
*/
|
|
37
|
+
getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
|
|
38
|
+
/**
|
|
39
|
+
* Get amenities
|
|
40
|
+
*/
|
|
41
|
+
getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
|
|
24
42
|
/**
|
|
25
43
|
* Creates request options for getFullReport without sending the request
|
|
26
44
|
* @throws {RequiredError}
|
|
@@ -244,6 +262,18 @@ export interface MtnManagerApiInterface {
|
|
|
244
262
|
*
|
|
245
263
|
*/
|
|
246
264
|
export declare class MtnManagerApi extends runtime.BaseAPI implements MtnManagerApiInterface {
|
|
265
|
+
/**
|
|
266
|
+
* Creates request options for getAmenities without sending the request
|
|
267
|
+
*/
|
|
268
|
+
getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
269
|
+
/**
|
|
270
|
+
* Get amenities
|
|
271
|
+
*/
|
|
272
|
+
getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
|
|
273
|
+
/**
|
|
274
|
+
* Get amenities
|
|
275
|
+
*/
|
|
276
|
+
getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
|
|
247
277
|
/**
|
|
248
278
|
* Creates request options for getFullReport without sending the request
|
|
249
279
|
*/
|
|
@@ -21,11 +21,46 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { FullReportFromJSON, LiftFromJSON, OperatingHoursFromJSON, OverviewFromJSON, ParkingLotFromJSON, RunFromJSON, SnowReportFromJSON, SummerTrailFromJSON, TerrainParkFromJSON, TrailMapFromJSON, TrailMapSummaryFromJSON, WeatherFromJSON, } from '../models/index';
|
|
24
|
+
import { AmenityFromJSON, FullReportFromJSON, LiftFromJSON, OperatingHoursFromJSON, OverviewFromJSON, ParkingLotFromJSON, RunFromJSON, SnowReportFromJSON, SummerTrailFromJSON, TerrainParkFromJSON, TrailMapFromJSON, TrailMapSummaryFromJSON, WeatherFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class MtnManagerApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Creates request options for getAmenities without sending the request
|
|
31
|
+
*/
|
|
32
|
+
getAmenitiesRequestOpts() {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
const queryParameters = {};
|
|
35
|
+
const headerParameters = {};
|
|
36
|
+
let urlPath = `/api/v1/report/amenities`;
|
|
37
|
+
return {
|
|
38
|
+
path: urlPath,
|
|
39
|
+
method: 'GET',
|
|
40
|
+
headers: headerParameters,
|
|
41
|
+
query: queryParameters,
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get amenities
|
|
47
|
+
*/
|
|
48
|
+
getAmenitiesRaw(initOverrides) {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
const requestOptions = yield this.getAmenitiesRequestOpts();
|
|
51
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
52
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AmenityFromJSON));
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Get amenities
|
|
57
|
+
*/
|
|
58
|
+
getAmenities(initOverrides) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const response = yield this.getAmenitiesRaw(initOverrides);
|
|
61
|
+
return yield response.value();
|
|
62
|
+
});
|
|
63
|
+
}
|
|
29
64
|
/**
|
|
30
65
|
* Creates request options for getFullReport without sending the request
|
|
31
66
|
*/
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MtnManager API
|
|
3
|
+
* The MtnManager API provides real-time access to your ski resort’s public operational data. Use it to display current conditions on your website, mobile app, or digital signage.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@mtnmanager.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { GeoPoint } from './GeoPoint';
|
|
13
|
+
/**
|
|
14
|
+
* Lat/lng bounding box and centroid for a trail map's georeferenced area.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GeoBounds
|
|
17
|
+
*/
|
|
18
|
+
export interface GeoBounds {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof GeoBounds
|
|
23
|
+
*/
|
|
24
|
+
minLat: number;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof GeoBounds
|
|
29
|
+
*/
|
|
30
|
+
maxLat: number;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof GeoBounds
|
|
35
|
+
*/
|
|
36
|
+
minLng: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof GeoBounds
|
|
41
|
+
*/
|
|
42
|
+
maxLng: number;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GeoPoint}
|
|
46
|
+
* @memberof GeoBounds
|
|
47
|
+
*/
|
|
48
|
+
center: GeoPoint;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the GeoBounds interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfGeoBounds(value: object): value is GeoBounds;
|
|
54
|
+
export declare function GeoBoundsFromJSON(json: any): GeoBounds;
|
|
55
|
+
export declare function GeoBoundsFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeoBounds;
|
|
56
|
+
export declare function GeoBoundsToJSON(json: any): GeoBounds;
|
|
57
|
+
export declare function GeoBoundsToJSONTyped(value?: GeoBounds | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MtnManager API
|
|
5
|
+
* The MtnManager API provides real-time access to your ski resort’s public operational data. Use it to display current conditions on your website, mobile app, or digital signage.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@mtnmanager.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { GeoPointFromJSON, GeoPointToJSON, } from './GeoPoint';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the GeoBounds interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfGeoBounds(value) {
|
|
19
|
+
if ((!('minLat' in value) && !('min_lat' in value)) || (value['minLat'] === undefined && value['min_lat'] === undefined))
|
|
20
|
+
return false;
|
|
21
|
+
if ((!('maxLat' in value) && !('max_lat' in value)) || (value['maxLat'] === undefined && value['max_lat'] === undefined))
|
|
22
|
+
return false;
|
|
23
|
+
if ((!('minLng' in value) && !('min_lng' in value)) || (value['minLng'] === undefined && value['min_lng'] === undefined))
|
|
24
|
+
return false;
|
|
25
|
+
if ((!('maxLng' in value) && !('max_lng' in value)) || (value['maxLng'] === undefined && value['max_lng'] === undefined))
|
|
26
|
+
return false;
|
|
27
|
+
if (!('center' in value) || value['center'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
export function GeoBoundsFromJSON(json) {
|
|
32
|
+
return GeoBoundsFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
export function GeoBoundsFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'minLat': json['min_lat'],
|
|
40
|
+
'maxLat': json['max_lat'],
|
|
41
|
+
'minLng': json['min_lng'],
|
|
42
|
+
'maxLng': json['max_lng'],
|
|
43
|
+
'center': GeoPointFromJSON(json['center']),
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function GeoBoundsToJSON(json) {
|
|
47
|
+
return GeoBoundsToJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function GeoBoundsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
50
|
+
if (value == null) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'min_lat': value['minLat'],
|
|
55
|
+
'max_lat': value['maxLat'],
|
|
56
|
+
'min_lng': value['minLng'],
|
|
57
|
+
'max_lng': value['maxLng'],
|
|
58
|
+
'center': GeoPointToJSON(value['center']),
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MtnManager API
|
|
3
|
+
* The MtnManager API provides real-time access to your ski resort’s public operational data. Use it to display current conditions on your website, mobile app, or digital signage.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@mtnmanager.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* A latitude/longitude point.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GeoPoint
|
|
16
|
+
*/
|
|
17
|
+
export interface GeoPoint {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof GeoPoint
|
|
22
|
+
*/
|
|
23
|
+
lat: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof GeoPoint
|
|
28
|
+
*/
|
|
29
|
+
lng: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the GeoPoint interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfGeoPoint(value: object): value is GeoPoint;
|
|
35
|
+
export declare function GeoPointFromJSON(json: any): GeoPoint;
|
|
36
|
+
export declare function GeoPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeoPoint;
|
|
37
|
+
export declare function GeoPointToJSON(json: any): GeoPoint;
|
|
38
|
+
export declare function GeoPointToJSONTyped(value?: GeoPoint | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MtnManager API
|
|
5
|
+
* The MtnManager API provides real-time access to your ski resort’s public operational data. Use it to display current conditions on your website, mobile app, or digital signage.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
* Contact: support@mtnmanager.com
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Check if a given object implements the GeoPoint interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfGeoPoint(value) {
|
|
18
|
+
if (!('lat' in value) || value['lat'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('lng' in value) || value['lng'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function GeoPointFromJSON(json) {
|
|
25
|
+
return GeoPointFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function GeoPointFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'lat': json['lat'],
|
|
33
|
+
'lng': json['lng'],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function GeoPointToJSON(json) {
|
|
37
|
+
return GeoPointToJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
export function GeoPointToJSONTyped(value, ignoreDiscriminator = false) {
|
|
40
|
+
if (value == null) {
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'lat': value['lat'],
|
|
45
|
+
'lng': value['lng'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -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)),
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { SeasonType } from './SeasonType';
|
|
13
|
+
import type { GeoBounds } from './GeoBounds';
|
|
13
14
|
/**
|
|
14
15
|
* Summary metadata for a trail map.
|
|
15
16
|
* @export
|
|
@@ -40,12 +41,34 @@ export interface TrailMapSummary {
|
|
|
40
41
|
* @memberof TrailMapSummary
|
|
41
42
|
*/
|
|
42
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;
|
|
43
51
|
/**
|
|
44
52
|
*
|
|
45
53
|
* @type {string}
|
|
46
54
|
* @memberof TrailMapSummary
|
|
47
55
|
*/
|
|
48
56
|
hostedUrl: string;
|
|
57
|
+
/**
|
|
58
|
+
* Lat/lng bounding box of this map's georeferenced area, plus the
|
|
59
|
+
* centroid of its control points (used for tie-breaking when multiple
|
|
60
|
+
* maps cover the same point). Omitted when the map has no georeferencing.
|
|
61
|
+
* @type {GeoBounds}
|
|
62
|
+
* @memberof TrailMapSummary
|
|
63
|
+
*/
|
|
64
|
+
geoBounds?: GeoBounds | null;
|
|
65
|
+
/**
|
|
66
|
+
* Deduplicated UUIDs of every entity (lift, run, terrain park,
|
|
67
|
+
* summer trail, amenity, parking lot) referenced by this map's elements.
|
|
68
|
+
* @type {Array<string>}
|
|
69
|
+
* @memberof TrailMapSummary
|
|
70
|
+
*/
|
|
71
|
+
entityUuids: Array<string>;
|
|
49
72
|
}
|
|
50
73
|
/**
|
|
51
74
|
* Check if a given object implements the TrailMapSummary interface.
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
import { SeasonTypeFromJSON, SeasonTypeToJSON, } from './SeasonType';
|
|
15
|
+
import { GeoBoundsFromJSON, GeoBoundsToJSON, } from './GeoBounds';
|
|
15
16
|
/**
|
|
16
17
|
* Check if a given object implements the TrailMapSummary interface.
|
|
17
18
|
*/
|
|
@@ -24,8 +25,12 @@ export function instanceOfTrailMapSummary(value) {
|
|
|
24
25
|
return false;
|
|
25
26
|
if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
|
|
26
27
|
return false;
|
|
28
|
+
if (!('version' in value) || value['version'] === undefined)
|
|
29
|
+
return false;
|
|
27
30
|
if ((!('hostedUrl' in value) && !('hosted_url' in value)) || (value['hostedUrl'] === undefined && value['hosted_url'] === undefined))
|
|
28
31
|
return false;
|
|
32
|
+
if ((!('entityUuids' in value) && !('entity_uuids' in value)) || (value['entityUuids'] === undefined && value['entity_uuids'] === undefined))
|
|
33
|
+
return false;
|
|
29
34
|
return true;
|
|
30
35
|
}
|
|
31
36
|
export function TrailMapSummaryFromJSON(json) {
|
|
@@ -40,7 +45,10 @@ export function TrailMapSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
45
|
'name': json['name'],
|
|
41
46
|
'season': SeasonTypeFromJSON(json['season']),
|
|
42
47
|
'displayOrder': json['display_order'],
|
|
48
|
+
'version': json['version'],
|
|
43
49
|
'hostedUrl': json['hosted_url'],
|
|
50
|
+
'geoBounds': json['geo_bounds'] == null ? undefined : GeoBoundsFromJSON(json['geo_bounds']),
|
|
51
|
+
'entityUuids': json['entity_uuids'],
|
|
44
52
|
};
|
|
45
53
|
}
|
|
46
54
|
export function TrailMapSummaryToJSON(json) {
|
|
@@ -55,6 +63,9 @@ export function TrailMapSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
55
63
|
'name': value['name'],
|
|
56
64
|
'season': SeasonTypeToJSON(value['season']),
|
|
57
65
|
'display_order': value['displayOrder'],
|
|
66
|
+
'version': value['version'],
|
|
58
67
|
'hosted_url': value['hostedUrl'],
|
|
68
|
+
'geo_bounds': GeoBoundsToJSON(value['geoBounds']),
|
|
69
|
+
'entity_uuids': value['entityUuids'],
|
|
59
70
|
};
|
|
60
71
|
}
|
|
@@ -14,7 +14,9 @@ export * from './DayOfWeek';
|
|
|
14
14
|
export * from './FeatureSize';
|
|
15
15
|
export * from './FeatureType';
|
|
16
16
|
export * from './FullReport';
|
|
17
|
+
export * from './GeoBounds';
|
|
17
18
|
export * from './GeoControlPoint';
|
|
19
|
+
export * from './GeoPoint';
|
|
18
20
|
export * from './HourlyForecast';
|
|
19
21
|
export * from './HourlyForecastImperial';
|
|
20
22
|
export * from './HourlyForecastMetric';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -16,7 +16,9 @@ export * from './DayOfWeek';
|
|
|
16
16
|
export * from './FeatureSize';
|
|
17
17
|
export * from './FeatureType';
|
|
18
18
|
export * from './FullReport';
|
|
19
|
+
export * from './GeoBounds';
|
|
19
20
|
export * from './GeoControlPoint';
|
|
21
|
+
export * from './GeoPoint';
|
|
20
22
|
export * from './HourlyForecast';
|
|
21
23
|
export * from './HourlyForecastImperial';
|
|
22
24
|
export * from './HourlyForecastMetric';
|
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
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MtnManager API
|
|
3
|
+
* The MtnManager API provides real-time access to your ski resort’s public operational data. Use it to display current conditions on your website, mobile app, or digital signage.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@mtnmanager.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { GeoPoint } from './GeoPoint';
|
|
13
|
+
/**
|
|
14
|
+
* Lat/lng bounding box and centroid for a trail map's georeferenced area.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GeoBounds
|
|
17
|
+
*/
|
|
18
|
+
export interface GeoBounds {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof GeoBounds
|
|
23
|
+
*/
|
|
24
|
+
minLat: number;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof GeoBounds
|
|
29
|
+
*/
|
|
30
|
+
maxLat: number;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof GeoBounds
|
|
35
|
+
*/
|
|
36
|
+
minLng: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof GeoBounds
|
|
41
|
+
*/
|
|
42
|
+
maxLng: number;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {GeoPoint}
|
|
46
|
+
* @memberof GeoBounds
|
|
47
|
+
*/
|
|
48
|
+
center: GeoPoint;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a given object implements the GeoBounds interface.
|
|
52
|
+
*/
|
|
53
|
+
export declare function instanceOfGeoBounds(value: object): value is GeoBounds;
|
|
54
|
+
export declare function GeoBoundsFromJSON(json: any): GeoBounds;
|
|
55
|
+
export declare function GeoBoundsFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeoBounds;
|
|
56
|
+
export declare function GeoBoundsToJSON(json: any): GeoBounds;
|
|
57
|
+
export declare function GeoBoundsToJSONTyped(value?: GeoBounds | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MtnManager API
|
|
6
|
+
* The MtnManager API provides real-time access to your ski resort’s public operational data. Use it to display current conditions on your website, mobile app, or digital signage.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@mtnmanager.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfGeoBounds = instanceOfGeoBounds;
|
|
17
|
+
exports.GeoBoundsFromJSON = GeoBoundsFromJSON;
|
|
18
|
+
exports.GeoBoundsFromJSONTyped = GeoBoundsFromJSONTyped;
|
|
19
|
+
exports.GeoBoundsToJSON = GeoBoundsToJSON;
|
|
20
|
+
exports.GeoBoundsToJSONTyped = GeoBoundsToJSONTyped;
|
|
21
|
+
const GeoPoint_1 = require("./GeoPoint");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the GeoBounds interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfGeoBounds(value) {
|
|
26
|
+
if ((!('minLat' in value) && !('min_lat' in value)) || (value['minLat'] === undefined && value['min_lat'] === undefined))
|
|
27
|
+
return false;
|
|
28
|
+
if ((!('maxLat' in value) && !('max_lat' in value)) || (value['maxLat'] === undefined && value['max_lat'] === undefined))
|
|
29
|
+
return false;
|
|
30
|
+
if ((!('minLng' in value) && !('min_lng' in value)) || (value['minLng'] === undefined && value['min_lng'] === undefined))
|
|
31
|
+
return false;
|
|
32
|
+
if ((!('maxLng' in value) && !('max_lng' in value)) || (value['maxLng'] === undefined && value['max_lng'] === undefined))
|
|
33
|
+
return false;
|
|
34
|
+
if (!('center' in value) || value['center'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
function GeoBoundsFromJSON(json) {
|
|
39
|
+
return GeoBoundsFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
function GeoBoundsFromJSONTyped(json, ignoreDiscriminator) {
|
|
42
|
+
if (json == null) {
|
|
43
|
+
return json;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'minLat': json['min_lat'],
|
|
47
|
+
'maxLat': json['max_lat'],
|
|
48
|
+
'minLng': json['min_lng'],
|
|
49
|
+
'maxLng': json['max_lng'],
|
|
50
|
+
'center': (0, GeoPoint_1.GeoPointFromJSON)(json['center']),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function GeoBoundsToJSON(json) {
|
|
54
|
+
return GeoBoundsToJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
function GeoBoundsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
'min_lat': value['minLat'],
|
|
62
|
+
'max_lat': value['maxLat'],
|
|
63
|
+
'min_lng': value['minLng'],
|
|
64
|
+
'max_lng': value['maxLng'],
|
|
65
|
+
'center': (0, GeoPoint_1.GeoPointToJSON)(value['center']),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MtnManager API
|
|
3
|
+
* The MtnManager API provides real-time access to your ski resort’s public operational data. Use it to display current conditions on your website, mobile app, or digital signage.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: support@mtnmanager.com
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* A latitude/longitude point.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface GeoPoint
|
|
16
|
+
*/
|
|
17
|
+
export interface GeoPoint {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof GeoPoint
|
|
22
|
+
*/
|
|
23
|
+
lat: number;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof GeoPoint
|
|
28
|
+
*/
|
|
29
|
+
lng: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the GeoPoint interface.
|
|
33
|
+
*/
|
|
34
|
+
export declare function instanceOfGeoPoint(value: object): value is GeoPoint;
|
|
35
|
+
export declare function GeoPointFromJSON(json: any): GeoPoint;
|
|
36
|
+
export declare function GeoPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): GeoPoint;
|
|
37
|
+
export declare function GeoPointToJSON(json: any): GeoPoint;
|
|
38
|
+
export declare function GeoPointToJSONTyped(value?: GeoPoint | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MtnManager API
|
|
6
|
+
* The MtnManager API provides real-time access to your ski resort’s public operational data. Use it to display current conditions on your website, mobile app, or digital signage.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: support@mtnmanager.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfGeoPoint = instanceOfGeoPoint;
|
|
17
|
+
exports.GeoPointFromJSON = GeoPointFromJSON;
|
|
18
|
+
exports.GeoPointFromJSONTyped = GeoPointFromJSONTyped;
|
|
19
|
+
exports.GeoPointToJSON = GeoPointToJSON;
|
|
20
|
+
exports.GeoPointToJSONTyped = GeoPointToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the GeoPoint interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfGeoPoint(value) {
|
|
25
|
+
if (!('lat' in value) || value['lat'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('lng' in value) || value['lng'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function GeoPointFromJSON(json) {
|
|
32
|
+
return GeoPointFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function GeoPointFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'lat': json['lat'],
|
|
40
|
+
'lng': json['lng'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function GeoPointToJSON(json) {
|
|
44
|
+
return GeoPointToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function GeoPointToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'lat': value['lat'],
|
|
52
|
+
'lng': value['lng'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -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)),
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { SeasonType } from './SeasonType';
|
|
13
|
+
import type { GeoBounds } from './GeoBounds';
|
|
13
14
|
/**
|
|
14
15
|
* Summary metadata for a trail map.
|
|
15
16
|
* @export
|
|
@@ -40,12 +41,34 @@ export interface TrailMapSummary {
|
|
|
40
41
|
* @memberof TrailMapSummary
|
|
41
42
|
*/
|
|
42
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;
|
|
43
51
|
/**
|
|
44
52
|
*
|
|
45
53
|
* @type {string}
|
|
46
54
|
* @memberof TrailMapSummary
|
|
47
55
|
*/
|
|
48
56
|
hostedUrl: string;
|
|
57
|
+
/**
|
|
58
|
+
* Lat/lng bounding box of this map's georeferenced area, plus the
|
|
59
|
+
* centroid of its control points (used for tie-breaking when multiple
|
|
60
|
+
* maps cover the same point). Omitted when the map has no georeferencing.
|
|
61
|
+
* @type {GeoBounds}
|
|
62
|
+
* @memberof TrailMapSummary
|
|
63
|
+
*/
|
|
64
|
+
geoBounds?: GeoBounds | null;
|
|
65
|
+
/**
|
|
66
|
+
* Deduplicated UUIDs of every entity (lift, run, terrain park,
|
|
67
|
+
* summer trail, amenity, parking lot) referenced by this map's elements.
|
|
68
|
+
* @type {Array<string>}
|
|
69
|
+
* @memberof TrailMapSummary
|
|
70
|
+
*/
|
|
71
|
+
entityUuids: Array<string>;
|
|
49
72
|
}
|
|
50
73
|
/**
|
|
51
74
|
* Check if a given object implements the TrailMapSummary interface.
|
|
@@ -19,6 +19,7 @@ exports.TrailMapSummaryFromJSONTyped = TrailMapSummaryFromJSONTyped;
|
|
|
19
19
|
exports.TrailMapSummaryToJSON = TrailMapSummaryToJSON;
|
|
20
20
|
exports.TrailMapSummaryToJSONTyped = TrailMapSummaryToJSONTyped;
|
|
21
21
|
const SeasonType_1 = require("./SeasonType");
|
|
22
|
+
const GeoBounds_1 = require("./GeoBounds");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the TrailMapSummary interface.
|
|
24
25
|
*/
|
|
@@ -31,8 +32,12 @@ function instanceOfTrailMapSummary(value) {
|
|
|
31
32
|
return false;
|
|
32
33
|
if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
|
|
33
34
|
return false;
|
|
35
|
+
if (!('version' in value) || value['version'] === undefined)
|
|
36
|
+
return false;
|
|
34
37
|
if ((!('hostedUrl' in value) && !('hosted_url' in value)) || (value['hostedUrl'] === undefined && value['hosted_url'] === undefined))
|
|
35
38
|
return false;
|
|
39
|
+
if ((!('entityUuids' in value) && !('entity_uuids' in value)) || (value['entityUuids'] === undefined && value['entity_uuids'] === undefined))
|
|
40
|
+
return false;
|
|
36
41
|
return true;
|
|
37
42
|
}
|
|
38
43
|
function TrailMapSummaryFromJSON(json) {
|
|
@@ -47,7 +52,10 @@ function TrailMapSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
47
52
|
'name': json['name'],
|
|
48
53
|
'season': (0, SeasonType_1.SeasonTypeFromJSON)(json['season']),
|
|
49
54
|
'displayOrder': json['display_order'],
|
|
55
|
+
'version': json['version'],
|
|
50
56
|
'hostedUrl': json['hosted_url'],
|
|
57
|
+
'geoBounds': json['geo_bounds'] == null ? undefined : (0, GeoBounds_1.GeoBoundsFromJSON)(json['geo_bounds']),
|
|
58
|
+
'entityUuids': json['entity_uuids'],
|
|
51
59
|
};
|
|
52
60
|
}
|
|
53
61
|
function TrailMapSummaryToJSON(json) {
|
|
@@ -62,6 +70,9 @@ function TrailMapSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
70
|
'name': value['name'],
|
|
63
71
|
'season': (0, SeasonType_1.SeasonTypeToJSON)(value['season']),
|
|
64
72
|
'display_order': value['displayOrder'],
|
|
73
|
+
'version': value['version'],
|
|
65
74
|
'hosted_url': value['hostedUrl'],
|
|
75
|
+
'geo_bounds': (0, GeoBounds_1.GeoBoundsToJSON)(value['geoBounds']),
|
|
76
|
+
'entity_uuids': value['entityUuids'],
|
|
66
77
|
};
|
|
67
78
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -14,7 +14,9 @@ export * from './DayOfWeek';
|
|
|
14
14
|
export * from './FeatureSize';
|
|
15
15
|
export * from './FeatureType';
|
|
16
16
|
export * from './FullReport';
|
|
17
|
+
export * from './GeoBounds';
|
|
17
18
|
export * from './GeoControlPoint';
|
|
19
|
+
export * from './GeoPoint';
|
|
18
20
|
export * from './HourlyForecast';
|
|
19
21
|
export * from './HourlyForecastImperial';
|
|
20
22
|
export * from './HourlyForecastMetric';
|
package/dist/models/index.js
CHANGED
|
@@ -32,7 +32,9 @@ __exportStar(require("./DayOfWeek"), exports);
|
|
|
32
32
|
__exportStar(require("./FeatureSize"), exports);
|
|
33
33
|
__exportStar(require("./FeatureType"), exports);
|
|
34
34
|
__exportStar(require("./FullReport"), exports);
|
|
35
|
+
__exportStar(require("./GeoBounds"), exports);
|
|
35
36
|
__exportStar(require("./GeoControlPoint"), exports);
|
|
37
|
+
__exportStar(require("./GeoPoint"), exports);
|
|
36
38
|
__exportStar(require("./HourlyForecast"), exports);
|
|
37
39
|
__exportStar(require("./HourlyForecastImperial"), exports);
|
|
38
40
|
__exportStar(require("./HourlyForecastMetric"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mtnmanager/sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
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",
|