@mtnmanager/sdk 0.0.1
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 +134 -0
- package/dist/apis/PublicApi.d.ts +174 -0
- package/dist/apis/PublicApi.js +218 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +19 -0
- package/dist/esm/apis/PublicApi.d.ts +174 -0
- package/dist/esm/apis/PublicApi.js +214 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +3 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/HoursInfo.d.ts +50 -0
- package/dist/esm/models/HoursInfo.js +51 -0
- package/dist/esm/models/LiftStatus.d.ts +25 -0
- package/dist/esm/models/LiftStatus.js +43 -0
- package/dist/esm/models/LiftType.d.ts +36 -0
- package/dist/esm/models/LiftType.js +54 -0
- package/dist/esm/models/OperatingHoursResponse.d.ts +46 -0
- package/dist/esm/models/OperatingHoursResponse.js +53 -0
- package/dist/esm/models/PublicLift.d.ts +88 -0
- package/dist/esm/models/PublicLift.js +73 -0
- package/dist/esm/models/PublicResortInfo.d.ts +57 -0
- package/dist/esm/models/PublicResortInfo.js +60 -0
- package/dist/esm/models/PublicResortResponse.d.ts +68 -0
- package/dist/esm/models/PublicResortResponse.js +59 -0
- package/dist/esm/models/PublicResortStatus.d.ts +45 -0
- package/dist/esm/models/PublicResortStatus.js +48 -0
- package/dist/esm/models/PublicRun.d.ts +88 -0
- package/dist/esm/models/PublicRun.js +73 -0
- package/dist/esm/models/PublicSnowReport.d.ts +82 -0
- package/dist/esm/models/PublicSnowReport.js +67 -0
- package/dist/esm/models/PublicSnowResponse.d.ts +33 -0
- package/dist/esm/models/PublicSnowResponse.js +44 -0
- package/dist/esm/models/RegularHoursDescription.d.ts +50 -0
- package/dist/esm/models/RegularHoursDescription.js +55 -0
- package/dist/esm/models/ResortStatusType.d.ts +26 -0
- package/dist/esm/models/ResortStatusType.js +44 -0
- package/dist/esm/models/RunDifficulty.d.ts +28 -0
- package/dist/esm/models/RunDifficulty.js +46 -0
- package/dist/esm/models/RunStatus.d.ts +25 -0
- package/dist/esm/models/RunStatus.js +43 -0
- package/dist/esm/models/SnowMetrics.d.ts +56 -0
- package/dist/esm/models/SnowMetrics.js +59 -0
- package/dist/esm/models/SurfaceCondition.d.ts +29 -0
- package/dist/esm/models/SurfaceCondition.js +47 -0
- package/dist/esm/models/UnitPreference.d.ts +25 -0
- package/dist/esm/models/UnitPreference.js +43 -0
- package/dist/esm/models/index.d.ts +18 -0
- package/dist/esm/models/index.js +20 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +334 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/HoursInfo.d.ts +50 -0
- package/dist/models/HoursInfo.js +58 -0
- package/dist/models/LiftStatus.d.ts +25 -0
- package/dist/models/LiftStatus.js +51 -0
- package/dist/models/LiftType.d.ts +36 -0
- package/dist/models/LiftType.js +62 -0
- package/dist/models/OperatingHoursResponse.d.ts +46 -0
- package/dist/models/OperatingHoursResponse.js +60 -0
- package/dist/models/PublicLift.d.ts +88 -0
- package/dist/models/PublicLift.js +80 -0
- package/dist/models/PublicResortInfo.d.ts +57 -0
- package/dist/models/PublicResortInfo.js +67 -0
- package/dist/models/PublicResortResponse.d.ts +68 -0
- package/dist/models/PublicResortResponse.js +66 -0
- package/dist/models/PublicResortStatus.d.ts +45 -0
- package/dist/models/PublicResortStatus.js +55 -0
- package/dist/models/PublicRun.d.ts +88 -0
- package/dist/models/PublicRun.js +80 -0
- package/dist/models/PublicSnowReport.d.ts +82 -0
- package/dist/models/PublicSnowReport.js +74 -0
- package/dist/models/PublicSnowResponse.d.ts +33 -0
- package/dist/models/PublicSnowResponse.js +51 -0
- package/dist/models/RegularHoursDescription.d.ts +50 -0
- package/dist/models/RegularHoursDescription.js +62 -0
- package/dist/models/ResortStatusType.d.ts +26 -0
- package/dist/models/ResortStatusType.js +52 -0
- package/dist/models/RunDifficulty.d.ts +28 -0
- package/dist/models/RunDifficulty.js +54 -0
- package/dist/models/RunStatus.d.ts +25 -0
- package/dist/models/RunStatus.js +51 -0
- package/dist/models/SnowMetrics.d.ts +56 -0
- package/dist/models/SnowMetrics.js +66 -0
- package/dist/models/SurfaceCondition.d.ts +29 -0
- package/dist/models/SurfaceCondition.js +55 -0
- package/dist/models/UnitPreference.d.ts +25 -0
- package/dist/models/UnitPreference.js +51 -0
- package/dist/models/index.d.ts +18 -0
- package/dist/models/index.js +36 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +350 -0
- package/package.json +25 -0
|
@@ -0,0 +1,174 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { PublicLift, PublicResortResponse, PublicResortStatus, PublicRun, PublicSnowResponse } from '../models/index';
|
|
14
|
+
export interface GetHoursPublicRequest {
|
|
15
|
+
slug: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetLiftsPublicRequest {
|
|
18
|
+
slug: string;
|
|
19
|
+
status?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface GetResortPublicRequest {
|
|
22
|
+
slug: string;
|
|
23
|
+
}
|
|
24
|
+
export interface GetRunsPublicRequest {
|
|
25
|
+
slug: string;
|
|
26
|
+
status?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface GetSnowPublicRequest {
|
|
29
|
+
slug: string;
|
|
30
|
+
}
|
|
31
|
+
export interface GetStatusPublicRequest {
|
|
32
|
+
slug: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* PublicApi - interface
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @interface PublicApiInterface
|
|
39
|
+
*/
|
|
40
|
+
export interface PublicApiInterface {
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @summary GET /report/v1/:slug/hours Get operating hours (calculated for today + 3 months)
|
|
44
|
+
* @param {string} slug Resort slug
|
|
45
|
+
* @param {*} [options] Override http request option.
|
|
46
|
+
* @throws {RequiredError}
|
|
47
|
+
* @memberof PublicApiInterface
|
|
48
|
+
*/
|
|
49
|
+
getHoursPublicRaw(requestParameters: GetHoursPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
50
|
+
/**
|
|
51
|
+
* GET /report/v1/:slug/hours Get operating hours (calculated for today + 3 months)
|
|
52
|
+
*/
|
|
53
|
+
getHoursPublic(requestParameters: GetHoursPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @summary GET /report/v1/:slug/lifts Get all lifts with optional status filter
|
|
57
|
+
* @param {string} slug Resort slug
|
|
58
|
+
* @param {string} [status] Filter by status
|
|
59
|
+
* @param {*} [options] Override http request option.
|
|
60
|
+
* @throws {RequiredError}
|
|
61
|
+
* @memberof PublicApiInterface
|
|
62
|
+
*/
|
|
63
|
+
getLiftsPublicRaw(requestParameters: GetLiftsPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PublicLift>>>;
|
|
64
|
+
/**
|
|
65
|
+
* GET /report/v1/:slug/lifts Get all lifts with optional status filter
|
|
66
|
+
*/
|
|
67
|
+
getLiftsPublic(requestParameters: GetLiftsPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublicLift>>;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @summary GET /report/v1/:slug Get complete resort information for public display
|
|
71
|
+
* @param {string} slug Resort slug
|
|
72
|
+
* @param {*} [options] Override http request option.
|
|
73
|
+
* @throws {RequiredError}
|
|
74
|
+
* @memberof PublicApiInterface
|
|
75
|
+
*/
|
|
76
|
+
getResortPublicRaw(requestParameters: GetResortPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicResortResponse>>;
|
|
77
|
+
/**
|
|
78
|
+
* GET /report/v1/:slug Get complete resort information for public display
|
|
79
|
+
*/
|
|
80
|
+
getResortPublic(requestParameters: GetResortPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicResortResponse>;
|
|
81
|
+
/**
|
|
82
|
+
*
|
|
83
|
+
* @summary GET /report/v1/:slug/runs Get all runs with optional status filter
|
|
84
|
+
* @param {string} slug Resort slug
|
|
85
|
+
* @param {string} [status] Filter by status
|
|
86
|
+
* @param {*} [options] Override http request option.
|
|
87
|
+
* @throws {RequiredError}
|
|
88
|
+
* @memberof PublicApiInterface
|
|
89
|
+
*/
|
|
90
|
+
getRunsPublicRaw(requestParameters: GetRunsPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PublicRun>>>;
|
|
91
|
+
/**
|
|
92
|
+
* GET /report/v1/:slug/runs Get all runs with optional status filter
|
|
93
|
+
*/
|
|
94
|
+
getRunsPublic(requestParameters: GetRunsPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublicRun>>;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @summary GET /report/v1/:slug/snow Get current snow conditions and reports with metrics
|
|
98
|
+
* @param {string} slug Resort slug
|
|
99
|
+
* @param {*} [options] Override http request option.
|
|
100
|
+
* @throws {RequiredError}
|
|
101
|
+
* @memberof PublicApiInterface
|
|
102
|
+
*/
|
|
103
|
+
getSnowPublicRaw(requestParameters: GetSnowPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicSnowResponse>>;
|
|
104
|
+
/**
|
|
105
|
+
* GET /report/v1/:slug/snow Get current snow conditions and reports with metrics
|
|
106
|
+
*/
|
|
107
|
+
getSnowPublic(requestParameters: GetSnowPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicSnowResponse>;
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @summary GET /report/v1/:slug/status Get just the resort status
|
|
111
|
+
* @param {string} slug Resort slug
|
|
112
|
+
* @param {*} [options] Override http request option.
|
|
113
|
+
* @throws {RequiredError}
|
|
114
|
+
* @memberof PublicApiInterface
|
|
115
|
+
*/
|
|
116
|
+
getStatusPublicRaw(requestParameters: GetStatusPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicResortStatus>>;
|
|
117
|
+
/**
|
|
118
|
+
* GET /report/v1/:slug/status Get just the resort status
|
|
119
|
+
*/
|
|
120
|
+
getStatusPublic(requestParameters: GetStatusPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicResortStatus>;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
*
|
|
124
|
+
*/
|
|
125
|
+
export declare class PublicApi extends runtime.BaseAPI implements PublicApiInterface {
|
|
126
|
+
/**
|
|
127
|
+
* GET /report/v1/:slug/hours Get operating hours (calculated for today + 3 months)
|
|
128
|
+
*/
|
|
129
|
+
getHoursPublicRaw(requestParameters: GetHoursPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
130
|
+
/**
|
|
131
|
+
* GET /report/v1/:slug/hours Get operating hours (calculated for today + 3 months)
|
|
132
|
+
*/
|
|
133
|
+
getHoursPublic(requestParameters: GetHoursPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* GET /report/v1/:slug/lifts Get all lifts with optional status filter
|
|
136
|
+
*/
|
|
137
|
+
getLiftsPublicRaw(requestParameters: GetLiftsPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PublicLift>>>;
|
|
138
|
+
/**
|
|
139
|
+
* GET /report/v1/:slug/lifts Get all lifts with optional status filter
|
|
140
|
+
*/
|
|
141
|
+
getLiftsPublic(requestParameters: GetLiftsPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublicLift>>;
|
|
142
|
+
/**
|
|
143
|
+
* GET /report/v1/:slug Get complete resort information for public display
|
|
144
|
+
*/
|
|
145
|
+
getResortPublicRaw(requestParameters: GetResortPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicResortResponse>>;
|
|
146
|
+
/**
|
|
147
|
+
* GET /report/v1/:slug Get complete resort information for public display
|
|
148
|
+
*/
|
|
149
|
+
getResortPublic(requestParameters: GetResortPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicResortResponse>;
|
|
150
|
+
/**
|
|
151
|
+
* GET /report/v1/:slug/runs Get all runs with optional status filter
|
|
152
|
+
*/
|
|
153
|
+
getRunsPublicRaw(requestParameters: GetRunsPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<PublicRun>>>;
|
|
154
|
+
/**
|
|
155
|
+
* GET /report/v1/:slug/runs Get all runs with optional status filter
|
|
156
|
+
*/
|
|
157
|
+
getRunsPublic(requestParameters: GetRunsPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<PublicRun>>;
|
|
158
|
+
/**
|
|
159
|
+
* GET /report/v1/:slug/snow Get current snow conditions and reports with metrics
|
|
160
|
+
*/
|
|
161
|
+
getSnowPublicRaw(requestParameters: GetSnowPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicSnowResponse>>;
|
|
162
|
+
/**
|
|
163
|
+
* GET /report/v1/:slug/snow Get current snow conditions and reports with metrics
|
|
164
|
+
*/
|
|
165
|
+
getSnowPublic(requestParameters: GetSnowPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicSnowResponse>;
|
|
166
|
+
/**
|
|
167
|
+
* GET /report/v1/:slug/status Get just the resort status
|
|
168
|
+
*/
|
|
169
|
+
getStatusPublicRaw(requestParameters: GetStatusPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicResortStatus>>;
|
|
170
|
+
/**
|
|
171
|
+
* GET /report/v1/:slug/status Get just the resort status
|
|
172
|
+
*/
|
|
173
|
+
getStatusPublic(requestParameters: GetStatusPublicRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PublicResortStatus>;
|
|
174
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
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: 0.1.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
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { PublicLiftFromJSON, PublicResortResponseFromJSON, PublicResortStatusFromJSON, PublicRunFromJSON, PublicSnowResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class PublicApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* GET /report/v1/:slug/hours Get operating hours (calculated for today + 3 months)
|
|
31
|
+
*/
|
|
32
|
+
getHoursPublicRaw(requestParameters, initOverrides) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (requestParameters['slug'] == null) {
|
|
35
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getHoursPublic().');
|
|
36
|
+
}
|
|
37
|
+
const queryParameters = {};
|
|
38
|
+
const headerParameters = {};
|
|
39
|
+
let urlPath = `/report/v1/{slug}/hours`;
|
|
40
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
41
|
+
const response = yield this.request({
|
|
42
|
+
path: urlPath,
|
|
43
|
+
method: 'GET',
|
|
44
|
+
headers: headerParameters,
|
|
45
|
+
query: queryParameters,
|
|
46
|
+
}, initOverrides);
|
|
47
|
+
return new runtime.VoidApiResponse(response);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* GET /report/v1/:slug/hours Get operating hours (calculated for today + 3 months)
|
|
52
|
+
*/
|
|
53
|
+
getHoursPublic(requestParameters, initOverrides) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
yield this.getHoursPublicRaw(requestParameters, initOverrides);
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* GET /report/v1/:slug/lifts Get all lifts with optional status filter
|
|
60
|
+
*/
|
|
61
|
+
getLiftsPublicRaw(requestParameters, initOverrides) {
|
|
62
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
+
if (requestParameters['slug'] == null) {
|
|
64
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getLiftsPublic().');
|
|
65
|
+
}
|
|
66
|
+
const queryParameters = {};
|
|
67
|
+
if (requestParameters['status'] != null) {
|
|
68
|
+
queryParameters['status'] = requestParameters['status'];
|
|
69
|
+
}
|
|
70
|
+
const headerParameters = {};
|
|
71
|
+
let urlPath = `/report/v1/{slug}/lifts`;
|
|
72
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
73
|
+
const response = yield this.request({
|
|
74
|
+
path: urlPath,
|
|
75
|
+
method: 'GET',
|
|
76
|
+
headers: headerParameters,
|
|
77
|
+
query: queryParameters,
|
|
78
|
+
}, initOverrides);
|
|
79
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PublicLiftFromJSON));
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* GET /report/v1/:slug/lifts Get all lifts with optional status filter
|
|
84
|
+
*/
|
|
85
|
+
getLiftsPublic(requestParameters, initOverrides) {
|
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
const response = yield this.getLiftsPublicRaw(requestParameters, initOverrides);
|
|
88
|
+
return yield response.value();
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* GET /report/v1/:slug Get complete resort information for public display
|
|
93
|
+
*/
|
|
94
|
+
getResortPublicRaw(requestParameters, initOverrides) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
if (requestParameters['slug'] == null) {
|
|
97
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getResortPublic().');
|
|
98
|
+
}
|
|
99
|
+
const queryParameters = {};
|
|
100
|
+
const headerParameters = {};
|
|
101
|
+
let urlPath = `/report/v1/{slug}`;
|
|
102
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
103
|
+
const response = yield this.request({
|
|
104
|
+
path: urlPath,
|
|
105
|
+
method: 'GET',
|
|
106
|
+
headers: headerParameters,
|
|
107
|
+
query: queryParameters,
|
|
108
|
+
}, initOverrides);
|
|
109
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PublicResortResponseFromJSON(jsonValue));
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* GET /report/v1/:slug Get complete resort information for public display
|
|
114
|
+
*/
|
|
115
|
+
getResortPublic(requestParameters, initOverrides) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const response = yield this.getResortPublicRaw(requestParameters, initOverrides);
|
|
118
|
+
return yield response.value();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* GET /report/v1/:slug/runs Get all runs with optional status filter
|
|
123
|
+
*/
|
|
124
|
+
getRunsPublicRaw(requestParameters, initOverrides) {
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
if (requestParameters['slug'] == null) {
|
|
127
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getRunsPublic().');
|
|
128
|
+
}
|
|
129
|
+
const queryParameters = {};
|
|
130
|
+
if (requestParameters['status'] != null) {
|
|
131
|
+
queryParameters['status'] = requestParameters['status'];
|
|
132
|
+
}
|
|
133
|
+
const headerParameters = {};
|
|
134
|
+
let urlPath = `/report/v1/{slug}/runs`;
|
|
135
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
136
|
+
const response = yield this.request({
|
|
137
|
+
path: urlPath,
|
|
138
|
+
method: 'GET',
|
|
139
|
+
headers: headerParameters,
|
|
140
|
+
query: queryParameters,
|
|
141
|
+
}, initOverrides);
|
|
142
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PublicRunFromJSON));
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* GET /report/v1/:slug/runs Get all runs with optional status filter
|
|
147
|
+
*/
|
|
148
|
+
getRunsPublic(requestParameters, initOverrides) {
|
|
149
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
const response = yield this.getRunsPublicRaw(requestParameters, initOverrides);
|
|
151
|
+
return yield response.value();
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* GET /report/v1/:slug/snow Get current snow conditions and reports with metrics
|
|
156
|
+
*/
|
|
157
|
+
getSnowPublicRaw(requestParameters, initOverrides) {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
if (requestParameters['slug'] == null) {
|
|
160
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getSnowPublic().');
|
|
161
|
+
}
|
|
162
|
+
const queryParameters = {};
|
|
163
|
+
const headerParameters = {};
|
|
164
|
+
let urlPath = `/report/v1/{slug}/snow`;
|
|
165
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
166
|
+
const response = yield this.request({
|
|
167
|
+
path: urlPath,
|
|
168
|
+
method: 'GET',
|
|
169
|
+
headers: headerParameters,
|
|
170
|
+
query: queryParameters,
|
|
171
|
+
}, initOverrides);
|
|
172
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PublicSnowResponseFromJSON(jsonValue));
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* GET /report/v1/:slug/snow Get current snow conditions and reports with metrics
|
|
177
|
+
*/
|
|
178
|
+
getSnowPublic(requestParameters, initOverrides) {
|
|
179
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
const response = yield this.getSnowPublicRaw(requestParameters, initOverrides);
|
|
181
|
+
return yield response.value();
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* GET /report/v1/:slug/status Get just the resort status
|
|
186
|
+
*/
|
|
187
|
+
getStatusPublicRaw(requestParameters, initOverrides) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
if (requestParameters['slug'] == null) {
|
|
190
|
+
throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getStatusPublic().');
|
|
191
|
+
}
|
|
192
|
+
const queryParameters = {};
|
|
193
|
+
const headerParameters = {};
|
|
194
|
+
let urlPath = `/report/v1/{slug}/status`;
|
|
195
|
+
urlPath = urlPath.replace(`{${"slug"}}`, encodeURIComponent(String(requestParameters['slug'])));
|
|
196
|
+
const response = yield this.request({
|
|
197
|
+
path: urlPath,
|
|
198
|
+
method: 'GET',
|
|
199
|
+
headers: headerParameters,
|
|
200
|
+
query: queryParameters,
|
|
201
|
+
}, initOverrides);
|
|
202
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PublicResortStatusFromJSON(jsonValue));
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* GET /report/v1/:slug/status Get just the resort status
|
|
207
|
+
*/
|
|
208
|
+
getStatusPublic(requestParameters, initOverrides) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
const response = yield this.getStatusPublicRaw(requestParameters, initOverrides);
|
|
211
|
+
return yield response.value();
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PublicApi';
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
* Operating hours for a specific date (calculated)
|
|
14
|
+
* @export
|
|
15
|
+
* @interface HoursInfo
|
|
16
|
+
*/
|
|
17
|
+
export interface HoursInfo {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof HoursInfo
|
|
22
|
+
*/
|
|
23
|
+
closesAt?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof HoursInfo
|
|
28
|
+
*/
|
|
29
|
+
date: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof HoursInfo
|
|
34
|
+
*/
|
|
35
|
+
dayOfWeek: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof HoursInfo
|
|
40
|
+
*/
|
|
41
|
+
opensAt?: string | null;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the HoursInfo interface.
|
|
45
|
+
*/
|
|
46
|
+
export declare function instanceOfHoursInfo(value: object): value is HoursInfo;
|
|
47
|
+
export declare function HoursInfoFromJSON(json: any): HoursInfo;
|
|
48
|
+
export declare function HoursInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): HoursInfo;
|
|
49
|
+
export declare function HoursInfoToJSON(json: any): HoursInfo;
|
|
50
|
+
export declare function HoursInfoToJSONTyped(value?: HoursInfo | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
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: 0.1.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
|
+
/**
|
|
15
|
+
* Check if a given object implements the HoursInfo interface.
|
|
16
|
+
*/
|
|
17
|
+
export function instanceOfHoursInfo(value) {
|
|
18
|
+
if (!('date' in value) || value['date'] === undefined)
|
|
19
|
+
return false;
|
|
20
|
+
if (!('dayOfWeek' in value) || value['dayOfWeek'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
export function HoursInfoFromJSON(json) {
|
|
25
|
+
return HoursInfoFromJSONTyped(json, false);
|
|
26
|
+
}
|
|
27
|
+
export function HoursInfoFromJSONTyped(json, ignoreDiscriminator) {
|
|
28
|
+
if (json == null) {
|
|
29
|
+
return json;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
'closesAt': json['closes_at'] == null ? undefined : json['closes_at'],
|
|
33
|
+
'date': json['date'],
|
|
34
|
+
'dayOfWeek': json['day_of_week'],
|
|
35
|
+
'opensAt': json['opens_at'] == null ? undefined : json['opens_at'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function HoursInfoToJSON(json) {
|
|
39
|
+
return HoursInfoToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function HoursInfoToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'closes_at': value['closesAt'],
|
|
47
|
+
'date': value['date'],
|
|
48
|
+
'day_of_week': value['dayOfWeek'],
|
|
49
|
+
'opens_at': value['opensAt'],
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
*/
|
|
16
|
+
export declare const LiftStatus: {
|
|
17
|
+
readonly Open: "open";
|
|
18
|
+
readonly Closed: "closed";
|
|
19
|
+
};
|
|
20
|
+
export type LiftStatus = typeof LiftStatus[keyof typeof LiftStatus];
|
|
21
|
+
export declare function instanceOfLiftStatus(value: any): boolean;
|
|
22
|
+
export declare function LiftStatusFromJSON(json: any): LiftStatus;
|
|
23
|
+
export declare function LiftStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiftStatus;
|
|
24
|
+
export declare function LiftStatusToJSON(value?: LiftStatus | null): any;
|
|
25
|
+
export declare function LiftStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): LiftStatus;
|
|
@@ -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: 0.1.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
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const LiftStatus = {
|
|
19
|
+
Open: 'open',
|
|
20
|
+
Closed: 'closed'
|
|
21
|
+
};
|
|
22
|
+
export function instanceOfLiftStatus(value) {
|
|
23
|
+
for (const key in LiftStatus) {
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(LiftStatus, key)) {
|
|
25
|
+
if (LiftStatus[key] === value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
export function LiftStatusFromJSON(json) {
|
|
33
|
+
return LiftStatusFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function LiftStatusFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
export function LiftStatusToJSON(value) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
export function LiftStatusToJSONTyped(value, ignoreDiscriminator) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
*/
|
|
16
|
+
export declare const LiftType: {
|
|
17
|
+
readonly Gondola: "gondola";
|
|
18
|
+
readonly Tram: "tram";
|
|
19
|
+
readonly SixPack: "six_pack";
|
|
20
|
+
readonly EightPack: "eight_pack";
|
|
21
|
+
readonly Quad: "quad";
|
|
22
|
+
readonly Triple: "triple";
|
|
23
|
+
readonly Double: "double";
|
|
24
|
+
readonly SurfaceLift: "surface_lift";
|
|
25
|
+
readonly MagicCarpet: "magic_carpet";
|
|
26
|
+
readonly TBar: "t_bar";
|
|
27
|
+
readonly Platter: "platter";
|
|
28
|
+
readonly RopeTow: "rope_tow";
|
|
29
|
+
readonly Funicular: "funicular";
|
|
30
|
+
};
|
|
31
|
+
export type LiftType = typeof LiftType[keyof typeof LiftType];
|
|
32
|
+
export declare function instanceOfLiftType(value: any): boolean;
|
|
33
|
+
export declare function LiftTypeFromJSON(json: any): LiftType;
|
|
34
|
+
export declare function LiftTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): LiftType;
|
|
35
|
+
export declare function LiftTypeToJSON(value?: LiftType | null): any;
|
|
36
|
+
export declare function LiftTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): LiftType;
|
|
@@ -0,0 +1,54 @@
|
|
|
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: 0.1.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
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const LiftType = {
|
|
19
|
+
Gondola: 'gondola',
|
|
20
|
+
Tram: 'tram',
|
|
21
|
+
SixPack: 'six_pack',
|
|
22
|
+
EightPack: 'eight_pack',
|
|
23
|
+
Quad: 'quad',
|
|
24
|
+
Triple: 'triple',
|
|
25
|
+
Double: 'double',
|
|
26
|
+
SurfaceLift: 'surface_lift',
|
|
27
|
+
MagicCarpet: 'magic_carpet',
|
|
28
|
+
TBar: 't_bar',
|
|
29
|
+
Platter: 'platter',
|
|
30
|
+
RopeTow: 'rope_tow',
|
|
31
|
+
Funicular: 'funicular'
|
|
32
|
+
};
|
|
33
|
+
export function instanceOfLiftType(value) {
|
|
34
|
+
for (const key in LiftType) {
|
|
35
|
+
if (Object.prototype.hasOwnProperty.call(LiftType, key)) {
|
|
36
|
+
if (LiftType[key] === value) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
export function LiftTypeFromJSON(json) {
|
|
44
|
+
return LiftTypeFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function LiftTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
export function LiftTypeToJSON(value) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
export function LiftTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|