bnstooltips 1.12.1 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +2105 -975
  34. package/build/index.es.js.map +1 -1
  35. package/build/index.js +2105 -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,2193 @@ 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"
392
348
  }
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.');
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"
396
393
  }
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.');
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"
400
447
  }
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;
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"
408
488
  }
409
- if (modified !== undefined) {
410
- localVarQueryParameter['modified'] = modified;
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"
411
555
  }
412
- if (region !== undefined) {
413
- localVarQueryParameter['region'] = region;
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"
414
625
  }
415
- if (patch !== undefined) {
416
- localVarQueryParameter['patch'] = patch;
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"
417
687
  }
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;
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"
445
754
  }
446
- if (itemLevel !== undefined) {
447
- localVarQueryParameter['itemLevel'] = itemLevel;
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"
448
822
  }
449
- if (region !== undefined) {
450
- localVarQueryParameter['region'] = region;
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"
451
885
  }
452
- if (patch !== undefined) {
453
- localVarQueryParameter['patch'] = patch;
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"
454
939
  }
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;
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 (idsAndLevels, region, light, patch) {
1136
+ var _this = this;
1137
+ var url_ = this.baseUrl + "/BnsItem/ItemsByIds?";
1138
+ if (idsAndLevels === undefined || idsAndLevels === null)
1139
+ throw new Error("The parameter 'idsAndLevels' must be defined and cannot be null.");
1140
+ else
1141
+ idsAndLevels && idsAndLevels.forEach(function (item, index) {
1142
+ for (var attr in item)
1143
+ if (item.hasOwnProperty(attr)) {
1144
+ url_ += "idsAndLevels[" + index + "]." + attr + "=" + encodeURIComponent("" + item[attr]) + "&";
1145
+ }
1146
+ });
1147
+ if (region === undefined || region === null)
1148
+ throw new Error("The parameter 'region' must be defined and cannot be null.");
1149
+ else
1150
+ url_ += "region=" + encodeURIComponent("" + region) + "&";
1151
+ if (light === null)
1152
+ throw new Error("The parameter 'light' cannot be null.");
1153
+ else if (light !== undefined)
1154
+ url_ += "light=" + encodeURIComponent("" + light) + "&";
1155
+ if (patch === null)
1156
+ throw new Error("The parameter 'patch' cannot be null.");
1157
+ else if (patch !== undefined)
1158
+ url_ += "patch=" + encodeURIComponent("" + patch) + "&";
1159
+ url_ = url_.replace(/[?&]$/, "");
1160
+ var options_ = {
1161
+ method: "GET",
1162
+ headers: {
1163
+ "Accept": "text/plain"
1164
+ }
1165
+ };
1166
+ return this.transformOptions(options_).then(function (transformedOptions_) {
1167
+ return _this.http.fetch(url_, transformedOptions_);
1168
+ }).then(function (_response) {
1169
+ return _this.processItemsByIds(_response);
1170
+ });
1171
+ };
1172
+ BnsItemApiClient.prototype.processItemsByIds = function (response) {
1173
+ var _this = this;
1174
+ var status = response.status;
1175
+ var _headers = {};
1176
+ if (response.headers && response.headers.forEach) {
1177
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
1178
+ }
1179
+ if (status === 200) {
1180
+ return response.text().then(function (_responseText) {
1181
+ var result200 = null;
1182
+ var resultData200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
1183
+ if (Array.isArray(resultData200)) {
1184
+ result200 = [];
1185
+ for (var _i = 0, resultData200_9 = resultData200; _i < resultData200_9.length; _i++) {
1186
+ var item = resultData200_9[_i];
1187
+ result200.push(BnsItemDto.fromJS(item));
1188
+ }
1189
+ }
1190
+ else {
1191
+ result200 = null;
1192
+ }
1193
+ return result200;
1194
+ });
1195
+ }
1196
+ else if (status !== 200 && status !== 204) {
1197
+ return response.text().then(function (_responseText) {
1198
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
1199
+ });
1200
+ }
1201
+ return Promise.resolve(null);
1202
+ };
1203
+ return BnsItemApiClient;
1204
+ }(BnsItemApiClientBase));
1205
+ var BnsItemDto = /** @class */ (function () {
1206
+ function BnsItemDto(data) {
1207
+ if (data) {
1208
+ for (var property in data) {
1209
+ if (data.hasOwnProperty(property))
1210
+ this[property] = data[property];
482
1211
  }
483
- if (itemLevel !== undefined) {
484
- localVarQueryParameter['itemLevel'] = itemLevel;
1212
+ }
1213
+ }
1214
+ BnsItemDto.prototype.init = function (_data) {
1215
+ if (_data) {
1216
+ this.id = _data["id"];
1217
+ this.level = _data["level"];
1218
+ this.gearScore = _data["gearScore"];
1219
+ this.itemScore = _data["itemScore"];
1220
+ this.fusionScore = _data["fusionScore"];
1221
+ this.name = _data["name"];
1222
+ if (Array.isArray(_data["categories"])) {
1223
+ this.categories = [];
1224
+ for (var _i = 0, _a = _data["categories"]; _i < _a.length; _i++) {
1225
+ var item = _a[_i];
1226
+ this.categories.push(ItemCategoryDto.fromJS(item));
1227
+ }
485
1228
  }
486
- if (region !== undefined) {
487
- localVarQueryParameter['region'] = region;
1229
+ this.icon = _data["icon"] ? ItemIconDto.fromJS(_data["icon"]) : undefined;
1230
+ this.grade = _data["grade"];
1231
+ if (Array.isArray(_data["classRequired"])) {
1232
+ this.classRequired = [];
1233
+ for (var _b = 0, _c = _data["classRequired"]; _b < _c.length; _b++) {
1234
+ var item = _c[_b];
1235
+ this.classRequired.push(RequiredClassDto.fromJS(item));
1236
+ }
488
1237
  }
489
- if (patch !== undefined) {
490
- localVarQueryParameter['patch'] = patch;
1238
+ if (Array.isArray(_data["stats"])) {
1239
+ this.stats = [];
1240
+ for (var _d = 0, _e = _data["stats"]; _d < _e.length; _d++) {
1241
+ var item = _e[_d];
1242
+ this.stats.push(ItemStatDto.fromJS(item));
1243
+ }
491
1244
  }
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.');
1245
+ this.randomSubStatCount = _data["randomSubStatCount"];
1246
+ if (Array.isArray(_data["randomStats"])) {
1247
+ this.randomStats = [];
1248
+ for (var _f = 0, _g = _data["randomStats"]; _f < _g.length; _f++) {
1249
+ var item = _g[_f];
1250
+ this.randomStats.push(ItemRandomStatDto.fromJS(item));
1251
+ }
515
1252
  }
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.');
1253
+ this.mainInfo = _data["mainInfo"];
1254
+ this.subInfo = _data["subInfo"];
1255
+ this.cooldownInMs = _data["cooldownInMs"];
1256
+ this.bgCooldownInMs = _data["bgCooldownInMs"];
1257
+ if (Array.isArray(_data["skillModifierGroups"])) {
1258
+ this.skillModifierGroups = [];
1259
+ for (var _h = 0, _j = _data["skillModifierGroups"]; _h < _j.length; _h++) {
1260
+ var item = _j[_h];
1261
+ this.skillModifierGroups.push(SkillModifierGroupDto.fromJS(item));
1262
+ }
519
1263
  }
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;
1264
+ this.itemImprove = _data["itemImprove"] ? ItemImproveDto.fromJS(_data["itemImprove"]) : undefined;
1265
+ if (Array.isArray(_data["skills"])) {
1266
+ this.skills = [];
1267
+ for (var _k = 0, _l = _data["skills"]; _k < _l.length; _k++) {
1268
+ var item = _l[_k];
1269
+ this.skills.push(ItemSkillDto.fromJS(item));
1270
+ }
527
1271
  }
528
- if (region !== undefined) {
529
- localVarQueryParameter['region'] = region;
1272
+ this.topText = _data["topText"];
1273
+ this.setBonus = _data["setBonus"] ? ItemSetBonusDto.fromJS(_data["setBonus"]) : undefined;
1274
+ if (Array.isArray(_data["descriptions"])) {
1275
+ this.descriptions = [];
1276
+ for (var _m = 0, _o = _data["descriptions"]; _m < _o.length; _m++) {
1277
+ var item = _o[_m];
1278
+ this.descriptions.push(ItemDescriptionDto.fromJS(item));
1279
+ }
530
1280
  }
531
- if (light !== undefined) {
532
- localVarQueryParameter['light'] = light;
1281
+ if (Array.isArray(_data["decomposeRewards"])) {
1282
+ this.decomposeRewards = [];
1283
+ for (var _p = 0, _q = _data["decomposeRewards"]; _p < _q.length; _p++) {
1284
+ var item = _q[_p];
1285
+ this.decomposeRewards.push(DecomposeRewardDto.fromJS(item));
1286
+ }
533
1287
  }
534
- if (patch !== undefined) {
535
- localVarQueryParameter['patch'] = patch;
1288
+ this.flavorText = _data["flavorText"];
1289
+ this.usableGroup = _data["usableGroup"];
1290
+ this.levelRequired = _data["levelRequired"];
1291
+ this.boundToAccount = _data["boundToAccount"];
1292
+ this.unableToTrade = _data["unableToTrade"];
1293
+ this.sealing = _data["sealing"] ? ItemSealingDto.fromJS(_data["sealing"]) : undefined;
1294
+ this.accountTransfer = _data["accountTransfer"] ? ItemAccountTransferDto.fromJS(_data["accountTransfer"]) : undefined;
1295
+ this.upgradeInfo = _data["upgradeInfo"] ? ItemUpgradeInfoDto.fromJS(_data["upgradeInfo"]) : undefined;
1296
+ if (Array.isArray(_data["itemTransforms"])) {
1297
+ this.itemTransforms = [];
1298
+ for (var _r = 0, _s = _data["itemTransforms"]; _r < _s.length; _r++) {
1299
+ var item = _s[_r];
1300
+ this.itemTransforms.push(ItemTransformDto.fromJS(item));
1301
+ }
536
1302
  }
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.');
1303
+ this.setPoints = _data["setPoints"];
1304
+ this.refinementPoints = _data["refinementPoints"];
1305
+ if (Array.isArray(_data["slateStones"])) {
1306
+ this.slateStones = [];
1307
+ for (var _t = 0, _u = _data["slateStones"]; _t < _u.length; _t++) {
1308
+ var item = _u[_t];
1309
+ this.slateStones.push(SlateStoneDto.fromJS(item));
1310
+ }
561
1311
  }
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.');
1312
+ }
1313
+ };
1314
+ BnsItemDto.fromJS = function (data) {
1315
+ data = typeof data === 'object' ? data : {};
1316
+ var result = new BnsItemDto();
1317
+ result.init(data);
1318
+ return result;
1319
+ };
1320
+ BnsItemDto.prototype.toJSON = function (data) {
1321
+ data = typeof data === 'object' ? data : {};
1322
+ data["id"] = this.id;
1323
+ data["level"] = this.level;
1324
+ data["gearScore"] = this.gearScore;
1325
+ data["itemScore"] = this.itemScore;
1326
+ data["fusionScore"] = this.fusionScore;
1327
+ data["name"] = this.name;
1328
+ if (Array.isArray(this.categories)) {
1329
+ data["categories"] = [];
1330
+ for (var _i = 0, _a = this.categories; _i < _a.length; _i++) {
1331
+ var item = _a[_i];
1332
+ data["categories"].push(item.toJSON());
1333
+ }
1334
+ }
1335
+ data["icon"] = this.icon ? this.icon.toJSON() : undefined;
1336
+ data["grade"] = this.grade;
1337
+ if (Array.isArray(this.classRequired)) {
1338
+ data["classRequired"] = [];
1339
+ for (var _b = 0, _c = this.classRequired; _b < _c.length; _b++) {
1340
+ var item = _c[_b];
1341
+ data["classRequired"].push(item.toJSON());
1342
+ }
1343
+ }
1344
+ if (Array.isArray(this.stats)) {
1345
+ data["stats"] = [];
1346
+ for (var _d = 0, _e = this.stats; _d < _e.length; _d++) {
1347
+ var item = _e[_d];
1348
+ data["stats"].push(item.toJSON());
1349
+ }
1350
+ }
1351
+ data["randomSubStatCount"] = this.randomSubStatCount;
1352
+ if (Array.isArray(this.randomStats)) {
1353
+ data["randomStats"] = [];
1354
+ for (var _f = 0, _g = this.randomStats; _f < _g.length; _f++) {
1355
+ var item = _g[_f];
1356
+ data["randomStats"].push(item.toJSON());
1357
+ }
1358
+ }
1359
+ data["mainInfo"] = this.mainInfo;
1360
+ data["subInfo"] = this.subInfo;
1361
+ data["cooldownInMs"] = this.cooldownInMs;
1362
+ data["bgCooldownInMs"] = this.bgCooldownInMs;
1363
+ if (Array.isArray(this.skillModifierGroups)) {
1364
+ data["skillModifierGroups"] = [];
1365
+ for (var _h = 0, _j = this.skillModifierGroups; _h < _j.length; _h++) {
1366
+ var item = _j[_h];
1367
+ data["skillModifierGroups"].push(item.toJSON());
1368
+ }
1369
+ }
1370
+ data["itemImprove"] = this.itemImprove ? this.itemImprove.toJSON() : undefined;
1371
+ if (Array.isArray(this.skills)) {
1372
+ data["skills"] = [];
1373
+ for (var _k = 0, _l = this.skills; _k < _l.length; _k++) {
1374
+ var item = _l[_k];
1375
+ data["skills"].push(item.toJSON());
1376
+ }
1377
+ }
1378
+ data["topText"] = this.topText;
1379
+ data["setBonus"] = this.setBonus ? this.setBonus.toJSON() : undefined;
1380
+ if (Array.isArray(this.descriptions)) {
1381
+ data["descriptions"] = [];
1382
+ for (var _m = 0, _o = this.descriptions; _m < _o.length; _m++) {
1383
+ var item = _o[_m];
1384
+ data["descriptions"].push(item.toJSON());
1385
+ }
1386
+ }
1387
+ if (Array.isArray(this.decomposeRewards)) {
1388
+ data["decomposeRewards"] = [];
1389
+ for (var _p = 0, _q = this.decomposeRewards; _p < _q.length; _p++) {
1390
+ var item = _q[_p];
1391
+ data["decomposeRewards"].push(item.toJSON());
1392
+ }
1393
+ }
1394
+ data["flavorText"] = this.flavorText;
1395
+ data["usableGroup"] = this.usableGroup;
1396
+ data["levelRequired"] = this.levelRequired;
1397
+ data["boundToAccount"] = this.boundToAccount;
1398
+ data["unableToTrade"] = this.unableToTrade;
1399
+ data["sealing"] = this.sealing ? this.sealing.toJSON() : undefined;
1400
+ data["accountTransfer"] = this.accountTransfer ? this.accountTransfer.toJSON() : undefined;
1401
+ data["upgradeInfo"] = this.upgradeInfo ? this.upgradeInfo.toJSON() : undefined;
1402
+ if (Array.isArray(this.itemTransforms)) {
1403
+ data["itemTransforms"] = [];
1404
+ for (var _r = 0, _s = this.itemTransforms; _r < _s.length; _r++) {
1405
+ var item = _s[_r];
1406
+ data["itemTransforms"].push(item.toJSON());
1407
+ }
1408
+ }
1409
+ data["setPoints"] = this.setPoints;
1410
+ data["refinementPoints"] = this.refinementPoints;
1411
+ if (Array.isArray(this.slateStones)) {
1412
+ data["slateStones"] = [];
1413
+ for (var _t = 0, _u = this.slateStones; _t < _u.length; _t++) {
1414
+ var item = _u[_t];
1415
+ data["slateStones"].push(item.toJSON());
1416
+ }
1417
+ }
1418
+ return data;
1419
+ };
1420
+ return BnsItemDto;
1421
+ }());
1422
+ var DecomposeRewardDto = /** @class */ (function () {
1423
+ function DecomposeRewardDto(data) {
1424
+ if (data) {
1425
+ for (var property in data) {
1426
+ if (data.hasOwnProperty(property))
1427
+ this[property] = data[property];
1428
+ }
1429
+ }
1430
+ }
1431
+ DecomposeRewardDto.prototype.init = function (_data) {
1432
+ if (_data) {
1433
+ if (Array.isArray(_data["fixedItems"])) {
1434
+ this.fixedItems = [];
1435
+ for (var _i = 0, _a = _data["fixedItems"]; _i < _a.length; _i++) {
1436
+ var item = _a[_i];
1437
+ this.fixedItems.push(ItemRefWithCount.fromJS(item));
1438
+ }
1439
+ }
1440
+ if (Array.isArray(_data["randomItems"])) {
1441
+ this.randomItems = [];
1442
+ for (var _b = 0, _c = _data["randomItems"]; _b < _c.length; _b++) {
1443
+ var item = _c[_b];
1444
+ this.randomItems.push(ItemRefWithCount.fromJS(item));
1445
+ }
1446
+ }
1447
+ if (Array.isArray(_data["selectItems"])) {
1448
+ this.selectItems = [];
1449
+ for (var _d = 0, _e = _data["selectItems"]; _d < _e.length; _d++) {
1450
+ var item = _e[_d];
1451
+ this.selectItems.push(ItemRefWithCount.fromJS(item));
1452
+ }
1453
+ }
1454
+ }
1455
+ };
1456
+ DecomposeRewardDto.fromJS = function (data) {
1457
+ data = typeof data === 'object' ? data : {};
1458
+ var result = new DecomposeRewardDto();
1459
+ result.init(data);
1460
+ return result;
1461
+ };
1462
+ DecomposeRewardDto.prototype.toJSON = function (data) {
1463
+ data = typeof data === 'object' ? data : {};
1464
+ if (Array.isArray(this.fixedItems)) {
1465
+ data["fixedItems"] = [];
1466
+ for (var _i = 0, _a = this.fixedItems; _i < _a.length; _i++) {
1467
+ var item = _a[_i];
1468
+ data["fixedItems"].push(item.toJSON());
1469
+ }
1470
+ }
1471
+ if (Array.isArray(this.randomItems)) {
1472
+ data["randomItems"] = [];
1473
+ for (var _b = 0, _c = this.randomItems; _b < _c.length; _b++) {
1474
+ var item = _c[_b];
1475
+ data["randomItems"].push(item.toJSON());
1476
+ }
1477
+ }
1478
+ if (Array.isArray(this.selectItems)) {
1479
+ data["selectItems"] = [];
1480
+ for (var _d = 0, _e = this.selectItems; _d < _e.length; _d++) {
1481
+ var item = _e[_d];
1482
+ data["selectItems"].push(item.toJSON());
1483
+ }
1484
+ }
1485
+ return data;
1486
+ };
1487
+ return DecomposeRewardDto;
1488
+ }());
1489
+ var EffectDto = /** @class */ (function () {
1490
+ function EffectDto(data) {
1491
+ if (data) {
1492
+ for (var property in data) {
1493
+ if (data.hasOwnProperty(property))
1494
+ this[property] = data[property];
1495
+ }
1496
+ }
1497
+ }
1498
+ EffectDto.prototype.init = function (_data) {
1499
+ if (_data) {
1500
+ this.description = _data["description"];
1501
+ }
1502
+ };
1503
+ EffectDto.fromJS = function (data) {
1504
+ data = typeof data === 'object' ? data : {};
1505
+ var result = new EffectDto();
1506
+ result.init(data);
1507
+ return result;
1508
+ };
1509
+ EffectDto.prototype.toJSON = function (data) {
1510
+ data = typeof data === 'object' ? data : {};
1511
+ data["description"] = this.description;
1512
+ return data;
1513
+ };
1514
+ return EffectDto;
1515
+ }());
1516
+ var Int32StringTuple = /** @class */ (function () {
1517
+ function Int32StringTuple(data) {
1518
+ if (data) {
1519
+ for (var property in data) {
1520
+ if (data.hasOwnProperty(property))
1521
+ this[property] = data[property];
1522
+ }
1523
+ }
1524
+ }
1525
+ Int32StringTuple.prototype.init = function (_data) {
1526
+ if (_data) {
1527
+ this.item1 = _data["item1"];
1528
+ this.item2 = _data["item2"];
1529
+ }
1530
+ };
1531
+ Int32StringTuple.fromJS = function (data) {
1532
+ data = typeof data === 'object' ? data : {};
1533
+ var result = new Int32StringTuple();
1534
+ result.init(data);
1535
+ return result;
1536
+ };
1537
+ Int32StringTuple.prototype.toJSON = function (data) {
1538
+ data = typeof data === 'object' ? data : {};
1539
+ data["item1"] = this.item1;
1540
+ data["item2"] = this.item2;
1541
+ return data;
1542
+ };
1543
+ return Int32StringTuple;
1544
+ }());
1545
+ var ItemAccountTransferDto = /** @class */ (function () {
1546
+ function ItemAccountTransferDto(data) {
1547
+ if (data) {
1548
+ for (var property in data) {
1549
+ if (data.hasOwnProperty(property))
1550
+ this[property] = data[property];
1551
+ }
1552
+ }
1553
+ }
1554
+ ItemAccountTransferDto.prototype.init = function (_data) {
1555
+ if (_data) {
1556
+ if (Array.isArray(_data["requiredItems"])) {
1557
+ this.requiredItems = [];
1558
+ for (var _i = 0, _a = _data["requiredItems"]; _i < _a.length; _i++) {
1559
+ var item = _a[_i];
1560
+ this.requiredItems.push(ItemRefWithCount.fromJS(item));
1561
+ }
1562
+ }
1563
+ this.moneyCost = _data["moneyCost"];
1564
+ }
1565
+ };
1566
+ ItemAccountTransferDto.fromJS = function (data) {
1567
+ data = typeof data === 'object' ? data : {};
1568
+ var result = new ItemAccountTransferDto();
1569
+ result.init(data);
1570
+ return result;
1571
+ };
1572
+ ItemAccountTransferDto.prototype.toJSON = function (data) {
1573
+ data = typeof data === 'object' ? data : {};
1574
+ if (Array.isArray(this.requiredItems)) {
1575
+ data["requiredItems"] = [];
1576
+ for (var _i = 0, _a = this.requiredItems; _i < _a.length; _i++) {
1577
+ var item = _a[_i];
1578
+ data["requiredItems"].push(item.toJSON());
1579
+ }
1580
+ }
1581
+ data["moneyCost"] = this.moneyCost;
1582
+ return data;
1583
+ };
1584
+ return ItemAccountTransferDto;
1585
+ }());
1586
+ var ItemCategoryDto = /** @class */ (function () {
1587
+ function ItemCategoryDto(data) {
1588
+ if (data) {
1589
+ for (var property in data) {
1590
+ if (data.hasOwnProperty(property))
1591
+ this[property] = data[property];
1592
+ }
1593
+ }
1594
+ }
1595
+ ItemCategoryDto.prototype.init = function (_data) {
1596
+ if (_data) {
1597
+ this.technicalName = _data["technicalName"];
1598
+ this.localizedName = _data["localizedName"];
1599
+ this.index = _data["index"];
1600
+ }
1601
+ };
1602
+ ItemCategoryDto.fromJS = function (data) {
1603
+ data = typeof data === 'object' ? data : {};
1604
+ var result = new ItemCategoryDto();
1605
+ result.init(data);
1606
+ return result;
1607
+ };
1608
+ ItemCategoryDto.prototype.toJSON = function (data) {
1609
+ data = typeof data === 'object' ? data : {};
1610
+ data["technicalName"] = this.technicalName;
1611
+ data["localizedName"] = this.localizedName;
1612
+ data["index"] = this.index;
1613
+ return data;
1614
+ };
1615
+ return ItemCategoryDto;
1616
+ }());
1617
+ var ItemDescriptionDto = /** @class */ (function () {
1618
+ function ItemDescriptionDto(data) {
1619
+ if (data) {
1620
+ for (var property in data) {
1621
+ if (data.hasOwnProperty(property))
1622
+ this[property] = data[property];
1623
+ }
1624
+ }
1625
+ }
1626
+ ItemDescriptionDto.prototype.init = function (_data) {
1627
+ if (_data) {
1628
+ this.title = _data["title"];
1629
+ this.text = _data["text"];
1630
+ }
1631
+ };
1632
+ ItemDescriptionDto.fromJS = function (data) {
1633
+ data = typeof data === 'object' ? data : {};
1634
+ var result = new ItemDescriptionDto();
1635
+ result.init(data);
1636
+ return result;
1637
+ };
1638
+ ItemDescriptionDto.prototype.toJSON = function (data) {
1639
+ data = typeof data === 'object' ? data : {};
1640
+ data["title"] = this.title;
1641
+ data["text"] = this.text;
1642
+ return data;
1643
+ };
1644
+ return ItemDescriptionDto;
1645
+ }());
1646
+ var ItemIconDto = /** @class */ (function () {
1647
+ function ItemIconDto(data) {
1648
+ if (data) {
1649
+ for (var property in data) {
1650
+ if (data.hasOwnProperty(property))
1651
+ this[property] = data[property];
1652
+ }
1653
+ }
1654
+ }
1655
+ ItemIconDto.prototype.init = function (_data) {
1656
+ if (_data) {
1657
+ this.iconPath = _data["iconPath"];
1658
+ this.iconIndex = _data["iconIndex"];
1659
+ }
1660
+ };
1661
+ ItemIconDto.fromJS = function (data) {
1662
+ data = typeof data === 'object' ? data : {};
1663
+ var result = new ItemIconDto();
1664
+ result.init(data);
1665
+ return result;
1666
+ };
1667
+ ItemIconDto.prototype.toJSON = function (data) {
1668
+ data = typeof data === 'object' ? data : {};
1669
+ data["iconPath"] = this.iconPath;
1670
+ data["iconIndex"] = this.iconIndex;
1671
+ return data;
1672
+ };
1673
+ return ItemIconDto;
1674
+ }());
1675
+ var ItemImproveCostOptionDto = /** @class */ (function () {
1676
+ function ItemImproveCostOptionDto(data) {
1677
+ if (data) {
1678
+ for (var property in data) {
1679
+ if (data.hasOwnProperty(property))
1680
+ this[property] = data[property];
565
1681
  }
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.');
1682
+ }
1683
+ }
1684
+ ItemImproveCostOptionDto.prototype.init = function (_data) {
1685
+ if (_data) {
1686
+ this.moneyCost = _data["moneyCost"];
1687
+ this.mainItemCost = _data["mainItemCost"] ? ItemRefWithCount.fromJS(_data["mainItemCost"]) : undefined;
1688
+ if (Array.isArray(_data["subItemCost"])) {
1689
+ this.subItemCost = [];
1690
+ for (var _i = 0, _a = _data["subItemCost"]; _i < _a.length; _i++) {
1691
+ var item = _a[_i];
1692
+ this.subItemCost.push(ItemRefWithCount.fromJS(item));
1693
+ }
569
1694
  }
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;
1695
+ this.isRandom = _data["isRandom"];
1696
+ }
1697
+ };
1698
+ ItemImproveCostOptionDto.fromJS = function (data) {
1699
+ data = typeof data === 'object' ? data : {};
1700
+ var result = new ItemImproveCostOptionDto();
1701
+ result.init(data);
1702
+ return result;
1703
+ };
1704
+ ItemImproveCostOptionDto.prototype.toJSON = function (data) {
1705
+ data = typeof data === 'object' ? data : {};
1706
+ data["moneyCost"] = this.moneyCost;
1707
+ data["mainItemCost"] = this.mainItemCost ? this.mainItemCost.toJSON() : undefined;
1708
+ if (Array.isArray(this.subItemCost)) {
1709
+ data["subItemCost"] = [];
1710
+ for (var _i = 0, _a = this.subItemCost; _i < _a.length; _i++) {
1711
+ var item = _a[_i];
1712
+ data["subItemCost"].push(item.toJSON());
577
1713
  }
578
- if (level !== undefined) {
579
- localVarQueryParameter['level'] = level;
1714
+ }
1715
+ data["isRandom"] = this.isRandom;
1716
+ return data;
1717
+ };
1718
+ return ItemImproveCostOptionDto;
1719
+ }());
1720
+ var ItemImproveDto = /** @class */ (function () {
1721
+ function ItemImproveDto(data) {
1722
+ if (data) {
1723
+ for (var property in data) {
1724
+ if (data.hasOwnProperty(property))
1725
+ this[property] = data[property];
580
1726
  }
581
- if (region !== undefined) {
582
- localVarQueryParameter['region'] = region;
1727
+ }
1728
+ }
1729
+ ItemImproveDto.prototype.init = function (_data) {
1730
+ if (_data) {
1731
+ if (Array.isArray(_data["upgradeOptions"])) {
1732
+ this.upgradeOptions = [];
1733
+ for (var _i = 0, _a = _data["upgradeOptions"]; _i < _a.length; _i++) {
1734
+ var item = _a[_i];
1735
+ this.upgradeOptions.push(ItemImproveCostOptionDto.fromJS(item));
1736
+ }
583
1737
  }
584
- if (light !== undefined) {
585
- localVarQueryParameter['light'] = light;
1738
+ this.itemNext = _data["itemNext"] ? ItemRefWithCount.fromJS(_data["itemNext"]) : undefined;
1739
+ this.itemPrev = _data["itemPrev"] ? ItemRefWithCount.fromJS(_data["itemPrev"]) : undefined;
1740
+ this.fixedAllOptions = _data["fixedAllOptions"];
1741
+ this.useMileageSave = _data["useMileageSave"];
1742
+ if (Array.isArray(_data["bonusEffectOptions"])) {
1743
+ this.bonusEffectOptions = [];
1744
+ for (var _b = 0, _c = _data["bonusEffectOptions"]; _b < _c.length; _b++) {
1745
+ var item = _c[_b];
1746
+ this.bonusEffectOptions.push(ItemImproveEffectOptionDto.fromJS(item));
1747
+ }
586
1748
  }
587
- if (patch !== undefined) {
588
- localVarQueryParameter['patch'] = patch;
1749
+ }
1750
+ };
1751
+ ItemImproveDto.fromJS = function (data) {
1752
+ data = typeof data === 'object' ? data : {};
1753
+ var result = new ItemImproveDto();
1754
+ result.init(data);
1755
+ return result;
1756
+ };
1757
+ ItemImproveDto.prototype.toJSON = function (data) {
1758
+ data = typeof data === 'object' ? data : {};
1759
+ if (Array.isArray(this.upgradeOptions)) {
1760
+ data["upgradeOptions"] = [];
1761
+ for (var _i = 0, _a = this.upgradeOptions; _i < _a.length; _i++) {
1762
+ var item = _a[_i];
1763
+ data["upgradeOptions"].push(item.toJSON());
589
1764
  }
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.');
1765
+ }
1766
+ data["itemNext"] = this.itemNext ? this.itemNext.toJSON() : undefined;
1767
+ data["itemPrev"] = this.itemPrev ? this.itemPrev.toJSON() : undefined;
1768
+ data["fixedAllOptions"] = this.fixedAllOptions;
1769
+ data["useMileageSave"] = this.useMileageSave;
1770
+ if (Array.isArray(this.bonusEffectOptions)) {
1771
+ data["bonusEffectOptions"] = [];
1772
+ for (var _b = 0, _c = this.bonusEffectOptions; _b < _c.length; _b++) {
1773
+ var item = _c[_b];
1774
+ data["bonusEffectOptions"].push(item.toJSON());
616
1775
  }
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;
1776
+ }
1777
+ return data;
1778
+ };
1779
+ return ItemImproveDto;
1780
+ }());
1781
+ var ItemImproveEffectOptionDto = /** @class */ (function () {
1782
+ function ItemImproveEffectOptionDto(data) {
1783
+ if (data) {
1784
+ for (var property in data) {
1785
+ if (data.hasOwnProperty(property))
1786
+ this[property] = data[property];
624
1787
  }
625
- if (category !== undefined) {
626
- localVarQueryParameter['category'] = category;
1788
+ }
1789
+ }
1790
+ ItemImproveEffectOptionDto.prototype.init = function (_data) {
1791
+ if (_data) {
1792
+ this.statName = _data["statName"];
1793
+ this.statValue = _data["statValue"];
1794
+ this.isEffect = _data["isEffect"];
1795
+ this.effectDescription = _data["effectDescription"];
1796
+ this.icon = _data["icon"] ? ItemIconDto.fromJS(_data["icon"]) : undefined;
1797
+ }
1798
+ };
1799
+ ItemImproveEffectOptionDto.fromJS = function (data) {
1800
+ data = typeof data === 'object' ? data : {};
1801
+ var result = new ItemImproveEffectOptionDto();
1802
+ result.init(data);
1803
+ return result;
1804
+ };
1805
+ ItemImproveEffectOptionDto.prototype.toJSON = function (data) {
1806
+ data = typeof data === 'object' ? data : {};
1807
+ data["statName"] = this.statName;
1808
+ data["statValue"] = this.statValue;
1809
+ data["isEffect"] = this.isEffect;
1810
+ data["effectDescription"] = this.effectDescription;
1811
+ data["icon"] = this.icon ? this.icon.toJSON() : undefined;
1812
+ return data;
1813
+ };
1814
+ return ItemImproveEffectOptionDto;
1815
+ }());
1816
+ var ItemRandomStatDto = /** @class */ (function () {
1817
+ function ItemRandomStatDto(data) {
1818
+ if (data) {
1819
+ for (var property in data) {
1820
+ if (data.hasOwnProperty(property))
1821
+ this[property] = data[property];
627
1822
  }
628
- if (technicalJobName !== undefined) {
629
- localVarQueryParameter['technicalJobName'] = technicalJobName;
1823
+ }
1824
+ }
1825
+ ItemRandomStatDto.prototype.init = function (_data) {
1826
+ if (_data) {
1827
+ this.name = _data["name"];
1828
+ this.min = _data["min"];
1829
+ this.max = _data["max"];
1830
+ this.isPercentage = _data["isPercentage"];
1831
+ this.isMainStat = _data["isMainStat"];
1832
+ this.isFixedSubStat = _data["isFixedSubStat"];
1833
+ }
1834
+ };
1835
+ ItemRandomStatDto.fromJS = function (data) {
1836
+ data = typeof data === 'object' ? data : {};
1837
+ var result = new ItemRandomStatDto();
1838
+ result.init(data);
1839
+ return result;
1840
+ };
1841
+ ItemRandomStatDto.prototype.toJSON = function (data) {
1842
+ data = typeof data === 'object' ? data : {};
1843
+ data["name"] = this.name;
1844
+ data["min"] = this.min;
1845
+ data["max"] = this.max;
1846
+ data["isPercentage"] = this.isPercentage;
1847
+ data["isMainStat"] = this.isMainStat;
1848
+ data["isFixedSubStat"] = this.isFixedSubStat;
1849
+ return data;
1850
+ };
1851
+ return ItemRandomStatDto;
1852
+ }());
1853
+ var ItemRefWithCount = /** @class */ (function () {
1854
+ function ItemRefWithCount(data) {
1855
+ if (data) {
1856
+ for (var property in data) {
1857
+ if (data.hasOwnProperty(property))
1858
+ this[property] = data[property];
630
1859
  }
631
- if (gradesString !== undefined) {
632
- localVarQueryParameter['gradesString'] = gradesString;
1860
+ }
1861
+ }
1862
+ ItemRefWithCount.prototype.init = function (_data) {
1863
+ if (_data) {
1864
+ this.itemId = _data["itemId"];
1865
+ this.itemLevel = _data["itemLevel"];
1866
+ this.min = _data["min"];
1867
+ this.max = _data["max"];
1868
+ this.isMinMax = _data["isMinMax"];
1869
+ this.isRandom = _data["isRandom"];
1870
+ }
1871
+ };
1872
+ ItemRefWithCount.fromJS = function (data) {
1873
+ data = typeof data === 'object' ? data : {};
1874
+ var result = new ItemRefWithCount();
1875
+ result.init(data);
1876
+ return result;
1877
+ };
1878
+ ItemRefWithCount.prototype.toJSON = function (data) {
1879
+ data = typeof data === 'object' ? data : {};
1880
+ data["itemId"] = this.itemId;
1881
+ data["itemLevel"] = this.itemLevel;
1882
+ data["min"] = this.min;
1883
+ data["max"] = this.max;
1884
+ data["isMinMax"] = this.isMinMax;
1885
+ data["isRandom"] = this.isRandom;
1886
+ return data;
1887
+ };
1888
+ return ItemRefWithCount;
1889
+ }());
1890
+ var ItemSealingDto = /** @class */ (function () {
1891
+ function ItemSealingDto(data) {
1892
+ if (data) {
1893
+ for (var property in data) {
1894
+ if (data.hasOwnProperty(property))
1895
+ this[property] = data[property];
633
1896
  }
634
- if (minGs !== undefined) {
635
- localVarQueryParameter['minGs'] = minGs;
1897
+ }
1898
+ }
1899
+ ItemSealingDto.prototype.init = function (_data) {
1900
+ if (_data) {
1901
+ if (Array.isArray(_data["sealConsumeItems"])) {
1902
+ this.sealConsumeItems = [];
1903
+ for (var _i = 0, _a = _data["sealConsumeItems"]; _i < _a.length; _i++) {
1904
+ var item = _a[_i];
1905
+ this.sealConsumeItems.push(ItemRefWithCount.fromJS(item));
1906
+ }
636
1907
  }
637
- if (patch !== undefined) {
638
- localVarQueryParameter['patch'] = patch;
1908
+ this.sealAcquireItemId = _data["sealAcquireItemId"];
1909
+ this.sealAcquireItemLevel = _data["sealAcquireItemLevel"];
1910
+ }
1911
+ };
1912
+ ItemSealingDto.fromJS = function (data) {
1913
+ data = typeof data === 'object' ? data : {};
1914
+ var result = new ItemSealingDto();
1915
+ result.init(data);
1916
+ return result;
1917
+ };
1918
+ ItemSealingDto.prototype.toJSON = function (data) {
1919
+ data = typeof data === 'object' ? data : {};
1920
+ if (Array.isArray(this.sealConsumeItems)) {
1921
+ data["sealConsumeItems"] = [];
1922
+ for (var _i = 0, _a = this.sealConsumeItems; _i < _a.length; _i++) {
1923
+ var item = _a[_i];
1924
+ data["sealConsumeItems"].push(item.toJSON());
639
1925
  }
640
- if (noDupes !== undefined) {
641
- localVarQueryParameter['noDupes'] = noDupes;
1926
+ }
1927
+ data["sealAcquireItemId"] = this.sealAcquireItemId;
1928
+ data["sealAcquireItemLevel"] = this.sealAcquireItemLevel;
1929
+ return data;
1930
+ };
1931
+ return ItemSealingDto;
1932
+ }());
1933
+ var ItemSetBonusDto = /** @class */ (function () {
1934
+ function ItemSetBonusDto(data) {
1935
+ if (data) {
1936
+ for (var property in data) {
1937
+ if (data.hasOwnProperty(property))
1938
+ this[property] = data[property];
642
1939
  }
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.');
1940
+ }
1941
+ }
1942
+ ItemSetBonusDto.prototype.init = function (_data) {
1943
+ if (_data) {
1944
+ this.setName = _data["setName"];
1945
+ if (Array.isArray(_data["setItems"])) {
1946
+ this.setItems = [];
1947
+ for (var _i = 0, _a = _data["setItems"]; _i < _a.length; _i++) {
1948
+ var item = _a[_i];
1949
+ this.setItems.push(SetItemDto.fromJS(item));
1950
+ }
665
1951
  }
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.');
1952
+ if (Array.isArray(_data["setBonusStages"])) {
1953
+ this.setBonusStages = [];
1954
+ for (var _b = 0, _c = _data["setBonusStages"]; _b < _c.length; _b++) {
1955
+ var item = _c[_b];
1956
+ this.setBonusStages.push(ItemSetBonusStageDto.fromJS(item));
1957
+ }
669
1958
  }
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;
1959
+ }
1960
+ };
1961
+ ItemSetBonusDto.fromJS = function (data) {
1962
+ data = typeof data === 'object' ? data : {};
1963
+ var result = new ItemSetBonusDto();
1964
+ result.init(data);
1965
+ return result;
1966
+ };
1967
+ ItemSetBonusDto.prototype.toJSON = function (data) {
1968
+ data = typeof data === 'object' ? data : {};
1969
+ data["setName"] = this.setName;
1970
+ if (Array.isArray(this.setItems)) {
1971
+ data["setItems"] = [];
1972
+ for (var _i = 0, _a = this.setItems; _i < _a.length; _i++) {
1973
+ var item = _a[_i];
1974
+ data["setItems"].push(item.toJSON());
677
1975
  }
678
- if (region !== undefined) {
679
- localVarQueryParameter['region'] = region;
1976
+ }
1977
+ if (Array.isArray(this.setBonusStages)) {
1978
+ data["setBonusStages"] = [];
1979
+ for (var _b = 0, _c = this.setBonusStages; _b < _c.length; _b++) {
1980
+ var item = _c[_b];
1981
+ data["setBonusStages"].push(item.toJSON());
680
1982
  }
681
- if (patch !== undefined) {
682
- localVarQueryParameter['patch'] = patch;
1983
+ }
1984
+ return data;
1985
+ };
1986
+ return ItemSetBonusDto;
1987
+ }());
1988
+ var ItemSetBonusStageDto = /** @class */ (function () {
1989
+ function ItemSetBonusStageDto(data) {
1990
+ if (data) {
1991
+ for (var property in data) {
1992
+ if (data.hasOwnProperty(property))
1993
+ this[property] = data[property];
683
1994
  }
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.');
1995
+ }
1996
+ }
1997
+ ItemSetBonusStageDto.prototype.init = function (_data) {
1998
+ if (_data) {
1999
+ this.setNumber = _data["setNumber"];
2000
+ if (Array.isArray(_data["effects"])) {
2001
+ this.effects = [];
2002
+ for (var _i = 0, _a = _data["effects"]; _i < _a.length; _i++) {
2003
+ var item = _a[_i];
2004
+ this.effects.push(EffectDto.fromJS(item));
2005
+ }
707
2006
  }
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.');
2007
+ if (Array.isArray(_data["skillModifiers"])) {
2008
+ this.skillModifiers = [];
2009
+ for (var _b = 0, _c = _data["skillModifiers"]; _b < _c.length; _b++) {
2010
+ var item = _c[_b];
2011
+ this.skillModifiers.push(SkillModifierGroupDto.fromJS(item));
2012
+ }
711
2013
  }
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;
2014
+ }
2015
+ };
2016
+ ItemSetBonusStageDto.fromJS = function (data) {
2017
+ data = typeof data === 'object' ? data : {};
2018
+ var result = new ItemSetBonusStageDto();
2019
+ result.init(data);
2020
+ return result;
2021
+ };
2022
+ ItemSetBonusStageDto.prototype.toJSON = function (data) {
2023
+ data = typeof data === 'object' ? data : {};
2024
+ data["setNumber"] = this.setNumber;
2025
+ if (Array.isArray(this.effects)) {
2026
+ data["effects"] = [];
2027
+ for (var _i = 0, _a = this.effects; _i < _a.length; _i++) {
2028
+ var item = _a[_i];
2029
+ data["effects"].push(item.toJSON());
719
2030
  }
720
- if (region !== undefined) {
721
- localVarQueryParameter['region'] = region;
2031
+ }
2032
+ if (Array.isArray(this.skillModifiers)) {
2033
+ data["skillModifiers"] = [];
2034
+ for (var _b = 0, _c = this.skillModifiers; _b < _c.length; _b++) {
2035
+ var item = _c[_b];
2036
+ data["skillModifiers"].push(item.toJSON());
722
2037
  }
723
- if (offset !== undefined) {
724
- localVarQueryParameter['offset'] = offset;
2038
+ }
2039
+ return data;
2040
+ };
2041
+ return ItemSetBonusStageDto;
2042
+ }());
2043
+ var ItemSkillDto = /** @class */ (function () {
2044
+ function ItemSkillDto(data) {
2045
+ if (data) {
2046
+ for (var property in data) {
2047
+ if (data.hasOwnProperty(property))
2048
+ this[property] = data[property];
725
2049
  }
726
- if (patch !== undefined) {
727
- localVarQueryParameter['patch'] = patch;
2050
+ }
2051
+ }
2052
+ ItemSkillDto.prototype.init = function (_data) {
2053
+ if (_data) {
2054
+ this.title = _data["title"];
2055
+ this.description = _data["description"];
2056
+ this.jobstyle = _data["jobstyle"];
2057
+ }
2058
+ };
2059
+ ItemSkillDto.fromJS = function (data) {
2060
+ data = typeof data === 'object' ? data : {};
2061
+ var result = new ItemSkillDto();
2062
+ result.init(data);
2063
+ return result;
2064
+ };
2065
+ ItemSkillDto.prototype.toJSON = function (data) {
2066
+ data = typeof data === 'object' ? data : {};
2067
+ data["title"] = this.title;
2068
+ data["description"] = this.description;
2069
+ data["jobstyle"] = this.jobstyle;
2070
+ return data;
2071
+ };
2072
+ return ItemSkillDto;
2073
+ }());
2074
+ var ItemStatDto = /** @class */ (function () {
2075
+ function ItemStatDto(data) {
2076
+ if (data) {
2077
+ for (var property in data) {
2078
+ if (data.hasOwnProperty(property))
2079
+ this[property] = data[property];
728
2080
  }
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.');
2081
+ }
2082
+ }
2083
+ ItemStatDto.prototype.init = function (_data) {
2084
+ if (_data) {
2085
+ this.name = _data["name"];
2086
+ this.value = _data["value"];
2087
+ this.isPercentage = _data["isPercentage"];
2088
+ this.isMainStat = _data["isMainStat"];
2089
+ }
2090
+ };
2091
+ ItemStatDto.fromJS = function (data) {
2092
+ data = typeof data === 'object' ? data : {};
2093
+ var result = new ItemStatDto();
2094
+ result.init(data);
2095
+ return result;
2096
+ };
2097
+ ItemStatDto.prototype.toJSON = function (data) {
2098
+ data = typeof data === 'object' ? data : {};
2099
+ data["name"] = this.name;
2100
+ data["value"] = this.value;
2101
+ data["isPercentage"] = this.isPercentage;
2102
+ data["isMainStat"] = this.isMainStat;
2103
+ return data;
2104
+ };
2105
+ return ItemStatDto;
2106
+ }());
2107
+ var ItemTransformDto = /** @class */ (function () {
2108
+ function ItemTransformDto(data) {
2109
+ if (data) {
2110
+ for (var property in data) {
2111
+ if (data.hasOwnProperty(property))
2112
+ this[property] = data[property];
749
2113
  }
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;
2114
+ }
2115
+ }
2116
+ ItemTransformDto.prototype.init = function (_data) {
2117
+ if (_data) {
2118
+ this.moneyCost = _data["moneyCost"];
2119
+ if (Array.isArray(_data["itemCost"])) {
2120
+ this.itemCost = [];
2121
+ for (var _i = 0, _a = _data["itemCost"]; _i < _a.length; _i++) {
2122
+ var item = _a[_i];
2123
+ this.itemCost.push(ItemRefWithCount.fromJS(item));
2124
+ }
757
2125
  }
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.');
2126
+ this.itemReward = _data["itemReward"] ? ItemRefWithCount.fromJS(_data["itemReward"]) : undefined;
2127
+ }
2128
+ };
2129
+ ItemTransformDto.fromJS = function (data) {
2130
+ data = typeof data === 'object' ? data : {};
2131
+ var result = new ItemTransformDto();
2132
+ result.init(data);
2133
+ return result;
2134
+ };
2135
+ ItemTransformDto.prototype.toJSON = function (data) {
2136
+ data = typeof data === 'object' ? data : {};
2137
+ data["moneyCost"] = this.moneyCost;
2138
+ if (Array.isArray(this.itemCost)) {
2139
+ data["itemCost"] = [];
2140
+ for (var _i = 0, _a = this.itemCost; _i < _a.length; _i++) {
2141
+ var item = _a[_i];
2142
+ data["itemCost"].push(item.toJSON());
778
2143
  }
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;
2144
+ }
2145
+ data["itemReward"] = this.itemReward ? this.itemReward.toJSON() : undefined;
2146
+ return data;
2147
+ };
2148
+ return ItemTransformDto;
2149
+ }());
2150
+ var ItemUpgradeInfoDto = /** @class */ (function () {
2151
+ function ItemUpgradeInfoDto(data) {
2152
+ if (data) {
2153
+ for (var property in data) {
2154
+ if (data.hasOwnProperty(property))
2155
+ this[property] = data[property];
786
2156
  }
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.');
2157
+ }
2158
+ }
2159
+ ItemUpgradeInfoDto.prototype.init = function (_data) {
2160
+ if (_data) {
2161
+ this.moneyCost = _data["moneyCost"];
2162
+ if (Array.isArray(_data["itemCost"])) {
2163
+ this.itemCost = [];
2164
+ for (var _i = 0, _a = _data["itemCost"]; _i < _a.length; _i++) {
2165
+ var item = _a[_i];
2166
+ this.itemCost.push(ItemRefWithCount.fromJS(item));
2167
+ }
852
2168
  }
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.');
2169
+ this.offerItemId = _data["offerItemId"];
2170
+ this.offerItemLevel = _data["offerItemLevel"];
2171
+ }
2172
+ };
2173
+ ItemUpgradeInfoDto.fromJS = function (data) {
2174
+ data = typeof data === 'object' ? data : {};
2175
+ var result = new ItemUpgradeInfoDto();
2176
+ result.init(data);
2177
+ return result;
2178
+ };
2179
+ ItemUpgradeInfoDto.prototype.toJSON = function (data) {
2180
+ data = typeof data === 'object' ? data : {};
2181
+ data["moneyCost"] = this.moneyCost;
2182
+ if (Array.isArray(this.itemCost)) {
2183
+ data["itemCost"] = [];
2184
+ for (var _i = 0, _a = this.itemCost; _i < _a.length; _i++) {
2185
+ var item = _a[_i];
2186
+ data["itemCost"].push(item.toJSON());
856
2187
  }
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.');
2188
+ }
2189
+ data["offerItemId"] = this.offerItemId;
2190
+ data["offerItemLevel"] = this.offerItemLevel;
2191
+ return data;
2192
+ };
2193
+ return ItemUpgradeInfoDto;
2194
+ }());
2195
+ var ItemWithStagesDto = /** @class */ (function () {
2196
+ function ItemWithStagesDto(data) {
2197
+ if (data) {
2198
+ for (var property in data) {
2199
+ if (data.hasOwnProperty(property))
2200
+ this[property] = data[property];
860
2201
  }
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;
2202
+ }
2203
+ }
2204
+ ItemWithStagesDto.prototype.init = function (_data) {
2205
+ if (_data) {
2206
+ this.item = _data["item"] ? BnsItemDto.fromJS(_data["item"]) : undefined;
2207
+ if (_data["jsonDiffPatchesForIds"]) {
2208
+ this.jsonDiffPatchesForIds = {};
2209
+ for (var key in _data["jsonDiffPatchesForIds"]) {
2210
+ if (_data["jsonDiffPatchesForIds"].hasOwnProperty(key))
2211
+ this.jsonDiffPatchesForIds[key] = _data["jsonDiffPatchesForIds"][key];
2212
+ }
868
2213
  }
869
- if (itemType !== undefined) {
870
- localVarQueryParameter['itemType'] = itemType;
2214
+ }
2215
+ };
2216
+ ItemWithStagesDto.fromJS = function (data) {
2217
+ data = typeof data === 'object' ? data : {};
2218
+ var result = new ItemWithStagesDto();
2219
+ result.init(data);
2220
+ return result;
2221
+ };
2222
+ ItemWithStagesDto.prototype.toJSON = function (data) {
2223
+ data = typeof data === 'object' ? data : {};
2224
+ data["item"] = this.item ? this.item.toJSON() : undefined;
2225
+ if (this.jsonDiffPatchesForIds) {
2226
+ data["jsonDiffPatchesForIds"] = {};
2227
+ for (var key in this.jsonDiffPatchesForIds) {
2228
+ if (this.jsonDiffPatchesForIds.hasOwnProperty(key))
2229
+ data["jsonDiffPatchesForIds"][key] = this.jsonDiffPatchesForIds[key];
871
2230
  }
872
- if (technicalJobName !== undefined) {
873
- localVarQueryParameter['technicalJobName'] = technicalJobName;
2231
+ }
2232
+ return data;
2233
+ };
2234
+ return ItemWithStagesDto;
2235
+ }());
2236
+ var PatchesListPatch = /** @class */ (function () {
2237
+ function PatchesListPatch(data) {
2238
+ if (data) {
2239
+ for (var property in data) {
2240
+ if (data.hasOwnProperty(property))
2241
+ this[property] = data[property];
874
2242
  }
875
- if (patch !== undefined) {
876
- localVarQueryParameter['patch'] = patch;
2243
+ }
2244
+ }
2245
+ PatchesListPatch.prototype.init = function (_data) {
2246
+ if (_data) {
2247
+ this.short = _data["short"];
2248
+ this.text = _data["text"];
2249
+ this.index = _data["index"];
2250
+ }
2251
+ };
2252
+ PatchesListPatch.fromJS = function (data) {
2253
+ data = typeof data === 'object' ? data : {};
2254
+ var result = new PatchesListPatch();
2255
+ result.init(data);
2256
+ return result;
2257
+ };
2258
+ PatchesListPatch.prototype.toJSON = function (data) {
2259
+ data = typeof data === 'object' ? data : {};
2260
+ data["short"] = this.short;
2261
+ data["text"] = this.text;
2262
+ data["index"] = this.index;
2263
+ return data;
2264
+ };
2265
+ return PatchesListPatch;
2266
+ }());
2267
+ var RequiredClassDto = /** @class */ (function () {
2268
+ function RequiredClassDto(data) {
2269
+ if (data) {
2270
+ for (var property in data) {
2271
+ if (data.hasOwnProperty(property))
2272
+ this[property] = data[property];
877
2273
  }
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
- },
2274
+ }
2275
+ }
2276
+ RequiredClassDto.prototype.init = function (_data) {
2277
+ if (_data) {
2278
+ this.enName = _data["enName"];
2279
+ this.technicalName = _data["technicalName"];
2280
+ }
887
2281
  };
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
- },
2282
+ RequiredClassDto.fromJS = function (data) {
2283
+ data = typeof data === 'object' ? data : {};
2284
+ var result = new RequiredClassDto();
2285
+ result.init(data);
2286
+ return result;
1196
2287
  };
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;
2288
+ RequiredClassDto.prototype.toJSON = function (data) {
2289
+ data = typeof data === 'object' ? data : {};
2290
+ data["enName"] = this.enName;
2291
+ data["technicalName"] = this.technicalName;
2292
+ return data;
2293
+ };
2294
+ return RequiredClassDto;
2295
+ }());
2296
+ var SetItemDto = /** @class */ (function () {
2297
+ function SetItemDto(data) {
2298
+ if (data) {
2299
+ for (var property in data) {
2300
+ if (data.hasOwnProperty(property))
2301
+ this[property] = data[property];
2302
+ }
2303
+ }
1208
2304
  }
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);
2305
+ SetItemDto.prototype.init = function (_data) {
2306
+ if (_data) {
2307
+ this.itemName = _data["itemName"];
2308
+ this.itemIcon = _data["itemIcon"] ? ItemIconDto.fromJS(_data["itemIcon"]) : undefined;
2309
+ }
1221
2310
  };
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);
2311
+ SetItemDto.fromJS = function (data) {
2312
+ data = typeof data === 'object' ? data : {};
2313
+ var result = new SetItemDto();
2314
+ result.init(data);
2315
+ return result;
1234
2316
  };
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);
2317
+ SetItemDto.prototype.toJSON = function (data) {
2318
+ data = typeof data === 'object' ? data : {};
2319
+ data["itemName"] = this.itemName;
2320
+ data["itemIcon"] = this.itemIcon ? this.itemIcon.toJSON() : undefined;
2321
+ return data;
1247
2322
  };
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);
2323
+ return SetItemDto;
2324
+ }());
2325
+ var SkillModifierDto = /** @class */ (function () {
2326
+ function SkillModifierDto(data) {
2327
+ if (data) {
2328
+ for (var property in data) {
2329
+ if (data.hasOwnProperty(property))
2330
+ this[property] = data[property];
2331
+ }
2332
+ }
2333
+ }
2334
+ SkillModifierDto.prototype.init = function (_data) {
2335
+ if (_data) {
2336
+ if (Array.isArray(_data["skills"])) {
2337
+ this.skills = [];
2338
+ for (var _i = 0, _a = _data["skills"]; _i < _a.length; _i++) {
2339
+ var item = _a[_i];
2340
+ this.skills.push(Int32StringTuple.fromJS(item));
2341
+ }
2342
+ }
2343
+ this.verb = _data["verb"];
2344
+ this.value = _data["value"];
2345
+ }
1260
2346
  };
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);
2347
+ SkillModifierDto.fromJS = function (data) {
2348
+ data = typeof data === 'object' ? data : {};
2349
+ var result = new SkillModifierDto();
2350
+ result.init(data);
2351
+ return result;
1274
2352
  };
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);
2353
+ SkillModifierDto.prototype.toJSON = function (data) {
2354
+ data = typeof data === 'object' ? data : {};
2355
+ if (Array.isArray(this.skills)) {
2356
+ data["skills"] = [];
2357
+ for (var _i = 0, _a = this.skills; _i < _a.length; _i++) {
2358
+ var item = _a[_i];
2359
+ data["skills"].push(item.toJSON());
2360
+ }
2361
+ }
2362
+ data["verb"] = this.verb;
2363
+ data["value"] = this.value;
2364
+ return data;
1290
2365
  };
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);
2366
+ return SkillModifierDto;
2367
+ }());
2368
+ var SkillModifierGroupDto = /** @class */ (function () {
2369
+ function SkillModifierGroupDto(data) {
2370
+ if (data) {
2371
+ for (var property in data) {
2372
+ if (data.hasOwnProperty(property))
2373
+ this[property] = data[property];
2374
+ }
2375
+ }
2376
+ }
2377
+ SkillModifierGroupDto.prototype.init = function (_data) {
2378
+ if (_data) {
2379
+ this.jobstyle = _data["jobstyle"];
2380
+ if (Array.isArray(_data["modifiers"])) {
2381
+ this.modifiers = [];
2382
+ for (var _i = 0, _a = _data["modifiers"]; _i < _a.length; _i++) {
2383
+ var item = _a[_i];
2384
+ this.modifiers.push(SkillModifierDto.fromJS(item));
2385
+ }
2386
+ }
2387
+ }
1302
2388
  };
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);
2389
+ SkillModifierGroupDto.fromJS = function (data) {
2390
+ data = typeof data === 'object' ? data : {};
2391
+ var result = new SkillModifierGroupDto();
2392
+ result.init(data);
2393
+ return result;
1315
2394
  };
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);
2395
+ SkillModifierGroupDto.prototype.toJSON = function (data) {
2396
+ data = typeof data === 'object' ? data : {};
2397
+ data["jobstyle"] = this.jobstyle;
2398
+ if (Array.isArray(this.modifiers)) {
2399
+ data["modifiers"] = [];
2400
+ for (var _i = 0, _a = this.modifiers; _i < _a.length; _i++) {
2401
+ var item = _a[_i];
2402
+ data["modifiers"].push(item.toJSON());
2403
+ }
2404
+ }
2405
+ return data;
1325
2406
  };
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);
2407
+ return SkillModifierGroupDto;
2408
+ }());
2409
+ var SlateStoneDto = /** @class */ (function () {
2410
+ function SlateStoneDto(data) {
2411
+ if (data) {
2412
+ for (var property in data) {
2413
+ if (data.hasOwnProperty(property))
2414
+ this[property] = data[property];
2415
+ }
2416
+ }
2417
+ }
2418
+ SlateStoneDto.prototype.init = function (_data) {
2419
+ if (_data) {
2420
+ this.name = _data["name"];
2421
+ this.grade = _data["grade"];
2422
+ this.icon = _data["icon"] ? ItemIconDto.fromJS(_data["icon"]) : undefined;
2423
+ this.iconCase = _data["iconCase"] ? ItemIconDto.fromJS(_data["iconCase"]) : undefined;
2424
+ if (Array.isArray(_data["stats"])) {
2425
+ this.stats = [];
2426
+ for (var _i = 0, _a = _data["stats"]; _i < _a.length; _i++) {
2427
+ var item = _a[_i];
2428
+ this.stats.push(ItemStatDto.fromJS(item));
2429
+ }
2430
+ }
2431
+ }
1335
2432
  };
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);
2433
+ SlateStoneDto.fromJS = function (data) {
2434
+ data = typeof data === 'object' ? data : {};
2435
+ var result = new SlateStoneDto();
2436
+ result.init(data);
2437
+ return result;
1344
2438
  };
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);
2439
+ SlateStoneDto.prototype.toJSON = function (data) {
2440
+ data = typeof data === 'object' ? data : {};
2441
+ data["name"] = this.name;
2442
+ data["grade"] = this.grade;
2443
+ data["icon"] = this.icon ? this.icon.toJSON() : undefined;
2444
+ data["iconCase"] = this.iconCase ? this.iconCase.toJSON() : undefined;
2445
+ if (Array.isArray(this.stats)) {
2446
+ data["stats"] = [];
2447
+ for (var _i = 0, _a = this.stats; _i < _a.length; _i++) {
2448
+ var item = _a[_i];
2449
+ data["stats"].push(item.toJSON());
2450
+ }
2451
+ }
2452
+ return data;
1353
2453
  };
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);
2454
+ return SlateStoneDto;
2455
+ }());
2456
+ var ApiException = /** @class */ (function (_super) {
2457
+ __extends(ApiException, _super);
2458
+ function ApiException(message, status, response, headers, result) {
2459
+ var _this = _super.call(this) || this;
2460
+ _this.isApiException = true;
2461
+ _this.message = message;
2462
+ _this.status = status;
2463
+ _this.response = response;
2464
+ _this.headers = headers;
2465
+ _this.result = result;
2466
+ return _this;
2467
+ }
2468
+ ApiException.isApiException = function (obj) {
2469
+ return obj.isApiException === true;
1366
2470
  };
1367
- return BnsItemApi;
1368
- }(BaseAPI));
2471
+ return ApiException;
2472
+ }(Error));
2473
+ function throwException(message, status, response, headers, result) {
2474
+ if (result !== null && result !== undefined)
2475
+ throw result;
2476
+ else
2477
+ throw new ApiException(message, status, response, headers, null);
2478
+ }
1369
2479
 
1370
2480
  var ItemDownloadClient = /** @class */ (function () {
1371
2481
  function ItemDownloadClient(region, patch) {
1372
2482
  if (patch === void 0) { patch = ""; }
1373
2483
  this.patch = patch;
1374
2484
  this.region = region;
1375
- var config = {
1376
- basePath: ItemDownloadClient.urlBase,
1377
- };
1378
- this.instance = new BnsItemApi(config);
2485
+ var baseUrl = ItemDownloadClient.GetUrlBase();
2486
+ this.instance = new BnsItemApiClient(baseUrl);
1379
2487
  }
2488
+ ItemDownloadClient.GetUrlBase = function () {
2489
+ var environment = process.env.NODE_ENV || "development";
2490
+ var url = "https://bnsitemstoragewebapi.azurewebsites.net";
2491
+ if (environment == "development") {
2492
+ url = "https://localhost:44330";
2493
+ }
2494
+ return url;
2495
+ };
1380
2496
  ItemDownloadClient.prototype.GetNewItems = function () {
1381
2497
  return __awaiter(this, void 0, void 0, function () {
1382
2498
  var result;
1383
2499
  return __generator(this, function (_a) {
1384
2500
  switch (_a.label) {
1385
- case 0: return [4 /*yield*/, this.instance.bnsItemAddedOrModifiedItemsGet(true, false, this.region, this.patch, ItemDownloadClient.options)];
2501
+ case 0: return [4 /*yield*/, this.instance.addedOrModifiedItems(true, false, this.region, this.patch)];
1386
2502
  case 1:
1387
2503
  result = _a.sent();
1388
2504
  return [2 /*return*/, result];
@@ -1395,7 +2511,7 @@ var ItemDownloadClient = /** @class */ (function () {
1395
2511
  var result;
1396
2512
  return __generator(this, function (_a) {
1397
2513
  switch (_a.label) {
1398
- case 0: return [4 /*yield*/, this.instance.bnsItemAddedOrModifiedItemsGet(false, true, this.region, this.patch, ItemDownloadClient.options)];
2514
+ case 0: return [4 /*yield*/, this.instance.addedOrModifiedItems(false, true, this.region, this.patch)];
1399
2515
  case 1:
1400
2516
  result = _a.sent();
1401
2517
  return [2 /*return*/, result];
@@ -1408,7 +2524,7 @@ var ItemDownloadClient = /** @class */ (function () {
1408
2524
  var result;
1409
2525
  return __generator(this, function (_a) {
1410
2526
  switch (_a.label) {
1411
- case 0: return [4 /*yield*/, this.instance.bnsItemItemByStringGet(idlevelString, this.region, false, this.patch, ItemDownloadClient.options)];
2527
+ case 0: return [4 /*yield*/, this.instance.itemByString(idlevelString, this.region, false, this.patch)];
1412
2528
  case 1:
1413
2529
  result = _a.sent();
1414
2530
  return [2 /*return*/, result];
@@ -1421,7 +2537,7 @@ var ItemDownloadClient = /** @class */ (function () {
1421
2537
  var result;
1422
2538
  return __generator(this, function (_a) {
1423
2539
  switch (_a.label) {
1424
- case 0: return [4 /*yield*/, this.instance.bnsItemItemGet(id, level, this.region, false, this.patch, ItemDownloadClient.options)];
2540
+ case 0: return [4 /*yield*/, this.instance.item(id, level, this.region, false, this.patch)];
1425
2541
  case 1:
1426
2542
  result = _a.sent();
1427
2543
  return [2 /*return*/, result];
@@ -1434,7 +2550,7 @@ var ItemDownloadClient = /** @class */ (function () {
1434
2550
  var result;
1435
2551
  return __generator(this, function (_a) {
1436
2552
  switch (_a.label) {
1437
- case 0: return [4 /*yield*/, this.instance.bnsItemItemsByCategoryGet(this.region, category, technicalClassName, gradesString, minGs, this.patch, undefined, ItemDownloadClient.options)];
2553
+ case 0: return [4 /*yield*/, this.instance.itemsByCategory(this.region, category, technicalClassName, gradesString, minGs, this.patch, undefined)];
1438
2554
  case 1:
1439
2555
  result = _a.sent();
1440
2556
  return [2 /*return*/, result];
@@ -1447,7 +2563,7 @@ var ItemDownloadClient = /** @class */ (function () {
1447
2563
  var result;
1448
2564
  return __generator(this, function (_a) {
1449
2565
  switch (_a.label) {
1450
- case 0: return [4 /*yield*/, this.instance.bnsItemAllUpgradesForItemGet(item.id, item.level, this.region, this.patch, ItemDownloadClient.options)];
2566
+ case 0: return [4 /*yield*/, this.instance.allUpgradesForItem(item.id, item.level, this.region, this.patch)];
1451
2567
  case 1:
1452
2568
  result = _a.sent();
1453
2569
  return [2 /*return*/, result];
@@ -1460,7 +2576,7 @@ var ItemDownloadClient = /** @class */ (function () {
1460
2576
  var result;
1461
2577
  return __generator(this, function (_a) {
1462
2578
  switch (_a.label) {
1463
- case 0: return [4 /*yield*/, this.instance.bnsItemAllUpgradesForItemGet(id, level, this.region, this.patch, ItemDownloadClient.options)];
2579
+ case 0: return [4 /*yield*/, this.instance.allUpgradesForItem(id, level, this.region, this.patch)];
1464
2580
  case 1:
1465
2581
  result = _a.sent();
1466
2582
  return [2 /*return*/, result];
@@ -1468,12 +2584,6 @@ var ItemDownloadClient = /** @class */ (function () {
1468
2584
  });
1469
2585
  });
1470
2586
  };
1471
- ItemDownloadClient.urlBase = "https://bnsitemstoragewebapi.azurewebsites.net";
1472
- ItemDownloadClient.options = {
1473
- "headers": {
1474
- "Referer": "https://yast.vercel.app"
1475
- }
1476
- };
1477
2587
  return ItemDownloadClient;
1478
2588
  }());
1479
2589
 
@@ -5978,12 +7088,12 @@ function GetAccumulatedUpgradeCost(item, steps) {
5978
7088
  }
5979
7089
  });
5980
7090
  });
5981
- result.push({
7091
+ result.push(new ItemImproveCostOptionDto({
5982
7092
  isRandom: item.itemImprove.upgradeOptions[0].isRandom,
5983
7093
  mainItemCost: mainCost,
5984
7094
  subItemCost: subCosts,
5985
7095
  moneyCost: moneyCost
5986
- });
7096
+ }));
5987
7097
  }
5988
7098
  return result;
5989
7099
  }