@dendotdev/grunt 1.0.4 → 1.0.5
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/index.d.mts +558 -9
- package/dist/index.d.ts +558 -9
- package/dist/index.js +820 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +820 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -951,6 +951,44 @@ var EconomyModule = class extends ModuleBase {
|
|
|
951
951
|
`/hi/players/xuid(${player})/customization/appearance`
|
|
952
952
|
);
|
|
953
953
|
}
|
|
954
|
+
/**
|
|
955
|
+
* Get customization for multiple players.
|
|
956
|
+
*
|
|
957
|
+
* @param playerIds - List of player XUIDs
|
|
958
|
+
* @returns Player customization collection
|
|
959
|
+
*/
|
|
960
|
+
getMultiplePlayersCustomization(playerIds) {
|
|
961
|
+
if (!playerIds.length) {
|
|
962
|
+
throw new Error("playerIds cannot be empty");
|
|
963
|
+
}
|
|
964
|
+
const formattedPlayers = playerIds.map((id) => `xuid(${id})`).join(",");
|
|
965
|
+
return this.get(`/hi/customization?players=${formattedPlayers}`);
|
|
966
|
+
}
|
|
967
|
+
// ─────────────────────────────────────────────────────────────────
|
|
968
|
+
// Cores
|
|
969
|
+
// ─────────────────────────────────────────────────────────────────
|
|
970
|
+
/**
|
|
971
|
+
* Get details about all owned cores for a player.
|
|
972
|
+
*
|
|
973
|
+
* @param player - Player's numeric XUID
|
|
974
|
+
* @returns All player cores
|
|
975
|
+
*/
|
|
976
|
+
getAllOwnedCoresDetails(player) {
|
|
977
|
+
this.assertNotEmpty(player, "player");
|
|
978
|
+
return this.get(`/hi/players/xuid(${player})/cores`);
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* Get details about a specific owned core.
|
|
982
|
+
*
|
|
983
|
+
* @param player - Player's numeric XUID
|
|
984
|
+
* @param coreId - Core identifier
|
|
985
|
+
* @returns Core details
|
|
986
|
+
*/
|
|
987
|
+
getOwnedCoreDetails(player, coreId) {
|
|
988
|
+
this.assertNotEmpty(player, "player");
|
|
989
|
+
this.assertNotEmpty(coreId, "coreId");
|
|
990
|
+
return this.get(`/hi/players/xuid(${player})/cores/${coreId}`);
|
|
991
|
+
}
|
|
954
992
|
// ─────────────────────────────────────────────────────────────────
|
|
955
993
|
// Stores
|
|
956
994
|
// ─────────────────────────────────────────────────────────────────
|
|
@@ -1014,6 +1052,66 @@ var EconomyModule = class extends ModuleBase {
|
|
|
1014
1052
|
this.assertNotEmpty(player, "player");
|
|
1015
1053
|
return this.get(`/hi/players/xuid(${player})/stores/operations`);
|
|
1016
1054
|
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Get the operation reward levels store.
|
|
1057
|
+
*
|
|
1058
|
+
* @param player - Player's numeric XUID
|
|
1059
|
+
* @returns Store items
|
|
1060
|
+
*/
|
|
1061
|
+
getOperationRewardLevelsStore(player) {
|
|
1062
|
+
this.assertNotEmpty(player, "player");
|
|
1063
|
+
return this.get(`/hi/players/xuid(${player})/stores/operationrewardlevels`);
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Get the XP grants store.
|
|
1067
|
+
*
|
|
1068
|
+
* @param player - Player's numeric XUID
|
|
1069
|
+
* @returns Store items
|
|
1070
|
+
*/
|
|
1071
|
+
getXpGrantsStore(player) {
|
|
1072
|
+
this.assertNotEmpty(player, "player");
|
|
1073
|
+
return this.get(`/hi/players/xuid(${player})/stores/xpgrants`);
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Get items from a credit sub-store.
|
|
1077
|
+
*
|
|
1078
|
+
* Credit sub-stores (0-5) contain different categories of items
|
|
1079
|
+
* purchasable with credits.
|
|
1080
|
+
*
|
|
1081
|
+
* @param player - Player's numeric XUID
|
|
1082
|
+
* @param storeIndex - Sub-store index (0-5)
|
|
1083
|
+
* @returns Store items
|
|
1084
|
+
*/
|
|
1085
|
+
getCreditSubStore(player, storeIndex) {
|
|
1086
|
+
this.assertNotEmpty(player, "player");
|
|
1087
|
+
if (storeIndex < 0 || storeIndex > 5) {
|
|
1088
|
+
throw new Error("storeIndex must be between 0 and 5");
|
|
1089
|
+
}
|
|
1090
|
+
const paddedIndex = storeIndex.toString().padStart(2, "0");
|
|
1091
|
+
return this.get(
|
|
1092
|
+
`/hi/players/xuid(${player})/stores/creditsubstorefront${paddedIndex}`
|
|
1093
|
+
);
|
|
1094
|
+
}
|
|
1095
|
+
/**
|
|
1096
|
+
* Get items from a soft currency (Spartan Points) sub-store.
|
|
1097
|
+
*
|
|
1098
|
+
* Soft currency sub-stores (0-15) contain different categories of items
|
|
1099
|
+
* purchasable with Spartan Points on The Exchange.
|
|
1100
|
+
*
|
|
1101
|
+
* @param player - Player's numeric XUID
|
|
1102
|
+
* @param storeIndex - Sub-store index (0-15)
|
|
1103
|
+
* @returns Store items
|
|
1104
|
+
*/
|
|
1105
|
+
getSoftCurrencySubStore(player, storeIndex) {
|
|
1106
|
+
this.assertNotEmpty(player, "player");
|
|
1107
|
+
if (storeIndex < 0 || storeIndex > 15) {
|
|
1108
|
+
throw new Error("storeIndex must be between 0 and 15");
|
|
1109
|
+
}
|
|
1110
|
+
const paddedIndex = storeIndex.toString().padStart(2, "0");
|
|
1111
|
+
return this.get(
|
|
1112
|
+
`/hi/players/xuid(${player})/stores/softcurrencysubstorefront${paddedIndex}`
|
|
1113
|
+
);
|
|
1114
|
+
}
|
|
1017
1115
|
/**
|
|
1018
1116
|
* Get scheduled storefront offerings.
|
|
1019
1117
|
*
|
|
@@ -1270,7 +1368,7 @@ var GameCmsModule = class extends ModuleBase {
|
|
|
1270
1368
|
* @returns Medal metadata
|
|
1271
1369
|
*/
|
|
1272
1370
|
getMedalMetadata() {
|
|
1273
|
-
return this.get("/hi/
|
|
1371
|
+
return this.get("/hi/Waypoint/file/medals/metadata.json");
|
|
1274
1372
|
}
|
|
1275
1373
|
/**
|
|
1276
1374
|
* Get general game metadata.
|
|
@@ -1339,6 +1437,232 @@ var GameCmsModule = class extends ModuleBase {
|
|
|
1339
1437
|
this.assertNotEmpty(filePath, "filePath");
|
|
1340
1438
|
return this.get(`/hi/Progression/file/${filePath}`);
|
|
1341
1439
|
}
|
|
1440
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1441
|
+
// Achievements & Settings
|
|
1442
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1443
|
+
/**
|
|
1444
|
+
* Get all available achievements.
|
|
1445
|
+
*
|
|
1446
|
+
* @returns Achievement collection
|
|
1447
|
+
*/
|
|
1448
|
+
getAchievements() {
|
|
1449
|
+
return this.get("/hi/Multiplayer/file/Live/Achievements.json");
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Get the Play Now button settings (fallback playlist).
|
|
1453
|
+
*
|
|
1454
|
+
* @returns Fallback playlist settings
|
|
1455
|
+
*/
|
|
1456
|
+
getPlayNowButtonSettings() {
|
|
1457
|
+
return this.get(
|
|
1458
|
+
"/hi/Multiplayer/file/playlists/playNowButton/settings.json"
|
|
1459
|
+
);
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* Get custom game default settings.
|
|
1463
|
+
*
|
|
1464
|
+
* @returns Custom game definition
|
|
1465
|
+
*/
|
|
1466
|
+
getCustomGameDefaults() {
|
|
1467
|
+
return this.get("/hi/Multiplayer/file/NonMatchmaking/customgame.json");
|
|
1468
|
+
}
|
|
1469
|
+
/**
|
|
1470
|
+
* Get lobby error messages.
|
|
1471
|
+
*
|
|
1472
|
+
* @param flightId - Flight ID
|
|
1473
|
+
* @returns Lobby error message list
|
|
1474
|
+
*/
|
|
1475
|
+
getLobbyErrorMessages(flightId) {
|
|
1476
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1477
|
+
return this.get(
|
|
1478
|
+
`/hi/Multiplayer/file/gameStartErrorMessages/LobbyHoppperErrorMessageList.json?flight=${flightId}`
|
|
1479
|
+
);
|
|
1480
|
+
}
|
|
1481
|
+
/**
|
|
1482
|
+
* Get network configuration.
|
|
1483
|
+
*
|
|
1484
|
+
* @param flightId - Flight ID
|
|
1485
|
+
* @returns Network configuration
|
|
1486
|
+
*/
|
|
1487
|
+
getNetworkConfiguration(flightId) {
|
|
1488
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1489
|
+
return this.get(
|
|
1490
|
+
`/hi/Multiplayer/file/network/config.json?flight=${flightId}`
|
|
1491
|
+
);
|
|
1492
|
+
}
|
|
1493
|
+
/**
|
|
1494
|
+
* Get a multiplayer playlist configuration.
|
|
1495
|
+
*
|
|
1496
|
+
* @param playlistFile - Playlist file name (e.g., "uuid.json")
|
|
1497
|
+
* @returns Playlist configuration
|
|
1498
|
+
*/
|
|
1499
|
+
getMultiplayerPlaylistConfiguration(playlistFile) {
|
|
1500
|
+
this.assertNotEmpty(playlistFile, "playlistFile");
|
|
1501
|
+
return this.get(
|
|
1502
|
+
`/hi/Multiplayer/file/playlists/assets/${playlistFile}`
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1505
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1506
|
+
// Graphics & Specs
|
|
1507
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1508
|
+
/**
|
|
1509
|
+
* Get async compute overrides.
|
|
1510
|
+
*
|
|
1511
|
+
* @returns Async compute override configuration
|
|
1512
|
+
*/
|
|
1513
|
+
getAsyncComputeOverrides() {
|
|
1514
|
+
return this.get("/hi/Specs/file/graphics/AsyncComputeOverrides.json");
|
|
1515
|
+
}
|
|
1516
|
+
/**
|
|
1517
|
+
* Get CPU presets.
|
|
1518
|
+
*
|
|
1519
|
+
* @returns CPU preset configuration
|
|
1520
|
+
*/
|
|
1521
|
+
getCpuPresets() {
|
|
1522
|
+
return this.get("/hi/Specs/file/cpu/presets.json");
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* Get device preset overrides.
|
|
1526
|
+
*
|
|
1527
|
+
* @returns Device preset overrides
|
|
1528
|
+
*/
|
|
1529
|
+
getDevicePresetOverrides() {
|
|
1530
|
+
return this.get("/hi/Specs/file/graphics/DevicePresetOverrides.json");
|
|
1531
|
+
}
|
|
1532
|
+
/**
|
|
1533
|
+
* Get graphics spec control overrides.
|
|
1534
|
+
*
|
|
1535
|
+
* @returns Graphics spec control overrides
|
|
1536
|
+
*/
|
|
1537
|
+
getGraphicsSpecControlOverrides() {
|
|
1538
|
+
return this.get(
|
|
1539
|
+
"/hi/Specs/file/graphics/GraphicsSpecControlOverrides.json"
|
|
1540
|
+
);
|
|
1541
|
+
}
|
|
1542
|
+
/**
|
|
1543
|
+
* Get graphics specs/overrides.
|
|
1544
|
+
*
|
|
1545
|
+
* @returns Graphics overrides
|
|
1546
|
+
*/
|
|
1547
|
+
getGraphicSpecs() {
|
|
1548
|
+
return this.get("/hi/Specs/file/graphics/overrides.json");
|
|
1549
|
+
}
|
|
1550
|
+
/**
|
|
1551
|
+
* Get recommended drivers.
|
|
1552
|
+
*
|
|
1553
|
+
* @returns Driver manifest
|
|
1554
|
+
*/
|
|
1555
|
+
getRecommendedDrivers() {
|
|
1556
|
+
return this.get("/hi/Specs/file/graphics/RecommendedDrivers.json");
|
|
1557
|
+
}
|
|
1558
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1559
|
+
// Title Authorization & Access
|
|
1560
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1561
|
+
/**
|
|
1562
|
+
* Get claw (clawback) access list.
|
|
1563
|
+
*
|
|
1564
|
+
* @param flightId - Flight ID
|
|
1565
|
+
* @returns Claw access snapshot
|
|
1566
|
+
*/
|
|
1567
|
+
getClawAccess(flightId) {
|
|
1568
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1569
|
+
return this.get(
|
|
1570
|
+
`/hi/TitleAuthorization/file/claw/access.json?flight=${flightId}`
|
|
1571
|
+
);
|
|
1572
|
+
}
|
|
1573
|
+
/**
|
|
1574
|
+
* Get not allowed in title message.
|
|
1575
|
+
*
|
|
1576
|
+
* @returns OE configuration message
|
|
1577
|
+
*/
|
|
1578
|
+
getNotAllowedInTitleMessage() {
|
|
1579
|
+
const url = `https://${HALO_CORE_ENDPOINTS.GAME_CMS_ORIGIN}.${HALO_CORE_ENDPOINTS.SERVICE_DOMAIN}/branches/hi/OEConfiguration/data/authfail/Default.json`;
|
|
1580
|
+
return this.getFullUrl(url, { useSpartanToken: false });
|
|
1581
|
+
}
|
|
1582
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1583
|
+
// Guides (File Listings)
|
|
1584
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1585
|
+
/**
|
|
1586
|
+
* Get guide for images files.
|
|
1587
|
+
*
|
|
1588
|
+
* @param flightId - Flight ID
|
|
1589
|
+
* @returns Guide container with file listings
|
|
1590
|
+
*/
|
|
1591
|
+
getGuideImages(flightId) {
|
|
1592
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1593
|
+
return this.get(`/hi/images/guide/xo?flight=${flightId}`);
|
|
1594
|
+
}
|
|
1595
|
+
/**
|
|
1596
|
+
* Get guide for multiplayer files.
|
|
1597
|
+
*
|
|
1598
|
+
* @param flightId - Flight ID
|
|
1599
|
+
* @returns Guide container with file listings
|
|
1600
|
+
*/
|
|
1601
|
+
getGuideMultiplayer(flightId) {
|
|
1602
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1603
|
+
return this.get(`/hi/Multiplayer/guide/xo?flight=${flightId}`);
|
|
1604
|
+
}
|
|
1605
|
+
/**
|
|
1606
|
+
* Get guide for news files.
|
|
1607
|
+
*
|
|
1608
|
+
* @param flightId - Flight ID
|
|
1609
|
+
* @returns Guide container with file listings
|
|
1610
|
+
*/
|
|
1611
|
+
getGuideNews(flightId) {
|
|
1612
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1613
|
+
return this.get(`/hi/News/guide/xo?flight=${flightId}`);
|
|
1614
|
+
}
|
|
1615
|
+
/**
|
|
1616
|
+
* Get guide for progression files.
|
|
1617
|
+
*
|
|
1618
|
+
* @param flightId - Flight ID
|
|
1619
|
+
* @returns Guide container with file listings
|
|
1620
|
+
*/
|
|
1621
|
+
getGuideProgression(flightId) {
|
|
1622
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1623
|
+
return this.get(`/hi/Progression/guide/xo?flight=${flightId}`);
|
|
1624
|
+
}
|
|
1625
|
+
/**
|
|
1626
|
+
* Get guide for spec files.
|
|
1627
|
+
*
|
|
1628
|
+
* @param flightId - Flight ID
|
|
1629
|
+
* @returns Guide container with file listings
|
|
1630
|
+
*/
|
|
1631
|
+
getGuideSpecs(flightId) {
|
|
1632
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1633
|
+
return this.get(`/hi/Specs/guide/xo?flight=${flightId}`);
|
|
1634
|
+
}
|
|
1635
|
+
/**
|
|
1636
|
+
* Get guide for title authorization files.
|
|
1637
|
+
*
|
|
1638
|
+
* @param flightId - Flight ID
|
|
1639
|
+
* @returns Guide container with file listings
|
|
1640
|
+
*/
|
|
1641
|
+
getGuideTitleAuthorization(flightId) {
|
|
1642
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1643
|
+
return this.get(`/hi/TitleAuthorization/guide/xo?flight=${flightId}`);
|
|
1644
|
+
}
|
|
1645
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1646
|
+
// Waypoint Files
|
|
1647
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1648
|
+
/**
|
|
1649
|
+
* Get emblem mapping configuration.
|
|
1650
|
+
*
|
|
1651
|
+
* @returns Emblem mapping dictionary
|
|
1652
|
+
*/
|
|
1653
|
+
getEmblemMapping() {
|
|
1654
|
+
return this.get("/hi/Waypoint/file/images/emblems/mapping.json");
|
|
1655
|
+
}
|
|
1656
|
+
/**
|
|
1657
|
+
* Get a generic file from Waypoint service.
|
|
1658
|
+
*
|
|
1659
|
+
* @param filePath - Path to the file
|
|
1660
|
+
* @returns File data as bytes
|
|
1661
|
+
*/
|
|
1662
|
+
getGenericWaypointFile(filePath) {
|
|
1663
|
+
this.assertNotEmpty(filePath, "filePath");
|
|
1664
|
+
return this.get(`/hi/Waypoint/file/${filePath}`, { returnRaw: true });
|
|
1665
|
+
}
|
|
1342
1666
|
};
|
|
1343
1667
|
|
|
1344
1668
|
// src/modules/halo-infinite/lobby.module.ts
|
|
@@ -1422,6 +1746,100 @@ var SettingsModule = class extends ModuleBase {
|
|
|
1422
1746
|
useSpartanToken: true
|
|
1423
1747
|
});
|
|
1424
1748
|
}
|
|
1749
|
+
/**
|
|
1750
|
+
* Get a list of features enabled for a given flight.
|
|
1751
|
+
*
|
|
1752
|
+
* @param flightId - Clearance ID/flight that is being used
|
|
1753
|
+
* @returns Flighted feature flags
|
|
1754
|
+
*/
|
|
1755
|
+
getFlightedFeatureFlags(flightId) {
|
|
1756
|
+
this.assertNotEmpty(flightId, "flightId");
|
|
1757
|
+
return this.get(`/featureflags/hi?flight=${flightId}`);
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* Get the currently active clearance.
|
|
1761
|
+
*
|
|
1762
|
+
* @param release - Release identifier (e.g., "1.4", "1.5", "1.6")
|
|
1763
|
+
* @returns Player clearance data
|
|
1764
|
+
*/
|
|
1765
|
+
getActiveClearance(release) {
|
|
1766
|
+
this.assertNotEmpty(release, "release");
|
|
1767
|
+
return this.get(`/hi/clearances/active?release=${release}`, {
|
|
1768
|
+
useSpartanToken: false
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1771
|
+
/**
|
|
1772
|
+
* Get the currently active flight.
|
|
1773
|
+
*
|
|
1774
|
+
* @param sandbox - Sandbox identifier (typically "UNUSED")
|
|
1775
|
+
* @param buildNumber - Game build number (e.g., "211755.22.01.23.0549-0")
|
|
1776
|
+
* @param release - Release identifier (e.g., "1.4", "1.5")
|
|
1777
|
+
* @returns Player clearance data
|
|
1778
|
+
*/
|
|
1779
|
+
getActiveFlight(sandbox, buildNumber, release) {
|
|
1780
|
+
this.assertNotEmpty(sandbox, "sandbox");
|
|
1781
|
+
this.assertNotEmpty(buildNumber, "buildNumber");
|
|
1782
|
+
this.assertNotEmpty(release, "release");
|
|
1783
|
+
return this.get(
|
|
1784
|
+
`/oban/flight-configurations/titles/hi/audiences/RETAIL/active?sandbox=${sandbox}&build=${buildNumber}&release=${release}`
|
|
1785
|
+
);
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Get the clearance/flight ID for a specific audience.
|
|
1789
|
+
*
|
|
1790
|
+
* @param audience - Audience targeting (e.g., "RETAIL")
|
|
1791
|
+
* @param sandbox - Sandbox identifier (typically "UNUSED")
|
|
1792
|
+
* @param buildNumber - Game build number
|
|
1793
|
+
* @param release - Release identifier
|
|
1794
|
+
* @returns Player clearance data
|
|
1795
|
+
*/
|
|
1796
|
+
getClearance(audience, sandbox, buildNumber, release) {
|
|
1797
|
+
this.assertNotEmpty(audience, "audience");
|
|
1798
|
+
this.assertNotEmpty(sandbox, "sandbox");
|
|
1799
|
+
this.assertNotEmpty(buildNumber, "buildNumber");
|
|
1800
|
+
this.assertNotEmpty(release, "release");
|
|
1801
|
+
return this.get(
|
|
1802
|
+
`/oban/flight-configurations/titles/hi/audiences/${audience}/active?sandbox=${sandbox}&build=${buildNumber}&release=${release}`
|
|
1803
|
+
);
|
|
1804
|
+
}
|
|
1805
|
+
/**
|
|
1806
|
+
* Get the player clearance/flight ID for a specific audience.
|
|
1807
|
+
*
|
|
1808
|
+
* @param audience - Audience targeting (e.g., "RETAIL")
|
|
1809
|
+
* @param player - Player XUID
|
|
1810
|
+
* @param sandbox - Sandbox identifier (typically "UNUSED")
|
|
1811
|
+
* @param buildNumber - Game build number
|
|
1812
|
+
* @param release - Release identifier
|
|
1813
|
+
* @returns Player clearance data
|
|
1814
|
+
*/
|
|
1815
|
+
getPlayerClearance(audience, player, sandbox, buildNumber, release) {
|
|
1816
|
+
this.assertNotEmpty(audience, "audience");
|
|
1817
|
+
this.assertNotEmpty(player, "player");
|
|
1818
|
+
this.assertNotEmpty(sandbox, "sandbox");
|
|
1819
|
+
this.assertNotEmpty(buildNumber, "buildNumber");
|
|
1820
|
+
this.assertNotEmpty(release, "release");
|
|
1821
|
+
return this.get(
|
|
1822
|
+
`/oban/flight-configurations/titles/hi/audiences/${audience}/players/xuid(${player})/active?sandbox=${sandbox}&build=${buildNumber}&release=${release}`
|
|
1823
|
+
);
|
|
1824
|
+
}
|
|
1825
|
+
/**
|
|
1826
|
+
* Get the player clearance/flight ID for RETAIL audience.
|
|
1827
|
+
*
|
|
1828
|
+
* @param player - Player XUID
|
|
1829
|
+
* @param sandbox - Sandbox identifier (typically "UNUSED")
|
|
1830
|
+
* @param buildNumber - Game build number
|
|
1831
|
+
* @param release - Release identifier
|
|
1832
|
+
* @returns Player clearance data
|
|
1833
|
+
*/
|
|
1834
|
+
getPlayerClearanceRetail(player, sandbox, buildNumber, release) {
|
|
1835
|
+
this.assertNotEmpty(player, "player");
|
|
1836
|
+
this.assertNotEmpty(sandbox, "sandbox");
|
|
1837
|
+
this.assertNotEmpty(buildNumber, "buildNumber");
|
|
1838
|
+
this.assertNotEmpty(release, "release");
|
|
1839
|
+
return this.get(
|
|
1840
|
+
`/oban/flight-configurations/titles/hi/audiences/RETAIL/players/xuid(${player})/active?sandbox=${sandbox}&build=${buildNumber}&release=${release}`
|
|
1841
|
+
);
|
|
1842
|
+
}
|
|
1425
1843
|
};
|
|
1426
1844
|
|
|
1427
1845
|
// src/modules/halo-infinite/skill.module.ts
|
|
@@ -1603,6 +2021,28 @@ var TextModerationModule = class extends ModuleBase {
|
|
|
1603
2021
|
getModerationKey() {
|
|
1604
2022
|
return this.get("/hi/moderation/key");
|
|
1605
2023
|
}
|
|
2024
|
+
/**
|
|
2025
|
+
* Get a specific moderation proof signing key.
|
|
2026
|
+
*
|
|
2027
|
+
* @param keyId - Key ID (can be obtained from getSigningKeys)
|
|
2028
|
+
* @returns Signing key data
|
|
2029
|
+
*/
|
|
2030
|
+
getSigningKey(keyId) {
|
|
2031
|
+
this.assertNotEmpty(keyId, "keyId");
|
|
2032
|
+
return this.get(`/hi/moderation-proof-keys/${keyId}`, {
|
|
2033
|
+
useSpartanToken: false
|
|
2034
|
+
});
|
|
2035
|
+
}
|
|
2036
|
+
/**
|
|
2037
|
+
* Get all available moderation proof signing keys.
|
|
2038
|
+
*
|
|
2039
|
+
* @returns Container with all signing keys
|
|
2040
|
+
*/
|
|
2041
|
+
getSigningKeys() {
|
|
2042
|
+
return this.get("/hi/moderation-proof-keys", {
|
|
2043
|
+
useSpartanToken: false
|
|
2044
|
+
});
|
|
2045
|
+
}
|
|
1606
2046
|
};
|
|
1607
2047
|
|
|
1608
2048
|
// src/modules/halo-infinite/ugc.module.ts
|
|
@@ -1639,6 +2079,18 @@ var UgcModule = class extends ModuleBase {
|
|
|
1639
2079
|
this.assertNotEmpty(assetId, "assetId");
|
|
1640
2080
|
return this.get(`/${title}/${assetType}/${assetId}/versions/latest`);
|
|
1641
2081
|
}
|
|
2082
|
+
/**
|
|
2083
|
+
* Get the latest version of a film asset.
|
|
2084
|
+
*
|
|
2085
|
+
* @param title - Game title
|
|
2086
|
+
* @param assetId - Film asset GUID
|
|
2087
|
+
* @returns Latest film asset version
|
|
2088
|
+
*/
|
|
2089
|
+
getLatestAssetVersionFilm(title, assetId) {
|
|
2090
|
+
this.assertNotEmpty(title, "title");
|
|
2091
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2092
|
+
return this.get(`/${title}/films/${assetId}/versions/latest`);
|
|
2093
|
+
}
|
|
1642
2094
|
/**
|
|
1643
2095
|
* Get a specific version of an asset.
|
|
1644
2096
|
*
|
|
@@ -1814,18 +2266,31 @@ var UgcModule = class extends ModuleBase {
|
|
|
1814
2266
|
// Asset Management
|
|
1815
2267
|
// ─────────────────────────────────────────────────────────────────
|
|
1816
2268
|
/**
|
|
1817
|
-
* Delete an asset
|
|
2269
|
+
* Delete an asset.
|
|
1818
2270
|
*
|
|
1819
2271
|
* @param title - Game title
|
|
1820
2272
|
* @param assetType - Type of asset
|
|
1821
2273
|
* @param assetId - Asset GUID
|
|
1822
2274
|
* @returns Success status
|
|
1823
2275
|
*/
|
|
1824
|
-
|
|
2276
|
+
deleteAsset(title, assetType, assetId) {
|
|
1825
2277
|
this.assertNotEmpty(title, "title");
|
|
1826
2278
|
this.assertNotEmpty(assetId, "assetId");
|
|
1827
2279
|
return this.delete(`/${title}/${assetType}/${assetId}`);
|
|
1828
2280
|
}
|
|
2281
|
+
/**
|
|
2282
|
+
* Delete all versions of an asset.
|
|
2283
|
+
*
|
|
2284
|
+
* @param title - Game title
|
|
2285
|
+
* @param assetType - Type of asset
|
|
2286
|
+
* @param assetId - Asset GUID
|
|
2287
|
+
* @returns Success status
|
|
2288
|
+
*/
|
|
2289
|
+
deleteAllVersions(title, assetType, assetId) {
|
|
2290
|
+
this.assertNotEmpty(title, "title");
|
|
2291
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2292
|
+
return this.delete(`/${title}/${assetType}/${assetId}/versions`);
|
|
2293
|
+
}
|
|
1829
2294
|
/**
|
|
1830
2295
|
* Delete a specific version of an asset.
|
|
1831
2296
|
*
|
|
@@ -1841,6 +2306,34 @@ var UgcModule = class extends ModuleBase {
|
|
|
1841
2306
|
this.assertNotEmpty(versionId, "versionId");
|
|
1842
2307
|
return this.delete(`/${title}/${assetType}/${assetId}/versions/${versionId}`);
|
|
1843
2308
|
}
|
|
2309
|
+
/**
|
|
2310
|
+
* Undelete a previously deleted asset.
|
|
2311
|
+
*
|
|
2312
|
+
* @param title - Game title
|
|
2313
|
+
* @param assetType - Type of asset
|
|
2314
|
+
* @param assetId - Asset GUID
|
|
2315
|
+
* @returns Success status
|
|
2316
|
+
*/
|
|
2317
|
+
undeleteAsset(title, assetType, assetId) {
|
|
2318
|
+
this.assertNotEmpty(title, "title");
|
|
2319
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2320
|
+
return this.post(`/${title}/${assetType}/${assetId}/recover`);
|
|
2321
|
+
}
|
|
2322
|
+
/**
|
|
2323
|
+
* Undelete a previously deleted asset version.
|
|
2324
|
+
*
|
|
2325
|
+
* @param title - Game title
|
|
2326
|
+
* @param assetType - Type of asset
|
|
2327
|
+
* @param assetId - Asset GUID
|
|
2328
|
+
* @param versionId - Version GUID
|
|
2329
|
+
* @returns Success status
|
|
2330
|
+
*/
|
|
2331
|
+
undeleteVersion(title, assetType, assetId, versionId) {
|
|
2332
|
+
this.assertNotEmpty(title, "title");
|
|
2333
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2334
|
+
this.assertNotEmpty(versionId, "versionId");
|
|
2335
|
+
return this.post(`/${title}/${assetType}/${assetId}/versions/${versionId}/recover`);
|
|
2336
|
+
}
|
|
1844
2337
|
/**
|
|
1845
2338
|
* Publish an asset version.
|
|
1846
2339
|
*
|
|
@@ -1939,6 +2432,21 @@ var UgcModule = class extends ModuleBase {
|
|
|
1939
2432
|
this.assertNotEmpty(assetId, "assetId");
|
|
1940
2433
|
return this.delete(`/${title}/${assetType}/${assetId}/sessions`);
|
|
1941
2434
|
}
|
|
2435
|
+
/**
|
|
2436
|
+
* Spawn (create) a new asset.
|
|
2437
|
+
*
|
|
2438
|
+
* @param title - Game title
|
|
2439
|
+
* @param assetType - Type of asset (e.g., "UgcGameVariants", "Maps", "Prefabs")
|
|
2440
|
+
* @param asset - Asset definition
|
|
2441
|
+
* @returns Created asset
|
|
2442
|
+
*/
|
|
2443
|
+
spawnAsset(title, assetType, asset) {
|
|
2444
|
+
this.assertNotEmpty(title, "title");
|
|
2445
|
+
return this.postJson(
|
|
2446
|
+
`/${title}/${assetType}`,
|
|
2447
|
+
asset
|
|
2448
|
+
);
|
|
2449
|
+
}
|
|
1942
2450
|
/**
|
|
1943
2451
|
* Create a new asset version.
|
|
1944
2452
|
*
|
|
@@ -1996,6 +2504,9 @@ var UgcDiscoveryModule = class extends ModuleBase {
|
|
|
1996
2504
|
constructor(client) {
|
|
1997
2505
|
super(client, HALO_CORE_ENDPOINTS.DISCOVERY_ORIGIN);
|
|
1998
2506
|
}
|
|
2507
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2508
|
+
// Search & Browse
|
|
2509
|
+
// ─────────────────────────────────────────────────────────────────
|
|
1999
2510
|
/**
|
|
2000
2511
|
* Search for user-generated content.
|
|
2001
2512
|
*
|
|
@@ -2032,6 +2543,27 @@ var UgcDiscoveryModule = class extends ModuleBase {
|
|
|
2032
2543
|
if (params.start !== void 0) {
|
|
2033
2544
|
queryParts.push(`start=${params.start}`);
|
|
2034
2545
|
}
|
|
2546
|
+
if (params.averageRatingMin !== void 0) {
|
|
2547
|
+
queryParts.push(`averageRatingMin=${params.averageRatingMin}`);
|
|
2548
|
+
}
|
|
2549
|
+
if (params.fromDateCreatedUtc) {
|
|
2550
|
+
queryParts.push(`fromDateCreatedUtc=${encodeURIComponent(params.fromDateCreatedUtc.toISOString())}`);
|
|
2551
|
+
}
|
|
2552
|
+
if (params.toDateCreatedUtc) {
|
|
2553
|
+
queryParts.push(`toDateCreatedUtc=${encodeURIComponent(params.toDateCreatedUtc.toISOString())}`);
|
|
2554
|
+
}
|
|
2555
|
+
if (params.fromDateModifiedUtc) {
|
|
2556
|
+
queryParts.push(`fromDateModifiedUtc=${encodeURIComponent(params.fromDateModifiedUtc.toISOString())}`);
|
|
2557
|
+
}
|
|
2558
|
+
if (params.toDateModifiedUtc) {
|
|
2559
|
+
queryParts.push(`toDateModifiedUtc=${encodeURIComponent(params.toDateModifiedUtc.toISOString())}`);
|
|
2560
|
+
}
|
|
2561
|
+
if (params.fromDatePublishedUtc) {
|
|
2562
|
+
queryParts.push(`fromDatePublishedUtc=${encodeURIComponent(params.fromDatePublishedUtc.toISOString())}`);
|
|
2563
|
+
}
|
|
2564
|
+
if (params.toDatePublishedUtc) {
|
|
2565
|
+
queryParts.push(`toDatePublishedUtc=${encodeURIComponent(params.toDatePublishedUtc.toISOString())}`);
|
|
2566
|
+
}
|
|
2035
2567
|
const queryString = queryParts.length > 0 ? `?${queryParts.join("&")}` : "";
|
|
2036
2568
|
return this.get(`/hi/search${queryString}`);
|
|
2037
2569
|
}
|
|
@@ -2111,15 +2643,298 @@ var UgcDiscoveryModule = class extends ModuleBase {
|
|
|
2111
2643
|
return this.get(`/hi/${assetKind}/${assetId}`);
|
|
2112
2644
|
}
|
|
2113
2645
|
/**
|
|
2114
|
-
* Get
|
|
2646
|
+
* Get tags information.
|
|
2647
|
+
*
|
|
2648
|
+
* @returns Available tags info
|
|
2649
|
+
*/
|
|
2650
|
+
getTagsInfo() {
|
|
2651
|
+
return this.get("/hi/info/tags");
|
|
2652
|
+
}
|
|
2653
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2654
|
+
// Manifests
|
|
2655
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2656
|
+
/**
|
|
2657
|
+
* Get the game manifest by build GUID.
|
|
2658
|
+
*
|
|
2659
|
+
* @param buildGuid - Build GUID
|
|
2660
|
+
* @returns Manifest data
|
|
2661
|
+
*/
|
|
2662
|
+
getManifestByBuildGuid(buildGuid) {
|
|
2663
|
+
this.assertNotEmpty(buildGuid, "buildGuid");
|
|
2664
|
+
return this.get(`/hi/manifests/guids/${buildGuid}/game`);
|
|
2665
|
+
}
|
|
2666
|
+
/**
|
|
2667
|
+
* Get the game manifest by build number.
|
|
2668
|
+
*
|
|
2669
|
+
* @param buildNumber - Build number (e.g., "6.10022.10499")
|
|
2670
|
+
* @returns Manifest data
|
|
2671
|
+
*/
|
|
2672
|
+
getManifestByBuild(buildNumber) {
|
|
2673
|
+
this.assertNotEmpty(buildNumber, "buildNumber");
|
|
2674
|
+
return this.get(`/hi/manifests/builds/${buildNumber}/game`);
|
|
2675
|
+
}
|
|
2676
|
+
/**
|
|
2677
|
+
* Get a specific manifest version.
|
|
2678
|
+
*
|
|
2679
|
+
* @param assetId - Manifest asset ID
|
|
2680
|
+
* @param versionId - Manifest version ID
|
|
2681
|
+
* @param clearanceId - Active flight clearance ID
|
|
2682
|
+
* @returns Manifest data
|
|
2683
|
+
*/
|
|
2684
|
+
getManifest(assetId, versionId, clearanceId) {
|
|
2685
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2686
|
+
this.assertNotEmpty(versionId, "versionId");
|
|
2687
|
+
return this.get(
|
|
2688
|
+
`/hi/manifests/${assetId}/versions/${versionId}?clearanceId=${clearanceId}`
|
|
2689
|
+
);
|
|
2690
|
+
}
|
|
2691
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2692
|
+
// Maps
|
|
2693
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2694
|
+
/**
|
|
2695
|
+
* Get a specific map version.
|
|
2696
|
+
*
|
|
2697
|
+
* @param assetId - Map asset ID
|
|
2698
|
+
* @param versionId - Map version ID
|
|
2699
|
+
* @returns Map data
|
|
2700
|
+
*/
|
|
2701
|
+
getMap(assetId, versionId) {
|
|
2702
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2703
|
+
this.assertNotEmpty(versionId, "versionId");
|
|
2704
|
+
return this.get(`/hi/maps/${assetId}/versions/${versionId}`);
|
|
2705
|
+
}
|
|
2706
|
+
/**
|
|
2707
|
+
* Get a map without specifying version (returns latest).
|
|
2708
|
+
*
|
|
2709
|
+
* @param assetId - Map asset ID
|
|
2710
|
+
* @returns Map data
|
|
2711
|
+
*/
|
|
2712
|
+
getMapWithoutVersion(assetId) {
|
|
2713
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2714
|
+
return this.get(`/hi/maps/${assetId}`);
|
|
2715
|
+
}
|
|
2716
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2717
|
+
// Map Mode Pairs
|
|
2718
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2719
|
+
/**
|
|
2720
|
+
* Get a specific map mode pair version.
|
|
2721
|
+
*
|
|
2722
|
+
* @param assetId - Map mode pair asset ID
|
|
2723
|
+
* @param versionId - Version ID
|
|
2724
|
+
* @param clearanceId - Active flight clearance ID
|
|
2725
|
+
* @returns Map mode pair data
|
|
2726
|
+
*/
|
|
2727
|
+
getMapModePair(assetId, versionId, clearanceId) {
|
|
2728
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2729
|
+
this.assertNotEmpty(versionId, "versionId");
|
|
2730
|
+
return this.get(
|
|
2731
|
+
`/hi/mapModePairs/${assetId}/versions/${versionId}?clearanceId=${clearanceId}`
|
|
2732
|
+
);
|
|
2733
|
+
}
|
|
2734
|
+
/**
|
|
2735
|
+
* Get a map mode pair without specifying version.
|
|
2736
|
+
*
|
|
2737
|
+
* @param assetId - Map mode pair asset ID
|
|
2738
|
+
* @returns Map mode pair data
|
|
2739
|
+
*/
|
|
2740
|
+
getMapModePairWithoutVersion(assetId) {
|
|
2741
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2742
|
+
return this.get(`/hi/mapModePairs/${assetId}`);
|
|
2743
|
+
}
|
|
2744
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2745
|
+
// Playlists
|
|
2746
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2747
|
+
/**
|
|
2748
|
+
* Get a specific playlist version.
|
|
2749
|
+
*
|
|
2750
|
+
* @param assetId - Playlist asset ID
|
|
2751
|
+
* @param versionId - Version ID
|
|
2752
|
+
* @param clearanceId - Active flight clearance ID
|
|
2753
|
+
* @returns Playlist data
|
|
2754
|
+
*/
|
|
2755
|
+
getPlaylist(assetId, versionId, clearanceId) {
|
|
2756
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2757
|
+
this.assertNotEmpty(versionId, "versionId");
|
|
2758
|
+
return this.get(
|
|
2759
|
+
`/hi/playlists/${assetId}/versions/${versionId}?clearanceId=${clearanceId}`
|
|
2760
|
+
);
|
|
2761
|
+
}
|
|
2762
|
+
/**
|
|
2763
|
+
* Get a playlist without specifying version.
|
|
2764
|
+
*
|
|
2765
|
+
* @param assetId - Playlist asset ID
|
|
2766
|
+
* @returns Playlist data
|
|
2767
|
+
*/
|
|
2768
|
+
getPlaylistWithoutVersion(assetId) {
|
|
2769
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2770
|
+
return this.get(`/hi/playlists/${assetId}`);
|
|
2771
|
+
}
|
|
2772
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2773
|
+
// Prefabs
|
|
2774
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2775
|
+
/**
|
|
2776
|
+
* Get a specific prefab version.
|
|
2777
|
+
*
|
|
2778
|
+
* @param assetId - Prefab asset ID
|
|
2779
|
+
* @param versionId - Version ID
|
|
2780
|
+
* @returns Prefab data
|
|
2781
|
+
*/
|
|
2782
|
+
getPrefab(assetId, versionId) {
|
|
2783
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2784
|
+
this.assertNotEmpty(versionId, "versionId");
|
|
2785
|
+
return this.get(`/hi/prefabs/${assetId}/versions/${versionId}`);
|
|
2786
|
+
}
|
|
2787
|
+
/**
|
|
2788
|
+
* Get a prefab without specifying version.
|
|
2789
|
+
*
|
|
2790
|
+
* @param assetId - Prefab asset ID
|
|
2791
|
+
* @returns Prefab data
|
|
2792
|
+
*/
|
|
2793
|
+
getPrefabWithoutVersion(assetId) {
|
|
2794
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2795
|
+
return this.get(`/hi/prefabs/${assetId}`);
|
|
2796
|
+
}
|
|
2797
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2798
|
+
// Projects
|
|
2799
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2800
|
+
/**
|
|
2801
|
+
* Get a specific project version.
|
|
2802
|
+
*
|
|
2803
|
+
* @param assetId - Project asset ID
|
|
2804
|
+
* @param versionId - Version ID
|
|
2805
|
+
* @returns Project data
|
|
2806
|
+
*/
|
|
2807
|
+
getProject(assetId, versionId) {
|
|
2808
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2809
|
+
this.assertNotEmpty(versionId, "versionId");
|
|
2810
|
+
return this.get(`/hi/projects/${assetId}/versions/${versionId}`);
|
|
2811
|
+
}
|
|
2812
|
+
/**
|
|
2813
|
+
* Get a project without specifying version.
|
|
2814
|
+
*
|
|
2815
|
+
* @param assetId - Project asset ID
|
|
2816
|
+
* @returns Project data
|
|
2817
|
+
*/
|
|
2818
|
+
getProjectWithoutVersion(assetId) {
|
|
2819
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2820
|
+
return this.get(`/hi/projects/${assetId}`);
|
|
2821
|
+
}
|
|
2822
|
+
/**
|
|
2823
|
+
* Get the Forge templates (canvases).
|
|
2824
|
+
*
|
|
2825
|
+
* @returns Forge templates project
|
|
2826
|
+
*/
|
|
2827
|
+
getForgeTemplates() {
|
|
2828
|
+
return this.get("/hi/projects/bf0e9bab-6fed-47a4-8bf7-bfd4422ee552");
|
|
2829
|
+
}
|
|
2830
|
+
/**
|
|
2831
|
+
* Get the Forge mode categories.
|
|
2832
|
+
*
|
|
2833
|
+
* @returns Forge mode categories project
|
|
2834
|
+
*/
|
|
2835
|
+
getForgeModeCategories() {
|
|
2836
|
+
return this.get("/hi/projects/aff73c44-0771-468f-b9cf-5c52eee7ab4c");
|
|
2837
|
+
}
|
|
2838
|
+
/**
|
|
2839
|
+
* Get the community tab assets.
|
|
2840
|
+
*
|
|
2841
|
+
* @returns Community tab project
|
|
2842
|
+
*/
|
|
2843
|
+
getCommunityTab() {
|
|
2844
|
+
return this.get("/hi/projects/90f9e508-99ce-411c-bf88-7bf12b5e9f52");
|
|
2845
|
+
}
|
|
2846
|
+
/**
|
|
2847
|
+
* Get 343 recommended assets.
|
|
2848
|
+
*
|
|
2849
|
+
* @returns 343 recommended project
|
|
2850
|
+
*/
|
|
2851
|
+
get343Recommended() {
|
|
2852
|
+
return this.get("/hi/projects/712add52-f989-48e1-b3bb-ac7cd8a1c17a");
|
|
2853
|
+
}
|
|
2854
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2855
|
+
// Game Variants
|
|
2856
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2857
|
+
/**
|
|
2858
|
+
* Get a specific engine game variant version.
|
|
2859
|
+
*
|
|
2860
|
+
* @param assetId - Engine game variant asset ID
|
|
2861
|
+
* @param versionId - Version ID
|
|
2862
|
+
* @returns Engine game variant data
|
|
2863
|
+
*/
|
|
2864
|
+
getEngineGameVariant(assetId, versionId) {
|
|
2865
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2866
|
+
this.assertNotEmpty(versionId, "versionId");
|
|
2867
|
+
return this.get(
|
|
2868
|
+
`/hi/engineGameVariants/${assetId}/versions/${versionId}`
|
|
2869
|
+
);
|
|
2870
|
+
}
|
|
2871
|
+
/**
|
|
2872
|
+
* Get an engine game variant without specifying version.
|
|
2873
|
+
*
|
|
2874
|
+
* @param assetId - Engine game variant asset ID
|
|
2875
|
+
* @returns Engine game variant data
|
|
2876
|
+
*/
|
|
2877
|
+
getEngineGameVariantWithoutVersion(assetId) {
|
|
2878
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2879
|
+
return this.get(`/hi/engineGameVariants/${assetId}`);
|
|
2880
|
+
}
|
|
2881
|
+
/**
|
|
2882
|
+
* Get a specific UGC game variant version.
|
|
2883
|
+
*
|
|
2884
|
+
* @param assetId - UGC game variant asset ID
|
|
2885
|
+
* @param versionId - Version ID
|
|
2886
|
+
* @returns UGC game variant data
|
|
2887
|
+
*/
|
|
2888
|
+
getUgcGameVariant(assetId, versionId) {
|
|
2889
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2890
|
+
this.assertNotEmpty(versionId, "versionId");
|
|
2891
|
+
return this.get(
|
|
2892
|
+
`/hi/ugcGameVariants/${assetId}/versions/${versionId}`
|
|
2893
|
+
);
|
|
2894
|
+
}
|
|
2895
|
+
/**
|
|
2896
|
+
* Get a UGC game variant without specifying version.
|
|
2897
|
+
*
|
|
2898
|
+
* @param assetId - UGC game variant asset ID
|
|
2899
|
+
* @returns UGC game variant data
|
|
2900
|
+
*/
|
|
2901
|
+
getUgcGameVariantWithoutVersion(assetId) {
|
|
2902
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2903
|
+
return this.get(`/hi/ugcGameVariants/${assetId}`);
|
|
2904
|
+
}
|
|
2905
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2906
|
+
// Films
|
|
2907
|
+
// ─────────────────────────────────────────────────────────────────
|
|
2908
|
+
/**
|
|
2909
|
+
* Get a film by asset ID.
|
|
2910
|
+
*
|
|
2911
|
+
* @param assetId - Film asset ID
|
|
2912
|
+
* @returns Film data
|
|
2913
|
+
*/
|
|
2914
|
+
getFilm(assetId) {
|
|
2915
|
+
this.assertNotEmpty(assetId, "assetId");
|
|
2916
|
+
return this.get(`/hi/films/${assetId}`);
|
|
2917
|
+
}
|
|
2918
|
+
/**
|
|
2919
|
+
* Get film asset for a match (spectate).
|
|
2115
2920
|
*
|
|
2116
2921
|
* @param matchId - Match GUID
|
|
2117
2922
|
* @returns Film asset if available
|
|
2118
2923
|
*/
|
|
2119
|
-
|
|
2924
|
+
spectateByMatchId(matchId) {
|
|
2120
2925
|
this.assertNotEmpty(matchId, "matchId");
|
|
2121
2926
|
return this.get(`/hi/films/matches/${matchId}/spectate`);
|
|
2122
2927
|
}
|
|
2928
|
+
/**
|
|
2929
|
+
* Get film asset for a match.
|
|
2930
|
+
*
|
|
2931
|
+
* @param matchId - Match GUID
|
|
2932
|
+
* @returns Film asset if available
|
|
2933
|
+
* @deprecated Use spectateByMatchId instead
|
|
2934
|
+
*/
|
|
2935
|
+
getFilmByMatchId(matchId) {
|
|
2936
|
+
return this.spectateByMatchId(matchId);
|
|
2937
|
+
}
|
|
2123
2938
|
};
|
|
2124
2939
|
|
|
2125
2940
|
// src/clients/halo-infinite-client.ts
|