@blizzard-api/wow 4.2.2 → 4.2.4

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 (121) hide show
  1. package/README.md +2 -2
  2. package/dist/account-profile/index.js +1 -1
  3. package/dist/account-profile/index.js.map +1 -1
  4. package/dist/achievements/index.js +3 -3
  5. package/dist/achievements/index.js.map +1 -1
  6. package/dist/auction-house/index.js +1 -1
  7. package/dist/auction-house/index.js.map +1 -1
  8. package/dist/azerite-essence/index.js +2 -2
  9. package/dist/azerite-essence/index.js.map +1 -1
  10. package/dist/character-achievements/index.js +2 -2
  11. package/dist/character-achievements/index.js.map +1 -1
  12. package/dist/character-appearance/index.js +1 -1
  13. package/dist/character-appearance/index.js.map +1 -1
  14. package/dist/character-collections/index.js +7 -7
  15. package/dist/character-collections/index.js.map +1 -1
  16. package/dist/character-encounters/index.js +3 -3
  17. package/dist/character-encounters/index.js.map +1 -1
  18. package/dist/character-equipment/index.js +1 -1
  19. package/dist/character-equipment/index.js.map +1 -1
  20. package/dist/character-house/index.js +1 -1
  21. package/dist/character-house/index.js.map +1 -1
  22. package/dist/character-hunter-pets/index.js +1 -1
  23. package/dist/character-hunter-pets/index.js.map +1 -1
  24. package/dist/character-media/index.js +1 -1
  25. package/dist/character-media/index.js.map +1 -1
  26. package/dist/character-mythic-keystone-profile/index.js +2 -2
  27. package/dist/character-mythic-keystone-profile/index.js.map +1 -1
  28. package/dist/character-professions/index.js +1 -1
  29. package/dist/character-professions/index.js.map +1 -1
  30. package/dist/character-profile/index.js +2 -2
  31. package/dist/character-profile/index.js.map +1 -1
  32. package/dist/character-pvp/index.js +2 -2
  33. package/dist/character-pvp/index.js.map +1 -1
  34. package/dist/character-quests/index.js +2 -2
  35. package/dist/character-quests/index.js.map +1 -1
  36. package/dist/character-reputations/index.js +1 -1
  37. package/dist/character-reputations/index.js.map +1 -1
  38. package/dist/character-soulbinds/index.js +1 -1
  39. package/dist/character-soulbinds/index.js.map +1 -1
  40. package/dist/character-specializations/index.js +1 -1
  41. package/dist/character-specializations/index.js.map +1 -1
  42. package/dist/character-statistics/index.js +1 -1
  43. package/dist/character-statistics/index.js.map +1 -1
  44. package/dist/character-titles/index.js +1 -1
  45. package/dist/character-titles/index.js.map +1 -1
  46. package/dist/connected-realm/index.js +1 -1
  47. package/dist/connected-realm/index.js.map +1 -1
  48. package/dist/covenant/index.js +4 -4
  49. package/dist/covenant/index.js.map +1 -1
  50. package/dist/creature/index.js +5 -5
  51. package/dist/creature/index.js.map +1 -1
  52. package/dist/guild/index.js +4 -4
  53. package/dist/guild/index.js.map +1 -1
  54. package/dist/guild-crest/index.js +2 -2
  55. package/dist/guild-crest/index.js.map +1 -1
  56. package/dist/heirloom/index.js +1 -1
  57. package/dist/heirloom/index.js.map +1 -1
  58. package/dist/housing-decor/index.js +4 -4
  59. package/dist/housing-decor/index.js.map +1 -1
  60. package/dist/{index-DVacJ9ne.d.ts → index-Cg4CfIKc.d.ts} +2 -2
  61. package/dist/{index-DRLsvfW5.d.ts → index-CisPLiDB.d.ts} +2 -2
  62. package/dist/{index-BaL7P-bA.d.ts → index-Cqlff6vd.d.ts} +2 -2
  63. package/dist/index.d.ts +3 -3
  64. package/dist/item/index.js +5 -5
  65. package/dist/item/index.js.map +1 -1
  66. package/dist/item-appearance/index.js +3 -3
  67. package/dist/item-appearance/index.js.map +1 -1
  68. package/dist/journal/index.js +4 -4
  69. package/dist/journal/index.js.map +1 -1
  70. package/dist/modified-crafting/index.js +2 -2
  71. package/dist/modified-crafting/index.js.map +1 -1
  72. package/dist/mount/index.js +1 -1
  73. package/dist/mount/index.js.map +1 -1
  74. package/dist/mythic-keystone-affix/index.js +2 -2
  75. package/dist/mythic-keystone-affix/index.js.map +1 -1
  76. package/dist/mythic-keystone-dungeon/index.js +3 -3
  77. package/dist/mythic-keystone-dungeon/index.js.map +1 -1
  78. package/dist/mythic-keystone-leaderboard/index.js +2 -2
  79. package/dist/mythic-keystone-leaderboard/index.js.map +1 -1
  80. package/dist/mythic-raid-leaderboard/index.js +1 -1
  81. package/dist/mythic-raid-leaderboard/index.js.map +1 -1
  82. package/dist/neighborhood-map/index.js +2 -2
  83. package/dist/neighborhood-map/index.js.map +1 -1
  84. package/dist/pet/index.d.ts +1 -1
  85. package/dist/pet/index.js +4 -4
  86. package/dist/pet/index.js.map +1 -1
  87. package/dist/playable-class/index.js +3 -3
  88. package/dist/playable-class/index.js.map +1 -1
  89. package/dist/playable-race/index.js +1 -1
  90. package/dist/playable-race/index.js.map +1 -1
  91. package/dist/playable-specialization/index.js +2 -2
  92. package/dist/playable-specialization/index.js.map +1 -1
  93. package/dist/power-type/index.js +1 -1
  94. package/dist/power-type/index.js.map +1 -1
  95. package/dist/profession/index.js +5 -5
  96. package/dist/profession/index.js.map +1 -1
  97. package/dist/pvp-season/index.js +4 -4
  98. package/dist/pvp-season/index.js.map +1 -1
  99. package/dist/pvp-tier/index.js +2 -2
  100. package/dist/pvp-tier/index.js.map +1 -1
  101. package/dist/quest/index.d.ts +1 -1
  102. package/dist/quest/index.js +4 -4
  103. package/dist/quest/index.js.map +1 -1
  104. package/dist/realm/index.js +1 -1
  105. package/dist/realm/index.js.map +1 -1
  106. package/dist/region/index.js +1 -1
  107. package/dist/region/index.js.map +1 -1
  108. package/dist/reputations/index.js +2 -2
  109. package/dist/reputations/index.js.map +1 -1
  110. package/dist/spell/index.js +2 -2
  111. package/dist/spell/index.js.map +1 -1
  112. package/dist/talent/index.d.ts +1 -1
  113. package/dist/talent/index.js +4 -4
  114. package/dist/talent/index.js.map +1 -1
  115. package/dist/tech-talent/index.js +3 -3
  116. package/dist/tech-talent/index.js.map +1 -1
  117. package/dist/title/index.js +1 -1
  118. package/dist/title/index.js.map +1 -1
  119. package/dist/toy/index.js +1 -1
  120. package/dist/toy/index.js.map +1 -1
  121. package/package.json +3 -3
@@ -7,7 +7,7 @@
7
7
  function characterSoulbinds(realmSlug, characterName) {
8
8
  return {
9
9
  namespace: "profile",
10
- path: `/profile/wow/character/${realmSlug}/${characterName.toLowerCase()}/soulbinds`
10
+ path: `/profile/wow/character/${encodeURIComponent(realmSlug)}/${encodeURIComponent(characterName.toLowerCase())}/soulbinds`
11
11
  };
12
12
  }
13
13
  export { characterSoulbinds };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/character-soulbinds/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { CharacterSoulbindsResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param characterName The lowercase name of the character.\n * @returns a character's soulbinds.\n */\nexport function characterSoulbinds(realmSlug: string, characterName: string): Resource<CharacterSoulbindsResponse> {\n return {\n namespace: 'profile',\n path: `/profile/wow/character/${realmSlug}/${characterName.toLowerCase()}/soulbinds`,\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,mBAAmB,WAAmB,eAA6D;CACjH,OAAO;EACL,WAAW;EACX,MAAM,0BAA0B,UAAU,GAAG,cAAc,YAAY,EAAE;CAC3E;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/character-soulbinds/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { CharacterSoulbindsResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param characterName The lowercase name of the character.\n * @returns a character's soulbinds.\n */\nexport function characterSoulbinds(realmSlug: string, characterName: string): Resource<CharacterSoulbindsResponse> {\n return {\n namespace: 'profile',\n path: `/profile/wow/character/${encodeURIComponent(realmSlug)}/${encodeURIComponent(characterName.toLowerCase())}/soulbinds`,\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,mBAAmB,WAAmB,eAA6D;CACjH,OAAO;EACL,WAAW;EACX,MAAM,0BAA0B,mBAAmB,SAAS,EAAE,GAAG,mBAAmB,cAAc,YAAY,CAAC,EAAE;CACnH;AACF"}
@@ -7,7 +7,7 @@
7
7
  function characterSpecializationsSummary(realmSlug, characterName) {
8
8
  return {
9
9
  namespace: "profile",
10
- path: `/profile/wow/character/${realmSlug}/${characterName}/specializations`
10
+ path: `/profile/wow/character/${encodeURIComponent(realmSlug)}/${encodeURIComponent(characterName)}/specializations`
11
11
  };
12
12
  }
13
13
  export { characterSpecializationsSummary };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/character-specializations/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { CharacterSpecializationsSummaryResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param characterName The lowercase name of the character.\n * @returns a summary of a character's specializations.\n */\nexport function characterSpecializationsSummary(\n realmSlug: string,\n characterName: string,\n): Resource<CharacterSpecializationsSummaryResponse> {\n return {\n namespace: 'profile',\n path: `/profile/wow/character/${realmSlug}/${characterName}/specializations`,\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,gCACd,WACA,eACmD;CACnD,OAAO;EACL,WAAW;EACX,MAAM,0BAA0B,UAAU,GAAG,cAAc;CAC7D;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/character-specializations/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { CharacterSpecializationsSummaryResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param characterName The lowercase name of the character.\n * @returns a summary of a character's specializations.\n */\nexport function characterSpecializationsSummary(\n realmSlug: string,\n characterName: string,\n): Resource<CharacterSpecializationsSummaryResponse> {\n return {\n namespace: 'profile',\n path: `/profile/wow/character/${encodeURIComponent(realmSlug)}/${encodeURIComponent(characterName)}/specializations`,\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,gCACd,WACA,eACmD;CACnD,OAAO;EACL,WAAW;EACX,MAAM,0BAA0B,mBAAmB,SAAS,EAAE,GAAG,mBAAmB,aAAa,EAAE;CACrG;AACF"}
@@ -7,7 +7,7 @@
7
7
  function characterStatisticsSummary(realmSlug, characterName) {
8
8
  return {
9
9
  namespace: "profile",
10
- path: `/profile/wow/character/${realmSlug}/${characterName}/statistics`
10
+ path: `/profile/wow/character/${encodeURIComponent(realmSlug)}/${encodeURIComponent(characterName)}/statistics`
11
11
  };
12
12
  }
13
13
  export { characterStatisticsSummary };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/character-statistics/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { CharacterStatisticsSummaryResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param characterName The lowercase name of the character.\n * @returns a statistics summary for a character.\n */\nexport function characterStatisticsSummary(\n realmSlug: string,\n characterName: string,\n): Resource<CharacterStatisticsSummaryResponse> {\n return {\n namespace: 'profile',\n path: `/profile/wow/character/${realmSlug}/${characterName}/statistics`,\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,2BACd,WACA,eAC8C;CAC9C,OAAO;EACL,WAAW;EACX,MAAM,0BAA0B,UAAU,GAAG,cAAc;CAC7D;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/character-statistics/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { CharacterStatisticsSummaryResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param characterName The lowercase name of the character.\n * @returns a statistics summary for a character.\n */\nexport function characterStatisticsSummary(\n realmSlug: string,\n characterName: string,\n): Resource<CharacterStatisticsSummaryResponse> {\n return {\n namespace: 'profile',\n path: `/profile/wow/character/${encodeURIComponent(realmSlug)}/${encodeURIComponent(characterName)}/statistics`,\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,2BACd,WACA,eAC8C;CAC9C,OAAO;EACL,WAAW;EACX,MAAM,0BAA0B,mBAAmB,SAAS,EAAE,GAAG,mBAAmB,aAAa,EAAE;CACrG;AACF"}
@@ -7,7 +7,7 @@
7
7
  function characterTitlesSummary(realmSlug, characterName) {
8
8
  return {
9
9
  namespace: "profile",
10
- path: `/profile/wow/character/${realmSlug}/${characterName}/titles`
10
+ path: `/profile/wow/character/${encodeURIComponent(realmSlug)}/${encodeURIComponent(characterName)}/titles`
11
11
  };
12
12
  }
13
13
  export { characterTitlesSummary };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/character-titles/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { CharacterTitlesSummaryResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param characterName The lowercase name of the character.\n * @returns a summary of titles a character has obtained.\n */\nexport function characterTitlesSummary(\n realmSlug: string,\n characterName: string,\n): Resource<CharacterTitlesSummaryResponse> {\n return {\n namespace: 'profile',\n path: `/profile/wow/character/${realmSlug}/${characterName}/titles`,\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,uBACd,WACA,eAC0C;CAC1C,OAAO;EACL,WAAW;EACX,MAAM,0BAA0B,UAAU,GAAG,cAAc;CAC7D;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/character-titles/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport type { CharacterTitlesSummaryResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param characterName The lowercase name of the character.\n * @returns a summary of titles a character has obtained.\n */\nexport function characterTitlesSummary(\n realmSlug: string,\n characterName: string,\n): Resource<CharacterTitlesSummaryResponse> {\n return {\n namespace: 'profile',\n path: `/profile/wow/character/${encodeURIComponent(realmSlug)}/${encodeURIComponent(characterName)}/titles`,\n };\n}\n"],"mappings":";;;;;;AAQA,SAAgB,uBACd,WACA,eAC0C;CAC1C,OAAO;EACL,WAAW;EACX,MAAM,0BAA0B,mBAAmB,SAAS,EAAE,GAAG,mBAAmB,aAAa,EAAE;CACrG;AACF"}
@@ -8,7 +8,7 @@ import { wowBasePath, wowSearchBasePath } from "@blizzard-api/core";
8
8
  function connectedRealm(connectedRealmId) {
9
9
  return {
10
10
  namespace: "dynamic",
11
- path: `${wowBasePath}/connected-realm/${connectedRealmId}`
11
+ path: `${wowBasePath}/connected-realm/${encodeURIComponent(connectedRealmId)}`
12
12
  };
13
13
  }
14
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/connected-realm/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type {\n ConnectedRealmIndexResponse,\n ConnectedRealmResponse,\n ConnectedRealmSearchParameters,\n ConnectedRealmSearchResponse,\n} from './types';\n\n/**\n * Get a connected realm by ID.\n * @param connectedRealmId The connected realm ID.\n * @returns The connected realm. See {@link ConnectedRealmResponse}.\n */\nexport function connectedRealm(connectedRealmId: number): Resource<ConnectedRealmResponse> {\n return {\n namespace: 'dynamic',\n path: `${wowBasePath}/connected-realm/${connectedRealmId}`,\n };\n}\n/**\n * Get a connected realm index.\n * @returns The connected realm index. See {@link ConnectedRealmIndexResponse}.\n */\nexport function connectedRealmIndex(): Resource<ConnectedRealmIndexResponse> {\n return {\n namespace: 'dynamic',\n path: `${wowBasePath}/connected-realm/index`,\n };\n}\n/**\n * Search for connected realms.\n * @param options The search parameters. See {@link ConnectedRealmSearchParameters}.\n * @returns The search results. See {@link ConnectedRealmSearchResponse}.\n */\nexport function connectedRealmSearch(\n options: ConnectedRealmSearchParameters,\n): Resource<ConnectedRealmSearchResponse, ConnectedRealmSearchParameters> {\n return {\n namespace: 'dynamic',\n parameters: {\n _page: options._page,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n 'realms.timezone': options['realms.timezone'],\n 'status.type': options['status.type'],\n },\n path: `${wowSearchBasePath}/connected-realm`,\n };\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,eAAe,kBAA4D;CACzF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,mBAAmB;CAC1C;AACF;;;;;AAKA,SAAgB,sBAA6D;CAC3E,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,qBACd,SACwE;CACxE,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;GACf,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;GAC9E,mBAAmB,QAAQ;GAC3B,eAAe,QAAQ;EACzB;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/connected-realm/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type {\n ConnectedRealmIndexResponse,\n ConnectedRealmResponse,\n ConnectedRealmSearchParameters,\n ConnectedRealmSearchResponse,\n} from './types';\n\n/**\n * Get a connected realm by ID.\n * @param connectedRealmId The connected realm ID.\n * @returns The connected realm. See {@link ConnectedRealmResponse}.\n */\nexport function connectedRealm(connectedRealmId: number): Resource<ConnectedRealmResponse> {\n return {\n namespace: 'dynamic',\n path: `${wowBasePath}/connected-realm/${encodeURIComponent(connectedRealmId)}`,\n };\n}\n/**\n * Get a connected realm index.\n * @returns The connected realm index. See {@link ConnectedRealmIndexResponse}.\n */\nexport function connectedRealmIndex(): Resource<ConnectedRealmIndexResponse> {\n return {\n namespace: 'dynamic',\n path: `${wowBasePath}/connected-realm/index`,\n };\n}\n/**\n * Search for connected realms.\n * @param options The search parameters. See {@link ConnectedRealmSearchParameters}.\n * @returns The search results. See {@link ConnectedRealmSearchResponse}.\n */\nexport function connectedRealmSearch(\n options: ConnectedRealmSearchParameters,\n): Resource<ConnectedRealmSearchResponse, ConnectedRealmSearchParameters> {\n return {\n namespace: 'dynamic',\n parameters: {\n _page: options._page,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n 'realms.timezone': options['realms.timezone'],\n 'status.type': options['status.type'],\n },\n path: `${wowSearchBasePath}/connected-realm`,\n };\n}\n"],"mappings":";;;;;;;AAcA,SAAgB,eAAe,kBAA4D;CACzF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,mBAAmB,mBAAmB,gBAAgB;CAC7E;AACF;;;;;AAKA,SAAgB,sBAA6D;CAC3E,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,qBACd,SACwE;CACxE,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;GACf,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;GAC9E,mBAAmB,QAAQ;GAC3B,eAAe,QAAQ;EACzB;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF"}
@@ -8,7 +8,7 @@ import { wowBasePath, wowMediaBasePath } from "@blizzard-api/core";
8
8
  function conduit(conduitId) {
9
9
  return {
10
10
  namespace: "static",
11
- path: `${wowBasePath}/covenant/conduit/${conduitId}`
11
+ path: `${wowBasePath}/covenant/conduit/${encodeURIComponent(conduitId)}`
12
12
  };
13
13
  }
14
14
  /**
@@ -29,7 +29,7 @@ function conduitIndex() {
29
29
  function covenant(covenantId) {
30
30
  return {
31
31
  namespace: "static",
32
- path: `${wowBasePath}/covenant/${covenantId}`
32
+ path: `${wowBasePath}/covenant/${encodeURIComponent(covenantId)}`
33
33
  };
34
34
  }
35
35
  /**
@@ -50,7 +50,7 @@ function covenantIndex() {
50
50
  function covenantMedia(covenantId) {
51
51
  return {
52
52
  namespace: "static",
53
- path: `${wowMediaBasePath}/covenant/${covenantId}`
53
+ path: `${wowMediaBasePath}/covenant/${encodeURIComponent(covenantId)}`
54
54
  };
55
55
  }
56
56
  /**
@@ -61,7 +61,7 @@ function covenantMedia(covenantId) {
61
61
  function soulbind(soulbindId) {
62
62
  return {
63
63
  namespace: "static",
64
- path: `${wowBasePath}/covenant/soulbind/${soulbindId}`
64
+ path: `${wowBasePath}/covenant/soulbind/${encodeURIComponent(soulbindId)}`
65
65
  };
66
66
  }
67
67
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/covenant/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowMediaBasePath } from '@blizzard-api/core';\nimport type {\n ConduitIndexResponse,\n ConduitResponse,\n CovenantIndexResponse,\n CovenantMediaResponse,\n CovenantResponse,\n SoulbindIndexResponse,\n SoulbindResponse,\n} from './types';\n\n/**\n * Get a conduit by ID.\n * @param conduitId The conduit ID.\n * @returns The conduit. See {@link ConduitResponse}.\n */\nexport function conduit(conduitId: number): Resource<ConduitResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/conduit/${conduitId}`,\n };\n}\n/**\n * Get a conduit index.\n * @returns The conduit index. See {@link ConduitIndexResponse}.\n */\nexport function conduitIndex(): Resource<ConduitIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/conduit/index`,\n };\n}\n/**\n * Get a covenant by ID.\n * @param covenantId The covenant ID.\n * @returns The covenant. See {@link CovenantResponse}.\n */\nexport function covenant(covenantId: number): Resource<CovenantResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/${covenantId}`,\n };\n}\n/**\n * Get a covenant index.\n * @returns The covenant index. See {@link CovenantIndexResponse}.\n */\nexport function covenantIndex(): Resource<CovenantIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/index`,\n };\n}\n/**\n * Get covenant media by ID.\n * @param covenantId The covenant ID.\n * @returns The covenant media. See {@link CovenantMediaResponse}.\n */\nexport function covenantMedia(covenantId: number): Resource<CovenantMediaResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/covenant/${covenantId}`,\n };\n}\n/**\n * Get a soulbind by ID.\n * @param soulbindId The soulbind ID.\n * @returns The soulbind. See {@link SoulbindResponse}.\n */\nexport function soulbind(soulbindId: number): Resource<SoulbindResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/soulbind/${soulbindId}`,\n };\n}\n/**\n * Get a soulbind index.\n * @returns The soulbind index. See {@link SoulbindIndexResponse}.\n */\nexport function soulbindIndex(): Resource<SoulbindIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/soulbind/index`,\n };\n}\n"],"mappings":";;;;;;;AAiBA,SAAgB,QAAQ,WAA8C;CACpE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,oBAAoB;CAC3C;AACF;;;;;AAKA,SAAgB,eAA+C;CAC7D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,SAAS,YAAgD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,YAAY;CACnC;AACF;;;;;AAKA,SAAgB,gBAAiD;CAC/D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,cAAc,YAAqD;CACjF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,YAAY;CACxC;AACF;;;;;;AAMA,SAAgB,SAAS,YAAgD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,qBAAqB;CAC5C;AACF;;;;;AAKA,SAAgB,gBAAiD;CAC/D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/covenant/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowMediaBasePath } from '@blizzard-api/core';\nimport type {\n ConduitIndexResponse,\n ConduitResponse,\n CovenantIndexResponse,\n CovenantMediaResponse,\n CovenantResponse,\n SoulbindIndexResponse,\n SoulbindResponse,\n} from './types';\n\n/**\n * Get a conduit by ID.\n * @param conduitId The conduit ID.\n * @returns The conduit. See {@link ConduitResponse}.\n */\nexport function conduit(conduitId: number): Resource<ConduitResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/conduit/${encodeURIComponent(conduitId)}`,\n };\n}\n/**\n * Get a conduit index.\n * @returns The conduit index. See {@link ConduitIndexResponse}.\n */\nexport function conduitIndex(): Resource<ConduitIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/conduit/index`,\n };\n}\n/**\n * Get a covenant by ID.\n * @param covenantId The covenant ID.\n * @returns The covenant. See {@link CovenantResponse}.\n */\nexport function covenant(covenantId: number): Resource<CovenantResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/${encodeURIComponent(covenantId)}`,\n };\n}\n/**\n * Get a covenant index.\n * @returns The covenant index. See {@link CovenantIndexResponse}.\n */\nexport function covenantIndex(): Resource<CovenantIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/index`,\n };\n}\n/**\n * Get covenant media by ID.\n * @param covenantId The covenant ID.\n * @returns The covenant media. See {@link CovenantMediaResponse}.\n */\nexport function covenantMedia(covenantId: number): Resource<CovenantMediaResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/covenant/${encodeURIComponent(covenantId)}`,\n };\n}\n/**\n * Get a soulbind by ID.\n * @param soulbindId The soulbind ID.\n * @returns The soulbind. See {@link SoulbindResponse}.\n */\nexport function soulbind(soulbindId: number): Resource<SoulbindResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/soulbind/${encodeURIComponent(soulbindId)}`,\n };\n}\n/**\n * Get a soulbind index.\n * @returns The soulbind index. See {@link SoulbindIndexResponse}.\n */\nexport function soulbindIndex(): Resource<SoulbindIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/covenant/soulbind/index`,\n };\n}\n"],"mappings":";;;;;;;AAiBA,SAAgB,QAAQ,WAA8C;CACpE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,oBAAoB,mBAAmB,SAAS;CACvE;AACF;;;;;AAKA,SAAgB,eAA+C;CAC7D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,SAAS,YAAgD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,YAAY,mBAAmB,UAAU;CAChE;AACF;;;;;AAKA,SAAgB,gBAAiD;CAC/D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,cAAc,YAAqD;CACjF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,YAAY,mBAAmB,UAAU;CACrE;AACF;;;;;;AAMA,SAAgB,SAAS,YAAgD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,qBAAqB,mBAAmB,UAAU;CACzE;AACF;;;;;AAKA,SAAgB,gBAAiD;CAC/D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF"}
@@ -8,7 +8,7 @@ import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from "@blizzard-api/
8
8
  function creature(creatureId) {
9
9
  return {
10
10
  namespace: "static",
11
- path: `${wowBasePath}/creature/${creatureId}`
11
+ path: `${wowBasePath}/creature/${encodeURIComponent(creatureId)}`
12
12
  };
13
13
  }
14
14
  /**
@@ -19,7 +19,7 @@ function creature(creatureId) {
19
19
  function creatureDisplayMedia(creatureDisplayId) {
20
20
  return {
21
21
  namespace: "static",
22
- path: `${wowMediaBasePath}/creature-display/${creatureDisplayId}`
22
+ path: `${wowMediaBasePath}/creature-display/${encodeURIComponent(creatureDisplayId)}`
23
23
  };
24
24
  }
25
25
  /**
@@ -30,7 +30,7 @@ function creatureDisplayMedia(creatureDisplayId) {
30
30
  function creatureFamily(creatureFamilyId) {
31
31
  return {
32
32
  namespace: "static",
33
- path: `${wowBasePath}/creature-family/${creatureFamilyId}`
33
+ path: `${wowBasePath}/creature-family/${encodeURIComponent(creatureFamilyId)}`
34
34
  };
35
35
  }
36
36
  /**
@@ -51,7 +51,7 @@ function creatureFamilyIndex() {
51
51
  function creatureFamilyMedia(creatureFamilyId) {
52
52
  return {
53
53
  namespace: "static",
54
- path: `${wowMediaBasePath}/creature-family/${creatureFamilyId}`
54
+ path: `${wowMediaBasePath}/creature-family/${encodeURIComponent(creatureFamilyId)}`
55
55
  };
56
56
  }
57
57
  /**
@@ -78,7 +78,7 @@ function creatureSearch(options) {
78
78
  function creatureType(creatureTypeId) {
79
79
  return {
80
80
  namespace: "static",
81
- path: `${wowBasePath}/creature-type/${creatureTypeId}`
81
+ path: `${wowBasePath}/creature-type/${encodeURIComponent(creatureTypeId)}`
82
82
  };
83
83
  }
84
84
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/creature/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type {\n CreatureDisplayMediaResponse,\n CreatureFamilyIndexResponse,\n CreatureFamilyMediaResponse,\n CreatureFamilyResponse,\n CreatureResponse,\n CreatureSearchParameters,\n CreatureSearchResponse,\n CreatureTypeIndexResponse,\n CreatureTypeResponse,\n} from './types';\n\n/**\n * Get a creature by ID.\n * @param creatureId The creature ID.\n * @returns The creature. See {@link CreatureResponse}.\n */\nexport function creature(creatureId: number): Resource<CreatureResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature/${creatureId}`,\n };\n}\n/**\n * Get creature display media by ID.\n * @param creatureDisplayId The creature display ID.\n * @returns The creature display media. See {@link CreatureDisplayMediaResponse}.\n */\nexport function creatureDisplayMedia(creatureDisplayId: number): Resource<CreatureDisplayMediaResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/creature-display/${creatureDisplayId}`,\n };\n}\n/**\n * Get a creature family by ID.\n * @param creatureFamilyId The creature family ID.\n * @returns The creature family. See {@link CreatureFamilyResponse}.\n */\nexport function creatureFamily(creatureFamilyId: number): Resource<CreatureFamilyResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature-family/${creatureFamilyId}`,\n };\n}\n/**\n * Get a creature family index.\n * @returns The creature family index. See {@link CreatureFamilyIndexResponse}.\n */\nexport function creatureFamilyIndex(): Resource<CreatureFamilyIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature-family/index`,\n };\n}\n/**\n * Get creature family media by ID.\n * @param creatureFamilyId The creature family ID.\n * @returns The creature family media. See {@link CreatureFamilyMediaResponse}.\n */\nexport function creatureFamilyMedia(creatureFamilyId: number): Resource<CreatureFamilyMediaResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/creature-family/${creatureFamilyId}`,\n };\n}\n/**\n * Search for creatures.\n * @param options The creature search parameters. See {@link CreatureSearchParameters}.\n * @returns The creature search results. See {@link CreatureSearchResponse}.\n */\nexport function creatureSearch(\n options: CreatureSearchParameters,\n): Resource<CreatureSearchResponse, Omit<CreatureSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/creature`,\n };\n}\n/**\n * Get a creature type by ID.\n * @param creatureTypeId The creature type ID.\n * @returns The creature type. See {@link CreatureTypeResponse}.\n */\nexport function creatureType(creatureTypeId: number): Resource<CreatureTypeResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature-type/${creatureTypeId}`,\n };\n}\n/**\n * Get a creature type index.\n * @returns The creature type index. See {@link CreatureTypeIndexResponse}.\n */\nexport function creatureTypeIndex(): Resource<CreatureTypeIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature-type/index`,\n };\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,SAAS,YAAgD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,YAAY;CACnC;AACF;;;;;;AAMA,SAAgB,qBAAqB,mBAAmE;CACtG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,oBAAoB;CAChD;AACF;;;;;;AAMA,SAAgB,eAAe,kBAA4D;CACzF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,mBAAmB;CAC1C;AACF;;;;;AAKA,SAAgB,sBAA6D;CAC3E,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,oBAAoB,kBAAiE;CACnG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,mBAAmB;CAC/C;AACF;;;;;;AAMA,SAAgB,eACd,SACqF;CACrF,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;;AAMA,SAAgB,aAAa,gBAAwD;CACnF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,iBAAiB;CACxC;AACF;;;;;AAKA,SAAgB,oBAAyD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/creature/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type {\n CreatureDisplayMediaResponse,\n CreatureFamilyIndexResponse,\n CreatureFamilyMediaResponse,\n CreatureFamilyResponse,\n CreatureResponse,\n CreatureSearchParameters,\n CreatureSearchResponse,\n CreatureTypeIndexResponse,\n CreatureTypeResponse,\n} from './types';\n\n/**\n * Get a creature by ID.\n * @param creatureId The creature ID.\n * @returns The creature. See {@link CreatureResponse}.\n */\nexport function creature(creatureId: number): Resource<CreatureResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature/${encodeURIComponent(creatureId)}`,\n };\n}\n/**\n * Get creature display media by ID.\n * @param creatureDisplayId The creature display ID.\n * @returns The creature display media. See {@link CreatureDisplayMediaResponse}.\n */\nexport function creatureDisplayMedia(creatureDisplayId: number): Resource<CreatureDisplayMediaResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/creature-display/${encodeURIComponent(creatureDisplayId)}`,\n };\n}\n/**\n * Get a creature family by ID.\n * @param creatureFamilyId The creature family ID.\n * @returns The creature family. See {@link CreatureFamilyResponse}.\n */\nexport function creatureFamily(creatureFamilyId: number): Resource<CreatureFamilyResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature-family/${encodeURIComponent(creatureFamilyId)}`,\n };\n}\n/**\n * Get a creature family index.\n * @returns The creature family index. See {@link CreatureFamilyIndexResponse}.\n */\nexport function creatureFamilyIndex(): Resource<CreatureFamilyIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature-family/index`,\n };\n}\n/**\n * Get creature family media by ID.\n * @param creatureFamilyId The creature family ID.\n * @returns The creature family media. See {@link CreatureFamilyMediaResponse}.\n */\nexport function creatureFamilyMedia(creatureFamilyId: number): Resource<CreatureFamilyMediaResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/creature-family/${encodeURIComponent(creatureFamilyId)}`,\n };\n}\n/**\n * Search for creatures.\n * @param options The creature search parameters. See {@link CreatureSearchParameters}.\n * @returns The creature search results. See {@link CreatureSearchResponse}.\n */\nexport function creatureSearch(\n options: CreatureSearchParameters,\n): Resource<CreatureSearchResponse, Omit<CreatureSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/creature`,\n };\n}\n/**\n * Get a creature type by ID.\n * @param creatureTypeId The creature type ID.\n * @returns The creature type. See {@link CreatureTypeResponse}.\n */\nexport function creatureType(creatureTypeId: number): Resource<CreatureTypeResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature-type/${encodeURIComponent(creatureTypeId)}`,\n };\n}\n/**\n * Get a creature type index.\n * @returns The creature type index. See {@link CreatureTypeIndexResponse}.\n */\nexport function creatureTypeIndex(): Resource<CreatureTypeIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/creature-type/index`,\n };\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,SAAS,YAAgD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,YAAY,mBAAmB,UAAU;CAChE;AACF;;;;;;AAMA,SAAgB,qBAAqB,mBAAmE;CACtG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,oBAAoB,mBAAmB,iBAAiB;CACpF;AACF;;;;;;AAMA,SAAgB,eAAe,kBAA4D;CACzF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,mBAAmB,mBAAmB,gBAAgB;CAC7E;AACF;;;;;AAKA,SAAgB,sBAA6D;CAC3E,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,oBAAoB,kBAAiE;CACnG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,mBAAmB,mBAAmB,gBAAgB;CAClF;AACF;;;;;;AAMA,SAAgB,eACd,SACqF;CACrF,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;;AAMA,SAAgB,aAAa,gBAAwD;CACnF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,iBAAiB,mBAAmB,cAAc;CACzE;AACF;;;;;AAKA,SAAgB,oBAAyD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF"}
@@ -8,7 +8,7 @@ import { wowGuildBasePath } from "@blizzard-api/core";
8
8
  function guild(realmSlug, nameSlug) {
9
9
  return {
10
10
  namespace: "profile",
11
- path: `${wowGuildBasePath}/${realmSlug}/${nameSlug}`
11
+ path: `${wowGuildBasePath}/${encodeURIComponent(realmSlug)}/${encodeURIComponent(nameSlug)}`
12
12
  };
13
13
  }
14
14
  /**
@@ -19,7 +19,7 @@ function guild(realmSlug, nameSlug) {
19
19
  function guildAchievements(realmSlug, nameSlug) {
20
20
  return {
21
21
  namespace: "profile",
22
- path: `${wowGuildBasePath}/${realmSlug}/${nameSlug}/achievements`
22
+ path: `${wowGuildBasePath}/${encodeURIComponent(realmSlug)}/${encodeURIComponent(nameSlug)}/achievements`
23
23
  };
24
24
  }
25
25
  /**
@@ -30,7 +30,7 @@ function guildAchievements(realmSlug, nameSlug) {
30
30
  function guildActivity(realmSlug, nameSlug) {
31
31
  return {
32
32
  namespace: "profile",
33
- path: `${wowGuildBasePath}/${realmSlug}/${nameSlug}/activity`
33
+ path: `${wowGuildBasePath}/${encodeURIComponent(realmSlug)}/${encodeURIComponent(nameSlug)}/activity`
34
34
  };
35
35
  }
36
36
  /**
@@ -41,7 +41,7 @@ function guildActivity(realmSlug, nameSlug) {
41
41
  function guildRoster(realmSlug, nameSlug) {
42
42
  return {
43
43
  namespace: "profile",
44
- path: `${wowGuildBasePath}/${realmSlug}/${nameSlug}/roster`
44
+ path: `${wowGuildBasePath}/${encodeURIComponent(realmSlug)}/${encodeURIComponent(nameSlug)}/roster`
45
45
  };
46
46
  }
47
47
  export { guild, guildAchievements, guildActivity, guildRoster };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/guild/index.ts"],"sourcesContent":["import { wowGuildBasePath } from '@blizzard-api/core';\nimport type { Resource } from '@blizzard-api/core';\nimport type { GuildAchievementsResponse, GuildActivityResponse, GuildResponse, GuildRosterResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param nameSlug The lowercase name of the guild.\n * @returns a single guild by its name and realm.\n */\nexport function guild(realmSlug: string, nameSlug: string): Resource<GuildResponse> {\n return {\n namespace: 'profile',\n path: `${wowGuildBasePath}/${realmSlug}/${nameSlug}`,\n };\n}\n\n/**\n * @param realmSlug The slug of the realm.\n * @param nameSlug The lowercase name of the guild.\n * @returns a single guild's achievements by name and realm.\n */\nexport function guildAchievements(realmSlug: string, nameSlug: string): Resource<GuildAchievementsResponse> {\n return {\n namespace: 'profile',\n path: `${wowGuildBasePath}/${realmSlug}/${nameSlug}/achievements`,\n };\n}\n\n/**\n * @param realmSlug The slug of the realm.\n * @param nameSlug The lowercase name of the guild.\n * @returns a single guild's activity by name and realm.\n */\nexport function guildActivity(realmSlug: string, nameSlug: string): Resource<GuildActivityResponse> {\n return {\n namespace: 'profile',\n path: `${wowGuildBasePath}/${realmSlug}/${nameSlug}/activity`,\n };\n}\n\n/**\n * @param realmSlug The slug of the realm.\n * @param nameSlug The lowercase name of the guild.\n * @returns a single guild's roster by its name and realm.\n */\nexport function guildRoster(realmSlug: string, nameSlug: string): Resource<GuildRosterResponse> {\n return {\n namespace: 'profile',\n path: `${wowGuildBasePath}/${realmSlug}/${nameSlug}/roster`,\n };\n}\n"],"mappings":";;;;;;;AASA,SAAgB,MAAM,WAAmB,UAA2C;CAClF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,GAAG,UAAU,GAAG;CAC5C;AACF;;;;;;AAOA,SAAgB,kBAAkB,WAAmB,UAAuD;CAC1G,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,GAAG,UAAU,GAAG,SAAS;CACrD;AACF;;;;;;AAOA,SAAgB,cAAc,WAAmB,UAAmD;CAClG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,GAAG,UAAU,GAAG,SAAS;CACrD;AACF;;;;;;AAOA,SAAgB,YAAY,WAAmB,UAAiD;CAC9F,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,GAAG,UAAU,GAAG,SAAS;CACrD;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/guild/index.ts"],"sourcesContent":["import { wowGuildBasePath } from '@blizzard-api/core';\nimport type { Resource } from '@blizzard-api/core';\nimport type { GuildAchievementsResponse, GuildActivityResponse, GuildResponse, GuildRosterResponse } from './types';\n\n/**\n * @param realmSlug The slug of the realm.\n * @param nameSlug The lowercase name of the guild.\n * @returns a single guild by its name and realm.\n */\nexport function guild(realmSlug: string, nameSlug: string): Resource<GuildResponse> {\n return {\n namespace: 'profile',\n path: `${wowGuildBasePath}/${encodeURIComponent(realmSlug)}/${encodeURIComponent(nameSlug)}`,\n };\n}\n\n/**\n * @param realmSlug The slug of the realm.\n * @param nameSlug The lowercase name of the guild.\n * @returns a single guild's achievements by name and realm.\n */\nexport function guildAchievements(realmSlug: string, nameSlug: string): Resource<GuildAchievementsResponse> {\n return {\n namespace: 'profile',\n path: `${wowGuildBasePath}/${encodeURIComponent(realmSlug)}/${encodeURIComponent(nameSlug)}/achievements`,\n };\n}\n\n/**\n * @param realmSlug The slug of the realm.\n * @param nameSlug The lowercase name of the guild.\n * @returns a single guild's activity by name and realm.\n */\nexport function guildActivity(realmSlug: string, nameSlug: string): Resource<GuildActivityResponse> {\n return {\n namespace: 'profile',\n path: `${wowGuildBasePath}/${encodeURIComponent(realmSlug)}/${encodeURIComponent(nameSlug)}/activity`,\n };\n}\n\n/**\n * @param realmSlug The slug of the realm.\n * @param nameSlug The lowercase name of the guild.\n * @returns a single guild's roster by its name and realm.\n */\nexport function guildRoster(realmSlug: string, nameSlug: string): Resource<GuildRosterResponse> {\n return {\n namespace: 'profile',\n path: `${wowGuildBasePath}/${encodeURIComponent(realmSlug)}/${encodeURIComponent(nameSlug)}/roster`,\n };\n}\n"],"mappings":";;;;;;;AASA,SAAgB,MAAM,WAAmB,UAA2C;CAClF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,GAAG,mBAAmB,SAAS,EAAE,GAAG,mBAAmB,QAAQ;CAC3F;AACF;;;;;;AAOA,SAAgB,kBAAkB,WAAmB,UAAuD;CAC1G,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,GAAG,mBAAmB,SAAS,EAAE,GAAG,mBAAmB,QAAQ,EAAE;CAC7F;AACF;;;;;;AAOA,SAAgB,cAAc,WAAmB,UAAmD;CAClG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,GAAG,mBAAmB,SAAS,EAAE,GAAG,mBAAmB,QAAQ,EAAE;CAC7F;AACF;;;;;;AAOA,SAAgB,YAAY,WAAmB,UAAiD;CAC9F,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,GAAG,mBAAmB,SAAS,EAAE,GAAG,mBAAmB,QAAQ,EAAE;CAC7F;AACF"}
@@ -8,7 +8,7 @@ import { wowBasePath, wowMediaBasePath } from "@blizzard-api/core";
8
8
  function guildCrestBorder(borderId) {
9
9
  return {
10
10
  namespace: "static",
11
- path: `${wowMediaBasePath}/guild-crest/border/${borderId}`
11
+ path: `${wowMediaBasePath}/guild-crest/border/${encodeURIComponent(borderId)}`
12
12
  };
13
13
  }
14
14
  /**
@@ -29,7 +29,7 @@ function guildCrestComponentsIndex() {
29
29
  function guildCrestEmblem(emblemId) {
30
30
  return {
31
31
  namespace: "static",
32
- path: `${wowMediaBasePath}/guild-crest/emblem/${emblemId}`
32
+ path: `${wowMediaBasePath}/guild-crest/emblem/${encodeURIComponent(emblemId)}`
33
33
  };
34
34
  }
35
35
  export { guildCrestBorder, guildCrestComponentsIndex, guildCrestEmblem };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/guild-crest/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowMediaBasePath } from '@blizzard-api/core';\nimport type { GuildCrestBorderEmblemResponse, GuildCrestComponentsIndexResponse } from './types';\n\n/**\n * Get a guild crest border by ID.\n * @param borderId The guild crest border ID.\n * @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}.\n */\nexport function guildCrestBorder(borderId: number): Resource<GuildCrestBorderEmblemResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/guild-crest/border/${borderId}`,\n };\n}\n/**\n * Get the guild crest components index.\n * @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}.\n */\nexport function guildCrestComponentsIndex(): Resource<GuildCrestComponentsIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/guild-crest/index`,\n };\n}\n/**\n * Get a guild crest emblem by ID.\n * @param emblemId The guild crest emblem ID.\n * @returns The guild crest emblem. See {@link GuildCrestBorderEmblemResponse}.\n */\nexport function guildCrestEmblem(emblemId: number): Resource<GuildCrestBorderEmblemResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/guild-crest/emblem/${emblemId}`,\n };\n}\n"],"mappings":";;;;;;;AASA,SAAgB,iBAAiB,UAA4D;CAC3F,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,sBAAsB;CAClD;AACF;;;;;AAKA,SAAgB,4BAAyE;CACvF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,iBAAiB,UAA4D;CAC3F,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,sBAAsB;CAClD;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/guild-crest/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowMediaBasePath } from '@blizzard-api/core';\nimport type { GuildCrestBorderEmblemResponse, GuildCrestComponentsIndexResponse } from './types';\n\n/**\n * Get a guild crest border by ID.\n * @param borderId The guild crest border ID.\n * @returns The guild crest border. See {@link GuildCrestBorderEmblemResponse}.\n */\nexport function guildCrestBorder(borderId: number): Resource<GuildCrestBorderEmblemResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/guild-crest/border/${encodeURIComponent(borderId)}`,\n };\n}\n/**\n * Get the guild crest components index.\n * @returns The guild crest components index. See {@link GuildCrestComponentsIndexResponse}.\n */\nexport function guildCrestComponentsIndex(): Resource<GuildCrestComponentsIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/guild-crest/index`,\n };\n}\n/**\n * Get a guild crest emblem by ID.\n * @param emblemId The guild crest emblem ID.\n * @returns The guild crest emblem. See {@link GuildCrestBorderEmblemResponse}.\n */\nexport function guildCrestEmblem(emblemId: number): Resource<GuildCrestBorderEmblemResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/guild-crest/emblem/${encodeURIComponent(emblemId)}`,\n };\n}\n"],"mappings":";;;;;;;AASA,SAAgB,iBAAiB,UAA4D;CAC3F,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,sBAAsB,mBAAmB,QAAQ;CAC7E;AACF;;;;;AAKA,SAAgB,4BAAyE;CACvF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,iBAAiB,UAA4D;CAC3F,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,sBAAsB,mBAAmB,QAAQ;CAC7E;AACF"}
@@ -8,7 +8,7 @@ import { wowBasePath } from "@blizzard-api/core";
8
8
  function heirloom(heirloomId) {
9
9
  return {
10
10
  namespace: "static",
11
- path: `${wowBasePath}/heirloom/${heirloomId}`
11
+ path: `${wowBasePath}/heirloom/${encodeURIComponent(heirloomId)}`
12
12
  };
13
13
  }
14
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/heirloom/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath } from '@blizzard-api/core';\nimport type { HeirloomIndexResponse, HeirloomResponse } from './types';\n\n/**\n * Get a heirloom by ID.\n * @param heirloomId The heirloom ID.\n * @returns The heirloom. See {@link HeirloomResponse}.\n */\nexport function heirloom(heirloomId: number): Resource<HeirloomResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/heirloom/${heirloomId}`,\n };\n}\n/**\n * Get the heirloom index.\n * @returns The heirloom index. See {@link HeirloomIndexResponse}.\n */\nexport function heirloomIndex(): Resource<HeirloomIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/heirloom/index`,\n };\n}\n"],"mappings":";;;;;;;AASA,SAAgB,SAAS,YAAgD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,YAAY;CACnC;AACF;;;;;AAKA,SAAgB,gBAAiD;CAC/D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/heirloom/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath } from '@blizzard-api/core';\nimport type { HeirloomIndexResponse, HeirloomResponse } from './types';\n\n/**\n * Get a heirloom by ID.\n * @param heirloomId The heirloom ID.\n * @returns The heirloom. See {@link HeirloomResponse}.\n */\nexport function heirloom(heirloomId: number): Resource<HeirloomResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/heirloom/${encodeURIComponent(heirloomId)}`,\n };\n}\n/**\n * Get the heirloom index.\n * @returns The heirloom index. See {@link HeirloomIndexResponse}.\n */\nexport function heirloomIndex(): Resource<HeirloomIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/heirloom/index`,\n };\n}\n"],"mappings":";;;;;;;AASA,SAAgB,SAAS,YAAgD;CACvE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,YAAY,mBAAmB,UAAU;CAChE;AACF;;;;;AAKA,SAAgB,gBAAiD;CAC/D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF"}
@@ -19,7 +19,7 @@ function decorIndex() {
19
19
  function decor(decorId) {
20
20
  return {
21
21
  namespace: "static",
22
- path: `${wowBasePath}/decor/${decorId}`
22
+ path: `${wowBasePath}/decor/${encodeURIComponent(decorId)}`
23
23
  };
24
24
  }
25
25
  /**
@@ -56,7 +56,7 @@ function fixtureIndex() {
56
56
  function fixture(fixtureId) {
57
57
  return {
58
58
  namespace: "static",
59
- path: `${wowBasePath}/fixture/${fixtureId}`
59
+ path: `${wowBasePath}/fixture/${encodeURIComponent(fixtureId)}`
60
60
  };
61
61
  }
62
62
  /**
@@ -93,7 +93,7 @@ function fixtureHookIndex() {
93
93
  function fixtureHook(fixtureHookId) {
94
94
  return {
95
95
  namespace: "static",
96
- path: `${wowBasePath}/fixture-hook/${fixtureHookId}`
96
+ path: `${wowBasePath}/fixture-hook/${encodeURIComponent(fixtureHookId)}`
97
97
  };
98
98
  }
99
99
  /**
@@ -130,7 +130,7 @@ function roomIndex() {
130
130
  function room(roomId) {
131
131
  return {
132
132
  namespace: "static",
133
- path: `${wowBasePath}/room/${roomId}`
133
+ path: `${wowBasePath}/room/${encodeURIComponent(roomId)}`
134
134
  };
135
135
  }
136
136
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/housing-decor/index.ts"],"sourcesContent":["import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type { Resource } from '@blizzard-api/core';\nimport type {\n DecorIndexResponse,\n DecorResponse,\n DecorSearchResponse,\n FixtureHookIndexResponse,\n FixtureHookResponse,\n FixtureHookSearchResponse,\n FixtureIndexResponse,\n FixtureResponse,\n FixtureSearchResponse,\n GenericDecorSearchParameters,\n RoomIndexReponse,\n RoomResponse,\n RoomSearchResponse,\n} from './types';\n\n/**\n *\n * Returns an index of decor.\n * @returns An index of decor. See {@link DecorIndexResponse}.\n */\nexport function decorIndex(): Resource<DecorIndexResponse> {\n return {\n namespace: 'static',\n path: '/data/wow/decor/index',\n };\n}\n\n/**\n * Returns a decor by ID.\n * @param decorId The decor ID.\n * @returns A decor. See {@link DecorResponse}.\n */\nexport function decor(decorId: number): Resource<DecorResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/decor/${decorId}`,\n };\n}\n\n/**\n * Searches for decor.\n * @param options The search parameters. See {@link GenericDecorSearchParameters}.\n * @returns A decor. See {@link DecorSearchResponse}.\n */\nexport function decorSearch(\n options: GenericDecorSearchParameters,\n): Resource<DecorSearchResponse, Omit<GenericDecorSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/decor`,\n };\n}\n\n/**\n * Returns an index of fixtures.\n * @returns An index of fixtures. See {@link FixtureIndexResponse}.\n */\nexport function fixtureIndex(): Resource<FixtureIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/fixture/index`,\n };\n}\n\n/**\n * Returns a fixture by ID.\n * @param fixtureId The fixture ID.\n * @returns A fixture. See {@link FixtureResponse}.\n */\nexport function fixture(fixtureId: number): Resource<FixtureResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/fixture/${fixtureId}`,\n };\n}\n\n/**\n * Searches for fixtures.\n * @param options The search parameters. See {@link GenericDecorSearchParameters}.\n * @returns A fixture. See {@link FixtureSearchResponse}.\n */\nexport function fixtureSearch(\n options: GenericDecorSearchParameters,\n): Resource<FixtureSearchResponse, Omit<GenericDecorSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/fixture`,\n };\n}\n\n/**\n * Returns an index of fixture hooks.\n * @returns An index of fixture hooks. See {@link FixtureHookIndexResponse}.\n */\nexport function fixtureHookIndex(): Resource<FixtureHookIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/fixture-hook/index`,\n };\n}\n\n/**\n * Returns a fixture hook by ID.\n * @param fixtureHookId The fixture hook ID.\n * @returns A fixture hook. See {@link FixtureHookResponse}.\n */\nexport function fixtureHook(fixtureHookId: number): Resource<FixtureHookResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/fixture-hook/${fixtureHookId}`,\n };\n}\n\n/**\n * Searches for fixture hooks.\n * @param options The search parameters. See {@link GenericDecorSearchParameters}.\n * @returns A fixture hook. See {@link FixtureSearchResponse}.\n */\nexport function fixtureHookSearch(\n options: GenericDecorSearchParameters,\n): Resource<FixtureHookSearchResponse, Omit<GenericDecorSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/fixture-hook`,\n };\n}\n\n/**\n * Returns an index of rooms.\n * @returns An index of rooms. See {@link RoomIndexReponse}.\n */\nexport function roomIndex(): Resource<RoomIndexReponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/room/index`,\n };\n}\n\n/**\n * Returns a room by ID.\n * @param roomId The room ID.\n * @returns A room. See {@link RoomResponse}.\n */\nexport function room(roomId: number): Resource<RoomResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/room/${roomId}`,\n };\n}\n\n/**\n * Searches for rooms.\n * @param options The search parameters. See {@link GenericDecorSearchParameters}.\n * @returns A room. See {@link RoomSearchResponse}.\n */\nexport function roomSearch(\n options: GenericDecorSearchParameters,\n): Resource<RoomSearchResponse, Omit<GenericDecorSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/room`,\n };\n}\n"],"mappings":";;;;;;;AAuBA,SAAgB,aAA2C;CACzD,OAAO;EACL,WAAW;EACX,MAAM;CACR;AACF;;;;;;AAOA,SAAgB,MAAM,SAA0C;CAC9D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,SAAS;CAChC;AACF;;;;;;AAOA,SAAgB,YACd,SACsF;CACtF,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;AAMA,SAAgB,eAA+C;CAC7D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAOA,SAAgB,QAAQ,WAA8C;CACpE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,WAAW;CAClC;AACF;;;;;;AAOA,SAAgB,cACd,SACwF;CACxF,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;AAMA,SAAgB,mBAAuD;CACrE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAOA,SAAgB,YAAY,eAAsD;CAChF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,gBAAgB;CACvC;AACF;;;;;;AAOA,SAAgB,kBACd,SAC4F;CAC5F,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;AAMA,SAAgB,YAAwC;CACtD,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAOA,SAAgB,KAAK,QAAwC;CAC3D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,QAAQ;CAC/B;AACF;;;;;;AAOA,SAAgB,WACd,SACqF;CACrF,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/housing-decor/index.ts"],"sourcesContent":["import { wowBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type { Resource } from '@blizzard-api/core';\nimport type {\n DecorIndexResponse,\n DecorResponse,\n DecorSearchResponse,\n FixtureHookIndexResponse,\n FixtureHookResponse,\n FixtureHookSearchResponse,\n FixtureIndexResponse,\n FixtureResponse,\n FixtureSearchResponse,\n GenericDecorSearchParameters,\n RoomIndexReponse,\n RoomResponse,\n RoomSearchResponse,\n} from './types';\n\n/**\n *\n * Returns an index of decor.\n * @returns An index of decor. See {@link DecorIndexResponse}.\n */\nexport function decorIndex(): Resource<DecorIndexResponse> {\n return {\n namespace: 'static',\n path: '/data/wow/decor/index',\n };\n}\n\n/**\n * Returns a decor by ID.\n * @param decorId The decor ID.\n * @returns A decor. See {@link DecorResponse}.\n */\nexport function decor(decorId: number): Resource<DecorResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/decor/${encodeURIComponent(decorId)}`,\n };\n}\n\n/**\n * Searches for decor.\n * @param options The search parameters. See {@link GenericDecorSearchParameters}.\n * @returns A decor. See {@link DecorSearchResponse}.\n */\nexport function decorSearch(\n options: GenericDecorSearchParameters,\n): Resource<DecorSearchResponse, Omit<GenericDecorSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/decor`,\n };\n}\n\n/**\n * Returns an index of fixtures.\n * @returns An index of fixtures. See {@link FixtureIndexResponse}.\n */\nexport function fixtureIndex(): Resource<FixtureIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/fixture/index`,\n };\n}\n\n/**\n * Returns a fixture by ID.\n * @param fixtureId The fixture ID.\n * @returns A fixture. See {@link FixtureResponse}.\n */\nexport function fixture(fixtureId: number): Resource<FixtureResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/fixture/${encodeURIComponent(fixtureId)}`,\n };\n}\n\n/**\n * Searches for fixtures.\n * @param options The search parameters. See {@link GenericDecorSearchParameters}.\n * @returns A fixture. See {@link FixtureSearchResponse}.\n */\nexport function fixtureSearch(\n options: GenericDecorSearchParameters,\n): Resource<FixtureSearchResponse, Omit<GenericDecorSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/fixture`,\n };\n}\n\n/**\n * Returns an index of fixture hooks.\n * @returns An index of fixture hooks. See {@link FixtureHookIndexResponse}.\n */\nexport function fixtureHookIndex(): Resource<FixtureHookIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/fixture-hook/index`,\n };\n}\n\n/**\n * Returns a fixture hook by ID.\n * @param fixtureHookId The fixture hook ID.\n * @returns A fixture hook. See {@link FixtureHookResponse}.\n */\nexport function fixtureHook(fixtureHookId: number): Resource<FixtureHookResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/fixture-hook/${encodeURIComponent(fixtureHookId)}`,\n };\n}\n\n/**\n * Searches for fixture hooks.\n * @param options The search parameters. See {@link GenericDecorSearchParameters}.\n * @returns A fixture hook. See {@link FixtureSearchResponse}.\n */\nexport function fixtureHookSearch(\n options: GenericDecorSearchParameters,\n): Resource<FixtureHookSearchResponse, Omit<GenericDecorSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/fixture-hook`,\n };\n}\n\n/**\n * Returns an index of rooms.\n * @returns An index of rooms. See {@link RoomIndexReponse}.\n */\nexport function roomIndex(): Resource<RoomIndexReponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/room/index`,\n };\n}\n\n/**\n * Returns a room by ID.\n * @param roomId The room ID.\n * @returns A room. See {@link RoomResponse}.\n */\nexport function room(roomId: number): Resource<RoomResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/room/${encodeURIComponent(roomId)}`,\n };\n}\n\n/**\n * Searches for rooms.\n * @param options The search parameters. See {@link GenericDecorSearchParameters}.\n * @returns A room. See {@link RoomSearchResponse}.\n */\nexport function roomSearch(\n options: GenericDecorSearchParameters,\n): Resource<RoomSearchResponse, Omit<GenericDecorSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/room`,\n };\n}\n"],"mappings":";;;;;;;AAuBA,SAAgB,aAA2C;CACzD,OAAO;EACL,WAAW;EACX,MAAM;CACR;AACF;;;;;;AAOA,SAAgB,MAAM,SAA0C;CAC9D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,SAAS,mBAAmB,OAAO;CAC1D;AACF;;;;;;AAOA,SAAgB,YACd,SACsF;CACtF,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;AAMA,SAAgB,eAA+C;CAC7D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAOA,SAAgB,QAAQ,WAA8C;CACpE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,WAAW,mBAAmB,SAAS;CAC9D;AACF;;;;;;AAOA,SAAgB,cACd,SACwF;CACxF,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;AAMA,SAAgB,mBAAuD;CACrE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAOA,SAAgB,YAAY,eAAsD;CAChF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,gBAAgB,mBAAmB,aAAa;CACvE;AACF;;;;;;AAOA,SAAgB,kBACd,SAC4F;CAC5F,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;AAMA,SAAgB,YAAwC;CACtD,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAOA,SAAgB,KAAK,QAAwC;CAC3D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,QAAQ,mBAAmB,MAAM;CACxD;AACF;;;;;;AAOA,SAAgB,WACd,SACqF;CACrF,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF"}
@@ -43,7 +43,7 @@ interface PetMediaResponse extends ResponseBase {
43
43
  * The response for a pet.
44
44
  * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
45
45
  */
46
- interface PetResponse extends NameId, ResponseBase {
46
+ interface PetResponse extends NullishNameId, ResponseBase {
47
47
  abilities?: Array<Ability>;
48
48
  battle_pet_type: BattlePetType;
49
49
  creature: NameIdKey;
@@ -100,4 +100,4 @@ declare function petIndex(): Resource<PetIndexResponse>;
100
100
  */
101
101
  declare function petMedia(petId: number): Resource<PetMediaResponse>;
102
102
  export { petIndex as a, PetAbilityMediaResponse as c, PetMediaResponse as d, PetResponse as f, petAbilityMedia as i, PetAbilityResponse as l, petAbility as n, petMedia as o, petAbilityIndex as r, PetAbilityIndexResponse as s, pet as t, PetIndexResponse as u };
103
- //# sourceMappingURL=index-DVacJ9ne.d.ts.map
103
+ //# sourceMappingURL=index-Cg4CfIKc.d.ts.map
@@ -39,7 +39,7 @@ interface TalentResponse extends ResponseBase {
39
39
  };
40
40
  playable_specialization?: NameIdKey;
41
41
  rank_descriptions?: Array<RankDescription>;
42
- spell?: NameIdKey;
42
+ spell?: NullishNameIdKey;
43
43
  }
44
44
  /**
45
45
  * The response for a talent tree index.
@@ -223,4 +223,4 @@ declare function talentTreeIndex(): Resource<TalentTreeIndexResponse>;
223
223
  */
224
224
  declare function talentTreeNodes(talentTreeId: number): Resource<TalentTreeNodesResponse>;
225
225
  export { talentTree as a, PvpTalentIndexResponse as c, TalentResponse as d, TalentTreeIndexResponse as f, talentIndex as i, PvpTalentResponse as l, TalentTreeResponse as m, pvpTalentIndex as n, talentTreeIndex as o, TalentTreeNodesResponse as p, talent as r, talentTreeNodes as s, pvpTalent as t, TalentIndexResponse as u };
226
- //# sourceMappingURL=index-DRLsvfW5.d.ts.map
226
+ //# sourceMappingURL=index-CisPLiDB.d.ts.map
@@ -11,7 +11,7 @@ interface QuestAreaIndexResponse extends ResponseBase {
11
11
  * @see {@link https://develop.battle.net/documentation/world-of-warcraft/game-data-apis}
12
12
  */
13
13
  interface QuestAreaResponse extends ResponseBase {
14
- area: string;
14
+ area: null | string;
15
15
  id: number;
16
16
  quests: Array<NullishNameIdKey>;
17
17
  }
@@ -142,4 +142,4 @@ declare function questType(questTypeId: number): Resource<QuestTypeResponse>;
142
142
  */
143
143
  declare function questTypeIndex(): Resource<QuestTypeIndexResponse>;
144
144
  export { questCategoryIndex as a, questTypeIndex as c, QuestCategoryIndexResponse as d, QuestCategoryResponse as f, QuestTypeResponse as g, QuestTypeIndexResponse as h, questCategory as i, QuestAreaIndexResponse as l, QuestResponse as m, questArea as n, questIndex as o, QuestIndexResponse as p, questAreaIndex as r, questType as s, quest as t, QuestAreaResponse as u };
145
- //# sourceMappingURL=index-BaL7P-bA.d.ts.map
145
+ //# sourceMappingURL=index-Cqlff6vd.d.ts.map
package/dist/index.d.ts CHANGED
@@ -38,7 +38,7 @@ import { a as mythicKeystonePeriodIndex, c as MythicKeystoneDungeonIndexResponse
38
38
  import { i as MythicKeystoneLeaderboardResponse, n as mythicKeystoneLeaderboardIndex, r as MythicKeystoneLeaderboardIndexResponse, t as mythicKeystoneLeaderboard } from "./index-DkkhK4mL.js";
39
39
  import { n as KnownRaidSlugs, r as MythicRaidLeaderboardResponse, t as mythicRaidLeaderboard } from "./index-BA-S_4s8.js";
40
40
  import { a as NeighborhoodMapResponse, i as NeighborhoodMapIndexResponse, n as neighborhoodMap, o as NeighborhoodResponse, r as neighborhoodMaps, t as neighborhood } from "./index-DB-CW2qB.js";
41
- import { a as petIndex, c as PetAbilityMediaResponse, d as PetMediaResponse, f as PetResponse, i as petAbilityMedia, l as PetAbilityResponse, n as petAbility, o as petMedia, r as petAbilityIndex, s as PetAbilityIndexResponse, t as pet, u as PetIndexResponse } from "./index-DVacJ9ne.js";
41
+ import { a as petIndex, c as PetAbilityMediaResponse, d as PetMediaResponse, f as PetResponse, i as petAbilityMedia, l as PetAbilityResponse, n as petAbility, o as petMedia, r as petAbilityIndex, s as PetAbilityIndexResponse, t as pet, u as PetIndexResponse } from "./index-Cg4CfIKc.js";
42
42
  import { a as PlayableClassIndexResponse, c as PvpTalentSlotsResponse, i as pvpTalentSlots, n as playableClassIndex, o as PlayableClassMediaResponse, r as playableClassMedia, s as PlayableClassResponse, t as playableClass } from "./index-BHHO7RV3.js";
43
43
  import { i as PlayableRaceResponse, n as playableRaceIndex, r as PlayableRaceIndexResponse, t as playableRace } from "./index-C_OOvzJ3.js";
44
44
  import { a as PlayableSpecializationMediaResponse, i as PlayableSpecializationIndexResponse, n as playableSpecializationIndex, o as PlayableSpecializationResponse, r as playableSpecializationMedia, t as playableSpecialization } from "./index-Cev12iRl.js";
@@ -46,12 +46,12 @@ import { i as PowerTypeResponse, n as powerTypeIndex, r as PowerTypeIndexRespons
46
46
  import { a as recipe, c as ProfessionMediaResponse, d as RecipeMediaResponse, f as RecipeResponse, i as professionSkillTier, l as ProfessionResponse, n as professionIndex, o as recipeMedia, r as professionMedia, s as ProfessionIndexResponse, t as profession, u as ProfessionSkillTierResponse } from "./index-_gTBl2_Y.js";
47
47
  import { a as pvpSeasonIndex, c as PvpRewardsIndexResponse, i as pvpSeason, l as PvpSeasonIndexResponse, n as pvpLeaderboardIndex, o as PvpLeaderboardIndexResponse, r as pvpRewardsIndex, s as PvpLeaderboardResponse, t as pvpLeaderboard, u as PvpSeasonResponse } from "./index-bl4DdMgs.js";
48
48
  import { a as PvpTierMediaResponse, i as PvpTierIndexResponse, n as pvpTierIndex, o as PvpTierResponse, r as pvpTierMedia, t as pvpTier } from "./index-eLWbd2FJ.js";
49
- import { a as questCategoryIndex, c as questTypeIndex, d as QuestCategoryIndexResponse, f as QuestCategoryResponse, g as QuestTypeResponse, h as QuestTypeIndexResponse, i as questCategory, l as QuestAreaIndexResponse, m as QuestResponse, n as questArea, o as questIndex, p as QuestIndexResponse, r as questAreaIndex, s as questType, t as quest, u as QuestAreaResponse } from "./index-BaL7P-bA.js";
49
+ import { a as questCategoryIndex, c as questTypeIndex, d as QuestCategoryIndexResponse, f as QuestCategoryResponse, g as QuestTypeResponse, h as QuestTypeIndexResponse, i as questCategory, l as QuestAreaIndexResponse, m as QuestResponse, n as questArea, o as questIndex, p as QuestIndexResponse, r as questAreaIndex, s as questType, t as quest, u as QuestAreaResponse } from "./index-Cqlff6vd.js";
50
50
  import { realm, realmIndex, realmSearch } from "./realm/index.js";
51
51
  import { i as RegionResponse, n as regionIndex, r as RegionIndexResponse, t as region } from "./index-DeQ5fmQn.js";
52
52
  import { a as ReputationFactionIndexResponse, c as ReputationTiersResponse, i as reputationTiersIndex, n as reputationFactionIndex, o as ReputationFactionResponse, r as reputationTiers, s as ReputationTiersIndexResponse, t as reputationFaction } from "./index-DWXx_hQX.js";
53
53
  import { a as SpellResponse, i as SpellMediaResponse, n as spellMedia, o as SpellSearchParameters, r as spellSearch, s as SpellSearchResponse, t as spell } from "./index-ECczWYo-.js";
54
- import { a as talentTree, c as PvpTalentIndexResponse, d as TalentResponse, f as TalentTreeIndexResponse, i as talentIndex, l as PvpTalentResponse, m as TalentTreeResponse, n as pvpTalentIndex, o as talentTreeIndex, p as TalentTreeNodesResponse, r as talent, s as talentTreeNodes, t as pvpTalent, u as TalentIndexResponse } from "./index-DRLsvfW5.js";
54
+ import { a as talentTree, c as PvpTalentIndexResponse, d as TalentResponse, f as TalentTreeIndexResponse, i as talentIndex, l as PvpTalentResponse, m as TalentTreeResponse, n as pvpTalentIndex, o as talentTreeIndex, p as TalentTreeNodesResponse, r as talent, s as talentTreeNodes, t as pvpTalent, u as TalentIndexResponse } from "./index-CisPLiDB.js";
55
55
  import { a as techTalentTreeIndex, c as TechTalentResponse, i as techTalentTree, l as TechTalentTreeIndexResponse, n as techTalentIndex, o as TechTalentIndexResponse, r as techTalentMedia, s as TechTalentMediaResponse, t as techTalent, u as TechTalentTreeResponse } from "./index-DFlcJK5P.js";
56
56
  import { i as TitleResponse, n as titleIndex, r as TitleIndexResponse, t as title } from "./index-CdpzHZdO.js";
57
57
  import { i as ToyResponse, n as toyIndex, r as ToyIndexResponse, t as toy } from "./index-Ho48pOyM.js";
@@ -8,7 +8,7 @@ import { wowBasePath, wowMediaBasePath, wowSearchBasePath } from "@blizzard-api/
8
8
  function item(itemId) {
9
9
  return {
10
10
  namespace: "static",
11
- path: `${wowBasePath}/item/${itemId}`
11
+ path: `${wowBasePath}/item/${encodeURIComponent(itemId)}`
12
12
  };
13
13
  }
14
14
  /**
@@ -19,7 +19,7 @@ function item(itemId) {
19
19
  function itemClass(itemClassId) {
20
20
  return {
21
21
  namespace: "static",
22
- path: `${wowBasePath}/item-class/${itemClassId}`
22
+ path: `${wowBasePath}/item-class/${encodeURIComponent(itemClassId)}`
23
23
  };
24
24
  }
25
25
  /**
@@ -40,7 +40,7 @@ function itemClassIndex() {
40
40
  function itemMedia(itemId) {
41
41
  return {
42
42
  namespace: "static",
43
- path: `${wowMediaBasePath}/item/${itemId}`
43
+ path: `${wowMediaBasePath}/item/${encodeURIComponent(itemId)}`
44
44
  };
45
45
  }
46
46
  /**
@@ -67,7 +67,7 @@ function itemSearch(options) {
67
67
  function itemSet(itemSetId) {
68
68
  return {
69
69
  namespace: "static",
70
- path: `${wowBasePath}/item-set/${itemSetId}`
70
+ path: `${wowBasePath}/item-set/${encodeURIComponent(itemSetId)}`
71
71
  };
72
72
  }
73
73
  /**
@@ -89,7 +89,7 @@ function itemSetIndex() {
89
89
  function itemSubclass(itemClassId, itemSubclassId) {
90
90
  return {
91
91
  namespace: "static",
92
- path: `${wowBasePath}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`
92
+ path: `${wowBasePath}/item-class/${encodeURIComponent(itemClassId)}/item-subclass/${encodeURIComponent(itemSubclassId)}`
93
93
  };
94
94
  }
95
95
  export { item, itemClass, itemClassIndex, itemMedia, itemSearch, itemSet, itemSetIndex, itemSubclass };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/item/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type {\n ItemClassIndexResponse,\n ItemClassResponse,\n ItemMediaResponse,\n ItemResponse,\n ItemSearchParameters,\n ItemSearchResponse,\n ItemSetIndexResponse,\n ItemSetResponse,\n ItemSubclassResponse,\n} from './types';\n\n/**\n * Get an item by ID.\n * @param itemId The item ID.\n * @returns The item. See {@link ItemResponse}.\n */\nexport function item(itemId: number): Resource<ItemResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item/${itemId}`,\n };\n}\n/**\n * Get an item class by ID.\n * @param itemClassId The item class ID.\n * @returns The item class. See {@link ItemClassResponse}.\n */\nexport function itemClass(itemClassId: number): Resource<ItemClassResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-class/${itemClassId}`,\n };\n}\n/**\n * Get an item class index.\n * @returns The item class index. See {@link ItemClassIndexResponse}.\n */\nexport function itemClassIndex(): Resource<ItemClassIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-class/index`,\n };\n}\n/**\n * Get item media by ID.\n * @param itemId The item ID.\n * @returns The item media. See {@link ItemMediaResponse}.\n */\nexport function itemMedia(itemId: number): Resource<ItemMediaResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/item/${itemId}`,\n };\n}\n/**\n * Search for items.\n * @param options The search parameters. See {@link ItemSearchParameters}.\n * @returns The search results. See {@link ItemSearchResponse}.\n */\nexport function itemSearch(\n options: ItemSearchParameters,\n): Resource<ItemSearchResponse, Omit<ItemSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/item`,\n };\n}\n/**\n * Get an item set by ID.\n * @param itemSetId The item set ID.\n * @returns The item set. See {@link ItemSetResponse}.\n */\nexport function itemSet(itemSetId: number): Resource<ItemSetResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-set/${itemSetId}`,\n };\n}\n/**\n * Get an item set index.\n * @returns The item set index. See {@link ItemSetIndexResponse}.\n */\nexport function itemSetIndex(): Resource<ItemSetIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-set/index`,\n };\n}\n/**\n * Get an item subclass by ID.\n * @param itemClassId The item class ID.\n * @param itemSubclassId The item subclass ID.\n * @returns The item subclass. See {@link ItemSubclassResponse}.\n */\nexport function itemSubclass(itemClassId: number, itemSubclassId: number): Resource<ItemSubclassResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-class/${itemClassId}/item-subclass/${itemSubclassId}`,\n };\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,KAAK,QAAwC;CAC3D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,QAAQ;CAC/B;AACF;;;;;;AAMA,SAAgB,UAAU,aAAkD;CAC1E,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,cAAc;CACrC;AACF;;;;;AAKA,SAAgB,iBAAmD;CACjE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,UAAU,QAA6C;CACrE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,QAAQ;CACpC;AACF;;;;;;AAMA,SAAgB,WACd,SAC6E;CAC7E,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;;AAMA,SAAgB,QAAQ,WAA8C;CACpE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,YAAY;CACnC;AACF;;;;;AAKA,SAAgB,eAA+C;CAC7D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;;AAOA,SAAgB,aAAa,aAAqB,gBAAwD;CACxG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,cAAc,YAAY,iBAAiB;CAClE;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/item/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowMediaBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type {\n ItemClassIndexResponse,\n ItemClassResponse,\n ItemMediaResponse,\n ItemResponse,\n ItemSearchParameters,\n ItemSearchResponse,\n ItemSetIndexResponse,\n ItemSetResponse,\n ItemSubclassResponse,\n} from './types';\n\n/**\n * Get an item by ID.\n * @param itemId The item ID.\n * @returns The item. See {@link ItemResponse}.\n */\nexport function item(itemId: number): Resource<ItemResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item/${encodeURIComponent(itemId)}`,\n };\n}\n/**\n * Get an item class by ID.\n * @param itemClassId The item class ID.\n * @returns The item class. See {@link ItemClassResponse}.\n */\nexport function itemClass(itemClassId: number): Resource<ItemClassResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-class/${encodeURIComponent(itemClassId)}`,\n };\n}\n/**\n * Get an item class index.\n * @returns The item class index. See {@link ItemClassIndexResponse}.\n */\nexport function itemClassIndex(): Resource<ItemClassIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-class/index`,\n };\n}\n/**\n * Get item media by ID.\n * @param itemId The item ID.\n * @returns The item media. See {@link ItemMediaResponse}.\n */\nexport function itemMedia(itemId: number): Resource<ItemMediaResponse> {\n return {\n namespace: 'static',\n path: `${wowMediaBasePath}/item/${encodeURIComponent(itemId)}`,\n };\n}\n/**\n * Search for items.\n * @param options The search parameters. See {@link ItemSearchParameters}.\n * @returns The search results. See {@link ItemSearchResponse}.\n */\nexport function itemSearch(\n options: ItemSearchParameters,\n): Resource<ItemSearchResponse, Omit<ItemSearchParameters, 'locale' | 'name'>> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n [`name.${options.locale}`]: options.name,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/item`,\n };\n}\n/**\n * Get an item set by ID.\n * @param itemSetId The item set ID.\n * @returns The item set. See {@link ItemSetResponse}.\n */\nexport function itemSet(itemSetId: number): Resource<ItemSetResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-set/${encodeURIComponent(itemSetId)}`,\n };\n}\n/**\n * Get an item set index.\n * @returns The item set index. See {@link ItemSetIndexResponse}.\n */\nexport function itemSetIndex(): Resource<ItemSetIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-set/index`,\n };\n}\n/**\n * Get an item subclass by ID.\n * @param itemClassId The item class ID.\n * @param itemSubclassId The item subclass ID.\n * @returns The item subclass. See {@link ItemSubclassResponse}.\n */\nexport function itemSubclass(itemClassId: number, itemSubclassId: number): Resource<ItemSubclassResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-class/${encodeURIComponent(itemClassId)}/item-subclass/${encodeURIComponent(itemSubclassId)}`,\n };\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,KAAK,QAAwC;CAC3D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,QAAQ,mBAAmB,MAAM;CACxD;AACF;;;;;;AAMA,SAAgB,UAAU,aAAkD;CAC1E,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,cAAc,mBAAmB,WAAW;CACnE;AACF;;;;;AAKA,SAAgB,iBAAmD;CACjE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,UAAU,QAA6C;CACrE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,iBAAiB,QAAQ,mBAAmB,MAAM;CAC7D;AACF;;;;;;AAMA,SAAgB,WACd,SAC6E;CAC7E,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;IACd,QAAQ,QAAQ,WAAW,QAAQ;GACpC,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;;AAMA,SAAgB,QAAQ,WAA8C;CACpE,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,YAAY,mBAAmB,SAAS;CAC/D;AACF;;;;;AAKA,SAAgB,eAA+C;CAC7D,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;;AAOA,SAAgB,aAAa,aAAqB,gBAAwD;CACxG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,cAAc,mBAAmB,WAAW,EAAE,iBAAiB,mBAAmB,cAAc;CACvH;AACF"}
@@ -8,7 +8,7 @@ import { wowBasePath, wowSearchBasePath } from "@blizzard-api/core";
8
8
  function itemAppearance(appearanceId) {
9
9
  return {
10
10
  namespace: "static",
11
- path: `${wowBasePath}/item-appearance/${appearanceId}`
11
+ path: `${wowBasePath}/item-appearance/${encodeURIComponent(appearanceId)}`
12
12
  };
13
13
  }
14
14
  /**
@@ -35,7 +35,7 @@ function itemAppearanceSearch(options) {
35
35
  function itemAppearanceSet(appearanceSetId) {
36
36
  return {
37
37
  namespace: "static",
38
- path: `${wowBasePath}/item-appearance/set/${appearanceSetId}`
38
+ path: `${wowBasePath}/item-appearance/set/${encodeURIComponent(appearanceSetId)}`
39
39
  };
40
40
  }
41
41
  /**
@@ -56,7 +56,7 @@ function itemAppearanceSetIndex() {
56
56
  function itemAppearanceSlot(slotType) {
57
57
  return {
58
58
  namespace: "static",
59
- path: `${wowBasePath}/item-appearance/slot/${slotType}`
59
+ path: `${wowBasePath}/item-appearance/slot/${encodeURIComponent(slotType)}`
60
60
  };
61
61
  }
62
62
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/item-appearance/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type {\n ItemAppearanceResponse,\n ItemAppearanceSearchParameters,\n ItemAppearanceSearchResponse,\n ItemAppearanceSetIndexResponse,\n ItemAppearanceSetResponse,\n ItemAppearanceSlotIndexResponse,\n ItemAppearanceSlotResponse,\n ItemAppearanceSlotType,\n} from './types';\n\n/**\n * Get an item appearance by ID.\n * @param appearanceId The item appearance ID.\n * @returns The item appearance. See {@link ItemAppearanceResponse}.\n */\nexport function itemAppearance(appearanceId: number): Resource<ItemAppearanceResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/${appearanceId}`,\n };\n}\n/**\n * Search for item appearances.\n * @param options The search parameters. See {@link ItemAppearanceSearchParameters}.\n * @returns The search results. See {@link ItemAppearanceSearchResponse}.\n */\nexport function itemAppearanceSearch(\n options: ItemAppearanceSearchParameters,\n): Resource<ItemAppearanceSearchResponse, ItemAppearanceSearchParameters> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n id: options.id,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/item-appearance`,\n };\n}\n/**\n * Get an item appearance set by ID.\n * @param appearanceSetId The item appearance set ID.\n * @returns The item appearance set. See {@link ItemAppearanceSetResponse}.\n */\nexport function itemAppearanceSet(appearanceSetId: number): Resource<ItemAppearanceSetResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/set/${appearanceSetId}`,\n };\n}\n/**\n * Get an item appearance set index.\n * @returns The item appearance set index. See {@link ItemAppearanceSetIndexResponse}.\n */\nexport function itemAppearanceSetIndex(): Resource<ItemAppearanceSetIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/set/index`,\n };\n}\n/**\n * Get an item appearance slot by slot type.\n * @param slotType The item appearance slot type.\n * @returns The item appearance slot. See {@link ItemAppearanceSlotResponse}.\n */\nexport function itemAppearanceSlot(slotType: ItemAppearanceSlotType): Resource<ItemAppearanceSlotResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/slot/${slotType}`,\n };\n}\n/**\n * Get an item appearance slot index.\n * @returns The item appearance slot index. See {@link ItemAppearanceSlotIndexResponse}.\n */\nexport function itemAppearanceSlotIndex(): Resource<ItemAppearanceSlotIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/slot/index`,\n };\n}\n"],"mappings":";;;;;;;AAkBA,SAAgB,eAAe,cAAwD;CACrF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,mBAAmB;CAC1C;AACF;;;;;;AAMA,SAAgB,qBACd,SACwE;CACxE,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;GACf,IAAI,QAAQ;GACZ,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;;AAMA,SAAgB,kBAAkB,iBAA8D;CAC9F,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,uBAAuB;CAC9C;AACF;;;;;AAKA,SAAgB,yBAAmE;CACjF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,mBAAmB,UAAwE;CACzG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,wBAAwB;CAC/C;AACF;;;;;AAKA,SAAgB,0BAAqE;CACnF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/item-appearance/index.ts"],"sourcesContent":["import type { Resource } from '@blizzard-api/core';\nimport { wowBasePath, wowSearchBasePath } from '@blizzard-api/core';\nimport type {\n ItemAppearanceResponse,\n ItemAppearanceSearchParameters,\n ItemAppearanceSearchResponse,\n ItemAppearanceSetIndexResponse,\n ItemAppearanceSetResponse,\n ItemAppearanceSlotIndexResponse,\n ItemAppearanceSlotResponse,\n ItemAppearanceSlotType,\n} from './types';\n\n/**\n * Get an item appearance by ID.\n * @param appearanceId The item appearance ID.\n * @returns The item appearance. See {@link ItemAppearanceResponse}.\n */\nexport function itemAppearance(appearanceId: number): Resource<ItemAppearanceResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/${encodeURIComponent(appearanceId)}`,\n };\n}\n/**\n * Search for item appearances.\n * @param options The search parameters. See {@link ItemAppearanceSearchParameters}.\n * @returns The search results. See {@link ItemAppearanceSearchResponse}.\n */\nexport function itemAppearanceSearch(\n options: ItemAppearanceSearchParameters,\n): Resource<ItemAppearanceSearchResponse, ItemAppearanceSearchParameters> {\n return {\n namespace: 'static',\n parameters: {\n _page: options._page,\n id: options.id,\n orderby: Array.isArray(options.orderby) ? options.orderby.join(',') : options.orderby,\n },\n path: `${wowSearchBasePath}/item-appearance`,\n };\n}\n/**\n * Get an item appearance set by ID.\n * @param appearanceSetId The item appearance set ID.\n * @returns The item appearance set. See {@link ItemAppearanceSetResponse}.\n */\nexport function itemAppearanceSet(appearanceSetId: number): Resource<ItemAppearanceSetResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/set/${encodeURIComponent(appearanceSetId)}`,\n };\n}\n/**\n * Get an item appearance set index.\n * @returns The item appearance set index. See {@link ItemAppearanceSetIndexResponse}.\n */\nexport function itemAppearanceSetIndex(): Resource<ItemAppearanceSetIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/set/index`,\n };\n}\n/**\n * Get an item appearance slot by slot type.\n * @param slotType The item appearance slot type.\n * @returns The item appearance slot. See {@link ItemAppearanceSlotResponse}.\n */\nexport function itemAppearanceSlot(slotType: ItemAppearanceSlotType): Resource<ItemAppearanceSlotResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/slot/${encodeURIComponent(slotType)}`,\n };\n}\n/**\n * Get an item appearance slot index.\n * @returns The item appearance slot index. See {@link ItemAppearanceSlotIndexResponse}.\n */\nexport function itemAppearanceSlotIndex(): Resource<ItemAppearanceSlotIndexResponse> {\n return {\n namespace: 'static',\n path: `${wowBasePath}/item-appearance/slot/index`,\n };\n}\n"],"mappings":";;;;;;;AAkBA,SAAgB,eAAe,cAAwD;CACrF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,mBAAmB,mBAAmB,YAAY;CACzE;AACF;;;;;;AAMA,SAAgB,qBACd,SACwE;CACxE,OAAO;EACL,WAAW;EACX,YAAY;GACV,OAAO,QAAQ;GACf,IAAI,QAAQ;GACZ,SAAS,MAAM,QAAQ,QAAQ,OAAO,IAAI,QAAQ,QAAQ,KAAK,GAAG,IAAI,QAAQ;EAChF;EACA,MAAM,GAAG,kBAAkB;CAC7B;AACF;;;;;;AAMA,SAAgB,kBAAkB,iBAA8D;CAC9F,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,uBAAuB,mBAAmB,eAAe;CAChF;AACF;;;;;AAKA,SAAgB,yBAAmE;CACjF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF;;;;;;AAMA,SAAgB,mBAAmB,UAAwE;CACzG,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY,wBAAwB,mBAAmB,QAAQ;CAC1E;AACF;;;;;AAKA,SAAgB,0BAAqE;CACnF,OAAO;EACL,WAAW;EACX,MAAM,GAAG,YAAY;CACvB;AACF"}