@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.
Files changed (94) hide show
  1. package/README.md +134 -0
  2. package/dist/apis/PublicApi.d.ts +174 -0
  3. package/dist/apis/PublicApi.js +218 -0
  4. package/dist/apis/index.d.ts +1 -0
  5. package/dist/apis/index.js +19 -0
  6. package/dist/esm/apis/PublicApi.d.ts +174 -0
  7. package/dist/esm/apis/PublicApi.js +214 -0
  8. package/dist/esm/apis/index.d.ts +1 -0
  9. package/dist/esm/apis/index.js +3 -0
  10. package/dist/esm/index.d.ts +3 -0
  11. package/dist/esm/index.js +5 -0
  12. package/dist/esm/models/HoursInfo.d.ts +50 -0
  13. package/dist/esm/models/HoursInfo.js +51 -0
  14. package/dist/esm/models/LiftStatus.d.ts +25 -0
  15. package/dist/esm/models/LiftStatus.js +43 -0
  16. package/dist/esm/models/LiftType.d.ts +36 -0
  17. package/dist/esm/models/LiftType.js +54 -0
  18. package/dist/esm/models/OperatingHoursResponse.d.ts +46 -0
  19. package/dist/esm/models/OperatingHoursResponse.js +53 -0
  20. package/dist/esm/models/PublicLift.d.ts +88 -0
  21. package/dist/esm/models/PublicLift.js +73 -0
  22. package/dist/esm/models/PublicResortInfo.d.ts +57 -0
  23. package/dist/esm/models/PublicResortInfo.js +60 -0
  24. package/dist/esm/models/PublicResortResponse.d.ts +68 -0
  25. package/dist/esm/models/PublicResortResponse.js +59 -0
  26. package/dist/esm/models/PublicResortStatus.d.ts +45 -0
  27. package/dist/esm/models/PublicResortStatus.js +48 -0
  28. package/dist/esm/models/PublicRun.d.ts +88 -0
  29. package/dist/esm/models/PublicRun.js +73 -0
  30. package/dist/esm/models/PublicSnowReport.d.ts +82 -0
  31. package/dist/esm/models/PublicSnowReport.js +67 -0
  32. package/dist/esm/models/PublicSnowResponse.d.ts +33 -0
  33. package/dist/esm/models/PublicSnowResponse.js +44 -0
  34. package/dist/esm/models/RegularHoursDescription.d.ts +50 -0
  35. package/dist/esm/models/RegularHoursDescription.js +55 -0
  36. package/dist/esm/models/ResortStatusType.d.ts +26 -0
  37. package/dist/esm/models/ResortStatusType.js +44 -0
  38. package/dist/esm/models/RunDifficulty.d.ts +28 -0
  39. package/dist/esm/models/RunDifficulty.js +46 -0
  40. package/dist/esm/models/RunStatus.d.ts +25 -0
  41. package/dist/esm/models/RunStatus.js +43 -0
  42. package/dist/esm/models/SnowMetrics.d.ts +56 -0
  43. package/dist/esm/models/SnowMetrics.js +59 -0
  44. package/dist/esm/models/SurfaceCondition.d.ts +29 -0
  45. package/dist/esm/models/SurfaceCondition.js +47 -0
  46. package/dist/esm/models/UnitPreference.d.ts +25 -0
  47. package/dist/esm/models/UnitPreference.js +43 -0
  48. package/dist/esm/models/index.d.ts +18 -0
  49. package/dist/esm/models/index.js +20 -0
  50. package/dist/esm/runtime.d.ts +184 -0
  51. package/dist/esm/runtime.js +334 -0
  52. package/dist/index.d.ts +3 -0
  53. package/dist/index.js +21 -0
  54. package/dist/models/HoursInfo.d.ts +50 -0
  55. package/dist/models/HoursInfo.js +58 -0
  56. package/dist/models/LiftStatus.d.ts +25 -0
  57. package/dist/models/LiftStatus.js +51 -0
  58. package/dist/models/LiftType.d.ts +36 -0
  59. package/dist/models/LiftType.js +62 -0
  60. package/dist/models/OperatingHoursResponse.d.ts +46 -0
  61. package/dist/models/OperatingHoursResponse.js +60 -0
  62. package/dist/models/PublicLift.d.ts +88 -0
  63. package/dist/models/PublicLift.js +80 -0
  64. package/dist/models/PublicResortInfo.d.ts +57 -0
  65. package/dist/models/PublicResortInfo.js +67 -0
  66. package/dist/models/PublicResortResponse.d.ts +68 -0
  67. package/dist/models/PublicResortResponse.js +66 -0
  68. package/dist/models/PublicResortStatus.d.ts +45 -0
  69. package/dist/models/PublicResortStatus.js +55 -0
  70. package/dist/models/PublicRun.d.ts +88 -0
  71. package/dist/models/PublicRun.js +80 -0
  72. package/dist/models/PublicSnowReport.d.ts +82 -0
  73. package/dist/models/PublicSnowReport.js +74 -0
  74. package/dist/models/PublicSnowResponse.d.ts +33 -0
  75. package/dist/models/PublicSnowResponse.js +51 -0
  76. package/dist/models/RegularHoursDescription.d.ts +50 -0
  77. package/dist/models/RegularHoursDescription.js +62 -0
  78. package/dist/models/ResortStatusType.d.ts +26 -0
  79. package/dist/models/ResortStatusType.js +52 -0
  80. package/dist/models/RunDifficulty.d.ts +28 -0
  81. package/dist/models/RunDifficulty.js +54 -0
  82. package/dist/models/RunStatus.d.ts +25 -0
  83. package/dist/models/RunStatus.js +51 -0
  84. package/dist/models/SnowMetrics.d.ts +56 -0
  85. package/dist/models/SnowMetrics.js +66 -0
  86. package/dist/models/SurfaceCondition.d.ts +29 -0
  87. package/dist/models/SurfaceCondition.js +55 -0
  88. package/dist/models/UnitPreference.d.ts +25 -0
  89. package/dist/models/UnitPreference.js +51 -0
  90. package/dist/models/index.d.ts +18 -0
  91. package/dist/models/index.js +36 -0
  92. package/dist/runtime.d.ts +184 -0
  93. package/dist/runtime.js +350 -0
  94. package/package.json +25 -0
@@ -0,0 +1,334 @@
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
+ export const BASE_PATH = "http://localhost:8787".replace(/\/+$/, "");
24
+ export class Configuration {
25
+ constructor(configuration = {}) {
26
+ this.configuration = configuration;
27
+ }
28
+ set config(configuration) {
29
+ this.configuration = configuration;
30
+ }
31
+ get basePath() {
32
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
33
+ }
34
+ get fetchApi() {
35
+ return this.configuration.fetchApi;
36
+ }
37
+ get middleware() {
38
+ return this.configuration.middleware || [];
39
+ }
40
+ get queryParamsStringify() {
41
+ return this.configuration.queryParamsStringify || querystring;
42
+ }
43
+ get username() {
44
+ return this.configuration.username;
45
+ }
46
+ get password() {
47
+ return this.configuration.password;
48
+ }
49
+ get apiKey() {
50
+ const apiKey = this.configuration.apiKey;
51
+ if (apiKey) {
52
+ return typeof apiKey === 'function' ? apiKey : () => apiKey;
53
+ }
54
+ return undefined;
55
+ }
56
+ get accessToken() {
57
+ const accessToken = this.configuration.accessToken;
58
+ if (accessToken) {
59
+ return typeof accessToken === 'function' ? accessToken : () => __awaiter(this, void 0, void 0, function* () { return accessToken; });
60
+ }
61
+ return undefined;
62
+ }
63
+ get headers() {
64
+ return this.configuration.headers;
65
+ }
66
+ get credentials() {
67
+ return this.configuration.credentials;
68
+ }
69
+ }
70
+ export const DefaultConfig = new Configuration();
71
+ /**
72
+ * This is the base class for all generated API classes.
73
+ */
74
+ export class BaseAPI {
75
+ constructor(configuration = DefaultConfig) {
76
+ this.configuration = configuration;
77
+ this.fetchApi = (url, init) => __awaiter(this, void 0, void 0, function* () {
78
+ let fetchParams = { url, init };
79
+ for (const middleware of this.middleware) {
80
+ if (middleware.pre) {
81
+ fetchParams = (yield middleware.pre(Object.assign({ fetch: this.fetchApi }, fetchParams))) || fetchParams;
82
+ }
83
+ }
84
+ let response = undefined;
85
+ try {
86
+ response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
87
+ }
88
+ catch (e) {
89
+ for (const middleware of this.middleware) {
90
+ if (middleware.onError) {
91
+ response = (yield middleware.onError({
92
+ fetch: this.fetchApi,
93
+ url: fetchParams.url,
94
+ init: fetchParams.init,
95
+ error: e,
96
+ response: response ? response.clone() : undefined,
97
+ })) || response;
98
+ }
99
+ }
100
+ if (response === undefined) {
101
+ if (e instanceof Error) {
102
+ throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
103
+ }
104
+ else {
105
+ throw e;
106
+ }
107
+ }
108
+ }
109
+ for (const middleware of this.middleware) {
110
+ if (middleware.post) {
111
+ response = (yield middleware.post({
112
+ fetch: this.fetchApi,
113
+ url: fetchParams.url,
114
+ init: fetchParams.init,
115
+ response: response.clone(),
116
+ })) || response;
117
+ }
118
+ }
119
+ return response;
120
+ });
121
+ this.middleware = configuration.middleware;
122
+ }
123
+ withMiddleware(...middlewares) {
124
+ const next = this.clone();
125
+ next.middleware = next.middleware.concat(...middlewares);
126
+ return next;
127
+ }
128
+ withPreMiddleware(...preMiddlewares) {
129
+ const middlewares = preMiddlewares.map((pre) => ({ pre }));
130
+ return this.withMiddleware(...middlewares);
131
+ }
132
+ withPostMiddleware(...postMiddlewares) {
133
+ const middlewares = postMiddlewares.map((post) => ({ post }));
134
+ return this.withMiddleware(...middlewares);
135
+ }
136
+ /**
137
+ * Check if the given MIME is a JSON MIME.
138
+ * JSON MIME examples:
139
+ * application/json
140
+ * application/json; charset=UTF8
141
+ * APPLICATION/JSON
142
+ * application/vnd.company+json
143
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
144
+ * @return True if the given MIME is JSON, false otherwise.
145
+ */
146
+ isJsonMime(mime) {
147
+ if (!mime) {
148
+ return false;
149
+ }
150
+ return BaseAPI.jsonRegex.test(mime);
151
+ }
152
+ request(context, initOverrides) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ const { url, init } = yield this.createFetchParams(context, initOverrides);
155
+ const response = yield this.fetchApi(url, init);
156
+ if (response && (response.status >= 200 && response.status < 300)) {
157
+ return response;
158
+ }
159
+ throw new ResponseError(response, 'Response returned an error code');
160
+ });
161
+ }
162
+ createFetchParams(context, initOverrides) {
163
+ return __awaiter(this, void 0, void 0, function* () {
164
+ let url = this.configuration.basePath + context.path;
165
+ if (context.query !== undefined && Object.keys(context.query).length !== 0) {
166
+ // only add the querystring to the URL if there are query parameters.
167
+ // this is done to avoid urls ending with a "?" character which buggy webservers
168
+ // do not handle correctly sometimes.
169
+ url += '?' + this.configuration.queryParamsStringify(context.query);
170
+ }
171
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
172
+ Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
173
+ const initOverrideFn = typeof initOverrides === "function"
174
+ ? initOverrides
175
+ : () => __awaiter(this, void 0, void 0, function* () { return initOverrides; });
176
+ const initParams = {
177
+ method: context.method,
178
+ headers,
179
+ body: context.body,
180
+ credentials: this.configuration.credentials,
181
+ };
182
+ const overriddenInit = Object.assign(Object.assign({}, initParams), (yield initOverrideFn({
183
+ init: initParams,
184
+ context,
185
+ })));
186
+ let body;
187
+ if (isFormData(overriddenInit.body)
188
+ || (overriddenInit.body instanceof URLSearchParams)
189
+ || isBlob(overriddenInit.body)) {
190
+ body = overriddenInit.body;
191
+ }
192
+ else if (this.isJsonMime(headers['Content-Type'])) {
193
+ body = JSON.stringify(overriddenInit.body);
194
+ }
195
+ else {
196
+ body = overriddenInit.body;
197
+ }
198
+ const init = Object.assign(Object.assign({}, overriddenInit), { body });
199
+ return { url, init };
200
+ });
201
+ }
202
+ /**
203
+ * Create a shallow clone of `this` by constructing a new instance
204
+ * and then shallow cloning data members.
205
+ */
206
+ clone() {
207
+ const constructor = this.constructor;
208
+ const next = new constructor(this.configuration);
209
+ next.middleware = this.middleware.slice();
210
+ return next;
211
+ }
212
+ }
213
+ BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
214
+ ;
215
+ function isBlob(value) {
216
+ return typeof Blob !== 'undefined' && value instanceof Blob;
217
+ }
218
+ function isFormData(value) {
219
+ return typeof FormData !== "undefined" && value instanceof FormData;
220
+ }
221
+ export class ResponseError extends Error {
222
+ constructor(response, msg) {
223
+ super(msg);
224
+ this.response = response;
225
+ this.name = "ResponseError";
226
+ }
227
+ }
228
+ export class FetchError extends Error {
229
+ constructor(cause, msg) {
230
+ super(msg);
231
+ this.cause = cause;
232
+ this.name = "FetchError";
233
+ }
234
+ }
235
+ export class RequiredError extends Error {
236
+ constructor(field, msg) {
237
+ super(msg);
238
+ this.field = field;
239
+ this.name = "RequiredError";
240
+ }
241
+ }
242
+ export const COLLECTION_FORMATS = {
243
+ csv: ",",
244
+ ssv: " ",
245
+ tsv: "\t",
246
+ pipes: "|",
247
+ };
248
+ export function querystring(params, prefix = '') {
249
+ return Object.keys(params)
250
+ .map(key => querystringSingleKey(key, params[key], prefix))
251
+ .filter(part => part.length > 0)
252
+ .join('&');
253
+ }
254
+ function querystringSingleKey(key, value, keyPrefix = '') {
255
+ const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
256
+ if (value instanceof Array) {
257
+ const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
258
+ .join(`&${encodeURIComponent(fullKey)}=`);
259
+ return `${encodeURIComponent(fullKey)}=${multiValue}`;
260
+ }
261
+ if (value instanceof Set) {
262
+ const valueAsArray = Array.from(value);
263
+ return querystringSingleKey(key, valueAsArray, keyPrefix);
264
+ }
265
+ if (value instanceof Date) {
266
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
267
+ }
268
+ if (value instanceof Object) {
269
+ return querystring(value, fullKey);
270
+ }
271
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
272
+ }
273
+ export function exists(json, key) {
274
+ const value = json[key];
275
+ return value !== null && value !== undefined;
276
+ }
277
+ export function mapValues(data, fn) {
278
+ const result = {};
279
+ for (const key of Object.keys(data)) {
280
+ result[key] = fn(data[key]);
281
+ }
282
+ return result;
283
+ }
284
+ export function canConsumeForm(consumes) {
285
+ for (const consume of consumes) {
286
+ if ('multipart/form-data' === consume.contentType) {
287
+ return true;
288
+ }
289
+ }
290
+ return false;
291
+ }
292
+ export class JSONApiResponse {
293
+ constructor(raw, transformer = (jsonValue) => jsonValue) {
294
+ this.raw = raw;
295
+ this.transformer = transformer;
296
+ }
297
+ value() {
298
+ return __awaiter(this, void 0, void 0, function* () {
299
+ return this.transformer(yield this.raw.json());
300
+ });
301
+ }
302
+ }
303
+ export class VoidApiResponse {
304
+ constructor(raw) {
305
+ this.raw = raw;
306
+ }
307
+ value() {
308
+ return __awaiter(this, void 0, void 0, function* () {
309
+ return undefined;
310
+ });
311
+ }
312
+ }
313
+ export class BlobApiResponse {
314
+ constructor(raw) {
315
+ this.raw = raw;
316
+ }
317
+ value() {
318
+ return __awaiter(this, void 0, void 0, function* () {
319
+ return yield this.raw.blob();
320
+ });
321
+ }
322
+ ;
323
+ }
324
+ export class TextApiResponse {
325
+ constructor(raw) {
326
+ this.raw = raw;
327
+ }
328
+ value() {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ return yield this.raw.text();
331
+ });
332
+ }
333
+ ;
334
+ }
@@ -0,0 +1,3 @@
1
+ export * from './runtime';
2
+ export * from './apis/index';
3
+ export * from './models/index';
package/dist/index.js ADDED
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./runtime"), exports);
20
+ __exportStar(require("./apis/index"), exports);
21
+ __exportStar(require("./models/index"), exports);
@@ -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,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * MtnManager API
6
+ * Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfHoursInfo = instanceOfHoursInfo;
17
+ exports.HoursInfoFromJSON = HoursInfoFromJSON;
18
+ exports.HoursInfoFromJSONTyped = HoursInfoFromJSONTyped;
19
+ exports.HoursInfoToJSON = HoursInfoToJSON;
20
+ exports.HoursInfoToJSONTyped = HoursInfoToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the HoursInfo interface.
23
+ */
24
+ function instanceOfHoursInfo(value) {
25
+ if (!('date' in value) || value['date'] === undefined)
26
+ return false;
27
+ if (!('dayOfWeek' in value) || value['dayOfWeek'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function HoursInfoFromJSON(json) {
32
+ return HoursInfoFromJSONTyped(json, false);
33
+ }
34
+ function HoursInfoFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'closesAt': json['closes_at'] == null ? undefined : json['closes_at'],
40
+ 'date': json['date'],
41
+ 'dayOfWeek': json['day_of_week'],
42
+ 'opensAt': json['opens_at'] == null ? undefined : json['opens_at'],
43
+ };
44
+ }
45
+ function HoursInfoToJSON(json) {
46
+ return HoursInfoToJSONTyped(json, false);
47
+ }
48
+ function HoursInfoToJSONTyped(value, ignoreDiscriminator = false) {
49
+ if (value == null) {
50
+ return value;
51
+ }
52
+ return {
53
+ 'closes_at': value['closesAt'],
54
+ 'date': value['date'],
55
+ 'day_of_week': value['dayOfWeek'],
56
+ 'opens_at': value['opensAt'],
57
+ };
58
+ }
@@ -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,51 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * MtnManager API
6
+ * Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LiftStatus = void 0;
17
+ exports.instanceOfLiftStatus = instanceOfLiftStatus;
18
+ exports.LiftStatusFromJSON = LiftStatusFromJSON;
19
+ exports.LiftStatusFromJSONTyped = LiftStatusFromJSONTyped;
20
+ exports.LiftStatusToJSON = LiftStatusToJSON;
21
+ exports.LiftStatusToJSONTyped = LiftStatusToJSONTyped;
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.LiftStatus = {
27
+ Open: 'open',
28
+ Closed: 'closed'
29
+ };
30
+ function instanceOfLiftStatus(value) {
31
+ for (const key in exports.LiftStatus) {
32
+ if (Object.prototype.hasOwnProperty.call(exports.LiftStatus, key)) {
33
+ if (exports.LiftStatus[key] === value) {
34
+ return true;
35
+ }
36
+ }
37
+ }
38
+ return false;
39
+ }
40
+ function LiftStatusFromJSON(json) {
41
+ return LiftStatusFromJSONTyped(json, false);
42
+ }
43
+ function LiftStatusFromJSONTyped(json, ignoreDiscriminator) {
44
+ return json;
45
+ }
46
+ function LiftStatusToJSON(value) {
47
+ return value;
48
+ }
49
+ function LiftStatusToJSONTyped(value, ignoreDiscriminator) {
50
+ return value;
51
+ }
@@ -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,62 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * MtnManager API
6
+ * Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.LiftType = void 0;
17
+ exports.instanceOfLiftType = instanceOfLiftType;
18
+ exports.LiftTypeFromJSON = LiftTypeFromJSON;
19
+ exports.LiftTypeFromJSONTyped = LiftTypeFromJSONTyped;
20
+ exports.LiftTypeToJSON = LiftTypeToJSON;
21
+ exports.LiftTypeToJSONTyped = LiftTypeToJSONTyped;
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.LiftType = {
27
+ Gondola: 'gondola',
28
+ Tram: 'tram',
29
+ SixPack: 'six_pack',
30
+ EightPack: 'eight_pack',
31
+ Quad: 'quad',
32
+ Triple: 'triple',
33
+ Double: 'double',
34
+ SurfaceLift: 'surface_lift',
35
+ MagicCarpet: 'magic_carpet',
36
+ TBar: 't_bar',
37
+ Platter: 'platter',
38
+ RopeTow: 'rope_tow',
39
+ Funicular: 'funicular'
40
+ };
41
+ function instanceOfLiftType(value) {
42
+ for (const key in exports.LiftType) {
43
+ if (Object.prototype.hasOwnProperty.call(exports.LiftType, key)) {
44
+ if (exports.LiftType[key] === value) {
45
+ return true;
46
+ }
47
+ }
48
+ }
49
+ return false;
50
+ }
51
+ function LiftTypeFromJSON(json) {
52
+ return LiftTypeFromJSONTyped(json, false);
53
+ }
54
+ function LiftTypeFromJSONTyped(json, ignoreDiscriminator) {
55
+ return json;
56
+ }
57
+ function LiftTypeToJSON(value) {
58
+ return value;
59
+ }
60
+ function LiftTypeToJSONTyped(value, ignoreDiscriminator) {
61
+ return value;
62
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * MtnManager API
3
+ * Public API for retrieving ski resort snow reports, run status, lift status, and operating hours. No authentication required.
4
+ *
5
+ * The version of the OpenAPI document: 0.1.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { HoursInfo } from './HoursInfo';
13
+ import type { RegularHoursDescription } from './RegularHoursDescription';
14
+ /**
15
+ * Calculated operating hours response
16
+ * @export
17
+ * @interface OperatingHoursResponse
18
+ */
19
+ export interface OperatingHoursResponse {
20
+ /**
21
+ *
22
+ * @type {Array<HoursInfo>}
23
+ * @memberof OperatingHoursResponse
24
+ */
25
+ openDays: Array<HoursInfo>;
26
+ /**
27
+ *
28
+ * @type {Array<RegularHoursDescription>}
29
+ * @memberof OperatingHoursResponse
30
+ */
31
+ regularHours: Array<RegularHoursDescription>;
32
+ /**
33
+ *
34
+ * @type {HoursInfo}
35
+ * @memberof OperatingHoursResponse
36
+ */
37
+ today: HoursInfo;
38
+ }
39
+ /**
40
+ * Check if a given object implements the OperatingHoursResponse interface.
41
+ */
42
+ export declare function instanceOfOperatingHoursResponse(value: object): value is OperatingHoursResponse;
43
+ export declare function OperatingHoursResponseFromJSON(json: any): OperatingHoursResponse;
44
+ export declare function OperatingHoursResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperatingHoursResponse;
45
+ export declare function OperatingHoursResponseToJSON(json: any): OperatingHoursResponse;
46
+ export declare function OperatingHoursResponseToJSONTyped(value?: OperatingHoursResponse | null, ignoreDiscriminator?: boolean): any;