@mtnmanager/sdk 0.0.1 → 0.0.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 +20 -5
- package/dist/esm/models/CurrentWeather.d.ts +85 -0
- package/dist/esm/models/CurrentWeather.js +77 -0
- package/dist/esm/models/DailyForecast.d.ts +76 -0
- package/dist/esm/models/DailyForecast.js +73 -0
- package/dist/esm/models/DailyForecastImperial.d.ts +62 -0
- package/dist/esm/models/DailyForecastImperial.js +63 -0
- package/dist/esm/models/DailyForecastMetric.d.ts +62 -0
- package/dist/esm/models/DailyForecastMetric.js +63 -0
- package/dist/esm/models/{HoursInfo.d.ts → DayHours.d.ts} +12 -12
- package/dist/esm/models/{HoursInfo.js → DayHours.js} +8 -8
- package/dist/esm/models/HourlyForecast.d.ts +70 -0
- package/dist/esm/models/HourlyForecast.js +69 -0
- package/dist/esm/models/HourlyForecastImperial.d.ts +62 -0
- package/dist/esm/models/HourlyForecastImperial.js +63 -0
- package/dist/esm/models/HourlyForecastMetric.d.ts +62 -0
- package/dist/esm/models/HourlyForecastMetric.js +63 -0
- package/dist/esm/models/ImperialUnits.d.ts +68 -0
- package/dist/esm/models/ImperialUnits.js +65 -0
- package/dist/esm/models/MetricUnits.d.ts +68 -0
- package/dist/esm/models/MetricUnits.js +65 -0
- package/dist/esm/models/OperatingHoursResponse.d.ts +6 -12
- package/dist/esm/models/OperatingHoursResponse.js +7 -11
- package/dist/esm/models/PublicResortResponse.d.ts +7 -0
- package/dist/esm/models/PublicResortResponse.js +3 -0
- package/dist/esm/models/PublicResortStatus.d.ts +51 -2
- package/dist/esm/models/PublicResortStatus.js +32 -1
- package/dist/esm/models/PublicRun.d.ts +7 -1
- package/dist/esm/models/PublicRun.js +5 -1
- package/dist/esm/models/PublicSnowReport.d.ts +12 -0
- package/dist/esm/models/PublicSnowReport.js +6 -0
- package/dist/esm/models/RecurrencePattern.d.ts +24 -0
- package/dist/esm/models/RecurrencePattern.js +58 -0
- package/dist/esm/models/RecurrencePatternOneOf.d.ts +39 -0
- package/dist/esm/models/RecurrencePatternOneOf.js +49 -0
- package/dist/esm/models/RecurrencePatternOneOf1.d.ts +39 -0
- package/dist/esm/models/RecurrencePatternOneOf1.js +49 -0
- package/dist/esm/models/RecurrencePatternOneOf2.d.ts +45 -0
- package/dist/esm/models/RecurrencePatternOneOf2.js +53 -0
- package/dist/esm/models/ResortStatusType.d.ts +0 -1
- package/dist/esm/models/ResortStatusType.js +1 -2
- package/dist/esm/models/Schedule.d.ts +81 -0
- package/dist/esm/models/Schedule.js +76 -0
- package/dist/esm/models/SeasonType.d.ts +26 -0
- package/dist/esm/models/SeasonType.js +44 -0
- package/dist/esm/models/SurfaceCondition.d.ts +16 -7
- package/dist/esm/models/SurfaceCondition.js +16 -7
- package/dist/esm/models/WeatherData.d.ts +59 -0
- package/dist/esm/models/WeatherData.js +62 -0
- package/dist/esm/models/index.d.ts +17 -2
- package/dist/esm/models/index.js +17 -2
- package/dist/models/CurrentWeather.d.ts +85 -0
- package/dist/models/CurrentWeather.js +84 -0
- package/dist/models/DailyForecast.d.ts +76 -0
- package/dist/models/DailyForecast.js +80 -0
- package/dist/models/DailyForecastImperial.d.ts +62 -0
- package/dist/models/DailyForecastImperial.js +70 -0
- package/dist/models/DailyForecastMetric.d.ts +62 -0
- package/dist/models/DailyForecastMetric.js +70 -0
- package/dist/models/{HoursInfo.d.ts → DayHours.d.ts} +12 -12
- package/dist/models/{HoursInfo.js → DayHours.js} +13 -13
- package/dist/models/HourlyForecast.d.ts +70 -0
- package/dist/models/HourlyForecast.js +76 -0
- package/dist/models/HourlyForecastImperial.d.ts +62 -0
- package/dist/models/HourlyForecastImperial.js +70 -0
- package/dist/models/HourlyForecastMetric.d.ts +62 -0
- package/dist/models/HourlyForecastMetric.js +70 -0
- package/dist/models/ImperialUnits.d.ts +68 -0
- package/dist/models/ImperialUnits.js +72 -0
- package/dist/models/MetricUnits.d.ts +68 -0
- package/dist/models/MetricUnits.js +72 -0
- package/dist/models/OperatingHoursResponse.d.ts +6 -12
- package/dist/models/OperatingHoursResponse.js +7 -11
- package/dist/models/PublicResortResponse.d.ts +7 -0
- package/dist/models/PublicResortResponse.js +3 -0
- package/dist/models/PublicResortStatus.d.ts +51 -2
- package/dist/models/PublicResortStatus.js +32 -1
- package/dist/models/PublicRun.d.ts +7 -1
- package/dist/models/PublicRun.js +5 -1
- package/dist/models/PublicSnowReport.d.ts +12 -0
- package/dist/models/PublicSnowReport.js +6 -0
- package/dist/models/RecurrencePattern.d.ts +24 -0
- package/dist/models/RecurrencePattern.js +64 -0
- package/dist/models/RecurrencePatternOneOf.d.ts +39 -0
- package/dist/models/RecurrencePatternOneOf.js +57 -0
- package/dist/models/RecurrencePatternOneOf1.d.ts +39 -0
- package/dist/models/RecurrencePatternOneOf1.js +57 -0
- package/dist/models/RecurrencePatternOneOf2.d.ts +45 -0
- package/dist/models/RecurrencePatternOneOf2.js +61 -0
- package/dist/models/ResortStatusType.d.ts +0 -1
- package/dist/models/ResortStatusType.js +1 -2
- package/dist/models/Schedule.d.ts +81 -0
- package/dist/models/Schedule.js +83 -0
- package/dist/models/SeasonType.d.ts +26 -0
- package/dist/models/SeasonType.js +52 -0
- package/dist/models/SurfaceCondition.d.ts +16 -7
- package/dist/models/SurfaceCondition.js +16 -7
- package/dist/models/WeatherData.d.ts +59 -0
- package/dist/models/WeatherData.js +69 -0
- package/dist/models/index.d.ts +17 -2
- package/dist/models/index.js +17 -2
- package/package.json +7 -10
- package/dist/esm/models/RegularHoursDescription.d.ts +0 -50
- package/dist/esm/models/RegularHoursDescription.js +0 -55
- package/dist/models/RegularHoursDescription.d.ts +0 -50
- package/dist/models/RegularHoursDescription.js +0 -62
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MtnManager API
|
|
6
|
+
* Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
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.instanceOfMetricUnits = instanceOfMetricUnits;
|
|
17
|
+
exports.MetricUnitsFromJSON = MetricUnitsFromJSON;
|
|
18
|
+
exports.MetricUnitsFromJSONTyped = MetricUnitsFromJSONTyped;
|
|
19
|
+
exports.MetricUnitsToJSON = MetricUnitsToJSON;
|
|
20
|
+
exports.MetricUnitsToJSONTyped = MetricUnitsToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the MetricUnits interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfMetricUnits(value) {
|
|
25
|
+
if (!('feelsLike' in value) || value['feelsLike'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('precipitation' in value) || value['precipitation'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('snowfall' in value) || value['snowfall'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('temperature' in value) || value['temperature'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('windGust' in value) || value['windGust'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('windSpeed' in value) || value['windSpeed'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
function MetricUnitsFromJSON(json) {
|
|
40
|
+
return MetricUnitsFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
function MetricUnitsFromJSONTyped(json, ignoreDiscriminator) {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'feelsLike': json['feels_like'],
|
|
48
|
+
'precipitation': json['precipitation'],
|
|
49
|
+
'snowfall': json['snowfall'],
|
|
50
|
+
'temperature': json['temperature'],
|
|
51
|
+
'visibility': json['visibility'] == null ? undefined : json['visibility'],
|
|
52
|
+
'windGust': json['wind_gust'],
|
|
53
|
+
'windSpeed': json['wind_speed'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function MetricUnitsToJSON(json) {
|
|
57
|
+
return MetricUnitsToJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
function MetricUnitsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'feels_like': value['feelsLike'],
|
|
65
|
+
'precipitation': value['precipitation'],
|
|
66
|
+
'snowfall': value['snowfall'],
|
|
67
|
+
'temperature': value['temperature'],
|
|
68
|
+
'visibility': value['visibility'],
|
|
69
|
+
'wind_gust': value['windGust'],
|
|
70
|
+
'wind_speed': value['windSpeed'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
12
|
+
import type { DayHours } from './DayHours';
|
|
13
|
+
import type { Schedule } from './Schedule';
|
|
14
14
|
/**
|
|
15
15
|
* Calculated operating hours response
|
|
16
16
|
* @export
|
|
@@ -19,22 +19,16 @@ import type { RegularHoursDescription } from './RegularHoursDescription';
|
|
|
19
19
|
export interface OperatingHoursResponse {
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
|
-
* @type {Array<
|
|
22
|
+
* @type {Array<DayHours>}
|
|
23
23
|
* @memberof OperatingHoursResponse
|
|
24
24
|
*/
|
|
25
|
-
openDays: Array<
|
|
25
|
+
openDays: Array<DayHours>;
|
|
26
26
|
/**
|
|
27
27
|
*
|
|
28
|
-
* @type {Array<
|
|
28
|
+
* @type {Array<Schedule>}
|
|
29
29
|
* @memberof OperatingHoursResponse
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @type {HoursInfo}
|
|
35
|
-
* @memberof OperatingHoursResponse
|
|
36
|
-
*/
|
|
37
|
-
today: HoursInfo;
|
|
31
|
+
schedules: Array<Schedule>;
|
|
38
32
|
}
|
|
39
33
|
/**
|
|
40
34
|
* Check if a given object implements the OperatingHoursResponse interface.
|
|
@@ -18,17 +18,15 @@ exports.OperatingHoursResponseFromJSON = OperatingHoursResponseFromJSON;
|
|
|
18
18
|
exports.OperatingHoursResponseFromJSONTyped = OperatingHoursResponseFromJSONTyped;
|
|
19
19
|
exports.OperatingHoursResponseToJSON = OperatingHoursResponseToJSON;
|
|
20
20
|
exports.OperatingHoursResponseToJSONTyped = OperatingHoursResponseToJSONTyped;
|
|
21
|
-
const
|
|
22
|
-
const
|
|
21
|
+
const DayHours_1 = require("./DayHours");
|
|
22
|
+
const Schedule_1 = require("./Schedule");
|
|
23
23
|
/**
|
|
24
24
|
* Check if a given object implements the OperatingHoursResponse interface.
|
|
25
25
|
*/
|
|
26
26
|
function instanceOfOperatingHoursResponse(value) {
|
|
27
27
|
if (!('openDays' in value) || value['openDays'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
-
if (!('
|
|
30
|
-
return false;
|
|
31
|
-
if (!('today' in value) || value['today'] === undefined)
|
|
29
|
+
if (!('schedules' in value) || value['schedules'] === undefined)
|
|
32
30
|
return false;
|
|
33
31
|
return true;
|
|
34
32
|
}
|
|
@@ -40,9 +38,8 @@ function OperatingHoursResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
40
38
|
return json;
|
|
41
39
|
}
|
|
42
40
|
return {
|
|
43
|
-
'openDays': (json['open_days'].map(
|
|
44
|
-
'
|
|
45
|
-
'today': (0, HoursInfo_1.HoursInfoFromJSON)(json['today']),
|
|
41
|
+
'openDays': (json['open_days'].map(DayHours_1.DayHoursFromJSON)),
|
|
42
|
+
'schedules': (json['schedules'].map(Schedule_1.ScheduleFromJSON)),
|
|
46
43
|
};
|
|
47
44
|
}
|
|
48
45
|
function OperatingHoursResponseToJSON(json) {
|
|
@@ -53,8 +50,7 @@ function OperatingHoursResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
53
50
|
return value;
|
|
54
51
|
}
|
|
55
52
|
return {
|
|
56
|
-
'open_days': (value['openDays'].map(
|
|
57
|
-
'
|
|
58
|
-
'today': (0, HoursInfo_1.HoursInfoToJSON)(value['today']),
|
|
53
|
+
'open_days': (value['openDays'].map(DayHours_1.DayHoursToJSON)),
|
|
54
|
+
'schedules': (value['schedules'].map(Schedule_1.ScheduleToJSON)),
|
|
59
55
|
};
|
|
60
56
|
}
|
|
@@ -15,6 +15,7 @@ import type { PublicLift } from './PublicLift';
|
|
|
15
15
|
import type { PublicResortStatus } from './PublicResortStatus';
|
|
16
16
|
import type { PublicSnowReport } from './PublicSnowReport';
|
|
17
17
|
import type { PublicResortInfo } from './PublicResortInfo';
|
|
18
|
+
import type { WeatherData } from './WeatherData';
|
|
18
19
|
/**
|
|
19
20
|
* Comprehensive resort response (all-in-one)
|
|
20
21
|
* @export
|
|
@@ -57,6 +58,12 @@ export interface PublicResortResponse {
|
|
|
57
58
|
* @memberof PublicResortResponse
|
|
58
59
|
*/
|
|
59
60
|
status?: PublicResortStatus | null;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {WeatherData}
|
|
64
|
+
* @memberof PublicResortResponse
|
|
65
|
+
*/
|
|
66
|
+
weather?: WeatherData | null;
|
|
60
67
|
}
|
|
61
68
|
/**
|
|
62
69
|
* Check if a given object implements the PublicResortResponse interface.
|
|
@@ -24,6 +24,7 @@ const PublicLift_1 = require("./PublicLift");
|
|
|
24
24
|
const PublicResortStatus_1 = require("./PublicResortStatus");
|
|
25
25
|
const PublicSnowReport_1 = require("./PublicSnowReport");
|
|
26
26
|
const PublicResortInfo_1 = require("./PublicResortInfo");
|
|
27
|
+
const WeatherData_1 = require("./WeatherData");
|
|
27
28
|
/**
|
|
28
29
|
* Check if a given object implements the PublicResortResponse interface.
|
|
29
30
|
*/
|
|
@@ -46,6 +47,7 @@ function PublicResortResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
47
|
'runs': json['runs'] == null ? undefined : (json['runs'].map(PublicRun_1.PublicRunFromJSON)),
|
|
47
48
|
'snow': json['snow'] == null ? undefined : (json['snow'].map(PublicSnowReport_1.PublicSnowReportFromJSON)),
|
|
48
49
|
'status': json['status'] == null ? undefined : (0, PublicResortStatus_1.PublicResortStatusFromJSON)(json['status']),
|
|
50
|
+
'weather': json['weather'] == null ? undefined : (0, WeatherData_1.WeatherDataFromJSON)(json['weather']),
|
|
49
51
|
};
|
|
50
52
|
}
|
|
51
53
|
function PublicResortResponseToJSON(json) {
|
|
@@ -62,5 +64,6 @@ function PublicResortResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
64
|
'runs': value['runs'] == null ? undefined : (value['runs'].map(PublicRun_1.PublicRunToJSON)),
|
|
63
65
|
'snow': value['snow'] == null ? undefined : (value['snow'].map(PublicSnowReport_1.PublicSnowReportToJSON)),
|
|
64
66
|
'status': (0, PublicResortStatus_1.PublicResortStatusToJSON)(value['status']),
|
|
67
|
+
'weather': (0, WeatherData_1.WeatherDataToJSON)(value['weather']),
|
|
65
68
|
};
|
|
66
69
|
}
|
|
@@ -9,25 +9,74 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { SeasonType } from './SeasonType';
|
|
12
13
|
import type { ResortStatusType } from './ResortStatusType';
|
|
13
14
|
/**
|
|
14
|
-
* Resort status with optional metadata
|
|
15
|
+
* Resort status with optional metadata and today's scheduled hours
|
|
15
16
|
* @export
|
|
16
17
|
* @interface PublicResortStatus
|
|
17
18
|
*/
|
|
18
19
|
export interface PublicResortStatus {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {number}
|
|
23
|
+
* @memberof PublicResortStatus
|
|
24
|
+
*/
|
|
25
|
+
groomedRuns: number;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof PublicResortStatus
|
|
30
|
+
*/
|
|
31
|
+
notes: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @memberof PublicResortStatus
|
|
36
|
+
*/
|
|
37
|
+
openLifts: number;
|
|
38
|
+
/**
|
|
39
|
+
*
|
|
40
|
+
* @type {number}
|
|
41
|
+
* @memberof PublicResortStatus
|
|
42
|
+
*/
|
|
43
|
+
openRuns: number;
|
|
19
44
|
/**
|
|
20
45
|
*
|
|
21
46
|
* @type {string}
|
|
22
47
|
* @memberof PublicResortStatus
|
|
23
48
|
*/
|
|
24
|
-
|
|
49
|
+
scheduledClosesAt?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof PublicResortStatus
|
|
54
|
+
*/
|
|
55
|
+
scheduledOpensAt?: string | null;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {SeasonType}
|
|
59
|
+
* @memberof PublicResortStatus
|
|
60
|
+
*/
|
|
61
|
+
season: SeasonType;
|
|
25
62
|
/**
|
|
26
63
|
*
|
|
27
64
|
* @type {ResortStatusType}
|
|
28
65
|
* @memberof PublicResortStatus
|
|
29
66
|
*/
|
|
30
67
|
status: ResortStatusType;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof PublicResortStatus
|
|
72
|
+
*/
|
|
73
|
+
totalLifts: number;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* @type {number}
|
|
77
|
+
* @memberof PublicResortStatus
|
|
78
|
+
*/
|
|
79
|
+
totalRuns: number;
|
|
31
80
|
/**
|
|
32
81
|
*
|
|
33
82
|
* @type {Date}
|
|
@@ -18,13 +18,28 @@ exports.PublicResortStatusFromJSON = PublicResortStatusFromJSON;
|
|
|
18
18
|
exports.PublicResortStatusFromJSONTyped = PublicResortStatusFromJSONTyped;
|
|
19
19
|
exports.PublicResortStatusToJSON = PublicResortStatusToJSON;
|
|
20
20
|
exports.PublicResortStatusToJSONTyped = PublicResortStatusToJSONTyped;
|
|
21
|
+
const SeasonType_1 = require("./SeasonType");
|
|
21
22
|
const ResortStatusType_1 = require("./ResortStatusType");
|
|
22
23
|
/**
|
|
23
24
|
* Check if a given object implements the PublicResortStatus interface.
|
|
24
25
|
*/
|
|
25
26
|
function instanceOfPublicResortStatus(value) {
|
|
27
|
+
if (!('groomedRuns' in value) || value['groomedRuns'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('notes' in value) || value['notes'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('openLifts' in value) || value['openLifts'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('openRuns' in value) || value['openRuns'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('season' in value) || value['season'] === undefined)
|
|
36
|
+
return false;
|
|
26
37
|
if (!('status' in value) || value['status'] === undefined)
|
|
27
38
|
return false;
|
|
39
|
+
if (!('totalLifts' in value) || value['totalLifts'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('totalRuns' in value) || value['totalRuns'] === undefined)
|
|
42
|
+
return false;
|
|
28
43
|
return true;
|
|
29
44
|
}
|
|
30
45
|
function PublicResortStatusFromJSON(json) {
|
|
@@ -35,8 +50,16 @@ function PublicResortStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
35
50
|
return json;
|
|
36
51
|
}
|
|
37
52
|
return {
|
|
38
|
-
'
|
|
53
|
+
'groomedRuns': json['groomed_runs'],
|
|
54
|
+
'notes': json['notes'],
|
|
55
|
+
'openLifts': json['open_lifts'],
|
|
56
|
+
'openRuns': json['open_runs'],
|
|
57
|
+
'scheduledClosesAt': json['scheduled_closes_at'] == null ? undefined : json['scheduled_closes_at'],
|
|
58
|
+
'scheduledOpensAt': json['scheduled_opens_at'] == null ? undefined : json['scheduled_opens_at'],
|
|
59
|
+
'season': (0, SeasonType_1.SeasonTypeFromJSON)(json['season']),
|
|
39
60
|
'status': (0, ResortStatusType_1.ResortStatusTypeFromJSON)(json['status']),
|
|
61
|
+
'totalLifts': json['total_lifts'],
|
|
62
|
+
'totalRuns': json['total_runs'],
|
|
40
63
|
'updatedAt': json['updated_at'] == null ? undefined : (new Date(json['updated_at'])),
|
|
41
64
|
};
|
|
42
65
|
}
|
|
@@ -48,8 +71,16 @@ function PublicResortStatusToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
48
71
|
return value;
|
|
49
72
|
}
|
|
50
73
|
return {
|
|
74
|
+
'groomed_runs': value['groomedRuns'],
|
|
51
75
|
'notes': value['notes'],
|
|
76
|
+
'open_lifts': value['openLifts'],
|
|
77
|
+
'open_runs': value['openRuns'],
|
|
78
|
+
'scheduled_closes_at': value['scheduledClosesAt'],
|
|
79
|
+
'scheduled_opens_at': value['scheduledOpensAt'],
|
|
80
|
+
'season': (0, SeasonType_1.SeasonTypeToJSON)(value['season']),
|
|
52
81
|
'status': (0, ResortStatusType_1.ResortStatusTypeToJSON)(value['status']),
|
|
82
|
+
'total_lifts': value['totalLifts'],
|
|
83
|
+
'total_runs': value['totalRuns'],
|
|
53
84
|
'updated_at': value['updatedAt'] == null ? value['updatedAt'] : value['updatedAt'].toISOString(),
|
|
54
85
|
};
|
|
55
86
|
}
|
|
@@ -34,7 +34,7 @@ export interface PublicRun {
|
|
|
34
34
|
* @type {string}
|
|
35
35
|
* @memberof PublicRun
|
|
36
36
|
*/
|
|
37
|
-
conditionNotes
|
|
37
|
+
conditionNotes: string;
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
40
40
|
* @type {RunDifficulty}
|
|
@@ -59,6 +59,12 @@ export interface PublicRun {
|
|
|
59
59
|
* @memberof PublicRun
|
|
60
60
|
*/
|
|
61
61
|
name: string;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof PublicRun
|
|
66
|
+
*/
|
|
67
|
+
number?: number | null;
|
|
62
68
|
/**
|
|
63
69
|
*
|
|
64
70
|
* @type {string}
|
package/dist/models/PublicRun.js
CHANGED
|
@@ -24,6 +24,8 @@ const RunDifficulty_1 = require("./RunDifficulty");
|
|
|
24
24
|
* Check if a given object implements the PublicRun interface.
|
|
25
25
|
*/
|
|
26
26
|
function instanceOfPublicRun(value) {
|
|
27
|
+
if (!('conditionNotes' in value) || value['conditionNotes'] === undefined)
|
|
28
|
+
return false;
|
|
27
29
|
if (!('difficulty' in value) || value['difficulty'] === undefined)
|
|
28
30
|
return false;
|
|
29
31
|
if (!('groomedToday' in value) || value['groomedToday'] === undefined)
|
|
@@ -48,11 +50,12 @@ function PublicRunFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
48
50
|
return {
|
|
49
51
|
'areaId': json['area_id'] == null ? undefined : json['area_id'],
|
|
50
52
|
'areaName': json['area_name'] == null ? undefined : json['area_name'],
|
|
51
|
-
'conditionNotes': json['condition_notes']
|
|
53
|
+
'conditionNotes': json['condition_notes'],
|
|
52
54
|
'difficulty': (0, RunDifficulty_1.RunDifficultyFromJSON)(json['difficulty']),
|
|
53
55
|
'groomedToday': json['groomed_today'],
|
|
54
56
|
'lastGroomed': json['last_groomed'] == null ? undefined : (new Date(json['last_groomed'])),
|
|
55
57
|
'name': json['name'],
|
|
58
|
+
'number': json['number'] == null ? undefined : json['number'],
|
|
56
59
|
'slug': json['slug'],
|
|
57
60
|
'status': (0, RunStatus_1.RunStatusFromJSON)(json['status']),
|
|
58
61
|
'uuid': json['uuid'],
|
|
@@ -73,6 +76,7 @@ function PublicRunToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
73
76
|
'groomed_today': value['groomedToday'],
|
|
74
77
|
'last_groomed': value['lastGroomed'] == null ? value['lastGroomed'] : value['lastGroomed'].toISOString(),
|
|
75
78
|
'name': value['name'],
|
|
79
|
+
'number': value['number'],
|
|
76
80
|
'slug': value['slug'],
|
|
77
81
|
'status': (0, RunStatus_1.RunStatusToJSON)(value['status']),
|
|
78
82
|
'uuid': value['uuid'],
|
|
@@ -41,12 +41,24 @@ export interface PublicSnowReport {
|
|
|
41
41
|
* @memberof PublicSnowReport
|
|
42
42
|
*/
|
|
43
43
|
baseDepthIn?: number | null;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof PublicSnowReport
|
|
48
|
+
*/
|
|
49
|
+
conditionNotes: string;
|
|
44
50
|
/**
|
|
45
51
|
*
|
|
46
52
|
* @type {Date}
|
|
47
53
|
* @memberof PublicSnowReport
|
|
48
54
|
*/
|
|
49
55
|
reportedAt: Date;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {SurfaceCondition}
|
|
59
|
+
* @memberof PublicSnowReport
|
|
60
|
+
*/
|
|
61
|
+
secondarySurfaceCondition?: SurfaceCondition | null;
|
|
50
62
|
/**
|
|
51
63
|
*
|
|
52
64
|
* @type {SnowMetrics}
|
|
@@ -24,6 +24,8 @@ const SurfaceCondition_1 = require("./SurfaceCondition");
|
|
|
24
24
|
* Check if a given object implements the PublicSnowReport interface.
|
|
25
25
|
*/
|
|
26
26
|
function instanceOfPublicSnowReport(value) {
|
|
27
|
+
if (!('conditionNotes' in value) || value['conditionNotes'] === undefined)
|
|
28
|
+
return false;
|
|
27
29
|
if (!('reportedAt' in value) || value['reportedAt'] === undefined)
|
|
28
30
|
return false;
|
|
29
31
|
if (!('snowfallCm' in value) || value['snowfallCm'] === undefined)
|
|
@@ -46,7 +48,9 @@ function PublicSnowReportFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
48
|
'areaName': json['area_name'] == null ? undefined : json['area_name'],
|
|
47
49
|
'baseDepthCm': json['base_depth_cm'] == null ? undefined : json['base_depth_cm'],
|
|
48
50
|
'baseDepthIn': json['base_depth_in'] == null ? undefined : json['base_depth_in'],
|
|
51
|
+
'conditionNotes': json['condition_notes'],
|
|
49
52
|
'reportedAt': (new Date(json['reported_at'])),
|
|
53
|
+
'secondarySurfaceCondition': json['secondary_surface_condition'] == null ? undefined : (0, SurfaceCondition_1.SurfaceConditionFromJSON)(json['secondary_surface_condition']),
|
|
50
54
|
'snowfallCm': (0, SnowMetrics_1.SnowMetricsFromJSON)(json['snowfall_cm']),
|
|
51
55
|
'snowfallIn': (0, SnowMetrics_1.SnowMetricsFromJSON)(json['snowfall_in']),
|
|
52
56
|
'surfaceCondition': json['surface_condition'] == null ? undefined : (0, SurfaceCondition_1.SurfaceConditionFromJSON)(json['surface_condition']),
|
|
@@ -65,7 +69,9 @@ function PublicSnowReportToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
65
69
|
'area_name': value['areaName'],
|
|
66
70
|
'base_depth_cm': value['baseDepthCm'],
|
|
67
71
|
'base_depth_in': value['baseDepthIn'],
|
|
72
|
+
'condition_notes': value['conditionNotes'],
|
|
68
73
|
'reported_at': value['reportedAt'].toISOString(),
|
|
74
|
+
'secondary_surface_condition': (0, SurfaceCondition_1.SurfaceConditionToJSON)(value['secondarySurfaceCondition']),
|
|
69
75
|
'snowfall_cm': (0, SnowMetrics_1.SnowMetricsToJSON)(value['snowfallCm']),
|
|
70
76
|
'snowfall_in': (0, SnowMetrics_1.SnowMetricsToJSON)(value['snowfallIn']),
|
|
71
77
|
'surface_condition': (0, SurfaceCondition_1.SurfaceConditionToJSON)(value['surfaceCondition']),
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MtnManager API
|
|
3
|
+
* Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
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 { RecurrencePatternOneOf } from './RecurrencePatternOneOf';
|
|
13
|
+
import type { RecurrencePatternOneOf1 } from './RecurrencePatternOneOf1';
|
|
14
|
+
import type { RecurrencePatternOneOf2 } from './RecurrencePatternOneOf2';
|
|
15
|
+
/**
|
|
16
|
+
* @type RecurrencePattern
|
|
17
|
+
* Recurrence pattern for operating hours rules
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export type RecurrencePattern = RecurrencePatternOneOf | RecurrencePatternOneOf1 | RecurrencePatternOneOf2;
|
|
21
|
+
export declare function RecurrencePatternFromJSON(json: any): RecurrencePattern;
|
|
22
|
+
export declare function RecurrencePatternFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecurrencePattern;
|
|
23
|
+
export declare function RecurrencePatternToJSON(json: any): any;
|
|
24
|
+
export declare function RecurrencePatternToJSONTyped(value?: RecurrencePattern | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MtnManager API
|
|
6
|
+
* Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
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.RecurrencePatternFromJSON = RecurrencePatternFromJSON;
|
|
17
|
+
exports.RecurrencePatternFromJSONTyped = RecurrencePatternFromJSONTyped;
|
|
18
|
+
exports.RecurrencePatternToJSON = RecurrencePatternToJSON;
|
|
19
|
+
exports.RecurrencePatternToJSONTyped = RecurrencePatternToJSONTyped;
|
|
20
|
+
const RecurrencePatternOneOf_1 = require("./RecurrencePatternOneOf");
|
|
21
|
+
const RecurrencePatternOneOf1_1 = require("./RecurrencePatternOneOf1");
|
|
22
|
+
const RecurrencePatternOneOf2_1 = require("./RecurrencePatternOneOf2");
|
|
23
|
+
function RecurrencePatternFromJSON(json) {
|
|
24
|
+
return RecurrencePatternFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
function RecurrencePatternFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
if (typeof json !== 'object') {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
if ((0, RecurrencePatternOneOf_1.instanceOfRecurrencePatternOneOf)(json)) {
|
|
34
|
+
return (0, RecurrencePatternOneOf_1.RecurrencePatternOneOfFromJSONTyped)(json, true);
|
|
35
|
+
}
|
|
36
|
+
if ((0, RecurrencePatternOneOf1_1.instanceOfRecurrencePatternOneOf1)(json)) {
|
|
37
|
+
return (0, RecurrencePatternOneOf1_1.RecurrencePatternOneOf1FromJSONTyped)(json, true);
|
|
38
|
+
}
|
|
39
|
+
if ((0, RecurrencePatternOneOf2_1.instanceOfRecurrencePatternOneOf2)(json)) {
|
|
40
|
+
return (0, RecurrencePatternOneOf2_1.RecurrencePatternOneOf2FromJSONTyped)(json, true);
|
|
41
|
+
}
|
|
42
|
+
return {};
|
|
43
|
+
}
|
|
44
|
+
function RecurrencePatternToJSON(json) {
|
|
45
|
+
return RecurrencePatternToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function RecurrencePatternToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
if (typeof value !== 'object') {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
if ((0, RecurrencePatternOneOf_1.instanceOfRecurrencePatternOneOf)(value)) {
|
|
55
|
+
return (0, RecurrencePatternOneOf_1.RecurrencePatternOneOfToJSON)(value);
|
|
56
|
+
}
|
|
57
|
+
if ((0, RecurrencePatternOneOf1_1.instanceOfRecurrencePatternOneOf1)(value)) {
|
|
58
|
+
return (0, RecurrencePatternOneOf1_1.RecurrencePatternOneOf1ToJSON)(value);
|
|
59
|
+
}
|
|
60
|
+
if ((0, RecurrencePatternOneOf2_1.instanceOfRecurrencePatternOneOf2)(value)) {
|
|
61
|
+
return (0, RecurrencePatternOneOf2_1.RecurrencePatternOneOf2ToJSON)(value);
|
|
62
|
+
}
|
|
63
|
+
return {};
|
|
64
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MtnManager API
|
|
3
|
+
* Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface RecurrencePatternOneOf
|
|
16
|
+
*/
|
|
17
|
+
export interface RecurrencePatternOneOf {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof RecurrencePatternOneOf
|
|
22
|
+
*/
|
|
23
|
+
type: RecurrencePatternOneOfTypeEnum;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
export declare const RecurrencePatternOneOfTypeEnum: {
|
|
29
|
+
readonly None: "none";
|
|
30
|
+
};
|
|
31
|
+
export type RecurrencePatternOneOfTypeEnum = typeof RecurrencePatternOneOfTypeEnum[keyof typeof RecurrencePatternOneOfTypeEnum];
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the RecurrencePatternOneOf interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfRecurrencePatternOneOf(value: object): value is RecurrencePatternOneOf;
|
|
36
|
+
export declare function RecurrencePatternOneOfFromJSON(json: any): RecurrencePatternOneOf;
|
|
37
|
+
export declare function RecurrencePatternOneOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecurrencePatternOneOf;
|
|
38
|
+
export declare function RecurrencePatternOneOfToJSON(json: any): RecurrencePatternOneOf;
|
|
39
|
+
export declare function RecurrencePatternOneOfToJSONTyped(value?: RecurrencePatternOneOf | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* MtnManager API
|
|
6
|
+
* Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
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.RecurrencePatternOneOfTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfRecurrencePatternOneOf = instanceOfRecurrencePatternOneOf;
|
|
18
|
+
exports.RecurrencePatternOneOfFromJSON = RecurrencePatternOneOfFromJSON;
|
|
19
|
+
exports.RecurrencePatternOneOfFromJSONTyped = RecurrencePatternOneOfFromJSONTyped;
|
|
20
|
+
exports.RecurrencePatternOneOfToJSON = RecurrencePatternOneOfToJSON;
|
|
21
|
+
exports.RecurrencePatternOneOfToJSONTyped = RecurrencePatternOneOfToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.RecurrencePatternOneOfTypeEnum = {
|
|
26
|
+
None: 'none'
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the RecurrencePatternOneOf interface.
|
|
30
|
+
*/
|
|
31
|
+
function instanceOfRecurrencePatternOneOf(value) {
|
|
32
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
function RecurrencePatternOneOfFromJSON(json) {
|
|
37
|
+
return RecurrencePatternOneOfFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
function RecurrencePatternOneOfFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
if (json == null) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'type': json['type'],
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function RecurrencePatternOneOfToJSON(json) {
|
|
48
|
+
return RecurrencePatternOneOfToJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
function RecurrencePatternOneOfToJSONTyped(value, ignoreDiscriminator = false) {
|
|
51
|
+
if (value == null) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'type': value['type'],
|
|
56
|
+
};
|
|
57
|
+
}
|