@arekstasko/plantcare-api-client 1.0.0
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/dist/index.cjs +1206 -0
- package/dist/index.d.cts +836 -0
- package/package.json +23 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,1206 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function _assert_this_initialized(self) {
|
|
3
|
+
if (self === void 0) {
|
|
4
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
5
|
+
}
|
|
6
|
+
return self;
|
|
7
|
+
}
|
|
8
|
+
function _call_super(_this, derived, args) {
|
|
9
|
+
derived = _get_prototype_of(derived);
|
|
10
|
+
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
11
|
+
}
|
|
12
|
+
function _class_call_check(instance, Constructor) {
|
|
13
|
+
if (!(instance instanceof Constructor)) {
|
|
14
|
+
throw new TypeError("Cannot call a class as a function");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function _construct(Parent, args, Class) {
|
|
18
|
+
if (_is_native_reflect_construct()) {
|
|
19
|
+
_construct = Reflect.construct;
|
|
20
|
+
} else {
|
|
21
|
+
_construct = function construct(Parent, args, Class) {
|
|
22
|
+
var a = [
|
|
23
|
+
null
|
|
24
|
+
];
|
|
25
|
+
a.push.apply(a, args);
|
|
26
|
+
var Constructor = Function.bind.apply(Parent, a);
|
|
27
|
+
var instance = new Constructor();
|
|
28
|
+
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
29
|
+
return instance;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return _construct.apply(null, arguments);
|
|
33
|
+
}
|
|
34
|
+
function _defineProperties(target, props) {
|
|
35
|
+
for(var i = 0; i < props.length; i++){
|
|
36
|
+
var descriptor = props[i];
|
|
37
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
38
|
+
descriptor.configurable = true;
|
|
39
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
40
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function _create_class(Constructor, protoProps, staticProps) {
|
|
44
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
45
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
46
|
+
return Constructor;
|
|
47
|
+
}
|
|
48
|
+
function _get_prototype_of(o) {
|
|
49
|
+
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
50
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
|
51
|
+
};
|
|
52
|
+
return _get_prototype_of(o);
|
|
53
|
+
}
|
|
54
|
+
function _inherits(subClass, superClass) {
|
|
55
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
|
56
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
57
|
+
}
|
|
58
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
59
|
+
constructor: {
|
|
60
|
+
value: subClass,
|
|
61
|
+
writable: true,
|
|
62
|
+
configurable: true
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
if (superClass) _set_prototype_of(subClass, superClass);
|
|
66
|
+
}
|
|
67
|
+
function _is_native_function(fn) {
|
|
68
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
69
|
+
}
|
|
70
|
+
function _possible_constructor_return(self, call) {
|
|
71
|
+
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
72
|
+
return call;
|
|
73
|
+
}
|
|
74
|
+
return _assert_this_initialized(self);
|
|
75
|
+
}
|
|
76
|
+
function _set_prototype_of(o, p) {
|
|
77
|
+
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
78
|
+
o.__proto__ = p;
|
|
79
|
+
return o;
|
|
80
|
+
};
|
|
81
|
+
return _set_prototype_of(o, p);
|
|
82
|
+
}
|
|
83
|
+
function _type_of(obj) {
|
|
84
|
+
"@swc/helpers - typeof";
|
|
85
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
86
|
+
}
|
|
87
|
+
function _wrap_native_super(Class) {
|
|
88
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
89
|
+
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
90
|
+
if (Class === null || !_is_native_function(Class)) return Class;
|
|
91
|
+
if (typeof Class !== "function") {
|
|
92
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
93
|
+
}
|
|
94
|
+
if (typeof _cache !== "undefined") {
|
|
95
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
|
96
|
+
_cache.set(Class, Wrapper);
|
|
97
|
+
}
|
|
98
|
+
function Wrapper() {
|
|
99
|
+
return _construct(Class, arguments, _get_prototype_of(this).constructor);
|
|
100
|
+
}
|
|
101
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
|
102
|
+
constructor: {
|
|
103
|
+
value: Wrapper,
|
|
104
|
+
enumerable: false,
|
|
105
|
+
writable: true,
|
|
106
|
+
configurable: true
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
return _set_prototype_of(Wrapper, Class);
|
|
110
|
+
};
|
|
111
|
+
return _wrap_native_super(Class);
|
|
112
|
+
}
|
|
113
|
+
function _is_native_reflect_construct() {
|
|
114
|
+
try {
|
|
115
|
+
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
116
|
+
} catch (_) {}
|
|
117
|
+
return (_is_native_reflect_construct = function() {
|
|
118
|
+
return !!result;
|
|
119
|
+
})();
|
|
120
|
+
}
|
|
121
|
+
var __defProp = Object.defineProperty;
|
|
122
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
123
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
124
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
125
|
+
var __export = function(target, all) {
|
|
126
|
+
for(var name in all)__defProp(target, name, {
|
|
127
|
+
get: all[name],
|
|
128
|
+
enumerable: true
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
var __copyProps = function(to, from, except, desc) {
|
|
132
|
+
if (from && (typeof from === "undefined" ? "undefined" : _type_of(from)) === "object" || typeof from === "function") {
|
|
133
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
134
|
+
try {
|
|
135
|
+
var _loop = function() {
|
|
136
|
+
var key = _step.value;
|
|
137
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
138
|
+
get: function() {
|
|
139
|
+
return from[key];
|
|
140
|
+
},
|
|
141
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
142
|
+
});
|
|
143
|
+
};
|
|
144
|
+
for(var _iterator = __getOwnPropNames(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
|
145
|
+
} catch (err) {
|
|
146
|
+
_didIteratorError = true;
|
|
147
|
+
_iteratorError = err;
|
|
148
|
+
} finally{
|
|
149
|
+
try {
|
|
150
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
151
|
+
_iterator.return();
|
|
152
|
+
}
|
|
153
|
+
} finally{
|
|
154
|
+
if (_didIteratorError) {
|
|
155
|
+
throw _iteratorError;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
return to;
|
|
161
|
+
};
|
|
162
|
+
var __toCommonJS = function(mod) {
|
|
163
|
+
return __copyProps(__defProp({}, "__esModule", {
|
|
164
|
+
value: true
|
|
165
|
+
}), mod);
|
|
166
|
+
};
|
|
167
|
+
// index.ts
|
|
168
|
+
var index_exports = {};
|
|
169
|
+
__export(index_exports, {
|
|
170
|
+
ApiException: function() {
|
|
171
|
+
return ApiException;
|
|
172
|
+
},
|
|
173
|
+
CallingConventions: function() {
|
|
174
|
+
return CallingConventions;
|
|
175
|
+
},
|
|
176
|
+
Client: function() {
|
|
177
|
+
return Client;
|
|
178
|
+
},
|
|
179
|
+
EventAttributes: function() {
|
|
180
|
+
return EventAttributes;
|
|
181
|
+
},
|
|
182
|
+
FieldAttributes: function() {
|
|
183
|
+
return FieldAttributes;
|
|
184
|
+
},
|
|
185
|
+
GenericParameterAttributes: function() {
|
|
186
|
+
return GenericParameterAttributes;
|
|
187
|
+
},
|
|
188
|
+
LayoutKind: function() {
|
|
189
|
+
return LayoutKind;
|
|
190
|
+
},
|
|
191
|
+
MemberTypes: function() {
|
|
192
|
+
return MemberTypes;
|
|
193
|
+
},
|
|
194
|
+
MethodAttributes: function() {
|
|
195
|
+
return MethodAttributes;
|
|
196
|
+
},
|
|
197
|
+
MethodImplAttributes: function() {
|
|
198
|
+
return MethodImplAttributes;
|
|
199
|
+
},
|
|
200
|
+
ParameterAttributes: function() {
|
|
201
|
+
return ParameterAttributes;
|
|
202
|
+
},
|
|
203
|
+
PlantType: function() {
|
|
204
|
+
return PlantType;
|
|
205
|
+
},
|
|
206
|
+
PropertyAttributes: function() {
|
|
207
|
+
return PropertyAttributes;
|
|
208
|
+
},
|
|
209
|
+
SecurityRuleSet: function() {
|
|
210
|
+
return SecurityRuleSet;
|
|
211
|
+
},
|
|
212
|
+
TypeAttributes: function() {
|
|
213
|
+
return TypeAttributes;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
module.exports = __toCommonJS(index_exports);
|
|
217
|
+
// ApiClient.ts
|
|
218
|
+
var Client = /*#__PURE__*/ function() {
|
|
219
|
+
function Client(baseUrl, http) {
|
|
220
|
+
_class_call_check(this, Client);
|
|
221
|
+
this.jsonParseReviver = void 0;
|
|
222
|
+
this.http = http ? http : window;
|
|
223
|
+
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
224
|
+
}
|
|
225
|
+
_create_class(Client, [
|
|
226
|
+
{
|
|
227
|
+
/**
|
|
228
|
+
* @param body (optional)
|
|
229
|
+
* @return OK
|
|
230
|
+
*/ key: "humidityMeasurements",
|
|
231
|
+
value: function humidityMeasurements(body) {
|
|
232
|
+
var _this = this;
|
|
233
|
+
var url_ = this.baseUrl + "/api/humidity-measurements";
|
|
234
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
235
|
+
var content_ = JSON.stringify(body);
|
|
236
|
+
var options_ = {
|
|
237
|
+
body: content_,
|
|
238
|
+
method: "POST",
|
|
239
|
+
headers: {
|
|
240
|
+
"Content-Type": "application/json",
|
|
241
|
+
"Accept": "application/json"
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
245
|
+
return _this.processHumidityMeasurements(_response);
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
key: "processHumidityMeasurements",
|
|
251
|
+
value: function processHumidityMeasurements(response) {
|
|
252
|
+
var _this = this;
|
|
253
|
+
var status = response.status;
|
|
254
|
+
var _headers = {};
|
|
255
|
+
if (response.headers && response.headers.forEach) {
|
|
256
|
+
response.headers.forEach(function(v, k) {
|
|
257
|
+
return _headers[k] = v;
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
;
|
|
261
|
+
if (status === 200) {
|
|
262
|
+
return response.text().then(function(_responseText) {
|
|
263
|
+
var result200 = null;
|
|
264
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
265
|
+
return result200;
|
|
266
|
+
});
|
|
267
|
+
} else if (status === 500) {
|
|
268
|
+
return response.text().then(function(_responseText) {
|
|
269
|
+
var result500 = null;
|
|
270
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
271
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
272
|
+
});
|
|
273
|
+
} else if (status !== 200 && status !== 204) {
|
|
274
|
+
return response.text().then(function(_responseText) {
|
|
275
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
return Promise.resolve(null);
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
/**
|
|
283
|
+
* @param id (optional)
|
|
284
|
+
* @param fromDate (optional)
|
|
285
|
+
* @param toDate (optional)
|
|
286
|
+
* @return OK
|
|
287
|
+
*/ key: "humidityMeasurementsAll",
|
|
288
|
+
value: function humidityMeasurementsAll(id, fromDate, toDate) {
|
|
289
|
+
var _this = this;
|
|
290
|
+
var url_ = this.baseUrl + "/api/humidity-measurements?";
|
|
291
|
+
if (id === null) throw new globalThis.Error("The parameter 'id' cannot be null.");
|
|
292
|
+
else if (id !== void 0) url_ += "id=" + encodeURIComponent("" + id) + "&";
|
|
293
|
+
if (fromDate === null) throw new globalThis.Error("The parameter 'fromDate' cannot be null.");
|
|
294
|
+
else if (fromDate !== void 0) url_ += "fromDate=" + encodeURIComponent(fromDate ? "" + fromDate.toISOString() : "") + "&";
|
|
295
|
+
if (toDate === null) throw new globalThis.Error("The parameter 'toDate' cannot be null.");
|
|
296
|
+
else if (toDate !== void 0) url_ += "toDate=" + encodeURIComponent(toDate ? "" + toDate.toISOString() : "") + "&";
|
|
297
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
298
|
+
var options_ = {
|
|
299
|
+
method: "GET",
|
|
300
|
+
headers: {
|
|
301
|
+
"Accept": "application/json"
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
305
|
+
return _this.processHumidityMeasurementsAll(_response);
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
key: "processHumidityMeasurementsAll",
|
|
311
|
+
value: function processHumidityMeasurementsAll(response) {
|
|
312
|
+
var _this = this;
|
|
313
|
+
var status = response.status;
|
|
314
|
+
var _headers = {};
|
|
315
|
+
if (response.headers && response.headers.forEach) {
|
|
316
|
+
response.headers.forEach(function(v, k) {
|
|
317
|
+
return _headers[k] = v;
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
;
|
|
321
|
+
if (status === 200) {
|
|
322
|
+
return response.text().then(function(_responseText) {
|
|
323
|
+
var result200 = null;
|
|
324
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
325
|
+
return result200;
|
|
326
|
+
});
|
|
327
|
+
} else if (status === 500) {
|
|
328
|
+
return response.text().then(function(_responseText) {
|
|
329
|
+
var result500 = null;
|
|
330
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
331
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
332
|
+
});
|
|
333
|
+
} else if (status !== 200 && status !== 204) {
|
|
334
|
+
return response.text().then(function(_responseText) {
|
|
335
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
return Promise.resolve(null);
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
/**
|
|
343
|
+
* @param body (optional)
|
|
344
|
+
* @return OK
|
|
345
|
+
*/ key: "status",
|
|
346
|
+
value: function status(body) {
|
|
347
|
+
var _this = this;
|
|
348
|
+
var url_ = this.baseUrl + "/status";
|
|
349
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
350
|
+
var content_ = JSON.stringify(body);
|
|
351
|
+
var options_ = {
|
|
352
|
+
body: content_,
|
|
353
|
+
method: "POST",
|
|
354
|
+
headers: {
|
|
355
|
+
"Content-Type": "application/json",
|
|
356
|
+
"Accept": "application/json"
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
360
|
+
return _this.processStatus(_response);
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
key: "processStatus",
|
|
366
|
+
value: function processStatus(response) {
|
|
367
|
+
var _this = this;
|
|
368
|
+
var status = response.status;
|
|
369
|
+
var _headers = {};
|
|
370
|
+
if (response.headers && response.headers.forEach) {
|
|
371
|
+
response.headers.forEach(function(v, k) {
|
|
372
|
+
return _headers[k] = v;
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
;
|
|
376
|
+
if (status === 200) {
|
|
377
|
+
return response.text().then(function(_responseText) {
|
|
378
|
+
var result200 = null;
|
|
379
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
380
|
+
return result200;
|
|
381
|
+
});
|
|
382
|
+
} else if (status === 500) {
|
|
383
|
+
return response.text().then(function(_responseText) {
|
|
384
|
+
var result500 = null;
|
|
385
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
386
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
387
|
+
});
|
|
388
|
+
} else if (status !== 200 && status !== 204) {
|
|
389
|
+
return response.text().then(function(_responseText) {
|
|
390
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
return Promise.resolve(null);
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
/**
|
|
398
|
+
* @param body (optional)
|
|
399
|
+
* @return OK
|
|
400
|
+
*/ key: "modules",
|
|
401
|
+
value: function modules(body) {
|
|
402
|
+
var _this = this;
|
|
403
|
+
var url_ = this.baseUrl + "/api/modules";
|
|
404
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
405
|
+
var content_ = JSON.stringify(body);
|
|
406
|
+
var options_ = {
|
|
407
|
+
body: content_,
|
|
408
|
+
method: "POST",
|
|
409
|
+
headers: {
|
|
410
|
+
"Content-Type": "application/json",
|
|
411
|
+
"Accept": "application/json"
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
415
|
+
return _this.processModules(_response);
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
key: "processModules",
|
|
421
|
+
value: function processModules(response) {
|
|
422
|
+
var _this = this;
|
|
423
|
+
var status = response.status;
|
|
424
|
+
var _headers = {};
|
|
425
|
+
if (response.headers && response.headers.forEach) {
|
|
426
|
+
response.headers.forEach(function(v, k) {
|
|
427
|
+
return _headers[k] = v;
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
;
|
|
431
|
+
if (status === 200) {
|
|
432
|
+
return response.text().then(function(_responseText) {
|
|
433
|
+
var result200 = null;
|
|
434
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
435
|
+
return result200;
|
|
436
|
+
});
|
|
437
|
+
} else if (status === 500) {
|
|
438
|
+
return response.text().then(function(_responseText) {
|
|
439
|
+
var result500 = null;
|
|
440
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
441
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
442
|
+
});
|
|
443
|
+
} else if (status !== 200 && status !== 204) {
|
|
444
|
+
return response.text().then(function(_responseText) {
|
|
445
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
return Promise.resolve(null);
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
/**
|
|
453
|
+
* @return OK
|
|
454
|
+
*/ key: "modulesAll",
|
|
455
|
+
value: function modulesAll() {
|
|
456
|
+
var _this = this;
|
|
457
|
+
var url_ = this.baseUrl + "/api/modules";
|
|
458
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
459
|
+
var options_ = {
|
|
460
|
+
method: "GET",
|
|
461
|
+
headers: {
|
|
462
|
+
"Accept": "application/json"
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
466
|
+
return _this.processModulesAll(_response);
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
key: "processModulesAll",
|
|
472
|
+
value: function processModulesAll(response) {
|
|
473
|
+
var _this = this;
|
|
474
|
+
var status = response.status;
|
|
475
|
+
var _headers = {};
|
|
476
|
+
if (response.headers && response.headers.forEach) {
|
|
477
|
+
response.headers.forEach(function(v, k) {
|
|
478
|
+
return _headers[k] = v;
|
|
479
|
+
});
|
|
480
|
+
}
|
|
481
|
+
;
|
|
482
|
+
if (status === 200) {
|
|
483
|
+
return response.text().then(function(_responseText) {
|
|
484
|
+
var result200 = null;
|
|
485
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
486
|
+
return result200;
|
|
487
|
+
});
|
|
488
|
+
} else if (status === 500) {
|
|
489
|
+
return response.text().then(function(_responseText) {
|
|
490
|
+
var result500 = null;
|
|
491
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
492
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
493
|
+
});
|
|
494
|
+
} else if (status !== 200 && status !== 204) {
|
|
495
|
+
return response.text().then(function(_responseText) {
|
|
496
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
return Promise.resolve(null);
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
/**
|
|
504
|
+
* @param body (optional)
|
|
505
|
+
* @return OK
|
|
506
|
+
*/ key: "placesPOST",
|
|
507
|
+
value: function placesPOST(body) {
|
|
508
|
+
var _this = this;
|
|
509
|
+
var url_ = this.baseUrl + "/api/places";
|
|
510
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
511
|
+
var content_ = JSON.stringify(body);
|
|
512
|
+
var options_ = {
|
|
513
|
+
body: content_,
|
|
514
|
+
method: "POST",
|
|
515
|
+
headers: {
|
|
516
|
+
"Content-Type": "application/json",
|
|
517
|
+
"Accept": "application/json"
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
521
|
+
return _this.processPlacesPOST(_response);
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
key: "processPlacesPOST",
|
|
527
|
+
value: function processPlacesPOST(response) {
|
|
528
|
+
var _this = this;
|
|
529
|
+
var status = response.status;
|
|
530
|
+
var _headers = {};
|
|
531
|
+
if (response.headers && response.headers.forEach) {
|
|
532
|
+
response.headers.forEach(function(v, k) {
|
|
533
|
+
return _headers[k] = v;
|
|
534
|
+
});
|
|
535
|
+
}
|
|
536
|
+
;
|
|
537
|
+
if (status === 200) {
|
|
538
|
+
return response.text().then(function(_responseText) {
|
|
539
|
+
var result200 = null;
|
|
540
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
541
|
+
return result200;
|
|
542
|
+
});
|
|
543
|
+
} else if (status === 500) {
|
|
544
|
+
return response.text().then(function(_responseText) {
|
|
545
|
+
var result500 = null;
|
|
546
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
547
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
548
|
+
});
|
|
549
|
+
} else if (status !== 200 && status !== 204) {
|
|
550
|
+
return response.text().then(function(_responseText) {
|
|
551
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
return Promise.resolve(null);
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
/**
|
|
559
|
+
* @param id (optional)
|
|
560
|
+
* @return OK
|
|
561
|
+
*/ key: "placesDELETE",
|
|
562
|
+
value: function placesDELETE(id) {
|
|
563
|
+
var _this = this;
|
|
564
|
+
var url_ = this.baseUrl + "/api/places?";
|
|
565
|
+
if (id === null) throw new globalThis.Error("The parameter 'id' cannot be null.");
|
|
566
|
+
else if (id !== void 0) url_ += "id=" + encodeURIComponent("" + id) + "&";
|
|
567
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
568
|
+
var options_ = {
|
|
569
|
+
method: "DELETE",
|
|
570
|
+
headers: {
|
|
571
|
+
"Accept": "application/json"
|
|
572
|
+
}
|
|
573
|
+
};
|
|
574
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
575
|
+
return _this.processPlacesDELETE(_response);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
key: "processPlacesDELETE",
|
|
581
|
+
value: function processPlacesDELETE(response) {
|
|
582
|
+
var _this = this;
|
|
583
|
+
var status = response.status;
|
|
584
|
+
var _headers = {};
|
|
585
|
+
if (response.headers && response.headers.forEach) {
|
|
586
|
+
response.headers.forEach(function(v, k) {
|
|
587
|
+
return _headers[k] = v;
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
;
|
|
591
|
+
if (status === 200) {
|
|
592
|
+
return response.text().then(function(_responseText) {
|
|
593
|
+
var result200 = null;
|
|
594
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
595
|
+
return result200;
|
|
596
|
+
});
|
|
597
|
+
} else if (status === 500) {
|
|
598
|
+
return response.text().then(function(_responseText) {
|
|
599
|
+
var result500 = null;
|
|
600
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
601
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
602
|
+
});
|
|
603
|
+
} else if (status !== 200 && status !== 204) {
|
|
604
|
+
return response.text().then(function(_responseText) {
|
|
605
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
return Promise.resolve(null);
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
/**
|
|
613
|
+
* @param body (optional)
|
|
614
|
+
* @return OK
|
|
615
|
+
*/ key: "placesPUT",
|
|
616
|
+
value: function placesPUT(body) {
|
|
617
|
+
var _this = this;
|
|
618
|
+
var url_ = this.baseUrl + "/api/places";
|
|
619
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
620
|
+
var content_ = JSON.stringify(body);
|
|
621
|
+
var options_ = {
|
|
622
|
+
body: content_,
|
|
623
|
+
method: "PUT",
|
|
624
|
+
headers: {
|
|
625
|
+
"Content-Type": "application/json",
|
|
626
|
+
"Accept": "application/json"
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
630
|
+
return _this.processPlacesPUT(_response);
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
key: "processPlacesPUT",
|
|
636
|
+
value: function processPlacesPUT(response) {
|
|
637
|
+
var _this = this;
|
|
638
|
+
var status = response.status;
|
|
639
|
+
var _headers = {};
|
|
640
|
+
if (response.headers && response.headers.forEach) {
|
|
641
|
+
response.headers.forEach(function(v, k) {
|
|
642
|
+
return _headers[k] = v;
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
;
|
|
646
|
+
if (status === 200) {
|
|
647
|
+
return response.text().then(function(_responseText) {
|
|
648
|
+
var result200 = null;
|
|
649
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
650
|
+
return result200;
|
|
651
|
+
});
|
|
652
|
+
} else if (status === 500) {
|
|
653
|
+
return response.text().then(function(_responseText) {
|
|
654
|
+
var result500 = null;
|
|
655
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
656
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
657
|
+
});
|
|
658
|
+
} else if (status !== 200 && status !== 204) {
|
|
659
|
+
return response.text().then(function(_responseText) {
|
|
660
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
return Promise.resolve(null);
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
/**
|
|
668
|
+
* @return OK
|
|
669
|
+
*/ key: "placesAll",
|
|
670
|
+
value: function placesAll() {
|
|
671
|
+
var _this = this;
|
|
672
|
+
var url_ = this.baseUrl + "/api/places";
|
|
673
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
674
|
+
var options_ = {
|
|
675
|
+
method: "GET",
|
|
676
|
+
headers: {
|
|
677
|
+
"Accept": "application/json"
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
681
|
+
return _this.processPlacesAll(_response);
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
key: "processPlacesAll",
|
|
687
|
+
value: function processPlacesAll(response) {
|
|
688
|
+
var _this = this;
|
|
689
|
+
var status = response.status;
|
|
690
|
+
var _headers = {};
|
|
691
|
+
if (response.headers && response.headers.forEach) {
|
|
692
|
+
response.headers.forEach(function(v, k) {
|
|
693
|
+
return _headers[k] = v;
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
;
|
|
697
|
+
if (status === 200) {
|
|
698
|
+
return response.text().then(function(_responseText) {
|
|
699
|
+
var result200 = null;
|
|
700
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
701
|
+
return result200;
|
|
702
|
+
});
|
|
703
|
+
} else if (status === 500) {
|
|
704
|
+
return response.text().then(function(_responseText) {
|
|
705
|
+
var result500 = null;
|
|
706
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
707
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
708
|
+
});
|
|
709
|
+
} else if (status !== 200 && status !== 204) {
|
|
710
|
+
return response.text().then(function(_responseText) {
|
|
711
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
return Promise.resolve(null);
|
|
715
|
+
}
|
|
716
|
+
},
|
|
717
|
+
{
|
|
718
|
+
/**
|
|
719
|
+
* @param body (optional)
|
|
720
|
+
* @return OK
|
|
721
|
+
*/ key: "plantsPOST",
|
|
722
|
+
value: function plantsPOST(body) {
|
|
723
|
+
var _this = this;
|
|
724
|
+
var url_ = this.baseUrl + "/api/plants";
|
|
725
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
726
|
+
var content_ = JSON.stringify(body);
|
|
727
|
+
var options_ = {
|
|
728
|
+
body: content_,
|
|
729
|
+
method: "POST",
|
|
730
|
+
headers: {
|
|
731
|
+
"Content-Type": "application/json",
|
|
732
|
+
"Accept": "application/json"
|
|
733
|
+
}
|
|
734
|
+
};
|
|
735
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
736
|
+
return _this.processPlantsPOST(_response);
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
key: "processPlantsPOST",
|
|
742
|
+
value: function processPlantsPOST(response) {
|
|
743
|
+
var _this = this;
|
|
744
|
+
var status = response.status;
|
|
745
|
+
var _headers = {};
|
|
746
|
+
if (response.headers && response.headers.forEach) {
|
|
747
|
+
response.headers.forEach(function(v, k) {
|
|
748
|
+
return _headers[k] = v;
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
;
|
|
752
|
+
if (status === 200) {
|
|
753
|
+
return response.text().then(function(_responseText) {
|
|
754
|
+
var result200 = null;
|
|
755
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
756
|
+
return result200;
|
|
757
|
+
});
|
|
758
|
+
} else if (status === 500) {
|
|
759
|
+
return response.text().then(function(_responseText) {
|
|
760
|
+
var result500 = null;
|
|
761
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
762
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
763
|
+
});
|
|
764
|
+
} else if (status !== 200 && status !== 204) {
|
|
765
|
+
return response.text().then(function(_responseText) {
|
|
766
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
return Promise.resolve(null);
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
/**
|
|
774
|
+
* @param id (optional)
|
|
775
|
+
* @return OK
|
|
776
|
+
*/ key: "plantsDELETE",
|
|
777
|
+
value: function plantsDELETE(id) {
|
|
778
|
+
var _this = this;
|
|
779
|
+
var url_ = this.baseUrl + "/api/plants?";
|
|
780
|
+
if (id === null) throw new globalThis.Error("The parameter 'id' cannot be null.");
|
|
781
|
+
else if (id !== void 0) url_ += "id=" + encodeURIComponent("" + id) + "&";
|
|
782
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
783
|
+
var options_ = {
|
|
784
|
+
method: "DELETE",
|
|
785
|
+
headers: {
|
|
786
|
+
"Accept": "application/json"
|
|
787
|
+
}
|
|
788
|
+
};
|
|
789
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
790
|
+
return _this.processPlantsDELETE(_response);
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
key: "processPlantsDELETE",
|
|
796
|
+
value: function processPlantsDELETE(response) {
|
|
797
|
+
var _this = this;
|
|
798
|
+
var status = response.status;
|
|
799
|
+
var _headers = {};
|
|
800
|
+
if (response.headers && response.headers.forEach) {
|
|
801
|
+
response.headers.forEach(function(v, k) {
|
|
802
|
+
return _headers[k] = v;
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
;
|
|
806
|
+
if (status === 200) {
|
|
807
|
+
return response.text().then(function(_responseText) {
|
|
808
|
+
var result200 = null;
|
|
809
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
810
|
+
return result200;
|
|
811
|
+
});
|
|
812
|
+
} else if (status === 500) {
|
|
813
|
+
return response.text().then(function(_responseText) {
|
|
814
|
+
var result500 = null;
|
|
815
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
816
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
817
|
+
});
|
|
818
|
+
} else if (status !== 200 && status !== 204) {
|
|
819
|
+
return response.text().then(function(_responseText) {
|
|
820
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
return Promise.resolve(null);
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
/**
|
|
828
|
+
* @param body (optional)
|
|
829
|
+
* @return OK
|
|
830
|
+
*/ key: "plantsPUT",
|
|
831
|
+
value: function plantsPUT(body) {
|
|
832
|
+
var _this = this;
|
|
833
|
+
var url_ = this.baseUrl + "/api/plants";
|
|
834
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
835
|
+
var content_ = JSON.stringify(body);
|
|
836
|
+
var options_ = {
|
|
837
|
+
body: content_,
|
|
838
|
+
method: "PUT",
|
|
839
|
+
headers: {
|
|
840
|
+
"Content-Type": "application/json",
|
|
841
|
+
"Accept": "application/json"
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
845
|
+
return _this.processPlantsPUT(_response);
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
key: "processPlantsPUT",
|
|
851
|
+
value: function processPlantsPUT(response) {
|
|
852
|
+
var _this = this;
|
|
853
|
+
var status = response.status;
|
|
854
|
+
var _headers = {};
|
|
855
|
+
if (response.headers && response.headers.forEach) {
|
|
856
|
+
response.headers.forEach(function(v, k) {
|
|
857
|
+
return _headers[k] = v;
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
;
|
|
861
|
+
if (status === 200) {
|
|
862
|
+
return response.text().then(function(_responseText) {
|
|
863
|
+
var result200 = null;
|
|
864
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
865
|
+
return result200;
|
|
866
|
+
});
|
|
867
|
+
} else if (status === 500) {
|
|
868
|
+
return response.text().then(function(_responseText) {
|
|
869
|
+
var result500 = null;
|
|
870
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
871
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
872
|
+
});
|
|
873
|
+
} else if (status !== 200 && status !== 204) {
|
|
874
|
+
return response.text().then(function(_responseText) {
|
|
875
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
return Promise.resolve(null);
|
|
879
|
+
}
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
/**
|
|
883
|
+
* @return OK
|
|
884
|
+
*/ key: "plantsAll",
|
|
885
|
+
value: function plantsAll() {
|
|
886
|
+
var _this = this;
|
|
887
|
+
var url_ = this.baseUrl + "/api/plants";
|
|
888
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
889
|
+
var options_ = {
|
|
890
|
+
method: "GET",
|
|
891
|
+
headers: {
|
|
892
|
+
"Accept": "application/json"
|
|
893
|
+
}
|
|
894
|
+
};
|
|
895
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
896
|
+
return _this.processPlantsAll(_response);
|
|
897
|
+
});
|
|
898
|
+
}
|
|
899
|
+
},
|
|
900
|
+
{
|
|
901
|
+
key: "processPlantsAll",
|
|
902
|
+
value: function processPlantsAll(response) {
|
|
903
|
+
var _this = this;
|
|
904
|
+
var status = response.status;
|
|
905
|
+
var _headers = {};
|
|
906
|
+
if (response.headers && response.headers.forEach) {
|
|
907
|
+
response.headers.forEach(function(v, k) {
|
|
908
|
+
return _headers[k] = v;
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
;
|
|
912
|
+
if (status === 200) {
|
|
913
|
+
return response.text().then(function(_responseText) {
|
|
914
|
+
var result200 = null;
|
|
915
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
916
|
+
return result200;
|
|
917
|
+
});
|
|
918
|
+
} else if (status === 500) {
|
|
919
|
+
return response.text().then(function(_responseText) {
|
|
920
|
+
var result500 = null;
|
|
921
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
922
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
923
|
+
});
|
|
924
|
+
} else if (status !== 200 && status !== 204) {
|
|
925
|
+
return response.text().then(function(_responseText) {
|
|
926
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
927
|
+
});
|
|
928
|
+
}
|
|
929
|
+
return Promise.resolve(null);
|
|
930
|
+
}
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
/**
|
|
934
|
+
* @return OK
|
|
935
|
+
*/ key: "anonymous",
|
|
936
|
+
value: function anonymous(id) {
|
|
937
|
+
var _this = this;
|
|
938
|
+
var url_ = this.baseUrl + "/{id}";
|
|
939
|
+
if (id === void 0 || id === null) throw new globalThis.Error("The parameter 'id' must be defined.");
|
|
940
|
+
url_ = url_.replace("{id}", encodeURIComponent("" + id));
|
|
941
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
942
|
+
var options_ = {
|
|
943
|
+
method: "GET",
|
|
944
|
+
headers: {
|
|
945
|
+
"Accept": "application/json"
|
|
946
|
+
}
|
|
947
|
+
};
|
|
948
|
+
return this.http.fetch(url_, options_).then(function(_response) {
|
|
949
|
+
return _this.processAnonymous(_response);
|
|
950
|
+
});
|
|
951
|
+
}
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
key: "processAnonymous",
|
|
955
|
+
value: function processAnonymous(response) {
|
|
956
|
+
var _this = this;
|
|
957
|
+
var status = response.status;
|
|
958
|
+
var _headers = {};
|
|
959
|
+
if (response.headers && response.headers.forEach) {
|
|
960
|
+
response.headers.forEach(function(v, k) {
|
|
961
|
+
return _headers[k] = v;
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
;
|
|
965
|
+
if (status === 200) {
|
|
966
|
+
return response.text().then(function(_responseText) {
|
|
967
|
+
var result200 = null;
|
|
968
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
969
|
+
return result200;
|
|
970
|
+
});
|
|
971
|
+
} else if (status === 500) {
|
|
972
|
+
return response.text().then(function(_responseText) {
|
|
973
|
+
var result500 = null;
|
|
974
|
+
result500 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
|
|
975
|
+
return throwException("Internal Server Error", status, _responseText, _headers, result500);
|
|
976
|
+
});
|
|
977
|
+
} else if (status !== 200 && status !== 204) {
|
|
978
|
+
return response.text().then(function(_responseText) {
|
|
979
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
return Promise.resolve(null);
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
]);
|
|
986
|
+
return Client;
|
|
987
|
+
}();
|
|
988
|
+
var CallingConventions = /* @__PURE__ */ function(CallingConventions2) {
|
|
989
|
+
CallingConventions2[CallingConventions2["_1"] = 1] = "_1";
|
|
990
|
+
CallingConventions2[CallingConventions2["_2"] = 2] = "_2";
|
|
991
|
+
CallingConventions2[CallingConventions2["_3"] = 3] = "_3";
|
|
992
|
+
CallingConventions2[CallingConventions2["_32"] = 32] = "_32";
|
|
993
|
+
CallingConventions2[CallingConventions2["_64"] = 64] = "_64";
|
|
994
|
+
return CallingConventions2;
|
|
995
|
+
}(CallingConventions || {});
|
|
996
|
+
var EventAttributes = /* @__PURE__ */ function(EventAttributes2) {
|
|
997
|
+
EventAttributes2[EventAttributes2["_0"] = 0] = "_0";
|
|
998
|
+
EventAttributes2[EventAttributes2["_512"] = 512] = "_512";
|
|
999
|
+
EventAttributes2[EventAttributes2["_1024"] = 1024] = "_1024";
|
|
1000
|
+
return EventAttributes2;
|
|
1001
|
+
}(EventAttributes || {});
|
|
1002
|
+
var FieldAttributes = /* @__PURE__ */ function(FieldAttributes2) {
|
|
1003
|
+
FieldAttributes2[FieldAttributes2["_0"] = 0] = "_0";
|
|
1004
|
+
FieldAttributes2[FieldAttributes2["_1"] = 1] = "_1";
|
|
1005
|
+
FieldAttributes2[FieldAttributes2["_2"] = 2] = "_2";
|
|
1006
|
+
FieldAttributes2[FieldAttributes2["_3"] = 3] = "_3";
|
|
1007
|
+
FieldAttributes2[FieldAttributes2["_4"] = 4] = "_4";
|
|
1008
|
+
FieldAttributes2[FieldAttributes2["_5"] = 5] = "_5";
|
|
1009
|
+
FieldAttributes2[FieldAttributes2["_6"] = 6] = "_6";
|
|
1010
|
+
FieldAttributes2[FieldAttributes2["_7"] = 7] = "_7";
|
|
1011
|
+
FieldAttributes2[FieldAttributes2["_16"] = 16] = "_16";
|
|
1012
|
+
FieldAttributes2[FieldAttributes2["_32"] = 32] = "_32";
|
|
1013
|
+
FieldAttributes2[FieldAttributes2["_64"] = 64] = "_64";
|
|
1014
|
+
FieldAttributes2[FieldAttributes2["_128"] = 128] = "_128";
|
|
1015
|
+
FieldAttributes2[FieldAttributes2["_256"] = 256] = "_256";
|
|
1016
|
+
FieldAttributes2[FieldAttributes2["_512"] = 512] = "_512";
|
|
1017
|
+
FieldAttributes2[FieldAttributes2["_1024"] = 1024] = "_1024";
|
|
1018
|
+
FieldAttributes2[FieldAttributes2["_4096"] = 4096] = "_4096";
|
|
1019
|
+
FieldAttributes2[FieldAttributes2["_8192"] = 8192] = "_8192";
|
|
1020
|
+
FieldAttributes2[FieldAttributes2["_32768"] = 32768] = "_32768";
|
|
1021
|
+
FieldAttributes2[FieldAttributes2["_38144"] = 38144] = "_38144";
|
|
1022
|
+
return FieldAttributes2;
|
|
1023
|
+
}(FieldAttributes || {});
|
|
1024
|
+
var GenericParameterAttributes = /* @__PURE__ */ function(GenericParameterAttributes2) {
|
|
1025
|
+
GenericParameterAttributes2[GenericParameterAttributes2["_0"] = 0] = "_0";
|
|
1026
|
+
GenericParameterAttributes2[GenericParameterAttributes2["_1"] = 1] = "_1";
|
|
1027
|
+
GenericParameterAttributes2[GenericParameterAttributes2["_2"] = 2] = "_2";
|
|
1028
|
+
GenericParameterAttributes2[GenericParameterAttributes2["_3"] = 3] = "_3";
|
|
1029
|
+
GenericParameterAttributes2[GenericParameterAttributes2["_4"] = 4] = "_4";
|
|
1030
|
+
GenericParameterAttributes2[GenericParameterAttributes2["_8"] = 8] = "_8";
|
|
1031
|
+
GenericParameterAttributes2[GenericParameterAttributes2["_16"] = 16] = "_16";
|
|
1032
|
+
GenericParameterAttributes2[GenericParameterAttributes2["_28"] = 28] = "_28";
|
|
1033
|
+
return GenericParameterAttributes2;
|
|
1034
|
+
}(GenericParameterAttributes || {});
|
|
1035
|
+
var LayoutKind = /* @__PURE__ */ function(LayoutKind2) {
|
|
1036
|
+
LayoutKind2[LayoutKind2["_0"] = 0] = "_0";
|
|
1037
|
+
LayoutKind2[LayoutKind2["_2"] = 2] = "_2";
|
|
1038
|
+
LayoutKind2[LayoutKind2["_3"] = 3] = "_3";
|
|
1039
|
+
return LayoutKind2;
|
|
1040
|
+
}(LayoutKind || {});
|
|
1041
|
+
var MemberTypes = /* @__PURE__ */ function(MemberTypes2) {
|
|
1042
|
+
MemberTypes2[MemberTypes2["_1"] = 1] = "_1";
|
|
1043
|
+
MemberTypes2[MemberTypes2["_2"] = 2] = "_2";
|
|
1044
|
+
MemberTypes2[MemberTypes2["_4"] = 4] = "_4";
|
|
1045
|
+
MemberTypes2[MemberTypes2["_8"] = 8] = "_8";
|
|
1046
|
+
MemberTypes2[MemberTypes2["_16"] = 16] = "_16";
|
|
1047
|
+
MemberTypes2[MemberTypes2["_32"] = 32] = "_32";
|
|
1048
|
+
MemberTypes2[MemberTypes2["_64"] = 64] = "_64";
|
|
1049
|
+
MemberTypes2[MemberTypes2["_128"] = 128] = "_128";
|
|
1050
|
+
MemberTypes2[MemberTypes2["_191"] = 191] = "_191";
|
|
1051
|
+
return MemberTypes2;
|
|
1052
|
+
}(MemberTypes || {});
|
|
1053
|
+
var MethodAttributes = /* @__PURE__ */ function(MethodAttributes2) {
|
|
1054
|
+
MethodAttributes2[MethodAttributes2["_0"] = 0] = "_0";
|
|
1055
|
+
MethodAttributes2[MethodAttributes2["_1"] = 1] = "_1";
|
|
1056
|
+
MethodAttributes2[MethodAttributes2["_2"] = 2] = "_2";
|
|
1057
|
+
MethodAttributes2[MethodAttributes2["_3"] = 3] = "_3";
|
|
1058
|
+
MethodAttributes2[MethodAttributes2["_4"] = 4] = "_4";
|
|
1059
|
+
MethodAttributes2[MethodAttributes2["_5"] = 5] = "_5";
|
|
1060
|
+
MethodAttributes2[MethodAttributes2["_6"] = 6] = "_6";
|
|
1061
|
+
MethodAttributes2[MethodAttributes2["_7"] = 7] = "_7";
|
|
1062
|
+
MethodAttributes2[MethodAttributes2["_8"] = 8] = "_8";
|
|
1063
|
+
MethodAttributes2[MethodAttributes2["_16"] = 16] = "_16";
|
|
1064
|
+
MethodAttributes2[MethodAttributes2["_32"] = 32] = "_32";
|
|
1065
|
+
MethodAttributes2[MethodAttributes2["_64"] = 64] = "_64";
|
|
1066
|
+
MethodAttributes2[MethodAttributes2["_128"] = 128] = "_128";
|
|
1067
|
+
MethodAttributes2[MethodAttributes2["_256"] = 256] = "_256";
|
|
1068
|
+
MethodAttributes2[MethodAttributes2["_512"] = 512] = "_512";
|
|
1069
|
+
MethodAttributes2[MethodAttributes2["_1024"] = 1024] = "_1024";
|
|
1070
|
+
MethodAttributes2[MethodAttributes2["_2048"] = 2048] = "_2048";
|
|
1071
|
+
MethodAttributes2[MethodAttributes2["_4096"] = 4096] = "_4096";
|
|
1072
|
+
MethodAttributes2[MethodAttributes2["_8192"] = 8192] = "_8192";
|
|
1073
|
+
MethodAttributes2[MethodAttributes2["_16384"] = 16384] = "_16384";
|
|
1074
|
+
MethodAttributes2[MethodAttributes2["_32768"] = 32768] = "_32768";
|
|
1075
|
+
MethodAttributes2[MethodAttributes2["_53248"] = 53248] = "_53248";
|
|
1076
|
+
return MethodAttributes2;
|
|
1077
|
+
}(MethodAttributes || {});
|
|
1078
|
+
var MethodImplAttributes = /* @__PURE__ */ function(MethodImplAttributes2) {
|
|
1079
|
+
MethodImplAttributes2[MethodImplAttributes2["_0"] = 0] = "_0";
|
|
1080
|
+
MethodImplAttributes2[MethodImplAttributes2["_1"] = 1] = "_1";
|
|
1081
|
+
MethodImplAttributes2[MethodImplAttributes2["_2"] = 2] = "_2";
|
|
1082
|
+
MethodImplAttributes2[MethodImplAttributes2["_3"] = 3] = "_3";
|
|
1083
|
+
MethodImplAttributes2[MethodImplAttributes2["_4"] = 4] = "_4";
|
|
1084
|
+
MethodImplAttributes2[MethodImplAttributes2["_8"] = 8] = "_8";
|
|
1085
|
+
MethodImplAttributes2[MethodImplAttributes2["_16"] = 16] = "_16";
|
|
1086
|
+
MethodImplAttributes2[MethodImplAttributes2["_32"] = 32] = "_32";
|
|
1087
|
+
MethodImplAttributes2[MethodImplAttributes2["_64"] = 64] = "_64";
|
|
1088
|
+
MethodImplAttributes2[MethodImplAttributes2["_128"] = 128] = "_128";
|
|
1089
|
+
MethodImplAttributes2[MethodImplAttributes2["_256"] = 256] = "_256";
|
|
1090
|
+
MethodImplAttributes2[MethodImplAttributes2["_512"] = 512] = "_512";
|
|
1091
|
+
MethodImplAttributes2[MethodImplAttributes2["_4096"] = 4096] = "_4096";
|
|
1092
|
+
MethodImplAttributes2[MethodImplAttributes2["_65535"] = 65535] = "_65535";
|
|
1093
|
+
return MethodImplAttributes2;
|
|
1094
|
+
}(MethodImplAttributes || {});
|
|
1095
|
+
var ParameterAttributes = /* @__PURE__ */ function(ParameterAttributes2) {
|
|
1096
|
+
ParameterAttributes2[ParameterAttributes2["_0"] = 0] = "_0";
|
|
1097
|
+
ParameterAttributes2[ParameterAttributes2["_1"] = 1] = "_1";
|
|
1098
|
+
ParameterAttributes2[ParameterAttributes2["_2"] = 2] = "_2";
|
|
1099
|
+
ParameterAttributes2[ParameterAttributes2["_4"] = 4] = "_4";
|
|
1100
|
+
ParameterAttributes2[ParameterAttributes2["_8"] = 8] = "_8";
|
|
1101
|
+
ParameterAttributes2[ParameterAttributes2["_16"] = 16] = "_16";
|
|
1102
|
+
ParameterAttributes2[ParameterAttributes2["_4096"] = 4096] = "_4096";
|
|
1103
|
+
ParameterAttributes2[ParameterAttributes2["_8192"] = 8192] = "_8192";
|
|
1104
|
+
ParameterAttributes2[ParameterAttributes2["_16384"] = 16384] = "_16384";
|
|
1105
|
+
ParameterAttributes2[ParameterAttributes2["_32768"] = 32768] = "_32768";
|
|
1106
|
+
ParameterAttributes2[ParameterAttributes2["_61440"] = 61440] = "_61440";
|
|
1107
|
+
return ParameterAttributes2;
|
|
1108
|
+
}(ParameterAttributes || {});
|
|
1109
|
+
var PlantType = /* @__PURE__ */ function(PlantType2) {
|
|
1110
|
+
PlantType2[PlantType2["_0"] = 0] = "_0";
|
|
1111
|
+
PlantType2[PlantType2["_1"] = 1] = "_1";
|
|
1112
|
+
PlantType2[PlantType2["_2"] = 2] = "_2";
|
|
1113
|
+
return PlantType2;
|
|
1114
|
+
}(PlantType || {});
|
|
1115
|
+
var PropertyAttributes = /* @__PURE__ */ function(PropertyAttributes2) {
|
|
1116
|
+
PropertyAttributes2[PropertyAttributes2["_0"] = 0] = "_0";
|
|
1117
|
+
PropertyAttributes2[PropertyAttributes2["_512"] = 512] = "_512";
|
|
1118
|
+
PropertyAttributes2[PropertyAttributes2["_1024"] = 1024] = "_1024";
|
|
1119
|
+
PropertyAttributes2[PropertyAttributes2["_4096"] = 4096] = "_4096";
|
|
1120
|
+
PropertyAttributes2[PropertyAttributes2["_8192"] = 8192] = "_8192";
|
|
1121
|
+
PropertyAttributes2[PropertyAttributes2["_16384"] = 16384] = "_16384";
|
|
1122
|
+
PropertyAttributes2[PropertyAttributes2["_32768"] = 32768] = "_32768";
|
|
1123
|
+
PropertyAttributes2[PropertyAttributes2["_62464"] = 62464] = "_62464";
|
|
1124
|
+
return PropertyAttributes2;
|
|
1125
|
+
}(PropertyAttributes || {});
|
|
1126
|
+
var SecurityRuleSet = /* @__PURE__ */ function(SecurityRuleSet2) {
|
|
1127
|
+
SecurityRuleSet2[SecurityRuleSet2["_0"] = 0] = "_0";
|
|
1128
|
+
SecurityRuleSet2[SecurityRuleSet2["_1"] = 1] = "_1";
|
|
1129
|
+
SecurityRuleSet2[SecurityRuleSet2["_2"] = 2] = "_2";
|
|
1130
|
+
return SecurityRuleSet2;
|
|
1131
|
+
}(SecurityRuleSet || {});
|
|
1132
|
+
var TypeAttributes = /* @__PURE__ */ function(TypeAttributes2) {
|
|
1133
|
+
TypeAttributes2[TypeAttributes2["_0"] = 0] = "_0";
|
|
1134
|
+
TypeAttributes2[TypeAttributes2["_1"] = 1] = "_1";
|
|
1135
|
+
TypeAttributes2[TypeAttributes2["_2"] = 2] = "_2";
|
|
1136
|
+
TypeAttributes2[TypeAttributes2["_3"] = 3] = "_3";
|
|
1137
|
+
TypeAttributes2[TypeAttributes2["_4"] = 4] = "_4";
|
|
1138
|
+
TypeAttributes2[TypeAttributes2["_5"] = 5] = "_5";
|
|
1139
|
+
TypeAttributes2[TypeAttributes2["_6"] = 6] = "_6";
|
|
1140
|
+
TypeAttributes2[TypeAttributes2["_7"] = 7] = "_7";
|
|
1141
|
+
TypeAttributes2[TypeAttributes2["_8"] = 8] = "_8";
|
|
1142
|
+
TypeAttributes2[TypeAttributes2["_16"] = 16] = "_16";
|
|
1143
|
+
TypeAttributes2[TypeAttributes2["_24"] = 24] = "_24";
|
|
1144
|
+
TypeAttributes2[TypeAttributes2["_32"] = 32] = "_32";
|
|
1145
|
+
TypeAttributes2[TypeAttributes2["_128"] = 128] = "_128";
|
|
1146
|
+
TypeAttributes2[TypeAttributes2["_256"] = 256] = "_256";
|
|
1147
|
+
TypeAttributes2[TypeAttributes2["_1024"] = 1024] = "_1024";
|
|
1148
|
+
TypeAttributes2[TypeAttributes2["_2048"] = 2048] = "_2048";
|
|
1149
|
+
TypeAttributes2[TypeAttributes2["_4096"] = 4096] = "_4096";
|
|
1150
|
+
TypeAttributes2[TypeAttributes2["_8192"] = 8192] = "_8192";
|
|
1151
|
+
TypeAttributes2[TypeAttributes2["_16384"] = 16384] = "_16384";
|
|
1152
|
+
TypeAttributes2[TypeAttributes2["_65536"] = 65536] = "_65536";
|
|
1153
|
+
TypeAttributes2[TypeAttributes2["_131072"] = 131072] = "_131072";
|
|
1154
|
+
TypeAttributes2[TypeAttributes2["_196608"] = 196608] = "_196608";
|
|
1155
|
+
TypeAttributes2[TypeAttributes2["_262144"] = 262144] = "_262144";
|
|
1156
|
+
TypeAttributes2[TypeAttributes2["_264192"] = 264192] = "_264192";
|
|
1157
|
+
TypeAttributes2[TypeAttributes2["_1048576"] = 1048576] = "_1048576";
|
|
1158
|
+
TypeAttributes2[TypeAttributes2["_12582912"] = 12582912] = "_12582912";
|
|
1159
|
+
return TypeAttributes2;
|
|
1160
|
+
}(TypeAttributes || {});
|
|
1161
|
+
var ApiException = /*#__PURE__*/ function(Error1) {
|
|
1162
|
+
_inherits(ApiException, Error1);
|
|
1163
|
+
function ApiException(message, status, response, headers, result) {
|
|
1164
|
+
_class_call_check(this, ApiException);
|
|
1165
|
+
var _this;
|
|
1166
|
+
_this = _call_super(this, ApiException);
|
|
1167
|
+
_this.isApiException = true;
|
|
1168
|
+
_this.message = message;
|
|
1169
|
+
_this.status = status;
|
|
1170
|
+
_this.response = response;
|
|
1171
|
+
_this.headers = headers;
|
|
1172
|
+
_this.result = result;
|
|
1173
|
+
return _this;
|
|
1174
|
+
}
|
|
1175
|
+
_create_class(ApiException, null, [
|
|
1176
|
+
{
|
|
1177
|
+
key: "isApiException",
|
|
1178
|
+
value: function isApiException(obj) {
|
|
1179
|
+
return obj.isApiException === true;
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
]);
|
|
1183
|
+
return ApiException;
|
|
1184
|
+
}(_wrap_native_super(Error));
|
|
1185
|
+
function throwException(message, status, response, headers, result) {
|
|
1186
|
+
if (result !== null && result !== void 0) throw result;
|
|
1187
|
+
else throw new ApiException(message, status, response, headers, null);
|
|
1188
|
+
}
|
|
1189
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1190
|
+
0 && (module.exports = {
|
|
1191
|
+
ApiException: ApiException,
|
|
1192
|
+
CallingConventions: CallingConventions,
|
|
1193
|
+
Client: Client,
|
|
1194
|
+
EventAttributes: EventAttributes,
|
|
1195
|
+
FieldAttributes: FieldAttributes,
|
|
1196
|
+
GenericParameterAttributes: GenericParameterAttributes,
|
|
1197
|
+
LayoutKind: LayoutKind,
|
|
1198
|
+
MemberTypes: MemberTypes,
|
|
1199
|
+
MethodAttributes: MethodAttributes,
|
|
1200
|
+
MethodImplAttributes: MethodImplAttributes,
|
|
1201
|
+
ParameterAttributes: ParameterAttributes,
|
|
1202
|
+
PlantType: PlantType,
|
|
1203
|
+
PropertyAttributes: PropertyAttributes,
|
|
1204
|
+
SecurityRuleSet: SecurityRuleSet,
|
|
1205
|
+
TypeAttributes: TypeAttributes
|
|
1206
|
+
});
|