poe-api-manager 1.2.16 → 1.2.19

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 (141) hide show
  1. package/Changelog.md +17 -1
  2. package/README.md +3 -0
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +5 -0
  5. package/dist/lib/{modules/AbstractClass → AbstractClass}/PoeNinja.d.ts +6 -7
  6. package/dist/lib/{modules/AbstractClass → AbstractClass}/PoeNinja.js +7 -8
  7. package/dist/lib/AbstractClass/PoeWatch.d.ts +25 -0
  8. package/dist/lib/{modules/AbstractClass → AbstractClass}/PoeWatch.js +12 -4
  9. package/dist/lib/Utils.d.ts +3 -2
  10. package/dist/lib/Utils.js +4 -3
  11. package/dist/lib/errors/ApiError.d.ts +21 -0
  12. package/dist/lib/errors/ApiError.js +29 -0
  13. package/dist/lib/errors/CustomError.d.ts +15 -0
  14. package/dist/lib/errors/CustomError.js +22 -0
  15. package/dist/lib/errors/ValidationError.d.ts +17 -0
  16. package/dist/lib/errors/ValidationError.js +25 -0
  17. package/dist/lib/mainfunctions/propertyFilter.d.ts +7 -0
  18. package/dist/lib/{modules/mainfunctions → mainfunctions}/propertyFilter.js +3 -3
  19. package/dist/lib/modules/poe.ninja/currencyView/currencySubModules/submodules/CurrencyModule.d.ts +1 -1
  20. package/dist/lib/modules/poe.ninja/currencyView/currencySubModules/submodules/CurrencyModule.js +1 -1
  21. package/dist/lib/modules/poe.ninja/currencyView/currencySubModules/submodules/FragmentModule.d.ts +1 -1
  22. package/dist/lib/modules/poe.ninja/currencyView/currencySubModules/submodules/FragmentModule.js +1 -1
  23. package/dist/lib/modules/poe.ninja/func/getData.js +1 -1
  24. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/AllflameEmberModule.d.ts +1 -1
  25. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/AllflameEmberModule.js +1 -1
  26. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BaseTypeModule.d.ts +1 -1
  27. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BaseTypeModule.js +1 -1
  28. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BeastModule.d.ts +1 -1
  29. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BeastModule.js +1 -1
  30. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightRavagedMapModule.d.ts +1 -1
  31. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightRavagedMapModule.js +1 -1
  32. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightedMapModule.d.ts +1 -1
  33. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/BlightedMapModule.js +1 -1
  34. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ClusterJewelModule.d.ts +1 -1
  35. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ClusterJewelModule.js +1 -1
  36. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/CoffinModule.d.ts +1 -1
  37. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/CoffinModule.js +1 -1
  38. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DeliriumOrbsModule.d.ts +1 -1
  39. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DeliriumOrbsModule.js +1 -1
  40. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DivinationCardModule.d.ts +1 -1
  41. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/DivinationCardModule.js +1 -1
  42. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/EssenceModule.d.ts +1 -1
  43. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/EssenceModule.js +1 -1
  44. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/FossilModule.d.ts +1 -1
  45. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/FossilModule.js +1 -1
  46. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/HelmetEnchantModule.d.ts +1 -1
  47. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/HelmetEnchantModule.js +1 -1
  48. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/IncubatorModule.d.ts +1 -1
  49. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/IncubatorModule.js +1 -1
  50. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/InvitationModule.d.ts +1 -1
  51. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/InvitationModule.js +1 -1
  52. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MapModule.d.ts +1 -1
  53. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MapModule.js +1 -1
  54. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MemoryModule.d.ts +1 -1
  55. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/MemoryModule.js +1 -1
  56. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OilModule.d.ts +1 -1
  57. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OilModule.js +1 -1
  58. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OmenModule.d.ts +1 -1
  59. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/OmenModule.js +1 -1
  60. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ResonatorModule.d.ts +1 -1
  61. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ResonatorModule.js +1 -1
  62. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ScarabModule.d.ts +1 -1
  63. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/ScarabModule.js +1 -1
  64. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/SkillGemModule.d.ts +1 -1
  65. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/SkillGemModule.js +1 -1
  66. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueAccessoryModule.d.ts +1 -1
  67. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueAccessoryModule.js +1 -1
  68. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueArmourModule.d.ts +1 -1
  69. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueArmourModule.js +1 -1
  70. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueFlaskModule.d.ts +1 -1
  71. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueFlaskModule.js +1 -1
  72. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueJewelModule.d.ts +1 -1
  73. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueJewelModule.js +1 -1
  74. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueMapModule.d.ts +1 -1
  75. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueMapModule.js +1 -1
  76. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueRelicModule.d.ts +1 -1
  77. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueRelicModule.js +1 -1
  78. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueWeaponModule.d.ts +1 -1
  79. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/UniqueWeaponModule.js +1 -1
  80. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/VialsModule.d.ts +1 -1
  81. package/dist/lib/modules/poe.ninja/itemView/itemSubmodules/subModules/VialsModule.js +1 -1
  82. package/dist/lib/modules/poe.watch/WatchViewModule.d.ts +4 -1
  83. package/dist/lib/modules/poe.watch/WatchViewModule.js +7 -7
  84. package/dist/lib/modules/poe.watch/allModules/subModules/AccessoryModule.d.ts +1 -1
  85. package/dist/lib/modules/poe.watch/allModules/subModules/AccessoryModule.js +2 -2
  86. package/dist/lib/modules/poe.watch/allModules/subModules/ArmourModule.d.ts +1 -1
  87. package/dist/lib/modules/poe.watch/allModules/subModules/ArmourModule.js +2 -2
  88. package/dist/lib/modules/poe.watch/allModules/subModules/BaseModule.d.ts +1 -1
  89. package/dist/lib/modules/poe.watch/allModules/subModules/BaseModule.js +2 -2
  90. package/dist/lib/modules/poe.watch/allModules/subModules/BeastModule.d.ts +1 -1
  91. package/dist/lib/modules/poe.watch/allModules/subModules/BeastModule.js +1 -1
  92. package/dist/lib/modules/poe.watch/allModules/subModules/CurrencyModule.d.ts +1 -1
  93. package/dist/lib/modules/poe.watch/allModules/subModules/CurrencyModule.js +1 -1
  94. package/dist/lib/modules/poe.watch/allModules/subModules/DeliriumOrbModule.d.ts +1 -1
  95. package/dist/lib/modules/poe.watch/allModules/subModules/DeliriumOrbModule.js +1 -1
  96. package/dist/lib/modules/poe.watch/allModules/subModules/DivsModule.d.ts +1 -1
  97. package/dist/lib/modules/poe.watch/allModules/subModules/DivsModule.js +2 -2
  98. package/dist/lib/modules/poe.watch/allModules/subModules/EssenceModule.d.ts +1 -1
  99. package/dist/lib/modules/poe.watch/allModules/subModules/EssenceModule.js +1 -1
  100. package/dist/lib/modules/poe.watch/allModules/subModules/FlaskModule.d.ts +1 -1
  101. package/dist/lib/modules/poe.watch/allModules/subModules/FlaskModule.js +1 -1
  102. package/dist/lib/modules/poe.watch/allModules/subModules/FossilModule.d.ts +1 -1
  103. package/dist/lib/modules/poe.watch/allModules/subModules/FossilModule.js +1 -1
  104. package/dist/lib/modules/poe.watch/allModules/subModules/FragmentModule.d.ts +1 -1
  105. package/dist/lib/modules/poe.watch/allModules/subModules/FragmentModule.js +1 -1
  106. package/dist/lib/modules/poe.watch/allModules/subModules/GemModule.d.ts +1 -1
  107. package/dist/lib/modules/poe.watch/allModules/subModules/GemModule.js +2 -2
  108. package/dist/lib/modules/poe.watch/allModules/subModules/InscribedModule.d.ts +1 -1
  109. package/dist/lib/modules/poe.watch/allModules/subModules/InscribedModule.js +1 -1
  110. package/dist/lib/modules/poe.watch/allModules/subModules/InvitationModule.d.ts +1 -1
  111. package/dist/lib/modules/poe.watch/allModules/subModules/InvitationModule.js +1 -1
  112. package/dist/lib/modules/poe.watch/allModules/subModules/JewelModule.d.ts +1 -1
  113. package/dist/lib/modules/poe.watch/allModules/subModules/JewelModule.js +1 -1
  114. package/dist/lib/modules/poe.watch/allModules/subModules/MapModule.d.ts +1 -1
  115. package/dist/lib/modules/poe.watch/allModules/subModules/MapModule.js +1 -1
  116. package/dist/lib/modules/poe.watch/allModules/subModules/OilModule.d.ts +1 -1
  117. package/dist/lib/modules/poe.watch/allModules/subModules/OilModule.js +1 -1
  118. package/dist/lib/modules/poe.watch/allModules/subModules/ScarabModule.d.ts +1 -1
  119. package/dist/lib/modules/poe.watch/allModules/subModules/ScarabModule.js +1 -1
  120. package/dist/lib/modules/poe.watch/allModules/subModules/SextantModule.d.ts +1 -1
  121. package/dist/lib/modules/poe.watch/allModules/subModules/SextantModule.js +1 -1
  122. package/dist/lib/modules/poe.watch/allModules/subModules/UniqueMapsModule.d.ts +1 -1
  123. package/dist/lib/modules/poe.watch/allModules/subModules/UniqueMapsModule.js +2 -2
  124. package/dist/lib/modules/poe.watch/allModules/subModules/WeaponModule.d.ts +1 -1
  125. package/dist/lib/modules/poe.watch/allModules/subModules/WeaponModule.js +2 -2
  126. package/dist/lib/modules/poe.watch/{allModules/fetch → fetch}/watchFetch.js +4 -2
  127. package/package.json +1 -1
  128. package/tsconfig.json +11 -12
  129. package/dist/lib/modules/AbstractClass/PoeWatch.d.ts +0 -17
  130. package/dist/lib/modules/mainfunctions/propertyFilter.d.ts +0 -7
  131. /package/dist/lib/{modules/Interfaces → Interfaces}/IPoeNinja.d.ts +0 -0
  132. /package/dist/lib/{modules/Interfaces → Interfaces}/IPoeNinja.js +0 -0
  133. /package/dist/lib/{modules/Interfaces → Interfaces}/IPoeWatch.d.ts +0 -0
  134. /package/dist/lib/{modules/Interfaces → Interfaces}/IPoeWatch.js +0 -0
  135. /package/dist/lib/modules/poe.watch/{allModules/fetch → fetch}/watchFetch.d.ts +0 -0
  136. /package/dist/lib/modules/poe.watch/{allModules/func → func}/WatchUrlGenerator.d.ts +0 -0
  137. /package/dist/lib/modules/poe.watch/{allModules/func → func}/WatchUrlGenerator.js +0 -0
  138. /package/dist/lib/modules/poe.watch/{allModules/func → func}/getCategory.d.ts +0 -0
  139. /package/dist/lib/modules/poe.watch/{allModules/func → func}/getCategory.js +0 -0
  140. /package/dist/lib/modules/poe.watch/{allModules/func → func}/getData.d.ts +0 -0
  141. /package/dist/lib/modules/poe.watch/{allModules/func → func}/getData.js +0 -0
package/Changelog.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.19
4
+ - 🚀[Added] poe.watch API with the following features:
5
+ - Unique Maps
6
+ - Delirium Orb
7
+ - Divination Card
8
+
9
+ ## 1.2.18
10
+ - 🛠️[Fix] Quick fix poeWatch error.
11
+ - 🛠️[Fix] Quick fix folder structure.
12
+
13
+ ## 1.2.17
14
+ - 🛠️[Fix] Quick fix github actions.
15
+
16
+ ## 1.2.16
17
+ - 🛠️[Fix] Quick fix.
18
+
3
19
  ## 1.2.14
4
20
  - 🚀[New] Publish jsr.
5
21
 
@@ -54,4 +70,4 @@
54
70
  - Invitations
55
71
  - Memories
56
72
 
57
- ## 0.0.1 Publish
73
+ ## 0.0.1 Publish
package/README.md CHANGED
@@ -152,6 +152,9 @@ What we can get here is as follows.
152
152
  - Flask
153
153
  - Base
154
154
  - Beast
155
+ - Unique Maps
156
+ - Delirium Orb
157
+ - Divination Card
155
158
 
156
159
  - getData() => function returns data purely.
157
160
  ```javascript
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { NinjaAPI } from "./lib/NinjaAPI";
2
2
  import { WatchAPI } from "./lib/WatchAPI";
3
3
  import Utils from "./lib/Utils";
4
- export { NinjaAPI, WatchAPI, Utils, };
4
+ export { NinjaAPI, WatchAPI, Utils };
package/dist/index.js CHANGED
@@ -1,4 +1,9 @@
1
1
  "use strict";
2
+ /*
3
+ * Main Entry Point for the poe-api-manager package.
4
+ * This file exports the main classes and functions.
5
+ * @module poe-api-manager
6
+ */
2
7
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
8
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
9
  };
@@ -12,17 +12,16 @@ declare abstract class PoeNinja implements IPoeNinja {
12
12
  /**
13
13
  * Represents a PoeNinja object.
14
14
  * @constructor
15
- * @param league - The league name.
16
- * @param typeName
17
- * @param type - The type.
18
- * @implements {IPoeNinja}
15
+ * @param {string} league - The league name.
16
+ * @param {string} typeName
17
+ * @param {string} type - The type.
19
18
  */
20
19
  constructor(league: string, typeName: string, type: string);
21
20
  /**
22
21
  * Retrieves data from the API based on the specified league, type name, and type.
23
- * @param requestedProperties - Optional array of properties to include in the retrieved data.
24
- * @returns A promise that resolves to an array of objects containing the retrieved data.
25
- * @throws If there is an error retrieving the data.
22
+ * @param {string} requestedProperties - Optional array of properties to include in the retrieved data.
23
+ * @returns {Promise<object[]>} A promise that resolves to an array of objects containing the retrieved data.
24
+ * @throws {Error} If there is an error retrieving the data.
26
25
  */
27
26
  getData(requestedProperties?: string[]): Promise<object[]>;
28
27
  }
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const getData_1 = __importDefault(require("../poe.ninja/func/getData"));
6
+ const getData_1 = __importDefault(require("../modules/poe.ninja/func/getData"));
7
7
  /**
8
8
  * Abstract class representing a PoeNinja.
9
9
  * @abstract
@@ -17,10 +17,9 @@ class PoeNinja {
17
17
  /**
18
18
  * Represents a PoeNinja object.
19
19
  * @constructor
20
- * @param league - The league name.
21
- * @param typeName
22
- * @param type - The type.
23
- * @implements {IPoeNinja}
20
+ * @param {string} league - The league name.
21
+ * @param {string} typeName
22
+ * @param {string} type - The type.
24
23
  */
25
24
  constructor(league, typeName, type) {
26
25
  this.league = league;
@@ -29,9 +28,9 @@ class PoeNinja {
29
28
  }
30
29
  /**
31
30
  * Retrieves data from the API based on the specified league, type name, and type.
32
- * @param requestedProperties - Optional array of properties to include in the retrieved data.
33
- * @returns A promise that resolves to an array of objects containing the retrieved data.
34
- * @throws If there is an error retrieving the data.
31
+ * @param {string} requestedProperties - Optional array of properties to include in the retrieved data.
32
+ * @returns {Promise<object[]>} A promise that resolves to an array of objects containing the retrieved data.
33
+ * @throws {Error} If there is an error retrieving the data.
35
34
  */
36
35
  async getData(requestedProperties) {
37
36
  try {
@@ -0,0 +1,25 @@
1
+ import IPoeWatch from "../Interfaces/IPoeWatch";
2
+ /**
3
+ * Represents an abstract class for interacting with the PoeWatch API.
4
+ * @abstract
5
+ * @class
6
+ * @implements {IPoeWatch}
7
+ */
8
+ declare abstract class PoeWatch implements IPoeWatch {
9
+ protected readonly league: string;
10
+ protected readonly type: string;
11
+ /**
12
+ * Creates a new instance of PoeWatch.
13
+ * @param {string} league - The league name to get data from.
14
+ * @param {string} type - The type of data to retrieve (e.g. 'currency', 'items', etc.).
15
+ */
16
+ constructor(league: string, type: string);
17
+ /**
18
+ * Retrieves data from the PoeWatch API.
19
+ * @param {string[]} requestedProperties Optional array of properties to include in the response.
20
+ * @returns {Promise<object[]>} A promise that resolves to an array of objects containing the requested data.
21
+ * @throws {Error} If there is an error retrieving the data.
22
+ */
23
+ getData(requestedProperties?: string[]): Promise<object[]>;
24
+ }
25
+ export default PoeWatch;
@@ -3,22 +3,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const getData_1 = __importDefault(require("../poe.watch/allModules/func/getData"));
6
+ const getData_1 = __importDefault(require("../modules/poe.watch/func/getData"));
7
7
  /**
8
8
  * Represents an abstract class for interacting with the PoeWatch API.
9
+ * @abstract
10
+ * @class
11
+ * @implements {IPoeWatch}
9
12
  */
10
13
  class PoeWatch {
11
14
  league;
12
15
  type;
16
+ /**
17
+ * Creates a new instance of PoeWatch.
18
+ * @param {string} league - The league name to get data from.
19
+ * @param {string} type - The type of data to retrieve (e.g. 'currency', 'items', etc.).
20
+ */
13
21
  constructor(league, type) {
14
22
  this.league = league;
15
23
  this.type = type;
16
24
  }
17
25
  /**
18
26
  * Retrieves data from the PoeWatch API.
19
- * @param requestedProperties Optional array of properties to include in the response.
20
- * @returns A promise that resolves to an array of objects containing the requested data.
21
- * @throws If there is an error retrieving the data.
27
+ * @param {string[]} requestedProperties Optional array of properties to include in the response.
28
+ * @returns {Promise<object[]>} A promise that resolves to an array of objects containing the requested data.
29
+ * @throws {Error} If there is an error retrieving the data.
22
30
  */
23
31
  async getData(requestedProperties) {
24
32
  try {
@@ -7,7 +7,7 @@ declare class Utils {
7
7
  /**
8
8
  * Fetches the list of leagues for the game.
9
9
  * @returns {string[]} The array of league names.
10
- * @throws If there's an error fetching the leagues.
10
+ * @throws {Error} If there's an error fetching the leagues.
11
11
  */
12
12
  getLeagues(): Promise<string[]>;
13
13
  /**
@@ -15,7 +15,8 @@ declare class Utils {
15
15
  *
16
16
  * @param {object[]} data - The array of objects to filter.
17
17
  * @param {string[]} properties - The array of property names to include in the result.
18
- * @returns {object[]} - An array of objects with only the specified properties.
18
+ * @returns {Promise<object[]>} - An array of objects with only the specified properties.
19
+ * @throws {Error} If there's an error filtering the properties.
19
20
  */
20
21
  filterProperties(data: object[], properties: string[]): Promise<object[]>;
21
22
  }
package/dist/lib/Utils.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const getLeagues_1 = __importDefault(require("./modules/utils/getLeagues"));
7
- const propertyFilter_1 = __importDefault(require("./modules/mainfunctions/propertyFilter"));
7
+ const propertyFilter_1 = __importDefault(require("./mainfunctions/propertyFilter"));
8
8
  /**
9
9
  * A utility class.
10
10
  * @class
@@ -14,7 +14,7 @@ class Utils {
14
14
  /**
15
15
  * Fetches the list of leagues for the game.
16
16
  * @returns {string[]} The array of league names.
17
- * @throws If there's an error fetching the leagues.
17
+ * @throws {Error} If there's an error fetching the leagues.
18
18
  */
19
19
  async getLeagues() {
20
20
  try {
@@ -29,7 +29,8 @@ class Utils {
29
29
  *
30
30
  * @param {object[]} data - The array of objects to filter.
31
31
  * @param {string[]} properties - The array of property names to include in the result.
32
- * @returns {object[]} - An array of objects with only the specified properties.
32
+ * @returns {Promise<object[]>} - An array of objects with only the specified properties.
33
+ * @throws {Error} If there's an error filtering the properties.
33
34
  */
34
35
  async filterProperties(data, properties) {
35
36
  try {
@@ -0,0 +1,21 @@
1
+ import CustomError from "./CustomError";
2
+ /**
3
+ * Represents an API error with a message, status code, and additional details.
4
+ * @class
5
+ * @extends {CustomError}
6
+ */
7
+ declare class ApiError extends CustomError {
8
+ /**
9
+ * The additional details of the error.
10
+ * @type {any}
11
+ */
12
+ details: any;
13
+ /**
14
+ * Creates a new instance of ApiError.
15
+ * @param {string} message - The error message.
16
+ * @param {number} statusCode - The HTTP status code.
17
+ * @param {any} details - The additional details of the error.
18
+ */
19
+ constructor(message: string, statusCode: number, details?: any);
20
+ }
21
+ export default ApiError;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const CustomError_1 = __importDefault(require("./CustomError"));
7
+ /**
8
+ * Represents an API error with a message, status code, and additional details.
9
+ * @class
10
+ * @extends {CustomError}
11
+ */
12
+ class ApiError extends CustomError_1.default {
13
+ /**
14
+ * The additional details of the error.
15
+ * @type {any}
16
+ */
17
+ details;
18
+ /**
19
+ * Creates a new instance of ApiError.
20
+ * @param {string} message - The error message.
21
+ * @param {number} statusCode - The HTTP status code.
22
+ * @param {any} details - The additional details of the error.
23
+ */
24
+ constructor(message, statusCode, details) {
25
+ super(message, statusCode);
26
+ this.details = details;
27
+ }
28
+ }
29
+ exports.default = ApiError;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Represents a custom error with a message and a status code.
3
+ * @class
4
+ * @extends {Error}
5
+ */
6
+ declare class CustomError extends Error {
7
+ statusCode: number;
8
+ /**
9
+ * Creates a new instance of CustomError.
10
+ * @param {string} message - The error message.
11
+ * @param {number} statusCode - The HTTP status code.
12
+ */
13
+ constructor(message: string, statusCode: number);
14
+ }
15
+ export default CustomError;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * Represents a custom error with a message and a status code.
5
+ * @class
6
+ * @extends {Error}
7
+ */
8
+ class CustomError extends Error {
9
+ statusCode;
10
+ /**
11
+ * Creates a new instance of CustomError.
12
+ * @param {string} message - The error message.
13
+ * @param {number} statusCode - The HTTP status code.
14
+ */
15
+ constructor(message, statusCode) {
16
+ super(message);
17
+ this.statusCode = statusCode;
18
+ this.name = this.constructor.name;
19
+ Error.captureStackTrace(this, this.constructor);
20
+ }
21
+ }
22
+ exports.default = CustomError;
@@ -0,0 +1,17 @@
1
+ import CustomError from "./CustomError";
2
+ /**
3
+ * Represents an API error with a message, status code, and additional details.
4
+ * @class
5
+ * @extends {CustomError}
6
+ */
7
+ declare class ValidationError extends CustomError {
8
+ details: any;
9
+ /**
10
+ * Creates a new instance of ApiError.
11
+ * @param {string} message - The error message.
12
+ * @param {number} statusCode - The HTTP status code.
13
+ * @param {any} details - The additional details of the error.
14
+ */
15
+ constructor(message: string, statusCode: number, details?: any);
16
+ }
17
+ export default ValidationError;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const CustomError_1 = __importDefault(require("./CustomError"));
7
+ /**
8
+ * Represents an API error with a message, status code, and additional details.
9
+ * @class
10
+ * @extends {CustomError}
11
+ */
12
+ class ValidationError extends CustomError_1.default {
13
+ details;
14
+ /**
15
+ * Creates a new instance of ApiError.
16
+ * @param {string} message - The error message.
17
+ * @param {number} statusCode - The HTTP status code.
18
+ * @param {any} details - The additional details of the error.
19
+ */
20
+ constructor(message, statusCode, details) {
21
+ super(message, statusCode);
22
+ this.details = details;
23
+ }
24
+ }
25
+ exports.default = ValidationError;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Filters properties of objects in an array based on the specified properties.
3
+ * @param {Record<string, any> []} data The array of objects to filter.
4
+ * @param {string} requestedProperties The array of property names to include in the result.
5
+ * @returns {object[]} An array of objects with only the specified properties.
6
+ */
7
+ export default function filterProperties(data: Record<string, any>[], requestedProperties: string[]): object[];
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  /**
4
4
  * Filters properties of objects in an array based on the specified properties.
5
- * @param data The array of objects to filter.
6
- * @param requestedProperties The array of property names to include in the result.
7
- * @returns An array of objects with only the specified properties.
5
+ * @param {Record<string, any> []} data The array of objects to filter.
6
+ * @param {string} requestedProperties The array of property names to include in the result.
7
+ * @returns {object[]} An array of objects with only the specified properties.
8
8
  */
9
9
  function filterProperties(data, requestedProperties) {
10
10
  const result = [];
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for retrieving currency data from the PoeNinja API.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  const getQuickCurrency_1 = __importDefault(require("../../../func/getQuickCurrency"));
8
8
  /**
9
9
  * Represents a module for retrieving currency data from the PoeNinja API.
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling fragments in the PoeNinja currency view.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling fragments in the PoeNinja currency view.
9
9
  */
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const fetchData_1 = __importDefault(require("../fetch/fetchData"));
7
- const propertyFilter_1 = __importDefault(require("../../mainfunctions/propertyFilter"));
7
+ const propertyFilter_1 = __importDefault(require("../../../mainfunctions/propertyFilter"));
8
8
  /**
9
9
  * Fetches data from the specified league, type, and typeName.
10
10
  *
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling Allflame Ember items in the PoeNinja library.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling Allflame Ember items in the PoeNinja library.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling base types.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling base types.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling beasts.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling beasts.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling blighted ravaged maps.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling blighted ravaged maps.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling blighted maps.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling blighted maps.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling cluster jewels.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling cluster jewels.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents an item submodule for retrieving data on Coffin items.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents an item submodule for retrieving data on Coffin items.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling delirium orbs.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling delirium orbs.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling divination cards.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling divination cards.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling essences.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling essences.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling fossils.
4
4
  */
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- const PoeNinja_1 = __importDefault(require("../../../../AbstractClass/PoeNinja"));
6
+ const PoeNinja_1 = __importDefault(require("../../../../../AbstractClass/PoeNinja"));
7
7
  /**
8
8
  * Represents a module for handling fossils.
9
9
  */
@@ -1,4 +1,4 @@
1
- import PoeNinja from "../../../../AbstractClass/PoeNinja";
1
+ import PoeNinja from "../../../../../AbstractClass/PoeNinja";
2
2
  /**
3
3
  * Represents a module for handling helmet enchants.
4
4
  */