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