@mtnmanager/sdk 0.0.14 → 0.0.16
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/esm/models/CurrentWeather.d.ts +9 -23
- package/dist/esm/models/CurrentWeather.js +6 -17
- package/dist/esm/models/DailyForecast.d.ts +8 -7
- package/dist/esm/models/DailyForecast.js +5 -6
- package/dist/esm/models/DailyForecastImperial.d.ts +4 -4
- package/dist/esm/models/DailyForecastImperial.js +4 -12
- package/dist/esm/models/DailyForecastMetric.d.ts +4 -4
- package/dist/esm/models/DailyForecastMetric.js +4 -12
- package/dist/esm/models/HourlyForecast.d.ts +6 -11
- package/dist/esm/models/HourlyForecast.js +5 -10
- package/dist/esm/models/HourlyForecastImperial.d.ts +4 -4
- package/dist/esm/models/HourlyForecastImperial.js +4 -12
- package/dist/esm/models/HourlyForecastMetric.d.ts +4 -4
- package/dist/esm/models/HourlyForecastMetric.js +4 -12
- package/dist/esm/models/ImperialUnits.d.ts +3 -9
- package/dist/esm/models/ImperialUnits.js +3 -11
- package/dist/esm/models/MetricUnits.d.ts +3 -9
- package/dist/esm/models/MetricUnits.js +3 -11
- package/dist/esm/models/PublicLift.d.ts +0 -6
- package/dist/esm/models/PublicLift.js +0 -2
- package/dist/esm/models/PublicRun.d.ts +6 -0
- package/dist/esm/models/PublicRun.js +2 -0
- package/dist/esm/models/RecurrencePatternOneOf.js +2 -0
- package/dist/esm/models/RecurrencePatternOneOf1.js +2 -0
- package/dist/esm/models/WeatherConditionCode.d.ts +22 -0
- package/dist/esm/models/WeatherConditionCode.js +43 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/CurrentWeather.d.ts +9 -23
- package/dist/models/CurrentWeather.js +6 -17
- package/dist/models/DailyForecast.d.ts +8 -7
- package/dist/models/DailyForecast.js +5 -6
- package/dist/models/DailyForecastImperial.d.ts +4 -4
- package/dist/models/DailyForecastImperial.js +4 -12
- package/dist/models/DailyForecastMetric.d.ts +4 -4
- package/dist/models/DailyForecastMetric.js +4 -12
- package/dist/models/HourlyForecast.d.ts +6 -11
- package/dist/models/HourlyForecast.js +5 -10
- package/dist/models/HourlyForecastImperial.d.ts +4 -4
- package/dist/models/HourlyForecastImperial.js +4 -12
- package/dist/models/HourlyForecastMetric.d.ts +4 -4
- package/dist/models/HourlyForecastMetric.js +4 -12
- package/dist/models/ImperialUnits.d.ts +3 -9
- package/dist/models/ImperialUnits.js +3 -11
- package/dist/models/MetricUnits.d.ts +3 -9
- package/dist/models/MetricUnits.js +3 -11
- package/dist/models/PublicLift.d.ts +0 -6
- package/dist/models/PublicLift.js +0 -2
- package/dist/models/PublicRun.d.ts +6 -0
- package/dist/models/PublicRun.js +2 -0
- package/dist/models/RecurrencePatternOneOf.js +2 -0
- package/dist/models/RecurrencePatternOneOf1.js +2 -0
- package/dist/models/WeatherConditionCode.d.ts +22 -0
- package/dist/models/WeatherConditionCode.js +49 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/package.json +1 -1
|
@@ -32,13 +32,13 @@ export interface MetricUnits {
|
|
|
32
32
|
* @type {number}
|
|
33
33
|
* @memberof MetricUnits
|
|
34
34
|
*/
|
|
35
|
-
snowfall
|
|
35
|
+
snowfall?: number | null;
|
|
36
36
|
/**
|
|
37
37
|
* Precipitation in millimeters
|
|
38
38
|
* @type {number}
|
|
39
39
|
* @memberof MetricUnits
|
|
40
40
|
*/
|
|
41
|
-
precipitation
|
|
41
|
+
precipitation?: number | null;
|
|
42
42
|
/**
|
|
43
43
|
* Wind speed in km/h
|
|
44
44
|
* @type {number}
|
|
@@ -50,13 +50,7 @@ export interface MetricUnits {
|
|
|
50
50
|
* @type {number}
|
|
51
51
|
* @memberof MetricUnits
|
|
52
52
|
*/
|
|
53
|
-
windGust
|
|
54
|
-
/**
|
|
55
|
-
* Visibility in kilometers (optional)
|
|
56
|
-
* @type {number}
|
|
57
|
-
* @memberof MetricUnits
|
|
58
|
-
*/
|
|
59
|
-
visibility?: number | null;
|
|
53
|
+
windGust?: number | null;
|
|
60
54
|
}
|
|
61
55
|
/**
|
|
62
56
|
* Check if a given object implements the MetricUnits interface.
|
|
@@ -19,14 +19,8 @@ export function instanceOfMetricUnits(value) {
|
|
|
19
19
|
return false;
|
|
20
20
|
if (!('feelsLike' in value) || value['feelsLike'] === undefined)
|
|
21
21
|
return false;
|
|
22
|
-
if (!('snowfall' in value) || value['snowfall'] === undefined)
|
|
23
|
-
return false;
|
|
24
|
-
if (!('precipitation' in value) || value['precipitation'] === undefined)
|
|
25
|
-
return false;
|
|
26
22
|
if (!('windSpeed' in value) || value['windSpeed'] === undefined)
|
|
27
23
|
return false;
|
|
28
|
-
if (!('windGust' in value) || value['windGust'] === undefined)
|
|
29
|
-
return false;
|
|
30
24
|
return true;
|
|
31
25
|
}
|
|
32
26
|
export function MetricUnitsFromJSON(json) {
|
|
@@ -39,11 +33,10 @@ export function MetricUnitsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
39
33
|
return {
|
|
40
34
|
'temperature': json['temperature'],
|
|
41
35
|
'feelsLike': json['feels_like'],
|
|
42
|
-
'snowfall': json['snowfall'],
|
|
43
|
-
'precipitation': json['precipitation'],
|
|
36
|
+
'snowfall': json['snowfall'] == null ? undefined : json['snowfall'],
|
|
37
|
+
'precipitation': json['precipitation'] == null ? undefined : json['precipitation'],
|
|
44
38
|
'windSpeed': json['wind_speed'],
|
|
45
|
-
'windGust': json['wind_gust'],
|
|
46
|
-
'visibility': json['visibility'] == null ? undefined : json['visibility'],
|
|
39
|
+
'windGust': json['wind_gust'] == null ? undefined : json['wind_gust'],
|
|
47
40
|
};
|
|
48
41
|
}
|
|
49
42
|
export function MetricUnitsToJSON(json) {
|
|
@@ -60,6 +53,5 @@ export function MetricUnitsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
60
53
|
'precipitation': value['precipitation'],
|
|
61
54
|
'wind_speed': value['windSpeed'],
|
|
62
55
|
'wind_gust': value['windGust'],
|
|
63
|
-
'visibility': value['visibility'],
|
|
64
56
|
};
|
|
65
57
|
}
|
|
@@ -46,7 +46,6 @@ export function PublicLiftFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
46
|
'status': LiftStatusFromJSON(json['status']),
|
|
47
47
|
'waitTimeMinutes': json['wait_time_minutes'] == null ? undefined : json['wait_time_minutes'],
|
|
48
48
|
'highSpeed': json['high_speed'],
|
|
49
|
-
'capacityPerHour': json['capacity_per_hour'] == null ? undefined : json['capacity_per_hour'],
|
|
50
49
|
'areaUuid': json['area_uuid'] == null ? undefined : json['area_uuid'],
|
|
51
50
|
'areaName': json['area_name'] == null ? undefined : json['area_name'],
|
|
52
51
|
'areaDisplayOrder': json['area_display_order'] == null ? undefined : json['area_display_order'],
|
|
@@ -67,7 +66,6 @@ export function PublicLiftToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
67
66
|
'status': LiftStatusToJSON(value['status']),
|
|
68
67
|
'wait_time_minutes': value['waitTimeMinutes'],
|
|
69
68
|
'high_speed': value['highSpeed'],
|
|
70
|
-
'capacity_per_hour': value['capacityPerHour'],
|
|
71
69
|
'area_uuid': value['areaUuid'],
|
|
72
70
|
'area_name': value['areaName'],
|
|
73
71
|
'area_display_order': value['areaDisplayOrder'],
|
|
@@ -89,6 +89,12 @@ export interface PublicRun {
|
|
|
89
89
|
* @memberof PublicRun
|
|
90
90
|
*/
|
|
91
91
|
areaDisplayOrder?: number | null;
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @type {string}
|
|
95
|
+
* @memberof PublicRun
|
|
96
|
+
*/
|
|
97
|
+
updatedAt?: string | null;
|
|
92
98
|
}
|
|
93
99
|
/**
|
|
94
100
|
* Check if a given object implements the PublicRun interface.
|
|
@@ -53,6 +53,7 @@ export function PublicRunFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
53
53
|
'areaUuid': json['area_uuid'] == null ? undefined : json['area_uuid'],
|
|
54
54
|
'areaName': json['area_name'] == null ? undefined : json['area_name'],
|
|
55
55
|
'areaDisplayOrder': json['area_display_order'] == null ? undefined : json['area_display_order'],
|
|
56
|
+
'updatedAt': json['updated_at'] == null ? undefined : json['updated_at'],
|
|
56
57
|
};
|
|
57
58
|
}
|
|
58
59
|
export function PublicRunToJSON(json) {
|
|
@@ -75,5 +76,6 @@ export function PublicRunToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
75
76
|
'area_uuid': value['areaUuid'],
|
|
76
77
|
'area_name': value['areaName'],
|
|
77
78
|
'area_display_order': value['areaDisplayOrder'],
|
|
79
|
+
'updated_at': value['updatedAt'],
|
|
78
80
|
};
|
|
79
81
|
}
|
|
@@ -23,6 +23,8 @@ export const RecurrencePatternOneOfTypeEnum = {
|
|
|
23
23
|
export function instanceOfRecurrencePatternOneOf(value) {
|
|
24
24
|
if (!('type' in value) || value['type'] === undefined)
|
|
25
25
|
return false;
|
|
26
|
+
if (value['type'] !== 'none')
|
|
27
|
+
return false;
|
|
26
28
|
return true;
|
|
27
29
|
}
|
|
28
30
|
export function RecurrencePatternOneOfFromJSON(json) {
|
|
@@ -23,6 +23,8 @@ export const RecurrencePatternOneOf1TypeEnum = {
|
|
|
23
23
|
export function instanceOfRecurrencePatternOneOf1(value) {
|
|
24
24
|
if (!('type' in value) || value['type'] === undefined)
|
|
25
25
|
return false;
|
|
26
|
+
if (value['type'] !== 'weekly')
|
|
27
|
+
return false;
|
|
26
28
|
if (!('days' in value) || value['days'] === undefined)
|
|
27
29
|
return false;
|
|
28
30
|
return true;
|
|
@@ -0,0 +1,22 @@
|
|
|
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: 1.0.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
|
+
* @type WeatherConditionCode
|
|
14
|
+
* Apple WeatherKit condition codes
|
|
15
|
+
* Represents all possible weather conditions from the WeatherKit API
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export type WeatherConditionCode = string;
|
|
19
|
+
export declare function WeatherConditionCodeFromJSON(json: any): WeatherConditionCode;
|
|
20
|
+
export declare function WeatherConditionCodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): WeatherConditionCode;
|
|
21
|
+
export declare function WeatherConditionCodeToJSON(json: any): any;
|
|
22
|
+
export declare function WeatherConditionCodeToJSONTyped(value?: WeatherConditionCode | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* MtnManager API
|
|
5
|
+
* Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
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
|
+
export function WeatherConditionCodeFromJSON(json) {
|
|
15
|
+
return WeatherConditionCodeFromJSONTyped(json, false);
|
|
16
|
+
}
|
|
17
|
+
export function WeatherConditionCodeFromJSONTyped(json, ignoreDiscriminator) {
|
|
18
|
+
if (json == null) {
|
|
19
|
+
return json;
|
|
20
|
+
}
|
|
21
|
+
if (typeof json === 'string' && (json === 'Clear' || json === 'MostlyClear' || json === 'PartlyCloudy' || json === 'MostlyCloudy' || json === 'Cloudy' || json === 'Dust' || json === 'Fog' || json === 'Haze' || json === 'Smoke' || json === 'Breezy' || json === 'Windy' || json === 'Drizzle' || json === 'Rain' || json === 'Showers' || json === 'ScatteredShowers' || json === 'HeavyRain' || json === 'Flurries' || json === 'Snow' || json === 'SnowShowers' || json === 'ScatteredSnowShowers' || json === 'HeavySnow' || json === 'Blizzard' || json === 'BlowingSnow' || json === 'MixedRainAndSleet' || json === 'MixedRainAndSnow' || json === 'MixedRainfall' || json === 'MixedSnowAndSleet' || json === 'Sleet' || json === 'FreezingDrizzle' || json === 'FreezingRain' || json === 'Frigid' || json === 'Hail' || json === 'ScatteredThunderstorms' || json === 'IsolatedThunderstorms' || json === 'Thunderstorm' || json === 'SevereThunderstorm' || json === 'Hurricane' || json === 'Tornado' || json === 'TropicalStorm' || json === 'Hot')) {
|
|
22
|
+
return json;
|
|
23
|
+
}
|
|
24
|
+
if (typeof json === 'string' && (json === 'Unknown')) {
|
|
25
|
+
return json;
|
|
26
|
+
}
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
export function WeatherConditionCodeToJSON(json) {
|
|
30
|
+
return WeatherConditionCodeToJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function WeatherConditionCodeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
33
|
+
if (value == null) {
|
|
34
|
+
return value;
|
|
35
|
+
}
|
|
36
|
+
if (typeof value === 'string' && (value === 'Clear' || value === 'MostlyClear' || value === 'PartlyCloudy' || value === 'MostlyCloudy' || value === 'Cloudy' || value === 'Dust' || value === 'Fog' || value === 'Haze' || value === 'Smoke' || value === 'Breezy' || value === 'Windy' || value === 'Drizzle' || value === 'Rain' || value === 'Showers' || value === 'ScatteredShowers' || value === 'HeavyRain' || value === 'Flurries' || value === 'Snow' || value === 'SnowShowers' || value === 'ScatteredSnowShowers' || value === 'HeavySnow' || value === 'Blizzard' || value === 'BlowingSnow' || value === 'MixedRainAndSleet' || value === 'MixedRainAndSnow' || value === 'MixedRainfall' || value === 'MixedSnowAndSleet' || value === 'Sleet' || value === 'FreezingDrizzle' || value === 'FreezingRain' || value === 'Frigid' || value === 'Hail' || value === 'ScatteredThunderstorms' || value === 'IsolatedThunderstorms' || value === 'Thunderstorm' || value === 'SevereThunderstorm' || value === 'Hurricane' || value === 'Tornado' || value === 'TropicalStorm' || value === 'Hot')) {
|
|
37
|
+
return value;
|
|
38
|
+
}
|
|
39
|
+
if (typeof value === 'string' && (value === 'Unknown')) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
return {};
|
|
43
|
+
}
|
package/dist/esm/models/index.js
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { WeatherConditionCode } from './WeatherConditionCode';
|
|
12
13
|
import type { ImperialUnits } from './ImperialUnits';
|
|
13
14
|
import type { MetricUnits } from './MetricUnits';
|
|
14
15
|
/**
|
|
@@ -29,15 +30,6 @@ export interface CurrentWeather {
|
|
|
29
30
|
* @memberof CurrentWeather
|
|
30
31
|
*/
|
|
31
32
|
metric: MetricUnits;
|
|
32
|
-
/**
|
|
33
|
-
* Weather condition code (unit-independent)
|
|
34
|
-
* 0=clear, 1=mainly clear, 2=partly cloudy, 3=overcast,
|
|
35
|
-
* 45/48=fog, 51-55=drizzle, 61-65=rain, 71-77=snow,
|
|
36
|
-
* 80-82=rain showers, 85-86=snow showers, 95-99=thunderstorm
|
|
37
|
-
* @type {number}
|
|
38
|
-
* @memberof CurrentWeather
|
|
39
|
-
*/
|
|
40
|
-
weatherCode: number;
|
|
41
33
|
/**
|
|
42
34
|
* Human-readable weather condition
|
|
43
35
|
* @type {string}
|
|
@@ -45,29 +37,23 @@ export interface CurrentWeather {
|
|
|
45
37
|
*/
|
|
46
38
|
condition: string;
|
|
47
39
|
/**
|
|
48
|
-
*
|
|
49
|
-
* @type {
|
|
40
|
+
* Apple WeatherKit condition code (e.g., "Clear", "PartlyCloudy", "Rain", "Snow")
|
|
41
|
+
* @type {WeatherConditionCode}
|
|
50
42
|
* @memberof CurrentWeather
|
|
51
43
|
*/
|
|
52
|
-
|
|
44
|
+
conditionCode: WeatherConditionCode;
|
|
53
45
|
/**
|
|
54
|
-
* Wind direction
|
|
55
|
-
* @type {string}
|
|
56
|
-
* @memberof CurrentWeather
|
|
57
|
-
*/
|
|
58
|
-
windDirectionCardinal: string;
|
|
59
|
-
/**
|
|
60
|
-
* Cloud cover percentage (0-100)
|
|
46
|
+
* Wind direction in degrees (0-360)
|
|
61
47
|
* @type {number}
|
|
62
48
|
* @memberof CurrentWeather
|
|
63
49
|
*/
|
|
64
|
-
|
|
50
|
+
windDirection?: number | null;
|
|
65
51
|
/**
|
|
66
|
-
*
|
|
67
|
-
* @type {
|
|
52
|
+
* Wind direction as cardinal direction (N, NE, E, SE, S, SW, W, NW)
|
|
53
|
+
* @type {string}
|
|
68
54
|
* @memberof CurrentWeather
|
|
69
55
|
*/
|
|
70
|
-
|
|
56
|
+
windDirectionCardinal?: string | null;
|
|
71
57
|
/**
|
|
72
58
|
* Timestamp of observation
|
|
73
59
|
* @type {string}
|
|
@@ -18,6 +18,7 @@ exports.CurrentWeatherFromJSON = CurrentWeatherFromJSON;
|
|
|
18
18
|
exports.CurrentWeatherFromJSONTyped = CurrentWeatherFromJSONTyped;
|
|
19
19
|
exports.CurrentWeatherToJSON = CurrentWeatherToJSON;
|
|
20
20
|
exports.CurrentWeatherToJSONTyped = CurrentWeatherToJSONTyped;
|
|
21
|
+
const WeatherConditionCode_1 = require("./WeatherConditionCode");
|
|
21
22
|
const ImperialUnits_1 = require("./ImperialUnits");
|
|
22
23
|
const MetricUnits_1 = require("./MetricUnits");
|
|
23
24
|
/**
|
|
@@ -28,17 +29,9 @@ function instanceOfCurrentWeather(value) {
|
|
|
28
29
|
return false;
|
|
29
30
|
if (!('metric' in value) || value['metric'] === undefined)
|
|
30
31
|
return false;
|
|
31
|
-
if (!('weatherCode' in value) || value['weatherCode'] === undefined)
|
|
32
|
-
return false;
|
|
33
32
|
if (!('condition' in value) || value['condition'] === undefined)
|
|
34
33
|
return false;
|
|
35
|
-
if (!('
|
|
36
|
-
return false;
|
|
37
|
-
if (!('windDirectionCardinal' in value) || value['windDirectionCardinal'] === undefined)
|
|
38
|
-
return false;
|
|
39
|
-
if (!('cloudCover' in value) || value['cloudCover'] === undefined)
|
|
40
|
-
return false;
|
|
41
|
-
if (!('humidity' in value) || value['humidity'] === undefined)
|
|
34
|
+
if (!('conditionCode' in value) || value['conditionCode'] === undefined)
|
|
42
35
|
return false;
|
|
43
36
|
if (!('timestamp' in value) || value['timestamp'] === undefined)
|
|
44
37
|
return false;
|
|
@@ -54,12 +47,10 @@ function CurrentWeatherFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
47
|
return {
|
|
55
48
|
'imperial': (0, ImperialUnits_1.ImperialUnitsFromJSON)(json['imperial']),
|
|
56
49
|
'metric': (0, MetricUnits_1.MetricUnitsFromJSON)(json['metric']),
|
|
57
|
-
'weatherCode': json['weather_code'],
|
|
58
50
|
'condition': json['condition'],
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'
|
|
62
|
-
'humidity': json['humidity'],
|
|
51
|
+
'conditionCode': (0, WeatherConditionCode_1.WeatherConditionCodeFromJSON)(json['condition_code']),
|
|
52
|
+
'windDirection': json['wind_direction'] == null ? undefined : json['wind_direction'],
|
|
53
|
+
'windDirectionCardinal': json['wind_direction_cardinal'] == null ? undefined : json['wind_direction_cardinal'],
|
|
63
54
|
'timestamp': json['timestamp'],
|
|
64
55
|
};
|
|
65
56
|
}
|
|
@@ -73,12 +64,10 @@ function CurrentWeatherToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
73
64
|
return {
|
|
74
65
|
'imperial': (0, ImperialUnits_1.ImperialUnitsToJSON)(value['imperial']),
|
|
75
66
|
'metric': (0, MetricUnits_1.MetricUnitsToJSON)(value['metric']),
|
|
76
|
-
'weather_code': value['weatherCode'],
|
|
77
67
|
'condition': value['condition'],
|
|
68
|
+
'condition_code': (0, WeatherConditionCode_1.WeatherConditionCodeToJSON)(value['conditionCode']),
|
|
78
69
|
'wind_direction': value['windDirection'],
|
|
79
70
|
'wind_direction_cardinal': value['windDirectionCardinal'],
|
|
80
|
-
'cloud_cover': value['cloudCover'],
|
|
81
|
-
'humidity': value['humidity'],
|
|
82
71
|
'timestamp': value['timestamp'],
|
|
83
72
|
};
|
|
84
73
|
}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { WeatherConditionCode } from './WeatherConditionCode';
|
|
12
13
|
import type { DailyForecastMetric } from './DailyForecastMetric';
|
|
13
14
|
import type { DailyForecastImperial } from './DailyForecastImperial';
|
|
14
15
|
/**
|
|
@@ -36,23 +37,23 @@ export interface DailyForecast {
|
|
|
36
37
|
*/
|
|
37
38
|
metric: DailyForecastMetric;
|
|
38
39
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @type {
|
|
40
|
+
* Human-readable condition (daytime)
|
|
41
|
+
* @type {string}
|
|
41
42
|
* @memberof DailyForecast
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
+
condition: string;
|
|
44
45
|
/**
|
|
45
|
-
*
|
|
46
|
-
* @type {
|
|
46
|
+
* Apple WeatherKit condition code (daytime)
|
|
47
|
+
* @type {WeatherConditionCode}
|
|
47
48
|
* @memberof DailyForecast
|
|
48
49
|
*/
|
|
49
|
-
|
|
50
|
+
conditionCode: WeatherConditionCode;
|
|
50
51
|
/**
|
|
51
52
|
* Probability of precipitation (0-100%)
|
|
52
53
|
* @type {number}
|
|
53
54
|
* @memberof DailyForecast
|
|
54
55
|
*/
|
|
55
|
-
precipitationProbability
|
|
56
|
+
precipitationProbability?: number | null;
|
|
56
57
|
/**
|
|
57
58
|
* Sunrise time
|
|
58
59
|
* @type {string}
|
|
@@ -18,6 +18,7 @@ exports.DailyForecastFromJSON = DailyForecastFromJSON;
|
|
|
18
18
|
exports.DailyForecastFromJSONTyped = DailyForecastFromJSONTyped;
|
|
19
19
|
exports.DailyForecastToJSON = DailyForecastToJSON;
|
|
20
20
|
exports.DailyForecastToJSONTyped = DailyForecastToJSONTyped;
|
|
21
|
+
const WeatherConditionCode_1 = require("./WeatherConditionCode");
|
|
21
22
|
const DailyForecastMetric_1 = require("./DailyForecastMetric");
|
|
22
23
|
const DailyForecastImperial_1 = require("./DailyForecastImperial");
|
|
23
24
|
/**
|
|
@@ -30,11 +31,9 @@ function instanceOfDailyForecast(value) {
|
|
|
30
31
|
return false;
|
|
31
32
|
if (!('metric' in value) || value['metric'] === undefined)
|
|
32
33
|
return false;
|
|
33
|
-
if (!('weatherCode' in value) || value['weatherCode'] === undefined)
|
|
34
|
-
return false;
|
|
35
34
|
if (!('condition' in value) || value['condition'] === undefined)
|
|
36
35
|
return false;
|
|
37
|
-
if (!('
|
|
36
|
+
if (!('conditionCode' in value) || value['conditionCode'] === undefined)
|
|
38
37
|
return false;
|
|
39
38
|
if (!('sunrise' in value) || value['sunrise'] === undefined)
|
|
40
39
|
return false;
|
|
@@ -53,9 +52,9 @@ function DailyForecastFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
53
52
|
'date': json['date'],
|
|
54
53
|
'imperial': (0, DailyForecastImperial_1.DailyForecastImperialFromJSON)(json['imperial']),
|
|
55
54
|
'metric': (0, DailyForecastMetric_1.DailyForecastMetricFromJSON)(json['metric']),
|
|
56
|
-
'weatherCode': json['weather_code'],
|
|
57
55
|
'condition': json['condition'],
|
|
58
|
-
'
|
|
56
|
+
'conditionCode': (0, WeatherConditionCode_1.WeatherConditionCodeFromJSON)(json['condition_code']),
|
|
57
|
+
'precipitationProbability': json['precipitation_probability'] == null ? undefined : json['precipitation_probability'],
|
|
59
58
|
'sunrise': json['sunrise'],
|
|
60
59
|
'sunset': json['sunset'],
|
|
61
60
|
};
|
|
@@ -71,8 +70,8 @@ function DailyForecastToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
71
70
|
'date': value['date'],
|
|
72
71
|
'imperial': (0, DailyForecastImperial_1.DailyForecastImperialToJSON)(value['imperial']),
|
|
73
72
|
'metric': (0, DailyForecastMetric_1.DailyForecastMetricToJSON)(value['metric']),
|
|
74
|
-
'weather_code': value['weatherCode'],
|
|
75
73
|
'condition': value['condition'],
|
|
74
|
+
'condition_code': (0, WeatherConditionCode_1.WeatherConditionCodeToJSON)(value['conditionCode']),
|
|
76
75
|
'precipitation_probability': value['precipitationProbability'],
|
|
77
76
|
'sunrise': value['sunrise'],
|
|
78
77
|
'sunset': value['sunset'],
|
|
@@ -32,25 +32,25 @@ export interface DailyForecastImperial {
|
|
|
32
32
|
* @type {number}
|
|
33
33
|
* @memberof DailyForecastImperial
|
|
34
34
|
*/
|
|
35
|
-
snowfallTotal
|
|
35
|
+
snowfallTotal?: number | null;
|
|
36
36
|
/**
|
|
37
37
|
* Total precipitation expected in inches
|
|
38
38
|
* @type {number}
|
|
39
39
|
* @memberof DailyForecastImperial
|
|
40
40
|
*/
|
|
41
|
-
precipitationTotal
|
|
41
|
+
precipitationTotal?: number | null;
|
|
42
42
|
/**
|
|
43
43
|
* Maximum wind speed in mph
|
|
44
44
|
* @type {number}
|
|
45
45
|
* @memberof DailyForecastImperial
|
|
46
46
|
*/
|
|
47
|
-
windSpeedMax
|
|
47
|
+
windSpeedMax?: number | null;
|
|
48
48
|
/**
|
|
49
49
|
* Maximum wind gust in mph
|
|
50
50
|
* @type {number}
|
|
51
51
|
* @memberof DailyForecastImperial
|
|
52
52
|
*/
|
|
53
|
-
windGustMax
|
|
53
|
+
windGustMax?: number | null;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Check if a given object implements the DailyForecastImperial interface.
|
|
@@ -26,14 +26,6 @@ function instanceOfDailyForecastImperial(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('temperatureLow' in value) || value['temperatureLow'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
-
if (!('snowfallTotal' in value) || value['snowfallTotal'] === undefined)
|
|
30
|
-
return false;
|
|
31
|
-
if (!('precipitationTotal' in value) || value['precipitationTotal'] === undefined)
|
|
32
|
-
return false;
|
|
33
|
-
if (!('windSpeedMax' in value) || value['windSpeedMax'] === undefined)
|
|
34
|
-
return false;
|
|
35
|
-
if (!('windGustMax' in value) || value['windGustMax'] === undefined)
|
|
36
|
-
return false;
|
|
37
29
|
return true;
|
|
38
30
|
}
|
|
39
31
|
function DailyForecastImperialFromJSON(json) {
|
|
@@ -46,10 +38,10 @@ function DailyForecastImperialFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
38
|
return {
|
|
47
39
|
'temperatureHigh': json['temperature_high'],
|
|
48
40
|
'temperatureLow': json['temperature_low'],
|
|
49
|
-
'snowfallTotal': json['snowfall_total'],
|
|
50
|
-
'precipitationTotal': json['precipitation_total'],
|
|
51
|
-
'windSpeedMax': json['wind_speed_max'],
|
|
52
|
-
'windGustMax': json['wind_gust_max'],
|
|
41
|
+
'snowfallTotal': json['snowfall_total'] == null ? undefined : json['snowfall_total'],
|
|
42
|
+
'precipitationTotal': json['precipitation_total'] == null ? undefined : json['precipitation_total'],
|
|
43
|
+
'windSpeedMax': json['wind_speed_max'] == null ? undefined : json['wind_speed_max'],
|
|
44
|
+
'windGustMax': json['wind_gust_max'] == null ? undefined : json['wind_gust_max'],
|
|
53
45
|
};
|
|
54
46
|
}
|
|
55
47
|
function DailyForecastImperialToJSON(json) {
|
|
@@ -32,25 +32,25 @@ export interface DailyForecastMetric {
|
|
|
32
32
|
* @type {number}
|
|
33
33
|
* @memberof DailyForecastMetric
|
|
34
34
|
*/
|
|
35
|
-
snowfallTotal
|
|
35
|
+
snowfallTotal?: number | null;
|
|
36
36
|
/**
|
|
37
37
|
* Total precipitation expected in millimeters
|
|
38
38
|
* @type {number}
|
|
39
39
|
* @memberof DailyForecastMetric
|
|
40
40
|
*/
|
|
41
|
-
precipitationTotal
|
|
41
|
+
precipitationTotal?: number | null;
|
|
42
42
|
/**
|
|
43
43
|
* Maximum wind speed in km/h
|
|
44
44
|
* @type {number}
|
|
45
45
|
* @memberof DailyForecastMetric
|
|
46
46
|
*/
|
|
47
|
-
windSpeedMax
|
|
47
|
+
windSpeedMax?: number | null;
|
|
48
48
|
/**
|
|
49
49
|
* Maximum wind gust in km/h
|
|
50
50
|
* @type {number}
|
|
51
51
|
* @memberof DailyForecastMetric
|
|
52
52
|
*/
|
|
53
|
-
windGustMax
|
|
53
|
+
windGustMax?: number | null;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Check if a given object implements the DailyForecastMetric interface.
|
|
@@ -26,14 +26,6 @@ function instanceOfDailyForecastMetric(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('temperatureLow' in value) || value['temperatureLow'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
-
if (!('snowfallTotal' in value) || value['snowfallTotal'] === undefined)
|
|
30
|
-
return false;
|
|
31
|
-
if (!('precipitationTotal' in value) || value['precipitationTotal'] === undefined)
|
|
32
|
-
return false;
|
|
33
|
-
if (!('windSpeedMax' in value) || value['windSpeedMax'] === undefined)
|
|
34
|
-
return false;
|
|
35
|
-
if (!('windGustMax' in value) || value['windGustMax'] === undefined)
|
|
36
|
-
return false;
|
|
37
29
|
return true;
|
|
38
30
|
}
|
|
39
31
|
function DailyForecastMetricFromJSON(json) {
|
|
@@ -46,10 +38,10 @@ function DailyForecastMetricFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
38
|
return {
|
|
47
39
|
'temperatureHigh': json['temperature_high'],
|
|
48
40
|
'temperatureLow': json['temperature_low'],
|
|
49
|
-
'snowfallTotal': json['snowfall_total'],
|
|
50
|
-
'precipitationTotal': json['precipitation_total'],
|
|
51
|
-
'windSpeedMax': json['wind_speed_max'],
|
|
52
|
-
'windGustMax': json['wind_gust_max'],
|
|
41
|
+
'snowfallTotal': json['snowfall_total'] == null ? undefined : json['snowfall_total'],
|
|
42
|
+
'precipitationTotal': json['precipitation_total'] == null ? undefined : json['precipitation_total'],
|
|
43
|
+
'windSpeedMax': json['wind_speed_max'] == null ? undefined : json['wind_speed_max'],
|
|
44
|
+
'windGustMax': json['wind_gust_max'] == null ? undefined : json['wind_gust_max'],
|
|
53
45
|
};
|
|
54
46
|
}
|
|
55
47
|
function DailyForecastMetricToJSON(json) {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { WeatherConditionCode } from './WeatherConditionCode';
|
|
12
13
|
import type { HourlyForecastMetric } from './HourlyForecastMetric';
|
|
13
14
|
import type { HourlyForecastImperial } from './HourlyForecastImperial';
|
|
14
15
|
/**
|
|
@@ -35,12 +36,6 @@ export interface HourlyForecast {
|
|
|
35
36
|
* @memberof HourlyForecast
|
|
36
37
|
*/
|
|
37
38
|
metric: HourlyForecastMetric;
|
|
38
|
-
/**
|
|
39
|
-
* Weather condition code
|
|
40
|
-
* @type {number}
|
|
41
|
-
* @memberof HourlyForecast
|
|
42
|
-
*/
|
|
43
|
-
weatherCode: number;
|
|
44
39
|
/**
|
|
45
40
|
* Human-readable condition
|
|
46
41
|
* @type {string}
|
|
@@ -48,17 +43,17 @@ export interface HourlyForecast {
|
|
|
48
43
|
*/
|
|
49
44
|
condition: string;
|
|
50
45
|
/**
|
|
51
|
-
*
|
|
52
|
-
* @type {
|
|
46
|
+
* Apple WeatherKit condition code
|
|
47
|
+
* @type {WeatherConditionCode}
|
|
53
48
|
* @memberof HourlyForecast
|
|
54
49
|
*/
|
|
55
|
-
|
|
50
|
+
conditionCode: WeatherConditionCode;
|
|
56
51
|
/**
|
|
57
|
-
*
|
|
52
|
+
* Probability of precipitation (0-100%)
|
|
58
53
|
* @type {number}
|
|
59
54
|
* @memberof HourlyForecast
|
|
60
55
|
*/
|
|
61
|
-
|
|
56
|
+
precipitationProbability?: number | null;
|
|
62
57
|
}
|
|
63
58
|
/**
|
|
64
59
|
* Check if a given object implements the HourlyForecast interface.
|
|
@@ -18,6 +18,7 @@ exports.HourlyForecastFromJSON = HourlyForecastFromJSON;
|
|
|
18
18
|
exports.HourlyForecastFromJSONTyped = HourlyForecastFromJSONTyped;
|
|
19
19
|
exports.HourlyForecastToJSON = HourlyForecastToJSON;
|
|
20
20
|
exports.HourlyForecastToJSONTyped = HourlyForecastToJSONTyped;
|
|
21
|
+
const WeatherConditionCode_1 = require("./WeatherConditionCode");
|
|
21
22
|
const HourlyForecastMetric_1 = require("./HourlyForecastMetric");
|
|
22
23
|
const HourlyForecastImperial_1 = require("./HourlyForecastImperial");
|
|
23
24
|
/**
|
|
@@ -30,13 +31,9 @@ function instanceOfHourlyForecast(value) {
|
|
|
30
31
|
return false;
|
|
31
32
|
if (!('metric' in value) || value['metric'] === undefined)
|
|
32
33
|
return false;
|
|
33
|
-
if (!('weatherCode' in value) || value['weatherCode'] === undefined)
|
|
34
|
-
return false;
|
|
35
34
|
if (!('condition' in value) || value['condition'] === undefined)
|
|
36
35
|
return false;
|
|
37
|
-
if (!('
|
|
38
|
-
return false;
|
|
39
|
-
if (!('cloudCover' in value) || value['cloudCover'] === undefined)
|
|
36
|
+
if (!('conditionCode' in value) || value['conditionCode'] === undefined)
|
|
40
37
|
return false;
|
|
41
38
|
return true;
|
|
42
39
|
}
|
|
@@ -51,10 +48,9 @@ function HourlyForecastFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
48
|
'timestamp': json['timestamp'],
|
|
52
49
|
'imperial': (0, HourlyForecastImperial_1.HourlyForecastImperialFromJSON)(json['imperial']),
|
|
53
50
|
'metric': (0, HourlyForecastMetric_1.HourlyForecastMetricFromJSON)(json['metric']),
|
|
54
|
-
'weatherCode': json['weather_code'],
|
|
55
51
|
'condition': json['condition'],
|
|
56
|
-
'
|
|
57
|
-
'
|
|
52
|
+
'conditionCode': (0, WeatherConditionCode_1.WeatherConditionCodeFromJSON)(json['condition_code']),
|
|
53
|
+
'precipitationProbability': json['precipitation_probability'] == null ? undefined : json['precipitation_probability'],
|
|
58
54
|
};
|
|
59
55
|
}
|
|
60
56
|
function HourlyForecastToJSON(json) {
|
|
@@ -68,9 +64,8 @@ function HourlyForecastToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
68
64
|
'timestamp': value['timestamp'],
|
|
69
65
|
'imperial': (0, HourlyForecastImperial_1.HourlyForecastImperialToJSON)(value['imperial']),
|
|
70
66
|
'metric': (0, HourlyForecastMetric_1.HourlyForecastMetricToJSON)(value['metric']),
|
|
71
|
-
'weather_code': value['weatherCode'],
|
|
72
67
|
'condition': value['condition'],
|
|
68
|
+
'condition_code': (0, WeatherConditionCode_1.WeatherConditionCodeToJSON)(value['conditionCode']),
|
|
73
69
|
'precipitation_probability': value['precipitationProbability'],
|
|
74
|
-
'cloud_cover': value['cloudCover'],
|
|
75
70
|
};
|
|
76
71
|
}
|