@mtnmanager/sdk 0.0.14 → 0.0.15

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.
Files changed (54) hide show
  1. package/README.md +3 -2
  2. package/dist/esm/models/CurrentWeather.d.ts +9 -23
  3. package/dist/esm/models/CurrentWeather.js +6 -17
  4. package/dist/esm/models/DailyForecast.d.ts +8 -7
  5. package/dist/esm/models/DailyForecast.js +5 -6
  6. package/dist/esm/models/DailyForecastImperial.d.ts +4 -4
  7. package/dist/esm/models/DailyForecastImperial.js +4 -12
  8. package/dist/esm/models/DailyForecastMetric.d.ts +4 -4
  9. package/dist/esm/models/DailyForecastMetric.js +4 -12
  10. package/dist/esm/models/HourlyForecast.d.ts +6 -11
  11. package/dist/esm/models/HourlyForecast.js +5 -10
  12. package/dist/esm/models/HourlyForecastImperial.d.ts +4 -4
  13. package/dist/esm/models/HourlyForecastImperial.js +4 -12
  14. package/dist/esm/models/HourlyForecastMetric.d.ts +4 -4
  15. package/dist/esm/models/HourlyForecastMetric.js +4 -12
  16. package/dist/esm/models/ImperialUnits.d.ts +3 -9
  17. package/dist/esm/models/ImperialUnits.js +3 -11
  18. package/dist/esm/models/MetricUnits.d.ts +3 -9
  19. package/dist/esm/models/MetricUnits.js +3 -11
  20. package/dist/esm/models/PublicLift.d.ts +0 -6
  21. package/dist/esm/models/PublicLift.js +0 -2
  22. package/dist/esm/models/RecurrencePatternOneOf.js +2 -0
  23. package/dist/esm/models/RecurrencePatternOneOf1.js +2 -0
  24. package/dist/esm/models/WeatherConditionCode.d.ts +22 -0
  25. package/dist/esm/models/WeatherConditionCode.js +43 -0
  26. package/dist/esm/models/index.d.ts +1 -0
  27. package/dist/esm/models/index.js +1 -0
  28. package/dist/models/CurrentWeather.d.ts +9 -23
  29. package/dist/models/CurrentWeather.js +6 -17
  30. package/dist/models/DailyForecast.d.ts +8 -7
  31. package/dist/models/DailyForecast.js +5 -6
  32. package/dist/models/DailyForecastImperial.d.ts +4 -4
  33. package/dist/models/DailyForecastImperial.js +4 -12
  34. package/dist/models/DailyForecastMetric.d.ts +4 -4
  35. package/dist/models/DailyForecastMetric.js +4 -12
  36. package/dist/models/HourlyForecast.d.ts +6 -11
  37. package/dist/models/HourlyForecast.js +5 -10
  38. package/dist/models/HourlyForecastImperial.d.ts +4 -4
  39. package/dist/models/HourlyForecastImperial.js +4 -12
  40. package/dist/models/HourlyForecastMetric.d.ts +4 -4
  41. package/dist/models/HourlyForecastMetric.js +4 -12
  42. package/dist/models/ImperialUnits.d.ts +3 -9
  43. package/dist/models/ImperialUnits.js +3 -11
  44. package/dist/models/MetricUnits.d.ts +3 -9
  45. package/dist/models/MetricUnits.js +3 -11
  46. package/dist/models/PublicLift.d.ts +0 -6
  47. package/dist/models/PublicLift.js +0 -2
  48. package/dist/models/RecurrencePatternOneOf.js +2 -0
  49. package/dist/models/RecurrencePatternOneOf1.js +2 -0
  50. package/dist/models/WeatherConditionCode.d.ts +22 -0
  51. package/dist/models/WeatherConditionCode.js +49 -0
  52. package/dist/models/index.d.ts +1 -0
  53. package/dist/models/index.js +1 -0
  54. package/package.json +1 -1
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @mtnmanager/sdk@0.0.14
1
+ # @mtnmanager/sdk@0.0.15
2
2
 
3
3
  A TypeScript SDK client for the your-resort.mtnmanager.com API.
4
4
 
@@ -86,6 +86,7 @@ All URIs are relative to *https://your-resort.mtnmanager.com*
86
86
  - [SnowMetrics](docs/SnowMetrics.md)
87
87
  - [SurfaceCondition](docs/SurfaceCondition.md)
88
88
  - [UnitPreference](docs/UnitPreference.md)
89
+ - [WeatherConditionCode](docs/WeatherConditionCode.md)
89
90
  - [WeatherData](docs/WeatherData.md)
90
91
 
91
92
  ### Authorization
@@ -100,7 +101,7 @@ and is automatically generated by the
100
101
  [OpenAPI Generator](https://openapi-generator.tech) project:
101
102
 
102
103
  - API version: `1.0.0`
103
- - Package version: `0.0.14`
104
+ - Package version: `0.0.15`
104
105
  - Generator version: `7.17.0`
105
106
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
106
107
 
@@ -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
- * Wind direction in degrees (0-360)
49
- * @type {number}
40
+ * Apple WeatherKit condition code (e.g., "Clear", "PartlyCloudy", "Rain", "Snow")
41
+ * @type {WeatherConditionCode}
50
42
  * @memberof CurrentWeather
51
43
  */
52
- windDirection: number;
44
+ conditionCode: WeatherConditionCode;
53
45
  /**
54
- * Wind direction as cardinal direction (N, NE, E, SE, S, SW, W, NW)
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
- cloudCover: number;
50
+ windDirection?: number | null;
65
51
  /**
66
- * Relative humidity percentage (0-100)
67
- * @type {number}
52
+ * Wind direction as cardinal direction (N, NE, E, SE, S, SW, W, NW)
53
+ * @type {string}
68
54
  * @memberof CurrentWeather
69
55
  */
70
- humidity: number;
56
+ windDirectionCardinal?: string | null;
71
57
  /**
72
58
  * Timestamp of observation
73
59
  * @type {string}
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { WeatherConditionCodeFromJSON, WeatherConditionCodeToJSON, } from './WeatherConditionCode';
14
15
  import { ImperialUnitsFromJSON, ImperialUnitsToJSON, } from './ImperialUnits';
15
16
  import { MetricUnitsFromJSON, MetricUnitsToJSON, } from './MetricUnits';
16
17
  /**
@@ -21,17 +22,9 @@ export function instanceOfCurrentWeather(value) {
21
22
  return false;
22
23
  if (!('metric' in value) || value['metric'] === undefined)
23
24
  return false;
24
- if (!('weatherCode' in value) || value['weatherCode'] === undefined)
25
- return false;
26
25
  if (!('condition' in value) || value['condition'] === undefined)
27
26
  return false;
28
- if (!('windDirection' in value) || value['windDirection'] === undefined)
29
- return false;
30
- if (!('windDirectionCardinal' in value) || value['windDirectionCardinal'] === undefined)
31
- return false;
32
- if (!('cloudCover' in value) || value['cloudCover'] === undefined)
33
- return false;
34
- if (!('humidity' in value) || value['humidity'] === undefined)
27
+ if (!('conditionCode' in value) || value['conditionCode'] === undefined)
35
28
  return false;
36
29
  if (!('timestamp' in value) || value['timestamp'] === undefined)
37
30
  return false;
@@ -47,12 +40,10 @@ export function CurrentWeatherFromJSONTyped(json, ignoreDiscriminator) {
47
40
  return {
48
41
  'imperial': ImperialUnitsFromJSON(json['imperial']),
49
42
  'metric': MetricUnitsFromJSON(json['metric']),
50
- 'weatherCode': json['weather_code'],
51
43
  'condition': json['condition'],
52
- 'windDirection': json['wind_direction'],
53
- 'windDirectionCardinal': json['wind_direction_cardinal'],
54
- 'cloudCover': json['cloud_cover'],
55
- 'humidity': json['humidity'],
44
+ 'conditionCode': WeatherConditionCodeFromJSON(json['condition_code']),
45
+ 'windDirection': json['wind_direction'] == null ? undefined : json['wind_direction'],
46
+ 'windDirectionCardinal': json['wind_direction_cardinal'] == null ? undefined : json['wind_direction_cardinal'],
56
47
  'timestamp': json['timestamp'],
57
48
  };
58
49
  }
@@ -66,12 +57,10 @@ export function CurrentWeatherToJSONTyped(value, ignoreDiscriminator = false) {
66
57
  return {
67
58
  'imperial': ImperialUnitsToJSON(value['imperial']),
68
59
  'metric': MetricUnitsToJSON(value['metric']),
69
- 'weather_code': value['weatherCode'],
70
60
  'condition': value['condition'],
61
+ 'condition_code': WeatherConditionCodeToJSON(value['conditionCode']),
71
62
  'wind_direction': value['windDirection'],
72
63
  'wind_direction_cardinal': value['windDirectionCardinal'],
73
- 'cloud_cover': value['cloudCover'],
74
- 'humidity': value['humidity'],
75
64
  'timestamp': value['timestamp'],
76
65
  };
77
66
  }
@@ -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
- * Weather condition code (most severe/relevant for the day)
40
- * @type {number}
40
+ * Human-readable condition (daytime)
41
+ * @type {string}
41
42
  * @memberof DailyForecast
42
43
  */
43
- weatherCode: number;
44
+ condition: string;
44
45
  /**
45
- * Human-readable condition
46
- * @type {string}
46
+ * Apple WeatherKit condition code (daytime)
47
+ * @type {WeatherConditionCode}
47
48
  * @memberof DailyForecast
48
49
  */
49
- condition: string;
50
+ conditionCode: WeatherConditionCode;
50
51
  /**
51
52
  * Probability of precipitation (0-100%)
52
53
  * @type {number}
53
54
  * @memberof DailyForecast
54
55
  */
55
- precipitationProbability: number;
56
+ precipitationProbability?: number | null;
56
57
  /**
57
58
  * Sunrise time
58
59
  * @type {string}
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { WeatherConditionCodeFromJSON, WeatherConditionCodeToJSON, } from './WeatherConditionCode';
14
15
  import { DailyForecastMetricFromJSON, DailyForecastMetricToJSON, } from './DailyForecastMetric';
15
16
  import { DailyForecastImperialFromJSON, DailyForecastImperialToJSON, } from './DailyForecastImperial';
16
17
  /**
@@ -23,11 +24,9 @@ export function instanceOfDailyForecast(value) {
23
24
  return false;
24
25
  if (!('metric' in value) || value['metric'] === undefined)
25
26
  return false;
26
- if (!('weatherCode' in value) || value['weatherCode'] === undefined)
27
- return false;
28
27
  if (!('condition' in value) || value['condition'] === undefined)
29
28
  return false;
30
- if (!('precipitationProbability' in value) || value['precipitationProbability'] === undefined)
29
+ if (!('conditionCode' in value) || value['conditionCode'] === undefined)
31
30
  return false;
32
31
  if (!('sunrise' in value) || value['sunrise'] === undefined)
33
32
  return false;
@@ -46,9 +45,9 @@ export function DailyForecastFromJSONTyped(json, ignoreDiscriminator) {
46
45
  'date': json['date'],
47
46
  'imperial': DailyForecastImperialFromJSON(json['imperial']),
48
47
  'metric': DailyForecastMetricFromJSON(json['metric']),
49
- 'weatherCode': json['weather_code'],
50
48
  'condition': json['condition'],
51
- 'precipitationProbability': json['precipitation_probability'],
49
+ 'conditionCode': WeatherConditionCodeFromJSON(json['condition_code']),
50
+ 'precipitationProbability': json['precipitation_probability'] == null ? undefined : json['precipitation_probability'],
52
51
  'sunrise': json['sunrise'],
53
52
  'sunset': json['sunset'],
54
53
  };
@@ -64,8 +63,8 @@ export function DailyForecastToJSONTyped(value, ignoreDiscriminator = false) {
64
63
  'date': value['date'],
65
64
  'imperial': DailyForecastImperialToJSON(value['imperial']),
66
65
  'metric': DailyForecastMetricToJSON(value['metric']),
67
- 'weather_code': value['weatherCode'],
68
66
  'condition': value['condition'],
67
+ 'condition_code': WeatherConditionCodeToJSON(value['conditionCode']),
69
68
  'precipitation_probability': value['precipitationProbability'],
70
69
  'sunrise': value['sunrise'],
71
70
  'sunset': value['sunset'],
@@ -32,25 +32,25 @@ export interface DailyForecastImperial {
32
32
  * @type {number}
33
33
  * @memberof DailyForecastImperial
34
34
  */
35
- snowfallTotal: number;
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: number;
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: number;
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: number;
53
+ windGustMax?: number | null;
54
54
  }
55
55
  /**
56
56
  * Check if a given object implements the DailyForecastImperial interface.
@@ -19,14 +19,6 @@ export function instanceOfDailyForecastImperial(value) {
19
19
  return false;
20
20
  if (!('temperatureLow' in value) || value['temperatureLow'] === undefined)
21
21
  return false;
22
- if (!('snowfallTotal' in value) || value['snowfallTotal'] === undefined)
23
- return false;
24
- if (!('precipitationTotal' in value) || value['precipitationTotal'] === undefined)
25
- return false;
26
- if (!('windSpeedMax' in value) || value['windSpeedMax'] === undefined)
27
- return false;
28
- if (!('windGustMax' in value) || value['windGustMax'] === undefined)
29
- return false;
30
22
  return true;
31
23
  }
32
24
  export function DailyForecastImperialFromJSON(json) {
@@ -39,10 +31,10 @@ export function DailyForecastImperialFromJSONTyped(json, ignoreDiscriminator) {
39
31
  return {
40
32
  'temperatureHigh': json['temperature_high'],
41
33
  'temperatureLow': json['temperature_low'],
42
- 'snowfallTotal': json['snowfall_total'],
43
- 'precipitationTotal': json['precipitation_total'],
44
- 'windSpeedMax': json['wind_speed_max'],
45
- 'windGustMax': json['wind_gust_max'],
34
+ 'snowfallTotal': json['snowfall_total'] == null ? undefined : json['snowfall_total'],
35
+ 'precipitationTotal': json['precipitation_total'] == null ? undefined : json['precipitation_total'],
36
+ 'windSpeedMax': json['wind_speed_max'] == null ? undefined : json['wind_speed_max'],
37
+ 'windGustMax': json['wind_gust_max'] == null ? undefined : json['wind_gust_max'],
46
38
  };
47
39
  }
48
40
  export function DailyForecastImperialToJSON(json) {
@@ -32,25 +32,25 @@ export interface DailyForecastMetric {
32
32
  * @type {number}
33
33
  * @memberof DailyForecastMetric
34
34
  */
35
- snowfallTotal: number;
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: number;
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: number;
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: number;
53
+ windGustMax?: number | null;
54
54
  }
55
55
  /**
56
56
  * Check if a given object implements the DailyForecastMetric interface.
@@ -19,14 +19,6 @@ export function instanceOfDailyForecastMetric(value) {
19
19
  return false;
20
20
  if (!('temperatureLow' in value) || value['temperatureLow'] === undefined)
21
21
  return false;
22
- if (!('snowfallTotal' in value) || value['snowfallTotal'] === undefined)
23
- return false;
24
- if (!('precipitationTotal' in value) || value['precipitationTotal'] === undefined)
25
- return false;
26
- if (!('windSpeedMax' in value) || value['windSpeedMax'] === undefined)
27
- return false;
28
- if (!('windGustMax' in value) || value['windGustMax'] === undefined)
29
- return false;
30
22
  return true;
31
23
  }
32
24
  export function DailyForecastMetricFromJSON(json) {
@@ -39,10 +31,10 @@ export function DailyForecastMetricFromJSONTyped(json, ignoreDiscriminator) {
39
31
  return {
40
32
  'temperatureHigh': json['temperature_high'],
41
33
  'temperatureLow': json['temperature_low'],
42
- 'snowfallTotal': json['snowfall_total'],
43
- 'precipitationTotal': json['precipitation_total'],
44
- 'windSpeedMax': json['wind_speed_max'],
45
- 'windGustMax': json['wind_gust_max'],
34
+ 'snowfallTotal': json['snowfall_total'] == null ? undefined : json['snowfall_total'],
35
+ 'precipitationTotal': json['precipitation_total'] == null ? undefined : json['precipitation_total'],
36
+ 'windSpeedMax': json['wind_speed_max'] == null ? undefined : json['wind_speed_max'],
37
+ 'windGustMax': json['wind_gust_max'] == null ? undefined : json['wind_gust_max'],
46
38
  };
47
39
  }
48
40
  export 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
- * Probability of precipitation (0-100%)
52
- * @type {number}
46
+ * Apple WeatherKit condition code
47
+ * @type {WeatherConditionCode}
53
48
  * @memberof HourlyForecast
54
49
  */
55
- precipitationProbability: number;
50
+ conditionCode: WeatherConditionCode;
56
51
  /**
57
- * Cloud cover percentage (0-100)
52
+ * Probability of precipitation (0-100%)
58
53
  * @type {number}
59
54
  * @memberof HourlyForecast
60
55
  */
61
- cloudCover: number;
56
+ precipitationProbability?: number | null;
62
57
  }
63
58
  /**
64
59
  * Check if a given object implements the HourlyForecast interface.
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { WeatherConditionCodeFromJSON, WeatherConditionCodeToJSON, } from './WeatherConditionCode';
14
15
  import { HourlyForecastMetricFromJSON, HourlyForecastMetricToJSON, } from './HourlyForecastMetric';
15
16
  import { HourlyForecastImperialFromJSON, HourlyForecastImperialToJSON, } from './HourlyForecastImperial';
16
17
  /**
@@ -23,13 +24,9 @@ export function instanceOfHourlyForecast(value) {
23
24
  return false;
24
25
  if (!('metric' in value) || value['metric'] === undefined)
25
26
  return false;
26
- if (!('weatherCode' in value) || value['weatherCode'] === undefined)
27
- return false;
28
27
  if (!('condition' in value) || value['condition'] === undefined)
29
28
  return false;
30
- if (!('precipitationProbability' in value) || value['precipitationProbability'] === undefined)
31
- return false;
32
- if (!('cloudCover' in value) || value['cloudCover'] === undefined)
29
+ if (!('conditionCode' in value) || value['conditionCode'] === undefined)
33
30
  return false;
34
31
  return true;
35
32
  }
@@ -44,10 +41,9 @@ export function HourlyForecastFromJSONTyped(json, ignoreDiscriminator) {
44
41
  'timestamp': json['timestamp'],
45
42
  'imperial': HourlyForecastImperialFromJSON(json['imperial']),
46
43
  'metric': HourlyForecastMetricFromJSON(json['metric']),
47
- 'weatherCode': json['weather_code'],
48
44
  'condition': json['condition'],
49
- 'precipitationProbability': json['precipitation_probability'],
50
- 'cloudCover': json['cloud_cover'],
45
+ 'conditionCode': WeatherConditionCodeFromJSON(json['condition_code']),
46
+ 'precipitationProbability': json['precipitation_probability'] == null ? undefined : json['precipitation_probability'],
51
47
  };
52
48
  }
53
49
  export function HourlyForecastToJSON(json) {
@@ -61,9 +57,8 @@ export function HourlyForecastToJSONTyped(value, ignoreDiscriminator = false) {
61
57
  'timestamp': value['timestamp'],
62
58
  'imperial': HourlyForecastImperialToJSON(value['imperial']),
63
59
  'metric': HourlyForecastMetricToJSON(value['metric']),
64
- 'weather_code': value['weatherCode'],
65
60
  'condition': value['condition'],
61
+ 'condition_code': WeatherConditionCodeToJSON(value['conditionCode']),
66
62
  'precipitation_probability': value['precipitationProbability'],
67
- 'cloud_cover': value['cloudCover'],
68
63
  };
69
64
  }
@@ -26,19 +26,19 @@ export interface HourlyForecastImperial {
26
26
  * @type {number}
27
27
  * @memberof HourlyForecastImperial
28
28
  */
29
- feelsLike: number;
29
+ feelsLike?: number | null;
30
30
  /**
31
31
  * Snowfall amount expected this hour in inches
32
32
  * @type {number}
33
33
  * @memberof HourlyForecastImperial
34
34
  */
35
- snowfall: number;
35
+ snowfall?: number | null;
36
36
  /**
37
37
  * Precipitation amount expected this hour in inches
38
38
  * @type {number}
39
39
  * @memberof HourlyForecastImperial
40
40
  */
41
- precipitation: number;
41
+ precipitation?: number | null;
42
42
  /**
43
43
  * Wind speed in mph
44
44
  * @type {number}
@@ -50,7 +50,7 @@ export interface HourlyForecastImperial {
50
50
  * @type {number}
51
51
  * @memberof HourlyForecastImperial
52
52
  */
53
- windGust: number;
53
+ windGust?: number | null;
54
54
  }
55
55
  /**
56
56
  * Check if a given object implements the HourlyForecastImperial interface.
@@ -17,16 +17,8 @@
17
17
  export function instanceOfHourlyForecastImperial(value) {
18
18
  if (!('temperature' in value) || value['temperature'] === undefined)
19
19
  return false;
20
- if (!('feelsLike' in value) || value['feelsLike'] === undefined)
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
20
  if (!('windSpeed' in value) || value['windSpeed'] === undefined)
27
21
  return false;
28
- if (!('windGust' in value) || value['windGust'] === undefined)
29
- return false;
30
22
  return true;
31
23
  }
32
24
  export function HourlyForecastImperialFromJSON(json) {
@@ -38,11 +30,11 @@ export function HourlyForecastImperialFromJSONTyped(json, ignoreDiscriminator) {
38
30
  }
39
31
  return {
40
32
  'temperature': json['temperature'],
41
- 'feelsLike': json['feels_like'],
42
- 'snowfall': json['snowfall'],
43
- 'precipitation': json['precipitation'],
33
+ 'feelsLike': json['feels_like'] == null ? undefined : json['feels_like'],
34
+ 'snowfall': json['snowfall'] == null ? undefined : json['snowfall'],
35
+ 'precipitation': json['precipitation'] == null ? undefined : json['precipitation'],
44
36
  'windSpeed': json['wind_speed'],
45
- 'windGust': json['wind_gust'],
37
+ 'windGust': json['wind_gust'] == null ? undefined : json['wind_gust'],
46
38
  };
47
39
  }
48
40
  export function HourlyForecastImperialToJSON(json) {
@@ -26,19 +26,19 @@ export interface HourlyForecastMetric {
26
26
  * @type {number}
27
27
  * @memberof HourlyForecastMetric
28
28
  */
29
- feelsLike: number;
29
+ feelsLike?: number | null;
30
30
  /**
31
31
  * Snowfall amount expected this hour in centimeters
32
32
  * @type {number}
33
33
  * @memberof HourlyForecastMetric
34
34
  */
35
- snowfall: number;
35
+ snowfall?: number | null;
36
36
  /**
37
37
  * Precipitation amount expected this hour in millimeters
38
38
  * @type {number}
39
39
  * @memberof HourlyForecastMetric
40
40
  */
41
- precipitation: number;
41
+ precipitation?: number | null;
42
42
  /**
43
43
  * Wind speed in km/h
44
44
  * @type {number}
@@ -50,7 +50,7 @@ export interface HourlyForecastMetric {
50
50
  * @type {number}
51
51
  * @memberof HourlyForecastMetric
52
52
  */
53
- windGust: number;
53
+ windGust?: number | null;
54
54
  }
55
55
  /**
56
56
  * Check if a given object implements the HourlyForecastMetric interface.
@@ -17,16 +17,8 @@
17
17
  export function instanceOfHourlyForecastMetric(value) {
18
18
  if (!('temperature' in value) || value['temperature'] === undefined)
19
19
  return false;
20
- if (!('feelsLike' in value) || value['feelsLike'] === undefined)
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
20
  if (!('windSpeed' in value) || value['windSpeed'] === undefined)
27
21
  return false;
28
- if (!('windGust' in value) || value['windGust'] === undefined)
29
- return false;
30
22
  return true;
31
23
  }
32
24
  export function HourlyForecastMetricFromJSON(json) {
@@ -38,11 +30,11 @@ export function HourlyForecastMetricFromJSONTyped(json, ignoreDiscriminator) {
38
30
  }
39
31
  return {
40
32
  'temperature': json['temperature'],
41
- 'feelsLike': json['feels_like'],
42
- 'snowfall': json['snowfall'],
43
- 'precipitation': json['precipitation'],
33
+ 'feelsLike': json['feels_like'] == null ? undefined : json['feels_like'],
34
+ 'snowfall': json['snowfall'] == null ? undefined : json['snowfall'],
35
+ 'precipitation': json['precipitation'] == null ? undefined : json['precipitation'],
44
36
  'windSpeed': json['wind_speed'],
45
- 'windGust': json['wind_gust'],
37
+ 'windGust': json['wind_gust'] == null ? undefined : json['wind_gust'],
46
38
  };
47
39
  }
48
40
  export function HourlyForecastMetricToJSON(json) {
@@ -32,13 +32,13 @@ export interface ImperialUnits {
32
32
  * @type {number}
33
33
  * @memberof ImperialUnits
34
34
  */
35
- snowfall: number;
35
+ snowfall?: number | null;
36
36
  /**
37
37
  * Precipitation in inches
38
38
  * @type {number}
39
39
  * @memberof ImperialUnits
40
40
  */
41
- precipitation: number;
41
+ precipitation?: number | null;
42
42
  /**
43
43
  * Wind speed in mph
44
44
  * @type {number}
@@ -50,13 +50,7 @@ export interface ImperialUnits {
50
50
  * @type {number}
51
51
  * @memberof ImperialUnits
52
52
  */
53
- windGust: number;
54
- /**
55
- * Visibility in miles (optional)
56
- * @type {number}
57
- * @memberof ImperialUnits
58
- */
59
- visibility?: number | null;
53
+ windGust?: number | null;
60
54
  }
61
55
  /**
62
56
  * Check if a given object implements the ImperialUnits interface.
@@ -19,14 +19,8 @@ export function instanceOfImperialUnits(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 ImperialUnitsFromJSON(json) {
@@ -39,11 +33,10 @@ export function ImperialUnitsFromJSONTyped(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 ImperialUnitsToJSON(json) {
@@ -60,6 +53,5 @@ export function ImperialUnitsToJSONTyped(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
  }