@mtnmanager/sdk 1.4.3 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  Configuration,
21
21
  MtnManagerApi,
22
22
  } from '@mtnmanager/sdk';
23
- import type { GetFullReportRequest } from '@mtnmanager/sdk';
23
+ import type { GetAmenitiesRequest } from '@mtnmanager/sdk';
24
24
 
25
25
  async function example() {
26
26
  console.log("🚀 Testing @mtnmanager/sdk SDK...");
@@ -30,7 +30,7 @@ async function example() {
30
30
  const api = new MtnManagerApi(config);
31
31
 
32
32
  try {
33
- const data = await api.getFullReport();
33
+ const data = await api.getAmenities();
34
34
  console.log(data);
35
35
  } catch (error) {
36
36
  console.error(error);
@@ -50,6 +50,7 @@ All URIs are relative to *https://your-resort.mtnmanager.com*
50
50
 
51
51
  | Class | Method | HTTP request | Description
52
52
  | ----- | ------ | ------------ | -------------
53
+ *MtnManagerApi* | [**getAmenities**](docs/MtnManagerApi.md#getamenities) | **GET** /api/v1/report/amenities | Get amenities
53
54
  *MtnManagerApi* | [**getFullReport**](docs/MtnManagerApi.md#getfullreport) | **GET** /api/v1/report | Get full report
54
55
  *MtnManagerApi* | [**getHours**](docs/MtnManagerApi.md#gethours) | **GET** /api/v1/report/hours | Get operating hours
55
56
  *MtnManagerApi* | [**getLifts**](docs/MtnManagerApi.md#getlifts) | **GET** /api/v1/report/lifts | Get lifts
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { FullReport, Lift, OperatingHours, Overview, ParkingLot, Run, SnowReport, SummerTrail, TerrainPark, TrailMap, TrailMapSummary, Weather } from '../models/index';
13
+ import type { Amenity, FullReport, Lift, OperatingHours, Overview, ParkingLot, Run, SnowReport, SummerTrail, TerrainPark, TrailMap, TrailMapSummary, Weather } from '../models/index';
14
14
  export interface GetTrailMapRequest {
15
15
  uuid: string;
16
16
  }
@@ -21,6 +21,24 @@ export interface GetTrailMapRequest {
21
21
  * @interface MtnManagerApiInterface
22
22
  */
23
23
  export interface MtnManagerApiInterface {
24
+ /**
25
+ * Creates request options for getAmenities without sending the request
26
+ * @throws {RequiredError}
27
+ * @memberof MtnManagerApiInterface
28
+ */
29
+ getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
30
+ /**
31
+ *
32
+ * @summary Get amenities
33
+ * @param {*} [options] Override http request option.
34
+ * @throws {RequiredError}
35
+ * @memberof MtnManagerApiInterface
36
+ */
37
+ getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
38
+ /**
39
+ * Get amenities
40
+ */
41
+ getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
24
42
  /**
25
43
  * Creates request options for getFullReport without sending the request
26
44
  * @throws {RequiredError}
@@ -244,6 +262,18 @@ export interface MtnManagerApiInterface {
244
262
  *
245
263
  */
246
264
  export declare class MtnManagerApi extends runtime.BaseAPI implements MtnManagerApiInterface {
265
+ /**
266
+ * Creates request options for getAmenities without sending the request
267
+ */
268
+ getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
269
+ /**
270
+ * Get amenities
271
+ */
272
+ getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
273
+ /**
274
+ * Get amenities
275
+ */
276
+ getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
247
277
  /**
248
278
  * Creates request options for getFullReport without sending the request
249
279
  */
@@ -29,6 +29,41 @@ const index_1 = require("../models/index");
29
29
  *
30
30
  */
31
31
  class MtnManagerApi extends runtime.BaseAPI {
32
+ /**
33
+ * Creates request options for getAmenities without sending the request
34
+ */
35
+ getAmenitiesRequestOpts() {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const queryParameters = {};
38
+ const headerParameters = {};
39
+ let urlPath = `/api/v1/report/amenities`;
40
+ return {
41
+ path: urlPath,
42
+ method: 'GET',
43
+ headers: headerParameters,
44
+ query: queryParameters,
45
+ };
46
+ });
47
+ }
48
+ /**
49
+ * Get amenities
50
+ */
51
+ getAmenitiesRaw(initOverrides) {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const requestOptions = yield this.getAmenitiesRequestOpts();
54
+ const response = yield this.request(requestOptions, initOverrides);
55
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(index_1.AmenityFromJSON));
56
+ });
57
+ }
58
+ /**
59
+ * Get amenities
60
+ */
61
+ getAmenities(initOverrides) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ const response = yield this.getAmenitiesRaw(initOverrides);
64
+ return yield response.value();
65
+ });
66
+ }
32
67
  /**
33
68
  * Creates request options for getFullReport without sending the request
34
69
  */
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { FullReport, Lift, OperatingHours, Overview, ParkingLot, Run, SnowReport, SummerTrail, TerrainPark, TrailMap, TrailMapSummary, Weather } from '../models/index';
13
+ import type { Amenity, FullReport, Lift, OperatingHours, Overview, ParkingLot, Run, SnowReport, SummerTrail, TerrainPark, TrailMap, TrailMapSummary, Weather } from '../models/index';
14
14
  export interface GetTrailMapRequest {
15
15
  uuid: string;
16
16
  }
@@ -21,6 +21,24 @@ export interface GetTrailMapRequest {
21
21
  * @interface MtnManagerApiInterface
22
22
  */
23
23
  export interface MtnManagerApiInterface {
24
+ /**
25
+ * Creates request options for getAmenities without sending the request
26
+ * @throws {RequiredError}
27
+ * @memberof MtnManagerApiInterface
28
+ */
29
+ getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
30
+ /**
31
+ *
32
+ * @summary Get amenities
33
+ * @param {*} [options] Override http request option.
34
+ * @throws {RequiredError}
35
+ * @memberof MtnManagerApiInterface
36
+ */
37
+ getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
38
+ /**
39
+ * Get amenities
40
+ */
41
+ getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
24
42
  /**
25
43
  * Creates request options for getFullReport without sending the request
26
44
  * @throws {RequiredError}
@@ -244,6 +262,18 @@ export interface MtnManagerApiInterface {
244
262
  *
245
263
  */
246
264
  export declare class MtnManagerApi extends runtime.BaseAPI implements MtnManagerApiInterface {
265
+ /**
266
+ * Creates request options for getAmenities without sending the request
267
+ */
268
+ getAmenitiesRequestOpts(): Promise<runtime.RequestOpts>;
269
+ /**
270
+ * Get amenities
271
+ */
272
+ getAmenitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Amenity>>>;
273
+ /**
274
+ * Get amenities
275
+ */
276
+ getAmenities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Amenity>>;
247
277
  /**
248
278
  * Creates request options for getFullReport without sending the request
249
279
  */
@@ -21,11 +21,46 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  import * as runtime from '../runtime';
24
- import { FullReportFromJSON, LiftFromJSON, OperatingHoursFromJSON, OverviewFromJSON, ParkingLotFromJSON, RunFromJSON, SnowReportFromJSON, SummerTrailFromJSON, TerrainParkFromJSON, TrailMapFromJSON, TrailMapSummaryFromJSON, WeatherFromJSON, } from '../models/index';
24
+ import { AmenityFromJSON, FullReportFromJSON, LiftFromJSON, OperatingHoursFromJSON, OverviewFromJSON, ParkingLotFromJSON, RunFromJSON, SnowReportFromJSON, SummerTrailFromJSON, TerrainParkFromJSON, TrailMapFromJSON, TrailMapSummaryFromJSON, WeatherFromJSON, } from '../models/index';
25
25
  /**
26
26
  *
27
27
  */
28
28
  export class MtnManagerApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for getAmenities without sending the request
31
+ */
32
+ getAmenitiesRequestOpts() {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ let urlPath = `/api/v1/report/amenities`;
37
+ return {
38
+ path: urlPath,
39
+ method: 'GET',
40
+ headers: headerParameters,
41
+ query: queryParameters,
42
+ };
43
+ });
44
+ }
45
+ /**
46
+ * Get amenities
47
+ */
48
+ getAmenitiesRaw(initOverrides) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ const requestOptions = yield this.getAmenitiesRequestOpts();
51
+ const response = yield this.request(requestOptions, initOverrides);
52
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AmenityFromJSON));
53
+ });
54
+ }
55
+ /**
56
+ * Get amenities
57
+ */
58
+ getAmenities(initOverrides) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ const response = yield this.getAmenitiesRaw(initOverrides);
61
+ return yield response.value();
62
+ });
63
+ }
29
64
  /**
30
65
  * Creates request options for getFullReport without sending the request
31
66
  */
@@ -10,38 +10,40 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { AmenityCategory } from './AmenityCategory';
13
+ import type { Schedule } from './Schedule';
13
14
  /**
14
- * Minimal amenity info for trail map markers.
15
+ * Represents an amenity at the resort (e.g. lodge, restaurant, ski school)
16
+ * with its category, description, website, and hours.
15
17
  * @export
16
18
  * @interface Amenity
17
19
  */
18
20
  export interface Amenity {
19
21
  /**
20
- *
22
+ * Description of the amenity.
21
23
  * @type {string}
22
24
  * @memberof Amenity
23
25
  */
24
26
  description: string;
25
27
  /**
26
- *
28
+ * Unique identifier for the amenity.
27
29
  * @type {string}
28
30
  * @memberof Amenity
29
31
  */
30
32
  uuid: string;
31
33
  /**
32
- *
34
+ * Display name of the amenity.
33
35
  * @type {string}
34
36
  * @memberof Amenity
35
37
  */
36
38
  name: string;
37
39
  /**
38
- *
40
+ * Category classification (e.g. restaurant, lodge, ski_school).
39
41
  * @type {AmenityCategory}
40
42
  * @memberof Amenity
41
43
  */
42
44
  category: AmenityCategory;
43
45
  /**
44
- *
46
+ * Website URL for the amenity, if available.
45
47
  * @type {string}
46
48
  * @memberof Amenity
47
49
  */
@@ -58,6 +60,13 @@ export interface Amenity {
58
60
  * @memberof Amenity
59
61
  */
60
62
  closesAt?: string | null;
63
+ /**
64
+ * Recurring operating schedules for this amenity (e.g. "Saturday & Sunday,
65
+ * 9:00 a.m. to 4:00 p.m."), with both human-readable and structured fields.
66
+ * @type {Array<Schedule>}
67
+ * @memberof Amenity
68
+ */
69
+ schedules: Array<Schedule>;
61
70
  }
62
71
  /**
63
72
  * Check if a given object implements the Amenity interface.
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { AmenityCategoryFromJSON, AmenityCategoryToJSON, } from './AmenityCategory';
15
+ import { ScheduleFromJSON, ScheduleToJSON, } from './Schedule';
15
16
  /**
16
17
  * Check if a given object implements the Amenity interface.
17
18
  */
@@ -26,6 +27,8 @@ export function instanceOfAmenity(value) {
26
27
  return false;
27
28
  if (!('website' in value) || value['website'] === undefined)
28
29
  return false;
30
+ if (!('schedules' in value) || value['schedules'] === undefined)
31
+ return false;
29
32
  return true;
30
33
  }
31
34
  export function AmenityFromJSON(json) {
@@ -43,6 +46,7 @@ export function AmenityFromJSONTyped(json, ignoreDiscriminator) {
43
46
  'website': json['website'],
44
47
  'opensAt': json['opens_at'] == null ? undefined : json['opens_at'],
45
48
  'closesAt': json['closes_at'] == null ? undefined : json['closes_at'],
49
+ 'schedules': (json['schedules'].map(ScheduleFromJSON)),
46
50
  };
47
51
  }
48
52
  export function AmenityToJSON(json) {
@@ -60,5 +64,6 @@ export function AmenityToJSONTyped(value, ignoreDiscriminator = false) {
60
64
  'website': value['website'],
61
65
  'opens_at': value['opensAt'],
62
66
  'closes_at': value['closesAt'],
67
+ 'schedules': (value['schedules'].map(ScheduleToJSON)),
63
68
  };
64
69
  }
@@ -49,6 +49,13 @@ export interface TrailMap {
49
49
  * @memberof TrailMap
50
50
  */
51
51
  displayOrder: number;
52
+ /**
53
+ * Monotonically incremented on every update. Clients can compare this
54
+ * against a cached value to decide whether to reload the trail map.
55
+ * @type {number}
56
+ * @memberof TrailMap
57
+ */
58
+ version: number;
52
59
  /**
53
60
  *
54
61
  * @type {string}
@@ -29,6 +29,8 @@ export function instanceOfTrailMap(value) {
29
29
  return false;
30
30
  if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
31
31
  return false;
32
+ if (!('version' in value) || value['version'] === undefined)
33
+ return false;
32
34
  if ((!('backgroundImageUrl' in value) && !('background_image_url' in value)) || (value['backgroundImageUrl'] === undefined && value['background_image_url'] === undefined))
33
35
  return false;
34
36
  if (!('resort' in value) || value['resort'] === undefined)
@@ -50,6 +52,7 @@ export function TrailMapFromJSONTyped(json, ignoreDiscriminator) {
50
52
  'slug': json['slug'],
51
53
  'season': SeasonTypeFromJSON(json['season']),
52
54
  'displayOrder': json['display_order'],
55
+ 'version': json['version'],
53
56
  'backgroundImageUrl': json['background_image_url'],
54
57
  'resort': ResortInfoFromJSON(json['resort']),
55
58
  'elements': (json['elements'].map(TrailMapElementFromJSON)),
@@ -69,6 +72,7 @@ export function TrailMapToJSONTyped(value, ignoreDiscriminator = false) {
69
72
  'slug': value['slug'],
70
73
  'season': SeasonTypeToJSON(value['season']),
71
74
  'display_order': value['displayOrder'],
75
+ 'version': value['version'],
72
76
  'background_image_url': value['backgroundImageUrl'],
73
77
  'resort': ResortInfoToJSON(value['resort']),
74
78
  'elements': (value['elements'].map(TrailMapElementToJSON)),
@@ -41,6 +41,13 @@ export interface TrailMapSummary {
41
41
  * @memberof TrailMapSummary
42
42
  */
43
43
  displayOrder: number;
44
+ /**
45
+ * Monotonically incremented on every update. Clients can compare this
46
+ * against a cached value to decide whether to reload the trail map.
47
+ * @type {number}
48
+ * @memberof TrailMapSummary
49
+ */
50
+ version: number;
44
51
  /**
45
52
  *
46
53
  * @type {string}
@@ -25,6 +25,8 @@ export function instanceOfTrailMapSummary(value) {
25
25
  return false;
26
26
  if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
27
27
  return false;
28
+ if (!('version' in value) || value['version'] === undefined)
29
+ return false;
28
30
  if ((!('hostedUrl' in value) && !('hosted_url' in value)) || (value['hostedUrl'] === undefined && value['hosted_url'] === undefined))
29
31
  return false;
30
32
  if ((!('entityUuids' in value) && !('entity_uuids' in value)) || (value['entityUuids'] === undefined && value['entity_uuids'] === undefined))
@@ -43,6 +45,7 @@ export function TrailMapSummaryFromJSONTyped(json, ignoreDiscriminator) {
43
45
  'name': json['name'],
44
46
  'season': SeasonTypeFromJSON(json['season']),
45
47
  'displayOrder': json['display_order'],
48
+ 'version': json['version'],
46
49
  'hostedUrl': json['hosted_url'],
47
50
  'geoBounds': json['geo_bounds'] == null ? undefined : GeoBoundsFromJSON(json['geo_bounds']),
48
51
  'entityUuids': json['entity_uuids'],
@@ -60,6 +63,7 @@ export function TrailMapSummaryToJSONTyped(value, ignoreDiscriminator = false) {
60
63
  'name': value['name'],
61
64
  'season': SeasonTypeToJSON(value['season']),
62
65
  'display_order': value['displayOrder'],
66
+ 'version': value['version'],
63
67
  'hosted_url': value['hostedUrl'],
64
68
  'geo_bounds': GeoBoundsToJSON(value['geoBounds']),
65
69
  'entity_uuids': value['entityUuids'],
@@ -10,38 +10,40 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { AmenityCategory } from './AmenityCategory';
13
+ import type { Schedule } from './Schedule';
13
14
  /**
14
- * Minimal amenity info for trail map markers.
15
+ * Represents an amenity at the resort (e.g. lodge, restaurant, ski school)
16
+ * with its category, description, website, and hours.
15
17
  * @export
16
18
  * @interface Amenity
17
19
  */
18
20
  export interface Amenity {
19
21
  /**
20
- *
22
+ * Description of the amenity.
21
23
  * @type {string}
22
24
  * @memberof Amenity
23
25
  */
24
26
  description: string;
25
27
  /**
26
- *
28
+ * Unique identifier for the amenity.
27
29
  * @type {string}
28
30
  * @memberof Amenity
29
31
  */
30
32
  uuid: string;
31
33
  /**
32
- *
34
+ * Display name of the amenity.
33
35
  * @type {string}
34
36
  * @memberof Amenity
35
37
  */
36
38
  name: string;
37
39
  /**
38
- *
40
+ * Category classification (e.g. restaurant, lodge, ski_school).
39
41
  * @type {AmenityCategory}
40
42
  * @memberof Amenity
41
43
  */
42
44
  category: AmenityCategory;
43
45
  /**
44
- *
46
+ * Website URL for the amenity, if available.
45
47
  * @type {string}
46
48
  * @memberof Amenity
47
49
  */
@@ -58,6 +60,13 @@ export interface Amenity {
58
60
  * @memberof Amenity
59
61
  */
60
62
  closesAt?: string | null;
63
+ /**
64
+ * Recurring operating schedules for this amenity (e.g. "Saturday & Sunday,
65
+ * 9:00 a.m. to 4:00 p.m."), with both human-readable and structured fields.
66
+ * @type {Array<Schedule>}
67
+ * @memberof Amenity
68
+ */
69
+ schedules: Array<Schedule>;
61
70
  }
62
71
  /**
63
72
  * Check if a given object implements the Amenity interface.
@@ -19,6 +19,7 @@ exports.AmenityFromJSONTyped = AmenityFromJSONTyped;
19
19
  exports.AmenityToJSON = AmenityToJSON;
20
20
  exports.AmenityToJSONTyped = AmenityToJSONTyped;
21
21
  const AmenityCategory_1 = require("./AmenityCategory");
22
+ const Schedule_1 = require("./Schedule");
22
23
  /**
23
24
  * Check if a given object implements the Amenity interface.
24
25
  */
@@ -33,6 +34,8 @@ function instanceOfAmenity(value) {
33
34
  return false;
34
35
  if (!('website' in value) || value['website'] === undefined)
35
36
  return false;
37
+ if (!('schedules' in value) || value['schedules'] === undefined)
38
+ return false;
36
39
  return true;
37
40
  }
38
41
  function AmenityFromJSON(json) {
@@ -50,6 +53,7 @@ function AmenityFromJSONTyped(json, ignoreDiscriminator) {
50
53
  'website': json['website'],
51
54
  'opensAt': json['opens_at'] == null ? undefined : json['opens_at'],
52
55
  'closesAt': json['closes_at'] == null ? undefined : json['closes_at'],
56
+ 'schedules': (json['schedules'].map(Schedule_1.ScheduleFromJSON)),
53
57
  };
54
58
  }
55
59
  function AmenityToJSON(json) {
@@ -67,5 +71,6 @@ function AmenityToJSONTyped(value, ignoreDiscriminator = false) {
67
71
  'website': value['website'],
68
72
  'opens_at': value['opensAt'],
69
73
  'closes_at': value['closesAt'],
74
+ 'schedules': (value['schedules'].map(Schedule_1.ScheduleToJSON)),
70
75
  };
71
76
  }
@@ -49,6 +49,13 @@ export interface TrailMap {
49
49
  * @memberof TrailMap
50
50
  */
51
51
  displayOrder: number;
52
+ /**
53
+ * Monotonically incremented on every update. Clients can compare this
54
+ * against a cached value to decide whether to reload the trail map.
55
+ * @type {number}
56
+ * @memberof TrailMap
57
+ */
58
+ version: number;
52
59
  /**
53
60
  *
54
61
  * @type {string}
@@ -36,6 +36,8 @@ function instanceOfTrailMap(value) {
36
36
  return false;
37
37
  if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
38
38
  return false;
39
+ if (!('version' in value) || value['version'] === undefined)
40
+ return false;
39
41
  if ((!('backgroundImageUrl' in value) && !('background_image_url' in value)) || (value['backgroundImageUrl'] === undefined && value['background_image_url'] === undefined))
40
42
  return false;
41
43
  if (!('resort' in value) || value['resort'] === undefined)
@@ -57,6 +59,7 @@ function TrailMapFromJSONTyped(json, ignoreDiscriminator) {
57
59
  'slug': json['slug'],
58
60
  'season': (0, SeasonType_1.SeasonTypeFromJSON)(json['season']),
59
61
  'displayOrder': json['display_order'],
62
+ 'version': json['version'],
60
63
  'backgroundImageUrl': json['background_image_url'],
61
64
  'resort': (0, ResortInfo_1.ResortInfoFromJSON)(json['resort']),
62
65
  'elements': (json['elements'].map(TrailMapElement_1.TrailMapElementFromJSON)),
@@ -76,6 +79,7 @@ function TrailMapToJSONTyped(value, ignoreDiscriminator = false) {
76
79
  'slug': value['slug'],
77
80
  'season': (0, SeasonType_1.SeasonTypeToJSON)(value['season']),
78
81
  'display_order': value['displayOrder'],
82
+ 'version': value['version'],
79
83
  'background_image_url': value['backgroundImageUrl'],
80
84
  'resort': (0, ResortInfo_1.ResortInfoToJSON)(value['resort']),
81
85
  'elements': (value['elements'].map(TrailMapElement_1.TrailMapElementToJSON)),
@@ -41,6 +41,13 @@ export interface TrailMapSummary {
41
41
  * @memberof TrailMapSummary
42
42
  */
43
43
  displayOrder: number;
44
+ /**
45
+ * Monotonically incremented on every update. Clients can compare this
46
+ * against a cached value to decide whether to reload the trail map.
47
+ * @type {number}
48
+ * @memberof TrailMapSummary
49
+ */
50
+ version: number;
44
51
  /**
45
52
  *
46
53
  * @type {string}
@@ -32,6 +32,8 @@ function instanceOfTrailMapSummary(value) {
32
32
  return false;
33
33
  if ((!('displayOrder' in value) && !('display_order' in value)) || (value['displayOrder'] === undefined && value['display_order'] === undefined))
34
34
  return false;
35
+ if (!('version' in value) || value['version'] === undefined)
36
+ return false;
35
37
  if ((!('hostedUrl' in value) && !('hosted_url' in value)) || (value['hostedUrl'] === undefined && value['hosted_url'] === undefined))
36
38
  return false;
37
39
  if ((!('entityUuids' in value) && !('entity_uuids' in value)) || (value['entityUuids'] === undefined && value['entity_uuids'] === undefined))
@@ -50,6 +52,7 @@ function TrailMapSummaryFromJSONTyped(json, ignoreDiscriminator) {
50
52
  'name': json['name'],
51
53
  'season': (0, SeasonType_1.SeasonTypeFromJSON)(json['season']),
52
54
  'displayOrder': json['display_order'],
55
+ 'version': json['version'],
53
56
  'hostedUrl': json['hosted_url'],
54
57
  'geoBounds': json['geo_bounds'] == null ? undefined : (0, GeoBounds_1.GeoBoundsFromJSON)(json['geo_bounds']),
55
58
  'entityUuids': json['entity_uuids'],
@@ -67,6 +70,7 @@ function TrailMapSummaryToJSONTyped(value, ignoreDiscriminator = false) {
67
70
  'name': value['name'],
68
71
  'season': (0, SeasonType_1.SeasonTypeToJSON)(value['season']),
69
72
  'display_order': value['displayOrder'],
73
+ 'version': value['version'],
70
74
  'hosted_url': value['hostedUrl'],
71
75
  'geo_bounds': (0, GeoBounds_1.GeoBoundsToJSON)(value['geoBounds']),
72
76
  'entity_uuids': value['entityUuids'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtnmanager/sdk",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "SDK for interacting with the MtnManager API, providing real-time access to your ski resort's public operational data.",
5
5
  "author": "OpenAPI-Generator",
6
6
  "main": "./dist/index.js",