@blizzard-api/classic-wow 3.0.5 → 4.0.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 (84) hide show
  1. package/dist/auction-house/index.d.ts +2 -0
  2. package/dist/auction-house/index.js +35 -0
  3. package/dist/auction-house/index.js.map +1 -0
  4. package/dist/character-achievements/index.d.ts +2 -0
  5. package/dist/character-achievements/index.js +30 -0
  6. package/dist/character-achievements/index.js.map +1 -0
  7. package/dist/character-equipment/index.d.ts +2 -0
  8. package/dist/character-equipment/index.js +19 -0
  9. package/dist/character-equipment/index.js.map +1 -0
  10. package/dist/character-hunter-pets/index.d.ts +2 -0
  11. package/dist/character-hunter-pets/index.js +19 -0
  12. package/dist/character-hunter-pets/index.js.map +1 -0
  13. package/dist/character-media/index.d.ts +2 -0
  14. package/dist/character-media/index.js +18 -0
  15. package/dist/character-media/index.js.map +1 -0
  16. package/dist/character-profile/index.d.ts +2 -0
  17. package/dist/character-profile/index.js +42 -0
  18. package/dist/character-profile/index.js.map +1 -0
  19. package/dist/character-specialization/index.d.ts +2 -0
  20. package/dist/character-specialization/index.js +18 -0
  21. package/dist/character-specialization/index.js.map +1 -0
  22. package/dist/character-statistics/index.d.ts +2 -0
  23. package/dist/character-statistics/index.js +18 -0
  24. package/dist/character-statistics/index.js.map +1 -0
  25. package/dist/connected-realm/index.d.ts +2 -0
  26. package/dist/connected-realm/index.js +47 -0
  27. package/dist/connected-realm/index.js.map +1 -0
  28. package/dist/creature/index.d.ts +2 -0
  29. package/dist/creature/index.js +105 -0
  30. package/dist/creature/index.js.map +1 -0
  31. package/dist/guild/index.d.ts +2 -0
  32. package/dist/guild/index.js +54 -0
  33. package/dist/guild/index.js.map +1 -0
  34. package/dist/guild-crest/index.d.ts +2 -0
  35. package/dist/guild-crest/index.js +41 -0
  36. package/dist/guild-crest/index.js.map +1 -0
  37. package/dist/index--VDjAqSZ.d.ts +23 -0
  38. package/dist/index-0TuKK7MU.d.ts +75 -0
  39. package/dist/index-B-LUShkQ.d.ts +167 -0
  40. package/dist/index-BHX6BR24.d.ts +163 -0
  41. package/dist/index-BQ-NY0vY.d.ts +128 -0
  42. package/dist/index-BZ8QSRSe.d.ts +90 -0
  43. package/dist/index-BrwXCy4D.d.ts +40 -0
  44. package/dist/index-BtfmrbYY.d.ts +31 -0
  45. package/dist/index-C7VwaWu6.d.ts +66 -0
  46. package/dist/index-Ce02MoQO.d.ts +37 -0
  47. package/dist/index-DDSvssGG.d.ts +59 -0
  48. package/dist/index-DSc_fuNb.d.ts +46 -0
  49. package/dist/index-DUgdQv4k.d.ts +36 -0
  50. package/dist/index-DajMx-uR.d.ts +143 -0
  51. package/dist/index-Djpr-_AW.d.ts +65 -0
  52. package/dist/index-DmVmLB_p.d.ts +51 -0
  53. package/dist/index-i0vuifJx.d.ts +33 -0
  54. package/dist/index-u8N9Fa6T.d.ts +290 -0
  55. package/dist/index-y_6cJbJi.d.ts +89 -0
  56. package/dist/index.d.ts +22 -1632
  57. package/dist/index.js +20 -753
  58. package/dist/index.js.map +1 -1
  59. package/dist/item/index.d.ts +2 -0
  60. package/dist/item/index.js +83 -0
  61. package/dist/item/index.js.map +1 -0
  62. package/dist/media-search/index.d.ts +2 -0
  63. package/dist/media-search/index.js +23 -0
  64. package/dist/media-search/index.js.map +1 -0
  65. package/dist/playable-class/index.d.ts +2 -0
  66. package/dist/playable-class/index.js +41 -0
  67. package/dist/playable-class/index.js.map +1 -0
  68. package/dist/playable-race/index.d.ts +2 -0
  69. package/dist/playable-race/index.js +29 -0
  70. package/dist/playable-race/index.js.map +1 -0
  71. package/dist/power-type/index.d.ts +2 -0
  72. package/dist/power-type/index.js +29 -0
  73. package/dist/power-type/index.js.map +1 -0
  74. package/dist/pvp-season/index.d.ts +2 -0
  75. package/dist/pvp-season/index.js +105 -0
  76. package/dist/pvp-season/index.js.map +1 -0
  77. package/dist/realm/index.d.ts +27 -0
  78. package/dist/realm/index.js +46 -0
  79. package/dist/realm/index.js.map +1 -0
  80. package/dist/region/index.d.ts +2 -0
  81. package/dist/region/index.js +29 -0
  82. package/dist/region/index.js.map +1 -0
  83. package/dist/types-gA98D5Xw.d.ts +79 -0
  84. package/package.json +16 -7
@@ -0,0 +1,29 @@
1
+ import { wowBasePath } from "@blizzard-api/core";
2
+ //#region src/region/index.ts
3
+ /**
4
+ * Get a region by ID.
5
+ * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
6
+ * @param regionId The region ID.
7
+ * @returns The region. See {@link RegionResponse}.
8
+ */
9
+ function region(namespace, regionId) {
10
+ return {
11
+ namespace,
12
+ path: `${wowBasePath}/region/${regionId}`
13
+ };
14
+ }
15
+ /**
16
+ * Get a region index.
17
+ * @param namespace The namespace to use. See {@link BlizzardNamespaces}.
18
+ * @returns The region index. See {@link RegionIndexResponse}.
19
+ */
20
+ function regionIndex(namespace) {
21
+ return {
22
+ namespace,
23
+ path: `${wowBasePath}/region/index`
24
+ };
25
+ }
26
+ //#endregion
27
+ export { region, regionIndex };
28
+
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/region/index.ts"],"sourcesContent":["import { wowBasePath } from '@blizzard-api/core';\nimport type { BlizzardNamespaces, Resource } from '@blizzard-api/core';\nimport type { RegionIndexResponse, RegionResponse } from './types';\n\n/**\n * Get a region by ID.\n * @param namespace The namespace to use. See {@link BlizzardNamespaces}.\n * @param regionId The region ID.\n * @returns The region. See {@link RegionResponse}.\n */\nexport function region(\n namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>,\n regionId: number,\n): Resource<RegionResponse> {\n return {\n namespace,\n path: `${wowBasePath}/region/${regionId}`,\n };\n}\n/**\n * Get a region index.\n * @param namespace The namespace to use. See {@link BlizzardNamespaces}.\n * @returns The region index. See {@link RegionIndexResponse}.\n */\nexport function regionIndex(\n namespace: Extract<BlizzardNamespaces, 'dynamic-classic1x' | 'dynamic-classic'>,\n): Resource<RegionIndexResponse> {\n return {\n namespace,\n path: `${wowBasePath}/region/index`,\n };\n}\n"],"mappings":";;;;;;;;AAUA,SAAgB,OACd,WACA,UAC0B;AAC1B,QAAO;EACL;EACA,MAAM,GAAG,YAAY,UAAU;EAChC;;;;;;;AAOH,SAAgB,YACd,WAC+B;AAC/B,QAAO;EACL;EACA,MAAM,GAAG,YAAY;EACtB"}
@@ -0,0 +1,79 @@
1
+ import { BaseSearchParameters, Href, KeyBase, Locales, NameId, NameIdKey, Realm, ResponseBase, SearchResponseWithoutResults } from "@blizzard-api/core";
2
+
3
+ //#region src/realm/types.d.ts
4
+ /**
5
+ * The category of a realm.
6
+ * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
7
+ */
8
+ type RealmCategory = 'Brazil' | 'English' | 'French' | 'German' | 'Italian' | 'Latin America' | 'Oceanic' | 'PS' | 'Russian' | 'Spanish' | 'United States' | '한국';
9
+ /**
10
+ * The response for a realm index.
11
+ * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
12
+ */
13
+ interface RealmIndexResponse extends ResponseBase {
14
+ realms: Array<Realm>;
15
+ }
16
+ type RealmLocales = 'deDE' | 'enGB' | 'enUS' | 'esES' | 'esMX' | 'frFR' | 'itIT' | 'koKR' | 'ptBR' | 'ptPT' | 'ruRU' | 'zhCN' | 'zhTW';
17
+ /**
18
+ * The response for a realm.
19
+ * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
20
+ */
21
+ interface RealmResponse extends NameId, ResponseBase {
22
+ category: RealmCategory;
23
+ connected_realm: Href;
24
+ is_tournament: boolean;
25
+ locale: RealmLocales;
26
+ region: NameIdKey;
27
+ slug: string;
28
+ timezone: RealmTimezone;
29
+ type: {
30
+ name: string;
31
+ type: RealmTypeCapitalized;
32
+ };
33
+ }
34
+ /**
35
+ * The search parameters for realms.
36
+ * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
37
+ * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search}
38
+ */
39
+ interface RealmSearchParameters extends BaseSearchParameters {
40
+ timezone?: RealmTimezone;
41
+ }
42
+ /**
43
+ * The response for a realm search.
44
+ * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
45
+ * @see {@link https://develop.battle.net/documentation/world-of-warcraft/guides/search}
46
+ */
47
+ interface RealmSearchResponse extends SearchResponseWithoutResults {
48
+ results: Array<RealmSearchResponseItem>;
49
+ }
50
+ /**
51
+ * The timezone of a realm.
52
+ */
53
+ type RealmTimezone = 'America/Chicago' | 'America/Denver' | 'America/Los_Angeles' | 'America/New_York' | 'America/Sao_Paulo' | 'Asia/Seoul' | 'Australia/Melbourne' | 'Europe/Paris';
54
+ type RealmTypeCapitalized = 'NORMAL' | 'PVP' | 'PVP_RP' | 'RP';
55
+ /**
56
+ * The type of a realm, capitalized and shortended).
57
+ */
58
+ interface RealmSearchResponseItem extends KeyBase {
59
+ data: {
60
+ category: Record<Locales, string>;
61
+ id: number;
62
+ is_tournament: boolean;
63
+ locale: RealmLocales;
64
+ name: Record<Locales, string | undefined>;
65
+ region: {
66
+ id: number;
67
+ name: Record<Locales, string>;
68
+ };
69
+ slug: string;
70
+ timezone: RealmTimezone;
71
+ type: {
72
+ name: Record<Locales, string>;
73
+ type: RealmTypeCapitalized;
74
+ };
75
+ };
76
+ }
77
+ //#endregion
78
+ export { RealmSearchParameters as a, RealmTypeCapitalized as c, RealmResponse as i, RealmIndexResponse as n, RealmSearchResponse as o, RealmLocales as r, RealmTimezone as s, RealmCategory as t };
79
+ //# sourceMappingURL=types-gA98D5Xw.d.ts.map
package/package.json CHANGED
@@ -1,21 +1,30 @@
1
1
  {
2
2
  "name": "@blizzard-api/classic-wow",
3
- "version": "3.0.5",
3
+ "version": "4.0.0",
4
4
  "license": "MIT",
5
5
  "author": "Putro",
6
6
  "description": "A series of helpers to interact with the World of Warcraft Classic Blizzard API",
7
- "repository": "https://github.com/Pewtro/blizzard-api/tree/main/packages/classic-wow",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/Pewtro/blizzard-api.git",
10
+ "directory": "packages/classic-wow"
11
+ },
8
12
  "type": "module",
9
13
  "engines": {
10
- "node": "^20.19.0 || ^22.13.0 || >=24"
14
+ "node": "^22.13.0 || ^24 || ^26"
11
15
  },
12
16
  "module": "./dist/index.js",
13
17
  "types": "./dist/index.d.ts",
14
18
  "exports": {
15
- "import": {
16
- "@blizzard-api/classic-wow-local": "./src/index.ts",
19
+ ".": {
20
+ "@blizzard-api/source": "./src/index.ts",
17
21
  "types": "./dist/index.d.ts",
18
22
  "default": "./dist/index.js"
23
+ },
24
+ "./*": {
25
+ "@blizzard-api/source": "./src/*/index.ts",
26
+ "types": "./dist/*/index.d.ts",
27
+ "default": "./dist/*/index.js"
19
28
  }
20
29
  },
21
30
  "files": [
@@ -34,10 +43,10 @@
34
43
  ],
35
44
  "dependencies": {},
36
45
  "peerDependencies": {
37
- "@blizzard-api/core": "3.0.2"
46
+ "@blizzard-api/core": "4.0.0"
38
47
  },
39
48
  "devDependencies": {
40
- "@blizzard-api/core": "3.0.2"
49
+ "@blizzard-api/core": "4.0.0"
41
50
  },
42
51
  "scripts": {
43
52
  "build": "tsdown",