halo-infinite-api 5.2.1 → 5.3.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/dist/authentication/halo-authentication-client.js +2 -1
- package/dist/authentication/halo-authentication-client.js.map +1 -1
- package/dist/core/halo-infinite-client.d.ts +15 -13
- package/dist/core/halo-infinite-client.js +64 -28
- package/dist/core/halo-infinite-client.js.map +1 -1
- package/dist/core/token-providers/auto-token-provider.d.ts +1 -1
- package/dist/core/xbox-client.d.ts +2 -2
- package/dist/core/xbox-client.js +17 -11
- package/dist/core/xbox-client.js.map +1 -1
- package/dist/index.d.ts +20 -20
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/authentication/halo-authentication-client.ts +2 -2
- package/src/core/halo-infinite-client.ts +105 -49
- package/src/core/token-providers/auto-token-provider.ts +1 -1
- package/src/core/xbox-client.ts +23 -11
- package/src/index.ts +32 -25
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DateTime } from "luxon";
|
|
2
2
|
import { ExpiryTokenCache } from "../util/expiry-token-cache";
|
|
3
3
|
import { defaultFetch } from "../util/fetch-function";
|
|
4
|
+
import { GlobalConstants } from "../util/global-contants";
|
|
4
5
|
export class HaloAuthenticationClient {
|
|
5
6
|
fetchXstsToken;
|
|
6
7
|
loadToken;
|
|
@@ -22,7 +23,7 @@ export class HaloAuthenticationClient {
|
|
|
22
23
|
method: "POST",
|
|
23
24
|
body: JSON.stringify(tokenRequest),
|
|
24
25
|
headers: {
|
|
25
|
-
"User-Agent":
|
|
26
|
+
"User-Agent": GlobalConstants.HALO_WAYPOINT_USER_AGENT,
|
|
26
27
|
"Content-Type": "application/json; charset=utf-8",
|
|
27
28
|
Accept: "application/json, text/plain, */*",
|
|
28
29
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"halo-authentication-client.js","sourceRoot":"","sources":["../../src/authentication/halo-authentication-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAiB,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"halo-authentication-client.js","sourceRoot":"","sources":["../../src/authentication/halo-authentication-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAiB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAO1D,MAAM,OAAO,wBAAwB;IAuChB;IACA;IAIA;IACA;IA5CX,iBAAiB,GAAG,IAAI,gBAAgB,CAC9C,KAAK,IAAI,EAAE;QACT,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAE9C,MAAM,YAAY,GAAwB;YACxC,QAAQ,EAAE,qBAAqB;YAC/B,UAAU,EAAE,GAAG;YACf,KAAK,EAAE;gBACL;oBACE,KAAK,EAAE,SAAS;oBAChB,SAAS,EAAE,aAAa;iBACzB;aACF;SACF,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAC/B,qDAAqD,EACrD;YACE,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC;YAClC,OAAO,EAAE;gBACP,YAAY,EAAE,eAAe,CAAC,wBAAwB;gBACtD,cAAc,EAAE,iCAAiC;gBACjD,MAAM,EAAE,mCAAmC;aAC5C;SACF,CACF,CAAC;QAEF,MAAM,QAAQ,GAAG;YACf,KAAK,EAAE,MAAM,CAAC,YAAY;YAC1B,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;SAC3D,CAAC;QACF,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAC/B,OAAO,QAAQ,CAAC;IAClB,CAAC,EACD,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CACvB,CAAC;IAEF,YACmB,cAA8C,EAC9C,SAGR,EACQ,SAA0C,EAC1C,UAAyB,YAAY;QANrC,mBAAc,GAAd,cAAc,CAAgC;QAC9C,cAAS,GAAT,SAAS,CAGjB;QACQ,cAAS,GAAT,SAAS,CAAiC;QAC1C,YAAO,GAAP,OAAO,CAA8B;IACrD,CAAC;IAEG,KAAK,CAAC,eAAe;QAC1B,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC;QAC1D,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -10,11 +10,14 @@ import { PlaylistCsrContainer } from "../models/halo-infinite/playlist-csr-conta
|
|
|
10
10
|
import { ServiceRecord } from "../models/halo-infinite/service-record";
|
|
11
11
|
import { UserInfo } from "../models/halo-infinite/user-info";
|
|
12
12
|
import { SpartanTokenProvider } from "./token-providers/spartan-token-providers";
|
|
13
|
-
interface ResultContainer<TValue> {
|
|
13
|
+
export interface ResultContainer<TValue> {
|
|
14
14
|
Id: string;
|
|
15
15
|
ResultCode: 0 | 1;
|
|
16
16
|
Result: TValue;
|
|
17
17
|
}
|
|
18
|
+
export interface ResultsContainer<TValue> {
|
|
19
|
+
Value: ResultContainer<TValue>[];
|
|
20
|
+
}
|
|
18
21
|
export type AssetKindTypeMap = {
|
|
19
22
|
[AssetKind.Map]: MapAsset;
|
|
20
23
|
[AssetKind.UgcGameVariant]: UgcGameVariantAsset;
|
|
@@ -31,30 +34,29 @@ export declare class HaloInfiniteClient {
|
|
|
31
34
|
* @param playlistId - Unique ID for the playlist.
|
|
32
35
|
* @param playerIds - Array of player xuids.
|
|
33
36
|
*/
|
|
34
|
-
getPlaylistCsr: (playlistId: string, playerIds: string[]) => Promise<ResultContainer<PlaylistCsrContainer>[]>;
|
|
37
|
+
getPlaylistCsr: (playlistId: string, playerIds: string[], seasonId?: string, init?: Omit<RequestInit, "body" | "method">) => Promise<ResultContainer<PlaylistCsrContainer>[]>;
|
|
35
38
|
/** Get gamertag info for a player.
|
|
36
39
|
* @param gamerTag - Gamertag to lookup.
|
|
37
40
|
*/
|
|
38
|
-
getUser: (gamerTag: string) => Promise<UserInfo>;
|
|
41
|
+
getUser: (gamerTag: string, init?: Omit<RequestInit, "body" | "method">) => Promise<UserInfo>;
|
|
39
42
|
/** Get gamertag info for several players.
|
|
40
43
|
* @param xuids - Xuids to lookup.
|
|
41
44
|
*/
|
|
42
|
-
getUsers: (xuids: string[]) => Promise<UserInfo[]>;
|
|
45
|
+
getUsers: (xuids: string[], init?: Omit<RequestInit, "body" | "method">) => Promise<UserInfo[]>;
|
|
43
46
|
/** Get service record for a player.
|
|
44
47
|
* @param gamerTag - Gamertag to lookup.
|
|
45
48
|
*/
|
|
46
|
-
getUserServiceRecord: (gamerTag: string) => Promise<ServiceRecord>;
|
|
49
|
+
getUserServiceRecord: (gamerTag: string, init?: Omit<RequestInit, "body" | "method">) => Promise<ServiceRecord>;
|
|
47
50
|
/** Get playlist information
|
|
48
51
|
* @param playlistId - Unique ID for the playlist.
|
|
49
52
|
*/
|
|
50
|
-
getPlaylist: (playlistId: string) => Promise<Playlist>;
|
|
51
|
-
getPlayerMatches: (playerXuid: string, type?: MatchType, count?: number, start?: number) => Promise<PlayerMatchHistory[]>;
|
|
52
|
-
getPlayerServiceRecord(playerXuid: string,
|
|
53
|
-
getMatchStats: (matchId: string) => Promise<MatchStats<import("..").GameVariantCategory>>;
|
|
54
|
-
getMatchSkill: (matchId: string, playerIds: string[]) => Promise<ResultContainer<MatchSkill<0>>[]>;
|
|
53
|
+
getPlaylist: (playlistId: string, init?: Omit<RequestInit, "body" | "method">) => Promise<Playlist>;
|
|
54
|
+
getPlayerMatches: (playerXuid: string, type?: MatchType, count?: number, start?: number, init?: Omit<RequestInit, "body" | "method">) => Promise<PlayerMatchHistory[]>;
|
|
55
|
+
getPlayerServiceRecord(playerXuid: string, init?: Omit<RequestInit, "body" | "method">): Promise<ServiceRecord>;
|
|
56
|
+
getMatchStats: (matchId: string, init?: Omit<RequestInit, "body" | "method">) => Promise<MatchStats<import("..").GameVariantCategory>>;
|
|
57
|
+
getMatchSkill: (matchId: string, playerIds: string[], init?: Omit<RequestInit, "body" | "method">) => Promise<ResultContainer<MatchSkill<0>>[]>;
|
|
55
58
|
/** Gets authoring metadata about a specific asset. */
|
|
56
|
-
getAsset: <TAssetType extends keyof AssetKindTypeMap>(assetType: TAssetType, assetId: string) => Promise<AssetKindTypeMap[TAssetType]>;
|
|
59
|
+
getAsset: <TAssetType extends keyof AssetKindTypeMap>(assetType: TAssetType, assetId: string, init?: Omit<RequestInit, "body" | "method">) => Promise<AssetKindTypeMap[TAssetType]>;
|
|
57
60
|
/** Gets metadata related to a concrete version of a specified asset. */
|
|
58
|
-
getSpecificAssetVersion: <TAssetType extends keyof AssetKindTypeMap>(assetType: TAssetType, assetId: string, versionId: string) => Promise<AssetKindTypeMap[TAssetType]>;
|
|
61
|
+
getSpecificAssetVersion: <TAssetType extends keyof AssetKindTypeMap>(assetType: TAssetType, assetId: string, versionId: string, init?: Omit<RequestInit, "body" | "method">) => Promise<AssetKindTypeMap[TAssetType]>;
|
|
59
62
|
}
|
|
60
|
-
export {};
|
|
@@ -33,20 +33,17 @@ export class HaloInfiniteClient {
|
|
|
33
33
|
this.spartanTokenProvider = spartanTokenProvider;
|
|
34
34
|
this.fetchFn = fetchFn;
|
|
35
35
|
}
|
|
36
|
-
async executeRequest(url,
|
|
37
|
-
const headers =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
};
|
|
41
|
-
if (useSpartanToken) {
|
|
42
|
-
headers["x-343-authorization-spartan"] =
|
|
43
|
-
await this.spartanTokenProvider.getSpartanToken();
|
|
36
|
+
async executeRequest(url, init) {
|
|
37
|
+
const headers = new Headers(init.headers);
|
|
38
|
+
if (!headers.has("User-Agent")) {
|
|
39
|
+
headers.set("User-Agent", GlobalConstants.HALO_PC_USER_AGENT);
|
|
44
40
|
}
|
|
45
|
-
if (
|
|
46
|
-
|
|
41
|
+
if (!headers.has("Accept")) {
|
|
42
|
+
headers.set("Accept", "application/json");
|
|
47
43
|
}
|
|
44
|
+
headers.set("x-343-authorization-spartan", await this.spartanTokenProvider.getSpartanToken());
|
|
48
45
|
const result = await this.fetchFn(url, {
|
|
49
|
-
|
|
46
|
+
...init,
|
|
50
47
|
headers,
|
|
51
48
|
});
|
|
52
49
|
return result;
|
|
@@ -68,46 +65,85 @@ export class HaloInfiniteClient {
|
|
|
68
65
|
* @param playlistId - Unique ID for the playlist.
|
|
69
66
|
* @param playerIds - Array of player xuids.
|
|
70
67
|
*/
|
|
71
|
-
getPlaylistCsr = (playlistId, playerIds) =>
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
getPlaylistCsr = (playlistId, playerIds, seasonId, init) => {
|
|
69
|
+
const urlParams = new URLSearchParams({
|
|
70
|
+
players: playerIds.map(wrapPlayerId).join(","),
|
|
71
|
+
});
|
|
72
|
+
if (seasonId) {
|
|
73
|
+
urlParams.set("seasonId", seasonId);
|
|
74
|
+
}
|
|
75
|
+
return this.executeResultsRequest(`https://${HaloCoreEndpoints.SkillOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/playlist/${playlistId}/csrs?${urlParams}`, {
|
|
76
|
+
...init,
|
|
77
|
+
method: "get",
|
|
78
|
+
});
|
|
79
|
+
};
|
|
74
80
|
/** Get gamertag info for a player.
|
|
75
81
|
* @param gamerTag - Gamertag to lookup.
|
|
76
82
|
*/
|
|
77
|
-
getUser = (gamerTag) => this.executeRequest(`https://${HaloCoreEndpoints.Profile}.${HaloCoreEndpoints.ServiceDomain}/users/gt(${gamerTag})`,
|
|
83
|
+
getUser = (gamerTag, init) => this.executeRequest(`https://${HaloCoreEndpoints.Profile}.${HaloCoreEndpoints.ServiceDomain}/users/gt(${gamerTag})`, {
|
|
84
|
+
...init,
|
|
85
|
+
method: "get",
|
|
86
|
+
});
|
|
78
87
|
/** Get gamertag info for several players.
|
|
79
88
|
* @param xuids - Xuids to lookup.
|
|
80
89
|
*/
|
|
81
|
-
getUsers = (xuids) => {
|
|
82
|
-
return this.executeRequest(`https://${HaloCoreEndpoints.Profile}.${HaloCoreEndpoints.ServiceDomain}/users?xuids=${xuids.map((x) => unwrapPlayerId(x)).join(",")}`,
|
|
90
|
+
getUsers = (xuids, init) => {
|
|
91
|
+
return this.executeRequest(`https://${HaloCoreEndpoints.Profile}.${HaloCoreEndpoints.ServiceDomain}/users?xuids=${xuids.map((x) => unwrapPlayerId(x)).join(",")}`, {
|
|
92
|
+
...init,
|
|
93
|
+
method: "get",
|
|
94
|
+
});
|
|
83
95
|
};
|
|
84
96
|
/** Get service record for a player.
|
|
85
97
|
* @param gamerTag - Gamertag to lookup.
|
|
86
98
|
*/
|
|
87
|
-
getUserServiceRecord = (gamerTag) => this.executeRequest(`https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/players/${gamerTag}/Matchmade/servicerecord`,
|
|
99
|
+
getUserServiceRecord = (gamerTag, init) => this.executeRequest(`https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/players/${gamerTag}/Matchmade/servicerecord`, {
|
|
100
|
+
...init,
|
|
101
|
+
method: "get",
|
|
102
|
+
});
|
|
88
103
|
/** Get playlist information
|
|
89
104
|
* @param playlistId - Unique ID for the playlist.
|
|
90
105
|
*/
|
|
91
|
-
getPlaylist = (playlistId) => this.executeRequest(`https://${HaloCoreEndpoints.GameCmsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/multiplayer/file/playlists/assets/${playlistId}.json`,
|
|
92
|
-
|
|
106
|
+
getPlaylist = (playlistId, init) => this.executeRequest(`https://${HaloCoreEndpoints.GameCmsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/multiplayer/file/playlists/assets/${playlistId}.json`, {
|
|
107
|
+
...init,
|
|
108
|
+
method: "get",
|
|
109
|
+
});
|
|
110
|
+
getPlayerMatches = (playerXuid, type = MatchType.All, count = 25, start = 0, init) => {
|
|
93
111
|
let params = {};
|
|
94
112
|
if (type !== MatchType.All) {
|
|
95
113
|
params.type = type.toString();
|
|
96
114
|
}
|
|
97
|
-
return this.executePaginationRequest(count, start, params, `https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/players/${wrapPlayerId(playerXuid)}/matches`,
|
|
115
|
+
return this.executePaginationRequest(count, start, params, `https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/players/${wrapPlayerId(playerXuid)}/matches`, {
|
|
116
|
+
...init,
|
|
117
|
+
method: "get",
|
|
118
|
+
});
|
|
98
119
|
};
|
|
99
|
-
getPlayerServiceRecord(playerXuid,
|
|
100
|
-
return this.executeRequest(`https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/players/${wrapPlayerId(playerXuid)}/Matchmade/servicerecord`,
|
|
120
|
+
getPlayerServiceRecord(playerXuid, init) {
|
|
121
|
+
return this.executeRequest(`https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/players/${wrapPlayerId(playerXuid)}/Matchmade/servicerecord`, {
|
|
122
|
+
...init,
|
|
123
|
+
method: "get",
|
|
124
|
+
});
|
|
101
125
|
}
|
|
102
|
-
getMatchStats = (matchId) => this.executeRequest(`https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/matches/${matchId}/stats`,
|
|
103
|
-
|
|
126
|
+
getMatchStats = (matchId, init) => this.executeRequest(`https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/matches/${matchId}/stats`, {
|
|
127
|
+
...init,
|
|
128
|
+
method: "get",
|
|
129
|
+
});
|
|
130
|
+
getMatchSkill = async (matchId, playerIds, init) => {
|
|
104
131
|
return await this.executeResultsRequest(`https://${HaloCoreEndpoints.SkillOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/matches/${matchId}/skill?players=${playerIds
|
|
105
132
|
.map(wrapPlayerId)
|
|
106
|
-
.join(",")}`,
|
|
133
|
+
.join(",")}`, {
|
|
134
|
+
...init,
|
|
135
|
+
method: "get",
|
|
136
|
+
});
|
|
107
137
|
};
|
|
108
138
|
/** Gets authoring metadata about a specific asset. */
|
|
109
|
-
getAsset = (assetType, assetId) => this.executeRequest(`https://${HaloCoreEndpoints.DiscoveryOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/${assetKindUrlMap[assetType]}/${assetId}`,
|
|
139
|
+
getAsset = (assetType, assetId, init) => this.executeRequest(`https://${HaloCoreEndpoints.DiscoveryOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/${assetKindUrlMap[assetType]}/${assetId}`, {
|
|
140
|
+
...init,
|
|
141
|
+
method: "get",
|
|
142
|
+
});
|
|
110
143
|
/** Gets metadata related to a concrete version of a specified asset. */
|
|
111
|
-
getSpecificAssetVersion = (assetType, assetId, versionId) => this.executeRequest(`https://${HaloCoreEndpoints.DiscoveryOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/${assetKindUrlMap[assetType]}/${assetId}/versions/${versionId}`,
|
|
144
|
+
getSpecificAssetVersion = (assetType, assetId, versionId, init) => this.executeRequest(`https://${HaloCoreEndpoints.DiscoveryOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/${assetKindUrlMap[assetType]}/${assetId}/versions/${versionId}`, {
|
|
145
|
+
...init,
|
|
146
|
+
method: "get",
|
|
147
|
+
});
|
|
112
148
|
}
|
|
113
149
|
//# sourceMappingURL=halo-infinite-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"halo-infinite-client.js","sourceRoot":"","sources":["../../src/core/halo-infinite-client.ts"],"names":[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ACtC,iBAAiB,CAAC,aACpB,eAAe,OAAO,kBAAkB,SAAS;aAC9C,GAAG,CAAC,YAAY,CAAC;aACjB,IAAI,CAAC,GAAG,CAAC,EAAE,EACd;YACE,GAAG,IAAI;YACP,MAAM,EAAE,KAAK;SACd,CACF,CAAC;IACJ,CAAC,CAAC;IAEF,sDAAsD;IAC/C,QAAQ,GAAG,CAChB,SAAqB,EACrB,OAAe,EACf,IAA2C,EAC3C,EAAE,CACF,IAAI,CAAC,cAAc,CACjB,WAAW,iBAAiB,CAAC,eAAe,IAAI,iBAAiB,CAAC,aAAa,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,OAAO,EAAE,EAC7H;QACE,GAAG,IAAI;QACP,MAAM,EAAE,KAAK;KACd,CACF,CAAC;IAEJ,wEAAwE;IACjE,uBAAuB,GAAG,CAC/B,SAAqB,EACrB,OAAe,EACf,SAAiB,EACjB,IAA2C,EAC3C,EAAE,CACF,IAAI,CAAC,cAAc,CACjB,WAAW,iBAAiB,CAAC,eAAe,IAAI,iBAAiB,CAAC,aAAa,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,OAAO,aAAa,SAAS,EAAE,EACnJ;QACE,GAAG,IAAI;QACP,MAAM,EAAE,KAAK;KACd,CACF,CAAC;CACL"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TokenPersister } from "../token-persisters";
|
|
2
2
|
import { SpartanTokenProvider } from "./spartan-token-providers";
|
|
3
3
|
import { XboxTokenProvider } from "./xbox-token-provider";
|
|
4
|
-
import { FetchFunction } from "
|
|
4
|
+
import type { FetchFunction } from "../../util/fetch-function";
|
|
5
5
|
/**
|
|
6
6
|
* A SpartanTokenProvider that fetches both the Xbox and Halo tokens in the same
|
|
7
7
|
* process. This is useful for applications that do not need to contend with
|
|
@@ -5,11 +5,11 @@ export declare class XboxClient {
|
|
|
5
5
|
private readonly fetchFn;
|
|
6
6
|
constructor(xboxTokenProvider: XboxTokenProvider, fetchFn?: FetchFunction);
|
|
7
7
|
private executeRequest;
|
|
8
|
-
searchUsers(query: string): Promise<{
|
|
8
|
+
searchUsers(query: string, init?: Omit<RequestInit, "body" | "method">): Promise<{
|
|
9
9
|
id: string;
|
|
10
10
|
gamertag: string;
|
|
11
11
|
displayPicUri: string;
|
|
12
12
|
score: number;
|
|
13
13
|
}[]>;
|
|
14
|
-
recentPlayers(): Promise<unknown>;
|
|
14
|
+
recentPlayers(init?: Omit<RequestInit, "body" | "method">): Promise<unknown>;
|
|
15
15
|
}
|
package/dist/core/xbox-client.js
CHANGED
|
@@ -6,23 +6,29 @@ export class XboxClient {
|
|
|
6
6
|
this.xboxTokenProvider = xboxTokenProvider;
|
|
7
7
|
this.fetchFn = fetchFn;
|
|
8
8
|
}
|
|
9
|
-
async executeRequest(url,
|
|
9
|
+
async executeRequest(url, init) {
|
|
10
|
+
const headers = new Headers(init.headers);
|
|
11
|
+
if (!headers.has("Accept")) {
|
|
12
|
+
headers.set("Accept", "application/json");
|
|
13
|
+
}
|
|
14
|
+
if (!headers.has("Authorization")) {
|
|
15
|
+
headers.set("Authorization", await this.xboxTokenProvider.getXboxLiveV3Token());
|
|
16
|
+
}
|
|
17
|
+
if (!headers.has("x-xbl-contract-version")) {
|
|
18
|
+
headers.set("x-xbl-contract-version", "1");
|
|
19
|
+
}
|
|
10
20
|
const result = await this.fetchFn(url, {
|
|
11
|
-
|
|
12
|
-
headers
|
|
13
|
-
Accept: "application/json",
|
|
14
|
-
Authorization: await this.xboxTokenProvider.getXboxLiveV3Token(),
|
|
15
|
-
"x-xbl-contract-version": "1",
|
|
16
|
-
},
|
|
21
|
+
...init,
|
|
22
|
+
headers,
|
|
17
23
|
});
|
|
18
24
|
return result;
|
|
19
25
|
}
|
|
20
|
-
async searchUsers(query) {
|
|
21
|
-
const { results } = await this.executeRequest(`https://usersearch.xboxlive.com/suggest?q=${encodeURIComponent(query)}`, "GET");
|
|
26
|
+
async searchUsers(query, init) {
|
|
27
|
+
const { results } = await this.executeRequest(`https://usersearch.xboxlive.com/suggest?q=${encodeURIComponent(query)}`, { ...init, method: "GET" });
|
|
22
28
|
return results.map(({ result }) => result);
|
|
23
29
|
}
|
|
24
|
-
async recentPlayers() {
|
|
25
|
-
return await this.executeRequest("https://peoplehub.xboxlive.com/users/me/people/recentplayers", "GET");
|
|
30
|
+
async recentPlayers(init) {
|
|
31
|
+
return await this.executeRequest("https://peoplehub.xboxlive.com/users/me/people/recentplayers", { ...init, method: "GET" });
|
|
26
32
|
}
|
|
27
33
|
}
|
|
28
34
|
//# sourceMappingURL=xbox-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xbox-client.js","sourceRoot":"","sources":["../../src/core/xbox-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGrE,MAAM,OAAO,UAAU;IAEF;IACA;IAFnB,YACmB,iBAAoC,EACpC,UAAyB,YAAY;QADrC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,YAAO,GAAP,OAAO,CAA8B;IACrD,CAAC;IAEI,KAAK,CAAC,cAAc,CAAI,GAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"xbox-client.js","sourceRoot":"","sources":["../../src/core/xbox-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGrE,MAAM,OAAO,UAAU;IAEF;IACA;IAFnB,YACmB,iBAAoC,EACpC,UAAyB,YAAY;QADrC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,YAAO,GAAP,OAAO,CAA8B;IACrD,CAAC;IAEI,KAAK,CAAC,cAAc,CAAI,GAAW,EAAE,IAAiB;QAC5D,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;YAC1B,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;SAC3C;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE;YACjC,OAAO,CAAC,GAAG,CACT,eAAe,EACf,MAAM,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,EAAE,CAClD,CAAC;SACH;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,EAAE;YAC1C,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,GAAG,CAAC,CAAC;SAC5C;QACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAI,GAAG,EAAE;YACxC,GAAG,IAAI;YACP,OAAO;SACR,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,WAAW,CACtB,KAAa,EACb,IAA2C;QAE3C,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAa3C,6CAA6C,kBAAkB,CAAC,KAAK,CAAC,EAAE,EACxE,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAC3B,CAAC;QACF,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,IAA2C;QACpE,OAAO,MAAM,IAAI,CAAC,cAAc,CAC9B,8DAA8D,EAC9D,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAC3B,CAAC;IACJ,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { HaloAuthenticationClient } from "./authentication/halo-authentication-client";
|
|
2
|
+
export { RelyingParty, XboxAuthenticationClient, XboxAuthenticationToken, } from "./authentication/xbox-authentication-client";
|
|
3
|
+
export { AssetKindTypeMap, HaloInfiniteClient, ResultContainer, } from "./core/halo-infinite-client";
|
|
4
|
+
export { TokenPersister } from "./core/token-persisters/token-persister";
|
|
5
|
+
export { AutoTokenProvider, AutoTokenProvider as AutoXstsSpartanTokenProvider, } from "./core/token-providers/auto-token-provider";
|
|
6
|
+
export { SpartanTokenProvider } from "./core/token-providers/spartan-token-providers";
|
|
7
|
+
export { StaticXstsTicketTokenSpartanTokenProvider } from "./core/token-providers/spartan-token-providers/static-xsts-ticket-token-spartan-token-provider";
|
|
2
8
|
export { XboxClient } from "./core/xbox-client";
|
|
3
|
-
export {
|
|
4
|
-
export { Playlist } from "./models/halo-infinite/playlist";
|
|
5
|
-
export { PlaylistCsrContainer } from "./models/halo-infinite/playlist-csr-container";
|
|
6
|
-
export { UserInfo } from "./models/halo-infinite/user-info";
|
|
7
|
-
export { ServiceRecord } from "./models/halo-infinite/service-record";
|
|
8
|
-
export { MatchType } from "./models/halo-infinite/match-type";
|
|
9
|
-
export { GameVariantCategory } from "./models/halo-infinite/game-variant-category";
|
|
10
|
-
export { MatchStats } from "./models/halo-infinite/match-stats";
|
|
11
|
-
export { PlayerMatchHistory } from "./models/halo-infinite/player-match-history";
|
|
12
|
-
export { Stats } from "./models/halo-infinite/stats";
|
|
13
|
-
export { MapAsset, UgcGameVariantAsset } from "./models/halo-infinite/asset";
|
|
9
|
+
export { Asset, MapAsset, PlaylistAsset, UgcGameVariantAsset, } from "./models/halo-infinite/asset";
|
|
14
10
|
export { AssetKind } from "./models/halo-infinite/asset-kind";
|
|
15
|
-
export { MatchOutcome } from "./models/halo-infinite/match-outcome";
|
|
16
|
-
export { MatchSkill } from "./models/halo-infinite/match-skill";
|
|
17
11
|
export { AssetVersionLink } from "./models/halo-infinite/asset-version-link";
|
|
12
|
+
export { GameVariantCategory } from "./models/halo-infinite/game-variant-category";
|
|
18
13
|
export { MatchInfo } from "./models/halo-infinite/match-info";
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
14
|
+
export { MatchOutcome } from "./models/halo-infinite/match-outcome";
|
|
15
|
+
export { MatchSkill } from "./models/halo-infinite/match-skill";
|
|
16
|
+
export { MatchStats } from "./models/halo-infinite/match-stats";
|
|
17
|
+
export { MatchType } from "./models/halo-infinite/match-type";
|
|
18
|
+
export { PlayerMatchHistory } from "./models/halo-infinite/player-match-history";
|
|
19
|
+
export { Playlist } from "./models/halo-infinite/playlist";
|
|
20
|
+
export { PlaylistCsr } from "./models/halo-infinite/playlist-csr";
|
|
21
|
+
export { PlaylistCsrContainer } from "./models/halo-infinite/playlist-csr-container";
|
|
23
22
|
export { PlaylistExperience } from "./models/halo-infinite/playlist-experience";
|
|
23
|
+
export { ServiceRecord } from "./models/halo-infinite/service-record";
|
|
24
|
+
export { Stats } from "./models/halo-infinite/stats";
|
|
25
|
+
export { UserInfo } from "./models/halo-infinite/user-info";
|
|
24
26
|
export { FetchFunction } from "./util/fetch-function";
|
|
25
|
-
export { HaloAuthenticationClient } from "./authentication/halo-authentication-client";
|
|
26
|
-
export { XboxAuthenticationToken } from "./authentication/xbox-authentication-client";
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
+
export { HaloAuthenticationClient } from "./authentication/halo-authentication-client";
|
|
2
|
+
export { RelyingParty, XboxAuthenticationClient, } from "./authentication/xbox-authentication-client";
|
|
1
3
|
export { HaloInfiniteClient, } from "./core/halo-infinite-client";
|
|
4
|
+
export { AutoTokenProvider, AutoTokenProvider as AutoXstsSpartanTokenProvider, } from "./core/token-providers/auto-token-provider";
|
|
5
|
+
export { StaticXstsTicketTokenSpartanTokenProvider } from "./core/token-providers/spartan-token-providers/static-xsts-ticket-token-spartan-token-provider";
|
|
2
6
|
export { XboxClient } from "./core/xbox-client";
|
|
3
|
-
export { XboxAuthenticationClient, RelyingParty, } from "./authentication/xbox-authentication-client";
|
|
4
|
-
export { MatchType } from "./models/halo-infinite/match-type";
|
|
5
|
-
export { GameVariantCategory } from "./models/halo-infinite/game-variant-category";
|
|
6
7
|
export { AssetKind } from "./models/halo-infinite/asset-kind";
|
|
8
|
+
export { GameVariantCategory } from "./models/halo-infinite/game-variant-category";
|
|
7
9
|
export { MatchOutcome } from "./models/halo-infinite/match-outcome";
|
|
8
|
-
export {
|
|
9
|
-
export { StaticXstsTicketTokenSpartanTokenProvider } from "./core/token-providers/spartan-token-providers/static-xsts-ticket-token-spartan-token-provider";
|
|
10
|
+
export { MatchType } from "./models/halo-infinite/match-type";
|
|
10
11
|
export { PlaylistExperience } from "./models/halo-infinite/playlist-experience";
|
|
11
|
-
export { HaloAuthenticationClient } from "./authentication/halo-authentication-client";
|
|
12
12
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EACL,YAAY,EACZ,wBAAwB,GAEzB,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAEL,kBAAkB,GAEnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EACL,iBAAiB,EACjB,iBAAiB,IAAI,4BAA4B,GAClD,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,yCAAyC,EAAE,MAAM,gGAAgG,CAAC;AAC3J,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOhD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAGpE,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAK9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import type { SpartanToken } from "../models/spartan-token";
|
|
|
3
3
|
import type { SpartanTokenRequest } from "../models/spartan-token-request";
|
|
4
4
|
import { ExpiryTokenCache } from "../util/expiry-token-cache";
|
|
5
5
|
import { FetchFunction, defaultFetch } from "../util/fetch-function";
|
|
6
|
+
import { GlobalConstants } from "../util/global-contants";
|
|
6
7
|
|
|
7
8
|
export interface Token {
|
|
8
9
|
token: string;
|
|
@@ -30,8 +31,7 @@ export class HaloAuthenticationClient {
|
|
|
30
31
|
method: "POST",
|
|
31
32
|
body: JSON.stringify(tokenRequest),
|
|
32
33
|
headers: {
|
|
33
|
-
"User-Agent":
|
|
34
|
-
"HaloWaypoint/2021112313511900 CFNetwork/1327.0.4 Darwin/21.2.0",
|
|
34
|
+
"User-Agent": GlobalConstants.HALO_WAYPOINT_USER_AGENT,
|
|
35
35
|
"Content-Type": "application/json; charset=utf-8",
|
|
36
36
|
Accept: "application/json, text/plain, */*",
|
|
37
37
|
},
|
|
@@ -17,13 +17,13 @@ import { UserInfo } from "../models/halo-infinite/user-info";
|
|
|
17
17
|
import { GlobalConstants } from "../util/global-contants";
|
|
18
18
|
import { SpartanTokenProvider } from "./token-providers/spartan-token-providers";
|
|
19
19
|
|
|
20
|
-
interface ResultContainer<TValue> {
|
|
20
|
+
export interface ResultContainer<TValue> {
|
|
21
21
|
Id: string;
|
|
22
22
|
ResultCode: 0 | 1;
|
|
23
23
|
Result: TValue;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
interface ResultsContainer<TValue> {
|
|
26
|
+
export interface ResultsContainer<TValue> {
|
|
27
27
|
Value: ResultContainer<TValue>[];
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -72,29 +72,21 @@ export class HaloInfiniteClient {
|
|
|
72
72
|
private readonly fetchFn: FetchFunction = defaultFetch
|
|
73
73
|
) {}
|
|
74
74
|
|
|
75
|
-
private async executeRequest<T>(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
useClearance = false,
|
|
80
|
-
userAgent: string = GlobalConstants.HALO_WAYPOINT_USER_AGENT
|
|
81
|
-
) {
|
|
82
|
-
const headers: HeadersInit = {
|
|
83
|
-
"User-Agent": userAgent,
|
|
84
|
-
Accept: "application/json",
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
if (useSpartanToken) {
|
|
88
|
-
headers["x-343-authorization-spartan"] =
|
|
89
|
-
await this.spartanTokenProvider.getSpartanToken();
|
|
75
|
+
private async executeRequest<T>(url: string, init: RequestInit) {
|
|
76
|
+
const headers = new Headers(init.headers);
|
|
77
|
+
if (!headers.has("User-Agent")) {
|
|
78
|
+
headers.set("User-Agent", GlobalConstants.HALO_PC_USER_AGENT);
|
|
90
79
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
throw new Error("TODO: Implement clearance");
|
|
80
|
+
if (!headers.has("Accept")) {
|
|
81
|
+
headers.set("Accept", "application/json");
|
|
94
82
|
}
|
|
83
|
+
headers.set(
|
|
84
|
+
"x-343-authorization-spartan",
|
|
85
|
+
await this.spartanTokenProvider.getSpartanToken()
|
|
86
|
+
);
|
|
95
87
|
|
|
96
88
|
const result = await this.fetchFn<T>(url, {
|
|
97
|
-
|
|
89
|
+
...init,
|
|
98
90
|
headers,
|
|
99
91
|
});
|
|
100
92
|
|
|
@@ -132,60 +124,97 @@ export class HaloInfiniteClient {
|
|
|
132
124
|
* @param playlistId - Unique ID for the playlist.
|
|
133
125
|
* @param playerIds - Array of player xuids.
|
|
134
126
|
*/
|
|
135
|
-
public getPlaylistCsr = (
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
"
|
|
127
|
+
public getPlaylistCsr = (
|
|
128
|
+
playlistId: string,
|
|
129
|
+
playerIds: string[],
|
|
130
|
+
seasonId?: string,
|
|
131
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
132
|
+
) => {
|
|
133
|
+
const urlParams = new URLSearchParams({
|
|
134
|
+
players: playerIds.map(wrapPlayerId).join(","),
|
|
135
|
+
});
|
|
136
|
+
if (seasonId) {
|
|
137
|
+
urlParams.set("seasonId", seasonId);
|
|
138
|
+
}
|
|
139
|
+
return this.executeResultsRequest<PlaylistCsrContainer>(
|
|
140
|
+
`https://${HaloCoreEndpoints.SkillOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/playlist/${playlistId}/csrs?${urlParams}`,
|
|
141
|
+
{
|
|
142
|
+
...init,
|
|
143
|
+
method: "get",
|
|
144
|
+
}
|
|
143
145
|
);
|
|
146
|
+
};
|
|
144
147
|
|
|
145
148
|
/** Get gamertag info for a player.
|
|
146
149
|
* @param gamerTag - Gamertag to lookup.
|
|
147
150
|
*/
|
|
148
|
-
public getUser = (
|
|
151
|
+
public getUser = (
|
|
152
|
+
gamerTag: string,
|
|
153
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
154
|
+
) =>
|
|
149
155
|
this.executeRequest<UserInfo>(
|
|
150
156
|
`https://${HaloCoreEndpoints.Profile}.${HaloCoreEndpoints.ServiceDomain}/users/gt(${gamerTag})`,
|
|
151
|
-
|
|
157
|
+
|
|
158
|
+
{
|
|
159
|
+
...init,
|
|
160
|
+
method: "get",
|
|
161
|
+
}
|
|
152
162
|
);
|
|
153
163
|
|
|
154
164
|
/** Get gamertag info for several players.
|
|
155
165
|
* @param xuids - Xuids to lookup.
|
|
156
166
|
*/
|
|
157
|
-
public getUsers = (
|
|
167
|
+
public getUsers = (
|
|
168
|
+
xuids: string[],
|
|
169
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
170
|
+
) => {
|
|
158
171
|
return this.executeRequest<UserInfo[]>(
|
|
159
172
|
`https://${HaloCoreEndpoints.Profile}.${
|
|
160
173
|
HaloCoreEndpoints.ServiceDomain
|
|
161
174
|
}/users?xuids=${xuids.map((x) => unwrapPlayerId(x)).join(",")}`,
|
|
162
|
-
|
|
175
|
+
{
|
|
176
|
+
...init,
|
|
177
|
+
method: "get",
|
|
178
|
+
}
|
|
163
179
|
);
|
|
164
180
|
};
|
|
165
181
|
|
|
166
182
|
/** Get service record for a player.
|
|
167
183
|
* @param gamerTag - Gamertag to lookup.
|
|
168
184
|
*/
|
|
169
|
-
public getUserServiceRecord = (
|
|
185
|
+
public getUserServiceRecord = (
|
|
186
|
+
gamerTag: string,
|
|
187
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
188
|
+
) =>
|
|
170
189
|
this.executeRequest<ServiceRecord>(
|
|
171
190
|
`https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/players/${gamerTag}/Matchmade/servicerecord`,
|
|
172
|
-
|
|
191
|
+
{
|
|
192
|
+
...init,
|
|
193
|
+
method: "get",
|
|
194
|
+
}
|
|
173
195
|
);
|
|
174
196
|
|
|
175
197
|
/** Get playlist information
|
|
176
198
|
* @param playlistId - Unique ID for the playlist.
|
|
177
199
|
*/
|
|
178
|
-
public getPlaylist = (
|
|
200
|
+
public getPlaylist = (
|
|
201
|
+
playlistId: string,
|
|
202
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
203
|
+
) =>
|
|
179
204
|
this.executeRequest<Playlist>(
|
|
180
205
|
`https://${HaloCoreEndpoints.GameCmsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/multiplayer/file/playlists/assets/${playlistId}.json`,
|
|
181
|
-
|
|
206
|
+
{
|
|
207
|
+
...init,
|
|
208
|
+
method: "get",
|
|
209
|
+
}
|
|
182
210
|
);
|
|
183
211
|
|
|
184
212
|
public getPlayerMatches = (
|
|
185
213
|
playerXuid: string,
|
|
186
214
|
type: MatchType = MatchType.All,
|
|
187
215
|
count: number = 25,
|
|
188
|
-
start: number = 0
|
|
216
|
+
start: number = 0,
|
|
217
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
189
218
|
) => {
|
|
190
219
|
let params: Record<string, string> = {};
|
|
191
220
|
if (type !== MatchType.All) {
|
|
@@ -198,57 +227,84 @@ export class HaloInfiniteClient {
|
|
|
198
227
|
`https://${HaloCoreEndpoints.StatsOrigin}.${
|
|
199
228
|
HaloCoreEndpoints.ServiceDomain
|
|
200
229
|
}/hi/players/${wrapPlayerId(playerXuid)}/matches`,
|
|
201
|
-
|
|
230
|
+
{
|
|
231
|
+
...init,
|
|
232
|
+
method: "get",
|
|
233
|
+
}
|
|
202
234
|
);
|
|
203
235
|
};
|
|
204
236
|
|
|
205
237
|
public getPlayerServiceRecord(
|
|
206
238
|
playerXuid: string,
|
|
207
|
-
|
|
239
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
208
240
|
) {
|
|
209
241
|
return this.executeRequest<ServiceRecord>(
|
|
210
242
|
`https://${HaloCoreEndpoints.StatsOrigin}.${
|
|
211
243
|
HaloCoreEndpoints.ServiceDomain
|
|
212
244
|
}/hi/players/${wrapPlayerId(playerXuid)}/Matchmade/servicerecord`,
|
|
213
|
-
|
|
245
|
+
{
|
|
246
|
+
...init,
|
|
247
|
+
method: "get",
|
|
248
|
+
}
|
|
214
249
|
);
|
|
215
250
|
}
|
|
216
251
|
|
|
217
|
-
public getMatchStats = (
|
|
252
|
+
public getMatchStats = (
|
|
253
|
+
matchId: string,
|
|
254
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
255
|
+
) =>
|
|
218
256
|
this.executeRequest<MatchStats>(
|
|
219
257
|
`https://${HaloCoreEndpoints.StatsOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/matches/${matchId}/stats`,
|
|
220
|
-
|
|
258
|
+
{
|
|
259
|
+
...init,
|
|
260
|
+
method: "get",
|
|
261
|
+
}
|
|
221
262
|
);
|
|
222
263
|
|
|
223
|
-
public getMatchSkill = async (
|
|
264
|
+
public getMatchSkill = async (
|
|
265
|
+
matchId: string,
|
|
266
|
+
playerIds: string[],
|
|
267
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
268
|
+
) => {
|
|
224
269
|
return await this.executeResultsRequest<MatchSkill>(
|
|
225
270
|
`https://${HaloCoreEndpoints.SkillOrigin}.${
|
|
226
271
|
HaloCoreEndpoints.ServiceDomain
|
|
227
272
|
}/hi/matches/${matchId}/skill?players=${playerIds
|
|
228
273
|
.map(wrapPlayerId)
|
|
229
274
|
.join(",")}`,
|
|
230
|
-
|
|
275
|
+
{
|
|
276
|
+
...init,
|
|
277
|
+
method: "get",
|
|
278
|
+
}
|
|
231
279
|
);
|
|
232
280
|
};
|
|
233
281
|
|
|
234
282
|
/** Gets authoring metadata about a specific asset. */
|
|
235
283
|
public getAsset = <TAssetType extends keyof AssetKindTypeMap>(
|
|
236
284
|
assetType: TAssetType,
|
|
237
|
-
assetId: string
|
|
285
|
+
assetId: string,
|
|
286
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
238
287
|
) =>
|
|
239
288
|
this.executeRequest<AssetKindTypeMap[TAssetType]>(
|
|
240
289
|
`https://${HaloCoreEndpoints.DiscoveryOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/${assetKindUrlMap[assetType]}/${assetId}`,
|
|
241
|
-
|
|
290
|
+
{
|
|
291
|
+
...init,
|
|
292
|
+
method: "get",
|
|
293
|
+
}
|
|
242
294
|
);
|
|
243
295
|
|
|
244
296
|
/** Gets metadata related to a concrete version of a specified asset. */
|
|
245
297
|
public getSpecificAssetVersion = <TAssetType extends keyof AssetKindTypeMap>(
|
|
246
298
|
assetType: TAssetType,
|
|
247
299
|
assetId: string,
|
|
248
|
-
versionId: string
|
|
300
|
+
versionId: string,
|
|
301
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
249
302
|
) =>
|
|
250
303
|
this.executeRequest<AssetKindTypeMap[TAssetType]>(
|
|
251
304
|
`https://${HaloCoreEndpoints.DiscoveryOrigin}.${HaloCoreEndpoints.ServiceDomain}/hi/${assetKindUrlMap[assetType]}/${assetId}/versions/${versionId}`,
|
|
252
|
-
|
|
305
|
+
{
|
|
306
|
+
...init,
|
|
307
|
+
method: "get",
|
|
308
|
+
}
|
|
253
309
|
);
|
|
254
310
|
}
|
|
@@ -7,7 +7,7 @@ import { HaloAuthenticationClient } from "../../authentication/halo-authenticati
|
|
|
7
7
|
import { SpartanTokenProvider } from "./spartan-token-providers";
|
|
8
8
|
import { inMemoryTokenPersister } from "../token-persisters/in-memory-token-persister";
|
|
9
9
|
import { XboxTokenProvider } from "./xbox-token-provider";
|
|
10
|
-
import { FetchFunction } from "
|
|
10
|
+
import type { FetchFunction } from "../../util/fetch-function";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* A SpartanTokenProvider that fetches both the Xbox and Halo tokens in the same
|
package/src/core/xbox-client.ts
CHANGED
|
@@ -7,20 +7,32 @@ export class XboxClient {
|
|
|
7
7
|
private readonly fetchFn: FetchFunction = defaultFetch
|
|
8
8
|
) {}
|
|
9
9
|
|
|
10
|
-
private async executeRequest<T>(url: string,
|
|
10
|
+
private async executeRequest<T>(url: string, init: RequestInit) {
|
|
11
|
+
const headers = new Headers(init.headers);
|
|
12
|
+
if (!headers.has("Accept")) {
|
|
13
|
+
headers.set("Accept", "application/json");
|
|
14
|
+
}
|
|
15
|
+
if (!headers.has("Authorization")) {
|
|
16
|
+
headers.set(
|
|
17
|
+
"Authorization",
|
|
18
|
+
await this.xboxTokenProvider.getXboxLiveV3Token()
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
if (!headers.has("x-xbl-contract-version")) {
|
|
22
|
+
headers.set("x-xbl-contract-version", "1");
|
|
23
|
+
}
|
|
11
24
|
const result = await this.fetchFn<T>(url, {
|
|
12
|
-
|
|
13
|
-
headers
|
|
14
|
-
Accept: "application/json",
|
|
15
|
-
Authorization: await this.xboxTokenProvider.getXboxLiveV3Token(),
|
|
16
|
-
"x-xbl-contract-version": "1",
|
|
17
|
-
},
|
|
25
|
+
...init,
|
|
26
|
+
headers,
|
|
18
27
|
});
|
|
19
28
|
|
|
20
29
|
return result;
|
|
21
30
|
}
|
|
22
31
|
|
|
23
|
-
public async searchUsers(
|
|
32
|
+
public async searchUsers(
|
|
33
|
+
query: string,
|
|
34
|
+
init?: Omit<RequestInit, "body" | "method">
|
|
35
|
+
) {
|
|
24
36
|
const { results } = await this.executeRequest<{
|
|
25
37
|
results: [
|
|
26
38
|
{
|
|
@@ -35,15 +47,15 @@ export class XboxClient {
|
|
|
35
47
|
];
|
|
36
48
|
}>(
|
|
37
49
|
`https://usersearch.xboxlive.com/suggest?q=${encodeURIComponent(query)}`,
|
|
38
|
-
"GET"
|
|
50
|
+
{ ...init, method: "GET" }
|
|
39
51
|
);
|
|
40
52
|
return results.map(({ result }) => result);
|
|
41
53
|
}
|
|
42
54
|
|
|
43
|
-
public async recentPlayers() {
|
|
55
|
+
public async recentPlayers(init?: Omit<RequestInit, "body" | "method">) {
|
|
44
56
|
return await this.executeRequest<unknown>(
|
|
45
57
|
"https://peoplehub.xboxlive.com/users/me/people/recentplayers",
|
|
46
|
-
"GET"
|
|
58
|
+
{ ...init, method: "GET" }
|
|
47
59
|
);
|
|
48
60
|
}
|
|
49
61
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,35 +1,42 @@
|
|
|
1
|
+
export { HaloAuthenticationClient } from "./authentication/halo-authentication-client";
|
|
1
2
|
export {
|
|
2
|
-
HaloInfiniteClient,
|
|
3
|
-
AssetKindTypeMap,
|
|
4
|
-
} from "./core/halo-infinite-client";
|
|
5
|
-
export { XboxClient } from "./core/xbox-client";
|
|
6
|
-
export {
|
|
7
|
-
XboxAuthenticationClient,
|
|
8
3
|
RelyingParty,
|
|
4
|
+
XboxAuthenticationClient,
|
|
5
|
+
XboxAuthenticationToken,
|
|
9
6
|
} from "./authentication/xbox-authentication-client";
|
|
10
|
-
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
export {
|
|
16
|
-
export { MatchStats } from "./models/halo-infinite/match-stats";
|
|
17
|
-
export { PlayerMatchHistory } from "./models/halo-infinite/player-match-history";
|
|
18
|
-
export { Stats } from "./models/halo-infinite/stats";
|
|
19
|
-
export { MapAsset, UgcGameVariantAsset } from "./models/halo-infinite/asset";
|
|
20
|
-
export { AssetKind } from "./models/halo-infinite/asset-kind";
|
|
21
|
-
export { MatchOutcome } from "./models/halo-infinite/match-outcome";
|
|
22
|
-
export { MatchSkill } from "./models/halo-infinite/match-skill";
|
|
23
|
-
export { AssetVersionLink } from "./models/halo-infinite/asset-version-link";
|
|
24
|
-
export { MatchInfo } from "./models/halo-infinite/match-info";
|
|
25
|
-
export { SpartanTokenProvider } from "./core/token-providers/spartan-token-providers";
|
|
7
|
+
export {
|
|
8
|
+
AssetKindTypeMap,
|
|
9
|
+
HaloInfiniteClient,
|
|
10
|
+
ResultContainer,
|
|
11
|
+
} from "./core/halo-infinite-client";
|
|
12
|
+
export { TokenPersister } from "./core/token-persisters/token-persister";
|
|
26
13
|
export {
|
|
27
14
|
AutoTokenProvider,
|
|
28
15
|
AutoTokenProvider as AutoXstsSpartanTokenProvider,
|
|
29
16
|
} from "./core/token-providers/auto-token-provider";
|
|
17
|
+
export { SpartanTokenProvider } from "./core/token-providers/spartan-token-providers";
|
|
30
18
|
export { StaticXstsTicketTokenSpartanTokenProvider } from "./core/token-providers/spartan-token-providers/static-xsts-ticket-token-spartan-token-provider";
|
|
31
|
-
export {
|
|
19
|
+
export { XboxClient } from "./core/xbox-client";
|
|
20
|
+
export {
|
|
21
|
+
Asset,
|
|
22
|
+
MapAsset,
|
|
23
|
+
PlaylistAsset,
|
|
24
|
+
UgcGameVariantAsset,
|
|
25
|
+
} from "./models/halo-infinite/asset";
|
|
26
|
+
export { AssetKind } from "./models/halo-infinite/asset-kind";
|
|
27
|
+
export { AssetVersionLink } from "./models/halo-infinite/asset-version-link";
|
|
28
|
+
export { GameVariantCategory } from "./models/halo-infinite/game-variant-category";
|
|
29
|
+
export { MatchInfo } from "./models/halo-infinite/match-info";
|
|
30
|
+
export { MatchOutcome } from "./models/halo-infinite/match-outcome";
|
|
31
|
+
export { MatchSkill } from "./models/halo-infinite/match-skill";
|
|
32
|
+
export { MatchStats } from "./models/halo-infinite/match-stats";
|
|
33
|
+
export { MatchType } from "./models/halo-infinite/match-type";
|
|
34
|
+
export { PlayerMatchHistory } from "./models/halo-infinite/player-match-history";
|
|
35
|
+
export { Playlist } from "./models/halo-infinite/playlist";
|
|
36
|
+
export { PlaylistCsr } from "./models/halo-infinite/playlist-csr";
|
|
37
|
+
export { PlaylistCsrContainer } from "./models/halo-infinite/playlist-csr-container";
|
|
32
38
|
export { PlaylistExperience } from "./models/halo-infinite/playlist-experience";
|
|
39
|
+
export { ServiceRecord } from "./models/halo-infinite/service-record";
|
|
40
|
+
export { Stats } from "./models/halo-infinite/stats";
|
|
41
|
+
export { UserInfo } from "./models/halo-infinite/user-info";
|
|
33
42
|
export { FetchFunction } from "./util/fetch-function";
|
|
34
|
-
export { HaloAuthenticationClient } from "./authentication/halo-authentication-client";
|
|
35
|
-
export { XboxAuthenticationToken } from "./authentication/xbox-authentication-client";
|