bnstooltips 1.12.1 → 1.13.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 (39) hide show
  1. package/build/ItemImproveSelectStageTooltip/ItemImproveSelectStageTooltip.types.d.ts +1 -1
  2. package/build/ItemImproveSelectStageTooltipWrapper/ItemImproveSelectStageTooltipWrapper.types.d.ts +1 -1
  3. package/build/ItemImproveTooltip/ItemImproveTooltip.types.d.ts +1 -1
  4. package/build/ItemImproveTooltip/SubComponents/ItemImproveUpgradeCost.d.ts +1 -1
  5. package/build/ItemImproveTooltip/SubComponents/ItemWithText.d.ts +1 -1
  6. package/build/ItemImproveTooltip/SubComponents/MainCostSelector.d.ts +1 -1
  7. package/build/ItemImproveTooltip/SubComponents/PrevCurNext.d.ts +1 -1
  8. package/build/ItemImproveTooltip/SubComponents/SubCosts.d.ts +1 -1
  9. package/build/ItemImproveTooltipWrapper/ItemImproveTooltipWrapper.types.d.ts +1 -1
  10. package/build/ItemTooltip/ItemTooltip.types.d.ts +1 -1
  11. package/build/ItemTooltip/SubComponents/AccountTransfer.d.ts +1 -1
  12. package/build/ItemTooltip/SubComponents/DecomposeResults.d.ts +1 -1
  13. package/build/ItemTooltip/SubComponents/EtchingStones.d.ts +1 -1
  14. package/build/ItemTooltip/SubComponents/GearScore.d.ts +2 -2
  15. package/build/ItemTooltip/SubComponents/ItemCooldowns.d.ts +2 -2
  16. package/build/ItemTooltip/SubComponents/ItemIconNameDiv.d.ts +1 -1
  17. package/build/ItemTooltip/SubComponents/ItemMainInfo.d.ts +2 -2
  18. package/build/ItemTooltip/SubComponents/ItemRandomStats.d.ts +2 -2
  19. package/build/ItemTooltip/SubComponents/ItemSkillDescriptions.d.ts +1 -1
  20. package/build/ItemTooltip/SubComponents/ItemSkillTitles.d.ts +1 -1
  21. package/build/ItemTooltip/SubComponents/ItemStats.d.ts +2 -2
  22. package/build/ItemTooltip/SubComponents/ItemSubInfo.d.ts +2 -2
  23. package/build/ItemTooltip/SubComponents/SealingResult.d.ts +1 -1
  24. package/build/ItemTooltip/SubComponents/SetBonus.d.ts +1 -1
  25. package/build/ItemTooltip/SubComponents/SetBonusItems.d.ts +2 -2
  26. package/build/ItemTooltip/SubComponents/SkillModifierGroup.d.ts +1 -1
  27. package/build/ItemTooltip/SubComponents/SkillModifiers.d.ts +1 -1
  28. package/build/ItemTooltip/SubComponents/TopText.d.ts +2 -2
  29. package/build/ItemTooltipWrapper/ItemTooltipWrapper.types.d.ts +1 -1
  30. package/build/NpcTooltip/SubComponents/StoreItemBuyPriceEntry.d.ts +1 -1
  31. package/build/Utilities/INpc.d.ts +1 -1
  32. package/build/Utilities/ItemDownloadClient.d.ts +9 -10
  33. package/build/index.es.js +2099 -975
  34. package/build/index.es.js.map +1 -1
  35. package/build/index.js +2099 -995
  36. package/build/index.js.map +1 -1
  37. package/build/itemapiclient/BnsItemApiClientBase.d.ts +3 -0
  38. package/build/itemapiclient/ItemApiClient.d.ts +591 -0
  39. package/package.json +1 -1
package/build/index.es.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import React, { useState, cloneElement, forwardRef as forwardRef$1, useLayoutEffect, useEffect, useRef } from 'react';
2
- import * as url from 'url';
3
- import * as isomorphicFetch from 'isomorphic-fetch';
4
2
  import { createPortal } from 'react-dom';
5
3
 
6
4
  function styleInject(css, ref) {
@@ -306,1055 +304,2187 @@ function getMoneyObj(money) {
306
304
  };
307
305
  }
308
306
 
309
- /// <reference path="./custom.d.ts" />
310
- var BASE_PATH = "/".replace(/\/+$/, "");
311
- /**
312
- *
313
- * @export
314
- * @class BaseAPI
315
- */
316
- var BaseAPI = /** @class */ (function () {
317
- function BaseAPI(configuration, basePath, fetch) {
318
- if (basePath === void 0) { basePath = BASE_PATH; }
319
- if (fetch === void 0) { fetch = isomorphicFetch; }
320
- this.basePath = basePath;
321
- this.fetch = fetch;
322
- if (configuration) {
323
- this.configuration = configuration;
324
- this.basePath = configuration.basePath || this.basePath;
325
- }
307
+ var BnsItemApiClientBase = /** @class */ (function () {
308
+ function BnsItemApiClientBase() {
326
309
  }
327
- return BaseAPI;
328
- }());
329
- /**
330
- *
331
- * @export
332
- * @class RequiredError
333
- * @extends {Error}
334
- */
335
- var RequiredError = /** @class */ (function (_super) {
336
- __extends(RequiredError, _super);
337
- function RequiredError(field, msg) {
338
- var _this = _super.call(this, msg) || this;
339
- _this.field = field;
310
+ BnsItemApiClientBase.prototype.transformOptions = function (options) {
311
+ options.headers = new Headers(options.headers);
312
+ options.headers.set("Referer", "https://yast.vercel.app");
313
+ options.headers.set("Origin", "https://yast.vercel.app");
314
+ return Promise.resolve(options);
315
+ };
316
+ return BnsItemApiClientBase;
317
+ }());
318
+
319
+ //----------------------
320
+ var BnsItemApiClient = /** @class */ (function (_super) {
321
+ __extends(BnsItemApiClient, _super);
322
+ function BnsItemApiClient(baseUrl, http) {
323
+ var _this = _super.call(this) || this;
324
+ _this.jsonParseReviver = undefined;
325
+ _this.http = http ? http : window;
326
+ _this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
340
327
  return _this;
341
328
  }
342
- return RequiredError;
343
- }(Error));
344
- /**
345
- * BnsItemApi - fetch parameter creator
346
- * @export
347
- */
348
- var BnsItemApiFetchParamCreator = function (configuration) {
349
- return {
350
- /**
351
- *
352
- * @param {boolean} added
353
- * @param {boolean} modified
354
- * @param {string} region
355
- * @param {string} [patch]
356
- * @param {*} [options] Override http request option.
357
- * @throws {RequiredError}
358
- */
359
- bnsItemAddedOrModifiedItemsGet: function (added, modified, region, patch, options) {
360
- if (options === void 0) { options = {}; }
361
- // verify required parameter 'added' is not null or undefined
362
- if (added === null || added === undefined) {
363
- throw new RequiredError('added', 'Required parameter added was null or undefined when calling bnsItemAddedOrModifiedItemsGet.');
329
+ /**
330
+ * @return Success
331
+ */
332
+ BnsItemApiClient.prototype.ping = function () {
333
+ var _this = this;
334
+ var url_ = this.baseUrl + "/BnsItem/Ping";
335
+ url_ = url_.replace(/[?&]$/, "");
336
+ var options_ = {
337
+ method: "GET",
338
+ headers: {
339
+ "Accept": "text/plain"
340
+ }
341
+ };
342
+ return this.transformOptions(options_).then(function (transformedOptions_) {
343
+ return _this.http.fetch(url_, transformedOptions_);
344
+ }).then(function (_response) {
345
+ return _this.processPing(_response);
346
+ });
347
+ };
348
+ BnsItemApiClient.prototype.processPing = function (response) {
349
+ var _this = this;
350
+ var status = response.status;
351
+ var _headers = {};
352
+ if (response.headers && response.headers.forEach) {
353
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
354
+ }
355
+ if (status === 200) {
356
+ return response.text().then(function (_responseText) {
357
+ var result200 = null;
358
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
359
+ result200 = resultData200 !== undefined ? resultData200 : null;
360
+ return result200;
361
+ });
362
+ }
363
+ else if (status !== 200 && status !== 204) {
364
+ return response.text().then(function (_responseText) {
365
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
366
+ });
367
+ }
368
+ return Promise.resolve(null);
369
+ };
370
+ /**
371
+ * @return Success
372
+ */
373
+ BnsItemApiClient.prototype.patches = function (region) {
374
+ var _this = this;
375
+ var url_ = this.baseUrl + "/BnsItem/Patches?";
376
+ if (region === undefined || region === null)
377
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
378
+ else
379
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
380
+ url_ = url_.replace(/[?&]$/, "");
381
+ var options_ = {
382
+ method: "GET",
383
+ headers: {
384
+ "Accept": "text/plain"
385
+ }
386
+ };
387
+ return this.transformOptions(options_).then(function (transformedOptions_) {
388
+ return _this.http.fetch(url_, transformedOptions_);
389
+ }).then(function (_response) {
390
+ return _this.processPatches(_response);
391
+ });
392
+ };
393
+ BnsItemApiClient.prototype.processPatches = function (response) {
394
+ var _this = this;
395
+ var status = response.status;
396
+ var _headers = {};
397
+ if (response.headers && response.headers.forEach) {
398
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
399
+ }
400
+ if (status === 200) {
401
+ return response.text().then(function (_responseText) {
402
+ var result200 = null;
403
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
404
+ if (Array.isArray(resultData200)) {
405
+ result200 = [];
406
+ for (var _i = 0, resultData200_1 = resultData200; _i < resultData200_1.length; _i++) {
407
+ var item = resultData200_1[_i];
408
+ result200.push(PatchesListPatch.fromJS(item));
409
+ }
410
+ }
411
+ else {
412
+ result200 = null;
413
+ }
414
+ return result200;
415
+ });
416
+ }
417
+ else if (status !== 200 && status !== 204) {
418
+ return response.text().then(function (_responseText) {
419
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
420
+ });
421
+ }
422
+ return Promise.resolve(null);
423
+ };
424
+ /**
425
+ * @return Success
426
+ */
427
+ BnsItemApiClient.prototype.latestPatch = function (region) {
428
+ var _this = this;
429
+ var url_ = this.baseUrl + "/BnsItem/LatestPatch?";
430
+ if (region === undefined || region === null)
431
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
432
+ else
433
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
434
+ url_ = url_.replace(/[?&]$/, "");
435
+ var options_ = {
436
+ method: "GET",
437
+ headers: {
438
+ "Accept": "text/plain"
439
+ }
440
+ };
441
+ return this.transformOptions(options_).then(function (transformedOptions_) {
442
+ return _this.http.fetch(url_, transformedOptions_);
443
+ }).then(function (_response) {
444
+ return _this.processLatestPatch(_response);
445
+ });
446
+ };
447
+ BnsItemApiClient.prototype.processLatestPatch = function (response) {
448
+ var _this = this;
449
+ var status = response.status;
450
+ var _headers = {};
451
+ if (response.headers && response.headers.forEach) {
452
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
453
+ }
454
+ if (status === 200) {
455
+ return response.text().then(function (_responseText) {
456
+ var result200 = null;
457
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
458
+ result200 = PatchesListPatch.fromJS(resultData200);
459
+ return result200;
460
+ });
461
+ }
462
+ else if (status !== 200 && status !== 204) {
463
+ return response.text().then(function (_responseText) {
464
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
465
+ });
466
+ }
467
+ return Promise.resolve(null);
468
+ };
469
+ /**
470
+ * @return Success
471
+ */
472
+ BnsItemApiClient.prototype.regions = function () {
473
+ var _this = this;
474
+ var url_ = this.baseUrl + "/BnsItem/Regions";
475
+ url_ = url_.replace(/[?&]$/, "");
476
+ var options_ = {
477
+ method: "GET",
478
+ headers: {
479
+ "Accept": "text/plain"
480
+ }
481
+ };
482
+ return this.transformOptions(options_).then(function (transformedOptions_) {
483
+ return _this.http.fetch(url_, transformedOptions_);
484
+ }).then(function (_response) {
485
+ return _this.processRegions(_response);
486
+ });
487
+ };
488
+ BnsItemApiClient.prototype.processRegions = function (response) {
489
+ var _this = this;
490
+ var status = response.status;
491
+ var _headers = {};
492
+ if (response.headers && response.headers.forEach) {
493
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
494
+ }
495
+ if (status === 200) {
496
+ return response.text().then(function (_responseText) {
497
+ var result200 = null;
498
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
499
+ if (Array.isArray(resultData200)) {
500
+ result200 = [];
501
+ for (var _i = 0, resultData200_2 = resultData200; _i < resultData200_2.length; _i++) {
502
+ var item = resultData200_2[_i];
503
+ result200.push(item);
504
+ }
505
+ }
506
+ else {
507
+ result200 = null;
508
+ }
509
+ return result200;
510
+ });
511
+ }
512
+ else if (status !== 200 && status !== 204) {
513
+ return response.text().then(function (_responseText) {
514
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
515
+ });
516
+ }
517
+ return Promise.resolve(null);
518
+ };
519
+ /**
520
+ * @param patch (optional)
521
+ * @return Success
522
+ */
523
+ BnsItemApiClient.prototype.yastItems = function (region, itemType, technicalJobName, patch) {
524
+ var _this = this;
525
+ var url_ = this.baseUrl + "/BnsItem/YastItems?";
526
+ if (region === undefined || region === null)
527
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
528
+ else
529
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
530
+ if (itemType === undefined || itemType === null)
531
+ throw new Error("The parameter 'itemType' must be defined and cannot be null.");
532
+ else
533
+ url_ += "itemType=" + encodeURIComponent("" + itemType) + "&";
534
+ if (technicalJobName === undefined || technicalJobName === null)
535
+ throw new Error("The parameter 'technicalJobName' must be defined and cannot be null.");
536
+ else
537
+ url_ += "technicalJobName=" + encodeURIComponent("" + technicalJobName) + "&";
538
+ if (patch === null)
539
+ throw new Error("The parameter 'patch' cannot be null.");
540
+ else if (patch !== undefined)
541
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
542
+ url_ = url_.replace(/[?&]$/, "");
543
+ var options_ = {
544
+ method: "GET",
545
+ headers: {
546
+ "Accept": "text/plain"
547
+ }
548
+ };
549
+ return this.transformOptions(options_).then(function (transformedOptions_) {
550
+ return _this.http.fetch(url_, transformedOptions_);
551
+ }).then(function (_response) {
552
+ return _this.processYastItems(_response);
553
+ });
554
+ };
555
+ BnsItemApiClient.prototype.processYastItems = function (response) {
556
+ var _this = this;
557
+ var status = response.status;
558
+ var _headers = {};
559
+ if (response.headers && response.headers.forEach) {
560
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
561
+ }
562
+ if (status === 200) {
563
+ return response.text().then(function (_responseText) {
564
+ var result200 = null;
565
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
566
+ if (Array.isArray(resultData200)) {
567
+ result200 = [];
568
+ for (var _i = 0, resultData200_3 = resultData200; _i < resultData200_3.length; _i++) {
569
+ var item = resultData200_3[_i];
570
+ result200.push(BnsItemDto.fromJS(item));
571
+ }
572
+ }
573
+ else {
574
+ result200 = null;
575
+ }
576
+ return result200;
577
+ });
578
+ }
579
+ else if (status !== 200 && status !== 204) {
580
+ return response.text().then(function (_responseText) {
581
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
582
+ });
583
+ }
584
+ return Promise.resolve(null);
585
+ };
586
+ /**
587
+ * @param itemId (optional)
588
+ * @param itemLevel (optional)
589
+ * @param region (optional)
590
+ * @param patch (optional)
591
+ * @return Success
592
+ */
593
+ BnsItemApiClient.prototype.allStagesForItem = function (itemId, itemLevel, region, patch) {
594
+ var _this = this;
595
+ var url_ = this.baseUrl + "/BnsItem/AllStagesForItem?";
596
+ if (itemId === null)
597
+ throw new Error("The parameter 'itemId' cannot be null.");
598
+ else if (itemId !== undefined)
599
+ url_ += "itemId=" + encodeURIComponent("" + itemId) + "&";
600
+ if (itemLevel === null)
601
+ throw new Error("The parameter 'itemLevel' cannot be null.");
602
+ else if (itemLevel !== undefined)
603
+ url_ += "itemLevel=" + encodeURIComponent("" + itemLevel) + "&";
604
+ if (region === null)
605
+ throw new Error("The parameter 'region' cannot be null.");
606
+ else if (region !== undefined)
607
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
608
+ if (patch === null)
609
+ throw new Error("The parameter 'patch' cannot be null.");
610
+ else if (patch !== undefined)
611
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
612
+ url_ = url_.replace(/[?&]$/, "");
613
+ var options_ = {
614
+ method: "GET",
615
+ headers: {
616
+ "Accept": "text/plain"
617
+ }
618
+ };
619
+ return this.transformOptions(options_).then(function (transformedOptions_) {
620
+ return _this.http.fetch(url_, transformedOptions_);
621
+ }).then(function (_response) {
622
+ return _this.processAllStagesForItem(_response);
623
+ });
624
+ };
625
+ BnsItemApiClient.prototype.processAllStagesForItem = function (response) {
626
+ var _this = this;
627
+ var status = response.status;
628
+ var _headers = {};
629
+ if (response.headers && response.headers.forEach) {
630
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
631
+ }
632
+ if (status === 200) {
633
+ return response.text().then(function (_responseText) {
634
+ var result200 = null;
635
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
636
+ result200 = ItemWithStagesDto.fromJS(resultData200);
637
+ return result200;
638
+ });
639
+ }
640
+ else if (status !== 200 && status !== 204) {
641
+ return response.text().then(function (_responseText) {
642
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
643
+ });
644
+ }
645
+ return Promise.resolve(null);
646
+ };
647
+ /**
648
+ * @param itemId (optional)
649
+ * @param itemLevel (optional)
650
+ * @param region (optional)
651
+ * @param patch (optional)
652
+ * @return Success
653
+ * @deprecated
654
+ */
655
+ BnsItemApiClient.prototype.allUpgradesForItem = function (itemId, itemLevel, region, patch) {
656
+ var _this = this;
657
+ var url_ = this.baseUrl + "/BnsItem/AllUpgradesForItem?";
658
+ if (itemId === null)
659
+ throw new Error("The parameter 'itemId' cannot be null.");
660
+ else if (itemId !== undefined)
661
+ url_ += "itemId=" + encodeURIComponent("" + itemId) + "&";
662
+ if (itemLevel === null)
663
+ throw new Error("The parameter 'itemLevel' cannot be null.");
664
+ else if (itemLevel !== undefined)
665
+ url_ += "itemLevel=" + encodeURIComponent("" + itemLevel) + "&";
666
+ if (region === null)
667
+ throw new Error("The parameter 'region' cannot be null.");
668
+ else if (region !== undefined)
669
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
670
+ if (patch === null)
671
+ throw new Error("The parameter 'patch' cannot be null.");
672
+ else if (patch !== undefined)
673
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
674
+ url_ = url_.replace(/[?&]$/, "");
675
+ var options_ = {
676
+ method: "GET",
677
+ headers: {
678
+ "Accept": "text/plain"
679
+ }
680
+ };
681
+ return this.transformOptions(options_).then(function (transformedOptions_) {
682
+ return _this.http.fetch(url_, transformedOptions_);
683
+ }).then(function (_response) {
684
+ return _this.processAllUpgradesForItem(_response);
685
+ });
686
+ };
687
+ BnsItemApiClient.prototype.processAllUpgradesForItem = function (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) { return _headers[k] = v; });
693
+ }
694
+ if (status === 200) {
695
+ return response.text().then(function (_responseText) {
696
+ var result200 = null;
697
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
698
+ if (Array.isArray(resultData200)) {
699
+ result200 = [];
700
+ for (var _i = 0, resultData200_4 = resultData200; _i < resultData200_4.length; _i++) {
701
+ var item = resultData200_4[_i];
702
+ result200.push(BnsItemDto.fromJS(item));
703
+ }
704
+ }
705
+ else {
706
+ result200 = null;
707
+ }
708
+ return result200;
709
+ });
710
+ }
711
+ else if (status !== 200 && status !== 204) {
712
+ return response.text().then(function (_responseText) {
713
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
714
+ });
715
+ }
716
+ return Promise.resolve(null);
717
+ };
718
+ /**
719
+ * @param patch (optional)
720
+ * @return Success
721
+ */
722
+ BnsItemApiClient.prototype.addedOrModifiedItems = function (added, modified, region, patch) {
723
+ var _this = this;
724
+ var url_ = this.baseUrl + "/BnsItem/AddedOrModifiedItems?";
725
+ if (added === undefined || added === null)
726
+ throw new Error("The parameter 'added' must be defined and cannot be null.");
727
+ else
728
+ url_ += "added=" + encodeURIComponent("" + added) + "&";
729
+ if (modified === undefined || modified === null)
730
+ throw new Error("The parameter 'modified' must be defined and cannot be null.");
731
+ else
732
+ url_ += "modified=" + encodeURIComponent("" + modified) + "&";
733
+ if (region === undefined || region === null)
734
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
735
+ else
736
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
737
+ if (patch === null)
738
+ throw new Error("The parameter 'patch' cannot be null.");
739
+ else if (patch !== undefined)
740
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
741
+ url_ = url_.replace(/[?&]$/, "");
742
+ var options_ = {
743
+ method: "GET",
744
+ headers: {
745
+ "Accept": "text/plain"
746
+ }
747
+ };
748
+ return this.transformOptions(options_).then(function (transformedOptions_) {
749
+ return _this.http.fetch(url_, transformedOptions_);
750
+ }).then(function (_response) {
751
+ return _this.processAddedOrModifiedItems(_response);
752
+ });
753
+ };
754
+ BnsItemApiClient.prototype.processAddedOrModifiedItems = function (response) {
755
+ var _this = this;
756
+ var status = response.status;
757
+ var _headers = {};
758
+ if (response.headers && response.headers.forEach) {
759
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
760
+ }
761
+ if (status === 200) {
762
+ return response.text().then(function (_responseText) {
763
+ var result200 = null;
764
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
765
+ if (Array.isArray(resultData200)) {
766
+ result200 = [];
767
+ for (var _i = 0, resultData200_5 = resultData200; _i < resultData200_5.length; _i++) {
768
+ var item = resultData200_5[_i];
769
+ result200.push(BnsItemDto.fromJS(item));
770
+ }
771
+ }
772
+ else {
773
+ result200 = null;
774
+ }
775
+ return result200;
776
+ });
777
+ }
778
+ else if (status !== 200 && status !== 204) {
779
+ return response.text().then(function (_responseText) {
780
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
781
+ });
782
+ }
783
+ return Promise.resolve(null);
784
+ };
785
+ /**
786
+ * @param light (optional)
787
+ * @param patch (optional)
788
+ * @return Success
789
+ */
790
+ BnsItemApiClient.prototype.itemByString = function (idLevel, region, light, patch) {
791
+ var _this = this;
792
+ var url_ = this.baseUrl + "/BnsItem/ItemByString?";
793
+ if (idLevel === undefined || idLevel === null)
794
+ throw new Error("The parameter 'idLevel' must be defined and cannot be null.");
795
+ else
796
+ url_ += "idLevel=" + encodeURIComponent("" + idLevel) + "&";
797
+ if (region === undefined || region === null)
798
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
799
+ else
800
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
801
+ if (light === null)
802
+ throw new Error("The parameter 'light' cannot be null.");
803
+ else if (light !== undefined)
804
+ url_ += "light=" + encodeURIComponent("" + light) + "&";
805
+ if (patch === null)
806
+ throw new Error("The parameter 'patch' cannot be null.");
807
+ else if (patch !== undefined)
808
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
809
+ url_ = url_.replace(/[?&]$/, "");
810
+ var options_ = {
811
+ method: "GET",
812
+ headers: {
813
+ "Accept": "text/plain"
814
+ }
815
+ };
816
+ return this.transformOptions(options_).then(function (transformedOptions_) {
817
+ return _this.http.fetch(url_, transformedOptions_);
818
+ }).then(function (_response) {
819
+ return _this.processItemByString(_response);
820
+ });
821
+ };
822
+ BnsItemApiClient.prototype.processItemByString = function (response) {
823
+ var _this = this;
824
+ var status = response.status;
825
+ var _headers = {};
826
+ if (response.headers && response.headers.forEach) {
827
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
828
+ }
829
+ if (status === 200) {
830
+ return response.text().then(function (_responseText) {
831
+ var result200 = null;
832
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
833
+ result200 = BnsItemDto.fromJS(resultData200);
834
+ return result200;
835
+ });
836
+ }
837
+ else if (status !== 200 && status !== 204) {
838
+ return response.text().then(function (_responseText) {
839
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
840
+ });
841
+ }
842
+ return Promise.resolve(null);
843
+ };
844
+ /**
845
+ * @param light (optional)
846
+ * @param patch (optional)
847
+ * @return Success
848
+ */
849
+ BnsItemApiClient.prototype.item = function (id, level, region, light, patch) {
850
+ var _this = this;
851
+ var url_ = this.baseUrl + "/BnsItem/Item?";
852
+ if (id === undefined || id === null)
853
+ throw new Error("The parameter 'id' must be defined and cannot be null.");
854
+ else
855
+ url_ += "id=" + encodeURIComponent("" + id) + "&";
856
+ if (level === undefined || level === null)
857
+ throw new Error("The parameter 'level' must be defined and cannot be null.");
858
+ else
859
+ url_ += "level=" + encodeURIComponent("" + level) + "&";
860
+ if (region === undefined || region === null)
861
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
862
+ else
863
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
864
+ if (light === null)
865
+ throw new Error("The parameter 'light' cannot be null.");
866
+ else if (light !== undefined)
867
+ url_ += "light=" + encodeURIComponent("" + light) + "&";
868
+ if (patch === null)
869
+ throw new Error("The parameter 'patch' cannot be null.");
870
+ else if (patch !== undefined)
871
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
872
+ url_ = url_.replace(/[?&]$/, "");
873
+ var options_ = {
874
+ method: "GET",
875
+ headers: {
876
+ "Accept": "text/plain"
877
+ }
878
+ };
879
+ return this.transformOptions(options_).then(function (transformedOptions_) {
880
+ return _this.http.fetch(url_, transformedOptions_);
881
+ }).then(function (_response) {
882
+ return _this.processItem(_response);
883
+ });
884
+ };
885
+ BnsItemApiClient.prototype.processItem = function (response) {
886
+ var _this = this;
887
+ var status = response.status;
888
+ var _headers = {};
889
+ if (response.headers && response.headers.forEach) {
890
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
891
+ }
892
+ if (status === 200) {
893
+ return response.text().then(function (_responseText) {
894
+ var result200 = null;
895
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
896
+ result200 = BnsItemDto.fromJS(resultData200);
897
+ return result200;
898
+ });
899
+ }
900
+ else if (status !== 200 && status !== 204) {
901
+ return response.text().then(function (_responseText) {
902
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
903
+ });
904
+ }
905
+ return Promise.resolve(null);
906
+ };
907
+ /**
908
+ * @param patch (optional)
909
+ * @return Success
910
+ */
911
+ BnsItemApiClient.prototype.itemsByName = function (name, region, patch) {
912
+ var _this = this;
913
+ var url_ = this.baseUrl + "/BnsItem/ItemsByName?";
914
+ if (name === undefined || name === null)
915
+ throw new Error("The parameter 'name' must be defined and cannot be null.");
916
+ else
917
+ url_ += "name=" + encodeURIComponent("" + name) + "&";
918
+ if (region === undefined || region === null)
919
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
920
+ else
921
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
922
+ if (patch === null)
923
+ throw new Error("The parameter 'patch' cannot be null.");
924
+ else if (patch !== undefined)
925
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
926
+ url_ = url_.replace(/[?&]$/, "");
927
+ var options_ = {
928
+ method: "GET",
929
+ headers: {
930
+ "Accept": "text/plain"
931
+ }
932
+ };
933
+ return this.transformOptions(options_).then(function (transformedOptions_) {
934
+ return _this.http.fetch(url_, transformedOptions_);
935
+ }).then(function (_response) {
936
+ return _this.processItemsByName(_response);
937
+ });
938
+ };
939
+ BnsItemApiClient.prototype.processItemsByName = function (response) {
940
+ var _this = this;
941
+ var status = response.status;
942
+ var _headers = {};
943
+ if (response.headers && response.headers.forEach) {
944
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
945
+ }
946
+ if (status === 200) {
947
+ return response.text().then(function (_responseText) {
948
+ var result200 = null;
949
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
950
+ if (Array.isArray(resultData200)) {
951
+ result200 = [];
952
+ for (var _i = 0, resultData200_6 = resultData200; _i < resultData200_6.length; _i++) {
953
+ var item = resultData200_6[_i];
954
+ result200.push(BnsItemDto.fromJS(item));
955
+ }
956
+ }
957
+ else {
958
+ result200 = null;
959
+ }
960
+ return result200;
961
+ });
962
+ }
963
+ else if (status !== 200 && status !== 204) {
964
+ return response.text().then(function (_responseText) {
965
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
966
+ });
967
+ }
968
+ return Promise.resolve(null);
969
+ };
970
+ /**
971
+ * @param category (optional)
972
+ * @param technicalJobName (optional)
973
+ * @param gradesString (optional)
974
+ * @param minGs (optional)
975
+ * @param patch (optional)
976
+ * @param noDupes (optional)
977
+ * @return Success
978
+ */
979
+ BnsItemApiClient.prototype.itemsByCategory = function (region, category, technicalJobName, gradesString, minGs, patch, noDupes) {
980
+ var _this = this;
981
+ var url_ = this.baseUrl + "/BnsItem/ItemsByCategory?";
982
+ if (region === undefined || region === null)
983
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
984
+ else
985
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
986
+ if (category === null)
987
+ throw new Error("The parameter 'category' cannot be null.");
988
+ else if (category !== undefined)
989
+ url_ += "category=" + encodeURIComponent("" + category) + "&";
990
+ if (technicalJobName === null)
991
+ throw new Error("The parameter 'technicalJobName' cannot be null.");
992
+ else if (technicalJobName !== undefined)
993
+ url_ += "technicalJobName=" + encodeURIComponent("" + technicalJobName) + "&";
994
+ if (gradesString === null)
995
+ throw new Error("The parameter 'gradesString' cannot be null.");
996
+ else if (gradesString !== undefined)
997
+ url_ += "gradesString=" + encodeURIComponent("" + gradesString) + "&";
998
+ if (minGs === null)
999
+ throw new Error("The parameter 'minGs' cannot be null.");
1000
+ else if (minGs !== undefined)
1001
+ url_ += "minGs=" + encodeURIComponent("" + minGs) + "&";
1002
+ if (patch === null)
1003
+ throw new Error("The parameter 'patch' cannot be null.");
1004
+ else if (patch !== undefined)
1005
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
1006
+ if (noDupes === null)
1007
+ throw new Error("The parameter 'noDupes' cannot be null.");
1008
+ else if (noDupes !== undefined)
1009
+ url_ += "noDupes=" + encodeURIComponent("" + noDupes) + "&";
1010
+ url_ = url_.replace(/[?&]$/, "");
1011
+ var options_ = {
1012
+ method: "GET",
1013
+ headers: {
1014
+ "Accept": "text/plain"
364
1015
  }
365
- // verify required parameter 'modified' is not null or undefined
366
- if (modified === null || modified === undefined) {
367
- throw new RequiredError('modified', 'Required parameter modified was null or undefined when calling bnsItemAddedOrModifiedItemsGet.');
1016
+ };
1017
+ return this.transformOptions(options_).then(function (transformedOptions_) {
1018
+ return _this.http.fetch(url_, transformedOptions_);
1019
+ }).then(function (_response) {
1020
+ return _this.processItemsByCategory(_response);
1021
+ });
1022
+ };
1023
+ BnsItemApiClient.prototype.processItemsByCategory = function (response) {
1024
+ var _this = this;
1025
+ var status = response.status;
1026
+ var _headers = {};
1027
+ if (response.headers && response.headers.forEach) {
1028
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
1029
+ }
1030
+ if (status === 200) {
1031
+ return response.text().then(function (_responseText) {
1032
+ var result200 = null;
1033
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
1034
+ if (Array.isArray(resultData200)) {
1035
+ result200 = [];
1036
+ for (var _i = 0, resultData200_7 = resultData200; _i < resultData200_7.length; _i++) {
1037
+ var item = resultData200_7[_i];
1038
+ result200.push(BnsItemDto.fromJS(item));
1039
+ }
1040
+ }
1041
+ else {
1042
+ result200 = null;
1043
+ }
1044
+ return result200;
1045
+ });
1046
+ }
1047
+ else if (status !== 200 && status !== 204) {
1048
+ return response.text().then(function (_responseText) {
1049
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1050
+ });
1051
+ }
1052
+ return Promise.resolve(null);
1053
+ };
1054
+ /**
1055
+ * @param offset (optional)
1056
+ * @param patch (optional)
1057
+ * @return Success
1058
+ */
1059
+ BnsItemApiClient.prototype.items = function (count, region, offset, patch) {
1060
+ var _this = this;
1061
+ var url_ = this.baseUrl + "/BnsItem/Items?";
1062
+ if (count === undefined || count === null)
1063
+ throw new Error("The parameter 'count' must be defined and cannot be null.");
1064
+ else
1065
+ url_ += "count=" + encodeURIComponent("" + count) + "&";
1066
+ if (region === undefined || region === null)
1067
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
1068
+ else
1069
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
1070
+ if (offset === null)
1071
+ throw new Error("The parameter 'offset' cannot be null.");
1072
+ else if (offset !== undefined)
1073
+ url_ += "offset=" + encodeURIComponent("" + offset) + "&";
1074
+ if (patch === null)
1075
+ throw new Error("The parameter 'patch' cannot be null.");
1076
+ else if (patch !== undefined)
1077
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
1078
+ url_ = url_.replace(/[?&]$/, "");
1079
+ var options_ = {
1080
+ method: "GET",
1081
+ headers: {
1082
+ "Accept": "text/plain"
368
1083
  }
369
- // verify required parameter 'region' is not null or undefined
370
- if (region === null || region === undefined) {
371
- throw new RequiredError('region', 'Required parameter region was null or undefined when calling bnsItemAddedOrModifiedItemsGet.');
1084
+ };
1085
+ return this.transformOptions(options_).then(function (transformedOptions_) {
1086
+ return _this.http.fetch(url_, transformedOptions_);
1087
+ }).then(function (_response) {
1088
+ return _this.processItems(_response);
1089
+ });
1090
+ };
1091
+ BnsItemApiClient.prototype.processItems = function (response) {
1092
+ var _this = this;
1093
+ var status = response.status;
1094
+ var _headers = {};
1095
+ if (response.headers && response.headers.forEach) {
1096
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
1097
+ }
1098
+ if (status === 200) {
1099
+ return response.text().then(function (_responseText) {
1100
+ var result200 = null;
1101
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
1102
+ if (Array.isArray(resultData200)) {
1103
+ result200 = [];
1104
+ for (var _i = 0, resultData200_8 = resultData200; _i < resultData200_8.length; _i++) {
1105
+ var item = resultData200_8[_i];
1106
+ result200.push(BnsItemDto.fromJS(item));
1107
+ }
1108
+ }
1109
+ else {
1110
+ result200 = null;
1111
+ }
1112
+ return result200;
1113
+ });
1114
+ }
1115
+ else if (status !== 200 && status !== 204) {
1116
+ return response.text().then(function (_responseText) {
1117
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1118
+ });
1119
+ }
1120
+ return Promise.resolve(null);
1121
+ };
1122
+ /**
1123
+ * @param light (optional)
1124
+ * @param patch (optional)
1125
+ * @return Success
1126
+ */
1127
+ BnsItemApiClient.prototype.itemsByIds = function (region, light, patch, body) {
1128
+ var _this = this;
1129
+ var url_ = this.baseUrl + "/BnsItem/ItemsByIds?";
1130
+ if (region === undefined || region === null)
1131
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
1132
+ else
1133
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
1134
+ if (light === null)
1135
+ throw new Error("The parameter 'light' cannot be null.");
1136
+ else if (light !== undefined)
1137
+ url_ += "light=" + encodeURIComponent("" + light) + "&";
1138
+ if (patch === null)
1139
+ throw new Error("The parameter 'patch' cannot be null.");
1140
+ else if (patch !== undefined)
1141
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
1142
+ url_ = url_.replace(/[?&]$/, "");
1143
+ var content_ = JSON.stringify(body);
1144
+ var options_ = {
1145
+ body: content_,
1146
+ method: "POST",
1147
+ headers: {
1148
+ "Content-Type": "application/json",
1149
+ "Accept": "text/plain"
372
1150
  }
373
- var localVarPath = "/BnsItem/AddedOrModifiedItems";
374
- var localVarUrlObj = url.parse(localVarPath, true);
375
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
376
- var localVarHeaderParameter = {};
377
- var localVarQueryParameter = {};
378
- if (added !== undefined) {
379
- localVarQueryParameter['added'] = added;
1151
+ };
1152
+ return this.transformOptions(options_).then(function (transformedOptions_) {
1153
+ return _this.http.fetch(url_, transformedOptions_);
1154
+ }).then(function (_response) {
1155
+ return _this.processItemsByIds(_response);
1156
+ });
1157
+ };
1158
+ BnsItemApiClient.prototype.processItemsByIds = function (response) {
1159
+ var _this = this;
1160
+ var status = response.status;
1161
+ var _headers = {};
1162
+ if (response.headers && response.headers.forEach) {
1163
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
1164
+ }
1165
+ if (status === 200) {
1166
+ return response.text().then(function (_responseText) {
1167
+ var result200 = null;
1168
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
1169
+ if (Array.isArray(resultData200)) {
1170
+ result200 = [];
1171
+ for (var _i = 0, resultData200_9 = resultData200; _i < resultData200_9.length; _i++) {
1172
+ var item = resultData200_9[_i];
1173
+ result200.push(BnsItemDto.fromJS(item));
1174
+ }
1175
+ }
1176
+ else {
1177
+ result200 = null;
1178
+ }
1179
+ return result200;
1180
+ });
1181
+ }
1182
+ else if (status !== 200 && status !== 204) {
1183
+ return response.text().then(function (_responseText) {
1184
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1185
+ });
1186
+ }
1187
+ return Promise.resolve(null);
1188
+ };
1189
+ return BnsItemApiClient;
1190
+ }(BnsItemApiClientBase));
1191
+ var BnsItemDto = /** @class */ (function () {
1192
+ function BnsItemDto(data) {
1193
+ if (data) {
1194
+ for (var property in data) {
1195
+ if (data.hasOwnProperty(property))
1196
+ this[property] = data[property];
380
1197
  }
381
- if (modified !== undefined) {
382
- localVarQueryParameter['modified'] = modified;
1198
+ }
1199
+ }
1200
+ BnsItemDto.prototype.init = function (_data) {
1201
+ if (_data) {
1202
+ this.id = _data["id"];
1203
+ this.level = _data["level"];
1204
+ this.gearScore = _data["gearScore"];
1205
+ this.itemScore = _data["itemScore"];
1206
+ this.fusionScore = _data["fusionScore"];
1207
+ this.name = _data["name"];
1208
+ if (Array.isArray(_data["categories"])) {
1209
+ this.categories = [];
1210
+ for (var _i = 0, _a = _data["categories"]; _i < _a.length; _i++) {
1211
+ var item = _a[_i];
1212
+ this.categories.push(ItemCategoryDto.fromJS(item));
1213
+ }
383
1214
  }
384
- if (region !== undefined) {
385
- localVarQueryParameter['region'] = region;
1215
+ this.icon = _data["icon"] ? ItemIconDto.fromJS(_data["icon"]) : undefined;
1216
+ this.grade = _data["grade"];
1217
+ if (Array.isArray(_data["classRequired"])) {
1218
+ this.classRequired = [];
1219
+ for (var _b = 0, _c = _data["classRequired"]; _b < _c.length; _b++) {
1220
+ var item = _c[_b];
1221
+ this.classRequired.push(RequiredClassDto.fromJS(item));
1222
+ }
386
1223
  }
387
- if (patch !== undefined) {
388
- localVarQueryParameter['patch'] = patch;
1224
+ if (Array.isArray(_data["stats"])) {
1225
+ this.stats = [];
1226
+ for (var _d = 0, _e = _data["stats"]; _d < _e.length; _d++) {
1227
+ var item = _e[_d];
1228
+ this.stats.push(ItemStatDto.fromJS(item));
1229
+ }
389
1230
  }
390
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
391
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
392
- delete localVarUrlObj.search;
393
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
394
- return {
395
- url: url.format(localVarUrlObj),
396
- options: localVarRequestOptions,
397
- };
398
- },
399
- /**
400
- *
401
- * @param {number} [itemId]
402
- * @param {number} [itemLevel]
403
- * @param {string} [region]
404
- * @param {string} [patch]
405
- * @param {*} [options] Override http request option.
406
- * @throws {RequiredError}
407
- */
408
- bnsItemAllStagesForItemGet: function (itemId, itemLevel, region, patch, options) {
409
- if (options === void 0) { options = {}; }
410
- var localVarPath = "/BnsItem/AllStagesForItem";
411
- var localVarUrlObj = url.parse(localVarPath, true);
412
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
413
- var localVarHeaderParameter = {};
414
- var localVarQueryParameter = {};
415
- if (itemId !== undefined) {
416
- localVarQueryParameter['itemId'] = itemId;
1231
+ this.randomSubStatCount = _data["randomSubStatCount"];
1232
+ if (Array.isArray(_data["randomStats"])) {
1233
+ this.randomStats = [];
1234
+ for (var _f = 0, _g = _data["randomStats"]; _f < _g.length; _f++) {
1235
+ var item = _g[_f];
1236
+ this.randomStats.push(ItemRandomStatDto.fromJS(item));
1237
+ }
417
1238
  }
418
- if (itemLevel !== undefined) {
419
- localVarQueryParameter['itemLevel'] = itemLevel;
1239
+ this.mainInfo = _data["mainInfo"];
1240
+ this.subInfo = _data["subInfo"];
1241
+ this.cooldownInMs = _data["cooldownInMs"];
1242
+ this.bgCooldownInMs = _data["bgCooldownInMs"];
1243
+ if (Array.isArray(_data["skillModifierGroups"])) {
1244
+ this.skillModifierGroups = [];
1245
+ for (var _h = 0, _j = _data["skillModifierGroups"]; _h < _j.length; _h++) {
1246
+ var item = _j[_h];
1247
+ this.skillModifierGroups.push(SkillModifierGroupDto.fromJS(item));
1248
+ }
420
1249
  }
421
- if (region !== undefined) {
422
- localVarQueryParameter['region'] = region;
1250
+ this.itemImprove = _data["itemImprove"] ? ItemImproveDto.fromJS(_data["itemImprove"]) : undefined;
1251
+ if (Array.isArray(_data["skills"])) {
1252
+ this.skills = [];
1253
+ for (var _k = 0, _l = _data["skills"]; _k < _l.length; _k++) {
1254
+ var item = _l[_k];
1255
+ this.skills.push(ItemSkillDto.fromJS(item));
1256
+ }
423
1257
  }
424
- if (patch !== undefined) {
425
- localVarQueryParameter['patch'] = patch;
1258
+ this.topText = _data["topText"];
1259
+ this.setBonus = _data["setBonus"] ? ItemSetBonusDto.fromJS(_data["setBonus"]) : undefined;
1260
+ if (Array.isArray(_data["descriptions"])) {
1261
+ this.descriptions = [];
1262
+ for (var _m = 0, _o = _data["descriptions"]; _m < _o.length; _m++) {
1263
+ var item = _o[_m];
1264
+ this.descriptions.push(ItemDescriptionDto.fromJS(item));
1265
+ }
426
1266
  }
427
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
428
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
429
- delete localVarUrlObj.search;
430
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
431
- return {
432
- url: url.format(localVarUrlObj),
433
- options: localVarRequestOptions,
434
- };
435
- },
436
- /**
437
- *
438
- * @param {number} [itemId]
439
- * @param {number} [itemLevel]
440
- * @param {string} [region]
441
- * @param {string} [patch]
442
- * @param {*} [options] Override http request option.
443
- * @throws {RequiredError}
444
- */
445
- bnsItemAllUpgradesForItemGet: function (itemId, itemLevel, region, patch, options) {
446
- if (options === void 0) { options = {}; }
447
- var localVarPath = "/BnsItem/AllUpgradesForItem";
448
- var localVarUrlObj = url.parse(localVarPath, true);
449
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
450
- var localVarHeaderParameter = {};
451
- var localVarQueryParameter = {};
452
- if (itemId !== undefined) {
453
- localVarQueryParameter['itemId'] = itemId;
1267
+ if (Array.isArray(_data["decomposeRewards"])) {
1268
+ this.decomposeRewards = [];
1269
+ for (var _p = 0, _q = _data["decomposeRewards"]; _p < _q.length; _p++) {
1270
+ var item = _q[_p];
1271
+ this.decomposeRewards.push(DecomposeRewardDto.fromJS(item));
1272
+ }
454
1273
  }
455
- if (itemLevel !== undefined) {
456
- localVarQueryParameter['itemLevel'] = itemLevel;
1274
+ this.flavorText = _data["flavorText"];
1275
+ this.usableGroup = _data["usableGroup"];
1276
+ this.levelRequired = _data["levelRequired"];
1277
+ this.boundToAccount = _data["boundToAccount"];
1278
+ this.unableToTrade = _data["unableToTrade"];
1279
+ this.sealing = _data["sealing"] ? ItemSealingDto.fromJS(_data["sealing"]) : undefined;
1280
+ this.accountTransfer = _data["accountTransfer"] ? ItemAccountTransferDto.fromJS(_data["accountTransfer"]) : undefined;
1281
+ this.upgradeInfo = _data["upgradeInfo"] ? ItemUpgradeInfoDto.fromJS(_data["upgradeInfo"]) : undefined;
1282
+ if (Array.isArray(_data["itemTransforms"])) {
1283
+ this.itemTransforms = [];
1284
+ for (var _r = 0, _s = _data["itemTransforms"]; _r < _s.length; _r++) {
1285
+ var item = _s[_r];
1286
+ this.itemTransforms.push(ItemTransformDto.fromJS(item));
1287
+ }
457
1288
  }
458
- if (region !== undefined) {
459
- localVarQueryParameter['region'] = region;
1289
+ this.setPoints = _data["setPoints"];
1290
+ this.refinementPoints = _data["refinementPoints"];
1291
+ if (Array.isArray(_data["slateStones"])) {
1292
+ this.slateStones = [];
1293
+ for (var _t = 0, _u = _data["slateStones"]; _t < _u.length; _t++) {
1294
+ var item = _u[_t];
1295
+ this.slateStones.push(SlateStoneDto.fromJS(item));
1296
+ }
460
1297
  }
461
- if (patch !== undefined) {
462
- localVarQueryParameter['patch'] = patch;
1298
+ }
1299
+ };
1300
+ BnsItemDto.fromJS = function (data) {
1301
+ data = typeof data === 'object' ? data : {};
1302
+ var result = new BnsItemDto();
1303
+ result.init(data);
1304
+ return result;
1305
+ };
1306
+ BnsItemDto.prototype.toJSON = function (data) {
1307
+ data = typeof data === 'object' ? data : {};
1308
+ data["id"] = this.id;
1309
+ data["level"] = this.level;
1310
+ data["gearScore"] = this.gearScore;
1311
+ data["itemScore"] = this.itemScore;
1312
+ data["fusionScore"] = this.fusionScore;
1313
+ data["name"] = this.name;
1314
+ if (Array.isArray(this.categories)) {
1315
+ data["categories"] = [];
1316
+ for (var _i = 0, _a = this.categories; _i < _a.length; _i++) {
1317
+ var item = _a[_i];
1318
+ data["categories"].push(item.toJSON());
463
1319
  }
464
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
465
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
466
- delete localVarUrlObj.search;
467
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
468
- return {
469
- url: url.format(localVarUrlObj),
470
- options: localVarRequestOptions,
471
- };
472
- },
473
- /**
474
- *
475
- * @param {string} idLevel
476
- * @param {string} region
477
- * @param {boolean} [light]
478
- * @param {string} [patch]
479
- * @param {*} [options] Override http request option.
480
- * @throws {RequiredError}
481
- */
482
- bnsItemItemByStringGet: function (idLevel, region, light, patch, options) {
483
- if (options === void 0) { options = {}; }
484
- // verify required parameter 'idLevel' is not null or undefined
485
- if (idLevel === null || idLevel === undefined) {
486
- throw new RequiredError('idLevel', 'Required parameter idLevel was null or undefined when calling bnsItemItemByStringGet.');
1320
+ }
1321
+ data["icon"] = this.icon ? this.icon.toJSON() : undefined;
1322
+ data["grade"] = this.grade;
1323
+ if (Array.isArray(this.classRequired)) {
1324
+ data["classRequired"] = [];
1325
+ for (var _b = 0, _c = this.classRequired; _b < _c.length; _b++) {
1326
+ var item = _c[_b];
1327
+ data["classRequired"].push(item.toJSON());
487
1328
  }
488
- // verify required parameter 'region' is not null or undefined
489
- if (region === null || region === undefined) {
490
- throw new RequiredError('region', 'Required parameter region was null or undefined when calling bnsItemItemByStringGet.');
1329
+ }
1330
+ if (Array.isArray(this.stats)) {
1331
+ data["stats"] = [];
1332
+ for (var _d = 0, _e = this.stats; _d < _e.length; _d++) {
1333
+ var item = _e[_d];
1334
+ data["stats"].push(item.toJSON());
491
1335
  }
492
- var localVarPath = "/BnsItem/ItemByString";
493
- var localVarUrlObj = url.parse(localVarPath, true);
494
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
495
- var localVarHeaderParameter = {};
496
- var localVarQueryParameter = {};
497
- if (idLevel !== undefined) {
498
- localVarQueryParameter['idLevel'] = idLevel;
1336
+ }
1337
+ data["randomSubStatCount"] = this.randomSubStatCount;
1338
+ if (Array.isArray(this.randomStats)) {
1339
+ data["randomStats"] = [];
1340
+ for (var _f = 0, _g = this.randomStats; _f < _g.length; _f++) {
1341
+ var item = _g[_f];
1342
+ data["randomStats"].push(item.toJSON());
499
1343
  }
500
- if (region !== undefined) {
501
- localVarQueryParameter['region'] = region;
1344
+ }
1345
+ data["mainInfo"] = this.mainInfo;
1346
+ data["subInfo"] = this.subInfo;
1347
+ data["cooldownInMs"] = this.cooldownInMs;
1348
+ data["bgCooldownInMs"] = this.bgCooldownInMs;
1349
+ if (Array.isArray(this.skillModifierGroups)) {
1350
+ data["skillModifierGroups"] = [];
1351
+ for (var _h = 0, _j = this.skillModifierGroups; _h < _j.length; _h++) {
1352
+ var item = _j[_h];
1353
+ data["skillModifierGroups"].push(item.toJSON());
502
1354
  }
503
- if (light !== undefined) {
504
- localVarQueryParameter['light'] = light;
1355
+ }
1356
+ data["itemImprove"] = this.itemImprove ? this.itemImprove.toJSON() : undefined;
1357
+ if (Array.isArray(this.skills)) {
1358
+ data["skills"] = [];
1359
+ for (var _k = 0, _l = this.skills; _k < _l.length; _k++) {
1360
+ var item = _l[_k];
1361
+ data["skills"].push(item.toJSON());
505
1362
  }
506
- if (patch !== undefined) {
507
- localVarQueryParameter['patch'] = patch;
1363
+ }
1364
+ data["topText"] = this.topText;
1365
+ data["setBonus"] = this.setBonus ? this.setBonus.toJSON() : undefined;
1366
+ if (Array.isArray(this.descriptions)) {
1367
+ data["descriptions"] = [];
1368
+ for (var _m = 0, _o = this.descriptions; _m < _o.length; _m++) {
1369
+ var item = _o[_m];
1370
+ data["descriptions"].push(item.toJSON());
508
1371
  }
509
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
510
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
511
- delete localVarUrlObj.search;
512
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
513
- return {
514
- url: url.format(localVarUrlObj),
515
- options: localVarRequestOptions,
516
- };
517
- },
518
- /**
519
- *
520
- * @param {number} id
521
- * @param {number} level
522
- * @param {string} region
523
- * @param {boolean} [light]
524
- * @param {string} [patch]
525
- * @param {*} [options] Override http request option.
526
- * @throws {RequiredError}
527
- */
528
- bnsItemItemGet: function (id, level, region, light, patch, options) {
529
- if (options === void 0) { options = {}; }
530
- // verify required parameter 'id' is not null or undefined
531
- if (id === null || id === undefined) {
532
- throw new RequiredError('id', 'Required parameter id was null or undefined when calling bnsItemItemGet.');
1372
+ }
1373
+ if (Array.isArray(this.decomposeRewards)) {
1374
+ data["decomposeRewards"] = [];
1375
+ for (var _p = 0, _q = this.decomposeRewards; _p < _q.length; _p++) {
1376
+ var item = _q[_p];
1377
+ data["decomposeRewards"].push(item.toJSON());
533
1378
  }
534
- // verify required parameter 'level' is not null or undefined
535
- if (level === null || level === undefined) {
536
- throw new RequiredError('level', 'Required parameter level was null or undefined when calling bnsItemItemGet.');
1379
+ }
1380
+ data["flavorText"] = this.flavorText;
1381
+ data["usableGroup"] = this.usableGroup;
1382
+ data["levelRequired"] = this.levelRequired;
1383
+ data["boundToAccount"] = this.boundToAccount;
1384
+ data["unableToTrade"] = this.unableToTrade;
1385
+ data["sealing"] = this.sealing ? this.sealing.toJSON() : undefined;
1386
+ data["accountTransfer"] = this.accountTransfer ? this.accountTransfer.toJSON() : undefined;
1387
+ data["upgradeInfo"] = this.upgradeInfo ? this.upgradeInfo.toJSON() : undefined;
1388
+ if (Array.isArray(this.itemTransforms)) {
1389
+ data["itemTransforms"] = [];
1390
+ for (var _r = 0, _s = this.itemTransforms; _r < _s.length; _r++) {
1391
+ var item = _s[_r];
1392
+ data["itemTransforms"].push(item.toJSON());
1393
+ }
1394
+ }
1395
+ data["setPoints"] = this.setPoints;
1396
+ data["refinementPoints"] = this.refinementPoints;
1397
+ if (Array.isArray(this.slateStones)) {
1398
+ data["slateStones"] = [];
1399
+ for (var _t = 0, _u = this.slateStones; _t < _u.length; _t++) {
1400
+ var item = _u[_t];
1401
+ data["slateStones"].push(item.toJSON());
1402
+ }
1403
+ }
1404
+ return data;
1405
+ };
1406
+ return BnsItemDto;
1407
+ }());
1408
+ var DecomposeRewardDto = /** @class */ (function () {
1409
+ function DecomposeRewardDto(data) {
1410
+ if (data) {
1411
+ for (var property in data) {
1412
+ if (data.hasOwnProperty(property))
1413
+ this[property] = data[property];
1414
+ }
1415
+ }
1416
+ }
1417
+ DecomposeRewardDto.prototype.init = function (_data) {
1418
+ if (_data) {
1419
+ if (Array.isArray(_data["fixedItems"])) {
1420
+ this.fixedItems = [];
1421
+ for (var _i = 0, _a = _data["fixedItems"]; _i < _a.length; _i++) {
1422
+ var item = _a[_i];
1423
+ this.fixedItems.push(ItemRefWithCount.fromJS(item));
1424
+ }
1425
+ }
1426
+ if (Array.isArray(_data["randomItems"])) {
1427
+ this.randomItems = [];
1428
+ for (var _b = 0, _c = _data["randomItems"]; _b < _c.length; _b++) {
1429
+ var item = _c[_b];
1430
+ this.randomItems.push(ItemRefWithCount.fromJS(item));
1431
+ }
1432
+ }
1433
+ if (Array.isArray(_data["selectItems"])) {
1434
+ this.selectItems = [];
1435
+ for (var _d = 0, _e = _data["selectItems"]; _d < _e.length; _d++) {
1436
+ var item = _e[_d];
1437
+ this.selectItems.push(ItemRefWithCount.fromJS(item));
1438
+ }
1439
+ }
1440
+ }
1441
+ };
1442
+ DecomposeRewardDto.fromJS = function (data) {
1443
+ data = typeof data === 'object' ? data : {};
1444
+ var result = new DecomposeRewardDto();
1445
+ result.init(data);
1446
+ return result;
1447
+ };
1448
+ DecomposeRewardDto.prototype.toJSON = function (data) {
1449
+ data = typeof data === 'object' ? data : {};
1450
+ if (Array.isArray(this.fixedItems)) {
1451
+ data["fixedItems"] = [];
1452
+ for (var _i = 0, _a = this.fixedItems; _i < _a.length; _i++) {
1453
+ var item = _a[_i];
1454
+ data["fixedItems"].push(item.toJSON());
1455
+ }
1456
+ }
1457
+ if (Array.isArray(this.randomItems)) {
1458
+ data["randomItems"] = [];
1459
+ for (var _b = 0, _c = this.randomItems; _b < _c.length; _b++) {
1460
+ var item = _c[_b];
1461
+ data["randomItems"].push(item.toJSON());
1462
+ }
1463
+ }
1464
+ if (Array.isArray(this.selectItems)) {
1465
+ data["selectItems"] = [];
1466
+ for (var _d = 0, _e = this.selectItems; _d < _e.length; _d++) {
1467
+ var item = _e[_d];
1468
+ data["selectItems"].push(item.toJSON());
1469
+ }
1470
+ }
1471
+ return data;
1472
+ };
1473
+ return DecomposeRewardDto;
1474
+ }());
1475
+ var EffectDto = /** @class */ (function () {
1476
+ function EffectDto(data) {
1477
+ if (data) {
1478
+ for (var property in data) {
1479
+ if (data.hasOwnProperty(property))
1480
+ this[property] = data[property];
1481
+ }
1482
+ }
1483
+ }
1484
+ EffectDto.prototype.init = function (_data) {
1485
+ if (_data) {
1486
+ this.description = _data["description"];
1487
+ }
1488
+ };
1489
+ EffectDto.fromJS = function (data) {
1490
+ data = typeof data === 'object' ? data : {};
1491
+ var result = new EffectDto();
1492
+ result.init(data);
1493
+ return result;
1494
+ };
1495
+ EffectDto.prototype.toJSON = function (data) {
1496
+ data = typeof data === 'object' ? data : {};
1497
+ data["description"] = this.description;
1498
+ return data;
1499
+ };
1500
+ return EffectDto;
1501
+ }());
1502
+ var Int32StringTuple = /** @class */ (function () {
1503
+ function Int32StringTuple(data) {
1504
+ if (data) {
1505
+ for (var property in data) {
1506
+ if (data.hasOwnProperty(property))
1507
+ this[property] = data[property];
1508
+ }
1509
+ }
1510
+ }
1511
+ Int32StringTuple.prototype.init = function (_data) {
1512
+ if (_data) {
1513
+ this.item1 = _data["item1"];
1514
+ this.item2 = _data["item2"];
1515
+ }
1516
+ };
1517
+ Int32StringTuple.fromJS = function (data) {
1518
+ data = typeof data === 'object' ? data : {};
1519
+ var result = new Int32StringTuple();
1520
+ result.init(data);
1521
+ return result;
1522
+ };
1523
+ Int32StringTuple.prototype.toJSON = function (data) {
1524
+ data = typeof data === 'object' ? data : {};
1525
+ data["item1"] = this.item1;
1526
+ data["item2"] = this.item2;
1527
+ return data;
1528
+ };
1529
+ return Int32StringTuple;
1530
+ }());
1531
+ var ItemAccountTransferDto = /** @class */ (function () {
1532
+ function ItemAccountTransferDto(data) {
1533
+ if (data) {
1534
+ for (var property in data) {
1535
+ if (data.hasOwnProperty(property))
1536
+ this[property] = data[property];
1537
+ }
1538
+ }
1539
+ }
1540
+ ItemAccountTransferDto.prototype.init = function (_data) {
1541
+ if (_data) {
1542
+ if (Array.isArray(_data["requiredItems"])) {
1543
+ this.requiredItems = [];
1544
+ for (var _i = 0, _a = _data["requiredItems"]; _i < _a.length; _i++) {
1545
+ var item = _a[_i];
1546
+ this.requiredItems.push(ItemRefWithCount.fromJS(item));
1547
+ }
1548
+ }
1549
+ this.moneyCost = _data["moneyCost"];
1550
+ }
1551
+ };
1552
+ ItemAccountTransferDto.fromJS = function (data) {
1553
+ data = typeof data === 'object' ? data : {};
1554
+ var result = new ItemAccountTransferDto();
1555
+ result.init(data);
1556
+ return result;
1557
+ };
1558
+ ItemAccountTransferDto.prototype.toJSON = function (data) {
1559
+ data = typeof data === 'object' ? data : {};
1560
+ if (Array.isArray(this.requiredItems)) {
1561
+ data["requiredItems"] = [];
1562
+ for (var _i = 0, _a = this.requiredItems; _i < _a.length; _i++) {
1563
+ var item = _a[_i];
1564
+ data["requiredItems"].push(item.toJSON());
1565
+ }
1566
+ }
1567
+ data["moneyCost"] = this.moneyCost;
1568
+ return data;
1569
+ };
1570
+ return ItemAccountTransferDto;
1571
+ }());
1572
+ var ItemCategoryDto = /** @class */ (function () {
1573
+ function ItemCategoryDto(data) {
1574
+ if (data) {
1575
+ for (var property in data) {
1576
+ if (data.hasOwnProperty(property))
1577
+ this[property] = data[property];
1578
+ }
1579
+ }
1580
+ }
1581
+ ItemCategoryDto.prototype.init = function (_data) {
1582
+ if (_data) {
1583
+ this.technicalName = _data["technicalName"];
1584
+ this.localizedName = _data["localizedName"];
1585
+ this.index = _data["index"];
1586
+ }
1587
+ };
1588
+ ItemCategoryDto.fromJS = function (data) {
1589
+ data = typeof data === 'object' ? data : {};
1590
+ var result = new ItemCategoryDto();
1591
+ result.init(data);
1592
+ return result;
1593
+ };
1594
+ ItemCategoryDto.prototype.toJSON = function (data) {
1595
+ data = typeof data === 'object' ? data : {};
1596
+ data["technicalName"] = this.technicalName;
1597
+ data["localizedName"] = this.localizedName;
1598
+ data["index"] = this.index;
1599
+ return data;
1600
+ };
1601
+ return ItemCategoryDto;
1602
+ }());
1603
+ var ItemDescriptionDto = /** @class */ (function () {
1604
+ function ItemDescriptionDto(data) {
1605
+ if (data) {
1606
+ for (var property in data) {
1607
+ if (data.hasOwnProperty(property))
1608
+ this[property] = data[property];
1609
+ }
1610
+ }
1611
+ }
1612
+ ItemDescriptionDto.prototype.init = function (_data) {
1613
+ if (_data) {
1614
+ this.title = _data["title"];
1615
+ this.text = _data["text"];
1616
+ }
1617
+ };
1618
+ ItemDescriptionDto.fromJS = function (data) {
1619
+ data = typeof data === 'object' ? data : {};
1620
+ var result = new ItemDescriptionDto();
1621
+ result.init(data);
1622
+ return result;
1623
+ };
1624
+ ItemDescriptionDto.prototype.toJSON = function (data) {
1625
+ data = typeof data === 'object' ? data : {};
1626
+ data["title"] = this.title;
1627
+ data["text"] = this.text;
1628
+ return data;
1629
+ };
1630
+ return ItemDescriptionDto;
1631
+ }());
1632
+ var ItemIconDto = /** @class */ (function () {
1633
+ function ItemIconDto(data) {
1634
+ if (data) {
1635
+ for (var property in data) {
1636
+ if (data.hasOwnProperty(property))
1637
+ this[property] = data[property];
1638
+ }
1639
+ }
1640
+ }
1641
+ ItemIconDto.prototype.init = function (_data) {
1642
+ if (_data) {
1643
+ this.iconPath = _data["iconPath"];
1644
+ this.iconIndex = _data["iconIndex"];
1645
+ }
1646
+ };
1647
+ ItemIconDto.fromJS = function (data) {
1648
+ data = typeof data === 'object' ? data : {};
1649
+ var result = new ItemIconDto();
1650
+ result.init(data);
1651
+ return result;
1652
+ };
1653
+ ItemIconDto.prototype.toJSON = function (data) {
1654
+ data = typeof data === 'object' ? data : {};
1655
+ data["iconPath"] = this.iconPath;
1656
+ data["iconIndex"] = this.iconIndex;
1657
+ return data;
1658
+ };
1659
+ return ItemIconDto;
1660
+ }());
1661
+ var ItemImproveCostOptionDto = /** @class */ (function () {
1662
+ function ItemImproveCostOptionDto(data) {
1663
+ if (data) {
1664
+ for (var property in data) {
1665
+ if (data.hasOwnProperty(property))
1666
+ this[property] = data[property];
537
1667
  }
538
- // verify required parameter 'region' is not null or undefined
539
- if (region === null || region === undefined) {
540
- throw new RequiredError('region', 'Required parameter region was null or undefined when calling bnsItemItemGet.');
1668
+ }
1669
+ }
1670
+ ItemImproveCostOptionDto.prototype.init = function (_data) {
1671
+ if (_data) {
1672
+ this.moneyCost = _data["moneyCost"];
1673
+ this.mainItemCost = _data["mainItemCost"] ? ItemRefWithCount.fromJS(_data["mainItemCost"]) : undefined;
1674
+ if (Array.isArray(_data["subItemCost"])) {
1675
+ this.subItemCost = [];
1676
+ for (var _i = 0, _a = _data["subItemCost"]; _i < _a.length; _i++) {
1677
+ var item = _a[_i];
1678
+ this.subItemCost.push(ItemRefWithCount.fromJS(item));
1679
+ }
541
1680
  }
542
- var localVarPath = "/BnsItem/Item";
543
- var localVarUrlObj = url.parse(localVarPath, true);
544
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
545
- var localVarHeaderParameter = {};
546
- var localVarQueryParameter = {};
547
- if (id !== undefined) {
548
- localVarQueryParameter['id'] = id;
1681
+ this.isRandom = _data["isRandom"];
1682
+ }
1683
+ };
1684
+ ItemImproveCostOptionDto.fromJS = function (data) {
1685
+ data = typeof data === 'object' ? data : {};
1686
+ var result = new ItemImproveCostOptionDto();
1687
+ result.init(data);
1688
+ return result;
1689
+ };
1690
+ ItemImproveCostOptionDto.prototype.toJSON = function (data) {
1691
+ data = typeof data === 'object' ? data : {};
1692
+ data["moneyCost"] = this.moneyCost;
1693
+ data["mainItemCost"] = this.mainItemCost ? this.mainItemCost.toJSON() : undefined;
1694
+ if (Array.isArray(this.subItemCost)) {
1695
+ data["subItemCost"] = [];
1696
+ for (var _i = 0, _a = this.subItemCost; _i < _a.length; _i++) {
1697
+ var item = _a[_i];
1698
+ data["subItemCost"].push(item.toJSON());
549
1699
  }
550
- if (level !== undefined) {
551
- localVarQueryParameter['level'] = level;
1700
+ }
1701
+ data["isRandom"] = this.isRandom;
1702
+ return data;
1703
+ };
1704
+ return ItemImproveCostOptionDto;
1705
+ }());
1706
+ var ItemImproveDto = /** @class */ (function () {
1707
+ function ItemImproveDto(data) {
1708
+ if (data) {
1709
+ for (var property in data) {
1710
+ if (data.hasOwnProperty(property))
1711
+ this[property] = data[property];
552
1712
  }
553
- if (region !== undefined) {
554
- localVarQueryParameter['region'] = region;
1713
+ }
1714
+ }
1715
+ ItemImproveDto.prototype.init = function (_data) {
1716
+ if (_data) {
1717
+ if (Array.isArray(_data["upgradeOptions"])) {
1718
+ this.upgradeOptions = [];
1719
+ for (var _i = 0, _a = _data["upgradeOptions"]; _i < _a.length; _i++) {
1720
+ var item = _a[_i];
1721
+ this.upgradeOptions.push(ItemImproveCostOptionDto.fromJS(item));
1722
+ }
555
1723
  }
556
- if (light !== undefined) {
557
- localVarQueryParameter['light'] = light;
1724
+ this.itemNext = _data["itemNext"] ? ItemRefWithCount.fromJS(_data["itemNext"]) : undefined;
1725
+ this.itemPrev = _data["itemPrev"] ? ItemRefWithCount.fromJS(_data["itemPrev"]) : undefined;
1726
+ this.fixedAllOptions = _data["fixedAllOptions"];
1727
+ this.useMileageSave = _data["useMileageSave"];
1728
+ if (Array.isArray(_data["bonusEffectOptions"])) {
1729
+ this.bonusEffectOptions = [];
1730
+ for (var _b = 0, _c = _data["bonusEffectOptions"]; _b < _c.length; _b++) {
1731
+ var item = _c[_b];
1732
+ this.bonusEffectOptions.push(ItemImproveEffectOptionDto.fromJS(item));
1733
+ }
558
1734
  }
559
- if (patch !== undefined) {
560
- localVarQueryParameter['patch'] = patch;
1735
+ }
1736
+ };
1737
+ ItemImproveDto.fromJS = function (data) {
1738
+ data = typeof data === 'object' ? data : {};
1739
+ var result = new ItemImproveDto();
1740
+ result.init(data);
1741
+ return result;
1742
+ };
1743
+ ItemImproveDto.prototype.toJSON = function (data) {
1744
+ data = typeof data === 'object' ? data : {};
1745
+ if (Array.isArray(this.upgradeOptions)) {
1746
+ data["upgradeOptions"] = [];
1747
+ for (var _i = 0, _a = this.upgradeOptions; _i < _a.length; _i++) {
1748
+ var item = _a[_i];
1749
+ data["upgradeOptions"].push(item.toJSON());
561
1750
  }
562
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
563
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
564
- delete localVarUrlObj.search;
565
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
566
- return {
567
- url: url.format(localVarUrlObj),
568
- options: localVarRequestOptions,
569
- };
570
- },
571
- /**
572
- *
573
- * @param {string} region
574
- * @param {string} [category]
575
- * @param {string} [technicalJobName]
576
- * @param {string} [gradesString]
577
- * @param {string} [minGs]
578
- * @param {string} [patch]
579
- * @param {boolean} [noDupes]
580
- * @param {*} [options] Override http request option.
581
- * @throws {RequiredError}
582
- */
583
- bnsItemItemsByCategoryGet: function (region, category, technicalJobName, gradesString, minGs, patch, noDupes, options) {
584
- if (options === void 0) { options = {}; }
585
- // verify required parameter 'region' is not null or undefined
586
- if (region === null || region === undefined) {
587
- throw new RequiredError('region', 'Required parameter region was null or undefined when calling bnsItemItemsByCategoryGet.');
1751
+ }
1752
+ data["itemNext"] = this.itemNext ? this.itemNext.toJSON() : undefined;
1753
+ data["itemPrev"] = this.itemPrev ? this.itemPrev.toJSON() : undefined;
1754
+ data["fixedAllOptions"] = this.fixedAllOptions;
1755
+ data["useMileageSave"] = this.useMileageSave;
1756
+ if (Array.isArray(this.bonusEffectOptions)) {
1757
+ data["bonusEffectOptions"] = [];
1758
+ for (var _b = 0, _c = this.bonusEffectOptions; _b < _c.length; _b++) {
1759
+ var item = _c[_b];
1760
+ data["bonusEffectOptions"].push(item.toJSON());
588
1761
  }
589
- var localVarPath = "/BnsItem/ItemsByCategory";
590
- var localVarUrlObj = url.parse(localVarPath, true);
591
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
592
- var localVarHeaderParameter = {};
593
- var localVarQueryParameter = {};
594
- if (region !== undefined) {
595
- localVarQueryParameter['region'] = region;
1762
+ }
1763
+ return data;
1764
+ };
1765
+ return ItemImproveDto;
1766
+ }());
1767
+ var ItemImproveEffectOptionDto = /** @class */ (function () {
1768
+ function ItemImproveEffectOptionDto(data) {
1769
+ if (data) {
1770
+ for (var property in data) {
1771
+ if (data.hasOwnProperty(property))
1772
+ this[property] = data[property];
596
1773
  }
597
- if (category !== undefined) {
598
- localVarQueryParameter['category'] = category;
1774
+ }
1775
+ }
1776
+ ItemImproveEffectOptionDto.prototype.init = function (_data) {
1777
+ if (_data) {
1778
+ this.statName = _data["statName"];
1779
+ this.statValue = _data["statValue"];
1780
+ this.isEffect = _data["isEffect"];
1781
+ this.effectDescription = _data["effectDescription"];
1782
+ this.icon = _data["icon"] ? ItemIconDto.fromJS(_data["icon"]) : undefined;
1783
+ }
1784
+ };
1785
+ ItemImproveEffectOptionDto.fromJS = function (data) {
1786
+ data = typeof data === 'object' ? data : {};
1787
+ var result = new ItemImproveEffectOptionDto();
1788
+ result.init(data);
1789
+ return result;
1790
+ };
1791
+ ItemImproveEffectOptionDto.prototype.toJSON = function (data) {
1792
+ data = typeof data === 'object' ? data : {};
1793
+ data["statName"] = this.statName;
1794
+ data["statValue"] = this.statValue;
1795
+ data["isEffect"] = this.isEffect;
1796
+ data["effectDescription"] = this.effectDescription;
1797
+ data["icon"] = this.icon ? this.icon.toJSON() : undefined;
1798
+ return data;
1799
+ };
1800
+ return ItemImproveEffectOptionDto;
1801
+ }());
1802
+ var ItemRandomStatDto = /** @class */ (function () {
1803
+ function ItemRandomStatDto(data) {
1804
+ if (data) {
1805
+ for (var property in data) {
1806
+ if (data.hasOwnProperty(property))
1807
+ this[property] = data[property];
599
1808
  }
600
- if (technicalJobName !== undefined) {
601
- localVarQueryParameter['technicalJobName'] = technicalJobName;
1809
+ }
1810
+ }
1811
+ ItemRandomStatDto.prototype.init = function (_data) {
1812
+ if (_data) {
1813
+ this.name = _data["name"];
1814
+ this.min = _data["min"];
1815
+ this.max = _data["max"];
1816
+ this.isPercentage = _data["isPercentage"];
1817
+ this.isMainStat = _data["isMainStat"];
1818
+ this.isFixedSubStat = _data["isFixedSubStat"];
1819
+ }
1820
+ };
1821
+ ItemRandomStatDto.fromJS = function (data) {
1822
+ data = typeof data === 'object' ? data : {};
1823
+ var result = new ItemRandomStatDto();
1824
+ result.init(data);
1825
+ return result;
1826
+ };
1827
+ ItemRandomStatDto.prototype.toJSON = function (data) {
1828
+ data = typeof data === 'object' ? data : {};
1829
+ data["name"] = this.name;
1830
+ data["min"] = this.min;
1831
+ data["max"] = this.max;
1832
+ data["isPercentage"] = this.isPercentage;
1833
+ data["isMainStat"] = this.isMainStat;
1834
+ data["isFixedSubStat"] = this.isFixedSubStat;
1835
+ return data;
1836
+ };
1837
+ return ItemRandomStatDto;
1838
+ }());
1839
+ var ItemRefWithCount = /** @class */ (function () {
1840
+ function ItemRefWithCount(data) {
1841
+ if (data) {
1842
+ for (var property in data) {
1843
+ if (data.hasOwnProperty(property))
1844
+ this[property] = data[property];
602
1845
  }
603
- if (gradesString !== undefined) {
604
- localVarQueryParameter['gradesString'] = gradesString;
1846
+ }
1847
+ }
1848
+ ItemRefWithCount.prototype.init = function (_data) {
1849
+ if (_data) {
1850
+ this.itemId = _data["itemId"];
1851
+ this.itemLevel = _data["itemLevel"];
1852
+ this.min = _data["min"];
1853
+ this.max = _data["max"];
1854
+ this.isMinMax = _data["isMinMax"];
1855
+ this.isRandom = _data["isRandom"];
1856
+ }
1857
+ };
1858
+ ItemRefWithCount.fromJS = function (data) {
1859
+ data = typeof data === 'object' ? data : {};
1860
+ var result = new ItemRefWithCount();
1861
+ result.init(data);
1862
+ return result;
1863
+ };
1864
+ ItemRefWithCount.prototype.toJSON = function (data) {
1865
+ data = typeof data === 'object' ? data : {};
1866
+ data["itemId"] = this.itemId;
1867
+ data["itemLevel"] = this.itemLevel;
1868
+ data["min"] = this.min;
1869
+ data["max"] = this.max;
1870
+ data["isMinMax"] = this.isMinMax;
1871
+ data["isRandom"] = this.isRandom;
1872
+ return data;
1873
+ };
1874
+ return ItemRefWithCount;
1875
+ }());
1876
+ var ItemSealingDto = /** @class */ (function () {
1877
+ function ItemSealingDto(data) {
1878
+ if (data) {
1879
+ for (var property in data) {
1880
+ if (data.hasOwnProperty(property))
1881
+ this[property] = data[property];
605
1882
  }
606
- if (minGs !== undefined) {
607
- localVarQueryParameter['minGs'] = minGs;
1883
+ }
1884
+ }
1885
+ ItemSealingDto.prototype.init = function (_data) {
1886
+ if (_data) {
1887
+ if (Array.isArray(_data["sealConsumeItems"])) {
1888
+ this.sealConsumeItems = [];
1889
+ for (var _i = 0, _a = _data["sealConsumeItems"]; _i < _a.length; _i++) {
1890
+ var item = _a[_i];
1891
+ this.sealConsumeItems.push(ItemRefWithCount.fromJS(item));
1892
+ }
608
1893
  }
609
- if (patch !== undefined) {
610
- localVarQueryParameter['patch'] = patch;
1894
+ this.sealAcquireItemId = _data["sealAcquireItemId"];
1895
+ this.sealAcquireItemLevel = _data["sealAcquireItemLevel"];
1896
+ }
1897
+ };
1898
+ ItemSealingDto.fromJS = function (data) {
1899
+ data = typeof data === 'object' ? data : {};
1900
+ var result = new ItemSealingDto();
1901
+ result.init(data);
1902
+ return result;
1903
+ };
1904
+ ItemSealingDto.prototype.toJSON = function (data) {
1905
+ data = typeof data === 'object' ? data : {};
1906
+ if (Array.isArray(this.sealConsumeItems)) {
1907
+ data["sealConsumeItems"] = [];
1908
+ for (var _i = 0, _a = this.sealConsumeItems; _i < _a.length; _i++) {
1909
+ var item = _a[_i];
1910
+ data["sealConsumeItems"].push(item.toJSON());
611
1911
  }
612
- if (noDupes !== undefined) {
613
- localVarQueryParameter['noDupes'] = noDupes;
1912
+ }
1913
+ data["sealAcquireItemId"] = this.sealAcquireItemId;
1914
+ data["sealAcquireItemLevel"] = this.sealAcquireItemLevel;
1915
+ return data;
1916
+ };
1917
+ return ItemSealingDto;
1918
+ }());
1919
+ var ItemSetBonusDto = /** @class */ (function () {
1920
+ function ItemSetBonusDto(data) {
1921
+ if (data) {
1922
+ for (var property in data) {
1923
+ if (data.hasOwnProperty(property))
1924
+ this[property] = data[property];
614
1925
  }
615
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
616
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
617
- delete localVarUrlObj.search;
618
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
619
- return {
620
- url: url.format(localVarUrlObj),
621
- options: localVarRequestOptions,
622
- };
623
- },
624
- /**
625
- *
626
- * @param {string} name
627
- * @param {string} region
628
- * @param {string} [patch]
629
- * @param {*} [options] Override http request option.
630
- * @throws {RequiredError}
631
- */
632
- bnsItemItemsByNameGet: function (name, region, patch, options) {
633
- if (options === void 0) { options = {}; }
634
- // verify required parameter 'name' is not null or undefined
635
- if (name === null || name === undefined) {
636
- throw new RequiredError('name', 'Required parameter name was null or undefined when calling bnsItemItemsByNameGet.');
1926
+ }
1927
+ }
1928
+ ItemSetBonusDto.prototype.init = function (_data) {
1929
+ if (_data) {
1930
+ this.setName = _data["setName"];
1931
+ if (Array.isArray(_data["setItems"])) {
1932
+ this.setItems = [];
1933
+ for (var _i = 0, _a = _data["setItems"]; _i < _a.length; _i++) {
1934
+ var item = _a[_i];
1935
+ this.setItems.push(SetItemDto.fromJS(item));
1936
+ }
637
1937
  }
638
- // verify required parameter 'region' is not null or undefined
639
- if (region === null || region === undefined) {
640
- throw new RequiredError('region', 'Required parameter region was null or undefined when calling bnsItemItemsByNameGet.');
1938
+ if (Array.isArray(_data["setBonusStages"])) {
1939
+ this.setBonusStages = [];
1940
+ for (var _b = 0, _c = _data["setBonusStages"]; _b < _c.length; _b++) {
1941
+ var item = _c[_b];
1942
+ this.setBonusStages.push(ItemSetBonusStageDto.fromJS(item));
1943
+ }
641
1944
  }
642
- var localVarPath = "/BnsItem/ItemsByName";
643
- var localVarUrlObj = url.parse(localVarPath, true);
644
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
645
- var localVarHeaderParameter = {};
646
- var localVarQueryParameter = {};
647
- if (name !== undefined) {
648
- localVarQueryParameter['name'] = name;
1945
+ }
1946
+ };
1947
+ ItemSetBonusDto.fromJS = function (data) {
1948
+ data = typeof data === 'object' ? data : {};
1949
+ var result = new ItemSetBonusDto();
1950
+ result.init(data);
1951
+ return result;
1952
+ };
1953
+ ItemSetBonusDto.prototype.toJSON = function (data) {
1954
+ data = typeof data === 'object' ? data : {};
1955
+ data["setName"] = this.setName;
1956
+ if (Array.isArray(this.setItems)) {
1957
+ data["setItems"] = [];
1958
+ for (var _i = 0, _a = this.setItems; _i < _a.length; _i++) {
1959
+ var item = _a[_i];
1960
+ data["setItems"].push(item.toJSON());
649
1961
  }
650
- if (region !== undefined) {
651
- localVarQueryParameter['region'] = region;
1962
+ }
1963
+ if (Array.isArray(this.setBonusStages)) {
1964
+ data["setBonusStages"] = [];
1965
+ for (var _b = 0, _c = this.setBonusStages; _b < _c.length; _b++) {
1966
+ var item = _c[_b];
1967
+ data["setBonusStages"].push(item.toJSON());
652
1968
  }
653
- if (patch !== undefined) {
654
- localVarQueryParameter['patch'] = patch;
1969
+ }
1970
+ return data;
1971
+ };
1972
+ return ItemSetBonusDto;
1973
+ }());
1974
+ var ItemSetBonusStageDto = /** @class */ (function () {
1975
+ function ItemSetBonusStageDto(data) {
1976
+ if (data) {
1977
+ for (var property in data) {
1978
+ if (data.hasOwnProperty(property))
1979
+ this[property] = data[property];
655
1980
  }
656
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
657
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
658
- delete localVarUrlObj.search;
659
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
660
- return {
661
- url: url.format(localVarUrlObj),
662
- options: localVarRequestOptions,
663
- };
664
- },
665
- /**
666
- *
667
- * @param {number} count
668
- * @param {string} region
669
- * @param {number} [offset]
670
- * @param {string} [patch]
671
- * @param {*} [options] Override http request option.
672
- * @throws {RequiredError}
673
- */
674
- bnsItemItemsGet: function (count, region, offset, patch, options) {
675
- if (options === void 0) { options = {}; }
676
- // verify required parameter 'count' is not null or undefined
677
- if (count === null || count === undefined) {
678
- throw new RequiredError('count', 'Required parameter count was null or undefined when calling bnsItemItemsGet.');
1981
+ }
1982
+ }
1983
+ ItemSetBonusStageDto.prototype.init = function (_data) {
1984
+ if (_data) {
1985
+ this.setNumber = _data["setNumber"];
1986
+ if (Array.isArray(_data["effects"])) {
1987
+ this.effects = [];
1988
+ for (var _i = 0, _a = _data["effects"]; _i < _a.length; _i++) {
1989
+ var item = _a[_i];
1990
+ this.effects.push(EffectDto.fromJS(item));
1991
+ }
679
1992
  }
680
- // verify required parameter 'region' is not null or undefined
681
- if (region === null || region === undefined) {
682
- throw new RequiredError('region', 'Required parameter region was null or undefined when calling bnsItemItemsGet.');
1993
+ if (Array.isArray(_data["skillModifiers"])) {
1994
+ this.skillModifiers = [];
1995
+ for (var _b = 0, _c = _data["skillModifiers"]; _b < _c.length; _b++) {
1996
+ var item = _c[_b];
1997
+ this.skillModifiers.push(SkillModifierGroupDto.fromJS(item));
1998
+ }
683
1999
  }
684
- var localVarPath = "/BnsItem/Items";
685
- var localVarUrlObj = url.parse(localVarPath, true);
686
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
687
- var localVarHeaderParameter = {};
688
- var localVarQueryParameter = {};
689
- if (count !== undefined) {
690
- localVarQueryParameter['count'] = count;
2000
+ }
2001
+ };
2002
+ ItemSetBonusStageDto.fromJS = function (data) {
2003
+ data = typeof data === 'object' ? data : {};
2004
+ var result = new ItemSetBonusStageDto();
2005
+ result.init(data);
2006
+ return result;
2007
+ };
2008
+ ItemSetBonusStageDto.prototype.toJSON = function (data) {
2009
+ data = typeof data === 'object' ? data : {};
2010
+ data["setNumber"] = this.setNumber;
2011
+ if (Array.isArray(this.effects)) {
2012
+ data["effects"] = [];
2013
+ for (var _i = 0, _a = this.effects; _i < _a.length; _i++) {
2014
+ var item = _a[_i];
2015
+ data["effects"].push(item.toJSON());
691
2016
  }
692
- if (region !== undefined) {
693
- localVarQueryParameter['region'] = region;
2017
+ }
2018
+ if (Array.isArray(this.skillModifiers)) {
2019
+ data["skillModifiers"] = [];
2020
+ for (var _b = 0, _c = this.skillModifiers; _b < _c.length; _b++) {
2021
+ var item = _c[_b];
2022
+ data["skillModifiers"].push(item.toJSON());
694
2023
  }
695
- if (offset !== undefined) {
696
- localVarQueryParameter['offset'] = offset;
2024
+ }
2025
+ return data;
2026
+ };
2027
+ return ItemSetBonusStageDto;
2028
+ }());
2029
+ var ItemSkillDto = /** @class */ (function () {
2030
+ function ItemSkillDto(data) {
2031
+ if (data) {
2032
+ for (var property in data) {
2033
+ if (data.hasOwnProperty(property))
2034
+ this[property] = data[property];
697
2035
  }
698
- if (patch !== undefined) {
699
- localVarQueryParameter['patch'] = patch;
2036
+ }
2037
+ }
2038
+ ItemSkillDto.prototype.init = function (_data) {
2039
+ if (_data) {
2040
+ this.title = _data["title"];
2041
+ this.description = _data["description"];
2042
+ this.jobstyle = _data["jobstyle"];
2043
+ }
2044
+ };
2045
+ ItemSkillDto.fromJS = function (data) {
2046
+ data = typeof data === 'object' ? data : {};
2047
+ var result = new ItemSkillDto();
2048
+ result.init(data);
2049
+ return result;
2050
+ };
2051
+ ItemSkillDto.prototype.toJSON = function (data) {
2052
+ data = typeof data === 'object' ? data : {};
2053
+ data["title"] = this.title;
2054
+ data["description"] = this.description;
2055
+ data["jobstyle"] = this.jobstyle;
2056
+ return data;
2057
+ };
2058
+ return ItemSkillDto;
2059
+ }());
2060
+ var ItemStatDto = /** @class */ (function () {
2061
+ function ItemStatDto(data) {
2062
+ if (data) {
2063
+ for (var property in data) {
2064
+ if (data.hasOwnProperty(property))
2065
+ this[property] = data[property];
700
2066
  }
701
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
702
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
703
- delete localVarUrlObj.search;
704
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
705
- return {
706
- url: url.format(localVarUrlObj),
707
- options: localVarRequestOptions,
708
- };
709
- },
710
- /**
711
- *
712
- * @param {string} region
713
- * @param {*} [options] Override http request option.
714
- * @throws {RequiredError}
715
- */
716
- bnsItemLatestPatchGet: function (region, options) {
717
- if (options === void 0) { options = {}; }
718
- // verify required parameter 'region' is not null or undefined
719
- if (region === null || region === undefined) {
720
- throw new RequiredError('region', 'Required parameter region was null or undefined when calling bnsItemLatestPatchGet.');
2067
+ }
2068
+ }
2069
+ ItemStatDto.prototype.init = function (_data) {
2070
+ if (_data) {
2071
+ this.name = _data["name"];
2072
+ this.value = _data["value"];
2073
+ this.isPercentage = _data["isPercentage"];
2074
+ this.isMainStat = _data["isMainStat"];
2075
+ }
2076
+ };
2077
+ ItemStatDto.fromJS = function (data) {
2078
+ data = typeof data === 'object' ? data : {};
2079
+ var result = new ItemStatDto();
2080
+ result.init(data);
2081
+ return result;
2082
+ };
2083
+ ItemStatDto.prototype.toJSON = function (data) {
2084
+ data = typeof data === 'object' ? data : {};
2085
+ data["name"] = this.name;
2086
+ data["value"] = this.value;
2087
+ data["isPercentage"] = this.isPercentage;
2088
+ data["isMainStat"] = this.isMainStat;
2089
+ return data;
2090
+ };
2091
+ return ItemStatDto;
2092
+ }());
2093
+ var ItemTransformDto = /** @class */ (function () {
2094
+ function ItemTransformDto(data) {
2095
+ if (data) {
2096
+ for (var property in data) {
2097
+ if (data.hasOwnProperty(property))
2098
+ this[property] = data[property];
721
2099
  }
722
- var localVarPath = "/BnsItem/LatestPatch";
723
- var localVarUrlObj = url.parse(localVarPath, true);
724
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
725
- var localVarHeaderParameter = {};
726
- var localVarQueryParameter = {};
727
- if (region !== undefined) {
728
- localVarQueryParameter['region'] = region;
2100
+ }
2101
+ }
2102
+ ItemTransformDto.prototype.init = function (_data) {
2103
+ if (_data) {
2104
+ this.moneyCost = _data["moneyCost"];
2105
+ if (Array.isArray(_data["itemCost"])) {
2106
+ this.itemCost = [];
2107
+ for (var _i = 0, _a = _data["itemCost"]; _i < _a.length; _i++) {
2108
+ var item = _a[_i];
2109
+ this.itemCost.push(ItemRefWithCount.fromJS(item));
2110
+ }
729
2111
  }
730
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
731
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
732
- delete localVarUrlObj.search;
733
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
734
- return {
735
- url: url.format(localVarUrlObj),
736
- options: localVarRequestOptions,
737
- };
738
- },
739
- /**
740
- *
741
- * @param {string} region
742
- * @param {*} [options] Override http request option.
743
- * @throws {RequiredError}
744
- */
745
- bnsItemPatchesGet: function (region, options) {
746
- if (options === void 0) { options = {}; }
747
- // verify required parameter 'region' is not null or undefined
748
- if (region === null || region === undefined) {
749
- throw new RequiredError('region', 'Required parameter region was null or undefined when calling bnsItemPatchesGet.');
2112
+ this.itemReward = _data["itemReward"] ? ItemRefWithCount.fromJS(_data["itemReward"]) : undefined;
2113
+ }
2114
+ };
2115
+ ItemTransformDto.fromJS = function (data) {
2116
+ data = typeof data === 'object' ? data : {};
2117
+ var result = new ItemTransformDto();
2118
+ result.init(data);
2119
+ return result;
2120
+ };
2121
+ ItemTransformDto.prototype.toJSON = function (data) {
2122
+ data = typeof data === 'object' ? data : {};
2123
+ data["moneyCost"] = this.moneyCost;
2124
+ if (Array.isArray(this.itemCost)) {
2125
+ data["itemCost"] = [];
2126
+ for (var _i = 0, _a = this.itemCost; _i < _a.length; _i++) {
2127
+ var item = _a[_i];
2128
+ data["itemCost"].push(item.toJSON());
750
2129
  }
751
- var localVarPath = "/BnsItem/Patches";
752
- var localVarUrlObj = url.parse(localVarPath, true);
753
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
754
- var localVarHeaderParameter = {};
755
- var localVarQueryParameter = {};
756
- if (region !== undefined) {
757
- localVarQueryParameter['region'] = region;
2130
+ }
2131
+ data["itemReward"] = this.itemReward ? this.itemReward.toJSON() : undefined;
2132
+ return data;
2133
+ };
2134
+ return ItemTransformDto;
2135
+ }());
2136
+ var ItemUpgradeInfoDto = /** @class */ (function () {
2137
+ function ItemUpgradeInfoDto(data) {
2138
+ if (data) {
2139
+ for (var property in data) {
2140
+ if (data.hasOwnProperty(property))
2141
+ this[property] = data[property];
758
2142
  }
759
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
760
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
761
- delete localVarUrlObj.search;
762
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
763
- return {
764
- url: url.format(localVarUrlObj),
765
- options: localVarRequestOptions,
766
- };
767
- },
768
- /**
769
- *
770
- * @param {*} [options] Override http request option.
771
- * @throws {RequiredError}
772
- */
773
- bnsItemPingGet: function (options) {
774
- if (options === void 0) { options = {}; }
775
- var localVarPath = "/BnsItem/Ping";
776
- var localVarUrlObj = url.parse(localVarPath, true);
777
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
778
- var localVarHeaderParameter = {};
779
- var localVarQueryParameter = {};
780
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
781
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
782
- delete localVarUrlObj.search;
783
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
784
- return {
785
- url: url.format(localVarUrlObj),
786
- options: localVarRequestOptions,
787
- };
788
- },
789
- /**
790
- *
791
- * @param {*} [options] Override http request option.
792
- * @throws {RequiredError}
793
- */
794
- bnsItemRegionsGet: function (options) {
795
- if (options === void 0) { options = {}; }
796
- var localVarPath = "/BnsItem/Regions";
797
- var localVarUrlObj = url.parse(localVarPath, true);
798
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
799
- var localVarHeaderParameter = {};
800
- var localVarQueryParameter = {};
801
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
802
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
803
- delete localVarUrlObj.search;
804
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
805
- return {
806
- url: url.format(localVarUrlObj),
807
- options: localVarRequestOptions,
808
- };
809
- },
810
- /**
811
- *
812
- * @param {string} region
813
- * @param {string} itemType
814
- * @param {string} technicalJobName
815
- * @param {string} [patch]
816
- * @param {*} [options] Override http request option.
817
- * @throws {RequiredError}
818
- */
819
- bnsItemYastItemsGet: function (region, itemType, technicalJobName, patch, options) {
820
- if (options === void 0) { options = {}; }
821
- // verify required parameter 'region' is not null or undefined
822
- if (region === null || region === undefined) {
823
- throw new RequiredError('region', 'Required parameter region was null or undefined when calling bnsItemYastItemsGet.');
2143
+ }
2144
+ }
2145
+ ItemUpgradeInfoDto.prototype.init = function (_data) {
2146
+ if (_data) {
2147
+ this.moneyCost = _data["moneyCost"];
2148
+ if (Array.isArray(_data["itemCost"])) {
2149
+ this.itemCost = [];
2150
+ for (var _i = 0, _a = _data["itemCost"]; _i < _a.length; _i++) {
2151
+ var item = _a[_i];
2152
+ this.itemCost.push(ItemRefWithCount.fromJS(item));
2153
+ }
824
2154
  }
825
- // verify required parameter 'itemType' is not null or undefined
826
- if (itemType === null || itemType === undefined) {
827
- throw new RequiredError('itemType', 'Required parameter itemType was null or undefined when calling bnsItemYastItemsGet.');
2155
+ this.offerItemId = _data["offerItemId"];
2156
+ this.offerItemLevel = _data["offerItemLevel"];
2157
+ }
2158
+ };
2159
+ ItemUpgradeInfoDto.fromJS = function (data) {
2160
+ data = typeof data === 'object' ? data : {};
2161
+ var result = new ItemUpgradeInfoDto();
2162
+ result.init(data);
2163
+ return result;
2164
+ };
2165
+ ItemUpgradeInfoDto.prototype.toJSON = function (data) {
2166
+ data = typeof data === 'object' ? data : {};
2167
+ data["moneyCost"] = this.moneyCost;
2168
+ if (Array.isArray(this.itemCost)) {
2169
+ data["itemCost"] = [];
2170
+ for (var _i = 0, _a = this.itemCost; _i < _a.length; _i++) {
2171
+ var item = _a[_i];
2172
+ data["itemCost"].push(item.toJSON());
828
2173
  }
829
- // verify required parameter 'technicalJobName' is not null or undefined
830
- if (technicalJobName === null || technicalJobName === undefined) {
831
- throw new RequiredError('technicalJobName', 'Required parameter technicalJobName was null or undefined when calling bnsItemYastItemsGet.');
2174
+ }
2175
+ data["offerItemId"] = this.offerItemId;
2176
+ data["offerItemLevel"] = this.offerItemLevel;
2177
+ return data;
2178
+ };
2179
+ return ItemUpgradeInfoDto;
2180
+ }());
2181
+ var ItemWithStagesDto = /** @class */ (function () {
2182
+ function ItemWithStagesDto(data) {
2183
+ if (data) {
2184
+ for (var property in data) {
2185
+ if (data.hasOwnProperty(property))
2186
+ this[property] = data[property];
832
2187
  }
833
- var localVarPath = "/BnsItem/YastItems";
834
- var localVarUrlObj = url.parse(localVarPath, true);
835
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
836
- var localVarHeaderParameter = {};
837
- var localVarQueryParameter = {};
838
- if (region !== undefined) {
839
- localVarQueryParameter['region'] = region;
2188
+ }
2189
+ }
2190
+ ItemWithStagesDto.prototype.init = function (_data) {
2191
+ if (_data) {
2192
+ this.item = _data["item"] ? BnsItemDto.fromJS(_data["item"]) : undefined;
2193
+ if (_data["jsonDiffPatchesForIds"]) {
2194
+ this.jsonDiffPatchesForIds = {};
2195
+ for (var key in _data["jsonDiffPatchesForIds"]) {
2196
+ if (_data["jsonDiffPatchesForIds"].hasOwnProperty(key))
2197
+ this.jsonDiffPatchesForIds[key] = _data["jsonDiffPatchesForIds"][key];
2198
+ }
840
2199
  }
841
- if (itemType !== undefined) {
842
- localVarQueryParameter['itemType'] = itemType;
2200
+ }
2201
+ };
2202
+ ItemWithStagesDto.fromJS = function (data) {
2203
+ data = typeof data === 'object' ? data : {};
2204
+ var result = new ItemWithStagesDto();
2205
+ result.init(data);
2206
+ return result;
2207
+ };
2208
+ ItemWithStagesDto.prototype.toJSON = function (data) {
2209
+ data = typeof data === 'object' ? data : {};
2210
+ data["item"] = this.item ? this.item.toJSON() : undefined;
2211
+ if (this.jsonDiffPatchesForIds) {
2212
+ data["jsonDiffPatchesForIds"] = {};
2213
+ for (var key in this.jsonDiffPatchesForIds) {
2214
+ if (this.jsonDiffPatchesForIds.hasOwnProperty(key))
2215
+ data["jsonDiffPatchesForIds"][key] = this.jsonDiffPatchesForIds[key];
843
2216
  }
844
- if (technicalJobName !== undefined) {
845
- localVarQueryParameter['technicalJobName'] = technicalJobName;
2217
+ }
2218
+ return data;
2219
+ };
2220
+ return ItemWithStagesDto;
2221
+ }());
2222
+ var PatchesListPatch = /** @class */ (function () {
2223
+ function PatchesListPatch(data) {
2224
+ if (data) {
2225
+ for (var property in data) {
2226
+ if (data.hasOwnProperty(property))
2227
+ this[property] = data[property];
846
2228
  }
847
- if (patch !== undefined) {
848
- localVarQueryParameter['patch'] = patch;
2229
+ }
2230
+ }
2231
+ PatchesListPatch.prototype.init = function (_data) {
2232
+ if (_data) {
2233
+ this.short = _data["short"];
2234
+ this.text = _data["text"];
2235
+ this.index = _data["index"];
2236
+ }
2237
+ };
2238
+ PatchesListPatch.fromJS = function (data) {
2239
+ data = typeof data === 'object' ? data : {};
2240
+ var result = new PatchesListPatch();
2241
+ result.init(data);
2242
+ return result;
2243
+ };
2244
+ PatchesListPatch.prototype.toJSON = function (data) {
2245
+ data = typeof data === 'object' ? data : {};
2246
+ data["short"] = this.short;
2247
+ data["text"] = this.text;
2248
+ data["index"] = this.index;
2249
+ return data;
2250
+ };
2251
+ return PatchesListPatch;
2252
+ }());
2253
+ var RequiredClassDto = /** @class */ (function () {
2254
+ function RequiredClassDto(data) {
2255
+ if (data) {
2256
+ for (var property in data) {
2257
+ if (data.hasOwnProperty(property))
2258
+ this[property] = data[property];
849
2259
  }
850
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
851
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
852
- delete localVarUrlObj.search;
853
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
854
- return {
855
- url: url.format(localVarUrlObj),
856
- options: localVarRequestOptions,
857
- };
858
- },
2260
+ }
2261
+ }
2262
+ RequiredClassDto.prototype.init = function (_data) {
2263
+ if (_data) {
2264
+ this.enName = _data["enName"];
2265
+ this.technicalName = _data["technicalName"];
2266
+ }
859
2267
  };
860
- };
861
- /**
862
- * BnsItemApi - functional programming interface
863
- * @export
864
- */
865
- var BnsItemApiFp = function (configuration) {
866
- return {
867
- /**
868
- *
869
- * @param {boolean} added
870
- * @param {boolean} modified
871
- * @param {string} region
872
- * @param {string} [patch]
873
- * @param {*} [options] Override http request option.
874
- * @throws {RequiredError}
875
- */
876
- bnsItemAddedOrModifiedItemsGet: function (added, modified, region, patch, options) {
877
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemAddedOrModifiedItemsGet(added, modified, region, patch, options);
878
- return function (fetch, basePath) {
879
- if (fetch === void 0) { fetch = isomorphicFetch; }
880
- if (basePath === void 0) { basePath = BASE_PATH; }
881
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
882
- if (response.status >= 200 && response.status < 300) {
883
- return response.json();
884
- }
885
- else {
886
- throw response;
887
- }
888
- });
889
- };
890
- },
891
- /**
892
- *
893
- * @param {number} [itemId]
894
- * @param {number} [itemLevel]
895
- * @param {string} [region]
896
- * @param {string} [patch]
897
- * @param {*} [options] Override http request option.
898
- * @throws {RequiredError}
899
- */
900
- bnsItemAllStagesForItemGet: function (itemId, itemLevel, region, patch, options) {
901
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemAllStagesForItemGet(itemId, itemLevel, region, patch, options);
902
- return function (fetch, basePath) {
903
- if (fetch === void 0) { fetch = isomorphicFetch; }
904
- if (basePath === void 0) { basePath = BASE_PATH; }
905
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
906
- if (response.status >= 200 && response.status < 300) {
907
- return response.json();
908
- }
909
- else {
910
- throw response;
911
- }
912
- });
913
- };
914
- },
915
- /**
916
- *
917
- * @param {number} [itemId]
918
- * @param {number} [itemLevel]
919
- * @param {string} [region]
920
- * @param {string} [patch]
921
- * @param {*} [options] Override http request option.
922
- * @throws {RequiredError}
923
- */
924
- bnsItemAllUpgradesForItemGet: function (itemId, itemLevel, region, patch, options) {
925
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemAllUpgradesForItemGet(itemId, itemLevel, region, patch, options);
926
- return function (fetch, basePath) {
927
- if (fetch === void 0) { fetch = isomorphicFetch; }
928
- if (basePath === void 0) { basePath = BASE_PATH; }
929
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
930
- if (response.status >= 200 && response.status < 300) {
931
- return response.json();
932
- }
933
- else {
934
- throw response;
935
- }
936
- });
937
- };
938
- },
939
- /**
940
- *
941
- * @param {string} idLevel
942
- * @param {string} region
943
- * @param {boolean} [light]
944
- * @param {string} [patch]
945
- * @param {*} [options] Override http request option.
946
- * @throws {RequiredError}
947
- */
948
- bnsItemItemByStringGet: function (idLevel, region, light, patch, options) {
949
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemItemByStringGet(idLevel, region, light, patch, options);
950
- return function (fetch, basePath) {
951
- if (fetch === void 0) { fetch = isomorphicFetch; }
952
- if (basePath === void 0) { basePath = BASE_PATH; }
953
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
954
- if (response.status >= 200 && response.status < 300) {
955
- return response.json();
956
- }
957
- else {
958
- throw response;
959
- }
960
- });
961
- };
962
- },
963
- /**
964
- *
965
- * @param {number} id
966
- * @param {number} level
967
- * @param {string} region
968
- * @param {boolean} [light]
969
- * @param {string} [patch]
970
- * @param {*} [options] Override http request option.
971
- * @throws {RequiredError}
972
- */
973
- bnsItemItemGet: function (id, level, region, light, patch, options) {
974
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemItemGet(id, level, region, light, patch, options);
975
- return function (fetch, basePath) {
976
- if (fetch === void 0) { fetch = isomorphicFetch; }
977
- if (basePath === void 0) { basePath = BASE_PATH; }
978
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
979
- if (response.status >= 200 && response.status < 300) {
980
- return response.json();
981
- }
982
- else {
983
- throw response;
984
- }
985
- });
986
- };
987
- },
988
- /**
989
- *
990
- * @param {string} region
991
- * @param {string} [category]
992
- * @param {string} [technicalJobName]
993
- * @param {string} [gradesString]
994
- * @param {string} [minGs]
995
- * @param {string} [patch]
996
- * @param {boolean} [noDupes]
997
- * @param {*} [options] Override http request option.
998
- * @throws {RequiredError}
999
- */
1000
- bnsItemItemsByCategoryGet: function (region, category, technicalJobName, gradesString, minGs, patch, noDupes, options) {
1001
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemItemsByCategoryGet(region, category, technicalJobName, gradesString, minGs, patch, noDupes, options);
1002
- return function (fetch, basePath) {
1003
- if (fetch === void 0) { fetch = isomorphicFetch; }
1004
- if (basePath === void 0) { basePath = BASE_PATH; }
1005
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
1006
- if (response.status >= 200 && response.status < 300) {
1007
- return response.json();
1008
- }
1009
- else {
1010
- throw response;
1011
- }
1012
- });
1013
- };
1014
- },
1015
- /**
1016
- *
1017
- * @param {string} name
1018
- * @param {string} region
1019
- * @param {string} [patch]
1020
- * @param {*} [options] Override http request option.
1021
- * @throws {RequiredError}
1022
- */
1023
- bnsItemItemsByNameGet: function (name, region, patch, options) {
1024
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemItemsByNameGet(name, region, patch, options);
1025
- return function (fetch, basePath) {
1026
- if (fetch === void 0) { fetch = isomorphicFetch; }
1027
- if (basePath === void 0) { basePath = BASE_PATH; }
1028
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
1029
- if (response.status >= 200 && response.status < 300) {
1030
- return response.json();
1031
- }
1032
- else {
1033
- throw response;
1034
- }
1035
- });
1036
- };
1037
- },
1038
- /**
1039
- *
1040
- * @param {number} count
1041
- * @param {string} region
1042
- * @param {number} [offset]
1043
- * @param {string} [patch]
1044
- * @param {*} [options] Override http request option.
1045
- * @throws {RequiredError}
1046
- */
1047
- bnsItemItemsGet: function (count, region, offset, patch, options) {
1048
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemItemsGet(count, region, offset, patch, options);
1049
- return function (fetch, basePath) {
1050
- if (fetch === void 0) { fetch = isomorphicFetch; }
1051
- if (basePath === void 0) { basePath = BASE_PATH; }
1052
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
1053
- if (response.status >= 200 && response.status < 300) {
1054
- return response.json();
1055
- }
1056
- else {
1057
- throw response;
1058
- }
1059
- });
1060
- };
1061
- },
1062
- /**
1063
- *
1064
- * @param {string} region
1065
- * @param {*} [options] Override http request option.
1066
- * @throws {RequiredError}
1067
- */
1068
- bnsItemLatestPatchGet: function (region, options) {
1069
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemLatestPatchGet(region, options);
1070
- return function (fetch, basePath) {
1071
- if (fetch === void 0) { fetch = isomorphicFetch; }
1072
- if (basePath === void 0) { basePath = BASE_PATH; }
1073
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
1074
- if (response.status >= 200 && response.status < 300) {
1075
- return response.json();
1076
- }
1077
- else {
1078
- throw response;
1079
- }
1080
- });
1081
- };
1082
- },
1083
- /**
1084
- *
1085
- * @param {string} region
1086
- * @param {*} [options] Override http request option.
1087
- * @throws {RequiredError}
1088
- */
1089
- bnsItemPatchesGet: function (region, options) {
1090
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemPatchesGet(region, options);
1091
- return function (fetch, basePath) {
1092
- if (fetch === void 0) { fetch = isomorphicFetch; }
1093
- if (basePath === void 0) { basePath = BASE_PATH; }
1094
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
1095
- if (response.status >= 200 && response.status < 300) {
1096
- return response.json();
1097
- }
1098
- else {
1099
- throw response;
1100
- }
1101
- });
1102
- };
1103
- },
1104
- /**
1105
- *
1106
- * @param {*} [options] Override http request option.
1107
- * @throws {RequiredError}
1108
- */
1109
- bnsItemPingGet: function (options) {
1110
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemPingGet(options);
1111
- return function (fetch, basePath) {
1112
- if (fetch === void 0) { fetch = isomorphicFetch; }
1113
- if (basePath === void 0) { basePath = BASE_PATH; }
1114
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
1115
- if (response.status >= 200 && response.status < 300) {
1116
- return response.json();
1117
- }
1118
- else {
1119
- throw response;
1120
- }
1121
- });
1122
- };
1123
- },
1124
- /**
1125
- *
1126
- * @param {*} [options] Override http request option.
1127
- * @throws {RequiredError}
1128
- */
1129
- bnsItemRegionsGet: function (options) {
1130
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemRegionsGet(options);
1131
- return function (fetch, basePath) {
1132
- if (fetch === void 0) { fetch = isomorphicFetch; }
1133
- if (basePath === void 0) { basePath = BASE_PATH; }
1134
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
1135
- if (response.status >= 200 && response.status < 300) {
1136
- return response.json();
1137
- }
1138
- else {
1139
- throw response;
1140
- }
1141
- });
1142
- };
1143
- },
1144
- /**
1145
- *
1146
- * @param {string} region
1147
- * @param {string} itemType
1148
- * @param {string} technicalJobName
1149
- * @param {string} [patch]
1150
- * @param {*} [options] Override http request option.
1151
- * @throws {RequiredError}
1152
- */
1153
- bnsItemYastItemsGet: function (region, itemType, technicalJobName, patch, options) {
1154
- var localVarFetchArgs = BnsItemApiFetchParamCreator().bnsItemYastItemsGet(region, itemType, technicalJobName, patch, options);
1155
- return function (fetch, basePath) {
1156
- if (fetch === void 0) { fetch = isomorphicFetch; }
1157
- if (basePath === void 0) { basePath = BASE_PATH; }
1158
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
1159
- if (response.status >= 200 && response.status < 300) {
1160
- return response.json();
1161
- }
1162
- else {
1163
- throw response;
1164
- }
1165
- });
1166
- };
1167
- },
2268
+ RequiredClassDto.fromJS = function (data) {
2269
+ data = typeof data === 'object' ? data : {};
2270
+ var result = new RequiredClassDto();
2271
+ result.init(data);
2272
+ return result;
1168
2273
  };
1169
- };
1170
- /**
1171
- * BnsItemApi - object-oriented interface
1172
- * @export
1173
- * @class BnsItemApi
1174
- * @extends {BaseAPI}
1175
- */
1176
- var BnsItemApi = /** @class */ (function (_super) {
1177
- __extends(BnsItemApi, _super);
1178
- function BnsItemApi() {
1179
- return _super !== null && _super.apply(this, arguments) || this;
2274
+ RequiredClassDto.prototype.toJSON = function (data) {
2275
+ data = typeof data === 'object' ? data : {};
2276
+ data["enName"] = this.enName;
2277
+ data["technicalName"] = this.technicalName;
2278
+ return data;
2279
+ };
2280
+ return RequiredClassDto;
2281
+ }());
2282
+ var SetItemDto = /** @class */ (function () {
2283
+ function SetItemDto(data) {
2284
+ if (data) {
2285
+ for (var property in data) {
2286
+ if (data.hasOwnProperty(property))
2287
+ this[property] = data[property];
2288
+ }
2289
+ }
1180
2290
  }
1181
- /**
1182
- *
1183
- * @param {boolean} added
1184
- * @param {boolean} modified
1185
- * @param {string} region
1186
- * @param {string} [patch]
1187
- * @param {*} [options] Override http request option.
1188
- * @throws {RequiredError}
1189
- * @memberof BnsItemApi
1190
- */
1191
- BnsItemApi.prototype.bnsItemAddedOrModifiedItemsGet = function (added, modified, region, patch, options) {
1192
- return BnsItemApiFp(this.configuration).bnsItemAddedOrModifiedItemsGet(added, modified, region, patch, options)(this.fetch, this.basePath);
2291
+ SetItemDto.prototype.init = function (_data) {
2292
+ if (_data) {
2293
+ this.itemName = _data["itemName"];
2294
+ this.itemIcon = _data["itemIcon"] ? ItemIconDto.fromJS(_data["itemIcon"]) : undefined;
2295
+ }
1193
2296
  };
1194
- /**
1195
- *
1196
- * @param {number} [itemId]
1197
- * @param {number} [itemLevel]
1198
- * @param {string} [region]
1199
- * @param {string} [patch]
1200
- * @param {*} [options] Override http request option.
1201
- * @throws {RequiredError}
1202
- * @memberof BnsItemApi
1203
- */
1204
- BnsItemApi.prototype.bnsItemAllStagesForItemGet = function (itemId, itemLevel, region, patch, options) {
1205
- return BnsItemApiFp(this.configuration).bnsItemAllStagesForItemGet(itemId, itemLevel, region, patch, options)(this.fetch, this.basePath);
2297
+ SetItemDto.fromJS = function (data) {
2298
+ data = typeof data === 'object' ? data : {};
2299
+ var result = new SetItemDto();
2300
+ result.init(data);
2301
+ return result;
1206
2302
  };
1207
- /**
1208
- *
1209
- * @param {number} [itemId]
1210
- * @param {number} [itemLevel]
1211
- * @param {string} [region]
1212
- * @param {string} [patch]
1213
- * @param {*} [options] Override http request option.
1214
- * @throws {RequiredError}
1215
- * @memberof BnsItemApi
1216
- */
1217
- BnsItemApi.prototype.bnsItemAllUpgradesForItemGet = function (itemId, itemLevel, region, patch, options) {
1218
- return BnsItemApiFp(this.configuration).bnsItemAllUpgradesForItemGet(itemId, itemLevel, region, patch, options)(this.fetch, this.basePath);
2303
+ SetItemDto.prototype.toJSON = function (data) {
2304
+ data = typeof data === 'object' ? data : {};
2305
+ data["itemName"] = this.itemName;
2306
+ data["itemIcon"] = this.itemIcon ? this.itemIcon.toJSON() : undefined;
2307
+ return data;
1219
2308
  };
1220
- /**
1221
- *
1222
- * @param {string} idLevel
1223
- * @param {string} region
1224
- * @param {boolean} [light]
1225
- * @param {string} [patch]
1226
- * @param {*} [options] Override http request option.
1227
- * @throws {RequiredError}
1228
- * @memberof BnsItemApi
1229
- */
1230
- BnsItemApi.prototype.bnsItemItemByStringGet = function (idLevel, region, light, patch, options) {
1231
- return BnsItemApiFp(this.configuration).bnsItemItemByStringGet(idLevel, region, light, patch, options)(this.fetch, this.basePath);
2309
+ return SetItemDto;
2310
+ }());
2311
+ var SkillModifierDto = /** @class */ (function () {
2312
+ function SkillModifierDto(data) {
2313
+ if (data) {
2314
+ for (var property in data) {
2315
+ if (data.hasOwnProperty(property))
2316
+ this[property] = data[property];
2317
+ }
2318
+ }
2319
+ }
2320
+ SkillModifierDto.prototype.init = function (_data) {
2321
+ if (_data) {
2322
+ if (Array.isArray(_data["skills"])) {
2323
+ this.skills = [];
2324
+ for (var _i = 0, _a = _data["skills"]; _i < _a.length; _i++) {
2325
+ var item = _a[_i];
2326
+ this.skills.push(Int32StringTuple.fromJS(item));
2327
+ }
2328
+ }
2329
+ this.verb = _data["verb"];
2330
+ this.value = _data["value"];
2331
+ }
1232
2332
  };
1233
- /**
1234
- *
1235
- * @param {number} id
1236
- * @param {number} level
1237
- * @param {string} region
1238
- * @param {boolean} [light]
1239
- * @param {string} [patch]
1240
- * @param {*} [options] Override http request option.
1241
- * @throws {RequiredError}
1242
- * @memberof BnsItemApi
1243
- */
1244
- BnsItemApi.prototype.bnsItemItemGet = function (id, level, region, light, patch, options) {
1245
- return BnsItemApiFp(this.configuration).bnsItemItemGet(id, level, region, light, patch, options)(this.fetch, this.basePath);
2333
+ SkillModifierDto.fromJS = function (data) {
2334
+ data = typeof data === 'object' ? data : {};
2335
+ var result = new SkillModifierDto();
2336
+ result.init(data);
2337
+ return result;
1246
2338
  };
1247
- /**
1248
- *
1249
- * @param {string} region
1250
- * @param {string} [category]
1251
- * @param {string} [technicalJobName]
1252
- * @param {string} [gradesString]
1253
- * @param {string} [minGs]
1254
- * @param {string} [patch]
1255
- * @param {boolean} [noDupes]
1256
- * @param {*} [options] Override http request option.
1257
- * @throws {RequiredError}
1258
- * @memberof BnsItemApi
1259
- */
1260
- BnsItemApi.prototype.bnsItemItemsByCategoryGet = function (region, category, technicalJobName, gradesString, minGs, patch, noDupes, options) {
1261
- return BnsItemApiFp(this.configuration).bnsItemItemsByCategoryGet(region, category, technicalJobName, gradesString, minGs, patch, noDupes, options)(this.fetch, this.basePath);
2339
+ SkillModifierDto.prototype.toJSON = function (data) {
2340
+ data = typeof data === 'object' ? data : {};
2341
+ if (Array.isArray(this.skills)) {
2342
+ data["skills"] = [];
2343
+ for (var _i = 0, _a = this.skills; _i < _a.length; _i++) {
2344
+ var item = _a[_i];
2345
+ data["skills"].push(item.toJSON());
2346
+ }
2347
+ }
2348
+ data["verb"] = this.verb;
2349
+ data["value"] = this.value;
2350
+ return data;
1262
2351
  };
1263
- /**
1264
- *
1265
- * @param {string} name
1266
- * @param {string} region
1267
- * @param {string} [patch]
1268
- * @param {*} [options] Override http request option.
1269
- * @throws {RequiredError}
1270
- * @memberof BnsItemApi
1271
- */
1272
- BnsItemApi.prototype.bnsItemItemsByNameGet = function (name, region, patch, options) {
1273
- return BnsItemApiFp(this.configuration).bnsItemItemsByNameGet(name, region, patch, options)(this.fetch, this.basePath);
2352
+ return SkillModifierDto;
2353
+ }());
2354
+ var SkillModifierGroupDto = /** @class */ (function () {
2355
+ function SkillModifierGroupDto(data) {
2356
+ if (data) {
2357
+ for (var property in data) {
2358
+ if (data.hasOwnProperty(property))
2359
+ this[property] = data[property];
2360
+ }
2361
+ }
2362
+ }
2363
+ SkillModifierGroupDto.prototype.init = function (_data) {
2364
+ if (_data) {
2365
+ this.jobstyle = _data["jobstyle"];
2366
+ if (Array.isArray(_data["modifiers"])) {
2367
+ this.modifiers = [];
2368
+ for (var _i = 0, _a = _data["modifiers"]; _i < _a.length; _i++) {
2369
+ var item = _a[_i];
2370
+ this.modifiers.push(SkillModifierDto.fromJS(item));
2371
+ }
2372
+ }
2373
+ }
1274
2374
  };
1275
- /**
1276
- *
1277
- * @param {number} count
1278
- * @param {string} region
1279
- * @param {number} [offset]
1280
- * @param {string} [patch]
1281
- * @param {*} [options] Override http request option.
1282
- * @throws {RequiredError}
1283
- * @memberof BnsItemApi
1284
- */
1285
- BnsItemApi.prototype.bnsItemItemsGet = function (count, region, offset, patch, options) {
1286
- return BnsItemApiFp(this.configuration).bnsItemItemsGet(count, region, offset, patch, options)(this.fetch, this.basePath);
2375
+ SkillModifierGroupDto.fromJS = function (data) {
2376
+ data = typeof data === 'object' ? data : {};
2377
+ var result = new SkillModifierGroupDto();
2378
+ result.init(data);
2379
+ return result;
1287
2380
  };
1288
- /**
1289
- *
1290
- * @param {string} region
1291
- * @param {*} [options] Override http request option.
1292
- * @throws {RequiredError}
1293
- * @memberof BnsItemApi
1294
- */
1295
- BnsItemApi.prototype.bnsItemLatestPatchGet = function (region, options) {
1296
- return BnsItemApiFp(this.configuration).bnsItemLatestPatchGet(region, options)(this.fetch, this.basePath);
2381
+ SkillModifierGroupDto.prototype.toJSON = function (data) {
2382
+ data = typeof data === 'object' ? data : {};
2383
+ data["jobstyle"] = this.jobstyle;
2384
+ if (Array.isArray(this.modifiers)) {
2385
+ data["modifiers"] = [];
2386
+ for (var _i = 0, _a = this.modifiers; _i < _a.length; _i++) {
2387
+ var item = _a[_i];
2388
+ data["modifiers"].push(item.toJSON());
2389
+ }
2390
+ }
2391
+ return data;
1297
2392
  };
1298
- /**
1299
- *
1300
- * @param {string} region
1301
- * @param {*} [options] Override http request option.
1302
- * @throws {RequiredError}
1303
- * @memberof BnsItemApi
1304
- */
1305
- BnsItemApi.prototype.bnsItemPatchesGet = function (region, options) {
1306
- return BnsItemApiFp(this.configuration).bnsItemPatchesGet(region, options)(this.fetch, this.basePath);
2393
+ return SkillModifierGroupDto;
2394
+ }());
2395
+ var SlateStoneDto = /** @class */ (function () {
2396
+ function SlateStoneDto(data) {
2397
+ if (data) {
2398
+ for (var property in data) {
2399
+ if (data.hasOwnProperty(property))
2400
+ this[property] = data[property];
2401
+ }
2402
+ }
2403
+ }
2404
+ SlateStoneDto.prototype.init = function (_data) {
2405
+ if (_data) {
2406
+ this.name = _data["name"];
2407
+ this.grade = _data["grade"];
2408
+ this.icon = _data["icon"] ? ItemIconDto.fromJS(_data["icon"]) : undefined;
2409
+ this.iconCase = _data["iconCase"] ? ItemIconDto.fromJS(_data["iconCase"]) : undefined;
2410
+ if (Array.isArray(_data["stats"])) {
2411
+ this.stats = [];
2412
+ for (var _i = 0, _a = _data["stats"]; _i < _a.length; _i++) {
2413
+ var item = _a[_i];
2414
+ this.stats.push(ItemStatDto.fromJS(item));
2415
+ }
2416
+ }
2417
+ }
1307
2418
  };
1308
- /**
1309
- *
1310
- * @param {*} [options] Override http request option.
1311
- * @throws {RequiredError}
1312
- * @memberof BnsItemApi
1313
- */
1314
- BnsItemApi.prototype.bnsItemPingGet = function (options) {
1315
- return BnsItemApiFp(this.configuration).bnsItemPingGet(options)(this.fetch, this.basePath);
2419
+ SlateStoneDto.fromJS = function (data) {
2420
+ data = typeof data === 'object' ? data : {};
2421
+ var result = new SlateStoneDto();
2422
+ result.init(data);
2423
+ return result;
1316
2424
  };
1317
- /**
1318
- *
1319
- * @param {*} [options] Override http request option.
1320
- * @throws {RequiredError}
1321
- * @memberof BnsItemApi
1322
- */
1323
- BnsItemApi.prototype.bnsItemRegionsGet = function (options) {
1324
- return BnsItemApiFp(this.configuration).bnsItemRegionsGet(options)(this.fetch, this.basePath);
2425
+ SlateStoneDto.prototype.toJSON = function (data) {
2426
+ data = typeof data === 'object' ? data : {};
2427
+ data["name"] = this.name;
2428
+ data["grade"] = this.grade;
2429
+ data["icon"] = this.icon ? this.icon.toJSON() : undefined;
2430
+ data["iconCase"] = this.iconCase ? this.iconCase.toJSON() : undefined;
2431
+ if (Array.isArray(this.stats)) {
2432
+ data["stats"] = [];
2433
+ for (var _i = 0, _a = this.stats; _i < _a.length; _i++) {
2434
+ var item = _a[_i];
2435
+ data["stats"].push(item.toJSON());
2436
+ }
2437
+ }
2438
+ return data;
1325
2439
  };
1326
- /**
1327
- *
1328
- * @param {string} region
1329
- * @param {string} itemType
1330
- * @param {string} technicalJobName
1331
- * @param {string} [patch]
1332
- * @param {*} [options] Override http request option.
1333
- * @throws {RequiredError}
1334
- * @memberof BnsItemApi
1335
- */
1336
- BnsItemApi.prototype.bnsItemYastItemsGet = function (region, itemType, technicalJobName, patch, options) {
1337
- return BnsItemApiFp(this.configuration).bnsItemYastItemsGet(region, itemType, technicalJobName, patch, options)(this.fetch, this.basePath);
2440
+ return SlateStoneDto;
2441
+ }());
2442
+ var ApiException = /** @class */ (function (_super) {
2443
+ __extends(ApiException, _super);
2444
+ function ApiException(message, status, response, headers, result) {
2445
+ var _this = _super.call(this) || this;
2446
+ _this.isApiException = true;
2447
+ _this.message = message;
2448
+ _this.status = status;
2449
+ _this.response = response;
2450
+ _this.headers = headers;
2451
+ _this.result = result;
2452
+ return _this;
2453
+ }
2454
+ ApiException.isApiException = function (obj) {
2455
+ return obj.isApiException === true;
1338
2456
  };
1339
- return BnsItemApi;
1340
- }(BaseAPI));
2457
+ return ApiException;
2458
+ }(Error));
2459
+ function throwException(message, status, response, headers, result) {
2460
+ if (result !== null && result !== undefined)
2461
+ throw result;
2462
+ else
2463
+ throw new ApiException(message, status, response, headers, null);
2464
+ }
1341
2465
 
1342
2466
  var ItemDownloadClient = /** @class */ (function () {
1343
2467
  function ItemDownloadClient(region, patch) {
1344
2468
  if (patch === void 0) { patch = ""; }
1345
2469
  this.patch = patch;
1346
2470
  this.region = region;
1347
- var config = {
1348
- basePath: ItemDownloadClient.urlBase,
1349
- };
1350
- this.instance = new BnsItemApi(config);
2471
+ var baseUrl = ItemDownloadClient.GetUrlBase();
2472
+ this.instance = new BnsItemApiClient(baseUrl);
1351
2473
  }
2474
+ ItemDownloadClient.GetUrlBase = function () {
2475
+ var environment = process.env.NODE_ENV || "development";
2476
+ var url = "https://bnsitemstoragewebapi.azurewebsites.net";
2477
+ if (environment == "development") {
2478
+ url = "https://localhost:44330";
2479
+ }
2480
+ return url;
2481
+ };
1352
2482
  ItemDownloadClient.prototype.GetNewItems = function () {
1353
2483
  return __awaiter(this, void 0, void 0, function () {
1354
2484
  var result;
1355
2485
  return __generator(this, function (_a) {
1356
2486
  switch (_a.label) {
1357
- case 0: return [4 /*yield*/, this.instance.bnsItemAddedOrModifiedItemsGet(true, false, this.region, this.patch, ItemDownloadClient.options)];
2487
+ case 0: return [4 /*yield*/, this.instance.addedOrModifiedItems(true, false, this.region, this.patch)];
1358
2488
  case 1:
1359
2489
  result = _a.sent();
1360
2490
  return [2 /*return*/, result];
@@ -1367,7 +2497,7 @@ var ItemDownloadClient = /** @class */ (function () {
1367
2497
  var result;
1368
2498
  return __generator(this, function (_a) {
1369
2499
  switch (_a.label) {
1370
- case 0: return [4 /*yield*/, this.instance.bnsItemAddedOrModifiedItemsGet(false, true, this.region, this.patch, ItemDownloadClient.options)];
2500
+ case 0: return [4 /*yield*/, this.instance.addedOrModifiedItems(false, true, this.region, this.patch)];
1371
2501
  case 1:
1372
2502
  result = _a.sent();
1373
2503
  return [2 /*return*/, result];
@@ -1380,7 +2510,7 @@ var ItemDownloadClient = /** @class */ (function () {
1380
2510
  var result;
1381
2511
  return __generator(this, function (_a) {
1382
2512
  switch (_a.label) {
1383
- case 0: return [4 /*yield*/, this.instance.bnsItemItemByStringGet(idlevelString, this.region, false, this.patch, ItemDownloadClient.options)];
2513
+ case 0: return [4 /*yield*/, this.instance.itemByString(idlevelString, this.region, false, this.patch)];
1384
2514
  case 1:
1385
2515
  result = _a.sent();
1386
2516
  return [2 /*return*/, result];
@@ -1393,7 +2523,7 @@ var ItemDownloadClient = /** @class */ (function () {
1393
2523
  var result;
1394
2524
  return __generator(this, function (_a) {
1395
2525
  switch (_a.label) {
1396
- case 0: return [4 /*yield*/, this.instance.bnsItemItemGet(id, level, this.region, false, this.patch, ItemDownloadClient.options)];
2526
+ case 0: return [4 /*yield*/, this.instance.item(id, level, this.region, false, this.patch)];
1397
2527
  case 1:
1398
2528
  result = _a.sent();
1399
2529
  return [2 /*return*/, result];
@@ -1406,7 +2536,7 @@ var ItemDownloadClient = /** @class */ (function () {
1406
2536
  var result;
1407
2537
  return __generator(this, function (_a) {
1408
2538
  switch (_a.label) {
1409
- case 0: return [4 /*yield*/, this.instance.bnsItemItemsByCategoryGet(this.region, category, technicalClassName, gradesString, minGs, this.patch, undefined, ItemDownloadClient.options)];
2539
+ case 0: return [4 /*yield*/, this.instance.itemsByCategory(this.region, category, technicalClassName, gradesString, minGs, this.patch, undefined)];
1410
2540
  case 1:
1411
2541
  result = _a.sent();
1412
2542
  return [2 /*return*/, result];
@@ -1419,7 +2549,7 @@ var ItemDownloadClient = /** @class */ (function () {
1419
2549
  var result;
1420
2550
  return __generator(this, function (_a) {
1421
2551
  switch (_a.label) {
1422
- case 0: return [4 /*yield*/, this.instance.bnsItemAllUpgradesForItemGet(item.id, item.level, this.region, this.patch, ItemDownloadClient.options)];
2552
+ case 0: return [4 /*yield*/, this.instance.allUpgradesForItem(item.id, item.level, this.region, this.patch)];
1423
2553
  case 1:
1424
2554
  result = _a.sent();
1425
2555
  return [2 /*return*/, result];
@@ -1432,7 +2562,7 @@ var ItemDownloadClient = /** @class */ (function () {
1432
2562
  var result;
1433
2563
  return __generator(this, function (_a) {
1434
2564
  switch (_a.label) {
1435
- case 0: return [4 /*yield*/, this.instance.bnsItemAllUpgradesForItemGet(id, level, this.region, this.patch, ItemDownloadClient.options)];
2565
+ case 0: return [4 /*yield*/, this.instance.allUpgradesForItem(id, level, this.region, this.patch)];
1436
2566
  case 1:
1437
2567
  result = _a.sent();
1438
2568
  return [2 /*return*/, result];
@@ -1440,12 +2570,6 @@ var ItemDownloadClient = /** @class */ (function () {
1440
2570
  });
1441
2571
  });
1442
2572
  };
1443
- ItemDownloadClient.urlBase = "https://bnsitemstoragewebapi.azurewebsites.net";
1444
- ItemDownloadClient.options = {
1445
- "headers": {
1446
- "Referer": "https://yast.vercel.app"
1447
- }
1448
- };
1449
2573
  return ItemDownloadClient;
1450
2574
  }());
1451
2575
 
@@ -5950,12 +7074,12 @@ function GetAccumulatedUpgradeCost(item, steps) {
5950
7074
  }
5951
7075
  });
5952
7076
  });
5953
- result.push({
7077
+ result.push(new ItemImproveCostOptionDto({
5954
7078
  isRandom: item.itemImprove.upgradeOptions[0].isRandom,
5955
7079
  mainItemCost: mainCost,
5956
7080
  subItemCost: subCosts,
5957
7081
  moneyCost: moneyCost
5958
- });
7082
+ }));
5959
7083
  }
5960
7084
  return result;
5961
7085
  }