bnstooltips 1.14.0 → 1.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -376,15 +376,20 @@ var BnsItemApiClient = /** @class */ (function (_super) {
376
376
  return Promise.resolve(null);
377
377
  };
378
378
  /**
379
+ * @param v (optional)
379
380
  * @return Success
380
381
  */
381
- BnsItemApiClient.prototype.patches = function (region) {
382
+ BnsItemApiClient.prototype.patches = function (region, v) {
382
383
  var _this = this;
383
384
  var url_ = this.baseUrl + "/BnsItem/Patches?";
384
385
  if (region === undefined || region === null)
385
386
  throw new Error("The parameter 'region' must be defined and cannot be null.");
386
387
  else
387
388
  url_ += "region=" + encodeURIComponent("" + region) + "&";
389
+ if (v === null)
390
+ throw new Error("The parameter 'v' cannot be null.");
391
+ else if (v !== undefined)
392
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
388
393
  url_ = url_.replace(/[?&]$/, "");
389
394
  var options_ = {
390
395
  method: "GET",
@@ -421,15 +426,20 @@ var BnsItemApiClient = /** @class */ (function (_super) {
421
426
  return Promise.resolve(null);
422
427
  };
423
428
  /**
429
+ * @param v (optional)
424
430
  * @return Success
425
431
  */
426
- BnsItemApiClient.prototype.latestPatch = function (region) {
432
+ BnsItemApiClient.prototype.latestPatch = function (region, v) {
427
433
  var _this = this;
428
434
  var url_ = this.baseUrl + "/BnsItem/LatestPatch?";
429
435
  if (region === undefined || region === null)
430
436
  throw new Error("The parameter 'region' must be defined and cannot be null.");
431
437
  else
432
438
  url_ += "region=" + encodeURIComponent("" + region) + "&";
439
+ if (v === null)
440
+ throw new Error("The parameter 'v' cannot be null.");
441
+ else if (v !== undefined)
442
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
433
443
  url_ = url_.replace(/[?&]$/, "");
434
444
  var options_ = {
435
445
  method: "GET",
@@ -466,11 +476,16 @@ var BnsItemApiClient = /** @class */ (function (_super) {
466
476
  return Promise.resolve(null);
467
477
  };
468
478
  /**
479
+ * @param v (optional)
469
480
  * @return Success
470
481
  */
471
- BnsItemApiClient.prototype.regions = function () {
482
+ BnsItemApiClient.prototype.regions = function (v) {
472
483
  var _this = this;
473
- var url_ = this.baseUrl + "/BnsItem/Regions";
484
+ var url_ = this.baseUrl + "/BnsItem/Regions?";
485
+ if (v === null)
486
+ throw new Error("The parameter 'v' cannot be null.");
487
+ else if (v !== undefined)
488
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
474
489
  url_ = url_.replace(/[?&]$/, "");
475
490
  var options_ = {
476
491
  method: "GET",
@@ -508,9 +523,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
508
523
  };
509
524
  /**
510
525
  * @param patch (optional)
526
+ * @param v (optional)
511
527
  * @return Success
512
528
  */
513
- BnsItemApiClient.prototype.yastItems = function (region, itemType, technicalJobName, patch) {
529
+ BnsItemApiClient.prototype.yastItems = function (region, itemType, technicalJobName, patch, v) {
514
530
  var _this = this;
515
531
  var url_ = this.baseUrl + "/BnsItem/YastItems?";
516
532
  if (region === undefined || region === null)
@@ -529,6 +545,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
529
545
  throw new Error("The parameter 'patch' cannot be null.");
530
546
  else if (patch !== undefined)
531
547
  url_ += "patch=" + encodeURIComponent("" + patch) + "&";
548
+ if (v === null)
549
+ throw new Error("The parameter 'v' cannot be null.");
550
+ else if (v !== undefined)
551
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
532
552
  url_ = url_.replace(/[?&]$/, "");
533
553
  var options_ = {
534
554
  method: "GET",
@@ -569,9 +589,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
569
589
  * @param itemLevel (optional)
570
590
  * @param region (optional)
571
591
  * @param patch (optional)
592
+ * @param v (optional)
572
593
  * @return Success
573
594
  */
574
- BnsItemApiClient.prototype.allStagesForItem = function (itemId, itemLevel, region, patch) {
595
+ BnsItemApiClient.prototype.allStagesForItem = function (itemId, itemLevel, region, patch, v) {
575
596
  var _this = this;
576
597
  var url_ = this.baseUrl + "/BnsItem/AllStagesForItem?";
577
598
  if (itemId === null)
@@ -590,6 +611,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
590
611
  throw new Error("The parameter 'patch' cannot be null.");
591
612
  else if (patch !== undefined)
592
613
  url_ += "patch=" + encodeURIComponent("" + patch) + "&";
614
+ if (v === null)
615
+ throw new Error("The parameter 'v' cannot be null.");
616
+ else if (v !== undefined)
617
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
593
618
  url_ = url_.replace(/[?&]$/, "");
594
619
  var options_ = {
595
620
  method: "GET",
@@ -630,10 +655,11 @@ var BnsItemApiClient = /** @class */ (function (_super) {
630
655
  * @param itemLevel (optional)
631
656
  * @param region (optional)
632
657
  * @param patch (optional)
658
+ * @param v (optional)
633
659
  * @return Success
634
660
  * @deprecated
635
661
  */
636
- BnsItemApiClient.prototype.allUpgradesForItem = function (itemId, itemLevel, region, patch) {
662
+ BnsItemApiClient.prototype.allUpgradesForItem = function (itemId, itemLevel, region, patch, v) {
637
663
  var _this = this;
638
664
  var url_ = this.baseUrl + "/BnsItem/AllUpgradesForItem?";
639
665
  if (itemId === null)
@@ -652,6 +678,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
652
678
  throw new Error("The parameter 'patch' cannot be null.");
653
679
  else if (patch !== undefined)
654
680
  url_ += "patch=" + encodeURIComponent("" + patch) + "&";
681
+ if (v === null)
682
+ throw new Error("The parameter 'v' cannot be null.");
683
+ else if (v !== undefined)
684
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
655
685
  url_ = url_.replace(/[?&]$/, "");
656
686
  var options_ = {
657
687
  method: "GET",
@@ -689,9 +719,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
689
719
  };
690
720
  /**
691
721
  * @param patch (optional)
722
+ * @param v (optional)
692
723
  * @return Success
693
724
  */
694
- BnsItemApiClient.prototype.addedOrModifiedItems = function (added, modified, region, patch) {
725
+ BnsItemApiClient.prototype.addedOrModifiedItems = function (added, modified, region, patch, v) {
695
726
  var _this = this;
696
727
  var url_ = this.baseUrl + "/BnsItem/AddedOrModifiedItems?";
697
728
  if (added === undefined || added === null)
@@ -710,6 +741,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
710
741
  throw new Error("The parameter 'patch' cannot be null.");
711
742
  else if (patch !== undefined)
712
743
  url_ += "patch=" + encodeURIComponent("" + patch) + "&";
744
+ if (v === null)
745
+ throw new Error("The parameter 'v' cannot be null.");
746
+ else if (v !== undefined)
747
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
713
748
  url_ = url_.replace(/[?&]$/, "");
714
749
  var options_ = {
715
750
  method: "GET",
@@ -748,9 +783,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
748
783
  /**
749
784
  * @param light (optional)
750
785
  * @param patch (optional)
786
+ * @param v (optional)
751
787
  * @return Success
752
788
  */
753
- BnsItemApiClient.prototype.itemByString = function (idLevel, region, light, patch) {
789
+ BnsItemApiClient.prototype.itemByString = function (idLevel, region, light, patch, v) {
754
790
  var _this = this;
755
791
  var url_ = this.baseUrl + "/BnsItem/ItemByString?";
756
792
  if (idLevel === undefined || idLevel === null)
@@ -769,6 +805,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
769
805
  throw new Error("The parameter 'patch' cannot be null.");
770
806
  else if (patch !== undefined)
771
807
  url_ += "patch=" + encodeURIComponent("" + patch) + "&";
808
+ if (v === null)
809
+ throw new Error("The parameter 'v' cannot be null.");
810
+ else if (v !== undefined)
811
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
772
812
  url_ = url_.replace(/[?&]$/, "");
773
813
  var options_ = {
774
814
  method: "GET",
@@ -807,9 +847,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
807
847
  /**
808
848
  * @param light (optional)
809
849
  * @param patch (optional)
850
+ * @param v (optional)
810
851
  * @return Success
811
852
  */
812
- BnsItemApiClient.prototype.item = function (id, level, region, light, patch) {
853
+ BnsItemApiClient.prototype.item = function (id, level, region, light, patch, v) {
813
854
  var _this = this;
814
855
  var url_ = this.baseUrl + "/BnsItem/Item?";
815
856
  if (id === undefined || id === null)
@@ -832,6 +873,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
832
873
  throw new Error("The parameter 'patch' cannot be null.");
833
874
  else if (patch !== undefined)
834
875
  url_ += "patch=" + encodeURIComponent("" + patch) + "&";
876
+ if (v === null)
877
+ throw new Error("The parameter 'v' cannot be null.");
878
+ else if (v !== undefined)
879
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
835
880
  url_ = url_.replace(/[?&]$/, "");
836
881
  var options_ = {
837
882
  method: "GET",
@@ -869,9 +914,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
869
914
  };
870
915
  /**
871
916
  * @param patch (optional)
917
+ * @param v (optional)
872
918
  * @return Success
873
919
  */
874
- BnsItemApiClient.prototype.itemsByName = function (name, region, patch) {
920
+ BnsItemApiClient.prototype.itemsByName = function (name, region, patch, v) {
875
921
  var _this = this;
876
922
  var url_ = this.baseUrl + "/BnsItem/ItemsByName?";
877
923
  if (name === undefined || name === null)
@@ -886,6 +932,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
886
932
  throw new Error("The parameter 'patch' cannot be null.");
887
933
  else if (patch !== undefined)
888
934
  url_ += "patch=" + encodeURIComponent("" + patch) + "&";
935
+ if (v === null)
936
+ throw new Error("The parameter 'v' cannot be null.");
937
+ else if (v !== undefined)
938
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
889
939
  url_ = url_.replace(/[?&]$/, "");
890
940
  var options_ = {
891
941
  method: "GET",
@@ -928,9 +978,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
928
978
  * @param minGs (optional)
929
979
  * @param patch (optional)
930
980
  * @param noDupes (optional)
981
+ * @param v (optional)
931
982
  * @return Success
932
983
  */
933
- BnsItemApiClient.prototype.itemsByCategory = function (region, category, technicalJobName, gradesString, minGs, patch, noDupes) {
984
+ BnsItemApiClient.prototype.itemsByCategory = function (region, category, technicalJobName, gradesString, minGs, patch, noDupes, v) {
934
985
  var _this = this;
935
986
  var url_ = this.baseUrl + "/BnsItem/ItemsByCategory?";
936
987
  if (region === undefined || region === null)
@@ -961,6 +1012,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
961
1012
  throw new Error("The parameter 'noDupes' cannot be null.");
962
1013
  else if (noDupes !== undefined)
963
1014
  url_ += "noDupes=" + encodeURIComponent("" + noDupes) + "&";
1015
+ if (v === null)
1016
+ throw new Error("The parameter 'v' cannot be null.");
1017
+ else if (v !== undefined)
1018
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
964
1019
  url_ = url_.replace(/[?&]$/, "");
965
1020
  var options_ = {
966
1021
  method: "GET",
@@ -999,9 +1054,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
999
1054
  /**
1000
1055
  * @param offset (optional)
1001
1056
  * @param patch (optional)
1057
+ * @param v (optional)
1002
1058
  * @return Success
1003
1059
  */
1004
- BnsItemApiClient.prototype.items = function (count, region, offset, patch) {
1060
+ BnsItemApiClient.prototype.items = function (count, region, offset, patch, v) {
1005
1061
  var _this = this;
1006
1062
  var url_ = this.baseUrl + "/BnsItem/Items?";
1007
1063
  if (count === undefined || count === null)
@@ -1020,6 +1076,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
1020
1076
  throw new Error("The parameter 'patch' cannot be null.");
1021
1077
  else if (patch !== undefined)
1022
1078
  url_ += "patch=" + encodeURIComponent("" + patch) + "&";
1079
+ if (v === null)
1080
+ throw new Error("The parameter 'v' cannot be null.");
1081
+ else if (v !== undefined)
1082
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
1023
1083
  url_ = url_.replace(/[?&]$/, "");
1024
1084
  var options_ = {
1025
1085
  method: "GET",
@@ -1058,9 +1118,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
1058
1118
  /**
1059
1119
  * @param light (optional)
1060
1120
  * @param patch (optional)
1121
+ * @param v (optional)
1061
1122
  * @return Success
1062
1123
  */
1063
- BnsItemApiClient.prototype.itemsByIds = function (region, light, patch, body) {
1124
+ BnsItemApiClient.prototype.itemsByIds = function (region, light, patch, v, body) {
1064
1125
  var _this = this;
1065
1126
  var url_ = this.baseUrl + "/BnsItem/ItemsByIds?";
1066
1127
  if (region === undefined || region === null)
@@ -1075,6 +1136,10 @@ var BnsItemApiClient = /** @class */ (function (_super) {
1075
1136
  throw new Error("The parameter 'patch' cannot be null.");
1076
1137
  else if (patch !== undefined)
1077
1138
  url_ += "patch=" + encodeURIComponent("" + patch) + "&";
1139
+ if (v === null)
1140
+ throw new Error("The parameter 'v' cannot be null.");
1141
+ else if (v !== undefined)
1142
+ url_ += "v=" + encodeURIComponent("" + v) + "&";
1078
1143
  url_ = url_.replace(/[?&]$/, "");
1079
1144
  var content_ = JSON.stringify(body);
1080
1145
  var options_ = {
@@ -2510,6 +2575,7 @@ function throwException(message, status, response, headers, result) {
2510
2575
  var ItemDownloadClient = /** @class */ (function () {
2511
2576
  function ItemDownloadClient(region, patch) {
2512
2577
  if (patch === void 0) { patch = ""; }
2578
+ this.apiV = "v2";
2513
2579
  this.patch = patch;
2514
2580
  this.region = region;
2515
2581
  var baseUrl = ItemDownloadClient.GetUrlBase();
@@ -2528,10 +2594,10 @@ var ItemDownloadClient = /** @class */ (function () {
2528
2594
  var result;
2529
2595
  return __generator(this, function (_a) {
2530
2596
  switch (_a.label) {
2531
- case 0: return [4 /*yield*/, this.instance.addedOrModifiedItems(true, false, this.region, this.patch)];
2597
+ case 0: return [4 /*yield*/, this.instance.addedOrModifiedItems(true, false, this.region, this.patch, this.apiV)];
2532
2598
  case 1:
2533
2599
  result = _a.sent();
2534
- return [2 /*return*/, result];
2600
+ return [2 /*return*/, result.items];
2535
2601
  }
2536
2602
  });
2537
2603
  });
@@ -2541,10 +2607,10 @@ var ItemDownloadClient = /** @class */ (function () {
2541
2607
  var result;
2542
2608
  return __generator(this, function (_a) {
2543
2609
  switch (_a.label) {
2544
- case 0: return [4 /*yield*/, this.instance.addedOrModifiedItems(false, true, this.region, this.patch)];
2610
+ case 0: return [4 /*yield*/, this.instance.addedOrModifiedItems(false, true, this.region, this.patch, this.apiV)];
2545
2611
  case 1:
2546
2612
  result = _a.sent();
2547
- return [2 /*return*/, result];
2613
+ return [2 /*return*/, result.items];
2548
2614
  }
2549
2615
  });
2550
2616
  });
@@ -2554,7 +2620,7 @@ var ItemDownloadClient = /** @class */ (function () {
2554
2620
  var result;
2555
2621
  return __generator(this, function (_a) {
2556
2622
  switch (_a.label) {
2557
- case 0: return [4 /*yield*/, this.instance.itemByString(idlevelString, this.region, false, this.patch)];
2623
+ case 0: return [4 /*yield*/, this.instance.itemByString(idlevelString, this.region, false, this.patch, this.apiV)];
2558
2624
  case 1:
2559
2625
  result = _a.sent();
2560
2626
  return [2 /*return*/, result];
@@ -2567,7 +2633,7 @@ var ItemDownloadClient = /** @class */ (function () {
2567
2633
  var result;
2568
2634
  return __generator(this, function (_a) {
2569
2635
  switch (_a.label) {
2570
- case 0: return [4 /*yield*/, this.instance.item(id, level, this.region, false, this.patch)];
2636
+ case 0: return [4 /*yield*/, this.instance.item(id, level, this.region, false, this.patch, this.apiV)];
2571
2637
  case 1:
2572
2638
  result = _a.sent();
2573
2639
  return [2 /*return*/, result];
@@ -2580,10 +2646,10 @@ var ItemDownloadClient = /** @class */ (function () {
2580
2646
  var result;
2581
2647
  return __generator(this, function (_a) {
2582
2648
  switch (_a.label) {
2583
- case 0: return [4 /*yield*/, this.instance.itemsByCategory(this.region, category, technicalClassName, gradesString, minGs, this.patch, undefined)];
2649
+ case 0: return [4 /*yield*/, this.instance.itemsByCategory(this.region, category, technicalClassName, gradesString, minGs, this.patch, undefined, this.apiV)];
2584
2650
  case 1:
2585
2651
  result = _a.sent();
2586
- return [2 /*return*/, result];
2652
+ return [2 /*return*/, result.items];
2587
2653
  }
2588
2654
  });
2589
2655
  });
@@ -2593,10 +2659,10 @@ var ItemDownloadClient = /** @class */ (function () {
2593
2659
  var result;
2594
2660
  return __generator(this, function (_a) {
2595
2661
  switch (_a.label) {
2596
- case 0: return [4 /*yield*/, this.instance.allUpgradesForItem(item.id, item.level, this.region, this.patch)];
2662
+ case 0: return [4 /*yield*/, this.instance.allUpgradesForItem(item.id, item.level, this.region, this.patch, this.apiV)];
2597
2663
  case 1:
2598
2664
  result = _a.sent();
2599
- return [2 /*return*/, result];
2665
+ return [2 /*return*/, result.items];
2600
2666
  }
2601
2667
  });
2602
2668
  });
@@ -2606,10 +2672,10 @@ var ItemDownloadClient = /** @class */ (function () {
2606
2672
  var result;
2607
2673
  return __generator(this, function (_a) {
2608
2674
  switch (_a.label) {
2609
- case 0: return [4 /*yield*/, this.instance.allUpgradesForItem(id, level, this.region, this.patch)];
2675
+ case 0: return [4 /*yield*/, this.instance.allUpgradesForItem(id, level, this.region, this.patch, this.apiV)];
2610
2676
  case 1:
2611
2677
  result = _a.sent();
2612
- return [2 /*return*/, result];
2678
+ return [2 /*return*/, result.items];
2613
2679
  }
2614
2680
  });
2615
2681
  });