@universalis-ffxiv/universalis-client 0.1.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/v3.js ADDED
@@ -0,0 +1,768 @@
1
+ "use strict";
2
+ //----------------------
3
+ // <auto-generated>
4
+ // Generated using the NSwag toolchain v14.6.3.0 (NJsonSchema v11.5.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
5
+ // </auto-generated>
6
+ //----------------------
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.SwaggerException = exports.TimeZone = exports.Seller = exports.SalesPage = exports.Sale = exports.Retainer = exports.MarketOverview = exports.Listing = exports.Creator = exports.World = exports.DataCenter = exports.ProblemDetails = exports.Client = void 0;
9
+ class Client {
10
+ constructor(baseUrl, http) {
11
+ this.jsonParseReviver = undefined;
12
+ this.http = http ? http : window;
13
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
14
+ }
15
+ /**
16
+ * Returns all data centers supported by the API.
17
+ * @return Success
18
+ */
19
+ dataCenters() {
20
+ let url_ = this.baseUrl + "/api/v3/game/data-centers";
21
+ url_ = url_.replace(/[?&]$/, "");
22
+ let options_ = {
23
+ method: "GET",
24
+ headers: {
25
+ "Accept": "application/json"
26
+ }
27
+ };
28
+ return this.http.fetch(url_, options_).then((_response) => {
29
+ return this.processDataCenters(_response);
30
+ });
31
+ }
32
+ processDataCenters(response) {
33
+ const status = response.status;
34
+ let _headers = {};
35
+ if (response.headers && response.headers.forEach) {
36
+ response.headers.forEach((v, k) => _headers[k] = v);
37
+ }
38
+ ;
39
+ if (status === 200) {
40
+ return response.text().then((_responseText) => {
41
+ let result200 = null;
42
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
43
+ if (Array.isArray(resultData200)) {
44
+ result200 = [];
45
+ for (let item of resultData200)
46
+ result200.push(DataCenter.fromJS(item));
47
+ }
48
+ else {
49
+ result200 = null;
50
+ }
51
+ return result200;
52
+ });
53
+ }
54
+ else if (status !== 200 && status !== 204) {
55
+ return response.text().then((_responseText) => {
56
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
57
+ });
58
+ }
59
+ return Promise.resolve(null);
60
+ }
61
+ /**
62
+ * Returns all installed time zones.
63
+ * @return Success
64
+ */
65
+ timeZones() {
66
+ let url_ = this.baseUrl + "/api/v3/misc/time-zones";
67
+ url_ = url_.replace(/[?&]$/, "");
68
+ let options_ = {
69
+ method: "GET",
70
+ headers: {
71
+ "Accept": "application/json"
72
+ }
73
+ };
74
+ return this.http.fetch(url_, options_).then((_response) => {
75
+ return this.processTimeZones(_response);
76
+ });
77
+ }
78
+ processTimeZones(response) {
79
+ const status = response.status;
80
+ let _headers = {};
81
+ if (response.headers && response.headers.forEach) {
82
+ response.headers.forEach((v, k) => _headers[k] = v);
83
+ }
84
+ ;
85
+ if (status === 200) {
86
+ return response.text().then((_responseText) => {
87
+ let result200 = null;
88
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
89
+ if (Array.isArray(resultData200)) {
90
+ result200 = [];
91
+ for (let item of resultData200)
92
+ result200.push(TimeZone.fromJS(item));
93
+ }
94
+ else {
95
+ result200 = null;
96
+ }
97
+ return result200;
98
+ });
99
+ }
100
+ else if (status !== 200 && status !== 204) {
101
+ return response.text().then((_responseText) => {
102
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
103
+ });
104
+ }
105
+ return Promise.resolve(null);
106
+ }
107
+ /**
108
+ * Returns the IDs and names of all worlds supported by the API.
109
+ * @return Success
110
+ */
111
+ worlds() {
112
+ let url_ = this.baseUrl + "/api/v3/game/worlds";
113
+ url_ = url_.replace(/[?&]$/, "");
114
+ let options_ = {
115
+ method: "GET",
116
+ headers: {
117
+ "Accept": "application/json"
118
+ }
119
+ };
120
+ return this.http.fetch(url_, options_).then((_response) => {
121
+ return this.processWorlds(_response);
122
+ });
123
+ }
124
+ processWorlds(response) {
125
+ const status = response.status;
126
+ let _headers = {};
127
+ if (response.headers && response.headers.forEach) {
128
+ response.headers.forEach((v, k) => _headers[k] = v);
129
+ }
130
+ ;
131
+ if (status === 200) {
132
+ return response.text().then((_responseText) => {
133
+ let result200 = null;
134
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
135
+ if (Array.isArray(resultData200)) {
136
+ result200 = [];
137
+ for (let item of resultData200)
138
+ result200.push(World.fromJS(item));
139
+ }
140
+ else {
141
+ result200 = null;
142
+ }
143
+ return result200;
144
+ });
145
+ }
146
+ else if (status !== 200 && status !== 204) {
147
+ return response.text().then((_responseText) => {
148
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
149
+ });
150
+ }
151
+ return Promise.resolve(null);
152
+ }
153
+ /**
154
+ * Retrieves an overview of the current market data for the provided item and servers. This contains
155
+ the current listings and a limited number of sales.
156
+ * @param servers A comma-separated list of servers to search.
157
+ * @param itemId The ID of the item to look up.
158
+ * @return Data retrieved successfully.
159
+ */
160
+ overview(servers, itemId) {
161
+ let url_ = this.baseUrl + "/api/v3/market/overview/{servers}/{itemId}";
162
+ if (servers === undefined || servers === null)
163
+ throw new globalThis.Error("The parameter 'servers' must be defined.");
164
+ url_ = url_.replace("{servers}", encodeURIComponent("" + servers));
165
+ if (itemId === undefined || itemId === null)
166
+ throw new globalThis.Error("The parameter 'itemId' must be defined.");
167
+ url_ = url_.replace("{itemId}", encodeURIComponent("" + itemId));
168
+ url_ = url_.replace(/[?&]$/, "");
169
+ let options_ = {
170
+ method: "GET",
171
+ headers: {
172
+ "Accept": "application/json"
173
+ }
174
+ };
175
+ return this.http.fetch(url_, options_).then((_response) => {
176
+ return this.processOverview(_response);
177
+ });
178
+ }
179
+ processOverview(response) {
180
+ const status = response.status;
181
+ let _headers = {};
182
+ if (response.headers && response.headers.forEach) {
183
+ response.headers.forEach((v, k) => _headers[k] = v);
184
+ }
185
+ ;
186
+ if (status === 200) {
187
+ return response.text().then((_responseText) => {
188
+ let result200 = null;
189
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
190
+ result200 = MarketOverview.fromJS(resultData200);
191
+ return result200;
192
+ });
193
+ }
194
+ else if (status === 404) {
195
+ return response.text().then((_responseText) => {
196
+ let result404 = null;
197
+ let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
198
+ result404 = ProblemDetails.fromJS(resultData404);
199
+ return throwException("A world/DC or the item requested is invalid.", status, _responseText, _headers, result404);
200
+ });
201
+ }
202
+ else if (status !== 200 && status !== 204) {
203
+ return response.text().then((_responseText) => {
204
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
205
+ });
206
+ }
207
+ return Promise.resolve(null);
208
+ }
209
+ /**
210
+ * Retrieve the sales for the provided item on the requested servers.
211
+ * @param servers A comma-separated list of servers to search.
212
+ * @param itemId The ID of the item to look up.
213
+ * @param cursor (optional) A cursor into the desired page of sales.
214
+ * @return Data retrieved successfully.
215
+ */
216
+ sales(servers, itemId, cursor) {
217
+ let url_ = this.baseUrl + "/api/v3/market/sales/{servers}/{itemId}?";
218
+ if (servers === undefined || servers === null)
219
+ throw new globalThis.Error("The parameter 'servers' must be defined.");
220
+ url_ = url_.replace("{servers}", encodeURIComponent("" + servers));
221
+ if (itemId === undefined || itemId === null)
222
+ throw new globalThis.Error("The parameter 'itemId' must be defined.");
223
+ url_ = url_.replace("{itemId}", encodeURIComponent("" + itemId));
224
+ if (cursor === null)
225
+ throw new globalThis.Error("The parameter 'cursor' cannot be null.");
226
+ else if (cursor !== undefined)
227
+ url_ += "cursor=" + encodeURIComponent("" + cursor) + "&";
228
+ url_ = url_.replace(/[?&]$/, "");
229
+ let options_ = {
230
+ method: "GET",
231
+ headers: {
232
+ "Accept": "application/json"
233
+ }
234
+ };
235
+ return this.http.fetch(url_, options_).then((_response) => {
236
+ return this.processSales(_response);
237
+ });
238
+ }
239
+ processSales(response) {
240
+ const status = response.status;
241
+ let _headers = {};
242
+ if (response.headers && response.headers.forEach) {
243
+ response.headers.forEach((v, k) => _headers[k] = v);
244
+ }
245
+ ;
246
+ if (status === 200) {
247
+ return response.text().then((_responseText) => {
248
+ let result200 = null;
249
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
250
+ result200 = SalesPage.fromJS(resultData200);
251
+ return result200;
252
+ });
253
+ }
254
+ else if (status === 404) {
255
+ return response.text().then((_responseText) => {
256
+ let result404 = null;
257
+ let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
258
+ result404 = ProblemDetails.fromJS(resultData404);
259
+ return throwException("A world/DC or the item requested is invalid.", status, _responseText, _headers, result404);
260
+ });
261
+ }
262
+ else if (status !== 200 && status !== 204) {
263
+ return response.text().then((_responseText) => {
264
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
265
+ });
266
+ }
267
+ return Promise.resolve(null);
268
+ }
269
+ /**
270
+ * Returns the set of marketable item IDs.
271
+ * @return Success
272
+ */
273
+ marketableItems() {
274
+ let url_ = this.baseUrl + "/api/v3/game/marketable-items";
275
+ url_ = url_.replace(/[?&]$/, "");
276
+ let options_ = {
277
+ method: "GET",
278
+ headers: {
279
+ "Accept": "application/json"
280
+ }
281
+ };
282
+ return this.http.fetch(url_, options_).then((_response) => {
283
+ return this.processMarketableItems(_response);
284
+ });
285
+ }
286
+ processMarketableItems(response) {
287
+ const status = response.status;
288
+ let _headers = {};
289
+ if (response.headers && response.headers.forEach) {
290
+ response.headers.forEach((v, k) => _headers[k] = v);
291
+ }
292
+ ;
293
+ if (status === 200) {
294
+ return response.text().then((_responseText) => {
295
+ let result200 = null;
296
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
297
+ if (Array.isArray(resultData200)) {
298
+ result200 = [];
299
+ for (let item of resultData200)
300
+ result200.push(item);
301
+ }
302
+ else {
303
+ result200 = null;
304
+ }
305
+ return result200;
306
+ });
307
+ }
308
+ else if (status !== 200 && status !== 204) {
309
+ return response.text().then((_responseText) => {
310
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
311
+ });
312
+ }
313
+ return Promise.resolve(null);
314
+ }
315
+ }
316
+ exports.Client = Client;
317
+ class ProblemDetails {
318
+ constructor(data) {
319
+ if (data) {
320
+ for (var property in data) {
321
+ if (data.hasOwnProperty(property))
322
+ this[property] = data[property];
323
+ }
324
+ }
325
+ }
326
+ init(_data) {
327
+ if (_data) {
328
+ for (var property in _data) {
329
+ if (_data.hasOwnProperty(property))
330
+ this[property] = _data[property];
331
+ }
332
+ this.type = _data["type"];
333
+ this.title = _data["title"];
334
+ this.status = _data["status"];
335
+ this.detail = _data["detail"];
336
+ this.instance = _data["instance"];
337
+ }
338
+ }
339
+ static fromJS(data) {
340
+ data = typeof data === 'object' ? data : {};
341
+ let result = new ProblemDetails();
342
+ result.init(data);
343
+ return result;
344
+ }
345
+ toJSON(data) {
346
+ data = typeof data === 'object' ? data : {};
347
+ for (var property in this) {
348
+ if (this.hasOwnProperty(property))
349
+ data[property] = this[property];
350
+ }
351
+ data["type"] = this.type;
352
+ data["title"] = this.title;
353
+ data["status"] = this.status;
354
+ data["detail"] = this.detail;
355
+ data["instance"] = this.instance;
356
+ return data;
357
+ }
358
+ }
359
+ exports.ProblemDetails = ProblemDetails;
360
+ class DataCenter {
361
+ constructor(data) {
362
+ if (data) {
363
+ for (var property in data) {
364
+ if (data.hasOwnProperty(property))
365
+ this[property] = data[property];
366
+ }
367
+ }
368
+ }
369
+ init(_data) {
370
+ if (_data) {
371
+ this.name = _data["name"];
372
+ this.region = _data["region"];
373
+ if (Array.isArray(_data["worlds"])) {
374
+ this.worlds = [];
375
+ for (let item of _data["worlds"])
376
+ this.worlds.push(item);
377
+ }
378
+ }
379
+ }
380
+ static fromJS(data) {
381
+ data = typeof data === 'object' ? data : {};
382
+ let result = new DataCenter();
383
+ result.init(data);
384
+ return result;
385
+ }
386
+ toJSON(data) {
387
+ data = typeof data === 'object' ? data : {};
388
+ data["name"] = this.name;
389
+ data["region"] = this.region;
390
+ if (Array.isArray(this.worlds)) {
391
+ data["worlds"] = [];
392
+ for (let item of this.worlds)
393
+ data["worlds"].push(item);
394
+ }
395
+ return data;
396
+ }
397
+ }
398
+ exports.DataCenter = DataCenter;
399
+ class World {
400
+ constructor(data) {
401
+ if (data) {
402
+ for (var property in data) {
403
+ if (data.hasOwnProperty(property))
404
+ this[property] = data[property];
405
+ }
406
+ }
407
+ }
408
+ init(_data) {
409
+ if (_data) {
410
+ this.id = _data["id"];
411
+ this.name = _data["name"];
412
+ }
413
+ }
414
+ static fromJS(data) {
415
+ data = typeof data === 'object' ? data : {};
416
+ let result = new World();
417
+ result.init(data);
418
+ return result;
419
+ }
420
+ toJSON(data) {
421
+ data = typeof data === 'object' ? data : {};
422
+ data["id"] = this.id;
423
+ data["name"] = this.name;
424
+ return data;
425
+ }
426
+ }
427
+ exports.World = World;
428
+ class Creator {
429
+ constructor(data) {
430
+ if (data) {
431
+ for (var property in data) {
432
+ if (data.hasOwnProperty(property))
433
+ this[property] = data[property];
434
+ }
435
+ }
436
+ }
437
+ init(_data) {
438
+ if (_data) {
439
+ this.id = _data["id"];
440
+ this.name = _data["name"];
441
+ }
442
+ }
443
+ static fromJS(data) {
444
+ data = typeof data === 'object' ? data : {};
445
+ let result = new Creator();
446
+ result.init(data);
447
+ return result;
448
+ }
449
+ toJSON(data) {
450
+ data = typeof data === 'object' ? data : {};
451
+ data["id"] = this.id;
452
+ data["name"] = this.name;
453
+ return data;
454
+ }
455
+ }
456
+ exports.Creator = Creator;
457
+ class Listing {
458
+ constructor(data) {
459
+ if (data) {
460
+ for (var property in data) {
461
+ if (data.hasOwnProperty(property))
462
+ this[property] = data[property];
463
+ }
464
+ }
465
+ if (!data) {
466
+ this.creator = new Creator();
467
+ this.retainer = new Retainer();
468
+ this.seller = new Seller();
469
+ }
470
+ }
471
+ init(_data) {
472
+ if (_data) {
473
+ this.listingId = _data["listingId"];
474
+ this.world = _data["world"];
475
+ this.reviewedAt = _data["reviewedAt"];
476
+ this.price = _data["price"];
477
+ this.quantity = _data["quantity"];
478
+ this.total = _data["total"];
479
+ this.hq = _data["hq"];
480
+ this.dye = _data["dye"];
481
+ this.creator = _data["creator"] ? Creator.fromJS(_data["creator"]) : new Creator();
482
+ if (Array.isArray(_data["materia"])) {
483
+ this.materia = [];
484
+ for (let item of _data["materia"])
485
+ this.materia.push(item);
486
+ }
487
+ this.onMannequin = _data["onMannequin"];
488
+ this.retainer = _data["retainer"] ? Retainer.fromJS(_data["retainer"]) : new Retainer();
489
+ this.seller = _data["seller"] ? Seller.fromJS(_data["seller"]) : new Seller();
490
+ }
491
+ }
492
+ static fromJS(data) {
493
+ data = typeof data === 'object' ? data : {};
494
+ let result = new Listing();
495
+ result.init(data);
496
+ return result;
497
+ }
498
+ toJSON(data) {
499
+ data = typeof data === 'object' ? data : {};
500
+ data["listingId"] = this.listingId;
501
+ data["world"] = this.world;
502
+ data["reviewedAt"] = this.reviewedAt;
503
+ data["price"] = this.price;
504
+ data["quantity"] = this.quantity;
505
+ data["total"] = this.total;
506
+ data["hq"] = this.hq;
507
+ data["dye"] = this.dye;
508
+ data["creator"] = this.creator ? this.creator.toJSON() : undefined;
509
+ if (Array.isArray(this.materia)) {
510
+ data["materia"] = [];
511
+ for (let item of this.materia)
512
+ data["materia"].push(item);
513
+ }
514
+ data["onMannequin"] = this.onMannequin;
515
+ data["retainer"] = this.retainer ? this.retainer.toJSON() : undefined;
516
+ data["seller"] = this.seller ? this.seller.toJSON() : undefined;
517
+ return data;
518
+ }
519
+ }
520
+ exports.Listing = Listing;
521
+ class MarketOverview {
522
+ constructor(data) {
523
+ if (data) {
524
+ for (var property in data) {
525
+ if (data.hasOwnProperty(property))
526
+ this[property] = data[property];
527
+ }
528
+ }
529
+ }
530
+ init(_data) {
531
+ if (_data) {
532
+ this.item = _data["item"];
533
+ if (_data["updatedAt"]) {
534
+ this.updatedAt = {};
535
+ for (let key in _data["updatedAt"]) {
536
+ if (_data["updatedAt"].hasOwnProperty(key))
537
+ this.updatedAt[key] = _data["updatedAt"][key];
538
+ }
539
+ }
540
+ if (Array.isArray(_data["listings"])) {
541
+ this.listings = [];
542
+ for (let item of _data["listings"])
543
+ this.listings.push(Listing.fromJS(item));
544
+ }
545
+ if (Array.isArray(_data["sales"])) {
546
+ this.sales = [];
547
+ for (let item of _data["sales"])
548
+ this.sales.push(Sale.fromJS(item));
549
+ }
550
+ }
551
+ }
552
+ static fromJS(data) {
553
+ data = typeof data === 'object' ? data : {};
554
+ let result = new MarketOverview();
555
+ result.init(data);
556
+ return result;
557
+ }
558
+ toJSON(data) {
559
+ data = typeof data === 'object' ? data : {};
560
+ data["item"] = this.item;
561
+ if (this.updatedAt) {
562
+ data["updatedAt"] = {};
563
+ for (let key in this.updatedAt) {
564
+ if (this.updatedAt.hasOwnProperty(key))
565
+ data["updatedAt"][key] = this.updatedAt[key];
566
+ }
567
+ }
568
+ if (Array.isArray(this.listings)) {
569
+ data["listings"] = [];
570
+ for (let item of this.listings)
571
+ data["listings"].push(item ? item.toJSON() : undefined);
572
+ }
573
+ if (Array.isArray(this.sales)) {
574
+ data["sales"] = [];
575
+ for (let item of this.sales)
576
+ data["sales"].push(item ? item.toJSON() : undefined);
577
+ }
578
+ return data;
579
+ }
580
+ }
581
+ exports.MarketOverview = MarketOverview;
582
+ class Retainer {
583
+ constructor(data) {
584
+ if (data) {
585
+ for (var property in data) {
586
+ if (data.hasOwnProperty(property))
587
+ this[property] = data[property];
588
+ }
589
+ }
590
+ }
591
+ init(_data) {
592
+ if (_data) {
593
+ this.id = _data["id"];
594
+ this.name = _data["name"];
595
+ this.city = _data["city"];
596
+ }
597
+ }
598
+ static fromJS(data) {
599
+ data = typeof data === 'object' ? data : {};
600
+ let result = new Retainer();
601
+ result.init(data);
602
+ return result;
603
+ }
604
+ toJSON(data) {
605
+ data = typeof data === 'object' ? data : {};
606
+ data["id"] = this.id;
607
+ data["name"] = this.name;
608
+ data["city"] = this.city;
609
+ return data;
610
+ }
611
+ }
612
+ exports.Retainer = Retainer;
613
+ class Sale {
614
+ constructor(data) {
615
+ if (data) {
616
+ for (var property in data) {
617
+ if (data.hasOwnProperty(property))
618
+ this[property] = data[property];
619
+ }
620
+ }
621
+ }
622
+ init(_data) {
623
+ if (_data) {
624
+ this.world = _data["world"];
625
+ this.hq = _data["hq"];
626
+ this.price = _data["price"];
627
+ this.quantity = _data["quantity"];
628
+ this.saleTime = _data["saleTime"];
629
+ this.onMannequin = _data["onMannequin"];
630
+ this.buyer = _data["buyer"];
631
+ }
632
+ }
633
+ static fromJS(data) {
634
+ data = typeof data === 'object' ? data : {};
635
+ let result = new Sale();
636
+ result.init(data);
637
+ return result;
638
+ }
639
+ toJSON(data) {
640
+ data = typeof data === 'object' ? data : {};
641
+ data["world"] = this.world;
642
+ data["hq"] = this.hq;
643
+ data["price"] = this.price;
644
+ data["quantity"] = this.quantity;
645
+ data["saleTime"] = this.saleTime;
646
+ data["onMannequin"] = this.onMannequin;
647
+ data["buyer"] = this.buyer;
648
+ return data;
649
+ }
650
+ }
651
+ exports.Sale = Sale;
652
+ class SalesPage {
653
+ constructor(data) {
654
+ if (data) {
655
+ for (var property in data) {
656
+ if (data.hasOwnProperty(property))
657
+ this[property] = data[property];
658
+ }
659
+ }
660
+ }
661
+ init(_data) {
662
+ if (_data) {
663
+ if (Array.isArray(_data["sales"])) {
664
+ this.sales = [];
665
+ for (let item of _data["sales"])
666
+ this.sales.push(Sale.fromJS(item));
667
+ }
668
+ this.next = _data["next"];
669
+ }
670
+ }
671
+ static fromJS(data) {
672
+ data = typeof data === 'object' ? data : {};
673
+ let result = new SalesPage();
674
+ result.init(data);
675
+ return result;
676
+ }
677
+ toJSON(data) {
678
+ data = typeof data === 'object' ? data : {};
679
+ if (Array.isArray(this.sales)) {
680
+ data["sales"] = [];
681
+ for (let item of this.sales)
682
+ data["sales"].push(item ? item.toJSON() : undefined);
683
+ }
684
+ data["next"] = this.next;
685
+ return data;
686
+ }
687
+ }
688
+ exports.SalesPage = SalesPage;
689
+ class Seller {
690
+ constructor(data) {
691
+ if (data) {
692
+ for (var property in data) {
693
+ if (data.hasOwnProperty(property))
694
+ this[property] = data[property];
695
+ }
696
+ }
697
+ }
698
+ init(_data) {
699
+ if (_data) {
700
+ this.id = _data["id"];
701
+ }
702
+ }
703
+ static fromJS(data) {
704
+ data = typeof data === 'object' ? data : {};
705
+ let result = new Seller();
706
+ result.init(data);
707
+ return result;
708
+ }
709
+ toJSON(data) {
710
+ data = typeof data === 'object' ? data : {};
711
+ data["id"] = this.id;
712
+ return data;
713
+ }
714
+ }
715
+ exports.Seller = Seller;
716
+ class TimeZone {
717
+ constructor(data) {
718
+ if (data) {
719
+ for (var property in data) {
720
+ if (data.hasOwnProperty(property))
721
+ this[property] = data[property];
722
+ }
723
+ }
724
+ }
725
+ init(_data) {
726
+ if (_data) {
727
+ this.id = _data["id"];
728
+ this.offset = _data["offset"];
729
+ this.name = _data["name"];
730
+ }
731
+ }
732
+ static fromJS(data) {
733
+ data = typeof data === 'object' ? data : {};
734
+ let result = new TimeZone();
735
+ result.init(data);
736
+ return result;
737
+ }
738
+ toJSON(data) {
739
+ data = typeof data === 'object' ? data : {};
740
+ data["id"] = this.id;
741
+ data["offset"] = this.offset;
742
+ data["name"] = this.name;
743
+ return data;
744
+ }
745
+ }
746
+ exports.TimeZone = TimeZone;
747
+ class SwaggerException extends Error {
748
+ constructor(message, status, response, headers, result) {
749
+ super();
750
+ this.isSwaggerException = true;
751
+ this.message = message;
752
+ this.status = status;
753
+ this.response = response;
754
+ this.headers = headers;
755
+ this.result = result;
756
+ }
757
+ static isSwaggerException(obj) {
758
+ return obj.isSwaggerException === true;
759
+ }
760
+ }
761
+ exports.SwaggerException = SwaggerException;
762
+ function throwException(message, status, response, headers, result) {
763
+ if (result !== null && result !== undefined)
764
+ throw result;
765
+ else
766
+ throw new SwaggerException(message, status, response, headers, null);
767
+ }
768
+ //# sourceMappingURL=v3.js.map