@pinta365/blizzard_api 0.7.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -4
- package/esm/mod.d.ts +4 -2
- package/esm/mod.js +2 -0
- package/esm/src/client.d.ts +9 -1
- package/esm/src/client.js +2 -0
- package/esm/src/generated/wow_forever_api.d.ts +939 -0
- package/esm/src/generated/wow_forever_api.js +2 -0
- package/esm/src/shared/context.d.ts +13 -2
- package/esm/src/shared/context.js +24 -9
- package/esm/src/shared/types.d.ts +1 -1
- package/esm/src/wow/game_data/achievement.d.ts +4 -0
- package/esm/src/wow/game_data/item.d.ts +29 -6
- package/esm/src/wow/game_data/mount.d.ts +2 -1
- package/esm/src/wow/game_data/reputations.d.ts +7 -1
- package/esm/src/wow/game_data/talent.d.ts +6 -2
- package/esm/src/wow/profile/character_statistics.d.ts +4 -0
- package/esm/src/wow_forever/account.d.ts +42 -0
- package/esm/src/wow_forever/account.js +24 -0
- package/esm/src/wow_forever/character.d.ts +342 -0
- package/esm/src/wow_forever/character.js +269 -0
- package/esm/src/wow_forever/game_data.d.ts +196 -0
- package/esm/src/wow_forever/game_data.js +166 -0
- package/esm/src/wow_forever/guild.d.ts +88 -0
- package/esm/src/wow_forever/guild.js +57 -0
- package/esm/src/wow_forever/index.d.ts +39 -0
- package/esm/src/wow_forever/index.js +45 -0
- package/esm/src/wow_forever/ruleset.d.ts +32 -0
- package/esm/src/wow_forever/ruleset.js +30 -0
- package/esm/src/wow_forever/types.d.ts +5 -0
- package/esm/src/wow_forever/types.js +1 -0
- package/package.json +5 -1
- package/script/mod.d.ts +4 -2
- package/script/mod.js +3 -1
- package/script/src/client.d.ts +9 -1
- package/script/src/client.js +2 -0
- package/script/src/generated/wow_forever_api.d.ts +939 -0
- package/script/src/generated/wow_forever_api.js +3 -0
- package/script/src/shared/context.d.ts +13 -2
- package/script/src/shared/context.js +24 -9
- package/script/src/shared/types.d.ts +1 -1
- package/script/src/wow/game_data/achievement.d.ts +4 -0
- package/script/src/wow/game_data/item.d.ts +29 -6
- package/script/src/wow/game_data/mount.d.ts +2 -1
- package/script/src/wow/game_data/reputations.d.ts +7 -1
- package/script/src/wow/game_data/talent.d.ts +6 -2
- package/script/src/wow/profile/character_statistics.d.ts +4 -0
- package/script/src/wow_forever/account.d.ts +42 -0
- package/script/src/wow_forever/account.js +28 -0
- package/script/src/wow_forever/character.d.ts +342 -0
- package/script/src/wow_forever/character.js +296 -0
- package/script/src/wow_forever/game_data.d.ts +196 -0
- package/script/src/wow_forever/game_data.js +185 -0
- package/script/src/wow_forever/guild.d.ts +88 -0
- package/script/src/wow_forever/guild.js +63 -0
- package/script/src/wow_forever/index.d.ts +39 -0
- package/script/src/wow_forever/index.js +180 -0
- package/script/src/wow_forever/ruleset.d.ts +32 -0
- package/script/src/wow_forever/ruleset.js +34 -0
- package/script/src/wow_forever/types.d.ts +5 -0
- package/script/src/wow_forever/types.js +2 -0
|
@@ -12,6 +12,12 @@ export interface ClientConfig {
|
|
|
12
12
|
locale?: Locales;
|
|
13
13
|
clientId: string;
|
|
14
14
|
clientSecret: string;
|
|
15
|
+
/**
|
|
16
|
+
* Static namespace version for WoW: Forever, e.g. "1.60.1_70399". When set, `wowForever` static requests use
|
|
17
|
+
* `static-<version>-forever-<region>` instead of `static-forever-<region>` (which serves the current version). Use it
|
|
18
|
+
* to pin a version; the current one is in the `self` link of any static response.
|
|
19
|
+
*/
|
|
20
|
+
foreverStaticVersion?: string;
|
|
15
21
|
}
|
|
16
22
|
/**
|
|
17
23
|
* Represents the authentication state of the client credentials token.
|
|
@@ -56,7 +62,10 @@ export interface TokenResponse {
|
|
|
56
62
|
interface ContextOptions {
|
|
57
63
|
userToken?: string;
|
|
58
64
|
namespaceVariant?: string;
|
|
65
|
+
staticVersion?: StaticVersion;
|
|
59
66
|
}
|
|
67
|
+
/** Returns the static namespace version to insert before the variant, or undefined for the plain namespace. */
|
|
68
|
+
type StaticVersion = (config: Readonly<Partial<ClientConfig>>) => string | undefined;
|
|
60
69
|
interface TokenState extends AuthConfig {
|
|
61
70
|
pending?: Promise<string>;
|
|
62
71
|
}
|
|
@@ -92,7 +101,7 @@ export declare class ApiContext {
|
|
|
92
101
|
/**
|
|
93
102
|
* @param {Partial<ClientConfig>} config - The client configuration. Shared by reference with derived contexts.
|
|
94
103
|
* @param {TokenState} [token] - Token state to share (used by derived contexts).
|
|
95
|
-
* @param {ContextOptions} [options] - User token and namespace
|
|
104
|
+
* @param {ContextOptions} [options] - User token, namespace variant and static namespace version.
|
|
96
105
|
*/
|
|
97
106
|
constructor(config?: Partial<ClientConfig>, token?: TokenState, options?: ContextOptions);
|
|
98
107
|
/**
|
|
@@ -119,8 +128,10 @@ export declare class ApiContext {
|
|
|
119
128
|
* inserted before the region, e.g. "classic1x" turns "static" into "static-classic1x-eu".
|
|
120
129
|
* It shares configuration, tokens and the user token with this context.
|
|
121
130
|
* @param {string} namespaceVariant - The namespace variant, e.g. "classic" or "classic1x".
|
|
131
|
+
* @param {StaticVersion} [staticVersion] - Reads a static namespace version from the configuration, e.g. "1.60.1_70399"
|
|
132
|
+
* turns "static" into "static-1.60.1_70399-forever-eu". When it returns undefined, the plain namespace is used.
|
|
122
133
|
*/
|
|
123
|
-
withNamespaceVariant(namespaceVariant: string): ApiContext;
|
|
134
|
+
withNamespaceVariant(namespaceVariant: string, staticVersion?: StaticVersion): ApiContext;
|
|
124
135
|
/**
|
|
125
136
|
* Obtains a client credentials access token, reusing the cached one while it is valid.
|
|
126
137
|
* Concurrent callers share a single token request.
|
|
@@ -9,7 +9,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
9
9
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
|
-
var _ApiContext_instances, _ApiContext_config, _ApiContext_token, _ApiContext_userToken, _ApiContext_namespaceVariant, _ApiContext_namespaceHeader, _ApiContext_send, _ApiContext_requestToken;
|
|
12
|
+
var _ApiContext_instances, _ApiContext_config, _ApiContext_token, _ApiContext_userToken, _ApiContext_namespaceVariant, _ApiContext_staticVersion, _ApiContext_namespaceHeader, _ApiContext_send, _ApiContext_requestToken;
|
|
13
13
|
import { APIError, AuthenticationError, MissingClientIdError, MissingClientSecretError, MissingRegionError, MissingUserTokenError, } from "./errors.js";
|
|
14
14
|
/**
|
|
15
15
|
* Renew the token this long before it actually expires, so in-flight requests don't race the expiry.
|
|
@@ -86,7 +86,7 @@ export class ApiContext {
|
|
|
86
86
|
/**
|
|
87
87
|
* @param {Partial<ClientConfig>} config - The client configuration. Shared by reference with derived contexts.
|
|
88
88
|
* @param {TokenState} [token] - Token state to share (used by derived contexts).
|
|
89
|
-
* @param {ContextOptions} [options] - User token and namespace
|
|
89
|
+
* @param {ContextOptions} [options] - User token, namespace variant and static namespace version.
|
|
90
90
|
*/
|
|
91
91
|
constructor(config = {}, token, options = {}) {
|
|
92
92
|
_ApiContext_instances.add(this);
|
|
@@ -94,10 +94,12 @@ export class ApiContext {
|
|
|
94
94
|
_ApiContext_token.set(this, void 0);
|
|
95
95
|
_ApiContext_userToken.set(this, void 0);
|
|
96
96
|
_ApiContext_namespaceVariant.set(this, void 0);
|
|
97
|
+
_ApiContext_staticVersion.set(this, void 0);
|
|
97
98
|
__classPrivateFieldSet(this, _ApiContext_config, config, "f");
|
|
98
99
|
__classPrivateFieldSet(this, _ApiContext_token, token ?? { accessToken: "", tokenExpiration: 0 }, "f");
|
|
99
100
|
__classPrivateFieldSet(this, _ApiContext_userToken, options.userToken, "f");
|
|
100
101
|
__classPrivateFieldSet(this, _ApiContext_namespaceVariant, options.namespaceVariant, "f");
|
|
102
|
+
__classPrivateFieldSet(this, _ApiContext_staticVersion, options.staticVersion, "f");
|
|
101
103
|
}
|
|
102
104
|
/**
|
|
103
105
|
* The current configuration (may be partial if not fully set up).
|
|
@@ -129,16 +131,26 @@ export class ApiContext {
|
|
|
129
131
|
* @param {string} userToken - A user access token from the authorization code flow.
|
|
130
132
|
*/
|
|
131
133
|
forUser(userToken) {
|
|
132
|
-
return new ApiContext(__classPrivateFieldGet(this, _ApiContext_config, "f"), __classPrivateFieldGet(this, _ApiContext_token, "f"), {
|
|
134
|
+
return new ApiContext(__classPrivateFieldGet(this, _ApiContext_config, "f"), __classPrivateFieldGet(this, _ApiContext_token, "f"), {
|
|
135
|
+
userToken,
|
|
136
|
+
namespaceVariant: __classPrivateFieldGet(this, _ApiContext_namespaceVariant, "f"),
|
|
137
|
+
staticVersion: __classPrivateFieldGet(this, _ApiContext_staticVersion, "f"),
|
|
138
|
+
});
|
|
133
139
|
}
|
|
134
140
|
/**
|
|
135
141
|
* Returns a context for another game version: base namespaces ("static", "dynamic", "profile") get the variant
|
|
136
142
|
* inserted before the region, e.g. "classic1x" turns "static" into "static-classic1x-eu".
|
|
137
143
|
* It shares configuration, tokens and the user token with this context.
|
|
138
144
|
* @param {string} namespaceVariant - The namespace variant, e.g. "classic" or "classic1x".
|
|
145
|
+
* @param {StaticVersion} [staticVersion] - Reads a static namespace version from the configuration, e.g. "1.60.1_70399"
|
|
146
|
+
* turns "static" into "static-1.60.1_70399-forever-eu". When it returns undefined, the plain namespace is used.
|
|
139
147
|
*/
|
|
140
|
-
withNamespaceVariant(namespaceVariant) {
|
|
141
|
-
return new ApiContext(__classPrivateFieldGet(this, _ApiContext_config, "f"), __classPrivateFieldGet(this, _ApiContext_token, "f"), {
|
|
148
|
+
withNamespaceVariant(namespaceVariant, staticVersion) {
|
|
149
|
+
return new ApiContext(__classPrivateFieldGet(this, _ApiContext_config, "f"), __classPrivateFieldGet(this, _ApiContext_token, "f"), {
|
|
150
|
+
userToken: __classPrivateFieldGet(this, _ApiContext_userToken, "f"),
|
|
151
|
+
namespaceVariant,
|
|
152
|
+
staticVersion,
|
|
153
|
+
});
|
|
142
154
|
}
|
|
143
155
|
/**
|
|
144
156
|
* Obtains a client credentials access token, reusing the cached one while it is valid.
|
|
@@ -238,11 +250,14 @@ export class ApiContext {
|
|
|
238
250
|
return __classPrivateFieldGet(this, _ApiContext_instances, "m", _ApiContext_send).call(this, url.toString(), undefined, url.pathname.startsWith("/profile/user/"));
|
|
239
251
|
}
|
|
240
252
|
}
|
|
241
|
-
_ApiContext_config = new WeakMap(), _ApiContext_token = new WeakMap(), _ApiContext_userToken = new WeakMap(), _ApiContext_namespaceVariant = new WeakMap(), _ApiContext_instances = new WeakSet(), _ApiContext_namespaceHeader = function _ApiContext_namespaceHeader(namespace, region) {
|
|
253
|
+
_ApiContext_config = new WeakMap(), _ApiContext_token = new WeakMap(), _ApiContext_userToken = new WeakMap(), _ApiContext_namespaceVariant = new WeakMap(), _ApiContext_staticVersion = new WeakMap(), _ApiContext_instances = new WeakSet(), _ApiContext_namespaceHeader = function _ApiContext_namespaceHeader(namespace, region) {
|
|
242
254
|
const isBase = namespace === "static" || namespace === "dynamic" || namespace === "profile";
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
255
|
+
if (!isBase || !__classPrivateFieldGet(this, _ApiContext_namespaceVariant, "f"))
|
|
256
|
+
return `${namespace}-${region}`;
|
|
257
|
+
const version = namespace === "static" ? __classPrivateFieldGet(this, _ApiContext_staticVersion, "f")?.call(this, __classPrivateFieldGet(this, _ApiContext_config, "f")) : undefined;
|
|
258
|
+
return version
|
|
259
|
+
? `${namespace}-${version}-${__classPrivateFieldGet(this, _ApiContext_namespaceVariant, "f")}-${region}`
|
|
260
|
+
: `${namespace}-${__classPrivateFieldGet(this, _ApiContext_namespaceVariant, "f")}-${region}`;
|
|
246
261
|
}, _ApiContext_send = async function _ApiContext_send(url, namespaceHeader, userScoped) {
|
|
247
262
|
if (userScoped && !__classPrivateFieldGet(this, _ApiContext_userToken, "f")) {
|
|
248
263
|
throw new MissingUserTokenError();
|
|
@@ -26,7 +26,7 @@ export type Locales = "en_US" | "es_MX" | "pt_BR" | "en_GB" | "es_ES" | "fr_FR"
|
|
|
26
26
|
*/
|
|
27
27
|
export type Namespaces = "static" | "dynamic" | "profile" | //Retail
|
|
28
28
|
"static-classic1x" | "dynamic-classic1x" | "profile-classic1x" | //Classic
|
|
29
|
-
"static-classic" | "dynamic-classic" | "profile-classic";
|
|
29
|
+
"static-classic" | "dynamic-classic" | "profile-classic" | "static-forever" | "dynamic-forever" | "profile-forever";
|
|
30
30
|
/**
|
|
31
31
|
* Represents a reference (link) with a URL.
|
|
32
32
|
*/
|
|
@@ -25,6 +25,8 @@ export interface AchievementCategory extends LinkSelfHref {
|
|
|
25
25
|
name: LocalizedString;
|
|
26
26
|
achievements?: KeyNameId[];
|
|
27
27
|
parent_category?: KeyNameId;
|
|
28
|
+
/** Absent when the category has no subcategories. */
|
|
29
|
+
subcategories?: KeyNameId[];
|
|
28
30
|
is_guild_category: boolean;
|
|
29
31
|
aggregates_by_faction: AggregatesByFaction;
|
|
30
32
|
display_order: number;
|
|
@@ -45,6 +47,8 @@ export interface Achievement extends LinkSelfHref {
|
|
|
45
47
|
amount: number;
|
|
46
48
|
};
|
|
47
49
|
next_achievement?: KeyNameId;
|
|
50
|
+
/** Absent when the achievement grants no reward. */
|
|
51
|
+
reward_description?: LocalizedString;
|
|
48
52
|
media: KeyId;
|
|
49
53
|
display_order: number;
|
|
50
54
|
}
|
|
@@ -54,8 +54,10 @@ export interface Item extends LinkSelfHref {
|
|
|
54
54
|
item_subclass: KeyNameId;
|
|
55
55
|
inventory_type: TypeName;
|
|
56
56
|
binding: TypeName;
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
/** Absent for items that are not unique-equipped. */
|
|
58
|
+
unique_equipped?: string;
|
|
59
|
+
/** Absent for non-weapon items. */
|
|
60
|
+
weapon?: {
|
|
59
61
|
damage: {
|
|
60
62
|
min_value: number;
|
|
61
63
|
max_value: number;
|
|
@@ -77,10 +79,26 @@ export interface Item extends LinkSelfHref {
|
|
|
77
79
|
display_string: LocalizedString;
|
|
78
80
|
};
|
|
79
81
|
};
|
|
80
|
-
|
|
82
|
+
/** Absent for non-armor items. */
|
|
83
|
+
armor?: {
|
|
84
|
+
value: number;
|
|
85
|
+
display: {
|
|
86
|
+
display_string: LocalizedString;
|
|
87
|
+
color: {
|
|
88
|
+
r: number;
|
|
89
|
+
g: number;
|
|
90
|
+
b: number;
|
|
91
|
+
a: number;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
/** Absent for items without stats, such as non-equippable items. */
|
|
96
|
+
stats?: {
|
|
81
97
|
type: TypeName;
|
|
82
98
|
value: number;
|
|
83
99
|
is_negated?: boolean;
|
|
100
|
+
/** Present on "Equip:" bonus stats, such as spell power. */
|
|
101
|
+
is_equip_bonus?: boolean;
|
|
84
102
|
display: {
|
|
85
103
|
display_string: LocalizedString;
|
|
86
104
|
color: {
|
|
@@ -91,11 +109,13 @@ export interface Item extends LinkSelfHref {
|
|
|
91
109
|
};
|
|
92
110
|
};
|
|
93
111
|
}[];
|
|
94
|
-
spells
|
|
112
|
+
/** Absent for items without spells. */
|
|
113
|
+
spells?: {
|
|
95
114
|
spell: KeyNameId;
|
|
96
115
|
description: LocalizedString;
|
|
97
116
|
}[];
|
|
98
|
-
requirements
|
|
117
|
+
/** Absent for items without requirements. */
|
|
118
|
+
requirements?: {
|
|
99
119
|
level: {
|
|
100
120
|
value: number;
|
|
101
121
|
display_string: LocalizedString;
|
|
@@ -105,10 +125,13 @@ export interface Item extends LinkSelfHref {
|
|
|
105
125
|
value: number;
|
|
106
126
|
display_string: LocalizedString;
|
|
107
127
|
};
|
|
108
|
-
durability
|
|
128
|
+
/** Absent for items without durability, such as non-equippable items. */
|
|
129
|
+
durability?: {
|
|
109
130
|
value: number;
|
|
110
131
|
display_string: LocalizedString;
|
|
111
132
|
};
|
|
133
|
+
/** Present on some items, such as companion pets. */
|
|
134
|
+
is_subclass_hidden?: boolean;
|
|
112
135
|
sell_price?: {
|
|
113
136
|
value: number;
|
|
114
137
|
display_strings: {
|
|
@@ -8,7 +8,8 @@ export interface Mount extends LinkSelfHref {
|
|
|
8
8
|
id: number;
|
|
9
9
|
name: LocalizedString;
|
|
10
10
|
creature_displays: KeyId[];
|
|
11
|
-
description
|
|
11
|
+
/** null for mounts without a description. */
|
|
12
|
+
description: LocalizedString | null;
|
|
12
13
|
source: TypeName;
|
|
13
14
|
faction?: TypeName;
|
|
14
15
|
should_exclude_if_uncollected?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ApiContext } from "../../shared/index.js";
|
|
2
|
-
import type { KeyId, KeyNameId, LinkSelfHref, LocalizedString } from "../../shared/index.js";
|
|
2
|
+
import type { KeyId, KeyNameId, LinkSelfHref, LocalizedString, TypeName } from "../../shared/index.js";
|
|
3
3
|
export interface ReputationFactions extends LinkSelfHref {
|
|
4
4
|
factions: KeyNameId[];
|
|
5
5
|
root_factions: KeyNameId[];
|
|
@@ -9,6 +9,12 @@ export interface ReputationFaction extends LinkSelfHref {
|
|
|
9
9
|
name: LocalizedString;
|
|
10
10
|
description: LocalizedString;
|
|
11
11
|
reputation_tiers: KeyId;
|
|
12
|
+
/** Present for header factions, which group the sub-factions in `factions`. */
|
|
13
|
+
is_header?: boolean;
|
|
14
|
+
/** The sub-factions; present for header factions. */
|
|
15
|
+
factions?: KeyNameId[];
|
|
16
|
+
/** The faction's player faction; present for header factions. */
|
|
17
|
+
player_faction?: TypeName;
|
|
12
18
|
}
|
|
13
19
|
export interface ReputationTiers extends LinkSelfHref {
|
|
14
20
|
reputation_tiers: {
|
|
@@ -9,7 +9,8 @@ export interface SpellTooltip {
|
|
|
9
9
|
spell: KeyNameId;
|
|
10
10
|
description: string;
|
|
11
11
|
cast_time: string;
|
|
12
|
-
|
|
12
|
+
/** null for abilities without a power cost. */
|
|
13
|
+
power_cost?: string | null;
|
|
13
14
|
range?: string;
|
|
14
15
|
cooldown?: string;
|
|
15
16
|
}
|
|
@@ -80,7 +81,10 @@ export interface Talent extends LinkSelfHref {
|
|
|
80
81
|
description: LocalizedString | null;
|
|
81
82
|
}[];
|
|
82
83
|
spell: KeyNameId;
|
|
83
|
-
playable_class: KeyId
|
|
84
|
+
playable_class: KeyId & {
|
|
85
|
+
/** Absent when the talent is not tied to a class (id 0). */
|
|
86
|
+
name?: string;
|
|
87
|
+
};
|
|
84
88
|
playable_specialization?: KeyNameId;
|
|
85
89
|
}
|
|
86
90
|
export interface PvpTalents extends LinkSelfHref {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WoW: Forever versions of the Retail account profile endpoints whose Forever responses differ from Retail.
|
|
3
|
+
* Each one makes the same request as the Retail endpoint, but returns a Forever type.
|
|
4
|
+
* Verified against the live API (EU) on 2026-11-02, before launch.
|
|
5
|
+
*/
|
|
6
|
+
import type { ApiContext } from "../shared/index.js";
|
|
7
|
+
import type { AccountCharacter, AccountProfileSummary, AccountTransmogsCollection } from "../wow/profile/account_profile.js";
|
|
8
|
+
/**
|
|
9
|
+
* A Forever character in the account profile. Forever is realmless: characters have a two-part name (`name` and
|
|
10
|
+
* `surname`, unique per region) and no realm. The `character` link is realmless too
|
|
11
|
+
* (`/profile/wow/character/{name}-{surname}`). The hidden realm is the first part of the `protected_character` id.
|
|
12
|
+
*/
|
|
13
|
+
export interface ForeverAccountCharacter extends Omit<AccountCharacter, "realm"> {
|
|
14
|
+
/** The second part of the character's name. */
|
|
15
|
+
surname: string;
|
|
16
|
+
}
|
|
17
|
+
/** Account profile summary as returned for Forever. */
|
|
18
|
+
export interface ForeverAccountProfileSummary extends Omit<AccountProfileSummary, "wow_accounts" | "houses"> {
|
|
19
|
+
wow_accounts: {
|
|
20
|
+
id: number;
|
|
21
|
+
characters: ForeverAccountCharacter[];
|
|
22
|
+
}[];
|
|
23
|
+
}
|
|
24
|
+
/** Account transmog collection as returned for Forever. */
|
|
25
|
+
export interface ForeverAccountTransmogsCollection extends Omit<AccountTransmogsCollection, "appearance_sets"> {
|
|
26
|
+
/** Absent when the account has collected no appearance sets. */
|
|
27
|
+
appearance_sets?: AccountTransmogsCollection["appearance_sets"];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Returns a profile summary for an account, including its WoW accounts and Forever characters.
|
|
31
|
+
* Requires a user access token (client.forUser(token)).
|
|
32
|
+
*
|
|
33
|
+
* @returns A promise that resolves to an object representing the account profile summary.
|
|
34
|
+
*/
|
|
35
|
+
export declare function accountProfileSummary(ctx: ApiContext): Promise<ForeverAccountProfileSummary>;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the transmog appearances and sets collected by an account.
|
|
38
|
+
* Requires a user access token (client.forUser(token)).
|
|
39
|
+
*
|
|
40
|
+
* @returns A promise that resolves to an object representing the account's transmogs.
|
|
41
|
+
*/
|
|
42
|
+
export declare function accountTransmogsCollection(ctx: ApiContext): Promise<ForeverAccountTransmogsCollection>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WoW: Forever versions of the Retail account profile endpoints whose Forever responses differ from Retail.
|
|
3
|
+
* Each one makes the same request as the Retail endpoint, but returns a Forever type.
|
|
4
|
+
* Verified against the live API (EU) on 2026-11-02, before launch.
|
|
5
|
+
*/
|
|
6
|
+
import { accountProfileSummary as retailAccountProfileSummary, accountTransmogsCollection as retailAccountTransmogsCollection, } from "../wow/profile/account_profile.js";
|
|
7
|
+
/**
|
|
8
|
+
* Returns a profile summary for an account, including its WoW accounts and Forever characters.
|
|
9
|
+
* Requires a user access token (client.forUser(token)).
|
|
10
|
+
*
|
|
11
|
+
* @returns A promise that resolves to an object representing the account profile summary.
|
|
12
|
+
*/
|
|
13
|
+
export async function accountProfileSummary(ctx) {
|
|
14
|
+
return await retailAccountProfileSummary(ctx);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Returns the transmog appearances and sets collected by an account.
|
|
18
|
+
* Requires a user access token (client.forUser(token)).
|
|
19
|
+
*
|
|
20
|
+
* @returns A promise that resolves to an object representing the account's transmogs.
|
|
21
|
+
*/
|
|
22
|
+
export async function accountTransmogsCollection(ctx) {
|
|
23
|
+
return await retailAccountTransmogsCollection(ctx);
|
|
24
|
+
}
|